From 20bb616804f53a1bcc3d36fdbe7b7ba253bbd562 Mon Sep 17 00:00:00 2001 From: whipowill Date: Wed, 18 May 2022 16:10:40 -0500 Subject: [PATCH] Compile bug fixes. --- src/PlayerbotAI.cpp | 6 +++--- src/TravelNode.h | 3 +-- src/strategy/actions/MailAction.h | 4 ++-- src/strategy/triggers/HealthTriggers.h | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 1eb0e9b8..35e30bd5 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -79,7 +79,7 @@ PlayerbotAI::PlayerbotAI() : PlayerbotAIBase(true), bot(nullptr), aiObjectContex } } -PlayerbotAI::PlayerbotAI(Player* bot) : PlayerbotAIBase(true), bot(bot), chatHelper(this), chatFilter(this), security(bot), master(nullptr) +PlayerbotAI::PlayerbotAI(Player* bot) : PlayerbotAIBase(true), bot(bot), chatHelper(this), chatFilter(this), master(nullptr), security(bot) // reorder args - whipowill { if (!bot->isTaxiCheater() && HasCheat((BotCheatMask::taxi))) bot->SetTaxiCheater(true); @@ -253,7 +253,7 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal) YieldThread(min); } -void PlayerbotAI::UpdateAIInternal(uint32 elapsed, bool minimal) +void PlayerbotAI::UpdateAIInternal([[maybe_unused]] uint32 elapsed, bool minimal) // unused param - whipowill { if (bot->IsBeingTeleported() || !bot->IsInWorld()) return; @@ -801,7 +801,7 @@ void PlayerbotAI::DoNextAction(bool min) bot->GetMotionMaster()->MoveIdle(); //Death Count to prevent skeleton piles - Player* master = GetMaster(); + Player* master = GetMaster(); // warning here - whipowill if (!HasActivePlayerMaster() && !bot->InBattleground()) { uint32 dCount = aiObjectContext->GetValue("death count")->Get(); diff --git a/src/TravelNode.h b/src/TravelNode.h index 52f276c0..826dd40a 100644 --- a/src/TravelNode.h +++ b/src/TravelNode.h @@ -66,8 +66,7 @@ class TravelNodePath //Constructor TravelNodePath(float distance = 0.1f, float extraCost = 0, uint8 pathType = (uint8)TravelNodePathType::walk, uint32 pathObject = 0, bool calculated = false, std::vector maxLevelCreature = { 0, 0, 0 }, float swimDistance = 0) - : extraCost(extraCost), distance(distance), calculated(calculated), pathType(TravelNodePathType(pathType)), // reorder args - whipowill - maxLevelCreature(maxLevelCreature), pathObject(pathObject), swimDistance(swimDistance) // reorder args - whipowill + : extraCost(extraCost), calculated(calculated), distance(distance), maxLevelCreature(maxLevelCreature), pathType(TravelNodePathType(pathType)), swimDistance(swimDistance), pathObject(pathObject) // reorder args - whipowill { if (pathType != (uint8)TravelNodePathType::walk) complete = true; diff --git a/src/strategy/actions/MailAction.h b/src/strategy/actions/MailAction.h index f6e948f7..18311171 100644 --- a/src/strategy/actions/MailAction.h +++ b/src/strategy/actions/MailAction.h @@ -15,9 +15,9 @@ struct Mail; class MailProcessor { public: - virtual bool Before(PlayerbotAI* botAI) { return true; } + virtual bool Before([[maybe_unused]] PlayerbotAI* botAI) { return true; } // unused param - whipowill virtual bool Process(uint32 index, Mail* mail, PlayerbotAI* botAI) = 0; - virtual bool After(PlayerbotAI* botAI) { return true; } + virtual bool After([[maybe_unused]] PlayerbotAI* botAI) { return true; } // unused param - whipowill static ObjectGuid FindMailbox(PlayerbotAI* botAI); diff --git a/src/strategy/triggers/HealthTriggers.h b/src/strategy/triggers/HealthTriggers.h index a7eb9757..7f523663 100644 --- a/src/strategy/triggers/HealthTriggers.h +++ b/src/strategy/triggers/HealthTriggers.h @@ -124,7 +124,7 @@ class DeadTrigger : public Trigger class AoeHealTrigger : public Trigger { public: - AoeHealTrigger(PlayerbotAI* botAI, std::string const name, std::string const type, int32 count) : Trigger(botAI, name), count(count) type(type), { } // type after count - whipowill + AoeHealTrigger(PlayerbotAI* botAI, std::string const name, std::string const type, int32 count) : Trigger(botAI, name), count(count), type(type) { } // reorder args - whipowill bool IsActive() override; protected: