From 4c27c83efa811d128d4f2cbeb34afe6fcdacd5d8 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Thu, 20 Mar 2014 21:34:05 +0100 Subject: Core/Misc: Fix some static analysis issues --- src/server/scripts/Commands/cs_misc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/scripts/Commands') diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index d0c21168c80..cae2f5e511d 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1018,7 +1018,6 @@ public: int32 area = GetAreaFlagByAreaID(atoi((char*)args)); int32 offset = area / 32; - uint32 val = uint32((1 << (area % 32))); if (area<0 || offset >= PLAYER_EXPLORED_ZONES_SIZE) { @@ -1027,6 +1026,7 @@ public: return false; } + uint32 val = uint32((1 << (area % 32))); uint32 currFields = playerTarget->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset); playerTarget->SetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset, uint32((currFields | val))); @@ -1049,7 +1049,6 @@ public: int32 area = GetAreaFlagByAreaID(atoi((char*)args)); int32 offset = area / 32; - uint32 val = uint32((1 << (area % 32))); if (area < 0 || offset >= PLAYER_EXPLORED_ZONES_SIZE) { @@ -1058,6 +1057,7 @@ public: return false; } + uint32 val = uint32((1 << (area % 32))); uint32 currFields = playerTarget->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset); playerTarget->SetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset, uint32((currFields ^ val))); -- cgit v1.2.3