diff --git a/src/modules/Bots/ahbot/AhBotConfig.cpp b/src/modules/Bots/ahbot/AhBotConfig.cpp index a8d3b32ca..a04a59839 100644 --- a/src/modules/Bots/ahbot/AhBotConfig.cpp +++ b/src/modules/Bots/ahbot/AhBotConfig.cpp @@ -7,10 +7,6 @@ using namespace std; INSTANTIATE_SINGLETON_1(AhBotConfig); -AhBotConfig::AhBotConfig() -{ -} - template void LoadSet(string value, T &res) { diff --git a/src/modules/Bots/ahbot/AhBotConfig.h b/src/modules/Bots/ahbot/AhBotConfig.h index def0765fb..ffb727553 100644 --- a/src/modules/Bots/ahbot/AhBotConfig.h +++ b/src/modules/Bots/ahbot/AhBotConfig.h @@ -7,7 +7,6 @@ using namespace std; class AhBotConfig { public: - AhBotConfig(); static AhBotConfig& instance() { static AhBotConfig instance; diff --git a/src/modules/Bots/ahbot/PricingStrategy.cpp b/src/modules/Bots/ahbot/PricingStrategy.cpp index ad5e20eab..634919a38 100644 --- a/src/modules/Bots/ahbot/PricingStrategy.cpp +++ b/src/modules/Bots/ahbot/PricingStrategy.cpp @@ -211,8 +211,6 @@ uint32 PricingStrategy::GetDefaultBuyPrice(ItemPrototype const* proto) uint32 level = max(proto->ItemLevel, proto->RequiredLevel); if (proto->Class == ITEM_CLASS_QUEST) { - double result = 1.0; - QueryResult* results = WorldDatabase.PQuery( "select max(QuestLevel), max(MinLevel) from quest_template where ReqItemId1 = %u or ReqItemId2 = %u or ReqItemId3 = %u or ReqItemId4 = %u", proto->ItemId, proto->ItemId, proto->ItemId, proto->ItemId); diff --git a/src/modules/Bots/playerbot/GuildTaskMgr.cpp b/src/modules/Bots/playerbot/GuildTaskMgr.cpp index ecfe6063c..cb36cc217 100644 --- a/src/modules/Bots/playerbot/GuildTaskMgr.cpp +++ b/src/modules/Bots/playerbot/GuildTaskMgr.cpp @@ -782,7 +782,6 @@ bool GuildTaskMgr::HandleConsoleCommand(ChatHandler* handler, char const* args) } while (result->NextRow()); - Field* fields = result->Fetch(); delete result; } diff --git a/src/modules/Bots/playerbot/LootObjectStack.cpp b/src/modules/Bots/playerbot/LootObjectStack.cpp index 7894a3079..c99ac2842 100644 --- a/src/modules/Bots/playerbot/LootObjectStack.cpp +++ b/src/modules/Bots/playerbot/LootObjectStack.cpp @@ -12,10 +12,8 @@ LootTarget::LootTarget(ObjectGuid guid) : guid(guid), asOfTime(time(0)) { } -LootTarget::LootTarget(LootTarget const& other) +LootTarget::LootTarget(LootTarget const& other) : guid(other.guid), asOfTime(other.asOfTime) { - guid = other.guid; - asOfTime = other.asOfTime; } LootTarget& LootTarget::operator=(LootTarget const& other) @@ -145,12 +143,8 @@ WorldObject* LootObject::GetWorldObject(Player* bot) return NULL; } -LootObject::LootObject(const LootObject& other) +LootObject::LootObject(const LootObject& other) : guid(other.guid), skillId(other.skillId), reqSkillValue(other.reqSkillValue), reqItem(other.reqItem) { - guid = other.guid; - skillId = other.skillId; - reqSkillValue = other.reqSkillValue; - reqItem = other.reqItem; } bool LootObject::IsLootPossible(Player* bot) diff --git a/src/modules/Bots/playerbot/strategy/actions/BankAction.cpp b/src/modules/Bots/playerbot/strategy/actions/BankAction.cpp index 3335cc37f..814bf38c8 100644 --- a/src/modules/Bots/playerbot/strategy/actions/BankAction.cpp +++ b/src/modules/Bots/playerbot/strategy/actions/BankAction.cpp @@ -121,22 +121,19 @@ void BankAction::ListItems() map soulbound; for (int i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; ++i) if (Item* pItem = bot->GetItemByPos(INVENTORY_SLOT_BAG_0, i)) - if (pItem) - { + { items[pItem->GetProto()->ItemId] += pItem->GetCount(); soulbound[pItem->GetProto()->ItemId] = pItem->IsSoulBound(); - } + } for (int i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; ++i) if (Bag* pBag = (Bag*)bot->GetItemByPos(INVENTORY_SLOT_BAG_0, i)) - if (pBag) - for (uint32 j = 0; j < pBag->GetBagSize(); ++j) - if (Item* pItem = pBag->GetItemByPos(j)) - if (pItem) - { - items[pItem->GetProto()->ItemId] += pItem->GetCount(); - soulbound[pItem->GetProto()->ItemId] = pItem->IsSoulBound(); - } + for (uint32 j = 0; j < pBag->GetBagSize(); ++j) + if (Item* pItem = pBag->GetItemByPos(j)) + { + items[pItem->GetProto()->ItemId] += pItem->GetCount(); + soulbound[pItem->GetProto()->ItemId] = pItem->IsSoulBound(); + } TellItems(items, soulbound); } diff --git a/src/modules/Bots/playerbot/strategy/actions/BuffAction.cpp b/src/modules/Bots/playerbot/strategy/actions/BuffAction.cpp index fa5fbf739..1ea8908e7 100644 --- a/src/modules/Bots/playerbot/strategy/actions/BuffAction.cpp +++ b/src/modules/Bots/playerbot/strategy/actions/BuffAction.cpp @@ -97,8 +97,6 @@ void BuffAction::TellHeader(uint32 subClass) bool BuffAction::Execute(Event event) { - string text = event.getParam(); - FindBuffVisitor visitor(bot); IterateItems(&visitor); diff --git a/src/modules/Bots/playerbot/strategy/actions/CustomStrategyEditAction.cpp b/src/modules/Bots/playerbot/strategy/actions/CustomStrategyEditAction.cpp index 64bd507aa..195ac050d 100644 --- a/src/modules/Bots/playerbot/strategy/actions/CustomStrategyEditAction.cpp +++ b/src/modules/Bots/playerbot/strategy/actions/CustomStrategyEditAction.cpp @@ -12,9 +12,9 @@ bool CustomStrategyEditAction::Execute(Event event) string text = event.getParam(); int pos = text.find(" "); if (pos == string::npos) return PrintHelp(); - { - string name = text.substr(0, pos); - } + + string name = text.substr(0, pos); + text = text.substr(pos + 1); pos = text.find(" "); @@ -115,7 +115,7 @@ bool CustomStrategyEditAction::Edit(string name, uint32 idx, string command) return true; } -bool CustomStrategyEditAction::PrintActionLine(uint32 idx, string command) +bool CustomStrategyEditAction::PrintActionLine(uint32 idx, string& command) { ostringstream out; out << "#" << idx << " " << command; ai->TellMaster(out.str()); diff --git a/src/modules/Bots/playerbot/strategy/actions/CustomStrategyEditAction.h b/src/modules/Bots/playerbot/strategy/actions/CustomStrategyEditAction.h index 858a2fd39..b53c65d94 100644 --- a/src/modules/Bots/playerbot/strategy/actions/CustomStrategyEditAction.h +++ b/src/modules/Bots/playerbot/strategy/actions/CustomStrategyEditAction.h @@ -11,7 +11,7 @@ namespace ai private: bool PrintHelp(); - bool PrintActionLine(uint32 idx, string command); + bool PrintActionLine(uint32 idx, string& command); bool Print(string name); bool Edit(string name, uint32 idx, string command); }; diff --git a/src/modules/Bots/playerbot/strategy/actions/EmoteAction.cpp b/src/modules/Bots/playerbot/strategy/actions/EmoteAction.cpp index d364d7467..1d6c0782f 100644 --- a/src/modules/Bots/playerbot/strategy/actions/EmoteAction.cpp +++ b/src/modules/Bots/playerbot/strategy/actions/EmoteAction.cpp @@ -17,7 +17,6 @@ bool EmoteAction::Execute(Event event) uint32 emote = 0; - time_t lastEmote = AI_VALUE2(time_t, "last emote", qualifier); ai->GetAiObjectContext()->GetValue("last emote", qualifier)->Set(time(0) + urand(1, 60)); string param = event.getParam(); diff --git a/src/modules/Bots/playerbot/strategy/actions/LogLevelAction.cpp b/src/modules/Bots/playerbot/strategy/actions/LogLevelAction.cpp index f4869cfd2..a56e40223 100644 --- a/src/modules/Bots/playerbot/strategy/actions/LogLevelAction.cpp +++ b/src/modules/Bots/playerbot/strategy/actions/LogLevelAction.cpp @@ -38,7 +38,7 @@ string LogLevelAction::logLevel2string(LogLevel level) return "debug"; } } -LogLevel LogLevelAction::string2logLevel(string level) +LogLevel LogLevelAction::string2logLevel(string& level) { if (level == "debug") { diff --git a/src/modules/Bots/playerbot/strategy/actions/LogLevelAction.h b/src/modules/Bots/playerbot/strategy/actions/LogLevelAction.h index 4ad2a33f1..00bb5a5eb 100644 --- a/src/modules/Bots/playerbot/strategy/actions/LogLevelAction.h +++ b/src/modules/Bots/playerbot/strategy/actions/LogLevelAction.h @@ -11,7 +11,7 @@ namespace ai public: static string logLevel2string(LogLevel level); - static LogLevel string2logLevel(string level); + static LogLevel string2logLevel(string& level); }; } \ No newline at end of file diff --git a/src/modules/Bots/playerbot/strategy/actions/MailAction.cpp b/src/modules/Bots/playerbot/strategy/actions/MailAction.cpp index 5074231c6..056239e50 100644 --- a/src/modules/Bots/playerbot/strategy/actions/MailAction.cpp +++ b/src/modules/Bots/playerbot/strategy/actions/MailAction.cpp @@ -109,7 +109,7 @@ class TakeMailProcessor : public MailProcessor private: bool CheckBagSpace(Player* bot) { - uint32 totalused = 0, total = 16; + uint32 totalused = 0; for (uint8 slot = INVENTORY_SLOT_ITEM_START; slot < INVENTORY_SLOT_ITEM_END; slot++) { if (bot->GetItemByPos(INVENTORY_SLOT_BAG_0, slot)) diff --git a/src/modules/Bots/playerbot/strategy/actions/MovementActions.cpp b/src/modules/Bots/playerbot/strategy/actions/MovementActions.cpp index 6cbb08a61..665aa389f 100644 --- a/src/modules/Bots/playerbot/strategy/actions/MovementActions.cpp +++ b/src/modules/Bots/playerbot/strategy/actions/MovementActions.cpp @@ -93,9 +93,7 @@ bool MovementAction::MoveTo(Unit* target, float distance) float bx = bot->GetPositionX(); float by = bot->GetPositionY(); - float bz = bot->GetPositionZ(); - float tx = target->GetPositionX(); float ty = target->GetPositionY(); float tz = target->GetPositionZ(); diff --git a/src/modules/Bots/playerbot/strategy/actions/OutfitAction.cpp b/src/modules/Bots/playerbot/strategy/actions/OutfitAction.cpp index 503074fd4..bf21ef676 100644 --- a/src/modules/Bots/playerbot/strategy/actions/OutfitAction.cpp +++ b/src/modules/Bots/playerbot/strategy/actions/OutfitAction.cpp @@ -97,7 +97,7 @@ bool OutfitAction::Execute(Event event) return true; } -void OutfitAction::Save(string name, ItemIds items) +void OutfitAction::Save(string& name, ItemIds items) { list& outfits = AI_VALUE(list&, "outfit list"); for (list::iterator i = outfits.begin(); i != outfits.end(); ++i) @@ -125,7 +125,7 @@ void OutfitAction::Save(string name, ItemIds items) outfits.push_back(out.str()); } -ItemIds OutfitAction::Find(string name) +ItemIds OutfitAction::Find(string& name) { list& outfits = AI_VALUE(list&, "outfit list"); for (list::iterator i = outfits.begin(); i != outfits.end(); ++i) @@ -197,7 +197,7 @@ ItemIds OutfitAction::parseItems(string text) return itemIds; } -void OutfitAction::Update(string name) +void OutfitAction::Update(string& name) { ListItemsVisitor visitor; IterateItems(&visitor, ITERATE_ITEMS_IN_EQUIP); diff --git a/src/modules/Bots/playerbot/strategy/actions/OutfitAction.h b/src/modules/Bots/playerbot/strategy/actions/OutfitAction.h index 2f2e32938..1d74c4427 100644 --- a/src/modules/Bots/playerbot/strategy/actions/OutfitAction.h +++ b/src/modules/Bots/playerbot/strategy/actions/OutfitAction.h @@ -17,9 +17,9 @@ namespace ai ItemIds parseItems(string outfit); void List(); - ItemIds Find(string name); - void Save(string name, ItemIds outfit); - void Update(string name); + ItemIds Find(string& name); + void Save(string& name, ItemIds outfit); + void Update(string& name); }; } diff --git a/src/modules/Bots/playerbot/strategy/actions/RepairAllAction.cpp b/src/modules/Bots/playerbot/strategy/actions/RepairAllAction.cpp index c68a78ec8..ef3edebab 100644 --- a/src/modules/Bots/playerbot/strategy/actions/RepairAllAction.cpp +++ b/src/modules/Bots/playerbot/strategy/actions/RepairAllAction.cpp @@ -22,7 +22,6 @@ bool RepairAllAction::Execute(Event event) } bot->SetFacingToObject(unit); - float discountMod = bot->GetReputationPriceDiscount(unit); uint32 totalCost = bot->DurabilityRepairAll(true, 1.0f, false); ostringstream out; diff --git a/src/modules/Bots/playerbot/strategy/actions/RewardAction.cpp b/src/modules/Bots/playerbot/strategy/actions/RewardAction.cpp index ed312e155..cb40dbcfe 100644 --- a/src/modules/Bots/playerbot/strategy/actions/RewardAction.cpp +++ b/src/modules/Bots/playerbot/strategy/actions/RewardAction.cpp @@ -66,9 +66,6 @@ bool RewardAction::Reward(uint32 itemId, Object* questGiver) { bot->RewardQuest(pQuest, rewardIdx, questGiver, false); - string questTitle = pQuest->GetTitle(); - string itemName = pRewardItem->Name1; - ostringstream out; out << chat->formatItem(pRewardItem) << " rewarded"; ai->TellMaster(out); return true; diff --git a/src/modules/Bots/playerbot/strategy/actions/SayAction.cpp b/src/modules/Bots/playerbot/strategy/actions/SayAction.cpp index a34979a51..2ab49732d 100644 --- a/src/modules/Bots/playerbot/strategy/actions/SayAction.cpp +++ b/src/modules/Bots/playerbot/strategy/actions/SayAction.cpp @@ -65,7 +65,6 @@ bool SayAction::Execute(Event event) vector &strings = stringTable[qualifier]; if (strings.empty()) return false; - time_t lastSaid = AI_VALUE2(time_t, "last said", qualifier); ai->GetAiObjectContext()->GetValue("last said", qualifier)->Set(time(0) + urand(1, 60)); uint32 probability = probabilityTable[qualifier]; diff --git a/src/modules/Bots/playerbot/strategy/actions/SendMailAction.cpp b/src/modules/Bots/playerbot/strategy/actions/SendMailAction.cpp index 717455927..a227eadde 100644 --- a/src/modules/Bots/playerbot/strategy/actions/SendMailAction.cpp +++ b/src/modules/Bots/playerbot/strategy/actions/SendMailAction.cpp @@ -113,7 +113,6 @@ bool SendMailAction::Execute(Event event) continue; } - ItemPrototype const *proto = item->GetProto(); bot->MoveItemFromInventory(item->GetBagSlot(), item->GetSlot(), true); item->DeleteFromInventoryDB(); item->SetOwnerGuid(master->GetObjectGuid()); diff --git a/src/modules/Bots/playerbot/strategy/actions/UseMeetingStoneAction.cpp b/src/modules/Bots/playerbot/strategy/actions/UseMeetingStoneAction.cpp index f5c98e468..bd9e49e49 100644 --- a/src/modules/Bots/playerbot/strategy/actions/UseMeetingStoneAction.cpp +++ b/src/modules/Bots/playerbot/strategy/actions/UseMeetingStoneAction.cpp @@ -137,7 +137,6 @@ bool SummonAction::Summon(Player *summoner, Player *player) bool SummonAction::Teleport(Player *summoner, Player *player) { - Player* master = GetMaster(); if (!summoner->IsBeingTeleported() && !player->IsBeingTeleported()) { float followAngle = GetFollowAngle(); diff --git a/src/modules/Bots/playerbot/strategy/actions/WhoAction.cpp b/src/modules/Bots/playerbot/strategy/actions/WhoAction.cpp index af1123e1e..426cacf19 100644 --- a/src/modules/Bots/playerbot/strategy/actions/WhoAction.cpp +++ b/src/modules/Bots/playerbot/strategy/actions/WhoAction.cpp @@ -108,7 +108,7 @@ string WhoAction::QuerySkill(string text) return out.str(); } -string WhoAction::QuerySpec(string text) +string WhoAction::QuerySpec(string& text) { ostringstream out; @@ -142,7 +142,6 @@ string WhoAction::QuerySpec(string text) { out << "|h|cff00ff00" << visitor.count[ITEM_QUALITY_UNCOMMON] << "|h|cffffffff"; } - needSlash = true; } out << ")"; diff --git a/src/modules/Bots/playerbot/strategy/actions/WhoAction.h b/src/modules/Bots/playerbot/strategy/actions/WhoAction.h index e5c8e865f..a04fb4502 100644 --- a/src/modules/Bots/playerbot/strategy/actions/WhoAction.h +++ b/src/modules/Bots/playerbot/strategy/actions/WhoAction.h @@ -15,7 +15,7 @@ namespace ai private: string QueryTrade(string text); string QuerySkill(string text); - string QuerySpec(string text); + string QuerySpec(string& text); }; } diff --git a/src/modules/Bots/playerbot/strategy/generic/ConserveManaStrategy.cpp b/src/modules/Bots/playerbot/strategy/generic/ConserveManaStrategy.cpp index 72e62f2f4..61b4f169c 100644 --- a/src/modules/Bots/playerbot/strategy/generic/ConserveManaStrategy.cpp +++ b/src/modules/Bots/playerbot/strategy/generic/ConserveManaStrategy.cpp @@ -17,8 +17,6 @@ float ConserveManaMultiplier::GetValue(Action* action) bool hasMana = AI_VALUE2(bool, "has mana", "self target"); bool mediumMana = hasMana && mana < sPlayerbotAIConfig.mediumMana; - string name = action->getName(); - if (health < sPlayerbotAIConfig.lowHealth) { return 1.0f; diff --git a/src/modules/Bots/playerbot/strategy/generic/PullStrategy.cpp b/src/modules/Bots/playerbot/strategy/generic/PullStrategy.cpp index 07abd0df1..6e46b00d6 100644 --- a/src/modules/Bots/playerbot/strategy/generic/PullStrategy.cpp +++ b/src/modules/Bots/playerbot/strategy/generic/PullStrategy.cpp @@ -8,7 +8,7 @@ using namespace ai; class MagePullMultiplier : public PassiveMultiplier { public: - MagePullMultiplier(PlayerbotAI* ai, string action) : PassiveMultiplier(ai) + MagePullMultiplier(PlayerbotAI* ai, string& action) : PassiveMultiplier(ai) { this->action = action; } diff --git a/src/modules/Bots/playerbot/strategy/values/Arrow.cpp b/src/modules/Bots/playerbot/strategy/values/Arrow.cpp index 37e3fbc2a..149bdc9f1 100644 --- a/src/modules/Bots/playerbot/strategy/values/Arrow.cpp +++ b/src/modules/Bots/playerbot/strategy/values/Arrow.cpp @@ -14,7 +14,6 @@ WorldLocation ArrowFormation::GetLocationInternal() int tankLines = 1 + tanks.Size() / 6; int meleeLines = 1 + melee.Size() / 6; int rangedLines = 1 + ranged.Size() / 6; - int healerLines = 1 + healers.Size() / 6; float offset = 0; Player* master = ai->GetMaster(); @@ -150,8 +149,6 @@ UnitPosition MultiLineUnitPlacer::Place(FormationUnit *unit, uint32 index, uint3 int lineNo = index / 6; int indexInLine = index % 6; int lineSize = max(count - lineNo * 6, uint32(6)); - float x = cos(orientation) * sPlayerbotAIConfig.followDistance * lineNo; - float y = sin(orientation) * sPlayerbotAIConfig.followDistance * lineNo; return placer.Place(unit, indexInLine, lineSize); } diff --git a/src/modules/Bots/playerbot/strategy/values/CcTargetValue.cpp b/src/modules/Bots/playerbot/strategy/values/CcTargetValue.cpp index 78654306e..f27760afa 100644 --- a/src/modules/Bots/playerbot/strategy/values/CcTargetValue.cpp +++ b/src/modules/Bots/playerbot/strategy/values/CcTargetValue.cpp @@ -9,7 +9,7 @@ using namespace ai; class FindTargetForCcStrategy : public FindTargetStrategy { public: - FindTargetForCcStrategy(PlayerbotAI* ai, string spell) : FindTargetStrategy(ai) + FindTargetForCcStrategy(PlayerbotAI* ai, string& spell) : FindTargetStrategy(ai) { this->spell = spell; maxDistance = 0; diff --git a/src/modules/Bots/playerbot/strategy/values/CurrentCcTargetValue.cpp b/src/modules/Bots/playerbot/strategy/values/CurrentCcTargetValue.cpp index 5ab1b7bdc..f5504a02c 100644 --- a/src/modules/Bots/playerbot/strategy/values/CurrentCcTargetValue.cpp +++ b/src/modules/Bots/playerbot/strategy/values/CurrentCcTargetValue.cpp @@ -7,7 +7,7 @@ using namespace ai; class FindCurrentCcTargetStrategy : public FindTargetStrategy { public: - FindCurrentCcTargetStrategy(PlayerbotAI* ai, string spell) : FindTargetStrategy(ai) + FindCurrentCcTargetStrategy(PlayerbotAI* ai, string& spell) : FindTargetStrategy(ai) { this->spell = spell; } diff --git a/src/modules/Bots/playerbot/strategy/values/ItemCountValue.cpp b/src/modules/Bots/playerbot/strategy/values/ItemCountValue.cpp index dec931f99..726da1b39 100644 --- a/src/modules/Bots/playerbot/strategy/values/ItemCountValue.cpp +++ b/src/modules/Bots/playerbot/strategy/values/ItemCountValue.cpp @@ -8,8 +8,6 @@ list InventoryItemValueBase::Find(string qualifier) { list result; - Player* bot = InventoryAction::ai->GetBot(); - list items = InventoryAction::parseItems(qualifier); for (list::iterator i = items.begin(); i != items.end(); i++) { diff --git a/src/modules/Bots/playerbot/strategy/values/LootStrategyValue.cpp b/src/modules/Bots/playerbot/strategy/values/LootStrategyValue.cpp index 30408ca4d..5ec3891f7 100644 --- a/src/modules/Bots/playerbot/strategy/values/LootStrategyValue.cpp +++ b/src/modules/Bots/playerbot/strategy/values/LootStrategyValue.cpp @@ -58,7 +58,7 @@ LootStrategy *LootStrategyValue::gray = new GrayLootStrategy(); LootStrategy *LootStrategyValue::disenchant = new DisenchantLootStrategy(); LootStrategy *LootStrategyValue::all = new AllLootStrategy(); -LootStrategy* LootStrategyValue::instance(string strategy) +LootStrategy* LootStrategyValue::instance(string& strategy) { if (strategy == "*" || strategy == "all") { diff --git a/src/modules/Bots/playerbot/strategy/values/LootStrategyValue.h b/src/modules/Bots/playerbot/strategy/values/LootStrategyValue.h index ef389a4a0..2267948e7 100644 --- a/src/modules/Bots/playerbot/strategy/values/LootStrategyValue.h +++ b/src/modules/Bots/playerbot/strategy/values/LootStrategyValue.h @@ -11,6 +11,6 @@ namespace ai virtual ~LootStrategyValue() { delete defaultValue; } static LootStrategy *normal, *gray, *all, *disenchant; - static LootStrategy* instance(string name); + static LootStrategy* instance(string& name); }; } diff --git a/src/modules/Bots/playerbot/strategy/values/PartyMemberWithoutAuraValue.cpp b/src/modules/Bots/playerbot/strategy/values/PartyMemberWithoutAuraValue.cpp index f2ab8aa1c..13049d005 100644 --- a/src/modules/Bots/playerbot/strategy/values/PartyMemberWithoutAuraValue.cpp +++ b/src/modules/Bots/playerbot/strategy/values/PartyMemberWithoutAuraValue.cpp @@ -7,7 +7,7 @@ using namespace ai; class PlayerWithoutAuraPredicate : public FindPlayerPredicate, public PlayerbotAIAware { public: - PlayerWithoutAuraPredicate(PlayerbotAI* ai, string aura) : + PlayerWithoutAuraPredicate(PlayerbotAI* ai, string& aura) : PlayerbotAIAware(ai), FindPlayerPredicate(), aura(aura) {} public: diff --git a/src/modules/Bots/playerbot/strategy/values/StatsValues.cpp b/src/modules/Bots/playerbot/strategy/values/StatsValues.cpp index 777b9064b..449e236bf 100644 --- a/src/modules/Bots/playerbot/strategy/values/StatsValues.cpp +++ b/src/modules/Bots/playerbot/strategy/values/StatsValues.cpp @@ -144,7 +144,6 @@ uint8 BagSpaceValue::Calculate() } } - uint32 totalfree = 16 - totalused; for (uint8 bag = INVENTORY_SLOT_BAG_START; bag < INVENTORY_SLOT_BAG_END; ++bag) { const Bag* const pBag = (Bag*) bot->GetItemByPos(INVENTORY_SLOT_BAG_0, bag); @@ -154,7 +153,6 @@ uint8 BagSpaceValue::Calculate() if (pBagProto->Class == ITEM_CLASS_CONTAINER && pBagProto->SubClass == ITEM_SUBCLASS_CONTAINER) { total += pBag->GetBagSize(); - totalfree += pBag->GetFreeSlots(); } }