diff options
author | Subv <s.v.h21@hotmail.com> | 2012-12-29 15:28:53 -0500 |
---|---|---|
committer | Subv <s.v.h21@hotmail.com> | 2012-12-29 15:28:53 -0500 |
commit | 7ceb7c8b813a72ba8da0cbca0df031c77fc2b63a (patch) | |
tree | 7582baa123919b169921daa97db56e48bebc79cd /src | |
parent | 9a9fbb87de5ac67b2004fe3fe0b5e7c4aeab5422 (diff) | |
parent | 9bc339cd890784d6aaa29f0bafb79bb8b3c6faaf (diff) |
Merge branch 'master' of https://github.com/TrinityCore/TrinityCore into 4.3.4
Conflicts:
src/server/game/Entities/Unit/Unit.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Creature/Creature.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index bfe76f33e29..9c129eb8a90 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -438,7 +438,7 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData* data) float ground = GetPositionZ(); GetMap()->GetWaterOrGroundLevel(GetPositionX(), GetPositionY(), GetPositionZ(), &ground); - bool isInAir = G3D::fuzzyGt(GetPositionZ(), ground); + bool isInAir = G3D::fuzzyGt(GetPositionZ(), ground + 0.05f) || G3D::fuzzyLt(GetPositionZ(), ground - 0.05f); // Can be underground too, prevent the falling if (cInfo->InhabitType & INHABIT_AIR && cInfo->InhabitType & INHABIT_GROUND && isInAir) SetCanFly(true); @@ -484,7 +484,7 @@ void Creature::Update(uint32 diff) float ground = GetPositionZ(); GetMap()->GetWaterOrGroundLevel(GetPositionX(), GetPositionY(), GetPositionZ(), &ground); - bool isInAir = G3D::fuzzyGt(GetPositionZ(), ground + 0.05f); + bool isInAir = G3D::fuzzyGt(GetPositionZ(), ground + 0.05f) || G3D::fuzzyLt(GetPositionZ(), ground - 0.05f); // Can be underground too, prevent the falling CreatureTemplate const* cinfo = GetCreatureTemplate(); if (cinfo->InhabitType & INHABIT_AIR && cinfo->InhabitType & INHABIT_GROUND && isInAir) @@ -907,7 +907,7 @@ bool Creature::isCanTrainingOf(Player* player, bool msg) const if (msg) { player->PlayerTalkClass->ClearMenus(); - switch (GetCreatureTemplate()->trainer_class) + switch (GetCreatureTemplate()->trainer_race) { case RACE_DWARF: player->PlayerTalkClass->SendGossipMenu(5865, GetGUID()); break; case RACE_GNOME: player->PlayerTalkClass->SendGossipMenu(4881, GetGUID()); break; @@ -1582,7 +1582,7 @@ void Creature::setDeathState(DeathState s) float ground = GetPositionZ(); GetMap()->GetWaterOrGroundLevel(GetPositionX(), GetPositionY(), GetPositionZ(), &ground); - bool isInAir = G3D::fuzzyGt(GetPositionZ(), ground); + bool isInAir = G3D::fuzzyGt(GetPositionZ(), ground + 0.05f) || G3D::fuzzyLt(GetPositionZ(), ground - 0.05f); // Can be underground too, prevent the falling if (cinfo->InhabitType & INHABIT_AIR && cinfo->InhabitType & INHABIT_GROUND && isInAir) SetCanFly(true); |