mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Scripting: Implemented Conversation scripts (#20758)
This commit is contained in:
@@ -33,6 +33,7 @@ class Battleground;
|
||||
class BattlegroundMap;
|
||||
class Channel;
|
||||
class ChatCommand;
|
||||
class Conversation;
|
||||
class Creature;
|
||||
class CreatureAI;
|
||||
class DynamicObject;
|
||||
@@ -859,6 +860,17 @@ class TC_GAME_API AreaTriggerEntityScript : public ScriptObject
|
||||
virtual AreaTriggerAI* GetAI(AreaTrigger* /*at*/) const { return nullptr; }
|
||||
};
|
||||
|
||||
class TC_GAME_API ConversationScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
ConversationScript(char const* name);
|
||||
|
||||
public:
|
||||
|
||||
// Called when Conversation is created but not added to Map yet.
|
||||
virtual void OnConversationCreate(Conversation* /*conversation*/, Unit* /*creator*/) { }
|
||||
};
|
||||
|
||||
class TC_GAME_API SceneScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
@@ -1161,7 +1173,12 @@ class TC_GAME_API ScriptMgr
|
||||
|
||||
AreaTriggerAI* GetAreaTriggerAI(AreaTrigger* areaTrigger);
|
||||
|
||||
public: /* ConversationScript */
|
||||
|
||||
void OnConversationCreate(Conversation* conversation, Unit* creator);
|
||||
|
||||
public: /* SceneScript */
|
||||
|
||||
void OnSceneStart(Player* player, uint32 sceneInstanceID, SceneTemplate const* sceneTemplate);
|
||||
void OnSceneTrigger(Player* player, uint32 sceneInstanceID, SceneTemplate const* sceneTemplate, std::string const& triggerName);
|
||||
void OnSceneCancel(Player* player, uint32 sceneInstanceID, SceneTemplate const* sceneTemplate);
|
||||
|
||||
Reference in New Issue
Block a user