[10901] Allow vehicles to have gossip menu

In addition rename IsGameobject -> IsGameObject.
This commit is contained in:
zergtmn 2010-12-21 15:11:41 +05:00
parent d736fe9d9a
commit 2f4e7a9377
8 changed files with 12 additions and 13 deletions

View file

@ -330,7 +330,7 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data )
uint32 gossipListId;
uint32 menuId;
ObjectGuid guid;
std::string code = "";
std::string code;
recv_data >> guid >> menuId >> gossipListId;
@ -344,8 +344,7 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data )
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
// can vehicle have gossip? If so, need check for this also.
if (guid.IsCreatureOrPet())
if (guid.IsAnyTypeCreature())
{
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
@ -366,7 +365,7 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data )
_player->OnGossipSelect(pCreature, gossipListId, menuId);
}
}
else if (guid.IsGameobject())
else if (guid.IsGameObject())
{
GameObject *pGo = GetPlayer()->GetGameObjectIfCanInteractWith(guid);