mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +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
|
|
@ -79,6 +79,18 @@ bool GossipHello ( Player * player, Creature *_Creature )
|
|||
return tmpscript->pGossipHello(player,_Creature);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
bool GOGossipHello(Player *pPlayer, GameObject *pGo)
|
||||
{
|
||||
Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId];
|
||||
if (!tmpscript || !tmpscript->pGOGossipHello)
|
||||
return false;
|
||||
|
||||
pPlayer->PlayerTalkClass->ClearMenus();
|
||||
|
||||
return tmpscript->pGOGossipHello(pPlayer, pGo);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
bool GossipSelect( Player *player, Creature *_Creature,uint32 sender, uint32 action )
|
||||
{
|
||||
|
|
@ -93,6 +105,20 @@ bool GossipSelect( Player *player, Creature *_Creature,uint32 sender, uint32 act
|
|||
return tmpscript->pGossipSelect(player,_Creature,sender,action);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
bool GOGossipSelect(Player *pPlayer, GameObject *pGo, uint32 sender, uint32 action)
|
||||
{
|
||||
debug_log("DEBUG: GO Gossip selection, sender: %u, action: %u", sender, action);
|
||||
|
||||
Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId];
|
||||
if (!tmpscript || !tmpscript->pGOGossipSelect)
|
||||
return false;
|
||||
|
||||
pPlayer->PlayerTalkClass->ClearMenus();
|
||||
|
||||
return tmpscript->pGOGossipSelect(pPlayer, pGo, sender, action);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
bool GossipSelectWithCode( Player *player, Creature *_Creature, uint32 sender, uint32 action, const char* sCode )
|
||||
{
|
||||
|
|
@ -107,6 +133,20 @@ bool GossipSelectWithCode( Player *player, Creature *_Creature, uint32 sender, u
|
|||
return tmpscript->pGossipSelectWithCode(player,_Creature,sender,action,sCode);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
bool GOGossipSelectWithCode(Player *pPlayer, GameObject *pGo, uint32 sender, uint32 action, const char* sCode)
|
||||
{
|
||||
debug_log("DEBUG: GO Gossip selection, sender: %u, action: %u", sender, action);
|
||||
|
||||
Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId];
|
||||
if (!tmpscript || !tmpscript->pGOGossipSelectWithCode)
|
||||
return false;
|
||||
|
||||
pPlayer->PlayerTalkClass->ClearMenus();
|
||||
|
||||
return tmpscript->pGOGossipSelectWithCode(pPlayer, pGo, sender, action, sCode);
|
||||
}
|
||||
|
||||
MANGOS_DLL_EXPORT
|
||||
bool QuestAccept( Player *player, Creature *_Creature, Quest *_Quest )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue