Cleanup: Some typo fixes, closes issue 3798, thanks tru.bazoozoo and Lopin
--HG-- branch : trunk
This commit is contained in:
@@ -1213,9 +1213,9 @@ class Unit : public WorldObject
|
||||
uint32 GetMaxHealth() const { return GetUInt32Value(UNIT_FIELD_MAXHEALTH); }
|
||||
|
||||
inline bool IsFullHealth() const { return GetHealth() == GetMaxHealth(); }
|
||||
inline bool HealthBelowPct(uint32 pct) const { return GetHealth() * (uint64)100 < GetMaxHealth() * (uint64)pct; }
|
||||
inline bool HealthBelowPctDamaged(uint32 pct, uint32 damage) const { return (int32(GetHealth()) - damage) * (int64)100 < GetMaxHealth() * (int64)pct; }
|
||||
inline bool HealthAbovePct(uint32 pct) const { return GetHealth() * (uint64)100 > GetMaxHealth() * (uint64)pct; }
|
||||
inline bool HealthBelowPct(int32 pct) const { return GetHealth() * (uint64)100 < GetMaxHealth() * (uint64)pct; }
|
||||
inline bool HealthBelowPctDamaged(int32 pct, uint32 damage) const { return (int32(GetHealth()) - damage) * (int64)100 < GetMaxHealth() * (int64)pct; }
|
||||
inline bool HealthAbovePct(int32 pct) const { return GetHealth() * (uint64)100 > GetMaxHealth() * (uint64)pct; }
|
||||
inline float GetHealthPct() const { return GetMaxHealth() ? 100.f * GetHealth() / GetMaxHealth() : 0.0f; }
|
||||
inline uint32 CountPctFromMaxHealth(int32 pct) const { return uint32(float(pct) * GetMaxHealth() / 100.0f); }
|
||||
|
||||
|
||||
@@ -3174,7 +3174,7 @@ void Map::ScriptsProcess()
|
||||
float z = step.script->z;
|
||||
float o = step.script->o;
|
||||
|
||||
if (pSummoner->SummonCreature(step.script->datalong, x, y, z, o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, step.script->datalong2))
|
||||
if (!pSummoner->SummonCreature(step.script->datalong, x, y, z, o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, step.script->datalong2))
|
||||
sLog.outError("%s creature was not spawned (entry: %u).", step.script->GetDebugInfo().c_str(), step.script->datalong);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
if (!players.isEmpty())
|
||||
if (Player* pPlayer = players.begin()->getSource())
|
||||
uiTeamInInstance = pPlayer->GetTeam();
|
||||
uiTeamInInstance = pPlayer->GetTeamId();
|
||||
|
||||
switch(pCreature->GetEntry())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user