Return proper default quest status from ScriptMgr::GetDialogStatus if a creature/gameobject script was present but GetDialogStatus was not overridden.

This should fix problems with creature/gameobject quest givers not giving appropriate quest (update)s

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-08-15 14:00:51 +02:00
parent e3b8a5923d
commit 96144752be

View File

@@ -434,7 +434,7 @@ class CreatureScript : public ScriptObject, public UpdatableScript<Creature>
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.
virtual uint32 GetDialogStatus(Player* player, Creature* creature) { return 0; }
virtual uint32 GetDialogStatus(Player* player, Creature* creature) { return 100; }
// Called when a CreatureAI object is needed for the creature.
virtual CreatureAI* GetAI(Creature* creature) const { return NULL; }
@@ -469,7 +469,7 @@ class GameObjectScript : public ScriptObject, public UpdatableScript<GameObject>
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.
virtual uint32 GetDialogStatus(Player* player, GameObject* go) { return 0; }
virtual uint32 GetDialogStatus(Player* player, GameObject* go) { return 100; }
// Called when the gameobject is destroyed (destructible buildings only).
virtual void OnDestroyed(Player* player, GameObject* go, uint32 eventId) { }