aboutsummaryrefslogtreecommitdiff
path: root/src/game/Creature.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-09-18 14:10:37 -0700
committermaximius <none@none>2009-09-18 14:10:37 -0700
commit333f1c9d729e99c86b9747aa95336010589d564d (patch)
treec93e94781a126a8ad7a62e846df04adb7c913905 /src/game/Creature.cpp
parent0d9d400e794f6bcd2f706a4fb238b6428ad00862 (diff)
*[8475] fixed some gcc-warnings Author: balrok
*[8476] Revert some recent cleanup changes, some other fixes and cleanups. Author: VladimirMangos *[8489] Fixed player visibility update in case view point different from player itself. Author: SilverIce *[8493] Avoid unexpected multiply error messages at wrong `quest_template`.`RewSpell*` Author: VladimirMangos *[8496] Resolve some #include cycles and unsafe code. * Common.h -> Threading.h -> Errors.h -> Common.h * Remove reduncdent #include "ByteBuffer.h" in headers * Remove redundent #include "Auth/BigNumber.h" in headers * Avoid multyply data copy at use some now dropped functions in BigNumber. * Avoid copy fixed byte count from byte arrays with unknown real size created from BigNumber. * Avoid possible problems for build mangos at different platform or compilers. Author: VladimirMangos. *[8501] Apply code style and cleanups to some Player functions. Author: VladimirMangos. *[8502] Disable quests related to specific game events at startup if event not active. Also rename member boolean variable. Author: NoFantasy *[8506] Add check for IsAutoComplete() in SendPreparedQuest(). For cases where quest is repeatable but has Method!=0, QuestDetails must be sent instead of RequestItems. Some additional code cleanup. Author: NoFantasy *[8507] Check amount of spawned pools before decrement to avoid unexpected result. Also rename variable to more meaningful name. Signed-off-by: NoFantasy <nofantasy@nf.no> Thanks to Stryker and onkelz28! --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..e04a552c335 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