diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp index 2d47b4c4b4..9f9ad3d0bd 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp +++ b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp @@ -725,10 +725,10 @@ void AuctionBotSeller::SetPricesOfItem(ItemTemplate const* itemProto, SellerConf if (sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYPRICE_SELLER)) buyPrice = sellPrice; - + float basePriceFloat = (buyPrice * stackCount * priceRatio) / (itemProto->Class == 6 ? 200.0f : static_cast(itemProto->BuyCount)) / 100.0f; float range = basePriceFloat * 0.04f; - + buyp = static_cast(frand(basePriceFloat - range, basePriceFloat + range) + 0.5f); if (buyp == 0) buyp = 1; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 5533b7435b..c55d2439a9 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -11247,7 +11247,7 @@ Unit* Creature::SelectVictim() if (target && _IsTargetAcceptable(target) && CanCreatureAttack(target)) { - if(!IsFocusing()) + if (!IsFocusing()) SetInFront(target); return target; } diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index b7c10efe47..1174e8090d 100644 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -312,7 +312,7 @@ void MotionMaster::MoveCloserAndStop(uint32 id, Unit* target, float distance) float desty = _owner->GetPositionY() + distanceToTravel * std::sin(angle); MovePoint(id, destx, desty, target->GetPositionZ()); } - else + else { // we are already close enough. We just need to turn toward the target without changing position. Movement::MoveSplineInit init(_owner); diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h index 34680c7ec5..9cc29f8b3c 100644 --- a/src/server/game/Movement/MotionMaster.h +++ b/src/server/game/Movement/MotionMaster.h @@ -173,7 +173,7 @@ class MotionMaster //: private std::stack { MovePoint(id, pos.m_positionX, pos.m_positionY, pos.m_positionZ, generatePath); } void MovePoint(uint32 id, float x, float y, float z, bool generatePath = true); - /* Makes the unit move toward the target until it is at a certain distance from it. The unit then stops. + /* Makes the unit move toward the target until it is at a certain distance from it. The unit then stops. Only works in 2D. This method doesn't account for any movement done by the target. in other words, it only works if the target is stationary. */