Core/GameObjects: add script hook when destructable building is damaged.

This commit is contained in:
Supabad committed 2011-04-09 19:28:36 +02:00
1 parent 9efac6fe9f
commit a5a545a403
4 files changed
+18 -6

No files matched your search

+5 -2
View File
@@ -464,7 +464,9 @@ class GameObjectScript : public ScriptObject, public UpdatableScript<GameObject>
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*/) { }
virtual void OnDestroyed(GameObject* /*go*/, Player* /*player*/, uint32 /*eventId*/) { }
// Called when the gameobject is damaged (destructible buildings only).
virtual void OnDamaged(GameObject* /*go*/, Player* /*player*/, uint32 /*eventId*/) { }
};
class AreaTriggerScript : public ScriptObject
@@ -859,7 +861,8 @@ class ScriptMgr
bool OnQuestAccept(Player* player, GameObject* go, Quest const* quest);
bool OnQuestReward(Player* player, GameObject* go, Quest const* quest, uint32 opt);
uint32 GetDialogStatus(Player* player, GameObject* go);
void OnGameObjectDestroyed(Player* player, GameObject* go, uint32 eventId);
void OnGameObjectDestroyed(GameObject* go, Player* player, uint32 eventId);
void OnGameObjectDamaged(GameObject* go, Player* player, uint32 eventId);
void OnGameObjectUpdate(GameObject* go, uint32 diff);
public: /* AreaTriggerScript */