From 3f985645dbb8136986eeaf4c8cac6ba87c6e4b82 Mon Sep 17 00:00:00 2001 From: raczman Date: Mon, 30 Mar 2009 16:57:17 +0200 Subject: Added GO gossip menu support. Kudos and cookies to arrai. --HG-- branch : trunk --- src/bindings/scripts/ScriptMgr.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/bindings/scripts/ScriptMgr.cpp') diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index 728bc435d81..0d7f47a4c84 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -2063,6 +2063,30 @@ bool GossipSelectWithCode( Player *player, Creature *_Creature, uint32 sender, u return tmpscript->pGossipSelectWithCode(player,_Creature,sender,action,sCode); } +TRINITY_DLL_EXPORT +bool GOSelect( Player *player, GameObject *_GO, uint32 sender, uint32 action ) +{ + debug_log("TSCR: Gossip selection, sender: %d, action: %d",sender, action); + + Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId]; + if(!tmpscript || !tmpscript->pGOSelect) return false; + + player->PlayerTalkClass->ClearMenus(); + return tmpscript->pGOSelect(player,_GO,sender,action); +} + +TRINITY_DLL_EXPORT +bool GOSelectWithCode( Player *player, GameObject *_GO, uint32 sender, uint32 action, const char* sCode ) +{ + debug_log("TSCR: Gossip selection, sender: %d, action: %d",sender, action); + + Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId]; + if(!tmpscript || !tmpscript->pGOSelectWithCode) return false; + + player->PlayerTalkClass->ClearMenus(); + return tmpscript->pGOSelectWithCode(player,_GO,sender,action,sCode); +} + TRINITY_DLL_EXPORT bool QuestAccept( Player *player, Creature *_Creature, Quest const *_Quest ) { -- cgit v1.2.3