mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
[10610] Renamed some functions from the Creature class
Also other classes have been affected, due to the use of search&replace. This will probably break some patches and 3rd party libraries, so make sure to update them if required. Thanks to Phille for the original idea and patch!
This commit is contained in:
parent
d090bce461
commit
61102e3b16
50 changed files with 305 additions and 305 deletions
|
|
@ -249,7 +249,7 @@ void Object::BuildMovementUpdate(ByteBuffer * data, uint16 updateFlags) const
|
|||
uint16 moveFlags2 = (isType(TYPEMASK_UNIT) ? ((Unit*)this)->m_movementInfo.GetMovementFlags2() : MOVEFLAG2_NONE);
|
||||
|
||||
if(GetTypeId() == TYPEID_UNIT)
|
||||
if(((Creature*)this)->isVehicle())
|
||||
if(((Creature*)this)->IsVehicle())
|
||||
moveFlags2 |= MOVEFLAG2_ALLOW_PITCHING; // always allow pitch
|
||||
|
||||
*data << uint16(updateFlags); // update flags
|
||||
|
|
@ -269,7 +269,7 @@ void Object::BuildMovementUpdate(ByteBuffer * data, uint16 updateFlags) const
|
|||
/*if (((Creature*)unit)->hasUnitState(UNIT_STAT_MOVING))
|
||||
unit->m_movementInfo.SetMovementFlags(MOVEFLAG_FORWARD);*/
|
||||
|
||||
if (((Creature*)unit)->canFly())
|
||||
if (((Creature*)unit)->CanFly())
|
||||
{
|
||||
// (ok) most seem to have this
|
||||
unit->m_movementInfo.AddMovementFlag(MOVEFLAG_LEVITATING);
|
||||
|
|
@ -606,7 +606,7 @@ void Object::BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask *
|
|||
|
||||
if (appendValue & UNIT_NPC_FLAG_TRAINER)
|
||||
{
|
||||
if (!((Creature*)this)->isCanTrainingOf(target, false))
|
||||
if (!((Creature*)this)->IsTrainerOf(target, false))
|
||||
appendValue &= ~(UNIT_NPC_FLAG_TRAINER | UNIT_NPC_FLAG_TRAINER_CLASS | UNIT_NPC_FLAG_TRAINER_PROFESSION);
|
||||
}
|
||||
|
||||
|
|
@ -1488,11 +1488,11 @@ 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 (!((Creature const*)this)->CanFly())
|
||||
{
|
||||
bool canSwim = ((Creature const*)this)->canSwim();
|
||||
bool CanSwim = ((Creature const*)this)->CanSwim();
|
||||
float ground_z = z;
|
||||
float max_z = canSwim
|
||||
float max_z = CanSwim
|
||||
? GetBaseMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !((Unit const*)this)->HasAuraType(SPELL_AURA_WATER_WALK))
|
||||
: ((ground_z = GetBaseMap()->GetHeight(x, y, z, true)));
|
||||
if (max_z > INVALID_HEIGHT)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue