aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectMgr.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-20 15:19:43 -0600
committermegamage <none@none>2009-02-20 15:19:43 -0600
commit289eb0e5e5d7008f6483b8794dc5745d57c43463 (patch)
treef1a482e51aca917c86d358528c6518cce1bbd229 /src/game/ObjectMgr.cpp
parente78a83423772cd0b763068bd3b012c45fbd94e0c (diff)
[7309] Allow creatures has been visible in 2 or more phases as expected for some creature. Author: VladimirMangos
--HG-- branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r--src/game/ObjectMgr.cpp29
1 files changed, 1 insertions, 28 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 2dd63e1691a..09c0b127118 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -1055,37 +1055,10 @@ void ObjectMgr::LoadCreatures()
sLog.outErrorDb("Table `creature` have creature (GUID: %u Entry: %u) with `phaseMask`=0 (not visible for anyone), set to 1.",guid,data.id );
data.phaseMask = 1;
}
- else
- {
- int count = 0;
- for(int i=0; i < sizeof(data.phaseMask)*8; ++i)
- if(data.phaseMask & (1 << i))
- ++count;
-
- if(count > 1)
- {
- uint32 phaseMask = data.phaseMask & ~PHASEMASK_NORMAL;
- count = 0;
- for(int i=0; i < sizeof(phaseMask)*8; ++i)
- if(phaseMask & (1 << i))
- ++count;
-
- if(count > 1)
- {
- sLog.outErrorDb("Table `creature` have creature (GUID: %u Entry: %u) with more single bit set in `phaseMask` (not visible for anyone), set to 1.",guid,data.id );
- data.phaseMask = phaseMask;
- }
- else
- {
- sLog.outErrorDb("Table `creature` have creature (GUID: %u Entry: %u) with more single bit set in `phaseMask` (not visible for anyone), set to %u (possible expected).",guid,data.id,phaseMask);
- data.phaseMask = 1;
- }
-
- }
- }
if (gameEvent==0 && PoolId==0) // if not this is to be managed by GameEvent System or Pool system
AddCreatureToGrid(guid, &data);
+
++count;
} while (result->NextRow());