diff options
author | megamage <none@none> | 2009-03-31 14:17:57 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-31 14:17:57 -0600 |
commit | 4afd030b48c428af9775340cac9574118cee78d2 (patch) | |
tree | 004dc51c069367f180d478798e265f246be9d106 /src/bindings/scripts/ScriptMgr.cpp | |
parent | b51cea6ce48295c3ebea9b2340d76a4ab147a6e5 (diff) | |
parent | e097f358a198b086d2960f774ac1da148b8b3c54 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/bindings/scripts/ScriptMgr.cpp')
-rw-r--r-- | src/bindings/scripts/ScriptMgr.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index 09bbf7955e8..7987d5f1788 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -2303,6 +2303,30 @@ bool GossipSelectWithCode( Player *player, Creature *_Creature, uint32 sender, u } 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 ) { Script *tmpscript = m_scripts[_Creature->GetScriptId()]; |