[7309] Allow creatures has been visible in 2 or more phases as expected for some creature. Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage
2009-02-20 15:19:43 -06:00
parent e78a834237
commit 289eb0e5e5
2 changed files with 2 additions and 29 deletions
+1 -28
View File
@@ -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());
+1 -1
View File
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7308"
#define REVISION_NR "7309"
#endif // __REVISION_NR_H__