Core/Gossip: Gossip menu items will now have constant index, allowing to properly define scripts relying on that index when mixed with conditions. Script-created menus via ADD_GOSSIP_ITEM will still have the index generated dynamically
This commit is contained in:
@@ -56,7 +56,6 @@ public:
|
||||
{ "equiperror", SEC_ADMINISTRATOR, false, &HandleDebugSendEquipErrorCommand, "", NULL },
|
||||
{ "largepacket", SEC_ADMINISTRATOR, false, &HandleDebugSendLargePacketCommand, "", NULL },
|
||||
{ "opcode", SEC_ADMINISTRATOR, false, &HandleDebugSendOpcodeCommand, "", NULL },
|
||||
{ "poi", SEC_ADMINISTRATOR, false, &HandleDebugSendPoiCommand, "", NULL },
|
||||
{ "qpartymsg", SEC_ADMINISTRATOR, false, &HandleDebugSendQuestPartyMsgCommand, "", NULL },
|
||||
{ "qinvalidmsg", SEC_ADMINISTRATOR, false, &HandleDebugSendQuestInvalidMsgCommand, "", NULL },
|
||||
{ "sellerror", SEC_ADMINISTRATOR, false, &HandleDebugSendSellErrorCommand, "", NULL },
|
||||
@@ -218,32 +217,6 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleDebugSendPoiCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
Player *pPlayer = handler->GetSession()->GetPlayer();
|
||||
Unit* target = handler->getSelectedUnit();
|
||||
if (!target)
|
||||
{
|
||||
handler->SendSysMessage(LANG_SELECT_CHAR_OR_CREATURE);
|
||||
return true;
|
||||
}
|
||||
|
||||
char* icon_text = strtok((char*)args, " ");
|
||||
char* flags_text = strtok(NULL, " ");
|
||||
if (!icon_text || !flags_text)
|
||||
return false;
|
||||
|
||||
uint32 icon = atol(icon_text);
|
||||
uint32 flags = atol(flags_text);
|
||||
|
||||
sLog->outDetail("Command : POI, NPC = %u, icon = %u flags = %u", target->GetGUIDLow(), icon, flags);
|
||||
pPlayer->PlayerTalkClass->SendPointOfInterest(target->GetPositionX(), target->GetPositionY(), Poi_Icon(icon), flags, 30, "Test POI");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleDebugSendEquipErrorCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
|
||||
@@ -362,7 +362,7 @@ bool OPvPCapturePointZM_GraveYard::HandleGossipOption(Player *plr, uint64 guid,
|
||||
m_FlagCarrierGUID = plr->GetGUID();
|
||||
}
|
||||
UpdateTowerState();
|
||||
plr->PlayerTalkClass->CloseGossip();
|
||||
plr->PlayerTalkClass->SendCloseGossip();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -1315,7 +1315,7 @@ public:
|
||||
if (!pPlayer->HasEnoughMoney(10000000))
|
||||
{
|
||||
pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, 0, 0, 0);
|
||||
pPlayer->PlayerTalkClass->CloseGossip();
|
||||
pPlayer->PlayerTalkClass->SendCloseGossip();
|
||||
break;
|
||||
}
|
||||
else
|
||||
@@ -1328,7 +1328,7 @@ public:
|
||||
pPlayer->CastSpell(pPlayer, 63624, true, NULL, NULL, pPlayer->GetGUID());
|
||||
|
||||
// Should show another Gossip text with "Congratulations..."
|
||||
pPlayer->PlayerTalkClass->CloseGossip();
|
||||
pPlayer->PlayerTalkClass->SendCloseGossip();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2598,7 +2598,7 @@ public:
|
||||
pPlayer->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN);
|
||||
}
|
||||
}
|
||||
pPlayer->PlayerTalkClass->CloseGossip();
|
||||
pPlayer->PlayerTalkClass->SendCloseGossip();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user