aboutsummaryrefslogtreecommitdiff
path: root/src/game/Creature.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-09-14 16:02:13 -0700
committermaximius <none@none>2009-09-14 16:02:13 -0700
commitb37f9b1e55bd4b80597b8b8c3f461aad70ccc5c1 (patch)
treec637055aab5d8f0e733fc611fada42c43ad04d83 /src/game/Creature.cpp
parent7b664c8c9fdda2b963f7883684a2f31d0f79551b (diff)
*Merged MaNGOS [8458], [8475], [8476] by ogeraisi, thanks to all authors :)
--HG-- branch : trunk
Diffstat (limited to 'src/game/Creature.cpp')
-rw-r--r--src/game/Creature.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index a04ec449fbd..01eeb234159 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;
- int32 playerlevel = pl->getLevelForTarget(this);
- int32 creaturelevel = getLevelForTarget(pl);
+ uint32 playerlevel = pl->getLevelForTarget(this);
+ uint32 creaturelevel = getLevelForTarget(pl);
- int32 leveldif = playerlevel - creaturelevel;
+ int32 leveldif = int32(playerlevel) - int32(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