[Patch] Transmogrification 3.3.5a

Video: Transmogrification - YouTube

Key features:
Blizzlike
dynamic (custom items work)
customizable from config
uses gossip menus

Limitations:
(These are defaults, can be configured)
http://www.wowwiki.com/Transmogrification

Get It:
http://rochet2.github.io/Transmogrification.html

How To Transmogrify:
Equip an item that is suitable for transmogrification.
Have an item in your bags that is suitable to be used to transmogrify the equipped item
Talk to Transmogrifier and select the item slot. Then select the item you want to transmogrify to.
Click to proceed when prompted and your items are transmogrified.

Links:
How to add a new script?
Updating core?

Transmog threads:
http://www.trinitycore.org/f/topic/6508-patch-transmogrification-335a/ (requires login)
Transmogrification 3.3.5a - SICKind
%5BTrinitycore%5D Transmogrification - AC Web
http://emudevs.com/showthread.php/33-Trinitycore-Transmogrification-3-3-5a

1 Like

Rochet2, that is an awesome modification! I like the well thought out implementation and feature sets. I’d totally like to see more stuff like this.

Thanks for your work

It looks cool, even i see a bit hardcore to add 2 new columns to item_instance that will make db to grow a lot, i sugest you to use a new table for it.

Thanks ppl :3

I will look into that.

Might need a bit more work though.

Do I really need to use a prepared statement or is a normal query fine? (Executed on login)

Here is my input:

1- Change table to “custom_transmogrification”

columns:


guid

fakeEntry

2- Remove FakeOwner completely, its not needed at all, i removed it and compiled your script, since item_instance has internal item owner, and no two item owners can have same item guid.

3- When you untransmogrify a users item, send a notify message to him saying, item was untransmogrified.

4- When you transmogrify an item, add a simple spell effect visual to it, try.


pUnit->GetAI()->DoCast(63491);

hey, sorry i’m new on this forum. first, Nice script /emoticons/default_smile.png

but i got two questions/problems :

  1. Sorry noob question… : where do i apply the patch file?

  2. i got error with compiling the new version,

i’m using Visal C++ 2010,Compiling on 32 bits getting this error :

4> Creating library C:/Trinitycore/build8/src/server/worldserver/Release/worldserver.lib and object C:/Trinitycore/build8/src/server/worldserver/Release/worldserver.exp

4>game.lib(ScriptLoader.obj) : error LNK2019: unresolved external symbol “void __cdecl AddSC_NPC_Transmogrify(void)” (?AddSC_NPC_Transmogrify@@YAXXZ) referenced in function “void __cdecl AddCustomScripts(void)” (?AddCustomScripts@@YAXXZ)

4>C:Trinitycorebuild8binReleaseworldserver.exe : fatal error LNK1120: 1 unresolved externals

how to fix?

Thx for rep /emoticons/default_smile.png <3 Ps : Good luck rochet2, verry nice work /emoticons/default_smile.png

Add the script to your solution.

The direction of taking the modification out of the item_instance table sounds like a sound idea for obvious reasons, I’ll attempt to modify the source myself. Unless Rochet2 you Plan on doing this anyway.

The error has been fixed but now i got

4>C:TrinitycoreTrinityCore-TrinityCore-5b24fbfsrcservergameScriptingScriptLoader.cpp(1248): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

3> Tt.cpp

3>C:TrinitycoreTrinityCore-TrinityCore-5b24fbfsrcserverscriptsCustomTt.cpp(121): error C2039: ‘FakeEntry’ : is not a member of ‘Item’

3> C:/Trinitycore/TrinityCore-TrinityCore-5b24fbf/src/server/game/Entities/ItemItem.h(208) : see declaration of ‘Item’

3>C:TrinitycoreTrinityCore-TrinityCore-5b24fbfsrcserverscriptsCustomTt.cpp(121): error C2039: ‘FakeOwner’ : is not a member of ‘Item’

3> C:/Trinitycore/TrinityCore-TrinityCore-5b24fbf/src/server/game/Entities/ItemItem.h(208) : see declaration of ‘Item’

3>C:TrinitycoreTrinityCore-TrinityCore-5b24fbfsrcserverscriptsCustomTt.cpp(124): error C2039: ‘FakeEntry’ : is not a member of ‘Item’

3> C:/Trinitycore/TrinityCore-TrinityCore-5b24fbf/src/server/game/Entities/ItemItem.h(208) : see declaration of ‘Item’

3>C:TrinitycoreTrinityCore-TrinityCore-5b24fbfsrcserverscriptsCustomTt.cpp(125): error C2039: ‘FakeOwner’ : is not a member of ‘Item’

3> C:/Trinitycore/TrinityCore-TrinityCore-5b24fbf/src/server/game/Entities/ItemItem.h(208) : see declaration of ‘Item’

3>C:TrinitycoreTrinityCore-TrinityCore-5b24fbfsrcserverscriptsCustomTt.cpp(135): error C2039: ‘FakeEntry’ : is not a member of ‘Item’

3> C:/Trinitycore/TrinityCore-TrinityCore-5b24fbf/src/server/game/Entities/ItemItem.h(208) : see declaration of ‘Item’

