mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9941] Add additional check for UNIT_NPC_FLAG_GOSSIP before using TalkedToCreature
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
47186c05ec
commit
f14c0e319f
2 changed files with 9 additions and 6 deletions
|
|
@ -12590,6 +12590,10 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId)
|
|||
|
||||
switch(itr->second.option_id)
|
||||
{
|
||||
case GOSSIP_OPTION_GOSSIP:
|
||||
if (itr->second.action_menu_id) // has sub menu, so do not "talk" with this NPC yet
|
||||
canTalkToCredit = false;
|
||||
break;
|
||||
case GOSSIP_OPTION_QUESTGIVER:
|
||||
PrepareQuestMenu(pSource->GetGUID());
|
||||
hasMenuItem = false;
|
||||
|
|
@ -12635,10 +12639,6 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId)
|
|||
if (getClass() != CLASS_HUNTER)
|
||||
hasMenuItem = false;
|
||||
break;
|
||||
case GOSSIP_OPTION_GOSSIP:
|
||||
if (itr->second.action_menu_id) // has sub menu, so do not "talk" with this NPC yet
|
||||
canTalkToCredit = false;
|
||||
break;
|
||||
case GOSSIP_OPTION_SPIRITGUIDE:
|
||||
case GOSSIP_OPTION_INNKEEPER:
|
||||
case GOSSIP_OPTION_BANKER:
|
||||
|
|
@ -12702,7 +12702,10 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId)
|
|||
}
|
||||
|
||||
if (canTalkToCredit)
|
||||
TalkedToCreature(((Creature*)pSource)->GetEntry(), ((Creature*)pSource)->GetGUID());
|
||||
{
|
||||
if (pSource->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP))
|
||||
TalkedToCreature(((Creature*)pSource)->GetEntry(), ((Creature*)pSource)->GetGUID());
|
||||
}
|
||||
|
||||
// some gossips aren't handled in normal way ... so we need to do it this way .. TODO: handle it in normal way ;-)
|
||||
/*if (pMenu->Empty())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue