aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubv2112 <s.v.h21@hotmail.com>2012-02-02 13:03:54 -0500
committerSubv2112 <s.v.h21@hotmail.com>2012-02-02 13:03:54 -0500
commit8dc75e7091d4aa1d018f4f5f54bb78277023eaeb (patch)
tree2a326e05652a41711c7f35341eb47ac089794a9e
parente447e903ec947f8aff5dd56cfacf9f8d054bff68 (diff)
Codestyle: Converted some casts to their respective ToClass()
-rwxr-xr-xsrc/server/game/Entities/Object/Object.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 7cedaa086d3..decb3230a7b 100755
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -1543,12 +1543,12 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
{
// non fly unit don't must be in air
// non swim unit must be at ground (mostly speedup, because it don't must be in water and water level check less fast
- if (!((Creature const*)this)->canFly())
+ if (!ToCreature()->canFly())
{
- bool canSwim = ((Creature const*)this)->canSwim();
+ bool canSwim = ToCreature()->canSwim();
float ground_z = z;
float max_z = canSwim
- ? GetBaseMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !((Unit const*)this)->HasAuraType(SPELL_AURA_WATER_WALK))
+ ? GetBaseMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK))
: ((ground_z = GetBaseMap()->GetHeight(x, y, z, true)));
if (max_z > INVALID_HEIGHT)
{
@@ -1569,10 +1569,10 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
case TYPEID_PLAYER:
{
// for server controlled moves playr work same as creature (but it can always swim)
- if (!((Player const*)this)->canFly())
+ if (!ToPlayer()->canFly())
{
float ground_z = z;
- float max_z = GetBaseMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !((Unit const*)this)->HasAuraType(SPELL_AURA_WATER_WALK));
+ float max_z = GetBaseMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !(ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK));
if (max_z > INVALID_HEIGHT)
{
if (z > max_z)