3>C:TrinitycoreTrinityCore-TrinityCore-5b24fbfsrcserverscriptsCustomTt.cpp(135): error C2039: ‘FakeOwner’ : is not a member of ‘Item’

3> C:/Trinitycore/TrinityCore-TrinityCore-5b24fbf/src/server/game/Entities/ItemItem.h(208) : see declaration of ‘Item’

3>C:TrinitycoreTrinityCore-TrinityCore-5b24fbfsrcserverscriptsCustomTt.cpp(138): error C2039: ‘FakeEntry’ : is not a member of ‘Item’

3> C:/Trinitycore/TrinityCore-TrinityCore-5b24fbf/src/server/game/Entities/ItemItem.h(208) : see declaration of ‘Item’

3>C:TrinitycoreTrinityCore-TrinityCore-5b24fbfsrcserverscriptsCustomTt.cpp(139): error C2039: ‘FakeOwner’ : is not a member of ‘Item’

3> C:/Trinitycore/TrinityCore-TrinityCore-5b24fbf/src/server/game/Entities/ItemItem.h(208) : see declaration of ‘Item’

3>C:TrinitycoreTrinityCore-TrinityCore-5b24fbfsrcserverscriptsCustomTt.cpp(160): error C2039: ‘FakeEntry’ : is not a member of ‘Item’

3> C:/Trinitycore/TrinityCore-TrinityCore-5b24fbf/src/server/game/Entities/ItemItem.h(208) : see declaration of ‘Item’

3>C:TrinitycoreTrinityCore-TrinityCore-5b24fbfsrcserverscriptsCustomTt.cpp(161): error C2039: ‘FakeOwner’ : is not a member of ‘Item’

3> C:/Trinitycore/TrinityCore-TrinityCore-5b24fbf/src/server/game/Entities/ItemItem.h(208) : see declaration of ‘Item’

3>C:TrinitycoreTrinityCore-TrinityCore-5b24fbfsrcserverscriptsCustomTt.cpp(209): error C2039: ‘FakeEntry’ : is not a member of ‘Item’

3> C:/Trinitycore/TrinityCore-TrinityCore-5b24fbf/src/server/game/Entities/ItemItem.h(208) : see declaration of ‘Item’

Ps : where i put the patch file?

Any thx xees

@Callmephil

Seems like the patch is not applied, thus you get errors.

You apply patches with git for example. git apply command should do.

You can also do it manually, the .patch file has the new code and the locations where you should put it.

I am going to modify it to use a new table. I would have done it yesterday, but when I tested the server crashed cause I forgot that I had tested the SQLs with a guid.

The prepared statements use ? in the spot where the player’s guid goes in the SQL, didnt have it and took some time to find it. (stupid copy paste error)

The owner column is used to prevent players from sending the items to other characters etc. with the transmogrification.

Basically it is only needed for heirlooms, since those are only non-soulbound items in 3.3.5a patch. (which are uncommon, epic or rare)

It is also needed if someone modifies the script to accept more than those 3 qualities. (gray, white)

Isnt the owner column in item_instance the current owner? So it will not do the job.

There are no hooks for trading, mailing, auctioning etc. So instead of modifying many functions I just decided to use one column.

Message is a good idea.

Mhmh, visuals… - I like everything being shown only for the player. NPC casting spells is not one of those things.

Might add some sound possibly… at some point.

Updated to use a custom table.

Check out update list for more.

Nice work, althought i think you should rethink editing the prepared statements.

So it does not get broken by a commit.

True

Rochey2, just as a possible addition that may curb the number of users claiming they can’t use your mod you might want to throw in a creature template utilizing the script as a separate sql file or part of the original as an example on how to implement it. Similar to Wilibald09’s and Aokromes’ TeleNPC2 Script.

Beyond that I can’t think of anything you need to do to improve on it, then again I beyond just patching and fixing minor issues I’ve never really worked/read on enough of TrinityCore’s source to be able so suggest anything else.

Good ideas guys.

Best feedbacks ever :3

Unlike those shitty amateur forums, isn’t it? /emoticons/default_tongue.png

Good job, I like the code. Could be cleaner, but meh. /emoticons/default_smile.png

Why do you have this lines in the SetVisibleItemSlot method?

[CODE]

if(pItem->FakeEntry || pItem->FakeOwner)

{

CharacterDatabase.PExecute(“DELETE FROM custom_transmogrification WHERE guid = %u”, pItem->GetGUIDLow());

pItem->FakeEntry = NULL;

pItem->FakeOwner = NULL;

}[/CODE]

it seems that this check should be in the _LoadInventory method

Also since FakeEntry and FakeOwner are uint32 wouldn’t it make more sense to set it as 0. You usually use NULL for pointers.

In most situations Null equates to 0 anyway so semantically it’s a non-issue. So unless you’re planning to port TrinityCore to an embedded platform where you don’t have a flat memory model and Null is potentially a non-zero value then… why even worry about it? Well outside of readability.

In most situations Null equates to 0 anyway so semantically it’s a non-issue. So unless you’re planning to port TrinityCore to an embedded platform where you don’t have a flat memory model and Null is potentially a non-zero value then… why even worry about it? Well outside of readability.

You answered your own question.