mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[8929] Implement gossip scripts to be used with gossip_menu_option.action_script_id
Note that script is implemented for GOSSIP_OPTION_GOSSIP only (as not expected needed for other gossip options). Also add a few more startup checks for LoadGossipMenuItems with check for basic errors in fields
This commit is contained in:
parent
ec0043ac64
commit
5d2189b7b7
10 changed files with 116 additions and 11 deletions
|
|
@ -12413,6 +12413,14 @@ void Player::OnGossipSelect(WorldObject* pSource, uint32 gossipListId, uint32 me
|
|||
if (pMenuData.m_gAction_poi)
|
||||
PlayerTalkClass->SendPointOfInterest(pMenuData.m_gAction_poi);
|
||||
|
||||
if (pMenuData.m_gAction_script)
|
||||
{
|
||||
if (pSource->GetTypeId() == TYPEID_UNIT)
|
||||
GetMap()->ScriptsStart(sGossipScripts, pMenuData.m_gAction_script, this, pSource);
|
||||
else if (pSource->GetTypeId() == TYPEID_GAMEOBJECT)
|
||||
GetMap()->ScriptsStart(sGossipScripts, pMenuData.m_gAction_script, pSource, this);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case GOSSIP_OPTION_SPIRITHEALER:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue