diff options
| author | jackpoz <giacomopoz@gmail.com> | 2014-09-25 22:28:20 +0200 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2014-09-25 22:28:20 +0200 |
| commit | 79b9ca4a58175bcbfe859446dbb36ba4b30216b9 (patch) | |
| tree | d423f9e3af5bf47966f14d250347d969d337f555 /src/server/scripts/EasternKingdoms/ShadowfangKeep | |
| parent | 16a884d999d17290955f3c2721b78a13c8795293 (diff) | |
Scripts/Misc: Make InstanceScript::Initialize() obsolete
Move all InstanceScript initialization code from Initialize() to the constructor.
InstanceScript::Initialize() is now obsolete, please don't use it anymore. The only reason it's still in the sources is for backward compatibility.
Diffstat (limited to 'src/server/scripts/EasternKingdoms/ShadowfangKeep')
| -rw-r--r-- | src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index ae8cb74ea49..3379882ce28 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -78,7 +78,14 @@ public: struct instance_shadowfang_keep_InstanceMapScript : public InstanceScript { - instance_shadowfang_keep_InstanceMapScript(Map* map) : InstanceScript(map) { } + instance_shadowfang_keep_InstanceMapScript(Map* map) : InstanceScript(map) + { + SetHeaders(DataHeader); + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + uiPhase = 0; + uiTimer = 0; + } uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string str_data; @@ -94,15 +101,6 @@ public: uint8 uiPhase; uint16 uiTimer; - void Initialize() override - { - SetHeaders(DataHeader); - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - uiPhase = 0; - uiTimer = 0; - } - void OnCreatureCreate(Creature* creature) override { switch (creature->GetEntry()) |
