Transmogrification display vendor

I am also stuck at the spot where the gossip menu closes. Doesn’t work for any of the items I put in. And yes I have changed the creaturescript in the sql. Can’t figure this out for the life of me… Anyways I know you put a lot of effort in, thanks =] If this helps, the npc, when I click on, for example, “Rare,” turns abruptly back to his starting orientation and the gossip menu closes. Not sure haha.

Set the NPC’s flags to 129 (npcflags)

I just got around testing this and it was just the NPC sql being incomplete.

Cool, made it work.

Also, a suggestion, I’m going to try adding but I’m sure it’ll take you 1/100 of the time, add a “are you sure” type thing when people right click. Some people make mistakes and it would be nice to have a confirmation.

Before transmogrifying?

I dont think its possible without client modification.

Hence I made it be free by default.

Also, an option for refunding the transmogrification tokens?

player->AddItem(tokenid, 1); after the “x transmogrification has been removed from x” etc would do the job but im not sure how to do such a thing when detransmogrifying the ENTIRE set because i dont know how many items were untransmogged you know?

You can always know how many items were untransmogrified and what items they were.

Both removing all and removing one use the same method.

Get the item, remove the transmog.

The remove function is a bool funciton, so if the transmog is removed, it returns true, so you can just edit the loop in all transmog remove to count the removed transmogs for example.

if (TransmogDisplayVendorMgr::DeleteFakeEntry(newItem) && !removed) removed = true;

works like a charm, why didnt i tought of it the vendor flag djeez /emoticons/default_tongue.png

lol great system

I get an error Message:

/home/server/TrinityCore/src/server/game/Entities/Item/Item.cpp: In static member function ‘static void Item::DeleteFromDB(SQLTransaction&, uint32)’:
/home/server/TrinityCore/src/server/game/Entities/Item/Item.cpp:484: error: ‘TransmogDisplayVendorMgr’ has not been declared
make[2]: *** [src/server/game/CMakeFiles/game.dir/Entities/Item/Item.cpp.o] Fehler 1
make[1]: *** [src/server/game/CMakeFiles/game.dir/all] Fehler 2
make: *** [all] Fehler 2

After i manually applyed all rejected hunks.

Obviously, you are missing functions.

You possibly need to include the header file to the item.cpp.

You might have missed that. or something.

The header File is in every Script. Player.cpp, Item.cpp and ScriptLoader.cpp. Funny thing is: If i comment that Line in Item.cpp it just shows up the next Message showing, that the Same static method is not declared in Player.cpp neither!

In the hunk for the item.cpp File it says:

diff a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp (rejected hunks)
@@ -16,6 +16,7 @@

+#include “…/…/…/scripts/Custom/TransmogDisplayVendorConf.h”
#include “Common.h”
#include “Item.h”
#include “ObjectMgr.h”

And i did:

#include “…/…/…/scripts/Custom/TransmogDisplayVendorConf.h”
#include “Common.h”
#include “Item.h”
#include “ObjectMgr.h”
#include “WorldPacket.h”
#include “DatabaseEnv.h”
#include “ItemEnchantmentMgr.h”
#include “SpellMgr.h”
#include “SpellInfo.h”
#include “ScriptMgr.h”
#include “ConditionMgr.h”
#include “Player.h”
#include “Opcodes.h”

So i actually just copy + pasted it. And the second Part in the hunk File is the Part, which isn’t working when i try to compile:

  • TransmogDisplayVendorMgr::DeleteFakeFromDB(itemGuid); // custom

#include “…/…/…/scripts/Custom/TransmogDisplayVendorConf.h””

Why this ? Include it into CMake and just make it “TransmogDisplayVendorConf.h”.

Well i’ll try that…I was just doing, what the hunk told me ^^

Got the Script installed now. But: I allways get the Message “Item not found” (In German: Der Gegenstand wurde nicht gefunden), when i right click on an Item to morph. Does the Item Name has to be in english ore where is my error?

Something else is wrong.

I dont think I have written such an error message and I dont use TC error messages.

This likely means that this code is not there or the scriptname is different:

  • if(creature->GetScriptName() == “NPC_TransmogDisplayVendor”)

  • {

  •    TransmogDisplayVendorMgr::HandleTransmogrify(this, creature, vendorslot, item);
  •    return false;
  • }

Well it is actually this part:

optionDataList oM = optionMap[(item->GetTemplate()->Class == ITEM_CLASS_WEAPON ? MAX_ITEM_SUBCLASS_WEAPON : 0)+item->GetTemplate()->SubClass][getCorrectInvType(item->GetTemplate()->InventoryType)][sender];
uint32 itemCount = (oM.size()-action);
if (itemCount > MAX_VENDOR_ITEMS)
if (!itemCount)
session->SendAreaTriggerMessage(“No items found”);
OnGossipSelect(player, creature, SENDER_SELECT_VENDOR, slot);
return true;

But: That can’t be the error, beacause the Gossip menu isn’t closing, like it should do according to the script.

So i thought i could be this part:

if (TransmogDisplayVendorMgr::RequireToken)
player->DestroyItemCount(TransmogDisplayVendorMgr::TokenEntry, TransmogDisplayVendorMgr::TokenAmount, true);

But: Tokenrequired is “false” in TransmogDisplayVendorConf.h

static const bool RequireGold = true;
static const bool RequireToken = false;
static const uint32 TokenEntry = false;
static const uint32 TokenAmount = 1;

So i’m stuck ^^

The script Name is right, that’s fer sure. But it’s not in Player.cpp ore item.cpp according to the Posts above…

Do you have HandleTransmogrify in Player.cpp?

If not, you are missing it. And thus you get the error.

When you said you get the error when you try to transmogrify, you did mean that when the vendor is open and you click an item right? (to buy)

It was wasn’t in therer. Now it is, but i still get the Error message and yeah, when i “buy” (right click) the error message appears.

I now re-installed a fresh version of the script and that acutally fixed the Messages, that the static method was not declared, but it didn’t fix my error message. And yeah i do have the Token in my Inventory. Gm Mode off, Visible on, Whispers on. Script Name of Npc is: “NPC_TransmogDisplayVendor”

“It wasnt there”
So you didnt apply the diff completely.

Which means you might have other things missing or other things that could make it not act correctly …

Unless item.cpp folder position changed, you probably either forgot the include or it has wrong path that didnt error for me when I compiled.

Note the supported version: 161caf8

Is “No items found” The exact error message and the earlier was just a typo?

“Item not found”

I had a look in the .diff file and appart from the last one every Part was correctly inserted.

The message says: “Der Gegenstand wurde nicht gefunden” - In english “The Item was not found” or shorter “Item not found”.