diff options
Diffstat (limited to 'src/game/Creature.cpp')
-rw-r--r-- | src/game/Creature.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 01eeb234159..a04ec449fbd 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -247,7 +247,7 @@ void Creature::SearchFormationAndPath() void Creature::RemoveCorpse() { - if ((getDeathState() != CORPSE && !m_isDeadByDefault) || (getDeathState() != ALIVE && m_isDeadByDefault)) + if( getDeathState()!=CORPSE && !m_isDeadByDefault || getDeathState()!=ALIVE && m_isDeadByDefault ) return; m_deathTimer = 0; @@ -1736,10 +1736,10 @@ float Creature::GetAttackDistance(Unit const* pl) const if(aggroRate==0) return 0.0f; - uint32 playerlevel = pl->getLevelForTarget(this); - uint32 creaturelevel = getLevelForTarget(pl); + int32 playerlevel = pl->getLevelForTarget(this); + int32 creaturelevel = getLevelForTarget(pl); - int32 leveldif = int32(playerlevel) - int32(creaturelevel); + int32 leveldif = playerlevel - creaturelevel; // "The maximum Aggro Radius has a cap of 25 levels under. Example: A level 30 char has the same Aggro Radius of a level 5 char on a level 60 mob." if ( leveldif < - 25) @@ -2027,7 +2027,7 @@ bool Creature::IsVisibleInGridForPlayer(Player const* pl) const { if( GetEntry() == VISUAL_WAYPOINT && !pl->isGameMaster() ) return false; - return (isAlive() || m_deathTimer > 0 || (m_isDeadByDefault && m_deathState == CORPSE)); + return isAlive() || m_deathTimer > 0 || m_isDeadByDefault && m_deathState==CORPSE; } // Dead player see live creatures near own corpse |