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)
|
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:
|
case GOSSIP_OPTION_QUESTGIVER:
|
||||||
PrepareQuestMenu(pSource->GetGUID());
|
PrepareQuestMenu(pSource->GetGUID());
|
||||||
hasMenuItem = false;
|
hasMenuItem = false;
|
||||||
|
|
@ -12635,10 +12639,6 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId)
|
||||||
if (getClass() != CLASS_HUNTER)
|
if (getClass() != CLASS_HUNTER)
|
||||||
hasMenuItem = false;
|
hasMenuItem = false;
|
||||||
break;
|
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_SPIRITGUIDE:
|
||||||
case GOSSIP_OPTION_INNKEEPER:
|
case GOSSIP_OPTION_INNKEEPER:
|
||||||
case GOSSIP_OPTION_BANKER:
|
case GOSSIP_OPTION_BANKER:
|
||||||
|
|
@ -12702,7 +12702,10 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canTalkToCredit)
|
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 ;-)
|
// 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())
|
/*if (pMenu->Empty())
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9940"
|
#define REVISION_NR "9941"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue