mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7309] Allow creatures has been visible in 2 or more phases as expected for some creature.
This commit is contained in:
parent
2399ee22cf
commit
fb05143311
2 changed files with 2 additions and 29 deletions
|
|
@ -965,37 +965,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 );
|
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;
|
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
|
if (gameEvent==0 && PoolId==0) // if not this is to be managed by GameEvent System or Pool system
|
||||||
AddCreatureToGrid(guid, &data);
|
AddCreatureToGrid(guid, &data);
|
||||||
|
|
||||||
++count;
|
++count;
|
||||||
|
|
||||||
} while (result->NextRow());
|
} while (result->NextRow());
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7308"
|
#define REVISION_NR "7309"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue