Core/Player: showQuests check in PrepareGossipMenu for GameObjects

This commit is contained in:
Gacko
2013-03-31 15:46:32 +02:00
parent b8de1fdd84
commit 34c73a5121
+3 -4
View File
@@ -14318,12 +14318,11 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
if (source->GetTypeId() == TYPEID_UNIT)
{
npcflags = source->GetUInt32Value(UNIT_NPC_FLAGS);
if (npcflags & UNIT_NPC_FLAG_QUESTGIVER && showQuests)
if (showQuests && npcflags & UNIT_NPC_FLAG_QUESTGIVER)
PrepareQuestMenu(source->GetGUID());
}
if (source->GetTypeId() == TYPEID_GAMEOBJECT)
if (source->ToGameObject()->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
else if (source->GetTypeId() == TYPEID_GAMEOBJECT)
if (showQuests && source->ToGameObject()->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
PrepareQuestMenu(source->GetGUID());
for (GossipMenuItemsContainer::const_iterator itr = menuItemBounds.first; itr != menuItemBounds.second; ++itr)