From ac01d7fab496a9c55906c0115089a91cf2874672 Mon Sep 17 00:00:00 2001 From: James Huston Date: Sun, 12 Jan 2025 18:15:58 -0500 Subject: [PATCH] Rolled back some transitional changes the chat handler --- src/Transmogrification.cpp | 2 +- src/transmog_scripts.cpp | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/Transmogrification.cpp b/src/Transmogrification.cpp index 824f41e..795d9bd 100644 --- a/src/Transmogrification.cpp +++ b/src/Transmogrification.cpp @@ -596,7 +596,7 @@ TransmogAcoreStrings Transmogrification::Transmogrify(Player* player, Item* item itemTransmogrified->SetNotRefundable(player); itemTransmogrified->ClearSoulboundTradeable(player); - if (itemTransmogrifier->GetTemplate()->Bonding == BIND_WHEN_EQUIPED || itemTransmogrifier->GetTemplate()->Bonding == BIND_WHEN_USE) + if (itemTransmogrifier->GetTemplate()->Bonding == BIND_WHEN_EQUIPPED || itemTransmogrifier->GetTemplate()->Bonding == BIND_WHEN_USE) itemTransmogrifier->SetBinding(true); itemTransmogrifier->SetOwnerGUID(player->GetGUID()); diff --git a/src/transmog_scripts.cpp b/src/transmog_scripts.cpp index 2ce8ab3..f3106eb 100644 --- a/src/transmog_scripts.cpp +++ b/src/transmog_scripts.cpp @@ -438,16 +438,14 @@ void PerformTransmogrification (Player* player, uint32 itemEntry, uint32 cost) WorldSession* session = player->GetSession(); if (!player->HasEnoughMoney(cost)) { - // ChatHandler(session).SendNotification(LANG_ERR_TRANSMOG_NOT_ENOUGH_MONEY); - session->SendNotification(LANG_ERR_TRANSMOG_NOT_ENOUGH_MONEY); + ChatHandler(session).SendNotification(LANG_ERR_TRANSMOG_NOT_ENOUGH_MONEY); return; } TransmogAcoreStrings res = sT->Transmogrify(player, itemEntry, slot); if (res == LANG_ERR_TRANSMOG_OK) session->SendAreaTriggerMessage("%s",GTS(LANG_ERR_TRANSMOG_OK)); else - // ChatHandler(session).SendNotification(res); - session->SendNotification(res); + ChatHandler(session).SendNotification(res); } void RemoveTransmogrification (Player* player) @@ -462,8 +460,7 @@ void RemoveTransmogrification (Player* player) session->SendAreaTriggerMessage("%s", GTS(LANG_ERR_UNTRANSMOG_OK)); } else - // ChatHandler(session).SendNotification(LANG_ERR_UNTRANSMOG_NO_TRANSMOGS); - session->SendNotification(LANG_ERR_UNTRANSMOG_NO_TRANSMOGS); + ChatHandler(session).SendNotification(LANG_ERR_UNTRANSMOG_NO_TRANSMOGS); } } @@ -960,8 +957,7 @@ public: Item* targetItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, slot); if (!targetItem) { - // ChatHandler(player->GetSession()).SendNotification(LANG_ERR_TRANSMOG_MISSING_DEST_ITEM); - player->GetSession()->SendNotification(LANG_ERR_TRANSMOG_MISSING_DEST_ITEM); + ChatHandler(player->GetSession()).SendNotification(LANG_ERR_TRANSMOG_MISSING_DEST_ITEM); CloseGossipMenuFor(player); return; }