diff --git a/src/Ai/Base/Actions/AutoMaintenanceOnLevelupAction.cpp b/src/Ai/Base/Actions/AutoMaintenanceOnLevelupAction.cpp index 72433c15f..75152d87b 100644 --- a/src/Ai/Base/Actions/AutoMaintenanceOnLevelupAction.cpp +++ b/src/Ai/Base/Actions/AutoMaintenanceOnLevelupAction.cpp @@ -73,7 +73,7 @@ void AutoMaintenanceOnLevelupAction::LearnSpells(std::ostringstream* out) LearnQuestSpells(out); } -void AutoMaintenanceOnLevelupAction::LearnTrainerSpells(std::ostringstream* out) +void AutoMaintenanceOnLevelupAction::LearnTrainerSpells(std::ostringstream* /*out*/) { PlayerbotFactory factory(bot, bot->GetLevel()); factory.InitSkills(); diff --git a/src/Ai/Base/Actions/BankAction.cpp b/src/Ai/Base/Actions/BankAction.cpp index 4d8d6c4d8..5a4975f77 100644 --- a/src/Ai/Base/Actions/BankAction.cpp +++ b/src/Ai/Base/Actions/BankAction.cpp @@ -27,7 +27,7 @@ bool BankAction::Execute(Event event) return false; } -bool BankAction::ExecuteBank(std::string const text, Unit* bank) +bool BankAction::ExecuteBank(std::string const text, Unit* /*bank*/) { if (text.empty() || text == "?") { diff --git a/src/Ai/Base/Actions/CastCustomSpellAction.h b/src/Ai/Base/Actions/CastCustomSpellAction.h index ed53b18a5..6cfc1e689 100644 --- a/src/Ai/Base/Actions/CastCustomSpellAction.h +++ b/src/Ai/Base/Actions/CastCustomSpellAction.h @@ -21,7 +21,7 @@ public: } bool Execute(Event event) override; - virtual std::string const castString(WorldObject* target) { return "cast"; } + virtual std::string const castString(WorldObject* /*target*/) { return "cast"; } protected: bool ncCast = false; @@ -49,7 +49,7 @@ public: bool isUseful() override { return false; } virtual bool AcceptSpell(SpellInfo const* spellInfo); - virtual uint32 GetSpellPriority(SpellInfo const* spellInfo) { return 1; } + virtual uint32 GetSpellPriority(SpellInfo const* /*spellInfo*/) { return 1; } virtual bool castSpell(uint32 spellId, WorldObject* wo); bool Execute(Event event) override; diff --git a/src/Ai/Base/Actions/ChatShortcutActions.cpp b/src/Ai/Base/Actions/ChatShortcutActions.cpp index 0caeb5e0d..b715cb2bb 100644 --- a/src/Ai/Base/Actions/ChatShortcutActions.cpp +++ b/src/Ai/Base/Actions/ChatShortcutActions.cpp @@ -80,7 +80,7 @@ bool FollowChatShortcutAction::Execute(Event /*event*/) true, priority); } - if (Pet* pet = bot->GetPet()) + if (bot->GetPet()) botAI->PetFollow(); if (moved) diff --git a/src/Ai/Base/Actions/ChooseRpgTargetAction.cpp b/src/Ai/Base/Actions/ChooseRpgTargetAction.cpp index 76e6fe05f..8d15ae9be 100644 --- a/src/Ai/Base/Actions/ChooseRpgTargetAction.cpp +++ b/src/Ai/Base/Actions/ChooseRpgTargetAction.cpp @@ -116,6 +116,7 @@ bool ChooseRpgTargetAction::Execute(Event /*event*/) GuidPosition masterRpgTarget; if (master && master != bot && GET_PLAYERBOT_AI(master) && master->GetMapId() == bot->GetMapId() && !master->IsBeingTeleported()) { + //TODO Implement Player* player = botAI->GetMaster(); //GuidPosition masterRpgTarget = PAI_VALUE(GuidPosition, "rpg target"); //not used, line marked for removal. } diff --git a/src/Ai/Base/Actions/DropQuestAction.cpp b/src/Ai/Base/Actions/DropQuestAction.cpp index b3cba9c56..61ab4254a 100644 --- a/src/Ai/Base/Actions/DropQuestAction.cpp +++ b/src/Ai/Base/Actions/DropQuestAction.cpp @@ -68,25 +68,13 @@ bool CleanQuestLogAction::Execute(Event event) } if (!sPlayerbotAIConfig.dropObsoleteQuests) - { return false; - } // Only output this message if "debug rpg" strategy is enabled if (botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT)) - { botAI->TellMaster("Clean Quest Log command received, removing grey/trivial quests..."); - } uint8 botLevel = bot->GetLevel(); // Get bot's level - uint8 numQuest = 0; - for (uint8 slot = 0; slot < MAX_QUEST_LOG_SIZE; ++slot) - { - if (bot->GetQuestSlotQuestId(slot)) - { - numQuest++; - } - } for (uint8 slot = 0; slot < MAX_QUEST_LOG_SIZE; ++slot) { @@ -101,34 +89,24 @@ bool CleanQuestLogAction::Execute(Event event) // Determine if quest is trivial by comparing levels int32 questLevel = quest->GetQuestLevel(); if (questLevel == -1) // For scaling quests, default to bot level - { questLevel = botLevel; - } // Set the level difference for when a quest becomes trivial // This was determined by using the Lua code the client uses int32 trivialLevel = 5; if (botLevel >= 40) - { trivialLevel = 8; - } else if (botLevel >= 30) - { trivialLevel = 7; - } else if (botLevel >= 20) - { trivialLevel = 6; - } // Check if the quest is trivial (grey) for the bot if ((botLevel - questLevel) > trivialLevel) { // Output only if "debug rpg" strategy is enabled if (botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT)) - { botAI->TellMaster("Quest [ " + quest->GetTitle() + " ] will be removed because it is trivial (grey)."); - } // Remove quest botAI->rpgStatistic.questDropped++; @@ -137,8 +115,6 @@ bool CleanQuestLogAction::Execute(Event event) bot->SetQuestStatus(questId, QUEST_STATUS_NONE); bot->RemoveRewardedQuest(questId); - numQuest--; - if (botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT)) { const std::string text_quest = ChatHelper::FormatQuest(quest); @@ -147,17 +123,13 @@ bool CleanQuestLogAction::Execute(Event event) } if (botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT)) - { botAI->TellMaster("Quest [ " + quest->GetTitle() + " ] has been removed."); - } } else { // Only output if "debug rpg" strategy is enabled if (botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT)) - { botAI->TellMaster("Quest [ " + quest->GetTitle() + " ] is not trivial and will be kept."); - } } } @@ -174,7 +146,6 @@ void CleanQuestLogAction::DropQuestType(uint8& numQuest, uint8 wantNum, bool isG { std::random_device rd; std::mt19937 g(rd()); - std::shuffle(slots.begin(), slots.end(), g); } @@ -200,8 +171,10 @@ void CleanQuestLogAction::DropQuestType(uint8& numQuest, uint8 wantNum, bool isG bot->GetLevel() <= bot->GetQuestLevel(quest) + uint32(lowLevelDiff)) // Quest is not gray { if (bot->GetLevel() + 5 > bot->GetQuestLevel(quest)) // Quest is not red + { if (!isGreen) continue; + } } else // Quest is gray { diff --git a/src/Ai/Base/Actions/FollowActions.cpp b/src/Ai/Base/Actions/FollowActions.cpp index 48ce74ad3..f82b05368 100644 --- a/src/Ai/Base/Actions/FollowActions.cpp +++ b/src/Ai/Base/Actions/FollowActions.cpp @@ -168,8 +168,8 @@ bool FollowAction::Execute(Event /*event*/) ? MovementPriority::MOVEMENT_COMBAT : MovementPriority::MOVEMENT_NORMAL; - bool const movingAllowed = IsMovingAllowed(mapId, destX, destY, destZ); - bool const dupMove = IsDuplicateMove(mapId, destX, destY, destZ); + bool const movingAllowed = IsMovingAllowed(); + bool const dupMove = IsDuplicateMove(destX, destY, destZ); bool const waiting = IsWaitingForLastMove(priority); if (movingAllowed && !dupMove && !waiting) diff --git a/src/Ai/Base/Actions/GuildBankAction.cpp b/src/Ai/Base/Actions/GuildBankAction.cpp index 9693556d7..81fb0f4bd 100644 --- a/src/Ai/Base/Actions/GuildBankAction.cpp +++ b/src/Ai/Base/Actions/GuildBankAction.cpp @@ -53,7 +53,7 @@ bool GuildBankAction::Execute(std::string const text, GameObject* bank) return result; } -bool GuildBankAction::MoveFromCharToBank(Item* item, GameObject* bank) +bool GuildBankAction::MoveFromCharToBank(Item* item, GameObject* /*bank*/) { uint32 playerSlot = item->GetSlot(); uint32 playerBag = item->GetBagSlot(); diff --git a/src/Ai/Base/Actions/MailAction.cpp b/src/Ai/Base/Actions/MailAction.cpp index 6fd07e1e9..80f6002a3 100644 --- a/src/Ai/Base/Actions/MailAction.cpp +++ b/src/Ai/Base/Actions/MailAction.cpp @@ -78,7 +78,7 @@ private: class TakeMailProcessor : public MailProcessor { public: - bool Process(uint32 index, Mail* mail, PlayerbotAI* botAI) override + bool Process(uint32 /*index*/, Mail* mail, PlayerbotAI* botAI) override { Player* bot = botAI->GetBot(); if (!CheckBagSpace(bot)) @@ -104,7 +104,7 @@ public: { std::vector guids; for (MailItemInfoVec::iterator i = mail->items.begin(); i != mail->items.end(); ++i) - if (ItemTemplate const* proto = sObjectMgr->GetItemTemplate(i->item_template)) + if (sObjectMgr->GetItemTemplate(i->item_template)) guids.push_back(i->item_guid); for (std::vector::iterator i = guids.begin(); i != guids.end(); ++i) @@ -157,7 +157,7 @@ private: class DeleteMailProcessor : public MailProcessor { public: - bool Process(uint32 index, Mail* mail, PlayerbotAI* botAI) override + bool Process(uint32 /*index*/, Mail* mail, PlayerbotAI* botAI) override { std::ostringstream out; out << "|cffffffff" << mail->subject << "|cffff0000 deleted"; @@ -172,7 +172,7 @@ public: class ReadMailProcessor : public MailProcessor { public: - bool Process(uint32 index, Mail* mail, PlayerbotAI* botAI) override + bool Process(uint32 /*index*/, Mail* mail, PlayerbotAI* botAI) override { std::ostringstream out, body; out << "|cffffffff" << mail->subject; diff --git a/src/Ai/Base/Actions/MovementActions.cpp b/src/Ai/Base/Actions/MovementActions.cpp index 85855f60d..18e76ca72 100644 --- a/src/Ai/Base/Actions/MovementActions.cpp +++ b/src/Ai/Base/Actions/MovementActions.cpp @@ -63,10 +63,10 @@ void MovementAction::CreateWp(Player* wpOwner, float x, float y, float z, float bool MovementAction::JumpTo(uint32 mapId, float x, float y, float z, MovementPriority priority) { UpdateMovementState(); - if (!IsMovingAllowed(mapId, x, y, z)) + if (!IsMovingAllowed()) return false; - if (IsDuplicateMove(mapId, x, y, z)) + if (IsDuplicateMove(x, y, z)) return false; if (IsWaitingForLastMove(priority)) @@ -171,11 +171,11 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle, bool exact_waypoint, MovementPriority priority, bool lessDelay, bool backwards) { UpdateMovementState(); - if (!IsMovingAllowed(mapId, x, y, z)) + if (!IsMovingAllowed()) { return false; } - if (IsDuplicateMove(mapId, x, y, z)) + if (IsDuplicateMove(x, y, z)) { return false; } @@ -897,20 +897,7 @@ bool MovementAction::IsMovingAllowed(WorldObject* target) return IsMovingAllowed(); } -bool MovementAction::IsMovingAllowed(uint32 mapId, float x, float y, float z) -{ - // removed sqrt as means distance limit was effectively 22500 (ReactDistance�) - // leaving it commented incase we find ReactDistance limit causes problems - // float distance = sqrt(bot->GetDistance(x, y, z)); - - // Remove react distance limit - // if (!bot->InBattleground()) - // return false; - - return IsMovingAllowed(); -} - -bool MovementAction::IsDuplicateMove(uint32 mapId, float x, float y, float z) +bool MovementAction::IsDuplicateMove(float x, float y, float z) { LastMovement& lastMove = *context->GetValue("last movement"); @@ -1286,7 +1273,7 @@ bool MovementAction::Follow(Unit* target, float distance, float angle) return true; } -bool MovementAction::ChaseTo(WorldObject* obj, float distance, float angle) +bool MovementAction::ChaseTo(WorldObject* obj, float distance) { if (!IsMovingAllowed()) { @@ -1859,7 +1846,7 @@ bool FleeAction::isUseful() bool FleeWithPetAction::Execute(Event /*event*/) { - if (Pet* pet = bot->GetPet()) + if (bot->GetPet()) botAI->PetFollow(); return Flee(AI_VALUE(Unit*, "current target")); diff --git a/src/Ai/Base/Actions/MovementActions.h b/src/Ai/Base/Actions/MovementActions.h index 377e8360a..b1c566211 100644 --- a/src/Ai/Base/Actions/MovementActions.h +++ b/src/Ai/Base/Actions/MovementActions.h @@ -43,14 +43,13 @@ protected: float GetFollowAngle(); bool Follow(Unit* target, float distance = sPlayerbotAIConfig.followDistance); bool Follow(Unit* target, float distance, float angle); - bool ChaseTo(WorldObject* obj, float distance = 0.0f, float angle = 0.0f); + bool ChaseTo(WorldObject* obj, float distance = 0.0f); bool ReachCombatTo(Unit* target, float distance = 0.0f); float MoveDelay(float distance, bool backwards = false); void WaitForReach(float distance); void SetNextMovementDelay(float delayMillis); bool IsMovingAllowed(WorldObject* target); - bool IsMovingAllowed(uint32 mapId, float x, float y, float z); - bool IsDuplicateMove(uint32 mapId, float x, float y, float z); + bool IsDuplicateMove(float x, float y, float z); bool IsWaitingForLastMove(MovementPriority priority); bool IsMovingAllowed(); bool Flee(Unit* target); diff --git a/src/Ai/Base/Actions/ReadyCheckAction.cpp b/src/Ai/Base/Actions/ReadyCheckAction.cpp index 1c510d69d..625deb8a4 100644 --- a/src/Ai/Base/Actions/ReadyCheckAction.cpp +++ b/src/Ai/Base/Actions/ReadyCheckAction.cpp @@ -45,7 +45,7 @@ std::once_flag ReadyChecker::initFlag; class HealthChecker : public ReadyChecker { public: - bool Check(PlayerbotAI* botAI, AiObjectContext* context) override + bool Check(PlayerbotAI* /*botAI*/, AiObjectContext* context) override { return AI_VALUE2(uint8, "health", "self target") > sPlayerbotAIConfig.almostFullHealth; } @@ -56,7 +56,7 @@ public: class ManaChecker : public ReadyChecker { public: - bool Check(PlayerbotAI* botAI, AiObjectContext* context) override + bool Check(PlayerbotAI* /*botAI*/, AiObjectContext* context) override { return !AI_VALUE2(bool, "has mana", "self target") || AI_VALUE2(uint8, "mana", "self target") > sPlayerbotAIConfig.mediumHealth; @@ -68,7 +68,7 @@ public: class DistanceChecker : public ReadyChecker { public: - bool Check(PlayerbotAI* botAI, AiObjectContext* context) override + bool Check(PlayerbotAI* botAI, AiObjectContext* /*context*/) override { Player* bot = botAI->GetBot(); if (Player* master = botAI->GetMaster()) @@ -90,7 +90,7 @@ public: class HunterChecker : public ReadyChecker { public: - bool Check(PlayerbotAI* botAI, AiObjectContext* context) override + bool Check(PlayerbotAI* botAI, AiObjectContext* /*context*/) override { Player* bot = botAI->GetBot(); if (bot->getClass() == CLASS_HUNTER) @@ -126,7 +126,7 @@ class ItemCountChecker : public ReadyChecker public: ItemCountChecker(std::string const item, std::string const name) : item(item), name(name) {} - bool Check(PlayerbotAI* botAI, AiObjectContext* context) override + bool Check(PlayerbotAI* /*botAI*/, AiObjectContext* context) override { return AI_VALUE2(uint32, "item count", item) > 0; } @@ -225,4 +225,4 @@ bool ReadyCheckAction::ReadyCheck() return true; } -bool FinishReadyCheckAction::Execute(Event event) { return ReadyCheck(); } +bool FinishReadyCheckAction::Execute(Event /*event*/) { return ReadyCheck(); } diff --git a/src/Ai/Base/Actions/ReleaseSpiritAction.cpp b/src/Ai/Base/Actions/ReleaseSpiritAction.cpp index 9a923d4fd..19bb870db 100644 --- a/src/Ai/Base/Actions/ReleaseSpiritAction.cpp +++ b/src/Ai/Base/Actions/ReleaseSpiritAction.cpp @@ -65,7 +65,7 @@ void ReleaseSpiritAction::IncrementDeathCount() const } } -void ReleaseSpiritAction::LogRelease(const std::string& releaseMsg, bool isAutoRelease) const +void ReleaseSpiritAction::LogRelease(const std::string& releaseMsg) const { const std::string teamPrefix = bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H"; @@ -82,13 +82,13 @@ bool AutoReleaseSpiritAction::Execute(Event /*event*/) { IncrementDeathCount(); bot->DurabilityRepairAll(false, 1.0f, false); - LogRelease("auto released", true); + LogRelease("auto released"); WorldPacket packet(CMSG_REPOP_REQUEST); packet << uint8(0); bot->GetSession()->HandleRepopRequestOpcode(packet); - LogRelease("releases spirit", true); + LogRelease("releases spirit"); if (bot->InBattleground()) { diff --git a/src/Ai/Base/Actions/ReleaseSpiritAction.h b/src/Ai/Base/Actions/ReleaseSpiritAction.h index 57851214a..af5be1da8 100644 --- a/src/Ai/Base/Actions/ReleaseSpiritAction.h +++ b/src/Ai/Base/Actions/ReleaseSpiritAction.h @@ -18,7 +18,7 @@ public: : Action(botAI, name) {} bool Execute(Event event) override; - void LogRelease(const std::string& releaseType, bool isAutoRelease = false) const; + void LogRelease(const std::string& releaseType) const; protected: void IncrementDeathCount() const; diff --git a/src/Ai/Base/Actions/SayAction.cpp b/src/Ai/Base/Actions/SayAction.cpp index 9580fe228..1e8af7605 100644 --- a/src/Ai/Base/Actions/SayAction.cpp +++ b/src/Ai/Base/Actions/SayAction.cpp @@ -154,7 +154,7 @@ bool SayAction::isUseful() return (time(nullptr) - lastSaid) > 30; } -void ChatReplyAction::ChatReplyDo(Player* bot, uint32& type, uint32& guid1, uint32& guid2, std::string& msg, std::string& chanName, std::string& name) +void ChatReplyAction::ChatReplyDo(Player* bot, uint32& type, uint32& guid1, std::string& msg, std::string& chanName, std::string& name) { std::string respondsText = ""; @@ -205,14 +205,14 @@ void ChatReplyAction::ChatReplyDo(Player* bot, uint32& type, uint32& guid1, uint if (msg.starts_with(sPlayerbotAIConfig.toxicLinksPrefix) && (GET_PLAYERBOT_AI(bot)->GetChatHelper()->ExtractAllItemIds(msg).size() > 0 || GET_PLAYERBOT_AI(bot)->GetChatHelper()->ExtractAllQuestIds(msg).size() > 0)) { - HandleToxicLinksReply(bot, chatChannelSource, msg, name); + HandleToxicLinksReply(bot, chatChannelSource); return; } //thunderfury if (GET_PLAYERBOT_AI(bot)->GetChatHelper()->ExtractAllItemIds(msg).count(19019)) { - HandleThunderfuryReply(bot, chatChannelSource, msg, name); + HandleThunderfuryReply(bot, chatChannelSource); return; } @@ -220,7 +220,7 @@ void ChatReplyAction::ChatReplyDo(Player* bot, uint32& type, uint32& guid1, uint SendGeneralResponse(bot, chatChannelSource, messageRepy, name); } -bool ChatReplyAction::HandleThunderfuryReply(Player* bot, ChatChannelSource chatChannelSource, std::string& msg, std::string& name) +bool ChatReplyAction::HandleThunderfuryReply(Player* bot, ChatChannelSource chatChannelSource) { std::map placeholders; const auto thunderfury = sObjectMgr->GetItemTemplate(19019); @@ -248,7 +248,7 @@ bool ChatReplyAction::HandleThunderfuryReply(Player* bot, ChatChannelSource chat return true; } -bool ChatReplyAction::HandleToxicLinksReply(Player* bot, ChatChannelSource chatChannelSource, std::string& msg, std::string& name) +bool ChatReplyAction::HandleToxicLinksReply(Player* bot, ChatChannelSource chatChannelSource) { //quests std::vector incompleteQuests; diff --git a/src/Ai/Base/Actions/SayAction.h b/src/Ai/Base/Actions/SayAction.h index 5bf9a8f04..cae5ee444 100644 --- a/src/Ai/Base/Actions/SayAction.h +++ b/src/Ai/Base/Actions/SayAction.h @@ -29,12 +29,12 @@ class ChatReplyAction : public Action { public: ChatReplyAction(PlayerbotAI* ai) : Action(ai, "chat message") {} - virtual bool Execute(Event event) { return true; } + virtual bool Execute(Event /*event*/) { return true; } bool isUseful() { return true; } - static void ChatReplyDo(Player* bot, uint32& type, uint32& guid1, uint32& guid2, std::string& msg, std::string& chanName, std::string& name); - static bool HandleThunderfuryReply(Player* bot, ChatChannelSource chatChannelSource, std::string& msg, std::string& name); - static bool HandleToxicLinksReply(Player* bot, ChatChannelSource chatChannelSource, std::string& msg, std::string& name); + static void ChatReplyDo(Player* bot, uint32& type, uint32& guid1, std::string& msg, std::string& chanName, std::string& name); + static bool HandleThunderfuryReply(Player* bot, ChatChannelSource chatChannelSource); + static bool HandleToxicLinksReply(Player* bot, ChatChannelSource chatChannelSource); static bool HandleWTBItemsReply(Player* bot, ChatChannelSource chatChannelSource, std::string& msg, std::string& name); static bool HandleLFGQuestsReply(Player* bot, ChatChannelSource chatChannelSource, std::string& msg, std::string& name); static bool SendGeneralResponse(Player* bot, ChatChannelSource chatChannelSource, std::string& responseMessage, std::string& name); diff --git a/src/Ai/Base/Actions/SeeSpellAction.cpp b/src/Ai/Base/Actions/SeeSpellAction.cpp index f7d7eab23..d93b56b51 100644 --- a/src/Ai/Base/Actions/SeeSpellAction.cpp +++ b/src/Ai/Base/Actions/SeeSpellAction.cpp @@ -15,7 +15,7 @@ std::set const FISHING_SPELLS = {7620, 7731, 7732, 18248, 33095, 51294}; -Creature* SeeSpellAction::CreateWps(Player* wpOwner, float x, float y, float z, float o, uint32 entry, Creature* lastWp, +Creature* SeeSpellAction::CreateWps(Player* wpOwner, float x, float y, float z, float o, uint32 entry, Creature* /*lastWp*/, bool important) { float dist = wpOwner->GetDistance(x, y, z); diff --git a/src/Ai/Base/Actions/UseMeetingStoneAction.cpp b/src/Ai/Base/Actions/UseMeetingStoneAction.cpp index 0862be68f..d6032acb1 100644 --- a/src/Ai/Base/Actions/UseMeetingStoneAction.cpp +++ b/src/Ai/Base/Actions/UseMeetingStoneAction.cpp @@ -61,7 +61,7 @@ bool SummonAction::Execute(Event /*event*/) if (!master) return false; - if (Pet* pet = bot->GetPet()) + if (bot->GetPet()) botAI->PetFollow(); if (master->GetSession()->GetSecurity() >= SEC_PLAYER) diff --git a/src/Ai/Base/Strategy/ChatCommandHandlerStrategy.cpp b/src/Ai/Base/Strategy/ChatCommandHandlerStrategy.cpp index adcadb233..8d5449ef3 100644 --- a/src/Ai/Base/Strategy/ChatCommandHandlerStrategy.cpp +++ b/src/Ai/Base/Strategy/ChatCommandHandlerStrategy.cpp @@ -11,7 +11,7 @@ public: ChatCommandActionNodeFactoryInternal() { creators["tank attack chat shortcut"] = &tank_attack_chat_shortcut; } private: - static ActionNode* tank_attack_chat_shortcut(PlayerbotAI* botAI) + static ActionNode* tank_attack_chat_shortcut(PlayerbotAI* /*botAI*/) { return new ActionNode("tank attack chat shortcut", /*P*/ {}, diff --git a/src/Ai/Base/Strategy/CombatStrategy.cpp b/src/Ai/Base/Strategy/CombatStrategy.cpp index 62972d4b1..f7e82102e 100644 --- a/src/Ai/Base/Strategy/CombatStrategy.cpp +++ b/src/Ai/Base/Strategy/CombatStrategy.cpp @@ -64,11 +64,11 @@ std::vector AvoidAoeStrategy::getDefaultActions() }; } -void AvoidAoeStrategy::InitTriggers(std::vector& triggers) +void AvoidAoeStrategy::InitTriggers(std::vector& /*triggers*/) { } -void AvoidAoeStrategy::InitMultipliers(std::vector& multipliers) +void AvoidAoeStrategy::InitMultipliers(std::vector& /*multipliers*/) { } @@ -81,7 +81,7 @@ std::vector TankFaceStrategy::getDefaultActions() }; } -void TankFaceStrategy::InitTriggers(std::vector& triggers) +void TankFaceStrategy::InitTriggers(std::vector& /*triggers*/) { } diff --git a/src/Ai/Base/Strategy/DuelStrategy.cpp b/src/Ai/Base/Strategy/DuelStrategy.cpp index c7f7e9d23..2a36a3cc6 100644 --- a/src/Ai/Base/Strategy/DuelStrategy.cpp +++ b/src/Ai/Base/Strategy/DuelStrategy.cpp @@ -17,6 +17,6 @@ void DuelStrategy::InitTriggers(std::vector& triggers) DuelStrategy::DuelStrategy(PlayerbotAI* botAI) : PassTroughStrategy(botAI) {} -void StartDuelStrategy::InitTriggers(std::vector& triggers) {} +void StartDuelStrategy::InitTriggers(std::vector& /*triggers*/) {} StartDuelStrategy::StartDuelStrategy(PlayerbotAI* botAI) : Strategy(botAI) {} diff --git a/src/Ai/Base/Strategy/FollowMasterStrategy.cpp b/src/Ai/Base/Strategy/FollowMasterStrategy.cpp index 6701fdcac..5e836cf62 100644 --- a/src/Ai/Base/Strategy/FollowMasterStrategy.cpp +++ b/src/Ai/Base/Strategy/FollowMasterStrategy.cpp @@ -12,6 +12,6 @@ std::vector FollowMasterStrategy::getDefaultActions() }; } -void FollowMasterStrategy::InitTriggers(std::vector& triggers) +void FollowMasterStrategy::InitTriggers(std::vector& /*triggers*/) { } diff --git a/src/Ai/Base/Strategy/GuardStrategy.cpp b/src/Ai/Base/Strategy/GuardStrategy.cpp index 96017365f..914cacf03 100644 --- a/src/Ai/Base/Strategy/GuardStrategy.cpp +++ b/src/Ai/Base/Strategy/GuardStrategy.cpp @@ -12,4 +12,4 @@ std::vector GuardStrategy::getDefaultActions() }; } -void GuardStrategy::InitTriggers(std::vector& triggers) {} +void GuardStrategy::InitTriggers(std::vector& /*triggers*/) {} diff --git a/src/Ai/Base/Strategy/NonCombatStrategy.cpp b/src/Ai/Base/Strategy/NonCombatStrategy.cpp index cb32233f4..05163208a 100644 --- a/src/Ai/Base/Strategy/NonCombatStrategy.cpp +++ b/src/Ai/Base/Strategy/NonCombatStrategy.cpp @@ -17,7 +17,7 @@ void CollisionStrategy::InitTriggers(std::vector& triggers) new TriggerNode("collision", { NextAction("move out of collision", 2.0f) })); } -void MountStrategy::InitTriggers(std::vector& triggers) +void MountStrategy::InitTriggers(std::vector& /*triggers*/) { } diff --git a/src/Ai/Base/Strategy/RTSCStrategy.cpp b/src/Ai/Base/Strategy/RTSCStrategy.cpp index 525338c15..75d07706b 100644 --- a/src/Ai/Base/Strategy/RTSCStrategy.cpp +++ b/src/Ai/Base/Strategy/RTSCStrategy.cpp @@ -7,4 +7,4 @@ RTSCStrategy::RTSCStrategy(PlayerbotAI* botAI) : Strategy(botAI) {} -void RTSCStrategy::InitTriggers(std::vector& triggers) {} +void RTSCStrategy::InitTriggers(std::vector& /*triggers*/) {} diff --git a/src/Ai/Base/Strategy/RacialsStrategy.cpp b/src/Ai/Base/Strategy/RacialsStrategy.cpp index ae45cdaaf..b5a84bbce 100644 --- a/src/Ai/Base/Strategy/RacialsStrategy.cpp +++ b/src/Ai/Base/Strategy/RacialsStrategy.cpp @@ -11,7 +11,7 @@ public: RacialsStrategyActionNodeFactory() { creators["lifeblood"] = &lifeblood; } private: - static ActionNode* lifeblood(PlayerbotAI* botAI) + static ActionNode* lifeblood(PlayerbotAI* /*botAI*/) { return new ActionNode("lifeblood", /*P*/ {}, diff --git a/src/Ai/Base/Strategy/UsePotionsStrategy.cpp b/src/Ai/Base/Strategy/UsePotionsStrategy.cpp index 55827fbd2..27f690cf1 100644 --- a/src/Ai/Base/Strategy/UsePotionsStrategy.cpp +++ b/src/Ai/Base/Strategy/UsePotionsStrategy.cpp @@ -11,7 +11,7 @@ public: UsePotionsStrategyActionNodeFactory() { creators["healthstone"] = &healthstone; } private: - static ActionNode* healthstone(PlayerbotAI* botAI) + static ActionNode* healthstone(PlayerbotAI* /*botAI*/) { return new ActionNode("healthstone", /*P*/ {}, diff --git a/src/Ai/Base/Value/Arrow.cpp b/src/Ai/Base/Value/Arrow.cpp index c993275f5..1a4c4ff88 100644 --- a/src/Ai/Base/Value/Arrow.cpp +++ b/src/Ai/Base/Value/Arrow.cpp @@ -19,6 +19,7 @@ WorldLocation ArrowFormation::GetLocationInternal() uint32 tankLines = 1 + tanks.Size() / 6; uint32 meleeLines = 1 + melee.Size() / 6; uint32 rangedLines = 1 + ranged.Size() / 6; + //TODO Implement Healer Lines uint32 healerLines = 1 + healers.Size() / 6; float offset = 0.f; @@ -147,7 +148,7 @@ UnitPosition MultiLineUnitPlacer::Place(FormationUnit* unit, uint32 index, uint3 return placer.Place(unit, indexInLine, lineSize); } -UnitPosition SingleLineUnitPlacer::Place(FormationUnit* unit, uint32 index, uint32 count) +UnitPosition SingleLineUnitPlacer::Place(FormationUnit* /*unit*/, uint32 index, uint32 count) { float angle = orientation - M_PI / 2.0f; float x = cos(angle) * sPlayerbotAIConfig.followDistance * ((float)index - (float)count / 2); diff --git a/src/Ai/Base/Value/CcTargetValue.cpp b/src/Ai/Base/Value/CcTargetValue.cpp index a8de7a10e..4903a59f3 100644 --- a/src/Ai/Base/Value/CcTargetValue.cpp +++ b/src/Ai/Base/Value/CcTargetValue.cpp @@ -20,7 +20,7 @@ public: } public: - void CheckAttacker(Unit* creature, ThreatManager* threatMgr) override + void CheckAttacker(Unit* creature, ThreatManager* /*threatMgr*/) override { Player* bot = botAI->GetBot(); if (!botAI->CanCastSpell(spell, creature)) diff --git a/src/Ai/Base/Value/CurrentCcTargetValue.cpp b/src/Ai/Base/Value/CurrentCcTargetValue.cpp index b095c09d7..39fb7edd2 100644 --- a/src/Ai/Base/Value/CurrentCcTargetValue.cpp +++ b/src/Ai/Base/Value/CurrentCcTargetValue.cpp @@ -13,7 +13,7 @@ public: { } - void CheckAttacker(Unit* attacker, ThreatManager* threatMgr) override + void CheckAttacker(Unit* attacker, ThreatManager* /*threatMgr*/) override { if (botAI->HasAura(spell, attacker)) result = attacker; diff --git a/src/Ai/Base/Value/DpsTargetValue.cpp b/src/Ai/Base/Value/DpsTargetValue.cpp index 010e47191..7099a13fe 100644 --- a/src/Ai/Base/Value/DpsTargetValue.cpp +++ b/src/Ai/Base/Value/DpsTargetValue.cpp @@ -50,7 +50,7 @@ public: result = nullptr; } - void CheckAttacker(Unit* attacker, ThreatManager* threatMgr) override + void CheckAttacker(Unit* attacker, ThreatManager* /*threatMgr*/) override { if (Group* group = botAI->GetBot()->GetGroup()) { diff --git a/src/Ai/Base/Value/ItemCountValue.cpp b/src/Ai/Base/Value/ItemCountValue.cpp index 9ea7da2e0..46ebc1dfa 100644 --- a/src/Ai/Base/Value/ItemCountValue.cpp +++ b/src/Ai/Base/Value/ItemCountValue.cpp @@ -11,8 +11,6 @@ std::vector InventoryItemValueBase::Find(std::string const qualifier) { std::vector result; - Player* bot = InventoryAction::botAI->GetBot(); - std::vector items = InventoryAction::parseItems(qualifier); for (Item* item : items) result.push_back(item); diff --git a/src/Ai/Base/Value/ItemCountValue.h b/src/Ai/Base/Value/ItemCountValue.h index 6f7c593b2..7e47565fc 100644 --- a/src/Ai/Base/Value/ItemCountValue.h +++ b/src/Ai/Base/Value/ItemCountValue.h @@ -17,7 +17,7 @@ class InventoryItemValueBase : public InventoryAction public: InventoryItemValueBase(PlayerbotAI* botAI) : InventoryAction(botAI, "empty") {} - bool Execute(Event event) override { return false; } + bool Execute(Event /*event*/) override { return false; } protected: std::vector Find(std::string const qualifier); diff --git a/src/Ai/Base/Value/ItemUsageValue.cpp b/src/Ai/Base/Value/ItemUsageValue.cpp index b651af956..889372127 100644 --- a/src/Ai/Base/Value/ItemUsageValue.cpp +++ b/src/Ai/Base/Value/ItemUsageValue.cpp @@ -864,8 +864,6 @@ bool ItemUsageValue::SpellGivesSkillUp(uint32 spellId, Player* bot) { uint32 SkillValue = bot->GetPureSkillValue(skill->SkillLine); - uint32 craft_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_CRAFTING); - if (SkillGainChance(SkillValue, skill->TrivialSkillLineRankHigh, (skill->TrivialSkillLineRankHigh + skill->TrivialSkillLineRankLow) / 2, skill->TrivialSkillLineRankLow) > 0) diff --git a/src/Ai/Base/Value/LeastHpTargetValue.cpp b/src/Ai/Base/Value/LeastHpTargetValue.cpp index c185628fa..d8579f0dd 100644 --- a/src/Ai/Base/Value/LeastHpTargetValue.cpp +++ b/src/Ai/Base/Value/LeastHpTargetValue.cpp @@ -13,7 +13,7 @@ class FindLeastHpTargetStrategy : public FindNonCcTargetStrategy public: FindLeastHpTargetStrategy(PlayerbotAI* botAI) : FindNonCcTargetStrategy(botAI), minHealth(0) {} - void CheckAttacker(Unit* attacker, ThreatManager* threatMgr) override + void CheckAttacker(Unit* attacker, ThreatManager* /*threatMgr*/) override { if (IsCcTarget(attacker)) return; diff --git a/src/Ai/Base/Value/LootStrategyValue.cpp b/src/Ai/Base/Value/LootStrategyValue.cpp index 6a4f9b9b4..3b0b81a19 100644 --- a/src/Ai/Base/Value/LootStrategyValue.cpp +++ b/src/Ai/Base/Value/LootStrategyValue.cpp @@ -60,7 +60,7 @@ public: class AllLootStrategy : public LootStrategy { public: - bool CanLoot(ItemTemplate const* proto, AiObjectContext* context) override { return true; } + bool CanLoot(ItemTemplate const* /*proto*/, AiObjectContext* /*context*/) override { return true; } std::string const GetName() override { return "all"; } }; diff --git a/src/Ai/Base/Value/NearestCorpsesValue.cpp b/src/Ai/Base/Value/NearestCorpsesValue.cpp index 6091c3241..99b42662c 100644 --- a/src/Ai/Base/Value/NearestCorpsesValue.cpp +++ b/src/Ai/Base/Value/NearestCorpsesValue.cpp @@ -28,4 +28,4 @@ void NearestCorpsesValue::FindUnits(std::list& targets) Cell::VisitObjects(bot, searcher, range); } -bool NearestCorpsesValue::AcceptUnit(Unit* unit) { return true; } +bool NearestCorpsesValue::AcceptUnit(Unit* /*unit*/) { return true; } diff --git a/src/Ai/Base/Value/PartyMemberValue.cpp b/src/Ai/Base/Value/PartyMemberValue.cpp index 53a93b2b4..b4f44fdf4 100644 --- a/src/Ai/Base/Value/PartyMemberValue.cpp +++ b/src/Ai/Base/Value/PartyMemberValue.cpp @@ -27,7 +27,7 @@ Unit* PartyMemberValue::FindPartyMember(std::vector* party, FindPlayerP return nullptr; } -Unit* PartyMemberValue::FindPartyMember(FindPlayerPredicate& predicate, bool ignoreOutOfGroup) +Unit* PartyMemberValue::FindPartyMember(FindPlayerPredicate& predicate, bool /*ignoreOutOfGroup*/) { Player* master = GetMaster(); // GuidVector nearestPlayers; diff --git a/src/Ai/Base/Value/TankTargetValue.cpp b/src/Ai/Base/Value/TankTargetValue.cpp index 80def1cf9..74a4046a3 100644 --- a/src/Ai/Base/Value/TankTargetValue.cpp +++ b/src/Ai/Base/Value/TankTargetValue.cpp @@ -49,7 +49,7 @@ class FindTankTargetSmartStrategy : public FindTargetStrategy public: FindTankTargetSmartStrategy(PlayerbotAI* botAI) : FindTargetStrategy(botAI) {} - void CheckAttacker(Unit* attacker, ThreatManager* threatMgr) override + void CheckAttacker(Unit* attacker, ThreatManager* /*threatMgr*/) override { if (Group* group = botAI->GetBot()->GetGroup()) { diff --git a/src/Ai/Base/Value/TargetValue.cpp b/src/Ai/Base/Value/TargetValue.cpp index 19578daf4..9b8fde5bd 100644 --- a/src/Ai/Base/Value/TargetValue.cpp +++ b/src/Ai/Base/Value/TargetValue.cpp @@ -161,7 +161,7 @@ Unit* FindTargetValue::Calculate() return nullptr; } -void FindBossTargetStrategy::CheckAttacker(Unit* attacker, ThreatManager* threatManager) +void FindBossTargetStrategy::CheckAttacker(Unit* attacker, ThreatManager* /*threatManager*/) { UnitAI* unitAI = attacker->GetAI(); BossAI* bossAI = dynamic_cast(unitAI); diff --git a/src/Ai/Class/Dk/Strategy/GenericDKNonCombatStrategy.cpp b/src/Ai/Class/Dk/Strategy/GenericDKNonCombatStrategy.cpp index 0d3a43b79..28179d74e 100644 --- a/src/Ai/Class/Dk/Strategy/GenericDKNonCombatStrategy.cpp +++ b/src/Ai/Class/Dk/Strategy/GenericDKNonCombatStrategy.cpp @@ -47,7 +47,7 @@ void GenericDKNonCombatStrategy::InitTriggers(std::vector& trigger new TriggerNode("bone shield", { NextAction("bone shield", 21.0f) })); } -void DKBuffDpsStrategy::InitTriggers(std::vector& triggers) +void DKBuffDpsStrategy::InitTriggers(std::vector& /*triggers*/) { } diff --git a/src/Ai/Class/Druid/Strategy/CatDpsDruidStrategy.cpp b/src/Ai/Class/Druid/Strategy/CatDpsDruidStrategy.cpp index b1a4685b1..f7a76b0fc 100644 --- a/src/Ai/Class/Druid/Strategy/CatDpsDruidStrategy.cpp +++ b/src/Ai/Class/Druid/Strategy/CatDpsDruidStrategy.cpp @@ -311,4 +311,4 @@ void CatDpsDruidStrategy::InitTriggers(std::vector& triggers) ); } -void CatAoeDruidStrategy::InitTriggers(std::vector& triggers) {} +void CatAoeDruidStrategy::InitTriggers(std::vector& /*triggers*/) {} diff --git a/src/Ai/Class/Hunter/Action/HunterActions.h b/src/Ai/Class/Hunter/Action/HunterActions.h index a67f17780..4c7c0851b 100644 --- a/src/Ai/Class/Hunter/Action/HunterActions.h +++ b/src/Ai/Class/Hunter/Action/HunterActions.h @@ -392,7 +392,7 @@ class CastExplosiveShotRank4Action : public CastExplosiveShotBaseAction public: CastExplosiveShotRank4Action(PlayerbotAI* botAI) : CastExplosiveShotBaseAction(botAI) {} - bool Execute(Event event) override + bool Execute(Event /*event*/) override { return botAI->CastSpell(60053, GetTarget()); } @@ -412,7 +412,7 @@ class CastExplosiveShotRank3Action : public CastExplosiveShotBaseAction public: CastExplosiveShotRank3Action(PlayerbotAI* botAI) : CastExplosiveShotBaseAction(botAI) {} - bool Execute(Event event) override + bool Execute(Event /*event*/) override { return botAI->CastSpell(60052, GetTarget()); } @@ -432,7 +432,7 @@ class CastExplosiveShotRank2Action : public CastExplosiveShotBaseAction public: CastExplosiveShotRank2Action(PlayerbotAI* botAI) : CastExplosiveShotBaseAction(botAI) {} - bool Execute(Event event) override + bool Execute(Event /*event*/) override { return botAI->CastSpell(60051, GetTarget()); } @@ -452,7 +452,7 @@ class CastExplosiveShotRank1Action : public CastExplosiveShotBaseAction public: CastExplosiveShotRank1Action(PlayerbotAI* botAI) : CastExplosiveShotBaseAction(botAI) {} - bool Execute(Event event) override + bool Execute(Event /*event*/) override { return botAI->CastSpell(53301, GetTarget()); } diff --git a/src/Ai/Class/Paladin/Strategy/GenericPaladinStrategy.cpp b/src/Ai/Class/Paladin/Strategy/GenericPaladinStrategy.cpp index c4edc28fd..315b4a96f 100644 --- a/src/Ai/Class/Paladin/Strategy/GenericPaladinStrategy.cpp +++ b/src/Ai/Class/Paladin/Strategy/GenericPaladinStrategy.cpp @@ -54,7 +54,7 @@ void PaladinCureStrategy::InitTriggers(std::vector& triggers) { NextAction("cleanse magic on party", ACTION_DISPEL + 1) })); } -void PaladinBoostStrategy::InitTriggers(std::vector& triggers) +void PaladinBoostStrategy::InitTriggers(std::vector& /*triggers*/) { // triggers.push_back(new TriggerNode("divine favor", { NextAction("divine favor", diff --git a/src/Ai/Class/Warlock/Strategy/GenericWarlockStrategy.cpp b/src/Ai/Class/Warlock/Strategy/GenericWarlockStrategy.cpp index 9c85f7861..d5e06b54c 100644 --- a/src/Ai/Class/Warlock/Strategy/GenericWarlockStrategy.cpp +++ b/src/Ai/Class/Warlock/Strategy/GenericWarlockStrategy.cpp @@ -124,12 +124,12 @@ void AoEWarlockStrategy::InitTriggers(std::vector& triggers) ); } -void WarlockBoostStrategy::InitTriggers(std::vector& triggers) +void WarlockBoostStrategy::InitTriggers(std::vector& /*triggers*/) { // Placeholder for future boost triggers } -void WarlockPetStrategy::InitTriggers(std::vector& triggers) +void WarlockPetStrategy::InitTriggers(std::vector& /*triggers*/) { // Placeholder for future pet triggers } diff --git a/src/Ai/Class/Warlock/Strategy/TankWarlockStrategy.cpp b/src/Ai/Class/Warlock/Strategy/TankWarlockStrategy.cpp index 5c922af90..ce10e6b9c 100644 --- a/src/Ai/Class/Warlock/Strategy/TankWarlockStrategy.cpp +++ b/src/Ai/Class/Warlock/Strategy/TankWarlockStrategy.cpp @@ -41,6 +41,6 @@ std::vector TankWarlockStrategy::getDefaultActions() }; } -void TankWarlockStrategy::InitTriggers(std::vector& triggers) +void TankWarlockStrategy::InitTriggers(std::vector& /*triggers*/) { } diff --git a/src/Ai/Class/Warrior/Strategy/ArmsWarriorStrategy.cpp b/src/Ai/Class/Warrior/Strategy/ArmsWarriorStrategy.cpp index 6d6e0b655..bbae89d20 100644 --- a/src/Ai/Class/Warrior/Strategy/ArmsWarriorStrategy.cpp +++ b/src/Ai/Class/Warrior/Strategy/ArmsWarriorStrategy.cpp @@ -21,7 +21,7 @@ public: } private: - static ActionNode* charge(PlayerbotAI* botAI) + static ActionNode* charge(PlayerbotAI* /*botAI*/) { return new ActionNode( "charge", @@ -31,7 +31,7 @@ private: ); } - static ActionNode* death_wish(PlayerbotAI* botAI) + static ActionNode* death_wish(PlayerbotAI* /*botAI*/) { return new ActionNode( "death wish", @@ -41,7 +41,7 @@ private: ); } - static ActionNode* piercing_howl(PlayerbotAI* botAI) + static ActionNode* piercing_howl(PlayerbotAI* /*botAI*/) { return new ActionNode( "piercing howl", @@ -51,7 +51,7 @@ private: ); } - static ActionNode* mocking_blow(PlayerbotAI* botAI) + static ActionNode* mocking_blow(PlayerbotAI* /*botAI*/) { return new ActionNode( "mocking blow", @@ -61,7 +61,7 @@ private: ); } - static ActionNode* heroic_strike(PlayerbotAI* botAI) + static ActionNode* heroic_strike(PlayerbotAI* /*botAI*/) { return new ActionNode( "heroic strike", @@ -71,7 +71,7 @@ private: ); } - static ActionNode* enraged_regeneration(PlayerbotAI* botAI) + static ActionNode* enraged_regeneration(PlayerbotAI* /*botAI*/) { return new ActionNode( "enraged regeneration", @@ -81,7 +81,7 @@ private: ); } - static ActionNode* retaliation(PlayerbotAI* botAI) + static ActionNode* retaliation(PlayerbotAI* /*botAI*/) { return new ActionNode( "retaliation", @@ -91,7 +91,7 @@ private: ); } - static ActionNode* shattering_throw(PlayerbotAI* botAI) + static ActionNode* shattering_throw(PlayerbotAI* /*botAI*/) { return new ActionNode( "shattering throw", diff --git a/src/Ai/Class/Warrior/Strategy/FuryWarriorStrategy.cpp b/src/Ai/Class/Warrior/Strategy/FuryWarriorStrategy.cpp index 67e5cb461..24e05ffe9 100644 --- a/src/Ai/Class/Warrior/Strategy/FuryWarriorStrategy.cpp +++ b/src/Ai/Class/Warrior/Strategy/FuryWarriorStrategy.cpp @@ -18,7 +18,7 @@ public: } private: - static ActionNode* charge(PlayerbotAI* botAI) + static ActionNode* charge(PlayerbotAI* /*botAI*/) { return new ActionNode( "charge", @@ -28,7 +28,7 @@ private: ); } - static ActionNode* intercept(PlayerbotAI* botAI) + static ActionNode* intercept(PlayerbotAI* /*botAI*/) { return new ActionNode( "intercept", @@ -38,7 +38,7 @@ private: ); } - static ActionNode* piercing_howl(PlayerbotAI* botAI) + static ActionNode* piercing_howl(PlayerbotAI* /*botAI*/) { return new ActionNode( "piercing howl", @@ -48,7 +48,7 @@ private: ); } - static ActionNode* pummel(PlayerbotAI* botAI) + static ActionNode* pummel(PlayerbotAI* /*botAI*/) { return new ActionNode( "pummel", @@ -58,7 +58,7 @@ private: ); } - static ActionNode* enraged_regeneration(PlayerbotAI* botAI) + static ActionNode* enraged_regeneration(PlayerbotAI* /*botAI*/) { return new ActionNode( "enraged regeneration", diff --git a/src/Ai/Class/Warrior/Strategy/TankWarriorStrategy.cpp b/src/Ai/Class/Warrior/Strategy/TankWarriorStrategy.cpp index e6daa2646..f256f2093 100644 --- a/src/Ai/Class/Warrior/Strategy/TankWarriorStrategy.cpp +++ b/src/Ai/Class/Warrior/Strategy/TankWarriorStrategy.cpp @@ -24,7 +24,7 @@ public: } private: - static ActionNode* heroic_throw_taunt(PlayerbotAI* botAI) + static ActionNode* heroic_throw_taunt(PlayerbotAI* /*botAI*/) { return new ActionNode( "heroic throw", @@ -34,7 +34,7 @@ private: ); } - static ActionNode* heroic_throw_on_snare_target(PlayerbotAI* botAI) + static ActionNode* heroic_throw_on_snare_target(PlayerbotAI* /*botAI*/) { return new ActionNode( "heroic throw on snare target", @@ -44,7 +44,7 @@ private: ); } - static ActionNode* last_stand(PlayerbotAI* botAI) + static ActionNode* last_stand(PlayerbotAI* /*botAI*/) { return new ActionNode( "last stand", @@ -54,7 +54,7 @@ private: ); } - static ActionNode* devastate(PlayerbotAI* botAI) + static ActionNode* devastate(PlayerbotAI* /*botAI*/) { return new ActionNode( "devastate", @@ -64,7 +64,7 @@ private: ); } - static ActionNode* commanding_shout(PlayerbotAI* botAI) + static ActionNode* commanding_shout(PlayerbotAI* /*botAI*/) { return new ActionNode( "commanding shout", @@ -74,7 +74,7 @@ private: ); } - static ActionNode* sunder_armor(PlayerbotAI* botAI) + static ActionNode* sunder_armor(PlayerbotAI* /*botAI*/) { return new ActionNode( "sunder armor", @@ -84,7 +84,7 @@ private: ); } - static ActionNode* charge(PlayerbotAI* botAI) + static ActionNode* charge(PlayerbotAI* /*botAI*/) { return new ActionNode( "charge", @@ -94,7 +94,7 @@ private: ); } - static ActionNode* taunt(PlayerbotAI* botAI) + static ActionNode* taunt(PlayerbotAI* /*botAI*/) { return new ActionNode( "taunt", @@ -104,7 +104,7 @@ private: ); } - static ActionNode* vigilance(PlayerbotAI* botAI) + static ActionNode* vigilance(PlayerbotAI* /*botAI*/) { return new ActionNode( "vigilance", @@ -114,7 +114,7 @@ private: ); } - static ActionNode* enraged_regeneration(PlayerbotAI* botAI) + static ActionNode* enraged_regeneration(PlayerbotAI* /*botAI*/) { return new ActionNode( "enraged regeneration", diff --git a/src/Ai/Dungeon/PitOfSaron/Action/PitOfSaronActions.cpp b/src/Ai/Dungeon/PitOfSaron/Action/PitOfSaronActions.cpp index 27546e796..201a44199 100644 --- a/src/Ai/Dungeon/PitOfSaron/Action/PitOfSaronActions.cpp +++ b/src/Ai/Dungeon/PitOfSaron/Action/PitOfSaronActions.cpp @@ -134,7 +134,7 @@ bool IckAndKrickAction::PoisonNova(bool poisonNova, Unit* boss) return false; } -bool IckAndKrickAction::ExplosiveBarrage(bool explosiveBarrage, Unit* boss) +bool IckAndKrickAction::ExplosiveBarrage(bool /*explosiveBarrage*/, Unit* boss) { std::vector orbs; Unit* closestOrb = nullptr; diff --git a/src/Ai/Dungeon/PitOfSaron/Multiplier/PitOfSaronMultipliers.cpp b/src/Ai/Dungeon/PitOfSaron/Multiplier/PitOfSaronMultipliers.cpp index be36e480f..00de758c1 100644 --- a/src/Ai/Dungeon/PitOfSaron/Multiplier/PitOfSaronMultipliers.cpp +++ b/src/Ai/Dungeon/PitOfSaron/Multiplier/PitOfSaronMultipliers.cpp @@ -27,7 +27,7 @@ float IckAndKrickMultiplier::GetValue(Action* action) return 1.0f; } -float GarfrostMultiplier::GetValue(Action* action) +float GarfrostMultiplier::GetValue(Action* /*action*/) { Unit* boss = AI_VALUE2(Unit*, "find target", "garfrost"); if (!boss) diff --git a/src/Ai/Dungeon/TrialOfTheChampion/Strategy/TrialOfTheChampionStrategy.cpp b/src/Ai/Dungeon/TrialOfTheChampion/Strategy/TrialOfTheChampionStrategy.cpp index 323970d52..0912a912c 100644 --- a/src/Ai/Dungeon/TrialOfTheChampion/Strategy/TrialOfTheChampionStrategy.cpp +++ b/src/Ai/Dungeon/TrialOfTheChampion/Strategy/TrialOfTheChampionStrategy.cpp @@ -15,6 +15,6 @@ void WotlkDungeonToCStrategy::InitTriggers(std::vector &triggers) } -void WotlkDungeonToCStrategy::InitMultipliers(std::vector &multipliers) +void WotlkDungeonToCStrategy::InitMultipliers(std::vector &/*multipliers*/) { } diff --git a/src/Ai/Raid/GruulsLair/Multiplier/RaidGruulsLairMultipliers.cpp b/src/Ai/Raid/GruulsLair/Multiplier/RaidGruulsLairMultipliers.cpp index 6604fc525..a38f8a291 100644 --- a/src/Ai/Raid/GruulsLair/Multiplier/RaidGruulsLairMultipliers.cpp +++ b/src/Ai/Raid/GruulsLair/Multiplier/RaidGruulsLairMultipliers.cpp @@ -57,7 +57,7 @@ float HighKingMaulgarDisableArcaneShotOnKroshMultiplier::GetValue(Action* action float HighKingMaulgarDisableMageTankAOEMultiplier::GetValue(Action* action) { - if (IsKroshMageTank(botAI, bot) && + if (IsKroshMageTank(bot) && (dynamic_cast(action) || dynamic_cast(action) || dynamic_cast(action) || dynamic_cast(action) || dynamic_cast(action) || dynamic_cast(action))) diff --git a/src/Ai/Raid/GruulsLair/Trigger/RaidGruulsLairTriggers.cpp b/src/Ai/Raid/GruulsLair/Trigger/RaidGruulsLairTriggers.cpp index 4bc5efe99..3caadb384 100644 --- a/src/Ai/Raid/GruulsLair/Trigger/RaidGruulsLairTriggers.cpp +++ b/src/Ai/Raid/GruulsLair/Trigger/RaidGruulsLairTriggers.cpp @@ -31,14 +31,14 @@ bool HighKingMaulgarIsMageTankTrigger::IsActive() { Unit* krosh = AI_VALUE2(Unit*, "find target", "krosh firehand"); - return IsKroshMageTank(botAI, bot) && krosh; + return IsKroshMageTank(bot) && krosh; } bool HighKingMaulgarIsMoonkinTankTrigger::IsActive() { Unit* kiggler = AI_VALUE2(Unit*, "find target", "kiggler the crazed"); - return IsKigglerMoonkinTank(botAI, bot) && kiggler; + return IsKigglerMoonkinTank(bot) && kiggler; } bool HighKingMaulgarDeterminingKillOrderTrigger::IsActive() @@ -53,8 +53,8 @@ bool HighKingMaulgarDeterminingKillOrderTrigger::IsActive() !(botAI->IsMainTank(bot) && maulgar) && !(botAI->IsAssistTankOfIndex(bot, 0, false) && olm) && !(botAI->IsAssistTankOfIndex(bot, 1, false) && blindeye) && - !(IsKroshMageTank(botAI, bot) && krosh) && - !(IsKigglerMoonkinTank(botAI, bot) && kiggler); + !(IsKroshMageTank(bot) && krosh) && + !(IsKigglerMoonkinTank(bot) && kiggler); } bool HighKingMaulgarHealerInDangerTrigger::IsActive() diff --git a/src/Ai/Raid/GruulsLair/Util/RaidGruulsLairHelpers.cpp b/src/Ai/Raid/GruulsLair/Util/RaidGruulsLairHelpers.cpp index b29549b82..7195f0ebd 100644 --- a/src/Ai/Raid/GruulsLair/Util/RaidGruulsLairHelpers.cpp +++ b/src/Ai/Raid/GruulsLair/Util/RaidGruulsLairHelpers.cpp @@ -39,7 +39,7 @@ namespace GruulsLairHelpers return false; } - bool IsKroshMageTank(PlayerbotAI* botAI, Player* bot) + bool IsKroshMageTank(Player* bot) { Group* group = bot->GetGroup(); if (!group) @@ -79,7 +79,7 @@ namespace GruulsLairHelpers return highestHpMage == bot; } - bool IsKigglerMoonkinTank(PlayerbotAI* botAI, Player* bot) + bool IsKigglerMoonkinTank(Player* bot) { Group* group = bot->GetGroup(); if (!group) diff --git a/src/Ai/Raid/GruulsLair/Util/RaidGruulsLairHelpers.h b/src/Ai/Raid/GruulsLair/Util/RaidGruulsLairHelpers.h index 4615a9b7a..f9315565b 100644 --- a/src/Ai/Raid/GruulsLair/Util/RaidGruulsLairHelpers.h +++ b/src/Ai/Raid/GruulsLair/Util/RaidGruulsLairHelpers.h @@ -29,8 +29,8 @@ namespace GruulsLairHelpers constexpr uint32 GRUULS_LAIR_MAP_ID = 565; bool IsAnyOgreBossAlive(PlayerbotAI* botAI); - bool IsKroshMageTank(PlayerbotAI* botAI, Player* bot); - bool IsKigglerMoonkinTank(PlayerbotAI* botAI, Player* bot); + bool IsKroshMageTank(Player* bot); + bool IsKigglerMoonkinTank(Player* bot); bool IsPositionSafe(PlayerbotAI* botAI, Player* bot, Position pos); bool TryGetNewSafePosition(PlayerbotAI* botAI, Player* bot, Position& outPos); diff --git a/src/Ai/Raid/Icecrown/Action/RaidIccActions.cpp b/src/Ai/Raid/Icecrown/Action/RaidIccActions.cpp index 336bd45e2..0ae27ffab 100644 --- a/src/Ai/Raid/Icecrown/Action/RaidIccActions.cpp +++ b/src/Ai/Raid/Icecrown/Action/RaidIccActions.cpp @@ -1998,10 +1998,10 @@ bool IccRotfaceGroupPositionAction::PositionRangedAndHealers(Unit* boss,Unit *sm if (!isHeroic) return false; - return FindAndMoveFromClosestMember(boss, smallOoze); + return FindAndMoveFromClosestMember(smallOoze); } -bool IccRotfaceGroupPositionAction::FindAndMoveFromClosestMember(Unit* boss, Unit* smallOoze) +bool IccRotfaceGroupPositionAction::FindAndMoveFromClosestMember(Unit* smallOoze) { const GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs"); @@ -6925,7 +6925,7 @@ bool IccLichKingWinterAction::Execute(Event /*event*/) isVictim = true; // First priority: Get out of Defile if we're in one - if (!IsPositionSafeFromDefile(bot->GetPositionX(), bot->GetPositionY(), bot->GetPositionZ(), 3.0f)) + if (!IsPositionSafeFromDefile(bot->GetPositionX(), bot->GetPositionY(), 3.0f)) { // Find nearest safe position (use tank position as fallback) const Position* safePos = botAI->IsTank(bot) ? GetMainTankPosition() : GetMainTankRangedPosition(); @@ -7124,7 +7124,7 @@ const Position* IccLichKingWinterAction::GetMainTankRangedPosition() return &ICC_LK_FROSTR3_POSITION; } -bool IccLichKingWinterAction::IsPositionSafeFromDefile(float x, float y, float z, float minSafeDistance) +bool IccLichKingWinterAction::IsPositionSafeFromDefile(float x, float y, float minSafeDistance) { Unit* boss = AI_VALUE2(Unit*, "find target", "the lich king"); if (!boss) @@ -7190,7 +7190,7 @@ bool IccLichKingWinterAction::TryMoveToPosition(float targetX, float targetY, fl dy /= distance; // First check if direct path is safe - if (bot->IsWithinLOS(targetX, targetY, targetZ) && IsPositionSafeFromDefile(targetX, targetY, targetZ, 3.0f)) + if (bot->IsWithinLOS(targetX, targetY, targetZ) && IsPositionSafeFromDefile(targetX, targetY, 3.0f)) { if (isForced) botAI->Reset(); @@ -7221,7 +7221,7 @@ bool IccLichKingWinterAction::TryMoveToPosition(float targetX, float targetY, fl float testY = currentY + dy * attemptDistance + offsetY * direction; float testZ = targetZ; - if (bot->IsWithinLOS(testX, testY, testZ) && IsPositionSafeFromDefile(testX, testY, testZ, 3.0f)) + if (bot->IsWithinLOS(testX, testY, testZ) && IsPositionSafeFromDefile(testX, testY, 3.0f)) { if (isForced) botAI->Reset(); @@ -7271,7 +7271,7 @@ void IccLichKingWinterAction::HandleTankPositioning() const Position* targetPos = GetMainTankPosition(); // First check if current position is safe - if (!IsPositionSafeFromDefile(bot->GetPositionX(), bot->GetPositionY(), bot->GetPositionZ(), 3.0f)) + if (!IsPositionSafeFromDefile(bot->GetPositionX(), bot->GetPositionY(), 3.0f)) { // If in defile, prioritize getting out TryMoveToPosition(targetPos->GetPositionX(), targetPos->GetPositionY(), 840.857f, true); @@ -7295,7 +7295,7 @@ void IccLichKingWinterAction::HandleTankPositioning() } // Once in position, handle add management from tank position - HandleMainTankAddManagement(boss, targetPos); + HandleMainTankAddManagement(targetPos); } // ASSIST TANK: More flexible positioning based on add collection else if (botAI->IsAssistTank(bot)) @@ -7312,7 +7312,7 @@ void IccLichKingWinterAction::HandleTankPositioning() } // Handle assist tank add collection and positioning - HandleAssistTankAddManagement(boss, targetPos); + HandleAssistTankAddManagement(targetPos); } } @@ -7405,7 +7405,7 @@ void IccLichKingWinterAction::HandleRangedPositioning() const Position* targetPos = GetMainTankRangedPosition(); // First check if current position is safe - if (!IsPositionSafeFromDefile(bot->GetPositionX(), bot->GetPositionY(), bot->GetPositionZ(), 3.0f)) + if (!IsPositionSafeFromDefile(bot->GetPositionX(), bot->GetPositionY(), 3.0f)) { // If in defile, prioritize getting out TryMoveToPosition(targetPos->GetPositionX(), targetPos->GetPositionY(), 840.857f, true); @@ -7484,7 +7484,7 @@ void IccLichKingWinterAction::HandleRangedPositioning() } } -void IccLichKingWinterAction::HandleMainTankAddManagement(Unit* boss, const Position* tankPos) +void IccLichKingWinterAction::HandleMainTankAddManagement(const Position* tankPos) { if (!botAI->IsMainTank(bot)) return; @@ -7607,7 +7607,7 @@ void IccLichKingWinterAction::HandleMainTankAddManagement(Unit* boss, const Posi } } -void IccLichKingWinterAction::HandleAssistTankAddManagement(Unit* boss, const Position* tankPos) +void IccLichKingWinterAction::HandleAssistTankAddManagement(const Position* tankPos) { if (!botAI->IsAssistTank(bot)) return; @@ -7812,7 +7812,7 @@ bool IccLichKingAddsAction::Execute(Event /*event*/) return true; // Handle shambling horror interactions - HandleShamblingHorrors(boss, hasPlague); + HandleShamblingHorrors(); // Handle assist tank add management if (HandleAssistTankAddManagement(boss, diff)) @@ -8251,7 +8251,7 @@ bool IccLichKingAddsAction::HandleQuakeMechanics(Unit* boss) return false; } -void IccLichKingAddsAction::HandleShamblingHorrors(Unit* boss, bool hasPlague) +void IccLichKingAddsAction::HandleShamblingHorrors() { // Find closest shambling horror GuidVector npcs2 = AI_VALUE(GuidVector, "nearest hostile npcs"); diff --git a/src/Ai/Raid/Icecrown/Action/RaidIccActions.h b/src/Ai/Raid/Icecrown/Action/RaidIccActions.h index 9ac2a48a0..1d63a4e36 100644 --- a/src/Ai/Raid/Icecrown/Action/RaidIccActions.h +++ b/src/Ai/Raid/Icecrown/Action/RaidIccActions.h @@ -286,7 +286,7 @@ public: bool HandleOozeTargeting(); bool HandleOozeMemberPositioning(); bool PositionRangedAndHealers(Unit* boss,Unit* smallOoze); - bool FindAndMoveFromClosestMember(Unit* boss, Unit* smallOoze); + bool FindAndMoveFromClosestMember(Unit* smallOoze); }; class IccRotfaceMoveAwayFromExplosionAction : public MovementAction @@ -623,12 +623,12 @@ class IccLichKingWinterAction : public AttackAction void HandlePositionCorrection(); bool IsValidCollectibleAdd(Unit* unit); - bool IsPositionSafeFromDefile(float x, float y, float z, float minSafeDistance); + bool IsPositionSafeFromDefile(float x, float y, float minSafeDistance); void HandleTankPositioning(); void HandleMeleePositioning(); void HandleRangedPositioning(); - void HandleMainTankAddManagement(Unit* boss, const Position* tankPos); - void HandleAssistTankAddManagement(Unit* boss, const Position* tankPos); + void HandleMainTankAddManagement(const Position* tankPos); + void HandleAssistTankAddManagement(const Position* tankPos); private: const Position* GetMainTankPosition(); @@ -648,7 +648,7 @@ class IccLichKingAddsAction : public AttackAction void HandleHeroicNonTankPositioning(Difficulty diff, Unit* terenasMenethilHC); void HandleSpiritMarkingAndTargeting(Difficulty diff, Unit* terenasMenethilHC); bool HandleQuakeMechanics(Unit* boss); - void HandleShamblingHorrors(Unit* boss, bool hasPlague); + void HandleShamblingHorrors(); bool HandleAssistTankAddManagement(Unit* boss, Difficulty diff); void HandleMeleePositioning(Unit* boss, bool hasPlague, Difficulty diff); void HandleMainTankTargeting(Unit* boss, Difficulty diff); diff --git a/src/Ai/Raid/Icecrown/Trigger/RaidIccTriggers.cpp b/src/Ai/Raid/Icecrown/Trigger/RaidIccTriggers.cpp index 40ee354e2..bc304ec0c 100644 --- a/src/Ai/Raid/Icecrown/Trigger/RaidIccTriggers.cpp +++ b/src/Ai/Raid/Icecrown/Trigger/RaidIccTriggers.cpp @@ -559,7 +559,7 @@ bool IccBqlVampiricBiteTrigger::IsActive() bool IccValkyreSpearTrigger::IsActive() { // Check if there's a spear nearby - if (Creature* spear = bot->FindNearestCreature(NPC_SPEAR, 100.0f)) + if (bot->FindNearestCreature(NPC_SPEAR, 100.0f)) return true; return false; diff --git a/src/Ai/Raid/Karazhan/Action/RaidKarazhanActions.cpp b/src/Ai/Raid/Karazhan/Action/RaidKarazhanActions.cpp index 4e175f0f6..69ef73987 100644 --- a/src/Ai/Raid/Karazhan/Action/RaidKarazhanActions.cpp +++ b/src/Ai/Raid/Karazhan/Action/RaidKarazhanActions.cpp @@ -744,7 +744,7 @@ bool NetherspiteBlockBlueBeamAction::Execute(Event /*event*/) float candidateX = bx + dx * dist; float candidateY = by + dy * dist; float candidateZ = bz; - if (!IsSafePosition(candidateX, candidateY, candidateZ, voidZones, 4.0f)) + if (!IsSafePosition(candidateX, candidateY, voidZones, 4.0f)) continue; float distToIdeal = fabs(dist - idealDistance); @@ -836,7 +836,7 @@ bool NetherspiteBlockGreenBeamAction::Execute(Event /*event*/) float candidateX = bx + dx * dist; float candidateY = by + dy * dist; float candidateZ = bz; - if (!IsSafePosition(candidateX, candidateY, candidateZ, voidZones, 4.0f)) + if (!IsSafePosition(candidateX, candidateY, voidZones, 4.0f)) continue; float distToIdeal = fabs(dist - 18.0f); @@ -873,7 +873,7 @@ bool NetherspiteAvoidBeamAndVoidZoneAction::Execute(Event /*event*/) std::vector voidZones = GetAllVoidZones(botAI, bot); bool nearVoidZone = !IsSafePosition(bot->GetPositionX(), bot->GetPositionY(), - bot->GetPositionZ(), voidZones, 4.0f); + voidZones, 4.0f); std::vector beams; Unit* redPortal = bot->FindNearestCreature(NPC_RED_PORTAL, 150.0f); @@ -922,7 +922,7 @@ bool NetherspiteAvoidBeamAndVoidZoneAction::Execute(Event /*event*/) float cy = botY + std::sin(angle) * dist; float cz = netherspiteZ; - if (!IsSafePosition(cx, cy, cz, voidZones, 4.0f) || + if (!IsSafePosition(cx, cy, voidZones, 4.0f) || !IsAwayFromBeams(cx, cy, beams, netherspite)) continue; diff --git a/src/Ai/Raid/Karazhan/Util/RaidKarazhanHelpers.cpp b/src/Ai/Raid/Karazhan/Util/RaidKarazhanHelpers.cpp index 513920e11..82ecbdb7b 100644 --- a/src/Ai/Raid/Karazhan/Util/RaidKarazhanHelpers.cpp +++ b/src/Ai/Raid/Karazhan/Util/RaidKarazhanHelpers.cpp @@ -272,7 +272,7 @@ namespace KarazhanHelpers return voidZones; } - bool IsSafePosition(float x, float y, float z, const std::vector& hazards, float hazardRadius) + bool IsSafePosition(float x, float y, const std::vector& hazards, float hazardRadius) { for (Unit* hazard : hazards) { @@ -351,7 +351,7 @@ namespace KarazhanHelpers destX, destY, destZ, true)) continue; - if (!IsSafePosition(destX, destY, destZ, hazards, safeDistance)) + if (!IsSafePosition(destX, destY, hazards, safeDistance)) continue; if (requireSafePath) diff --git a/src/Ai/Raid/Karazhan/Util/RaidKarazhanHelpers.h b/src/Ai/Raid/Karazhan/Util/RaidKarazhanHelpers.h index 885af774d..055a93a58 100644 --- a/src/Ai/Raid/Karazhan/Util/RaidKarazhanHelpers.h +++ b/src/Ai/Raid/Karazhan/Util/RaidKarazhanHelpers.h @@ -116,7 +116,7 @@ namespace KarazhanHelpers std::vector GetGreenBlockers(PlayerbotAI* botAI, Player* bot); std::tuple GetCurrentBeamBlockers(PlayerbotAI* botAI, Player* bot); std::vector GetAllVoidZones(PlayerbotAI *botAI, Player* bot); - bool IsSafePosition (float x, float y, float z, const std::vector& hazards, float hazardRadius); + bool IsSafePosition (float x, float y, const std::vector& hazards, float hazardRadius); std::vector GetSpawnedInfernals(PlayerbotAI* botAI); bool IsStraightPathSafe( const Position& start, const Position& target, diff --git a/src/Ai/Raid/Magtheridon/Action/RaidMagtheridonActions.cpp b/src/Ai/Raid/Magtheridon/Action/RaidMagtheridonActions.cpp index ffe446965..024ffe4d6 100644 --- a/src/Ai/Raid/Magtheridon/Action/RaidMagtheridonActions.cpp +++ b/src/Ai/Raid/Magtheridon/Action/RaidMagtheridonActions.cpp @@ -499,7 +499,7 @@ bool MagtheridonUseManticronCubeAction::Execute(Event /*event*/) return false; // Release cubes after Blast Nova is interrupted - if (HandleCubeRelease(magtheridon, cube)) + if (HandleCubeRelease(magtheridon)) return true; // Check if cube logic should be active (49+ second rule) @@ -520,7 +520,7 @@ bool MagtheridonUseManticronCubeAction::Execute(Event /*event*/) return false; } -bool MagtheridonUseManticronCubeAction::HandleCubeRelease(Unit* magtheridon, GameObject* cube) +bool MagtheridonUseManticronCubeAction::HandleCubeRelease(Unit* magtheridon) { if (bot->HasAura(SPELL_SHADOW_GRASP) && !(magtheridon->HasUnitState(UNIT_STATE_CASTING) && diff --git a/src/Ai/Raid/Magtheridon/Action/RaidMagtheridonActions.h b/src/Ai/Raid/Magtheridon/Action/RaidMagtheridonActions.h index d47d06459..7abc493c2 100644 --- a/src/Ai/Raid/Magtheridon/Action/RaidMagtheridonActions.h +++ b/src/Ai/Raid/Magtheridon/Action/RaidMagtheridonActions.h @@ -81,7 +81,7 @@ public: bool Execute(Event event) override; private: - bool HandleCubeRelease(Unit* magtheridon, GameObject* cube); + bool HandleCubeRelease(Unit* magtheridon); bool ShouldActivateCubeLogic(Unit* magtheridon); bool HandleWaitingPhase(const MagtheridonHelpers::CubeInfo& cubeInfo); bool HandleCubeInteraction(const MagtheridonHelpers::CubeInfo& cubeInfo, GameObject* cube); diff --git a/src/Ai/Raid/Magtheridon/Util/RaidMagtheridonHelpers.cpp b/src/Ai/Raid/Magtheridon/Util/RaidMagtheridonHelpers.cpp index 344dda5ba..e51ad24e5 100644 --- a/src/Ai/Raid/Magtheridon/Util/RaidMagtheridonHelpers.cpp +++ b/src/Ai/Raid/Magtheridon/Util/RaidMagtheridonHelpers.cpp @@ -118,7 +118,7 @@ namespace MagtheridonHelpers std::unordered_map spreadWaitTimer; std::unordered_map dpsWaitTimer; - bool IsSafeFromMagtheridonHazards(PlayerbotAI* botAI, Player* bot, float x, float y, float z) + bool IsSafeFromMagtheridonHazards(PlayerbotAI* botAI, Player* /*bot*/, float x, float y, float /*z*/) { // Debris std::vector debrisHazards; diff --git a/src/Ai/Raid/Onyxia/Strategy/RaidOnyxiaStrategy.cpp b/src/Ai/Raid/Onyxia/Strategy/RaidOnyxiaStrategy.cpp index b1217f59e..bb61bc004 100644 --- a/src/Ai/Raid/Onyxia/Strategy/RaidOnyxiaStrategy.cpp +++ b/src/Ai/Raid/Onyxia/Strategy/RaidOnyxiaStrategy.cpp @@ -24,7 +24,7 @@ void RaidOnyxiaStrategy::InitTriggers(std::vector& triggers) "ony whelps spawn", { NextAction("ony kill whelps", ACTION_RAID + 1) })); } -void RaidOnyxiaStrategy::InitMultipliers(std::vector& multipliers) +void RaidOnyxiaStrategy::InitMultipliers(std::vector& /*multipliers*/) { // Empty for now } diff --git a/src/Ai/Raid/SerpentshrineCavern/Action/RaidSSCActions.cpp b/src/Ai/Raid/SerpentshrineCavern/Action/RaidSSCActions.cpp index 0b31a1c13..68dbc8b62 100644 --- a/src/Ai/Raid/SerpentshrineCavern/Action/RaidSSCActions.cpp +++ b/src/Ai/Raid/SerpentshrineCavern/Action/RaidSSCActions.cpp @@ -1466,16 +1466,16 @@ bool MorogrimTidewalkerMoveBossToTankPositionAction::Execute(Event /*event*/) if (tidewalker->GetVictim() == bot && bot->IsWithinMeleeRange(tidewalker)) { if (tidewalker->GetHealthPct() > 26.0f) - return MoveToPhase1TankPosition(tidewalker); + return MoveToPhase1TankPosition(); else - return MoveToPhase2TankPosition(tidewalker); + return MoveToPhase2TankPosition(); } return false; } // Phase 1: tank position is up against the Northeast pillar -bool MorogrimTidewalkerMoveBossToTankPositionAction::MoveToPhase1TankPosition(Unit* tidewalker) +bool MorogrimTidewalkerMoveBossToTankPositionAction::MoveToPhase1TankPosition() { const Position& phase1 = TIDEWALKER_PHASE_1_TANK_POSITION; float distToPhase1 = bot->GetExactDist2d(phase1.GetPositionX(), phase1.GetPositionY()); @@ -1495,7 +1495,7 @@ bool MorogrimTidewalkerMoveBossToTankPositionAction::MoveToPhase1TankPosition(Un } // Phase 2: move in two steps to get around the pillar and back up into the Northeast corner -bool MorogrimTidewalkerMoveBossToTankPositionAction::MoveToPhase2TankPosition(Unit* tidewalker) +bool MorogrimTidewalkerMoveBossToTankPositionAction::MoveToPhase2TankPosition() { const Position& phase2 = TIDEWALKER_PHASE_2_TANK_POSITION; const Position& transition = TIDEWALKER_PHASE_TRANSITION_WAYPOINT; @@ -2151,7 +2151,7 @@ bool LadyVashjPassTheTaintedCoreAction::Execute(Event /*event*/) { // Passer order: HealAssistantOfIndex 0, 1, 2, then RangedDpsAssistantOfIndex 0 if (bot == firstCorePasser && - LineUpFirstCorePasser(designatedLooter, closestTrigger)) + LineUpFirstCorePasser(designatedLooter)) { return true; } @@ -2176,7 +2176,7 @@ bool LadyVashjPassTheTaintedCoreAction::Execute(Event /*event*/) // Designated core looter logic // Applicable only if cheat mode is on and thus looter is a bot if (bot == designatedLooter && - IsFirstCorePasserInPosition(designatedLooter, firstCorePasser, closestTrigger)) + IsFirstCorePasserInPosition(firstCorePasser)) { const time_t now = std::time(nullptr); auto it = lastImbueAttempt.find(instanceId); @@ -2192,7 +2192,7 @@ bool LadyVashjPassTheTaintedCoreAction::Execute(Event /*event*/) // First core passer: receive core from looter at the top of the stairs, // pass to second core passer else if (bot == firstCorePasser && - IsSecondCorePasserInPosition(firstCorePasser, secondCorePasser, closestTrigger)) + IsSecondCorePasserInPosition(secondCorePasser)) { const time_t now = std::time(nullptr); auto it = lastImbueAttempt.find(instanceId); @@ -2209,7 +2209,7 @@ bool LadyVashjPassTheTaintedCoreAction::Execute(Event /*event*/) // of the first passer, move to the generator; otherwise, move as close as // possible to the generator while staying in passing range else if (bot == secondCorePasser && !UseCoreOnNearestGenerator(instanceId) && - IsThirdCorePasserInPosition(secondCorePasser, thirdCorePasser, closestTrigger)) + IsThirdCorePasserInPosition(thirdCorePasser)) { const time_t now = std::time(nullptr); auto it = lastImbueAttempt.find(instanceId); @@ -2226,7 +2226,7 @@ bool LadyVashjPassTheTaintedCoreAction::Execute(Event /*event*/) // of the second passer, move to the generator; otherwise, move as close as // possible to the generator while staying in passing range else if (bot == thirdCorePasser && !UseCoreOnNearestGenerator(instanceId) && - IsFourthCorePasserInPosition(thirdCorePasser, fourthCorePasser, closestTrigger)) + IsFourthCorePasserInPosition(fourthCorePasser)) { const time_t now = std::time(nullptr); auto it = lastImbueAttempt.find(instanceId); @@ -2249,7 +2249,7 @@ bool LadyVashjPassTheTaintedCoreAction::Execute(Event /*event*/) } bool LadyVashjPassTheTaintedCoreAction::LineUpFirstCorePasser( - Player* designatedLooter, Unit* closestTrigger) + Player* designatedLooter) { const float centerX = VASHJ_PLATFORM_CENTER_POSITION.GetPositionX(); const float centerY = VASHJ_PLATFORM_CENTER_POSITION.GetPositionY(); @@ -2288,8 +2288,6 @@ bool LadyVashjPassTheTaintedCoreAction::LineUpSecondCorePasser( if (itFirst == intendedLineup.end()) return false; - const Position& firstLineup = itFirst->second; - auto itSecond = intendedLineup.find(bot->GetGUID()); if (itSecond == intendedLineup.end()) { @@ -2343,9 +2341,9 @@ bool LadyVashjPassTheTaintedCoreAction::LineUpThirdCorePasser( Player* secondCorePasser, Unit* closestTrigger) { bool needThirdPasser = - (IsFirstCorePasserInPosition(designatedLooter, firstCorePasser, closestTrigger) && + (IsFirstCorePasserInPosition(firstCorePasser) && firstCorePasser->GetExactDist2d(closestTrigger) > 42.0f) || - (IsSecondCorePasserInPosition(firstCorePasser, secondCorePasser, closestTrigger) && + (IsSecondCorePasserInPosition(secondCorePasser) && secondCorePasser->GetExactDist2d(closestTrigger) > 4.0f); if (!needThirdPasser) @@ -2408,9 +2406,9 @@ bool LadyVashjPassTheTaintedCoreAction::LineUpFourthCorePasser( Player* thirdCorePasser, Unit* closestTrigger) { bool needFourthPasser = - (IsSecondCorePasserInPosition(firstCorePasser, secondCorePasser, closestTrigger) && + (IsSecondCorePasserInPosition(secondCorePasser) && secondCorePasser->GetExactDist2d(closestTrigger) > 42.0f) || - (IsThirdCorePasserInPosition(secondCorePasser, thirdCorePasser, closestTrigger) && + (IsThirdCorePasserInPosition(thirdCorePasser) && thirdCorePasser->GetExactDist2d(closestTrigger) > 4.0f); if (!needFourthPasser) @@ -2460,8 +2458,7 @@ bool LadyVashjPassTheTaintedCoreAction::LineUpFourthCorePasser( // The next four functions check if the respective passer is <= 2 yards of their intended // position and are used to determine when the prior bot in the chain can pass the core -bool LadyVashjPassTheTaintedCoreAction::IsFirstCorePasserInPosition( - Player* designatedLooter, Player* firstCorePasser, Unit* closestTrigger) +bool LadyVashjPassTheTaintedCoreAction::IsFirstCorePasserInPosition(Player* firstCorePasser) { auto itSnap = intendedLineup.find(firstCorePasser->GetGUID()); if (itSnap != intendedLineup.end()) @@ -2474,8 +2471,7 @@ bool LadyVashjPassTheTaintedCoreAction::IsFirstCorePasserInPosition( return false; } -bool LadyVashjPassTheTaintedCoreAction::IsSecondCorePasserInPosition( - Player* firstCorePasser, Player* secondCorePasser, Unit* closestTrigger) +bool LadyVashjPassTheTaintedCoreAction::IsSecondCorePasserInPosition(Player* secondCorePasser) { auto itSnap = intendedLineup.find(secondCorePasser->GetGUID()); if (itSnap != intendedLineup.end()) @@ -2488,8 +2484,7 @@ bool LadyVashjPassTheTaintedCoreAction::IsSecondCorePasserInPosition( return false; } -bool LadyVashjPassTheTaintedCoreAction::IsThirdCorePasserInPosition( - Player* secondCorePasser, Player* thirdCorePasser, Unit* closestTrigger) +bool LadyVashjPassTheTaintedCoreAction::IsThirdCorePasserInPosition(Player* thirdCorePasser) { auto itSnap = intendedLineup.find(thirdCorePasser->GetGUID()); if (itSnap != intendedLineup.end()) @@ -2502,8 +2497,7 @@ bool LadyVashjPassTheTaintedCoreAction::IsThirdCorePasserInPosition( return false; } -bool LadyVashjPassTheTaintedCoreAction::IsFourthCorePasserInPosition( - Player* thirdCorePasser, Player* fourthCorePasser, Unit* closestTrigger) +bool LadyVashjPassTheTaintedCoreAction::IsFourthCorePasserInPosition(Player* fourthCorePasser) { auto itSnap = intendedLineup.find(fourthCorePasser->GetGUID()); if (itSnap != intendedLineup.end()) diff --git a/src/Ai/Raid/SerpentshrineCavern/Action/RaidSSCActions.h b/src/Ai/Raid/SerpentshrineCavern/Action/RaidSSCActions.h index 08ad4c48a..9443354c4 100644 --- a/src/Ai/Raid/SerpentshrineCavern/Action/RaidSSCActions.h +++ b/src/Ai/Raid/SerpentshrineCavern/Action/RaidSSCActions.h @@ -312,8 +312,8 @@ public: bool Execute(Event event) override; private: - bool MoveToPhase1TankPosition(Unit* tidewalker); - bool MoveToPhase2TankPosition(Unit* tidewalker); + bool MoveToPhase1TankPosition(); + bool MoveToPhase2TankPosition(); }; class MorogrimTidewalkerPhase2RepositionRangedAction : public MovementAction @@ -414,14 +414,14 @@ public: bool Execute(Event event) override; private: - bool LineUpFirstCorePasser(Player* designatedLooter, Unit* closestTrigger); + bool LineUpFirstCorePasser(Player* designatedLooter); bool LineUpSecondCorePasser(Player* firstCorePasser, Unit* closestTrigger); bool LineUpThirdCorePasser(Player* designatedLooter, Player* firstCorePasser, Player* secondCorePasser, Unit* closestTrigger); bool LineUpFourthCorePasser(Player* firstCorePasser, Player* secondCorePasser, Player* thirdCorePasser, Unit* closestTrigger); - bool IsFirstCorePasserInPosition(Player* designatedLooter, Player* firstCorePasser, Unit* closestTrigger); - bool IsSecondCorePasserInPosition(Player* firstCorePasser, Player* secondCorePasser, Unit* closestTrigger); - bool IsThirdCorePasserInPosition(Player* secondCorePasser, Player* thirdCorePasser, Unit* closestTrigger); - bool IsFourthCorePasserInPosition(Player* thirdCorePasser, Player* fourthCorePasser, Unit* closestTrigger); + bool IsFirstCorePasserInPosition(Player* firstCorePasser); + bool IsSecondCorePasserInPosition(Player* secondCorePasser); + bool IsThirdCorePasserInPosition(Player* thirdCorePasser); + bool IsFourthCorePasserInPosition(Player* fourthCorePasser); void ScheduleTransferCoreAfterImbue(PlayerbotAI* botAI, Player* giver, Player* receiver); bool UseCoreOnNearestGenerator(const uint32 instanceId); }; diff --git a/src/Ai/Raid/SerpentshrineCavern/Multiplier/RaidSSCMultipliers.cpp b/src/Ai/Raid/SerpentshrineCavern/Multiplier/RaidSSCMultipliers.cpp index c841c7dcb..f43ef4667 100644 --- a/src/Ai/Raid/SerpentshrineCavern/Multiplier/RaidSSCMultipliers.cpp +++ b/src/Ai/Raid/SerpentshrineCavern/Multiplier/RaidSSCMultipliers.cpp @@ -690,13 +690,11 @@ float LadyVashjCorePassersPrioritizePositioningMultiplier::GetValue(Action* acti auto coreHandlers = GetCoreHandlers(botAI, bot); bool isCoreHandler = false; - int myIndex = -1; for (int i = 0; i < static_cast(coreHandlers.size()); ++i) { if (coreHandlers[i] && coreHandlers[i] == bot) { isCoreHandler = true; - myIndex = i; } } if (!isCoreHandler) diff --git a/src/Ai/Raid/TempestKeep/Action/RaidTempestKeepActions.cpp b/src/Ai/Raid/TempestKeep/Action/RaidTempestKeepActions.cpp index edcc7ad58..c31a5e7ad 100644 --- a/src/Ai/Raid/TempestKeep/Action/RaidTempestKeepActions.cpp +++ b/src/Ai/Raid/TempestKeep/Action/RaidTempestKeepActions.cpp @@ -213,7 +213,7 @@ bool AlarAssistTanksPickUpEmbersAction::Execute(Event /*event*/) if (!isAlarInPhase2[alar->GetMap()->GetInstanceId()]) return HandlePhase1Embers(alar); else - return HandlePhase2Embers(alar); + return HandlePhase2Embers(); } // Embers will be tanked by only the second assist tank in Phase 1 @@ -275,7 +275,7 @@ bool AlarAssistTanksPickUpEmbersAction::HandlePhase1Embers(Unit* alar) // One Ember will be tanked by the second assist tank in Phase 2, and the other by // the main tank or first assist tank (whichever is not tanking Al'ar) -bool AlarAssistTanksPickUpEmbersAction::HandlePhase2Embers(Unit* alar) +bool AlarAssistTanksPickUpEmbersAction::HandlePhase2Embers() { auto [firstEmber, secondEmber] = GetFirstTwoEmbersOfAlar(botAI); diff --git a/src/Ai/Raid/TempestKeep/Action/RaidTempestKeepActions.h b/src/Ai/Raid/TempestKeep/Action/RaidTempestKeepActions.h index 8b021304e..41b087e3c 100644 --- a/src/Ai/Raid/TempestKeep/Action/RaidTempestKeepActions.h +++ b/src/Ai/Raid/TempestKeep/Action/RaidTempestKeepActions.h @@ -66,7 +66,7 @@ public: private: bool HandlePhase1Embers(Unit* alar); - bool HandlePhase2Embers(Unit* alar); + bool HandlePhase2Embers(); }; class AlarRangedDpsPrioritizeEmbersAction : public AttackAction diff --git a/src/Ai/Raid/Ulduar/Action/RaidUlduarActions.cpp b/src/Ai/Raid/Ulduar/Action/RaidUlduarActions.cpp index 798b77904..217ab2c06 100644 --- a/src/Ai/Raid/Ulduar/Action/RaidUlduarActions.cpp +++ b/src/Ai/Raid/Ulduar/Action/RaidUlduarActions.cpp @@ -2332,7 +2332,6 @@ bool MimironRocketStrikeAction::isUseful() bool MimironRocketStrikeAction::Execute(Event /*event*/) { - Unit* leviathanMkII = nullptr; Unit* vx001 = nullptr; Unit* aerialCommandUnit = nullptr; @@ -2344,9 +2343,7 @@ bool MimironRocketStrikeAction::Execute(Event /*event*/) if (!target || !target->IsAlive()) continue; - if (target->GetEntry() == NPC_LEVIATHAN_MKII) - leviathanMkII = target; - else if (target->GetEntry() == NPC_VX001) + if (target->GetEntry() == NPC_VX001) vx001 = target; else if (target->GetEntry() == NPC_AERIAL_COMMAND_UNIT) aerialCommandUnit = target; diff --git a/src/Ai/Raid/ZulAman/Multiplier/RaidZulAmanMultipliers.cpp b/src/Ai/Raid/ZulAman/Multiplier/RaidZulAmanMultipliers.cpp index e7d16920f..b727681a4 100644 --- a/src/Ai/Raid/ZulAman/Multiplier/RaidZulAmanMultipliers.cpp +++ b/src/Ai/Raid/ZulAman/Multiplier/RaidZulAmanMultipliers.cpp @@ -157,7 +157,7 @@ float JanalaiStayAwayFromFireBombsMultiplier::GetValue(Action* action) if (!AI_VALUE2(Unit*, "find target", "jan'alai")) return 1.0f; - if (!HasFireBombNearby(botAI, bot)) + if (!HasFireBombNearby(bot)) return 1.0f; if (dynamic_cast(action) || diff --git a/src/Ai/Raid/ZulAman/Trigger/RaidZulAmanTriggers.cpp b/src/Ai/Raid/ZulAman/Trigger/RaidZulAmanTriggers.cpp index ad338a5a7..22b072702 100644 --- a/src/Ai/Raid/ZulAman/Trigger/RaidZulAmanTriggers.cpp +++ b/src/Ai/Raid/ZulAman/Trigger/RaidZulAmanTriggers.cpp @@ -108,7 +108,7 @@ bool JanalaiBossEngagedByTanksTrigger::IsActive() !AI_VALUE2(Unit*, "find target", "jan'alai")) return false; - return !HasFireBombNearby(botAI, bot); + return !HasFireBombNearby(bot); } bool JanalaiBossCastsFlameBreathTrigger::IsActive() @@ -118,13 +118,13 @@ bool JanalaiBossCastsFlameBreathTrigger::IsActive() AI_VALUE2(Unit*, "find target", "amani dragonhawk hatchling")) return false; - return !HasFireBombNearby(botAI, bot); + return !HasFireBombNearby(bot); } bool JanalaiBossSummoningFireBombsTrigger::IsActive() { return AI_VALUE2(Unit*, "find target", "jan'alai") && - HasFireBombNearby(botAI, bot); + HasFireBombNearby(bot); } bool JanalaiAmanishiHatchersSpawnedTrigger::IsActive() diff --git a/src/Ai/Raid/ZulAman/Util/RaidZulAmanHelpers.cpp b/src/Ai/Raid/ZulAman/Util/RaidZulAmanHelpers.cpp index 77c268817..eeff879a4 100644 --- a/src/Ai/Raid/ZulAman/Util/RaidZulAmanHelpers.cpp +++ b/src/Ai/Raid/ZulAman/Util/RaidZulAmanHelpers.cpp @@ -143,7 +143,7 @@ namespace ZulAmanHelpers // Jan'alai const Position JANALAI_TANK_POSITION = { -33.873f, 1149.571f, 19.146f }; - bool HasFireBombNearby(PlayerbotAI* botAI, Player* bot) + bool HasFireBombNearby(Player* bot) { constexpr float searchRadius = 30.0f; std::list creatureList; diff --git a/src/Ai/Raid/ZulAman/Util/RaidZulAmanHelpers.h b/src/Ai/Raid/ZulAman/Util/RaidZulAmanHelpers.h index 4c27f0238..5da447a7e 100644 --- a/src/Ai/Raid/ZulAman/Util/RaidZulAmanHelpers.h +++ b/src/Ai/Raid/ZulAman/Util/RaidZulAmanHelpers.h @@ -97,7 +97,7 @@ namespace ZulAmanHelpers // Jan'alai extern const Position JANALAI_TANK_POSITION; - bool HasFireBombNearby(PlayerbotAI* botAI, Player* bot); + bool HasFireBombNearby(Player* bot); std::pair GetAmanishiHatcherPair(PlayerbotAI* botAI); // Halazzi diff --git a/src/Bot/Engine/Engine.cpp b/src/Bot/Engine/Engine.cpp index 3131f7514..90a90fdb9 100644 --- a/src/Bot/Engine/Engine.cpp +++ b/src/Bot/Engine/Engine.cpp @@ -138,7 +138,7 @@ void Engine::Init() } } -bool Engine::DoNextAction(Unit* unit, uint32 depth, bool minimal) +bool Engine::DoNextAction(Unit* /*unit*/, uint32 /*depth*/, bool minimal) { LogAction("--- AI Tick ---"); diff --git a/src/Bot/Factory/PlayerbotFactory.cpp b/src/Bot/Factory/PlayerbotFactory.cpp index 9dfae8987..e7021e372 100644 --- a/src/Bot/Factory/PlayerbotFactory.cpp +++ b/src/Bot/Factory/PlayerbotFactory.cpp @@ -2230,8 +2230,6 @@ void PlayerbotFactory::InitEquipment(bool incremental, bool second_chance) if (!CanEquipUnseenItem(slot, dest, bestItemForSlot)) continue; - Item* newItem = bot->EquipNewItem(dest, bestItemForSlot, true); - bot->EquipNewItem(dest, bestItemForSlot, true); bot->AutoUnequipOffhandIfNeed(); } @@ -2393,7 +2391,7 @@ void PlayerbotFactory::InitBags(bool destroyOld) if (old_bag) continue; - Item* newItem = bot->EquipNewItem(dest, newItemId, true); + bot->EquipNewItem(dest, newItemId, true); // if (newItem) // { // newItem->AddToWorld(); @@ -4729,7 +4727,7 @@ void PlayerbotFactory::ApplyEnchantTemplate(uint8 spec) // const SpellItemEnchantmentEntry* a = sSpellItemEnchantmentStore.LookupEntry(1); } -void PlayerbotFactory::ApplyEnchantAndGemsNew(bool destroyOld) +void PlayerbotFactory::ApplyEnchantAndGemsNew(bool /*destroyOld*/) { //int32 bestGemEnchantId[4] = {-1, -1, -1, -1}; // 1, 2, 4, 8 color //not used, line marked for removal. //float bestGemScore[4] = {0, 0, 0, 0}; //not used, line marked for removal. diff --git a/src/Bot/PlayerbotAI.cpp b/src/Bot/PlayerbotAI.cpp index 25c93676f..98175a1dc 100644 --- a/src/Bot/PlayerbotAI.cpp +++ b/src/Bot/PlayerbotAI.cpp @@ -491,7 +491,7 @@ void PlayerbotAI::UpdateAIInternal([[maybe_unused]] uint32 elapsed, bool minimal continue; } - ChatReplyAction::ChatReplyDo(bot, it->m_type, it->m_guid1, it->m_guid2, it->m_msg, it->m_chanName, it->m_name); + ChatReplyAction::ChatReplyDo(bot, it->m_type, it->m_guid1, it->m_msg, it->m_chanName, it->m_name); it = chatReplies.erase(it); } @@ -1811,7 +1811,7 @@ Strategy* PlayerbotAI::GetStrategy(std::string const name, BotState type) return engines[type] ? engines[type]->GetStrategy(name) : nullptr; } -void PlayerbotAI::ResetStrategies(bool load) +void PlayerbotAI::ResetStrategies(bool /*load*/) { for (uint8 i = 0; i < BOT_STATE_MAX; i++) engines[i]->removeAllStrategies(); diff --git a/src/Bot/PlayerbotMgr.cpp b/src/Bot/PlayerbotMgr.cpp index 8327e2f36..68eb2fd1e 100644 --- a/src/Bot/PlayerbotMgr.cpp +++ b/src/Bot/PlayerbotMgr.cpp @@ -1667,7 +1667,7 @@ void PlayerbotMgr::TellError(std::string const botName, std::string const text) errors[text] = names; } -void PlayerbotMgr::CheckTellErrors(uint32 elapsed) +void PlayerbotMgr::CheckTellErrors(uint32 /*elapsed*/) { time_t now = time(nullptr); if ((now - lastErrorTell) < sPlayerbotAIConfig.errorDelay / 1000) diff --git a/src/Bot/RandomPlayerbotMgr.cpp b/src/Bot/RandomPlayerbotMgr.cpp index ee06c58f8..9e9150989 100644 --- a/src/Bot/RandomPlayerbotMgr.cpp +++ b/src/Bot/RandomPlayerbotMgr.cpp @@ -278,7 +278,7 @@ void RandomPlayerbotMgr::LogPlayerLocation() } } -void RandomPlayerbotMgr::UpdateAIInternal(uint32 elapsed, bool /*minimal*/) +void RandomPlayerbotMgr::UpdateAIInternal(uint32 /*elapsed*/, bool /*minimal*/) { if (totalPmo) totalPmo->finish(); diff --git a/src/Db/PlayerbotRepository.cpp b/src/Db/PlayerbotRepository.cpp index 731534edd..115a4e95f 100644 --- a/src/Db/PlayerbotRepository.cpp +++ b/src/Db/PlayerbotRepository.cpp @@ -65,7 +65,7 @@ void PlayerbotRepository::Save(PlayerbotAI* botAI) SaveValue(guid, "dead", FormatStrategies("dead", botAI->GetStrategies(BOT_STATE_DEAD))); } -std::string const PlayerbotRepository::FormatStrategies(std::string const type, std::vector strategies) +std::string const PlayerbotRepository::FormatStrategies(std::string const /*type*/, std::vector strategies) { std::ostringstream out; for (std::vector::iterator i = strategies.begin(); i != strategies.end(); ++i) diff --git a/src/Mgr/Item/ItemVisitors.h b/src/Mgr/Item/ItemVisitors.h index 930aa1f4a..dd581ddba 100644 --- a/src/Mgr/Item/ItemVisitors.h +++ b/src/Mgr/Item/ItemVisitors.h @@ -325,9 +325,6 @@ public: FindMountVisitor(Player* bot) : FindUsableItemVisitor(bot) {} bool Accept(ItemTemplate const* proto) override; - -private: - uint32 effectId; }; class FindPetVisitor : public FindUsableItemVisitor diff --git a/src/Mgr/Item/RandomItemMgr.cpp b/src/Mgr/Item/RandomItemMgr.cpp index d2a279727..e08f2c385 100644 --- a/src/Mgr/Item/RandomItemMgr.cpp +++ b/src/Mgr/Item/RandomItemMgr.cpp @@ -176,7 +176,7 @@ RandomItemMgr::~RandomItemMgr() predicates.clear(); } -bool RandomItemMgr::HandleConsoleCommand(ChatHandler* handler, char const* args) +bool RandomItemMgr::HandleConsoleCommand(ChatHandler* /*handler*/, char const* args) { if (!args || !*args) { @@ -1823,7 +1823,7 @@ uint32 RandomItemMgr::GetUpgrade(Player* player, std::string spec, uint8 slot, u } std::vector RandomItemMgr::GetUpgradeList(Player* player, std::string spec, uint8 slot, uint32 quality, - uint32 itemId, uint32 amount) + uint32 itemId, uint32 /*amount*/) { std::vector listItems; if (!player) diff --git a/src/Mgr/Item/StatsWeightCalculator.cpp b/src/Mgr/Item/StatsWeightCalculator.cpp index 361e4a5f7..b3b593606 100644 --- a/src/Mgr/Item/StatsWeightCalculator.cpp +++ b/src/Mgr/Item/StatsWeightCalculator.cpp @@ -517,7 +517,7 @@ void StatsWeightCalculator::CalculateItemSetMod(Player* player, ItemTemplate con weight_ *= multiplier; } -void StatsWeightCalculator::CalculateSocketBonus(Player* player, ItemTemplate const* proto) +void StatsWeightCalculator::CalculateSocketBonus(Player* /*player*/, ItemTemplate const* proto) { uint32 socketNum = 0; for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT + MAX_GEM_SOCKETS; diff --git a/src/Mgr/Talent/Talentspec.cpp b/src/Mgr/Talent/Talentspec.cpp index 7ee760ed4..2cb6ce5c4 100644 --- a/src/Mgr/Talent/Talentspec.cpp +++ b/src/Mgr/Talent/Talentspec.cpp @@ -142,7 +142,7 @@ bool TalentSpec::CheckTalents(uint32 level, std::ostringstream* out) } // Set the talents for the bots to the current spec. -void TalentSpec::ApplyTalents(Player* bot, std::ostringstream* out) +void TalentSpec::ApplyTalents(Player* bot, std::ostringstream* /*out*/) { for (auto& entry : talents) { @@ -397,7 +397,7 @@ uint32 TalentSpec::highestTree() return 0; } -std::string const TalentSpec::FormatSpec(Player* bot) +std::string const TalentSpec::FormatSpec(Player* /*bot*/) { // uint8 cls = bot->getClass(); //not used, (used in lined 403), line marked for removal. diff --git a/src/Script/Playerbots.cpp b/src/Script/Playerbots.cpp index 7db91eb40..5be7e8855 100644 --- a/src/Script/Playerbots.cpp +++ b/src/Script/Playerbots.cpp @@ -226,7 +226,7 @@ public: return true; } - bool OnPlayerCanUseChat(Player* player, uint32 type, uint32 /*lang*/, std::string& msg, Guild* guild) override + bool OnPlayerCanUseChat(Player* player, uint32 type, uint32 /*lang*/, std::string& msg, Guild* /*guild*/) override { if (type != CHAT_MSG_GUILD) return true; @@ -445,7 +445,7 @@ public: playerbotMgr->HandleMasterOutgoingPacket(*packet); } - void OnPlayerbotUpdate(uint32 diff) override + void OnPlayerbotUpdate(uint32 /*diff*/) override { sRandomPlayerbotMgr.UpdateSessions(); // Per-bot updates only } diff --git a/src/Util/ServerFacade.cpp b/src/Util/ServerFacade.cpp index 1ba1eb5ea..bc17e5fe3 100644 --- a/src/Util/ServerFacade.cpp +++ b/src/Util/ServerFacade.cpp @@ -39,7 +39,7 @@ bool ServerFacade::IsDistanceGreaterOrEqualThan(float dist1, float dist2) { retu bool ServerFacade::IsDistanceLessOrEqualThan(float dist1, float dist2) { return !IsDistanceGreaterThan(dist1, dist2); } -void ServerFacade::SetFacingTo(Player* bot, WorldObject* wo, bool force) +void ServerFacade::SetFacingTo(Player* bot, WorldObject* wo, bool /*force*/) { if (!bot) return;