From 5c8c458d60360a761f819c37e89ad1b86c7028cf Mon Sep 17 00:00:00 2001 From: therzok Date: Sat, 29 Dec 2012 21:14:12 +0200 Subject: *Fixing a typo. --- src/server/game/Entities/Creature/Creature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server') diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 650d904db47..d0ab5e78c97 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -908,7 +908,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; -- cgit v1.2.3 From 3d3a8107e0d3509b6df35b26df914517ecee1938 Mon Sep 17 00:00:00 2001 From: Subv Date: Sat, 29 Dec 2012 14:23:23 -0500 Subject: Core/Entities: Account for creatures that are spawned below ground level when adding flying flags. (Triggers, mostly) --- src/server/game/Entities/Creature/Creature.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server') diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index d0ab5e78c97..e069f5653c9 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -437,7 +437,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); @@ -482,7 +482,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) @@ -1574,7 +1574,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); -- cgit v1.2.3 From 9bc339cd890784d6aaa29f0bafb79bb8b3c6faaf Mon Sep 17 00:00:00 2001 From: Subv Date: Sat, 29 Dec 2012 15:25:48 -0500 Subject: Core/Movement: MSG_MOVE_TELEPORT is not supposed to be sent to the player being teleported. Thanks @vlad852 Closes #8798 Closes #8774 --- src/server/game/Entities/Unit/Unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 62df8c2049c..2873cde3bae 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -17344,7 +17344,7 @@ void Unit::SendTeleportPacket(Position& pos) Relocate(&oldPos); if (GetTypeId() == TYPEID_PLAYER) Relocate(&pos); - SendMessageToSet(&data2, true); + SendMessageToSet(&data2, false); } bool Unit::UpdatePosition(float x, float y, float z, float orientation, bool teleport) -- cgit v1.2.3