From 53d3becf3c5bbefa0d078379decbbc76b2840996 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Wed, 3 Sep 2014 21:44:45 +0200 Subject: Core/Misc: Refactor scripts to fix static analysis warnings --- .../scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/server/scripts/EasternKingdoms/ShadowfangKeep') diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp index fb839650b86..a6e77a234c6 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp @@ -164,16 +164,22 @@ public: { npc_arugal_voidwalkerAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); instance = creature->GetInstanceScript(); } + void Initialize() + { + uiDarkOffering = urand(200, 1000); + } + InstanceScript* instance; uint32 uiDarkOffering; void Reset() override { - uiDarkOffering = urand(200, 1000); + Initialize(); } void UpdateAI(uint32 uiDiff) override -- cgit v1.2.3