diff options
| author | jackpoz <giacomopoz@gmail.com> | 2014-03-20 21:34:05 +0100 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2014-03-20 21:34:05 +0100 |
| commit | 4c27c83efa811d128d4f2cbeb34afe6fcdacd5d8 (patch) | |
| tree | 3181163d73aeeee1eda8063b02bd43b6458fea2b /src/server/scripts/Commands | |
| parent | 46ccb1d15ede04440448f2f741d2a3246ca7ad41 (diff) | |
Core/Misc: Fix some static analysis issues
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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))); |
