mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[9572] Add script calls for GameObject GossipHello and GossipSelect
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
c4f3578226
commit
dbe089b66d
7 changed files with 76 additions and 9 deletions
|
|
@ -304,8 +304,6 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data )
|
|||
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
// TODO: determine if scriptCall is needed for GO and also if scriptCall can be same as current, with modified argument WorldObject*
|
||||
|
||||
// can vehicle have gossip? If so, need check for this also.
|
||||
if (IS_CREATURE_OR_PET_GUID(guid))
|
||||
{
|
||||
|
|
@ -338,7 +336,16 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data )
|
|||
return;
|
||||
}
|
||||
|
||||
_player->OnGossipSelect(pGo, gossipListId, menuId);
|
||||
if (!code.empty())
|
||||
{
|
||||
if (!Script->GOGossipSelectWithCode(_player, pGo, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId), code.c_str()))
|
||||
_player->OnGossipSelect(pGo, gossipListId, menuId);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Script->GOGossipSelect(_player, pGo, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId)))
|
||||
_player->OnGossipSelect(pGo, gossipListId, menuId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue