mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
change variable name
This commit is contained in:
@@ -116,7 +116,7 @@ bool Eluna::OnGossipHello(Player* pPlayer, Creature* pCreature)
|
|||||||
bool Eluna::OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
|
bool Eluna::OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
|
||||||
{
|
{
|
||||||
START_HOOK_WITH_RETVAL(CreatureGossipBindings, GOSSIP_EVENT_ON_SELECT, pCreature->GetEntry(), false);
|
START_HOOK_WITH_RETVAL(CreatureGossipBindings, GOSSIP_EVENT_ON_SELECT, pCreature->GetEntry(), false);
|
||||||
auto original_menu = *pPlayer->PlayerTalkClass;
|
auto originalMenu = *pPlayer->PlayerTalkClass;
|
||||||
pPlayer->PlayerTalkClass->ClearMenus();
|
pPlayer->PlayerTalkClass->ClearMenus();
|
||||||
Push(pPlayer);
|
Push(pPlayer);
|
||||||
Push(pCreature);
|
Push(pCreature);
|
||||||
@@ -124,7 +124,7 @@ bool Eluna::OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 sender,
|
|||||||
Push(action);
|
Push(action);
|
||||||
auto preventDefault = CallAllFunctionsBool(CreatureGossipBindings, key, true);
|
auto preventDefault = CallAllFunctionsBool(CreatureGossipBindings, key, true);
|
||||||
if (!preventDefault) {
|
if (!preventDefault) {
|
||||||
*pPlayer->PlayerTalkClass = original_menu;
|
*pPlayer->PlayerTalkClass = originalMenu;
|
||||||
}
|
}
|
||||||
return preventDefault;
|
return preventDefault;
|
||||||
}
|
}
|
||||||
@@ -132,7 +132,7 @@ bool Eluna::OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 sender,
|
|||||||
bool Eluna::OnGossipSelectCode(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action, const char* code)
|
bool Eluna::OnGossipSelectCode(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action, const char* code)
|
||||||
{
|
{
|
||||||
START_HOOK_WITH_RETVAL(CreatureGossipBindings, GOSSIP_EVENT_ON_SELECT, pCreature->GetEntry(), false);
|
START_HOOK_WITH_RETVAL(CreatureGossipBindings, GOSSIP_EVENT_ON_SELECT, pCreature->GetEntry(), false);
|
||||||
auto original_menu = *pPlayer->PlayerTalkClass;
|
auto originalMenu = *pPlayer->PlayerTalkClass;
|
||||||
pPlayer->PlayerTalkClass->ClearMenus();
|
pPlayer->PlayerTalkClass->ClearMenus();
|
||||||
Push(pPlayer);
|
Push(pPlayer);
|
||||||
Push(pCreature);
|
Push(pCreature);
|
||||||
@@ -141,7 +141,7 @@ bool Eluna::OnGossipSelectCode(Player* pPlayer, Creature* pCreature, uint32 send
|
|||||||
Push(code);
|
Push(code);
|
||||||
auto preventDefault = CallAllFunctionsBool(CreatureGossipBindings, key, true);
|
auto preventDefault = CallAllFunctionsBool(CreatureGossipBindings, key, true);
|
||||||
if (!preventDefault) {
|
if (!preventDefault) {
|
||||||
*pPlayer->PlayerTalkClass = original_menu;
|
*pPlayer->PlayerTalkClass = originalMenu;
|
||||||
}
|
}
|
||||||
return preventDefault;
|
return preventDefault;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user