aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Scripting/ScriptMgr.h
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-08-24 16:33:29 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-08-24 16:33:29 +0200
commit98e27a4f15aaf6d36522755a597d89730401fdb1 (patch)
treeb9e5588449c42e21b168beb22633db10ade5fe38 /src/server/game/Scripting/ScriptMgr.h
parentc496979e1c4826ea89d6e06b35607c35de820d20 (diff)
parentc20f92c08c2da751fd4c45d351650a8d722f0b91 (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/tools/map_extractor/System.cpp
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.h')
-rw-r--r--src/server/game/Scripting/ScriptMgr.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index 9f52aec848f..506d792ce44 100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -445,10 +445,7 @@ class CreatureScript : public UnitScript, public UpdatableScript<Creature>
// Called when a player selects a quest in the creature's quest menu.
virtual bool OnQuestSelect(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/) { return false; }
- // Called when a player completes a quest with the creature.
- virtual bool OnQuestComplete(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/) { return false; }
-
- // Called when a player selects a quest reward.
+ // Called when a player completes a quest and is rewarded, opt is the selected item's index or 0
virtual bool OnQuestReward(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; }
// Called when the dialog status between a player and the creature is requested.
@@ -483,7 +480,7 @@ class GameObjectScript : public ScriptObject, public UpdatableScript<GameObject>
// Called when a player accepts a quest from the gameobject.
virtual bool OnQuestAccept(Player* /*player*/, GameObject* /*go*/, Quest const* /*quest*/) { return false; }
- // Called when a player selects a quest reward.
+ // Called when a player completes a quest and is rewarded, opt is the selected item's index or 0
virtual bool OnQuestReward(Player* /*player*/, GameObject* /*go*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; }
// Called when the dialog status between a player and the gameobject is requested.
@@ -768,6 +765,9 @@ class PlayerScript : public UnitScript
// Called when a player changes to a new map (after moving to new map)
virtual void OnMapChanged(Player* /*player*/) { }
+
+ // Called after a player's quest status has been changed
+ virtual void OnQuestStatusChange(Player* /*player*/, uint32 /*questId*/, QuestStatus /*status*/) { }
};
class AccountScript : public ScriptObject
@@ -965,7 +965,6 @@ class ScriptMgr
bool OnGossipSelectCode(Player* player, Creature* creature, uint32 sender, uint32 action, const char* code);
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest);
bool OnQuestSelect(Player* player, Creature* creature, Quest const* quest);
- bool OnQuestComplete(Player* player, Creature* creature, Quest const* quest);
bool OnQuestReward(Player* player, Creature* creature, Quest const* quest, uint32 opt);
uint32 GetDialogStatus(Player* player, Creature* creature);
CreatureAI* GetCreatureAI(Creature* creature);
@@ -1074,6 +1073,7 @@ class ScriptMgr
void OnPlayerSave(Player* player);
void OnPlayerBindToInstance(Player* player, Difficulty difficulty, uint32 mapid, bool permanent);
void OnPlayerUpdateZone(Player* player, uint32 newZone, uint32 newArea);
+ void OnQuestStatusChange(Player* player, uint32 questId, QuestStatus status);
public: /* AccountScript */