diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2018-01-01 17:07:39 +0100 |
|---|---|---|
| committer | Treeston <treeston.mmoc@gmail.com> | 2018-01-01 17:07:58 +0100 |
| commit | eacfa9d89afcfad0cbd0715c8a84890c3ccd1c74 (patch) | |
| tree | de01fac89bb3e5090022865244abcd735ddc0b57 /src/server/game/AI/CreatureAI.h | |
| parent | 19d66b8e9fa7c1856bcad367e716eea36728c7f5 (diff) | |
Core/AI: Kick Gossip functions upstairs, from UnitAI to CreatureAI - they only make sense for Creatures anyway.
Also change a very ugly hack in GetDialogStatus. Ew.
Diffstat (limited to 'src/server/game/AI/CreatureAI.h')
| -rw-r--r-- | src/server/game/AI/CreatureAI.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h index fcb0d08a040..a918ecb0559 100644 --- a/src/server/game/AI/CreatureAI.h +++ b/src/server/game/AI/CreatureAI.h @@ -22,6 +22,8 @@ #include "UnitAI.h" #include "Common.h" #include "ObjectDefines.h" +#include "Optional.h" +#include "QuestDef.h" class AreaBoundary; class Creature; @@ -175,6 +177,26 @@ class TC_GAME_API CreatureAI : public UnitAI // Called when victim entered water and creature can not enter water //virtual bool CanReachByRangeAttack(Unit*) { return false; } + /// == Gossip system ================================ + + // Called when the dialog status between a player and the creature is requested. + virtual Optional<QuestGiverStatus> GetDialogStatus(Player* /*player*/) { return boost::none; } + + // Called when a player opens a gossip dialog with the creature. + virtual bool GossipHello(Player* /*player*/) { return false; } + + // Called when a player selects a gossip item in the creature's gossip menu. + virtual bool GossipSelect(Player* /*player*/, uint32 /*menuId*/, uint32 /*gossipListId*/) { return false; } + + // Called when a player selects a gossip with a code in the creature's gossip menu. + virtual bool GossipSelectCode(Player* /*player*/, uint32 /*menuId*/, uint32 /*gossipListId*/, char const* /*code*/) { return false; } + + // Called when a player accepts a quest from the creature. + virtual void QuestAccept(Player* /*player*/, Quest const* /*quest*/) { } + + // Called when a player completes a quest and is rewarded, opt is the selected item's index or 0 + virtual void QuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) { } + /// == Fields ======================================= virtual void PassengerBoarded(Unit* /*passenger*/, int8 /*seatId*/, bool /*apply*/) { } |
