From 0fd894176b9429919be7b0c18af33efe4d1ae959 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sat, 30 Nov 2024 23:48:29 +0800 Subject: [PATCH 01/26] [New Rpg] New rpg start up (add GO_GRIND and NEAR_RANDOM status) --- conf/playerbots.conf.dist | 5 + src/AiFactory.cpp | 6 +- src/PlayerbotAI.cpp | 22 +- src/PlayerbotAI.h | 4 +- src/PlayerbotAIConfig.cpp | 3 +- src/PlayerbotAIConfig.h | 1 + src/RandomPlayerbotMgr.cpp | 125 ++++++++-- src/RandomPlayerbotMgr.h | 7 +- src/strategy/StrategyContext.h | 3 + src/strategy/actions/ActionContext.h | 9 + src/strategy/actions/ChatActionContext.h | 3 + src/strategy/actions/MovementActions.cpp | 41 +++- src/strategy/actions/MovementActions.h | 2 +- src/strategy/actions/NewRpgAction.cpp | 214 ++++++++++++++++++ src/strategy/actions/NewRpgAction.h | 57 +++++ .../actions/ReviveFromCorpseAction.cpp | 16 +- .../generic/ChatCommandHandlerStrategy.cpp | 1 + src/strategy/generic/GrindingStrategy.cpp | 6 +- src/strategy/generic/NewRpgStrategy.cpp | 29 +++ src/strategy/generic/NewRpgStrategy.h | 72 ++++++ src/strategy/triggers/ChatTriggerContext.h | 2 + src/strategy/triggers/NewRpgTrigger.cpp | 4 + src/strategy/triggers/NewRpgTriggers.h | 20 ++ src/strategy/triggers/TriggerContext.h | 6 + src/strategy/values/DpsTargetValue.cpp | 3 +- src/strategy/values/GrindTargetValue.cpp | 27 ++- .../GenericWarlockNonCombatStrategy.cpp | 2 +- 27 files changed, 625 insertions(+), 65 deletions(-) create mode 100644 src/strategy/actions/NewRpgAction.cpp create mode 100644 src/strategy/actions/NewRpgAction.h create mode 100644 src/strategy/generic/NewRpgStrategy.cpp create mode 100644 src/strategy/generic/NewRpgStrategy.h create mode 100644 src/strategy/triggers/NewRpgTrigger.cpp create mode 100644 src/strategy/triggers/NewRpgTriggers.h diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 537588fa..00fa3a4c 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -588,6 +588,11 @@ AiPlayerbot.RandomBotGroupNearby = 0 # Default: 1 (enabled) AiPlayerbot.AutoDoQuests = 1 +# Random Bots will behave more like real players (exprimental) +# This option will override AutoDoQuests +# Default: 0 (disabled) +AiPlayerbot.EnableNewRpgStrategy = 0 + # Quest items to leave (do not destroy) AiPlayerbot.RandomBotQuestItems = "6948,5175,5176,5177,5178,16309,12382,13704,11000" diff --git a/src/AiFactory.cpp b/src/AiFactory.cpp index d3cd1ef3..8af2e0dd 100644 --- a/src/AiFactory.cpp +++ b/src/AiFactory.cpp @@ -631,7 +631,11 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const // nonCombatEngine->addStrategy("group"); // nonCombatEngine->addStrategy("guild"); - if (sPlayerbotAIConfig->autoDoQuests) + if (sPlayerbotAIConfig->enableNewRpgStrategy) + { + nonCombatEngine->addStrategy("new rpg", false); + } + else if (sPlayerbotAIConfig->autoDoQuests) { // nonCombatEngine->addStrategy("travel"); nonCombatEngine->addStrategy("rpg", false); diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 44e234d5..bbb4ce06 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -29,6 +29,7 @@ #include "MotionMaster.h" #include "MoveSpline.h" #include "MoveSplineInit.h" +#include "NewRpgStrategy.h" #include "ObjectGuid.h" #include "PerformanceMonitor.h" #include "Player.h" @@ -774,7 +775,8 @@ void PlayerbotAI::Reset(bool full) bot->GetMotionMaster()->Clear(); // bot->CleanupAfterTaxiFlight(); InterruptSpell(); - + rpgInfo = NewRpgInfo(); + if (full) { for (uint8 i = 0; i < BOT_STATE_MAX; i++) @@ -4137,16 +4139,16 @@ bool PlayerbotAI::AllowActive(ActivityType activityType) { // only keep updating till initializing time has completed, // which prevents unneeded expensive GameTime calls. - if (_isBotInitializing) - { - _isBotInitializing = GameTime::GetUptime().count() < sPlayerbotAIConfig->maxRandomBots * 0.12; + // if (_isBotInitializing) + // { + // _isBotInitializing = GameTime::GetUptime().count() < sPlayerbotAIConfig->maxRandomBots * 0.12; - // no activity allowed during bot initialization - if (_isBotInitializing) - { - return false; - } - } + // // no activity allowed during bot initialization + // if (_isBotInitializing) + // { + // return false; + // } + // } // General exceptions if (activityType == PACKET_ACTIVITY) diff --git a/src/PlayerbotAI.h b/src/PlayerbotAI.h index 5477685e..603dd851 100644 --- a/src/PlayerbotAI.h +++ b/src/PlayerbotAI.h @@ -21,6 +21,7 @@ #include "PlayerbotTextMgr.h" #include "SpellAuras.h" #include "WorldPacket.h" +#include "NewRpgStrategy.h" class AiObjectContext; class Creature; @@ -572,6 +573,7 @@ public: std::set GetCurrentIncompleteQuestIds(); void PetFollow(); static float GetItemScoreMultiplier(ItemQualities quality); + NewRpgInfo rpgInfo; private: static void _fillGearScoreData(Player* player, Item* item, std::vector* gearScore, uint32& twoHandScore, @@ -580,7 +582,7 @@ private: void HandleCommands(); void HandleCommand(uint32 type, const std::string& text, Player& fromPlayer, const uint32 lang = LANG_UNIVERSAL); - bool _isBotInitializing = true; + bool _isBotInitializing = false; protected: Player* bot; diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index 53a7b720..871a3213 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -497,7 +497,8 @@ bool PlayerbotAIConfig::Initialize() autoLearnTrainerSpells = sConfigMgr->GetOption("AiPlayerbot.AutoLearnTrainerSpells", true); autoLearnQuestSpells = sConfigMgr->GetOption("AiPlayerbot.AutoLearnQuestSpells", false); autoTeleportForLevel = sConfigMgr->GetOption("AiPlayerbot.AutoTeleportForLevel", false); - autoDoQuests = sConfigMgr->GetOption("AiPlayerbot.AutoDoQuests", false); + autoDoQuests = sConfigMgr->GetOption("AiPlayerbot.AutoDoQuests", true); + enableNewRpgStrategy = sConfigMgr->GetOption("AiPlayerbot.EnableNewRpgStrategy", false); syncLevelWithPlayers = sConfigMgr->GetOption("AiPlayerbot.SyncLevelWithPlayers", false); freeFood = sConfigMgr->GetOption("AiPlayerbot.FreeFood", true); randomBotGroupNearby = sConfigMgr->GetOption("AiPlayerbot.RandomBotGroupNearby", true); diff --git a/src/PlayerbotAIConfig.h b/src/PlayerbotAIConfig.h index 0f34b41e..be31da62 100644 --- a/src/PlayerbotAIConfig.h +++ b/src/PlayerbotAIConfig.h @@ -280,6 +280,7 @@ public: bool autoUpgradeEquip; bool autoLearnTrainerSpells; bool autoDoQuests; + bool enableNewRpgStrategy; bool syncLevelWithPlayers; bool freeFood; bool autoLearnQuestSpells; diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index cbb4e53e..fe475e08 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -18,6 +18,8 @@ #include "BattlegroundMgr.h" #include "CellImpl.h" #include "ChannelMgr.h" +#include "DBCStores.h" +#include "DBCStructure.h" #include "DatabaseEnv.h" #include "Define.h" #include "FleeManager.h" @@ -29,6 +31,7 @@ #include "LFGMgr.h" #include "MapMgr.h" #include "PerformanceMonitor.h" +#include "Player.h" #include "PlayerbotAI.h" #include "PlayerbotAIConfig.h" #include "PlayerbotCommandServer.h" @@ -1355,17 +1358,17 @@ void RandomPlayerbotMgr::RandomTeleport(Player* bot, std::vector& { continue; } - if (bot->GetLevel() <= 18 && (loc.GetMapId() != pInfo->mapId || dis > 10000.0f)) + if (bot->GetLevel() <= 16 && (loc.GetMapId() != pInfo->mapId || dis > 10000.0f)) { continue; } const LocaleConstant& locale = sWorld->GetDefaultDbcLocale(); LOG_INFO("playerbots", - "Random teleporting bot {} (level {}) to Map: {} ({}) Zone: {} ({}) Area: {} ({}) {},{},{} ({}/{} " + "Random teleporting bot {} (level {}) to Map: {} ({}) Zone: {} ({}) Area: {} ({}) ZoneLevel: {} AreaLevel: {} {},{},{} ({}/{} " "locations)", bot->GetName().c_str(), bot->GetLevel(), map->GetId(), map->GetMapName(), zone->ID, - zone->area_name[locale], area->ID, area->area_name[locale], x, y, z, i + 1, tlocs.size()); + zone->area_name[locale], area->ID, area->area_name[locale], zone->area_level, area->area_level, x, y, z, i + 1, tlocs.size()); if (hearth) { @@ -1408,8 +1411,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() "FROM " "(SELECT " "map, " - "MIN( c.guid ) guid, " - "t.entry " + "MIN( c.guid ) guid " "FROM " "creature c " "INNER JOIN creature_template t ON c.id1 = t.entry " @@ -1424,12 +1426,12 @@ void RandomPlayerbotMgr::PrepareTeleportCache() "AND t.faction != 188 " "GROUP BY " "map, " - "ROUND( position_x / 500 ), " - "ROUND( position_y / 500 ), " - "ROUND( position_z / 50), " - "t.entry " + "ROUND(position_x / 50), " + "ROUND(position_y / 50), " + "ROUND(position_z / 50) " "HAVING " - "count(*) > 7) AS g " + "count(*) >= 2) " + "AS g " "INNER JOIN creature c ON g.guid = c.guid " "INNER JOIN creature_template t on c.id1 = t.entry " "ORDER BY " @@ -1461,6 +1463,89 @@ void RandomPlayerbotMgr::PrepareTeleportCache() } LOG_INFO("playerbots", "{} locations for level collected.", collected_locs); + results = WorldDatabase.Query( + "SELECT " + "map, " + "position_x, " + "position_y, " + "position_z, " + "orientation, " + "t.faction, " + "t.entry " + "FROM " + "creature c " + "INNER JOIN creature_template t on c.id1 = t.entry " + "WHERE " + "t.npcflag & 65536 " + "AND map IN ({}) " + "ORDER BY " + "t.minlevel;", + sPlayerbotAIConfig->randomBotMapsAsString.c_str()); + collected_locs = 0; + if (results) + { + do + { + Field* fields = results->Fetch(); + uint16 mapId = fields[0].Get(); + float x = fields[1].Get(); + float y = fields[2].Get(); + float z = fields[3].Get(); + float orient = fields[4].Get(); + uint32 faction = fields[5].Get(); + uint32 c_entry = fields[6].Get(); + const FactionTemplateEntry* entry = sFactionTemplateStore.LookupEntry(faction); + + WorldLocation loc(mapId, x, y, z, orient + M_PI); + collected_locs++; + Map* map = sMapMgr->FindMap(loc.GetMapId(), 0); + if (!map) + continue; + const AreaTableEntry* area = sAreaTableStore.LookupEntry(map->GetAreaId(1, x, y, z)); + uint32 level = area->area_level; + LOG_INFO("playerbots", "Area: {} Level: {} creature_entry: {}", area->ID, level, c_entry); + int range = level <= 10 ? 6 : 8; + for (int32 l = (int32)level; l <= (int32)level + range; l++) + { + if (l < 1 || l > maxLevel) + { + continue; + } + if (!(entry->hostileMask & 4)) + { + hordeInnkeeperPerLevelCache[(uint8)l].push_back(loc); + } + if (!(entry->hostileMask & 2)) + { + allianceInnkeeperPerLevelCache[(uint8)l].push_back(loc); + } + } + } while (results->NextRow()); + } + // add all initial position + for (uint32 i = 1; i < MAX_RACES; i++) + { + for (uint32 j = 1; j < MAX_CLASSES; j++) + { + PlayerInfo const* info = sObjectMgr->GetPlayerInfo(i, j); + + if (!info) + continue; + + WorldPosition pos(info->mapId, info->positionX, info->positionY, info->positionZ, info->orientation); + + for (int32 l = 1; l <= 6; l++) + { + if ((1 << (i - 1)) & RACEMASK_ALLIANCE) + allianceInnkeeperPerLevelCache[(uint8)l].push_back(pos); + else + hordeInnkeeperPerLevelCache[(uint8)l].push_back(pos); + } + break; + } + } + LOG_INFO("playerbots", "{} innkeepers locations for level collected.", collected_locs); + results = WorldDatabase.Query( "SELECT " "map, " @@ -1571,15 +1656,20 @@ void RandomPlayerbotMgr::RandomTeleportForLevel(Player* bot) uint32 level = bot->GetLevel(); uint8 race = bot->getRace(); + std::vector* locs = nullptr; + if (sPlayerbotAIConfig->enableNewRpgStrategy) + locs = IsAlliance(race) ? &allianceInnkeeperPerLevelCache[level] : &hordeInnkeeperPerLevelCache[level]; + else + locs = &locsPerLevelCache[level]; LOG_DEBUG("playerbots", "Random teleporting bot {} for level {} ({} locations available)", bot->GetName().c_str(), - bot->GetLevel(), locsPerLevelCache[level].size()); - if (level > 10 && urand(0, 100) < sPlayerbotAIConfig->probTeleToBankers * 100) + bot->GetLevel(), locs->size()); + if (level >= 5 && urand(0, 100) < sPlayerbotAIConfig->probTeleToBankers * 100) { RandomTeleport(bot, bankerLocsPerLevelCache[level], true); } else { - RandomTeleport(bot, locsPerLevelCache[level]); + RandomTeleport(bot, *locs); } } @@ -1590,10 +1680,15 @@ void RandomPlayerbotMgr::RandomTeleportGrindForLevel(Player* bot) uint32 level = bot->GetLevel(); uint8 race = bot->getRace(); + std::vector* locs = nullptr; + if (sPlayerbotAIConfig->enableNewRpgStrategy) + locs = IsAlliance(race) ? &allianceInnkeeperPerLevelCache[level] : &hordeInnkeeperPerLevelCache[level]; + else + locs = &locsPerLevelCache[level]; LOG_DEBUG("playerbots", "Random teleporting bot {} for level {} ({} locations available)", bot->GetName().c_str(), - bot->GetLevel(), locsPerLevelCache[level].size()); + bot->GetLevel(), locs->size()); - RandomTeleport(bot, locsPerLevelCache[level]); + RandomTeleport(bot, *locs); } void RandomPlayerbotMgr::RandomTeleport(Player* bot) diff --git a/src/RandomPlayerbotMgr.h b/src/RandomPlayerbotMgr.h index f7ebf9aa..60d8d8d0 100644 --- a/src/RandomPlayerbotMgr.h +++ b/src/RandomPlayerbotMgr.h @@ -171,6 +171,10 @@ public: void PrepareAddclassCache(); std::map> addclassCache; + std::map> locsPerLevelCache; + std::map> allianceInnkeeperPerLevelCache; + std::map> hordeInnkeeperPerLevelCache; + std::map> bankerLocsPerLevelCache; protected: void OnBotLoginInternal(Player* const bot) override; @@ -199,8 +203,7 @@ private: std::vector players; uint32 processTicks; - std::map> locsPerLevelCache; - std::map> bankerLocsPerLevelCache; + // std::map> rpgLocsCache; std::map>> rpgLocsCacheLevel; diff --git a/src/strategy/StrategyContext.h b/src/strategy/StrategyContext.h index da3d8e42..dad46bd8 100644 --- a/src/strategy/StrategyContext.h +++ b/src/strategy/StrategyContext.h @@ -31,6 +31,7 @@ #include "MeleeCombatStrategy.h" #include "MoveFromGroupStrategy.h" #include "NamedObjectContext.h" +#include "NewRpgStrategy.h" #include "NonCombatStrategy.h" #include "PassiveStrategy.h" #include "PullStrategy.h" @@ -82,6 +83,7 @@ public: creators["reveal"] = &StrategyContext::reveal; creators["collision"] = &StrategyContext::collision; creators["rpg"] = &StrategyContext::rpg; + creators["new rpg"] = &StrategyContext::new_rpg; creators["travel"] = &StrategyContext::travel; creators["explore"] = &StrategyContext::explore; creators["map"] = &StrategyContext::map; @@ -152,6 +154,7 @@ private: static Strategy* reveal(PlayerbotAI* botAI) { return new RevealStrategy(botAI); } static Strategy* collision(PlayerbotAI* botAI) { return new CollisionStrategy(botAI); } static Strategy* rpg(PlayerbotAI* botAI) { return new RpgStrategy(botAI); } + static Strategy* new_rpg(PlayerbotAI* botAI) { return new NewRpgStrategy(botAI); } static Strategy* travel(PlayerbotAI* botAI) { return new TravelStrategy(botAI); } static Strategy* explore(PlayerbotAI* botAI) { return new ExploreStrategy(botAI); } static Strategy* map(PlayerbotAI* botAI) { return new MapStrategy(botAI); } diff --git a/src/strategy/actions/ActionContext.h b/src/strategy/actions/ActionContext.h index c13f7162..163731bf 100644 --- a/src/strategy/actions/ActionContext.h +++ b/src/strategy/actions/ActionContext.h @@ -62,6 +62,7 @@ #include "VehicleActions.h" #include "WorldBuffAction.h" #include "XpGainAction.h" +#include "NewRpgAction.h" class PlayerbotAI; @@ -240,6 +241,10 @@ public: creators["toggle pet spell"] = &ActionContext::toggle_pet_spell; creators["pet attack"] = &ActionContext::pet_attack; + + creators["new rpg status update"] = &ActionContext::new_rpg_status_update; + creators["new rpg go grind"] = &ActionContext::new_rpg_go_grind; + creators["new rpg move random"] = &ActionContext::new_rpg_move_random; } private: @@ -415,6 +420,10 @@ private: static Action* toggle_pet_spell(PlayerbotAI* ai) { return new TogglePetSpellAutoCastAction(ai); } static Action* pet_attack(PlayerbotAI* ai) { return new PetAttackAction(ai); } + + static Action* new_rpg_status_update(PlayerbotAI* ai) { return new NewRpgStatusUpdateAction(ai); } + static Action* new_rpg_go_grind(PlayerbotAI* ai) { return new NewRpgGoGrindAction(ai); } + static Action* new_rpg_move_random(PlayerbotAI* ai) { return new NewRpgMoveRandomAction(ai); } }; #endif diff --git a/src/strategy/actions/ChatActionContext.h b/src/strategy/actions/ChatActionContext.h index 254dc919..f4cd9cba 100644 --- a/src/strategy/actions/ChatActionContext.h +++ b/src/strategy/actions/ChatActionContext.h @@ -38,6 +38,7 @@ #include "LootStrategyAction.h" #include "MailAction.h" #include "NamedObjectContext.h" +#include "NewRpgAction.h" #include "PassLeadershipToMasterAction.h" #include "PositionAction.h" #include "QueryItemUsageAction.h" @@ -88,6 +89,7 @@ public: creators["reputation"] = &ChatActionContext::reputation; creators["log"] = &ChatActionContext::log; creators["los"] = &ChatActionContext::los; + creators["rpg status"] = &ChatActionContext::rpg_status; creators["aura"] = &ChatActionContext::aura; creators["drop"] = &ChatActionContext::drop; creators["clean quest log"] = &ChatActionContext::clean_quest_log; @@ -258,6 +260,7 @@ private: static Action* reputation(PlayerbotAI* botAI) { return new TellReputationAction(botAI); } static Action* log(PlayerbotAI* botAI) { return new LogLevelAction(botAI); } static Action* los(PlayerbotAI* botAI) { return new TellLosAction(botAI); } + static Action* rpg_status(PlayerbotAI* botAI) { return new TellRpgStatusAction(botAI); } static Action* aura(PlayerbotAI* ai) { return new TellAuraAction(ai); } static Action* ll(PlayerbotAI* botAI) { return new LootStrategyAction(botAI); } static Action* ss(PlayerbotAI* botAI) { return new SkipSpellsListAction(botAI); } diff --git a/src/strategy/actions/MovementActions.cpp b/src/strategy/actions/MovementActions.cpp index 899b91b5..f4e2be24 100644 --- a/src/strategy/actions/MovementActions.cpp +++ b/src/strategy/actions/MovementActions.cpp @@ -177,7 +177,7 @@ bool MovementAction::MoveToLOS(WorldObject* target, bool ranged) } bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle, bool react, bool normal_only, - bool exact_waypoint, MovementPriority priority) + bool exact_waypoint, MovementPriority priority, bool lessDelay) { UpdateMovementState(); if (!IsMovingAllowed(mapId, x, y, z)) @@ -210,6 +210,10 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle, mm.Clear(); mm.MovePoint(0, x, y, z, generatePath); float delay = 1000.0f * (distance / vehicleBase->GetSpeed(MOVE_RUN)); + if (lessDelay) + { + delay -= botAI->GetReactDelay(); + } delay = std::max(.0f, delay); delay = std::min((float)sPlayerbotAIConfig->maxWaitForMove, delay); AI_VALUE(LastMovement&, "last movement").Set(mapId, x, y, z, bot->GetOrientation(), delay, priority); @@ -233,6 +237,10 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle, mm.Clear(); mm.MovePoint(0, x, y, z, generatePath); float delay = 1000.0f * MoveDelay(distance); + if (lessDelay) + { + delay -= botAI->GetReactDelay(); + } delay = std::max(.0f, delay); delay = std::min((float)sPlayerbotAIConfig->maxWaitForMove, delay); AI_VALUE(LastMovement&, "last movement").Set(mapId, x, y, z, bot->GetOrientation(), delay, priority); @@ -264,6 +272,10 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle, mm.Clear(); mm.MovePoint(0, endP.x, endP.y, endP.z, generatePath); float delay = 1000.0f * MoveDelay(distance); + if (lessDelay) + { + delay -= botAI->GetReactDelay(); + } delay = std::max(.0f, delay); delay = std::min((float)sPlayerbotAIConfig->maxWaitForMove, delay); AI_VALUE(LastMovement&, "last movement").Set(mapId, x, y, z, bot->GetOrientation(), delay, priority); @@ -822,7 +834,7 @@ bool MovementAction::ReachCombatTo(Unit* target, float distance) PathGenerator path(bot); path.CalculatePath(tx, ty, tz, false); PathType type = path.GetPathType(); - int typeOk = PATHFIND_NORMAL | PATHFIND_INCOMPLETE; + int typeOk = PATHFIND_NORMAL | PATHFIND_INCOMPLETE | PATHFIND_SHORTCUT; if (!(type & typeOk)) return false; float shortenTo = distance; @@ -838,7 +850,7 @@ bool MovementAction::ReachCombatTo(Unit* target, float distance) path.ShortenPathUntilDist(G3D::Vector3(tx, ty, tz), shortenTo); G3D::Vector3 endPos = path.GetPath().back(); return MoveTo(target->GetMapId(), endPos.x, endPos.y, endPos.z, false, false, false, false, - MovementPriority::MOVEMENT_COMBAT); + MovementPriority::MOVEMENT_COMBAT, true); } float MovementAction::GetFollowAngle() @@ -2013,8 +2025,15 @@ Position MovementAction::BestPositionForMeleeToFlee(Position pos, float radius) } bool strict = checkAngle.strict; float fleeDis = std::min(radius + 1.0f, sPlayerbotAIConfig->fleeDistance); - Position fleePos{bot->GetPositionX() + cos(angle) * fleeDis, bot->GetPositionY() + sin(angle) * fleeDis, - bot->GetPositionZ()}; + float dx = bot->GetPositionX() + cos(angle) * fleeDis; + float dy = bot->GetPositionY() + sin(angle) * fleeDis; + float dz = bot->GetPositionZ(); + if (!bot->GetMap()->CheckCollisionAndGetValidCoords(bot, bot->GetPositionX(), bot->GetPositionY(), + bot->GetPositionZ(), dx, dy, dz)) + { + continue; + } + Position fleePos{dx, dy, dz}; if (strict && currentTarget && fleePos.GetExactDist(currentTarget) - currentTarget->GetCombatReach() > sPlayerbotAIConfig->tooCloseDistance && @@ -2069,8 +2088,15 @@ Position MovementAction::BestPositionForRangedToFlee(Position pos, float radius) } bool strict = checkAngle.strict; float fleeDis = std::min(radius + 1.0f, sPlayerbotAIConfig->fleeDistance); - Position fleePos{bot->GetPositionX() + cos(angle) * fleeDis, bot->GetPositionY() + sin(angle) * fleeDis, - bot->GetPositionZ()}; + float dx = bot->GetPositionX() + cos(angle) * fleeDis; + float dy = bot->GetPositionY() + sin(angle) * fleeDis; + float dz = bot->GetPositionZ(); + if (!bot->GetMap()->CheckCollisionAndGetValidCoords(bot, bot->GetPositionX(), bot->GetPositionY(), + bot->GetPositionZ(), dx, dy, dz)) + { + continue; + } + Position fleePos{dx, dy, dz}; if (strict && currentTarget && fleePos.GetExactDist(currentTarget) - currentTarget->GetCombatReach() > sPlayerbotAIConfig->spellDistance) { @@ -2082,6 +2108,7 @@ Position MovementAction::BestPositionForRangedToFlee(Position pos, float radius) { continue; } + if (pos.GetExactDist(fleePos) > farestDis) { farestDis = pos.GetExactDist(fleePos); diff --git a/src/strategy/actions/MovementActions.h b/src/strategy/actions/MovementActions.h index 76929427..ce6c64b2 100644 --- a/src/strategy/actions/MovementActions.h +++ b/src/strategy/actions/MovementActions.h @@ -32,7 +32,7 @@ protected: bool MoveNear(uint32 mapId, float x, float y, float z, float distance = sPlayerbotAIConfig->contactDistance, MovementPriority priority = MovementPriority::MOVEMENT_NORMAL); bool MoveToLOS(WorldObject* target, bool ranged = false); bool MoveTo(uint32 mapId, float x, float y, float z, bool idle = false, bool react = false, - bool normal_only = false, bool exact_waypoint = false, MovementPriority priority = MovementPriority::MOVEMENT_NORMAL); + bool normal_only = false, bool exact_waypoint = false, MovementPriority priority = MovementPriority::MOVEMENT_NORMAL, bool lessDelay = false); bool MoveTo(WorldObject* target, float distance = 0.0f, MovementPriority priority = MovementPriority::MOVEMENT_NORMAL); bool MoveNear(WorldObject* target, float distance = sPlayerbotAIConfig->contactDistance, MovementPriority priority = MovementPriority::MOVEMENT_NORMAL); float GetFollowAngle(); diff --git a/src/strategy/actions/NewRpgAction.cpp b/src/strategy/actions/NewRpgAction.cpp new file mode 100644 index 00000000..6fe6e488 --- /dev/null +++ b/src/strategy/actions/NewRpgAction.cpp @@ -0,0 +1,214 @@ +#include "NewRpgAction.h" + +#include + +#include "NewRpgStrategy.h" +#include "ObjectGuid.h" +#include "PathGenerator.h" +#include "Player.h" +#include "PlayerbotAI.h" +#include "Playerbots.h" +#include "Random.h" +#include "RandomPlayerbotMgr.h" +#include "Timer.h" +#include "TravelMgr.h" +#include "World.h" + +bool TellRpgStatusAction::Execute(Event event) +{ + std::string out = botAI->rpgInfo.ToString(); + botAI->TellMasterNoFacing(out); + return true; +} + +bool NewRpgStatusUpdateAction::Execute(Event event) +{ + NewRpgInfo& info = botAI->rpgInfo; + switch (info.status) + { + case NewRpgStatus::IDLE: + { + // // IDLE -> NEAR_NPC + // if (!info.lastNearNpc || info.lastNearNpc + setNpcInterval < getMSTime() && urand(1, 100) <= 50) + // { + // info.lastNearNpc = getMSTime(); + // GuidVector possibleTargets = AI_VALUE(GuidVector, "possible rpg targets"); + // if (possibleTargets.empty()) + // break; + // info.status = NewRpgStatus::NEAR_NPC; + // } + // IDLE -> GO_GRIND + if (!info.lastGrind || info.lastGrind + setGrindInterval < getMSTime()) + { + info.lastGrind = getMSTime(); + WorldPosition pos = SelectRandomGrindPos(); + if (pos == WorldPosition()) + break; + info.status = NewRpgStatus::GO_GRIND; + info.grindPos = pos; + return true; + } + break; + } + case NewRpgStatus::GO_GRIND: + { + WorldPosition& originalPos = info.grindPos; + assert(info.grindPos != WorldPosition()); + // GO_GRIND -> NEAR_RANDOM + if (bot->GetExactDist(originalPos) < 10.0f) + { + info.status = NewRpgStatus::NEAR_RANDOM; + info.grindPos = WorldPosition(); + return true; + } + // just choose another grindPos + if (!info.lastGrind || info.lastGrind + setGrindInterval < getMSTime()) + { + WorldPosition pos = SelectRandomGrindPos(); + if (pos == WorldPosition()) + break; + info.status = NewRpgStatus::GO_GRIND; + info.lastGrind = getMSTime(); + info.grindPos = pos; + return true; + } + break; + } + case NewRpgStatus::NEAR_RANDOM: + { + // NEAR_RANDOM -> GO_GRIND + if (!info.lastGrind || info.lastGrind + setGrindInterval < getMSTime()) + { + WorldPosition pos = SelectRandomGrindPos(); + if (pos == WorldPosition()) + break; + info.lastGrind = getMSTime(); + botAI->rpgInfo.status = NewRpgStatus::GO_GRIND; + botAI->rpgInfo.grindPos = pos; + return true; + } + break; + } + default: + break; + } + return false; +} + +WorldPosition NewRpgStatusUpdateAction::SelectRandomGrindPos() +{ + const std::vector& locs = sRandomPlayerbotMgr->locsPerLevelCache[bot->GetLevel()]; + std::vector lo_prepared_locs, hi_prepared_locs; + for (auto& loc : locs) + { + if (bot->GetMapId() != loc.GetMapId()) + continue; + + if (bot->GetExactDist(loc) < 500.0f) + { + hi_prepared_locs.push_back(loc); + } + + if (bot->GetExactDist(loc) < 1500.0f) + { + lo_prepared_locs.push_back(loc); + } + } + WorldPosition dest; + if (urand(1, 100) <= 50 && !hi_prepared_locs.empty()) + { + uint32 idx = urand(0, hi_prepared_locs.size() - 1); + dest = hi_prepared_locs[idx]; + } + else if (!lo_prepared_locs.empty()) + { + uint32 idx = urand(0, lo_prepared_locs.size() - 1); + dest = lo_prepared_locs[idx]; + } + LOG_INFO("playerbots", "[New Rpg] Bot {} select random grind pos Map:{} X:{} Y:{} Z:{} ({}+{} available in {})", + bot->GetName(), dest.GetMapId(), dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(), + hi_prepared_locs.size(), lo_prepared_locs.size() - hi_prepared_locs.size(), locs.size()); + return dest; +} + +bool NewRpgGoFarAwayPosAction::MoveFarTo(WorldPosition dest) +{ + float dis = bot->GetExactDist(dest); + if (dis < pathFinderDis) + { + return MoveTo(dest.getMapId(), dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ()); + } + + int attempt = 10; + float minDelta = MAXFLOAT; + const float x = bot->GetPositionX(); + const float y = bot->GetPositionY(); + const float z = bot->GetPositionZ(); + float rx, ry, rz; + bool found = false; + while (--attempt) + { + float angle = bot->GetAngle(&dest); + float delta = (rand_norm() - 0.5) * M_PI; + angle += delta; + float dis = rand_norm() * pathFinderDis; + float dx = x + cos(angle) * dis; + float dy = y + sin(angle) * dis; + float dz = z; + PathGenerator path(bot); + path.CalculatePath(dx, dy, dz); + // bool canReach = bot->GetMap()->CanReachPositionAndGetValidCoords(bot, x, y, z, dx, dy, dz, false); + bool canReach = path.GetPathType() & (PATHFIND_NORMAL | PATHFIND_INCOMPLETE); + + if (canReach) + { + G3D::Vector3 endPos = path.GetPath().back(); + if (fabs(delta) < minDelta) + { + found = true; + minDelta = fabs(delta); + rx = endPos.x; + ry = endPos.y; + rz = endPos.z; + } + } + } + if (found) + { + return MoveTo(bot->GetMapId(), rx, ry, rz, false, false, false, true); + } + // fallback to direct move + float angle = bot->GetAngle(&dest); + return MoveTo(bot->GetMapId(), x + cos(angle) * pathFinderDis, y + sin(angle) * pathFinderDis, z); +} + +bool NewRpgGoGrindAction::Execute(Event event) { return MoveFarTo(botAI->rpgInfo.grindPos); } + +bool NewRpgMoveRandomAction::Execute(Event event) +{ + float distance = rand_norm() * moveStep; + Map* map = bot->GetMap(); + const float x = bot->GetPositionX(); + const float y = bot->GetPositionY(); + const float z = bot->GetPositionZ(); + int attempts = 5; + while (--attempts) + { + float angle = (float)rand_norm() * 2 * static_cast(M_PI); + float dx = x + distance * cos(angle); + float dy = y + distance * sin(angle); + float dz = z; + if (!map->CheckCollisionAndGetValidCoords(bot, bot->GetPositionX(), bot->GetPositionY(), bot->GetPositionZ(), + dx, dy, dz)) + continue; + + if (map->IsInWater(bot->GetPhaseMask(), dx, dy, dz, bot->GetCollisionHeight())) + continue; + + bool moved = MoveTo(bot->GetMapId(), dx, dy, dz, false, false, false, true); + if (moved) + return true; + } + + return false; +} \ No newline at end of file diff --git a/src/strategy/actions/NewRpgAction.h b/src/strategy/actions/NewRpgAction.h new file mode 100644 index 00000000..a2ea84a5 --- /dev/null +++ b/src/strategy/actions/NewRpgAction.h @@ -0,0 +1,57 @@ +#ifndef _PLAYERBOT_NEWRPGACTION_H +#define _PLAYERBOT_NEWRPGACTION_H + +#include "Duration.h" +#include "MovementActions.h" +#include "NewRpgStrategy.h" +#include "TravelMgr.h" +#include "PlayerbotAI.h" + +class TellRpgStatusAction : public Action +{ +public: + TellRpgStatusAction(PlayerbotAI* botAI) : Action(botAI, "rpg status") {} + + bool Execute(Event event) override; +}; + +class NewRpgStatusUpdateAction : public Action +{ +public: + NewRpgStatusUpdateAction(PlayerbotAI* botAI) : Action(botAI, "new rpg status update") {} + bool Execute(Event event) override; +protected: + const int32 setGrindInterval = 5 * 60 * 1000; + const int32 setNpcInterval = 5 * 60 * 1000; + WorldPosition SelectRandomGrindPos(); +}; + +class NewRpgGoFarAwayPosAction : public MovementAction +{ +public: + NewRpgGoFarAwayPosAction(PlayerbotAI* botAI, std::string name) : MovementAction(botAI, name) {} + // bool Execute(Event event) override; + bool MoveFarTo(WorldPosition dest); + +protected: + // WorldPosition dest; + float pathFinderDis = 70.0f; // path finder +}; + +class NewRpgGoGrindAction : public NewRpgGoFarAwayPosAction +{ +public: + NewRpgGoGrindAction(PlayerbotAI* botAI) : NewRpgGoFarAwayPosAction(botAI, "new rpg go grind") {} + bool Execute(Event event) override; +}; + +class NewRpgMoveRandomAction : public MovementAction +{ +public: + NewRpgMoveRandomAction(PlayerbotAI* botAI) : MovementAction(botAI, "new rpg move random") {} + bool Execute(Event event) override; +protected: + const float moveStep = 50.0f; +}; + +#endif \ No newline at end of file diff --git a/src/strategy/actions/ReviveFromCorpseAction.cpp b/src/strategy/actions/ReviveFromCorpseAction.cpp index 4f19a639..1f61df3b 100644 --- a/src/strategy/actions/ReviveFromCorpseAction.cpp +++ b/src/strategy/actions/ReviveFromCorpseAction.cpp @@ -347,16 +347,16 @@ bool SpiritHealerAction::Execute(Event event) if (moved) return true; - if (!botAI->HasActivePlayerMaster()) - { - context->GetValue("death count")->Set(dCount + 1); - return bot->TeleportTo(ClosestGrave->Map, ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, 0.f); - } + // if (!botAI->HasActivePlayerMaster()) + // { + context->GetValue("death count")->Set(dCount + 1); + return bot->TeleportTo(ClosestGrave->Map, ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, 0.f); + // } - LOG_INFO("playerbots", "Bot {} {}:{} <{}> can't find a spirit healer", bot->GetGUID().ToString().c_str(), - bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->GetLevel(), bot->GetName().c_str()); + // LOG_INFO("playerbots", "Bot {} {}:{} <{}> can't find a spirit healer", bot->GetGUID().ToString().c_str(), + // bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->GetLevel(), bot->GetName().c_str()); - botAI->TellError("Cannot find any spirit healer nearby"); + // botAI->TellError("Cannot find any spirit healer nearby"); return false; } diff --git a/src/strategy/generic/ChatCommandHandlerStrategy.cpp b/src/strategy/generic/ChatCommandHandlerStrategy.cpp index e88ac5bb..132f2423 100644 --- a/src/strategy/generic/ChatCommandHandlerStrategy.cpp +++ b/src/strategy/generic/ChatCommandHandlerStrategy.cpp @@ -106,6 +106,7 @@ ChatCommandHandlerStrategy::ChatCommandHandlerStrategy(PlayerbotAI* botAI) : Pas supported.push_back("reputation"); supported.push_back("log"); supported.push_back("los"); + supported.push_back("rpg status"); supported.push_back("aura"); supported.push_back("drop"); supported.push_back("share"); diff --git a/src/strategy/generic/GrindingStrategy.cpp b/src/strategy/generic/GrindingStrategy.cpp index c8638e45..87970637 100644 --- a/src/strategy/generic/GrindingStrategy.cpp +++ b/src/strategy/generic/GrindingStrategy.cpp @@ -11,10 +11,10 @@ NextAction** GrindingStrategy::getDefaultActions() { return nullptr; } void GrindingStrategy::InitTriggers(std::vector& triggers) { - triggers.push_back(new TriggerNode("timer", NextAction::array(0, new NextAction("drink", 4.2f), nullptr))); - triggers.push_back(new TriggerNode("timer", NextAction::array(0, new NextAction("food", 4.1f), nullptr))); + triggers.push_back(new TriggerNode("timer", NextAction::array(0, new NextAction("drink", 10.2f), nullptr))); + triggers.push_back(new TriggerNode("timer", NextAction::array(0, new NextAction("food", 10.1f), nullptr))); triggers.push_back( - new TriggerNode("no target", NextAction::array(0, new NextAction("attack anything", 4.0f), nullptr))); + new TriggerNode("no target", NextAction::array(0, new NextAction("attack anything", 10.0f), nullptr))); } void MoveRandomStrategy::InitTriggers(std::vector& triggers) diff --git a/src/strategy/generic/NewRpgStrategy.cpp b/src/strategy/generic/NewRpgStrategy.cpp new file mode 100644 index 00000000..a2a38c5c --- /dev/null +++ b/src/strategy/generic/NewRpgStrategy.cpp @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license, you may redistribute it + * and/or modify it under version 2 of the License, or (at your option), any later version. + */ + +#include "NewRpgStrategy.h" + +#include "Playerbots.h" + +NewRpgStrategy::NewRpgStrategy(PlayerbotAI* botAI) : Strategy(botAI) {} + +NextAction** NewRpgStrategy::getDefaultActions() +{ + return NextAction::array(0, new NextAction("new rpg status update", 5.0f), nullptr); +} + +void NewRpgStrategy::InitTriggers(std::vector& triggers) +{ + triggers.push_back( + new TriggerNode("go grind status", NextAction::array(0, new NextAction("new rpg go grind", 1.0f), nullptr))); + + triggers.push_back( + new TriggerNode("near random status", NextAction::array(0, new NextAction("new rpg move random", 1.0f), nullptr))); +} + +void NewRpgStrategy::InitMultipliers(std::vector& multipliers) +{ + // multipliers.push_back(new RpgActionMultiplier(botAI)); +} diff --git a/src/strategy/generic/NewRpgStrategy.h b/src/strategy/generic/NewRpgStrategy.h new file mode 100644 index 00000000..c23ee9b2 --- /dev/null +++ b/src/strategy/generic/NewRpgStrategy.h @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license, you may redistribute it + * and/or modify it under version 2 of the License, or (at your option), any later version. + */ + +#ifndef _PLAYERBOT_NEWRPGSTRATEGY_H +#define _PLAYERBOT_NEWRPGSTRATEGY_H + +#include +#include "Strategy.h" +#include "TravelMgr.h" + +class PlayerbotAI; + +enum class NewRpgStatus +{ + // Going to far away place + GO_GRIND, + GO_INNKEEPER, + // Exploring nearby + NEAR_RANDOM, + NEAR_NPC, + // Idling + IDLE +}; + +struct NewRpgInfo +{ + NewRpgStatus status{NewRpgStatus::IDLE}; + WorldPosition grindPos{}; + uint32 lastGrind{0}; + uint32 lastNearNpc{0}; + std::string ToString() + { + std::stringstream out; + out << "Status: "; + switch (status) + { + case NewRpgStatus::GO_GRIND: + out << "GO_GRIND"; + break; + case NewRpgStatus::GO_INNKEEPER: + out << "GO_INNKEEPER"; + break; + case NewRpgStatus::NEAR_NPC: + out << "NEAR_NPC"; + break; + case NewRpgStatus::NEAR_RANDOM: + out << "NEAR_RANDOM"; + break; + case NewRpgStatus::IDLE: + out << "IDLE"; + break; + } + out << "\nGrindPos: " << grindPos.GetMapId() << " " << grindPos.GetPositionX() << " " << grindPos.GetPositionY() << " " << grindPos.GetPositionZ(); + out << "\nLastGrind: " << lastGrind; + return out.str(); + } +}; + +class NewRpgStrategy : public Strategy +{ +public: + NewRpgStrategy(PlayerbotAI* botAI); + + std::string const getName() override { return "new rpg"; } + NextAction** getDefaultActions() override; + void InitTriggers(std::vector& triggers) override; + void InitMultipliers(std::vector& multipliers) override; +}; + +#endif diff --git a/src/strategy/triggers/ChatTriggerContext.h b/src/strategy/triggers/ChatTriggerContext.h index af20f3a9..950cacb3 100644 --- a/src/strategy/triggers/ChatTriggerContext.h +++ b/src/strategy/triggers/ChatTriggerContext.h @@ -24,6 +24,7 @@ public: creators["reputation"] = &ChatTriggerContext::reputation; creators["log"] = &ChatTriggerContext::log; creators["los"] = &ChatTriggerContext::los; + creators["rpg status"] = &ChatTriggerContext::rpg_status; creators["aura"] = &ChatTriggerContext::aura; creators["drop"] = &ChatTriggerContext::drop; creators["share"] = &ChatTriggerContext::share; @@ -211,6 +212,7 @@ private: static Trigger* reputation(PlayerbotAI* botAI) { return new ChatCommandTrigger(botAI, "reputation"); } static Trigger* log(PlayerbotAI* botAI) { return new ChatCommandTrigger(botAI, "log"); } static Trigger* los(PlayerbotAI* botAI) { return new ChatCommandTrigger(botAI, "los"); } + static Trigger* rpg_status(PlayerbotAI* botAI) { return new ChatCommandTrigger(botAI, "rpg status"); } static Trigger* aura(PlayerbotAI* ai) { return new ChatCommandTrigger(ai, "aura"); } static Trigger* loot_all(PlayerbotAI* botAI) { return new ChatCommandTrigger(botAI, "add all loot"); } static Trigger* release(PlayerbotAI* botAI) { return new ChatCommandTrigger(botAI, "release"); } diff --git a/src/strategy/triggers/NewRpgTrigger.cpp b/src/strategy/triggers/NewRpgTrigger.cpp new file mode 100644 index 00000000..66354092 --- /dev/null +++ b/src/strategy/triggers/NewRpgTrigger.cpp @@ -0,0 +1,4 @@ +#include "NewRpgTriggers.h" +#include "PlayerbotAI.h" + +bool NewRpgStatusTrigger::IsActive() { return status == botAI->rpgInfo.status; } \ No newline at end of file diff --git a/src/strategy/triggers/NewRpgTriggers.h b/src/strategy/triggers/NewRpgTriggers.h new file mode 100644 index 00000000..9827d57e --- /dev/null +++ b/src/strategy/triggers/NewRpgTriggers.h @@ -0,0 +1,20 @@ +#ifndef _PLAYERBOT_NEWRPGTRIGGERS_H +#define _PLAYERBOT_NEWRPGTRIGGERS_H + +#include "NewRpgStrategy.h" +#include "Trigger.h" + +class NewRpgStatusTrigger : public Trigger +{ +public: + NewRpgStatusTrigger(PlayerbotAI* botAI, NewRpgStatus status = NewRpgStatus::IDLE) + : Trigger(botAI, "new rpg status"), status(status) + { + } + bool IsActive() override; + +protected: + NewRpgStatus status; +}; + +#endif diff --git a/src/strategy/triggers/TriggerContext.h b/src/strategy/triggers/TriggerContext.h index cbfeec6f..3bcc44c8 100644 --- a/src/strategy/triggers/TriggerContext.h +++ b/src/strategy/triggers/TriggerContext.h @@ -12,6 +12,8 @@ #include "LfgTriggers.h" #include "LootTriggers.h" #include "NamedObjectContext.h" +#include "NewRpgStrategy.h" +#include "NewRpgTriggers.h" #include "PvpTriggers.h" #include "RaidNaxxTriggers.h" #include "RpgTriggers.h" @@ -213,6 +215,8 @@ public: creators["rpg craft"] = &TriggerContext::rpg_craft; creators["rpg trade useful"] = &TriggerContext::rpg_trade_useful; creators["rpg duel"] = &TriggerContext::rpg_duel; + creators["go grind status"] = &TriggerContext::go_grind_status; + creators["near random status"] = &TriggerContext::near_random_status; } private: @@ -402,6 +406,8 @@ private: static Trigger* rpg_craft(PlayerbotAI* botAI) { return new RpgCraftTrigger(botAI); } static Trigger* rpg_trade_useful(PlayerbotAI* botAI) { return new RpgTradeUsefulTrigger(botAI); } static Trigger* rpg_duel(PlayerbotAI* botAI) { return new RpgDuelTrigger(botAI); } + static Trigger* go_grind_status(PlayerbotAI* botAI) { return new NewRpgStatusTrigger(botAI, NewRpgStatus::GO_GRIND); } + static Trigger* near_random_status(PlayerbotAI* botAI) { return new NewRpgStatusTrigger(botAI, NewRpgStatus::NEAR_RANDOM); } }; #endif diff --git a/src/strategy/values/DpsTargetValue.cpp b/src/strategy/values/DpsTargetValue.cpp index 88c52ccf..526f2e42 100644 --- a/src/strategy/values/DpsTargetValue.cpp +++ b/src/strategy/values/DpsTargetValue.cpp @@ -298,8 +298,9 @@ Unit* DpsTargetValue::Calculate() return rti; // FindLeastHpTargetStrategy strategy(botAI); + Group* group = bot->GetGroup(); float dps = AI_VALUE(float, "estimated group dps"); - if (botAI->IsCaster(bot)) + if (group && botAI->IsCaster(bot)) { CasterFindTargetSmartStrategy strategy(botAI, dps); return TargetValue::FindTarget(&strategy); diff --git a/src/strategy/values/GrindTargetValue.cpp b/src/strategy/values/GrindTargetValue.cpp index e6109463..b21f62a9 100644 --- a/src/strategy/values/GrindTargetValue.cpp +++ b/src/strategy/values/GrindTargetValue.cpp @@ -52,7 +52,7 @@ Unit* GrindTargetValue::FindTargetForGrinding(uint32 assistCount) float distance = 0; Unit* result = nullptr; - std::unordered_map needForQuestMap; + // std::unordered_map needForQuestMap; for (ObjectGuid const guid : targets) { @@ -99,18 +99,18 @@ Unit* GrindTargetValue::FindTargetForGrinding(uint32 assistCount) if (!bot->InBattleground() && (int)unit->GetLevel() - (int)bot->GetLevel() > 4 && !unit->GetGUID().IsPlayer()) continue; - if (needForQuestMap.find(unit->GetEntry()) == needForQuestMap.end()) - needForQuestMap[unit->GetEntry()] = needForQuest(unit); + // if (needForQuestMap.find(unit->GetEntry()) == needForQuestMap.end()) + // needForQuestMap[unit->GetEntry()] = needForQuest(unit); - if (!needForQuestMap[unit->GetEntry()]) - { - Creature* creature = dynamic_cast(unit); - if ((urand(0, 100) < 60 || (context->GetValue("travel target")->Get()->isWorking() && - context->GetValue("travel target")->Get()->getDestination()->getName() != "GrindTravelDestination"))) - { - continue; - } - } + // if (!needForQuestMap[unit->GetEntry()]) + // { + // Creature* creature = dynamic_cast(unit); + // if ((urand(0, 100) < 60 || (context->GetValue("travel target")->Get()->isWorking() && + // context->GetValue("travel target")->Get()->getDestination()->getName() != "GrindTravelDestination"))) + // { + // continue; + // } + // } if (Creature* creature = unit->ToCreature()) if (CreatureTemplate const* CreatureTemplate = creature->GetCreatureTemplate()) @@ -142,8 +142,7 @@ Unit* GrindTargetValue::FindTargetForGrinding(uint32 assistCount) else { float newdistance = bot->GetDistance(unit); - if (!result || (newdistance < distance && - urand(0, abs(distance - newdistance)) > sPlayerbotAIConfig->sightDistance * 0.1)) + if (!result || (newdistance < distance)) { distance = newdistance; result = unit; diff --git a/src/strategy/warlock/GenericWarlockNonCombatStrategy.cpp b/src/strategy/warlock/GenericWarlockNonCombatStrategy.cpp index a46346fe..4de01421 100644 --- a/src/strategy/warlock/GenericWarlockNonCombatStrategy.cpp +++ b/src/strategy/warlock/GenericWarlockNonCombatStrategy.cpp @@ -48,7 +48,7 @@ private: { return new ActionNode("summon succubus", /*P*/ nullptr, - /*A*/ NextAction::array(0, new NextAction("summon imp"), nullptr), + /*A*/ NextAction::array(0, new NextAction("summon voidwalker"), nullptr), /*C*/ nullptr); } static ActionNode* summon_felhunter([[maybe_unused]] PlayerbotAI* botAI) From dba84da6f3884b452062d66639919be00ca49a9a Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Mon, 2 Dec 2024 00:35:23 +0800 Subject: [PATCH 02/26] [New Rpg] Implement GO_INNKEEPER and NEAR_NPC status --- src/strategy/actions/ActionContext.h | 4 + src/strategy/actions/NewRpgAction.cpp | 209 +++++++++++++++--- src/strategy/actions/NewRpgAction.h | 25 ++- .../actions/ReviveFromCorpseAction.cpp | 2 +- src/strategy/generic/NewRpgStrategy.cpp | 6 + src/strategy/generic/NewRpgStrategy.h | 25 ++- src/strategy/triggers/TriggerContext.h | 4 + 7 files changed, 240 insertions(+), 35 deletions(-) diff --git a/src/strategy/actions/ActionContext.h b/src/strategy/actions/ActionContext.h index 163731bf..0ffe08eb 100644 --- a/src/strategy/actions/ActionContext.h +++ b/src/strategy/actions/ActionContext.h @@ -244,7 +244,9 @@ public: creators["new rpg status update"] = &ActionContext::new_rpg_status_update; creators["new rpg go grind"] = &ActionContext::new_rpg_go_grind; + creators["new rpg go innkeeper"] = &ActionContext::new_rpg_go_innkeeper; creators["new rpg move random"] = &ActionContext::new_rpg_move_random; + creators["new rpg move npc"] = &ActionContext::new_rpg_move_npc; } private: @@ -423,7 +425,9 @@ private: static Action* new_rpg_status_update(PlayerbotAI* ai) { return new NewRpgStatusUpdateAction(ai); } static Action* new_rpg_go_grind(PlayerbotAI* ai) { return new NewRpgGoGrindAction(ai); } + static Action* new_rpg_go_innkeeper(PlayerbotAI* ai) { return new NewRpgGoInnKeeperAction(ai); } static Action* new_rpg_move_random(PlayerbotAI* ai) { return new NewRpgMoveRandomAction(ai); } + static Action* new_rpg_move_npc(PlayerbotAI* ai) { return new NewRpgMoveNpcAction(ai); } }; #endif diff --git a/src/strategy/actions/NewRpgAction.cpp b/src/strategy/actions/NewRpgAction.cpp index 6fe6e488..a5e61dea 100644 --- a/src/strategy/actions/NewRpgAction.cpp +++ b/src/strategy/actions/NewRpgAction.cpp @@ -3,6 +3,7 @@ #include #include "NewRpgStrategy.h" +#include "ObjectDefines.h" #include "ObjectGuid.h" #include "PathGenerator.h" #include "Player.h" @@ -28,27 +29,45 @@ bool NewRpgStatusUpdateAction::Execute(Event event) { case NewRpgStatus::IDLE: { - // // IDLE -> NEAR_NPC - // if (!info.lastNearNpc || info.lastNearNpc + setNpcInterval < getMSTime() && urand(1, 100) <= 50) - // { - // info.lastNearNpc = getMSTime(); - // GuidVector possibleTargets = AI_VALUE(GuidVector, "possible rpg targets"); - // if (possibleTargets.empty()) - // break; - // info.status = NewRpgStatus::NEAR_NPC; - // } - // IDLE -> GO_GRIND - if (!info.lastGrind || info.lastGrind + setGrindInterval < getMSTime()) + uint32 roll = urand(1, 100); + // IDLE -> NEAR_NPC + // if ((!info.lastNearNpc || info.lastNearNpc + setNpcInterval < getMSTime()) && roll <= 30) + if (roll <= 20) + { + info.lastNearNpc = getMSTime(); + GuidVector possibleTargets = AI_VALUE(GuidVector, "possible rpg targets"); + if (possibleTargets.empty()) + break; + info.status = NewRpgStatus::NEAR_NPC; + return true; + } + // IDLE -> GO_INNKEEPER + if (bot->GetLevel() >= 6 && roll <= 30) + { + WorldPosition pos = SelectRandomInnKeeperPos(); + if (pos == WorldPosition() || bot->GetExactDist(pos) < 50.0f) + break; + info.lastGoInnKeeper = getMSTime(); + info.status = NewRpgStatus::GO_INNKEEPER; + info.innKeeperPos = pos; + return true; + } + // IDLE -> GO_GRIND + if (roll <= 90) { - info.lastGrind = getMSTime(); WorldPosition pos = SelectRandomGrindPos(); if (pos == WorldPosition()) break; + info.lastGoGrind = getMSTime(); info.status = NewRpgStatus::GO_GRIND; info.grindPos = pos; return true; } - break; + // IDLE -> REST + info.status = NewRpgStatus::REST; + info.lastRest = getMSTime(); + bot->SetStandState(UNIT_STAND_STATE_SIT); + return true; } case NewRpgStatus::GO_GRIND: { @@ -58,33 +77,62 @@ bool NewRpgStatusUpdateAction::Execute(Event event) if (bot->GetExactDist(originalPos) < 10.0f) { info.status = NewRpgStatus::NEAR_RANDOM; + info.lastNearRandom = getMSTime(); info.grindPos = WorldPosition(); return true; } - // just choose another grindPos - if (!info.lastGrind || info.lastGrind + setGrindInterval < getMSTime()) + // // just choose another grindPos + // if (!info.lastGoGrind || info.lastGoGrind + setGrindInterval < getMSTime()) + // { + // WorldPosition pos = SelectRandomGrindPos(); + // if (pos == WorldPosition()) + // break; + // info.status = NewRpgStatus::GO_GRIND; + // info.lastGoGrind = getMSTime(); + // info.grindPos = pos; + // return true; + // } + break; + } + case NewRpgStatus::GO_INNKEEPER: + { + WorldPosition& originalPos = info.innKeeperPos; + assert(info.grindPos != WorldPosition()); + // GO_INNKEEPER -> NEAR_NPC + if (bot->GetExactDist(originalPos) < 10.0f) { - WorldPosition pos = SelectRandomGrindPos(); - if (pos == WorldPosition()) - break; - info.status = NewRpgStatus::GO_GRIND; - info.lastGrind = getMSTime(); - info.grindPos = pos; + info.lastNearNpc = getMSTime(); + info.status = NewRpgStatus::NEAR_NPC; + info.innKeeperPos = WorldPosition(); return true; } break; } case NewRpgStatus::NEAR_RANDOM: { - // NEAR_RANDOM -> GO_GRIND - if (!info.lastGrind || info.lastGrind + setGrindInterval < getMSTime()) + // NEAR_RANDOM -> IDLE + if (info.lastNearRandom + statusNearRandomDuration < getMSTime()) { - WorldPosition pos = SelectRandomGrindPos(); - if (pos == WorldPosition()) - break; - info.lastGrind = getMSTime(); - botAI->rpgInfo.status = NewRpgStatus::GO_GRIND; - botAI->rpgInfo.grindPos = pos; + info.status = NewRpgStatus::IDLE; + return true; + } + break; + } + case NewRpgStatus::NEAR_NPC: + { + if (info.lastNearNpc + statusNearNpcDuration < getMSTime()) + { + info.status = NewRpgStatus::IDLE; + return true; + } + break; + } + case NewRpgStatus::REST: + { + // REST -> IDLE + if (info.lastRest + statusRestDuration < getMSTime()) + { + info.status = NewRpgStatus::IDLE; return true; } break; @@ -131,6 +179,35 @@ WorldPosition NewRpgStatusUpdateAction::SelectRandomGrindPos() return dest; } +WorldPosition NewRpgStatusUpdateAction::SelectRandomInnKeeperPos() +{ + const std::vector& locs = IsAlliance(bot->getRace()) + ? sRandomPlayerbotMgr->allianceInnkeeperPerLevelCache[bot->GetLevel()] + : sRandomPlayerbotMgr->hordeInnkeeperPerLevelCache[bot->GetLevel()]; + std::vector prepared_locs; + for (auto& loc : locs) + { + if (bot->GetMapId() != loc.GetMapId()) + continue; + + float range = bot->GetLevel() <= 5 ? 500.0f : 2500.0f; + if (bot->GetExactDist(loc) < range) + { + prepared_locs.push_back(loc); + } + } + WorldPosition dest; + if (!prepared_locs.empty()) + { + uint32 idx = urand(0, prepared_locs.size() - 1); + dest = prepared_locs[idx]; + } + LOG_INFO("playerbots", "[New Rpg] Bot {} select random inn keeper pos Map:{} X:{} Y:{} Z:{} ({} available in {})", + bot->GetName(), dest.GetMapId(), dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(), + prepared_locs.size(), locs.size()); + return dest; +} + bool NewRpgGoFarAwayPosAction::MoveFarTo(WorldPosition dest) { float dis = bot->GetExactDist(dest); @@ -184,6 +261,8 @@ bool NewRpgGoFarAwayPosAction::MoveFarTo(WorldPosition dest) bool NewRpgGoGrindAction::Execute(Event event) { return MoveFarTo(botAI->rpgInfo.grindPos); } +bool NewRpgGoInnKeeperAction::Execute(Event event) { return MoveFarTo(botAI->rpgInfo.innKeeperPos); } + bool NewRpgMoveRandomAction::Execute(Event event) { float distance = rand_norm() * moveStep; @@ -211,4 +290,76 @@ bool NewRpgMoveRandomAction::Execute(Event event) } return false; +} + +bool NewRpgMoveNpcAction::Execute(Event event) +{ + NewRpgInfo& info = botAI->rpgInfo; + if (!info.npcPos) + { + GuidVector possibleTargets = AI_VALUE(GuidVector, "possible rpg targets"); + if (possibleTargets.empty()) + return false; + int idx = urand(0, possibleTargets.size() - 1); + ObjectGuid guid = possibleTargets[idx]; + Unit* unit = botAI->GetUnit(guid); + if (unit) + { + info.npcPos = GuidPosition(unit); + info.lastReachNpc = 0; + } + else + return false; + } + + if (bot->GetDistance(info.npcPos) <= INTERACTION_DISTANCE) + { + if (!info.lastReachNpc) + { + info.lastReachNpc = getMSTime(); + return true; + } + + if (info.lastReachNpc && info.lastReachNpc + stayTime > getMSTime()) + return false; + + info.npcPos = GuidPosition(); + info.lastReachNpc = 0; + } + else + { + assert(info.npcPos); + Unit* unit = botAI->GetUnit(info.npcPos); + if (!unit) + return false; + float x = unit->GetPositionX(); + float y = unit->GetPositionY(); + float z = unit->GetPositionZ(); + float mapId = unit->GetMapId(); + float angle = 0.f; + if (bot->IsWithinLOS(x, y, z)) + { + if (!unit->isMoving()) + angle = unit->GetAngle(bot) + (M_PI * irand(-25, 25) / 100.0); // Closest 45 degrees towards the target + else + angle = unit->GetOrientation() + + (M_PI * irand(-25, 25) / 100.0); // 45 degrees infront of target (leading it's movement) + } + else + angle = 2 * M_PI * rand_norm(); // A circle around the target. + + x += cos(angle) * INTERACTION_DISTANCE * rand_norm(); + y += sin(angle) * INTERACTION_DISTANCE * rand_norm(); + bool exact = true; + if (!unit->GetMap()->CheckCollisionAndGetValidCoords(unit, unit->GetPositionX(), unit->GetPositionY(), + unit->GetPositionZ(), x, y, z)) + { + x = unit->GetPositionX(); + y = unit->GetPositionY(); + z = unit->GetPositionZ(); + exact = false; + } + return MoveTo(mapId, x, y, z, false, false, false, exact); + } + return true; } \ No newline at end of file diff --git a/src/strategy/actions/NewRpgAction.h b/src/strategy/actions/NewRpgAction.h index a2ea84a5..bb07581a 100644 --- a/src/strategy/actions/NewRpgAction.h +++ b/src/strategy/actions/NewRpgAction.h @@ -21,9 +21,13 @@ public: NewRpgStatusUpdateAction(PlayerbotAI* botAI) : Action(botAI, "new rpg status update") {} bool Execute(Event event) override; protected: - const int32 setGrindInterval = 5 * 60 * 1000; - const int32 setNpcInterval = 5 * 60 * 1000; + // const int32 setGrindInterval = 5 * 60 * 1000; + // const int32 setNpcInterval = 1 * 60 * 1000; + const int32 statusNearNpcDuration = 3 * 60 * 1000; + const int32 statusNearRandomDuration = 3 * 60 * 1000; + const int32 statusRestDuration = 1 * 60 * 1000; WorldPosition SelectRandomGrindPos(); + WorldPosition SelectRandomInnKeeperPos(); }; class NewRpgGoFarAwayPosAction : public MovementAction @@ -45,6 +49,14 @@ public: bool Execute(Event event) override; }; +class NewRpgGoInnKeeperAction : public NewRpgGoFarAwayPosAction +{ +public: + NewRpgGoInnKeeperAction(PlayerbotAI* botAI) : NewRpgGoFarAwayPosAction(botAI, "new rpg go innkeeper") {} + bool Execute(Event event) override; +}; + + class NewRpgMoveRandomAction : public MovementAction { public: @@ -54,4 +66,13 @@ protected: const float moveStep = 50.0f; }; +class NewRpgMoveNpcAction : public MovementAction +{ +public: + NewRpgMoveNpcAction(PlayerbotAI* botAI) : MovementAction(botAI, "new rpg move npcs") {} + bool Execute(Event event) override; +protected: + const uint32 stayTime = 8 * 1000; +}; + #endif \ No newline at end of file diff --git a/src/strategy/actions/ReviveFromCorpseAction.cpp b/src/strategy/actions/ReviveFromCorpseAction.cpp index 1f61df3b..6cab4206 100644 --- a/src/strategy/actions/ReviveFromCorpseAction.cpp +++ b/src/strategy/actions/ReviveFromCorpseAction.cpp @@ -188,7 +188,7 @@ bool FindCorpseAction::Execute(Event event) if (!moved) { - moved = botAI->DoSpecificAction("spirit healer"); + moved = botAI->DoSpecificAction("spirit healer", Event(), true); } } } diff --git a/src/strategy/generic/NewRpgStrategy.cpp b/src/strategy/generic/NewRpgStrategy.cpp index a2a38c5c..82bd03ba 100644 --- a/src/strategy/generic/NewRpgStrategy.cpp +++ b/src/strategy/generic/NewRpgStrategy.cpp @@ -18,9 +18,15 @@ void NewRpgStrategy::InitTriggers(std::vector& triggers) { triggers.push_back( new TriggerNode("go grind status", NextAction::array(0, new NextAction("new rpg go grind", 1.0f), nullptr))); + + triggers.push_back( + new TriggerNode("go innkeeper status", NextAction::array(0, new NextAction("new rpg go innkeeper", 1.0f), nullptr))); triggers.push_back( new TriggerNode("near random status", NextAction::array(0, new NextAction("new rpg move random", 1.0f), nullptr))); + + triggers.push_back( + new TriggerNode("near npc status", NextAction::array(0, new NextAction("new rpg move npc", 1.0f), nullptr))); } void NewRpgStrategy::InitMultipliers(std::vector& multipliers) diff --git a/src/strategy/generic/NewRpgStrategy.h b/src/strategy/generic/NewRpgStrategy.h index c23ee9b2..52d990c8 100644 --- a/src/strategy/generic/NewRpgStrategy.h +++ b/src/strategy/generic/NewRpgStrategy.h @@ -20,16 +20,30 @@ enum class NewRpgStatus // Exploring nearby NEAR_RANDOM, NEAR_NPC, - // Idling + // Taking a break + REST, + // Initial status IDLE }; struct NewRpgInfo { NewRpgStatus status{NewRpgStatus::IDLE}; + // NewRpgStatus::GO_GRIND WorldPosition grindPos{}; - uint32 lastGrind{0}; + uint32 lastGoGrind{0}; + // NewRpgStatus::GO_INNKEEPER + WorldPosition innKeeperPos{}; + uint32 lastGoInnKeeper{0}; + // NewRpgStatus::NEAR_NPC + GuidPosition npcPos{}; uint32 lastNearNpc{0}; + uint32 lastReachNpc{0}; + // NewRpgStatus::NEAR_RANDOM + uint32 lastNearRandom{0}; + // NewRpgStatus::REST + uint32 lastRest{0}; + std::string ToString() { std::stringstream out; @@ -51,9 +65,14 @@ struct NewRpgInfo case NewRpgStatus::IDLE: out << "IDLE"; break; + case NewRpgStatus::REST: + out << "REST"; + break; + default: + out << "UNKNOWN"; } out << "\nGrindPos: " << grindPos.GetMapId() << " " << grindPos.GetPositionX() << " " << grindPos.GetPositionY() << " " << grindPos.GetPositionZ(); - out << "\nLastGrind: " << lastGrind; + out << "\nlastGoGrind: " << lastGoGrind; return out.str(); } }; diff --git a/src/strategy/triggers/TriggerContext.h b/src/strategy/triggers/TriggerContext.h index 3bcc44c8..2a18c0a1 100644 --- a/src/strategy/triggers/TriggerContext.h +++ b/src/strategy/triggers/TriggerContext.h @@ -216,7 +216,9 @@ public: creators["rpg trade useful"] = &TriggerContext::rpg_trade_useful; creators["rpg duel"] = &TriggerContext::rpg_duel; creators["go grind status"] = &TriggerContext::go_grind_status; + creators["go innkeeper status"] = &TriggerContext::go_innkeeper_status; creators["near random status"] = &TriggerContext::near_random_status; + creators["near npc status"] = &TriggerContext::near_npc_status; } private: @@ -407,7 +409,9 @@ private: static Trigger* rpg_trade_useful(PlayerbotAI* botAI) { return new RpgTradeUsefulTrigger(botAI); } static Trigger* rpg_duel(PlayerbotAI* botAI) { return new RpgDuelTrigger(botAI); } static Trigger* go_grind_status(PlayerbotAI* botAI) { return new NewRpgStatusTrigger(botAI, NewRpgStatus::GO_GRIND); } + static Trigger* go_innkeeper_status(PlayerbotAI* botAI) { return new NewRpgStatusTrigger(botAI, NewRpgStatus::GO_INNKEEPER); } static Trigger* near_random_status(PlayerbotAI* botAI) { return new NewRpgStatusTrigger(botAI, NewRpgStatus::NEAR_RANDOM); } + static Trigger* near_npc_status(PlayerbotAI* botAI) { return new NewRpgStatusTrigger(botAI, NewRpgStatus::NEAR_NPC); } }; #endif From bb3328670b5b503c5f4d3dfed7b13397381be638 Mon Sep 17 00:00:00 2001 From: Yunfan Date: Mon, 2 Dec 2024 11:42:31 +0800 Subject: [PATCH 03/26] Remove redundant logs (set to debug level) --- src/RandomPlayerbotMgr.cpp | 62 +++++++++++++++++++-------- src/RandomPlayerbotMgr.h | 1 + src/strategy/actions/NewRpgAction.cpp | 4 +- 3 files changed, 47 insertions(+), 20 deletions(-) diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index fe475e08..caf594bf 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -30,6 +31,7 @@ #include "GuildTaskMgr.h" #include "LFGMgr.h" #include "MapMgr.h" +#include "NewRpgStrategy.h" #include "PerformanceMonitor.h" #include "Player.h" #include "PlayerbotAI.h" @@ -359,6 +361,17 @@ void RandomPlayerbotMgr::UpdateAIInternal(uint32 elapsed, bool /*minimal*/) activateCheckLfgQueueThread(); } + if (time(nullptr) > (printStatsTimer + 300)) + { + if (!printStatsTimer) + { + printStatsTimer = time(nullptr); + } + else + { + activatePrintStatsThread(); + } + } uint32 updateBots = sPlayerbotAIConfig->randomBotsPerInterval * onlineBotFocus / 100; uint32 maxNewBots = onlineBotCount < maxAllowedBotCount ? maxAllowedBotCount - onlineBotCount : 0; uint32 loginBots = std::min(sPlayerbotAIConfig->randomBotsPerInterval - updateBots, maxNewBots); @@ -593,7 +606,7 @@ void RandomPlayerbotMgr::CheckBgQueue() BgCheckTimer = time(nullptr); - LOG_INFO("playerbots", "Checking BG Queue..."); + LOG_DEBUG("playerbots", "Checking BG Queue..."); BattlegroundData.clear(); @@ -900,7 +913,7 @@ void RandomPlayerbotMgr::LogBattlegroundInfo() bgInfo.bgHordePlayerCount + bgInfo.bgHordeBotCount, bgInfo.bgInstanceCount); } } - LOG_INFO("playerbots", "BG Queue check finished"); + LOG_DEBUG("playerbots", "BG Queue check finished"); } void RandomPlayerbotMgr::CheckLfgQueue() @@ -908,7 +921,7 @@ void RandomPlayerbotMgr::CheckLfgQueue() if (!LfgCheckTimer || time(nullptr) > (LfgCheckTimer + 30)) LfgCheckTimer = time(nullptr); - LOG_INFO("playerbots", "Checking LFG Queue..."); + LOG_DEBUG("playerbots", "Checking LFG Queue..."); // Clear LFG list LfgDungeons[TEAM_ALLIANCE].clear(); @@ -938,7 +951,7 @@ void RandomPlayerbotMgr::CheckLfgQueue() } } - LOG_INFO("playerbots", "LFG Queue check finished"); + LOG_DEBUG("playerbots", "LFG Queue check finished"); } void RandomPlayerbotMgr::CheckPlayers() @@ -1129,7 +1142,7 @@ bool RandomPlayerbotMgr::ProcessBot(Player* player) uint32 randomTime = urand( sPlayerbotAIConfig->minRandomBotReviveTime, sPlayerbotAIConfig->maxRandomBotReviveTime); - LOG_INFO("playerbots", "Mark bot {} as dead, will be revived in {}s.", + LOG_DEBUG("playerbots", "Mark bot {} as dead, will be revived in {}s.", player->GetName().c_str(), randomTime); SetEventValue(bot, "dead", 1, sPlayerbotAIConfig->maxRandomBotInWorldTime); SetEventValue(bot, "revive", 1, randomTime); @@ -1199,7 +1212,7 @@ bool RandomPlayerbotMgr::ProcessBot(Player* player) // if (randomiser) // { Randomize(player); - LOG_INFO("playerbots", "Bot #{} {}:{} <{}>: randomized", + LOG_DEBUG("playerbots", "Bot #{} {}:{} <{}>: randomized", bot, player->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", player->GetLevel(), player->GetName()); uint32 randomTime = urand( sPlayerbotAIConfig->minRandomBotRandomizeTime, @@ -1219,7 +1232,7 @@ bool RandomPlayerbotMgr::ProcessBot(Player* player) uint32 teleport = GetEventValue(bot, "teleport"); if (!teleport) { - LOG_INFO("playerbots", "Bot #{} <{}>: teleport for level and refresh", bot, player->GetName()); + LOG_DEBUG("playerbots", "Bot #{} <{}>: teleport for level and refresh", bot, player->GetName()); Refresh(player); RandomTeleportForLevel(player); uint32 time = urand( @@ -1364,7 +1377,7 @@ void RandomPlayerbotMgr::RandomTeleport(Player* bot, std::vector& } const LocaleConstant& locale = sWorld->GetDefaultDbcLocale(); - LOG_INFO("playerbots", + LOG_DEBUG("playerbots", "Random teleporting bot {} (level {}) to Map: {} ({}) Zone: {} ({}) Area: {} ({}) ZoneLevel: {} AreaLevel: {} {},{},{} ({}/{} " "locations)", bot->GetName().c_str(), bot->GetLevel(), map->GetId(), map->GetMapName(), zone->ID, @@ -1503,7 +1516,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() continue; const AreaTableEntry* area = sAreaTableStore.LookupEntry(map->GetAreaId(1, x, y, z)); uint32 level = area->area_level; - LOG_INFO("playerbots", "Area: {} Level: {} creature_entry: {}", area->ID, level, c_entry); + // LOG_INFO("playerbots", "Area: {} Level: {} creature_entry: {}", area->ID, level, c_entry); int range = level <= 10 ? 6 : 8; for (int32 l = (int32)level; l <= (int32)level + range; l++) { @@ -2456,7 +2469,8 @@ Player* RandomPlayerbotMgr::GetRandomPlayer() void RandomPlayerbotMgr::PrintStats() { - LOG_INFO("playerbots", "{} Random Bots online", playerBots.size()); + printStatsTimer = time(nullptr); + LOG_INFO("playerbots", "Random Bots Stats: {} online", playerBots.size()); std::map alliance, horde; for (uint32 i = 0; i < 10; ++i) @@ -2498,6 +2512,7 @@ void RandomPlayerbotMgr::PrintStats() uint32 engine_dead = 0; uint32 stateCount[MAX_TRAVEL_STATE + 1] = {0}; std::vector> questCount; + std::unordered_map rpgStatusCount; for (PlayerBotMap::iterator i = playerBots.begin(); i != playerBots.end(); ++i) { Player* bot = i->second; @@ -2566,6 +2581,9 @@ void RandomPlayerbotMgr::PrintStats() else ++dps; + if (sPlayerbotAIConfig->enableNewRpgStrategy) + rpgStatusCount[botAI->rpgInfo.status]++; + if (TravelTarget* target = botAI->GetAiObjectContext()->GetValue("travel target")->Get()) { TravelState state = target->getTravelState(); @@ -2644,19 +2662,27 @@ void RandomPlayerbotMgr::PrintStats() LOG_INFO("playerbots", " In Rest: {}", rest); LOG_INFO("playerbots", " Dead: {}", dead); + LOG_INFO("playerbots", "Bots rpg status:", dead); + LOG_INFO("playerbots", " IDLE: {}", rpgStatusCount[NewRpgStatus::IDLE]); + LOG_INFO("playerbots", " REST: {}", rpgStatusCount[NewRpgStatus::REST]); + LOG_INFO("playerbots", " GO_GRIND: {}", rpgStatusCount[NewRpgStatus::GO_GRIND]); + LOG_INFO("playerbots", " GO_INNKEEPER: {}", rpgStatusCount[NewRpgStatus::GO_INNKEEPER]); + LOG_INFO("playerbots", " NEAR_RANDOM: {}", rpgStatusCount[NewRpgStatus::NEAR_RANDOM]); + LOG_INFO("playerbots", " NEAR_NPC: {}", rpgStatusCount[NewRpgStatus::NEAR_NPC]); + LOG_INFO("playerbots", "Bots engine:", dead); LOG_INFO("playerbots", " Non-combat: {}", engine_noncombat); LOG_INFO("playerbots", " Combat: {}", engine_combat); LOG_INFO("playerbots", " Dead: {}", engine_dead); - LOG_INFO("playerbots", "Bots questing:"); - LOG_INFO("playerbots", " Picking quests: {}", - stateCount[TRAVEL_STATE_TRAVEL_PICK_UP_QUEST] + stateCount[TRAVEL_STATE_WORK_PICK_UP_QUEST]); - LOG_INFO("playerbots", " Doing quests: {}", - stateCount[TRAVEL_STATE_TRAVEL_DO_QUEST] + stateCount[TRAVEL_STATE_WORK_DO_QUEST]); - LOG_INFO("playerbots", " Completing quests: {}", - stateCount[TRAVEL_STATE_TRAVEL_HAND_IN_QUEST] + stateCount[TRAVEL_STATE_WORK_HAND_IN_QUEST]); - LOG_INFO("playerbots", " Idling: {}", stateCount[TRAVEL_STATE_IDLE]); + // LOG_INFO("playerbots", "Bots questing:"); + // LOG_INFO("playerbots", " Picking quests: {}", + // stateCount[TRAVEL_STATE_TRAVEL_PICK_UP_QUEST] + stateCount[TRAVEL_STATE_WORK_PICK_UP_QUEST]); + // LOG_INFO("playerbots", " Doing quests: {}", + // stateCount[TRAVEL_STATE_TRAVEL_DO_QUEST] + stateCount[TRAVEL_STATE_WORK_DO_QUEST]); + // LOG_INFO("playerbots", " Completing quests: {}", + // stateCount[TRAVEL_STATE_TRAVEL_HAND_IN_QUEST] + stateCount[TRAVEL_STATE_WORK_HAND_IN_QUEST]); + // LOG_INFO("playerbots", " Idling: {}", stateCount[TRAVEL_STATE_IDLE]); /*sort(questCount.begin(), questCount.end(), [](std::pair i, std::pair j) {return i.second > j.second; }); diff --git a/src/RandomPlayerbotMgr.h b/src/RandomPlayerbotMgr.h index 60d8d8d0..906c1b9f 100644 --- a/src/RandomPlayerbotMgr.h +++ b/src/RandomPlayerbotMgr.h @@ -192,6 +192,7 @@ private: time_t BgCheckTimer; time_t LfgCheckTimer; time_t PlayersCheckTimer; + time_t printStatsTimer; uint32 AddRandomBots(); bool ProcessBot(uint32 bot); void ScheduleRandomize(uint32 bot, uint32 time); diff --git a/src/strategy/actions/NewRpgAction.cpp b/src/strategy/actions/NewRpgAction.cpp index a5e61dea..f637b784 100644 --- a/src/strategy/actions/NewRpgAction.cpp +++ b/src/strategy/actions/NewRpgAction.cpp @@ -173,7 +173,7 @@ WorldPosition NewRpgStatusUpdateAction::SelectRandomGrindPos() uint32 idx = urand(0, lo_prepared_locs.size() - 1); dest = lo_prepared_locs[idx]; } - LOG_INFO("playerbots", "[New Rpg] Bot {} select random grind pos Map:{} X:{} Y:{} Z:{} ({}+{} available in {})", + LOG_DEBUG("playerbots", "[New Rpg] Bot {} select random grind pos Map:{} X:{} Y:{} Z:{} ({}+{} available in {})", bot->GetName(), dest.GetMapId(), dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(), hi_prepared_locs.size(), lo_prepared_locs.size() - hi_prepared_locs.size(), locs.size()); return dest; @@ -202,7 +202,7 @@ WorldPosition NewRpgStatusUpdateAction::SelectRandomInnKeeperPos() uint32 idx = urand(0, prepared_locs.size() - 1); dest = prepared_locs[idx]; } - LOG_INFO("playerbots", "[New Rpg] Bot {} select random inn keeper pos Map:{} X:{} Y:{} Z:{} ({} available in {})", + LOG_DEBUG("playerbots", "[New Rpg] Bot {} select random inn keeper pos Map:{} X:{} Y:{} Z:{} ({} available in {})", bot->GetName(), dest.GetMapId(), dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(), prepared_locs.size(), locs.size()); return dest; From 5ca7c719201bcd81c8dadf0196193e2ddfd3d4a6 Mon Sep 17 00:00:00 2001 From: Yunfan Date: Mon, 2 Dec 2024 11:48:51 +0800 Subject: [PATCH 04/26] Logs and rpg status for new rpg strats --- src/RandomPlayerbotMgr.cpp | 20 +++++++++++--------- src/strategy/generic/NewRpgStrategy.h | 11 +++++++++-- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index caf594bf..b24cf8d9 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -2661,15 +2661,17 @@ void RandomPlayerbotMgr::PrintStats() LOG_INFO("playerbots", " In BG: {}", inBg); LOG_INFO("playerbots", " In Rest: {}", rest); LOG_INFO("playerbots", " Dead: {}", dead); - - LOG_INFO("playerbots", "Bots rpg status:", dead); - LOG_INFO("playerbots", " IDLE: {}", rpgStatusCount[NewRpgStatus::IDLE]); - LOG_INFO("playerbots", " REST: {}", rpgStatusCount[NewRpgStatus::REST]); - LOG_INFO("playerbots", " GO_GRIND: {}", rpgStatusCount[NewRpgStatus::GO_GRIND]); - LOG_INFO("playerbots", " GO_INNKEEPER: {}", rpgStatusCount[NewRpgStatus::GO_INNKEEPER]); - LOG_INFO("playerbots", " NEAR_RANDOM: {}", rpgStatusCount[NewRpgStatus::NEAR_RANDOM]); - LOG_INFO("playerbots", " NEAR_NPC: {}", rpgStatusCount[NewRpgStatus::NEAR_NPC]); - + if (sPlayerbotAIConfig->enableNewRpgStrategy) + { + LOG_INFO("playerbots", "Bots rpg status:", dead); + LOG_INFO("playerbots", " IDLE: {}", rpgStatusCount[NewRpgStatus::IDLE]); + LOG_INFO("playerbots", " REST: {}", rpgStatusCount[NewRpgStatus::REST]); + LOG_INFO("playerbots", " GO_GRIND: {}", rpgStatusCount[NewRpgStatus::GO_GRIND]); + LOG_INFO("playerbots", " GO_INNKEEPER: {}", rpgStatusCount[NewRpgStatus::GO_INNKEEPER]); + LOG_INFO("playerbots", " NEAR_RANDOM: {}", rpgStatusCount[NewRpgStatus::NEAR_RANDOM]); + LOG_INFO("playerbots", " NEAR_NPC: {}", rpgStatusCount[NewRpgStatus::NEAR_NPC]); + } + LOG_INFO("playerbots", "Bots engine:", dead); LOG_INFO("playerbots", " Non-combat: {}", engine_noncombat); LOG_INFO("playerbots", " Combat: {}", engine_combat); diff --git a/src/strategy/generic/NewRpgStrategy.h b/src/strategy/generic/NewRpgStrategy.h index 52d990c8..93adff84 100644 --- a/src/strategy/generic/NewRpgStrategy.h +++ b/src/strategy/generic/NewRpgStrategy.h @@ -52,27 +52,34 @@ struct NewRpgInfo { case NewRpgStatus::GO_GRIND: out << "GO_GRIND"; + out << "\nGrindPos: " << grindPos.GetMapId() << " " << grindPos.GetPositionX() << " " << grindPos.GetPositionY() << " " << grindPos.GetPositionZ(); + out << "\nlastGoGrind: " << lastGoGrind; break; case NewRpgStatus::GO_INNKEEPER: out << "GO_INNKEEPER"; + out << "\nInnKeeperPos: " << innKeeperPos.GetMapId() << " " << innKeeperPos.GetPositionX() << " " << innKeeperPos.GetPositionY() << " " << innKeeperPos.GetPositionZ(); + out << "\nlastGoInnKeeper: " << lastGoInnKeeper; break; case NewRpgStatus::NEAR_NPC: out << "NEAR_NPC"; + out << "\nNpcPos: " << npcPos.GetMapId() << " " << npcPos.GetPositionX() << " " << npcPos.GetPositionY() << " " << npcPos.GetPositionZ(); + out << "\nlastNearNpc: " << lastNearNpc; + out << "\nlastReachNpc: " << lastReachNpc; break; case NewRpgStatus::NEAR_RANDOM: out << "NEAR_RANDOM"; + out << "\nlastNearNpc: " << lastNearRandom; break; case NewRpgStatus::IDLE: out << "IDLE"; break; case NewRpgStatus::REST: out << "REST"; + out << "\nlastNearNpc: " << lastRest; break; default: out << "UNKNOWN"; } - out << "\nGrindPos: " << grindPos.GetMapId() << " " << grindPos.GetPositionX() << " " << grindPos.GetPositionY() << " " << grindPos.GetPositionZ(); - out << "\nlastGoGrind: " << lastGoGrind; return out.str(); } }; From 5c3591ae5ae0d5a0b908e1f92b755531a02e6fd8 Mon Sep 17 00:00:00 2001 From: Yunfan Date: Mon, 2 Dec 2024 15:28:30 +0800 Subject: [PATCH 05/26] Update random bots level stats --- src/RandomPlayerbotMgr.cpp | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index b24cf8d9..1c5ef029 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -2513,13 +2513,15 @@ void RandomPlayerbotMgr::PrintStats() uint32 stateCount[MAX_TRAVEL_STATE + 1] = {0}; std::vector> questCount; std::unordered_map rpgStatusCount; + uint8 maxBotLevel = 0; for (PlayerBotMap::iterator i = playerBots.begin(); i != playerBots.end(); ++i) { Player* bot = i->second; if (IsAlliance(bot->getRace())) - ++alliance[bot->GetLevel() / 10]; + ++alliance[bot->GetLevel()]; else - ++horde[bot->GetLevel() / 10]; + ++horde[bot->GetLevel()]; + maxBotLevel = std::max(maxBotLevel, bot->GetLevel()); ++perRace[bot->getRace()]; ++perClass[bot->getClass()]; @@ -2613,18 +2615,22 @@ void RandomPlayerbotMgr::PrintStats() } LOG_INFO("playerbots", "Bots level:"); - uint32 maxLevel = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); - for (uint8 i = 0; i < 10; ++i) + // uint32 maxLevel = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); + uint32 currentAlliance = 0, currentHorde = 0; + uint32 step = std::max(1, (maxBotLevel + 4) / 8); + uint32 from = 1; + for (uint8 i = 1; i <= maxBotLevel; ++i) { - if (!alliance[i] && !horde[i]) - continue; + currentAlliance += alliance[i]; + currentHorde += horde[i]; - uint32 from = i * 10; - uint32 to = std::min(from + 9, maxLevel); - if (!from) - from = 1; - - LOG_INFO("playerbots", " {}..{}: {} alliance, {} horde", from, to, alliance[i], horde[i]); + if (((i + 1) % step == 0) || i == maxBotLevel) + { + LOG_INFO("playerbots", " {}..{}: {} alliance, {} horde", from, i, currentAlliance, currentHorde); + currentAlliance = 0; + currentHorde = 0; + from = i + 1; + } } LOG_INFO("playerbots", "Bots race:"); @@ -2671,7 +2677,7 @@ void RandomPlayerbotMgr::PrintStats() LOG_INFO("playerbots", " NEAR_RANDOM: {}", rpgStatusCount[NewRpgStatus::NEAR_RANDOM]); LOG_INFO("playerbots", " NEAR_NPC: {}", rpgStatusCount[NewRpgStatus::NEAR_NPC]); } - + LOG_INFO("playerbots", "Bots engine:", dead); LOG_INFO("playerbots", " Non-combat: {}", engine_noncombat); LOG_INFO("playerbots", " Combat: {}", engine_combat); From 87e8c05b203d47cf3f4256ff024c54c85ce278b6 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Tue, 3 Dec 2024 22:57:39 +0800 Subject: [PATCH 06/26] Innkeeper position and windows compile error --- conf/playerbots.conf.dist | 4 +- src/PlayerbotAIConfig.cpp | 2 +- src/RandomPlayerbotMgr.cpp | 62 +++++++++++++++++++-------- src/strategy/actions/NewRpgAction.cpp | 3 +- 4 files changed, 48 insertions(+), 23 deletions(-) diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 00fa3a4c..6186e5dc 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -714,10 +714,10 @@ AiPlayerbot.RandomBotArenaTeamMinRating = 1000 AiPlayerbot.DeleteRandomBotArenaTeams = 0 # PvP Restricted Zones (bots don't pvp) -AiPlayerbot.PvpProhibitedZoneIds = "2255,656,2361,2362,2363,976,35,2268,3425,392,541,1446,3828,3712,3738,3565,3539,3623,4152,3988,4658,4284,4418,4436,4275,4323,4395,3703,4298" +AiPlayerbot.PvpProhibitedZoneIds = "2255,656,2361,2362,2363,976,35,2268,3425,392,541,1446,3828,3712,3738,3565,3539,3623,4152,3988,4658,4284,4418,4436,4275,4323,4395,3703,4298,139" # PvP Restricted Areas (bots don't pvp) -AiPlayerbot.PvpProhibitedAreaIds = "976,35,392" +AiPlayerbot.PvpProhibitedAreaIds = "976,35,392,2268" # Improve react speed in battleground and arena (may cause lag) AiPlayerbot.FastReactInBG = 1 diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index 871a3213..cb26477a 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -560,7 +560,7 @@ bool PlayerbotAIConfig::IsInRandomQuestItemList(uint32 id) bool PlayerbotAIConfig::IsPvpProhibited(uint32 zoneId, uint32 areaId) { - return IsInPvpProhibitedZone(zoneId) || IsInPvpProhibitedArea(areaId); + return IsInPvpProhibitedZone(zoneId) || IsInPvpProhibitedArea(areaId) || IsInPvpProhibitedZone(areaId); } bool PlayerbotAIConfig::IsInPvpProhibitedZone(uint32 id) diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index 1c5ef029..a0827092 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -39,9 +39,11 @@ #include "PlayerbotCommandServer.h" #include "PlayerbotFactory.h" #include "Playerbots.h" +#include "Position.h" #include "Random.h" #include "ServerFacade.h" #include "SharedDefines.h" +#include "TravelMgr.h" #include "Unit.h" #include "UpdateTime.h" #include "World.h" @@ -1420,7 +1422,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() "position_x, " "position_y, " "position_z, " - "t.minlevel " + "t.maxlevel " "FROM " "(SELECT " "map, " @@ -1431,12 +1433,15 @@ void RandomPlayerbotMgr::PrepareTeleportCache() "WHERE " "t.npcflag = 0 " "AND t.lootid != 0 " - "AND t.unit_flags != 768 " "AND t.maxlevel - t.minlevel < 3 " "AND map IN ({}) " - "AND c.id1 != 32820 " + "AND t.entry != 32820 " + "AND t.entry != 24196 " "AND c.spawntimesecs < 1000 " - "AND t.faction != 188 " + "AND t.faction not in (11, 71, 79, 85, 188) " + "AND (t.unit_flags & 256) = 0 " + "AND (t.unit_flags & 4096) = 0 " + // "AND (t.flags_extra & 32768) = 0 " "GROUP BY " "map, " "ROUND(position_x / 50), " @@ -1516,23 +1521,42 @@ void RandomPlayerbotMgr::PrepareTeleportCache() continue; const AreaTableEntry* area = sAreaTableStore.LookupEntry(map->GetAreaId(1, x, y, z)); uint32 level = area->area_level; - // LOG_INFO("playerbots", "Area: {} Level: {} creature_entry: {}", area->ID, level, c_entry); - int range = level <= 10 ? 6 : 8; - for (int32 l = (int32)level; l <= (int32)level + range; l++) + for (int i = 2; i<= 80; i++) { - if (l < 1 || l > maxLevel) + std::vector &locs = locsPerLevelCache[i - 1]; + for (auto &levelLoc : locs) { - continue; - } - if (!(entry->hostileMask & 4)) - { - hordeInnkeeperPerLevelCache[(uint8)l].push_back(loc); - } - if (!(entry->hostileMask & 2)) - { - allianceInnkeeperPerLevelCache[(uint8)l].push_back(loc); + if (loc.GetMapId() == levelLoc.GetMapId() && loc.GetExactDist(levelLoc) <= 500.0f) + { + if (!(entry->hostileMask & 4)) + { + hordeInnkeeperPerLevelCache[i].push_back(loc); + } + if (!(entry->hostileMask & 2)) + { + allianceInnkeeperPerLevelCache[i].push_back(loc); + } + // LOG_INFO("playerbots", "Area: {} Level: {} creature_entry: {} add to: {} ({},{},{},{})", area->ID, level, c_entry, i, levelLoc.GetPositionX(), levelLoc.GetPositionY(), levelLoc.GetPositionZ(), levelLoc.GetMapId()); + break; + } } } + // int range = level <= 10 ? 6 : 8; + // for (int32 l = (int32)level; l <= (int32)level + range; l++) + // { + // if (l < 1 || l > maxLevel) + // { + // continue; + // } + // if (!(entry->hostileMask & 4)) + // { + // hordeInnkeeperPerLevelCache[(uint8)l].push_back(loc); + // } + // if (!(entry->hostileMask & 2)) + // { + // allianceInnkeeperPerLevelCache[(uint8)l].push_back(loc); + // } + // } } while (results->NextRow()); } // add all initial position @@ -1547,7 +1571,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() WorldPosition pos(info->mapId, info->positionX, info->positionY, info->positionZ, info->orientation); - for (int32 l = 1; l <= 6; l++) + for (int32 l = 1; l <= 5; l++) { if ((1 << (i - 1)) & RACEMASK_ALLIANCE) allianceInnkeeperPerLevelCache[(uint8)l].push_back(pos); @@ -1676,7 +1700,7 @@ void RandomPlayerbotMgr::RandomTeleportForLevel(Player* bot) locs = &locsPerLevelCache[level]; LOG_DEBUG("playerbots", "Random teleporting bot {} for level {} ({} locations available)", bot->GetName().c_str(), bot->GetLevel(), locs->size()); - if (level >= 5 && urand(0, 100) < sPlayerbotAIConfig->probTeleToBankers * 100) + if (level >= 10 && urand(0, 100) < sPlayerbotAIConfig->probTeleToBankers * 100) { RandomTeleport(bot, bankerLocsPerLevelCache[level], true); } diff --git a/src/strategy/actions/NewRpgAction.cpp b/src/strategy/actions/NewRpgAction.cpp index f637b784..906af1da 100644 --- a/src/strategy/actions/NewRpgAction.cpp +++ b/src/strategy/actions/NewRpgAction.cpp @@ -1,6 +1,7 @@ #include "NewRpgAction.h" #include +#include #include "NewRpgStrategy.h" #include "ObjectDefines.h" @@ -217,7 +218,7 @@ bool NewRpgGoFarAwayPosAction::MoveFarTo(WorldPosition dest) } int attempt = 10; - float minDelta = MAXFLOAT; + float minDelta = M_PI; const float x = bot->GetPositionX(); const float y = bot->GetPositionY(); const float z = bot->GetPositionZ(); From 618358aa136702ce8abebd1bb8f75f3076a0a28e Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Tue, 3 Dec 2024 23:30:09 +0800 Subject: [PATCH 07/26] Improve near npc move --- src/strategy/actions/NewRpgAction.cpp | 12 ++++++------ src/strategy/generic/NewRpgStrategy.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/strategy/actions/NewRpgAction.cpp b/src/strategy/actions/NewRpgAction.cpp index 906af1da..40ea5c12 100644 --- a/src/strategy/actions/NewRpgAction.cpp +++ b/src/strategy/actions/NewRpgAction.cpp @@ -348,19 +348,19 @@ bool NewRpgMoveNpcAction::Execute(Event event) } else angle = 2 * M_PI * rand_norm(); // A circle around the target. - - x += cos(angle) * INTERACTION_DISTANCE * rand_norm(); - y += sin(angle) * INTERACTION_DISTANCE * rand_norm(); - bool exact = true; + float rnd = rand_norm(); + x += cos(angle) * INTERACTION_DISTANCE * rnd; + y += sin(angle) * INTERACTION_DISTANCE * rnd; + // bool exact = true; if (!unit->GetMap()->CheckCollisionAndGetValidCoords(unit, unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ(), x, y, z)) { x = unit->GetPositionX(); y = unit->GetPositionY(); z = unit->GetPositionZ(); - exact = false; + // exact = false; } - return MoveTo(mapId, x, y, z, false, false, false, exact); + return MoveTo(mapId, x, y, z, false, false, false, true); } return true; } \ No newline at end of file diff --git a/src/strategy/generic/NewRpgStrategy.h b/src/strategy/generic/NewRpgStrategy.h index 93adff84..36ddb67d 100644 --- a/src/strategy/generic/NewRpgStrategy.h +++ b/src/strategy/generic/NewRpgStrategy.h @@ -68,14 +68,14 @@ struct NewRpgInfo break; case NewRpgStatus::NEAR_RANDOM: out << "NEAR_RANDOM"; - out << "\nlastNearNpc: " << lastNearRandom; + out << "\nlastNearRandom: " << lastNearRandom; break; case NewRpgStatus::IDLE: out << "IDLE"; break; case NewRpgStatus::REST: out << "REST"; - out << "\nlastNearNpc: " << lastRest; + out << "\nlastRest: " << lastRest; break; default: out << "UNKNOWN"; From 0fa548593f7147fc94dce5f67d8dbf5a4bad9913 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Wed, 4 Dec 2024 23:26:58 +0800 Subject: [PATCH 08/26] Improve performance by ZoneHasRealPlayers and MoveFarTo --- src/PlayerbotAI.cpp | 16 ++++------------ src/strategy/actions/NewRpgAction.cpp | 19 ++++++++----------- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index bbb4ce06..f67738bc 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -39,6 +39,7 @@ #include "Playerbots.h" #include "PointMovementGenerator.h" #include "PositionValue.h" +#include "RandomPlayerbotMgr.h" #include "SayAction.h" #include "ScriptMgr.h" #include "ServerFacade.h" @@ -4107,20 +4108,11 @@ inline bool ZoneHasRealPlayers(Player* bot) { return false; } - - Map::PlayerList const& players = bot->GetMap()->GetPlayers(); - if (players.IsEmpty()) + + for (auto& player : sRandomPlayerbotMgr->GetPlayers()) { - return false; - } - - for (auto const& itr : players) - { - Player* player = itr.GetSource(); - if (!player || !player->IsVisible()) - { + if (player->GetMapId() != bot->GetMapId()) continue; - } if (player->GetZoneId() == bot->GetZoneId()) { diff --git a/src/strategy/actions/NewRpgAction.cpp b/src/strategy/actions/NewRpgAction.cpp index 40ea5c12..95bdb3fb 100644 --- a/src/strategy/actions/NewRpgAction.cpp +++ b/src/strategy/actions/NewRpgAction.cpp @@ -98,7 +98,7 @@ bool NewRpgStatusUpdateAction::Execute(Event event) case NewRpgStatus::GO_INNKEEPER: { WorldPosition& originalPos = info.innKeeperPos; - assert(info.grindPos != WorldPosition()); + assert(info.innKeeperPos != WorldPosition()); // GO_INNKEEPER -> NEAR_NPC if (bot->GetExactDist(originalPos) < 10.0f) { @@ -217,17 +217,17 @@ bool NewRpgGoFarAwayPosAction::MoveFarTo(WorldPosition dest) return MoveTo(dest.getMapId(), dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ()); } - int attempt = 10; float minDelta = M_PI; const float x = bot->GetPositionX(); const float y = bot->GetPositionY(); const float z = bot->GetPositionZ(); float rx, ry, rz; bool found = false; + int attempt = 5; while (--attempt) { float angle = bot->GetAngle(&dest); - float delta = (rand_norm() - 0.5) * M_PI; + float delta = (rand_norm() - 0.5) * M_PI * 0.6; angle += delta; float dis = rand_norm() * pathFinderDis; float dx = x + cos(angle) * dis; @@ -241,14 +241,11 @@ bool NewRpgGoFarAwayPosAction::MoveFarTo(WorldPosition dest) if (canReach) { G3D::Vector3 endPos = path.GetPath().back(); - if (fabs(delta) < minDelta) - { - found = true; - minDelta = fabs(delta); - rx = endPos.x; - ry = endPos.y; - rz = endPos.z; - } + found = true; + rx = endPos.x; + ry = endPos.y; + rz = endPos.z; + break; } } if (found) From 4644fd8459a5502979d87f7c2b45456ed7b74246 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sat, 7 Dec 2024 12:57:18 +0800 Subject: [PATCH 09/26] Minor spell enhancement --- src/strategy/mage/FrostMageStrategy.cpp | 3 ++- src/strategy/shaman/HealShamanStrategy.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/strategy/mage/FrostMageStrategy.cpp b/src/strategy/mage/FrostMageStrategy.cpp index f4b02dc7..c9b8ee9e 100644 --- a/src/strategy/mage/FrostMageStrategy.cpp +++ b/src/strategy/mage/FrostMageStrategy.cpp @@ -59,7 +59,8 @@ FrostMageStrategy::FrostMageStrategy(PlayerbotAI* botAI) : GenericMageStrategy(b NextAction** FrostMageStrategy::getDefaultActions() { - return NextAction::array(0, new NextAction("frostbolt", ACTION_DEFAULT + 0.1f), + return NextAction::array(0, new NextAction("frostbolt", ACTION_DEFAULT + 0.2f), + new NextAction("fireball", ACTION_DEFAULT + 0.1f), new NextAction("shoot", ACTION_DEFAULT), nullptr); } diff --git a/src/strategy/shaman/HealShamanStrategy.cpp b/src/strategy/shaman/HealShamanStrategy.cpp index 17d4ff44..c71f5f90 100644 --- a/src/strategy/shaman/HealShamanStrategy.cpp +++ b/src/strategy/shaman/HealShamanStrategy.cpp @@ -50,7 +50,7 @@ void HealShamanStrategy::InitTriggers(std::vector& triggers) NextAction::array(0, new NextAction("earthliving weapon", 22.0f), nullptr))); triggers.push_back(new TriggerNode( "group heal setting", - NextAction::array(0, new NextAction("riptide on party", 23.0f), new NextAction("chain heal on party", 22.0f), NULL))); + NextAction::array(0, new NextAction("riptide on party", 27.0f), new NextAction("chain heal on party", 26.0f), NULL))); triggers.push_back(new TriggerNode( "party member critical health", From 98701a6f661d2efa2b671af56dc21294b014b6f9 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sun, 8 Dec 2024 15:47:34 +0800 Subject: [PATCH 10/26] Modify starter position (add flightmaster) --- src/RandomPlayerbotMgr.cpp | 162 +++++++++++++------------- src/RandomPlayerbotMgr.h | 4 +- src/strategy/actions/NewRpgAction.cpp | 4 +- 3 files changed, 85 insertions(+), 85 deletions(-) diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index a0827092..971327ba 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -428,25 +428,25 @@ void RandomPlayerbotMgr::UpdateAIInternal(uint32 elapsed, bool /*minimal*/) } } -//void RandomPlayerbotMgr::ScaleBotActivity() +// void RandomPlayerbotMgr::ScaleBotActivity() //{ -// float activityPercentage = getActivityPercentage(); +// float activityPercentage = getActivityPercentage(); // -// // if (activityPercentage >= 100.0f || activityPercentage <= 0.0f) pid.reset(); //Stop integer buildup during -// // max/min activity +// // if (activityPercentage >= 100.0f || activityPercentage <= 0.0f) pid.reset(); //Stop integer buildup during +// // max/min activity // -// // % increase/decrease wanted diff , avg diff -// float activityPercentageMod = pid.calculate( -// sRandomPlayerbotMgr->GetPlayers().empty() ? sPlayerbotAIConfig->diffEmpty : sPlayerbotAIConfig->diffWithPlayer, -// sWorldUpdateTime.GetAverageUpdateTime()); +// // % increase/decrease wanted diff , avg diff +// float activityPercentageMod = pid.calculate( +// sRandomPlayerbotMgr->GetPlayers().empty() ? sPlayerbotAIConfig->diffEmpty : +// sPlayerbotAIConfig->diffWithPlayer, sWorldUpdateTime.GetAverageUpdateTime()); // -// activityPercentage = activityPercentageMod + 50; +// activityPercentage = activityPercentageMod + 50; // -// // Cap the percentage between 0 and 100. -// activityPercentage = std::max(0.0f, std::min(100.0f, activityPercentage)); +// // Cap the percentage between 0 and 100. +// activityPercentage = std::max(0.0f, std::min(100.0f, activityPercentage)); // -// setActivityPercentage(activityPercentage); -//} +// setActivityPercentage(activityPercentage); +// } uint32 RandomPlayerbotMgr::AddRandomBots() { @@ -532,7 +532,9 @@ uint32 RandomPlayerbotMgr::AddRandomBots() } if (maxAllowedBotCount) - LOG_ERROR("playerbots", "Not enough random bot accounts available. Need {} more!!", + LOG_ERROR("playerbots", + "Not enough random bot accounts available. Need {} more, try to increase RandomBotAccountCount " + "in your conf file", ceil(maxAllowedBotCount / 10)); } @@ -983,10 +985,7 @@ void RandomPlayerbotMgr::CheckPlayers() LOG_INFO("playerbots", "Max player level is {}, max bot level set to {}", playersLevel - 3, playersLevel); } -void RandomPlayerbotMgr::ScheduleRandomize(uint32 bot, uint32 time) -{ - SetEventValue(bot, "randomize", 1, time); -} +void RandomPlayerbotMgr::ScheduleRandomize(uint32 bot, uint32 time) { SetEventValue(bot, "randomize", 1, time); } void RandomPlayerbotMgr::ScheduleTeleport(uint32 bot, uint32 time) { @@ -1102,9 +1101,7 @@ bool RandomPlayerbotMgr::ProcessBot(uint32 bot) if (update) ProcessBot(player); - randomTime = urand( - sPlayerbotAIConfig->minRandomBotReviveTime, - sPlayerbotAIConfig->maxRandomBotReviveTime); + randomTime = urand(sPlayerbotAIConfig->minRandomBotReviveTime, sPlayerbotAIConfig->maxRandomBotReviveTime); SetEventValue(bot, "update", 1, randomTime); return true; @@ -1117,9 +1114,8 @@ bool RandomPlayerbotMgr::ProcessBot(uint32 bot) player->GetLevel(), player->GetName().c_str()); LogoutPlayerBot(botGUID); currentBots.remove(bot); - SetEventValue(bot, "logout", 1, urand( - sPlayerbotAIConfig->minRandomBotInWorldTime, - sPlayerbotAIConfig->maxRandomBotInWorldTime)); + SetEventValue(bot, "logout", 1, + urand(sPlayerbotAIConfig->minRandomBotInWorldTime, sPlayerbotAIConfig->maxRandomBotInWorldTime)); return true; } @@ -1141,11 +1137,10 @@ bool RandomPlayerbotMgr::ProcessBot(Player* player) { if (!GetEventValue(bot, "dead")) { - uint32 randomTime = urand( - sPlayerbotAIConfig->minRandomBotReviveTime, - sPlayerbotAIConfig->maxRandomBotReviveTime); - LOG_DEBUG("playerbots", "Mark bot {} as dead, will be revived in {}s.", - player->GetName().c_str(), randomTime); + uint32 randomTime = + urand(sPlayerbotAIConfig->minRandomBotReviveTime, sPlayerbotAIConfig->maxRandomBotReviveTime); + LOG_DEBUG("playerbots", "Mark bot {} as dead, will be revived in {}s.", player->GetName().c_str(), + randomTime); SetEventValue(bot, "dead", 1, sPlayerbotAIConfig->maxRandomBotInWorldTime); SetEventValue(bot, "revive", 1, randomTime); return false; @@ -1168,11 +1163,10 @@ bool RandomPlayerbotMgr::ProcessBot(Player* player) LOG_INFO("playerbots", "Bot {} remove from group since leader is random bot.", player->GetName().c_str()); } - // only randomize and teleport idle bots bool idleBot = false; PlayerbotAI* botAI = GET_PLAYERBOT_AI(player); - if (botAI) + if (botAI) { if (TravelTarget* target = botAI->GetAiObjectContext()->GetValue("travel target")->Get()) { @@ -1181,10 +1175,10 @@ bool RandomPlayerbotMgr::ProcessBot(Player* player) idleBot = true; } } - else + else { idleBot = true; - } + } } if (idleBot) { @@ -1192,7 +1186,7 @@ bool RandomPlayerbotMgr::ProcessBot(Player* player) uint32 randomize = GetEventValue(bot, "randomize"); if (!randomize) { - // bool randomiser = true; + // bool randomiser = true; // if (player->GetGuildId()) // { // if (Guild* guild = sGuildMgr->GetGuildById(player->GetGuildId())) @@ -1214,11 +1208,10 @@ bool RandomPlayerbotMgr::ProcessBot(Player* player) // if (randomiser) // { Randomize(player); - LOG_DEBUG("playerbots", "Bot #{} {}:{} <{}>: randomized", - bot, player->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", player->GetLevel(), player->GetName()); - uint32 randomTime = urand( - sPlayerbotAIConfig->minRandomBotRandomizeTime, - sPlayerbotAIConfig->maxRandomBotRandomizeTime); + LOG_DEBUG("playerbots", "Bot #{} {}:{} <{}>: randomized", bot, + player->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", player->GetLevel(), player->GetName()); + uint32 randomTime = + urand(sPlayerbotAIConfig->minRandomBotRandomizeTime, sPlayerbotAIConfig->maxRandomBotRandomizeTime); ScheduleRandomize(bot, randomTime); return true; } @@ -1237,9 +1230,8 @@ bool RandomPlayerbotMgr::ProcessBot(Player* player) LOG_DEBUG("playerbots", "Bot #{} <{}>: teleport for level and refresh", bot, player->GetName()); Refresh(player); RandomTeleportForLevel(player); - uint32 time = urand( - sPlayerbotAIConfig->minRandomBotTeleportInterval, - sPlayerbotAIConfig->maxRandomBotTeleportInterval); + uint32 time = urand(sPlayerbotAIConfig->minRandomBotTeleportInterval, + sPlayerbotAIConfig->maxRandomBotTeleportInterval); ScheduleTeleport(bot, time); return true; } @@ -1264,7 +1256,7 @@ void RandomPlayerbotMgr::RandomTeleport(Player* bot, std::vector& { // ignore when alrdy teleported or not in the world yet. if (bot->IsBeingTeleported() || !bot->IsInWorld()) - return; + return; // ignore when in queue for battle grounds. if (bot->InBattlegroundQueue()) @@ -1280,11 +1272,10 @@ void RandomPlayerbotMgr::RandomTeleport(Player* bot, std::vector& PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot); if (botAI) - { + { // ignore when in when taxi with boat/zeppelin and has players nearby - if (bot->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) && - bot->HasUnitState(UNIT_STATE_IGNORE_PATHFINDING) && - botAI->HasPlayerNearby()) + if (bot->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) && bot->HasUnitState(UNIT_STATE_IGNORE_PATHFINDING) && + botAI->HasPlayerNearby()) return; } @@ -1380,10 +1371,12 @@ void RandomPlayerbotMgr::RandomTeleport(Player* bot, std::vector& const LocaleConstant& locale = sWorld->GetDefaultDbcLocale(); LOG_DEBUG("playerbots", - "Random teleporting bot {} (level {}) to Map: {} ({}) Zone: {} ({}) Area: {} ({}) ZoneLevel: {} AreaLevel: {} {},{},{} ({}/{} " - "locations)", - bot->GetName().c_str(), bot->GetLevel(), map->GetId(), map->GetMapName(), zone->ID, - zone->area_name[locale], area->ID, area->area_name[locale], zone->area_level, area->area_level, x, y, z, i + 1, tlocs.size()); + "Random teleporting bot {} (level {}) to Map: {} ({}) Zone: {} ({}) Area: {} ({}) ZoneLevel: {} " + "AreaLevel: {} {},{},{} ({}/{} " + "locations)", + bot->GetName().c_str(), bot->GetLevel(), map->GetId(), map->GetMapName(), zone->ID, + zone->area_name[locale], area->ID, area->area_name[locale], zone->area_level, area->area_level, x, y, + z, i + 1, tlocs.size()); if (hearth) { @@ -1435,8 +1428,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() "AND t.lootid != 0 " "AND t.maxlevel - t.minlevel < 3 " "AND map IN ({}) " - "AND t.entry != 32820 " - "AND t.entry != 24196 " + "AND t.entry not in (32820, 24196, 30627, 30617) " "AND c.spawntimesecs < 1000 " "AND t.faction not in (11, 71, 79, 85, 188) " "AND (t.unit_flags & 256) = 0 " @@ -1494,7 +1486,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() "creature c " "INNER JOIN creature_template t on c.id1 = t.entry " "WHERE " - "t.npcflag & 65536 " + "t.npcflag & 73728 " "AND map IN ({}) " "ORDER BY " "t.minlevel;", @@ -1513,7 +1505,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() uint32 faction = fields[5].Get(); uint32 c_entry = fields[6].Get(); const FactionTemplateEntry* entry = sFactionTemplateStore.LookupEntry(faction); - + WorldLocation loc(mapId, x, y, z, orient + M_PI); collected_locs++; Map* map = sMapMgr->FindMap(loc.GetMapId(), 0); @@ -1521,25 +1513,33 @@ void RandomPlayerbotMgr::PrepareTeleportCache() continue; const AreaTableEntry* area = sAreaTableStore.LookupEntry(map->GetAreaId(1, x, y, z)); uint32 level = area->area_level; - for (int i = 2; i<= 80; i++) + for (int i = 1; i <= 80; i++) { - std::vector &locs = locsPerLevelCache[i - 1]; - for (auto &levelLoc : locs) + std::vector& locs = locsPerLevelCache[i]; + int counter = 0; + WorldLocation levelLoc; + for (auto& checkLoc : locs) { - if (loc.GetMapId() == levelLoc.GetMapId() && loc.GetExactDist(levelLoc) <= 500.0f) + if (loc.GetMapId() == checkLoc.GetMapId() && loc.GetExactDist(checkLoc) <= 500.0f) { - if (!(entry->hostileMask & 4)) - { - hordeInnkeeperPerLevelCache[i].push_back(loc); - } - if (!(entry->hostileMask & 2)) - { - allianceInnkeeperPerLevelCache[i].push_back(loc); - } - // LOG_INFO("playerbots", "Area: {} Level: {} creature_entry: {} add to: {} ({},{},{},{})", area->ID, level, c_entry, i, levelLoc.GetPositionX(), levelLoc.GetPositionY(), levelLoc.GetPositionZ(), levelLoc.GetMapId()); - break; + counter++; + levelLoc = checkLoc; } } + if (counter < 3) + continue; + + if (!(entry->hostileMask & 4)) + { + hordeStarterPerLevelCache[i].push_back(loc); + } + if (!(entry->hostileMask & 2)) + { + allianceStarterPerLevelCache[i].push_back(loc); + } + // LOG_INFO("playerbots", "Area: {} Level: {} creature_entry: {} add to: {} {}({},{},{},{})", area->ID, + // level, c_entry, i, counter, levelLoc.GetPositionX(), levelLoc.GetPositionY(), + // levelLoc.GetPositionZ(), levelLoc.GetMapId()); } // int range = level <= 10 ? 6 : 8; // for (int32 l = (int32)level; l <= (int32)level + range; l++) @@ -1550,11 +1550,11 @@ void RandomPlayerbotMgr::PrepareTeleportCache() // } // if (!(entry->hostileMask & 4)) // { - // hordeInnkeeperPerLevelCache[(uint8)l].push_back(loc); + // hordeStarterPerLevelCache[(uint8)l].push_back(loc); // } // if (!(entry->hostileMask & 2)) // { - // allianceInnkeeperPerLevelCache[(uint8)l].push_back(loc); + // allianceStarterPerLevelCache[(uint8)l].push_back(loc); // } // } } while (results->NextRow()); @@ -1574,9 +1574,9 @@ void RandomPlayerbotMgr::PrepareTeleportCache() for (int32 l = 1; l <= 5; l++) { if ((1 << (i - 1)) & RACEMASK_ALLIANCE) - allianceInnkeeperPerLevelCache[(uint8)l].push_back(pos); + allianceStarterPerLevelCache[(uint8)l].push_back(pos); else - hordeInnkeeperPerLevelCache[(uint8)l].push_back(pos); + hordeStarterPerLevelCache[(uint8)l].push_back(pos); } break; } @@ -1651,9 +1651,9 @@ void RandomPlayerbotMgr::PrepareTeleportCache() void RandomPlayerbotMgr::PrepareAddclassCache() { int32 maxAccountId = sPlayerbotAIConfig->randomBotAccounts.back(); - int32 minIdx = - sPlayerbotAIConfig->randomBotAccounts.size() - 1 >= sPlayerbotAIConfig->addClassAccountPoolSize - ? sPlayerbotAIConfig->randomBotAccounts.size() - sPlayerbotAIConfig->addClassAccountPoolSize : 0; + int32 minIdx = sPlayerbotAIConfig->randomBotAccounts.size() - 1 >= sPlayerbotAIConfig->addClassAccountPoolSize + ? sPlayerbotAIConfig->randomBotAccounts.size() - sPlayerbotAIConfig->addClassAccountPoolSize + : 0; int32 minAccountId = sPlayerbotAIConfig->randomBotAccounts[minIdx]; if (minAccountId < 0) { @@ -1695,7 +1695,7 @@ void RandomPlayerbotMgr::RandomTeleportForLevel(Player* bot) uint8 race = bot->getRace(); std::vector* locs = nullptr; if (sPlayerbotAIConfig->enableNewRpgStrategy) - locs = IsAlliance(race) ? &allianceInnkeeperPerLevelCache[level] : &hordeInnkeeperPerLevelCache[level]; + locs = IsAlliance(race) ? &allianceStarterPerLevelCache[level] : &hordeStarterPerLevelCache[level]; else locs = &locsPerLevelCache[level]; LOG_DEBUG("playerbots", "Random teleporting bot {} for level {} ({} locations available)", bot->GetName().c_str(), @@ -1719,7 +1719,7 @@ void RandomPlayerbotMgr::RandomTeleportGrindForLevel(Player* bot) uint8 race = bot->getRace(); std::vector* locs = nullptr; if (sPlayerbotAIConfig->enableNewRpgStrategy) - locs = IsAlliance(race) ? &allianceInnkeeperPerLevelCache[level] : &hordeInnkeeperPerLevelCache[level]; + locs = IsAlliance(race) ? &allianceStarterPerLevelCache[level] : &hordeStarterPerLevelCache[level]; else locs = &locsPerLevelCache[level]; LOG_DEBUG("playerbots", "Random teleporting bot {} for level {} ({} locations available)", bot->GetName().c_str(), @@ -2375,7 +2375,7 @@ void RandomPlayerbotMgr::OnBotLoginInternal(Player* const bot) { LOG_INFO("playerbots", "{}/{} Bot {} logged in", playerBots.size(), sRandomPlayerbotMgr->GetMaxAllowedBotCount(), bot->GetName().c_str()); - + if (sPlayerbotAIConfig->randomBotFixedLevel) { bot->SetPlayerFlag(PLAYER_FLAGS_NO_XP_GAIN); @@ -2599,14 +2599,14 @@ void RandomPlayerbotMgr::PrintStats() ++engine_combat; else ++engine_dead; - + if (botAI->IsHeal(bot, true)) ++heal; else if (botAI->IsTank(bot, true)) ++tank; else ++dps; - + if (sPlayerbotAIConfig->enableNewRpgStrategy) rpgStatusCount[botAI->rpgInfo.status]++; diff --git a/src/RandomPlayerbotMgr.h b/src/RandomPlayerbotMgr.h index 906c1b9f..8d8b9f56 100644 --- a/src/RandomPlayerbotMgr.h +++ b/src/RandomPlayerbotMgr.h @@ -172,8 +172,8 @@ public: void PrepareAddclassCache(); std::map> addclassCache; std::map> locsPerLevelCache; - std::map> allianceInnkeeperPerLevelCache; - std::map> hordeInnkeeperPerLevelCache; + std::map> allianceStarterPerLevelCache; + std::map> hordeStarterPerLevelCache; std::map> bankerLocsPerLevelCache; protected: void OnBotLoginInternal(Player* const bot) override; diff --git a/src/strategy/actions/NewRpgAction.cpp b/src/strategy/actions/NewRpgAction.cpp index 95bdb3fb..0ba51d23 100644 --- a/src/strategy/actions/NewRpgAction.cpp +++ b/src/strategy/actions/NewRpgAction.cpp @@ -183,8 +183,8 @@ WorldPosition NewRpgStatusUpdateAction::SelectRandomGrindPos() WorldPosition NewRpgStatusUpdateAction::SelectRandomInnKeeperPos() { const std::vector& locs = IsAlliance(bot->getRace()) - ? sRandomPlayerbotMgr->allianceInnkeeperPerLevelCache[bot->GetLevel()] - : sRandomPlayerbotMgr->hordeInnkeeperPerLevelCache[bot->GetLevel()]; + ? sRandomPlayerbotMgr->allianceStarterPerLevelCache[bot->GetLevel()] + : sRandomPlayerbotMgr->hordeStarterPerLevelCache[bot->GetLevel()]; std::vector prepared_locs; for (auto& loc : locs) { From 31f82cc322b973b97b9f1e36c9ef8621145d1112 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sun, 8 Dec 2024 15:53:46 +0800 Subject: [PATCH 11/26] locsPerLevelCache faction filter --- src/RandomPlayerbotMgr.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index 971327ba..91de48dc 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -1430,7 +1430,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() "AND map IN ({}) " "AND t.entry not in (32820, 24196, 30627, 30617) " "AND c.spawntimesecs < 1000 " - "AND t.faction not in (11, 71, 79, 85, 188) " + "AND t.faction not in (11, 71, 79, 85, 188, 1575) " "AND (t.unit_flags & 256) = 0 " "AND (t.unit_flags & 4096) = 0 " // "AND (t.flags_extra & 32768) = 0 " @@ -1537,9 +1537,9 @@ void RandomPlayerbotMgr::PrepareTeleportCache() { allianceStarterPerLevelCache[i].push_back(loc); } - // LOG_INFO("playerbots", "Area: {} Level: {} creature_entry: {} add to: {} {}({},{},{},{})", area->ID, - // level, c_entry, i, counter, levelLoc.GetPositionX(), levelLoc.GetPositionY(), - // levelLoc.GetPositionZ(), levelLoc.GetMapId()); + LOG_INFO("playerbots", "Area: {} Level: {} creature_entry: {} add to: {} {}({},{},{},{})", area->ID, + level, c_entry, i, counter, levelLoc.GetPositionX(), levelLoc.GetPositionY(), + levelLoc.GetPositionZ(), levelLoc.GetMapId()); } // int range = level <= 10 ? 6 : 8; // for (int32 l = (int32)level; l <= (int32)level + range; l++) From 69fe9a2d81456232cc71fba8357543ccefc585e3 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Tue, 10 Dec 2024 20:20:19 +0800 Subject: [PATCH 12/26] Reduce near npc range distance --- src/strategy/actions/NewRpgAction.cpp | 43 ++++++++++--------- src/strategy/actions/NewRpgAction.h | 4 +- src/strategy/values/PossibleRpgTargetsValue.h | 2 +- 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/strategy/actions/NewRpgAction.cpp b/src/strategy/actions/NewRpgAction.cpp index 0ba51d23..4c5f8d6a 100644 --- a/src/strategy/actions/NewRpgAction.cpp +++ b/src/strategy/actions/NewRpgAction.cpp @@ -33,36 +33,39 @@ bool NewRpgStatusUpdateAction::Execute(Event event) uint32 roll = urand(1, 100); // IDLE -> NEAR_NPC // if ((!info.lastNearNpc || info.lastNearNpc + setNpcInterval < getMSTime()) && roll <= 30) - if (roll <= 20) + if (roll <= 40) { info.lastNearNpc = getMSTime(); GuidVector possibleTargets = AI_VALUE(GuidVector, "possible rpg targets"); - if (possibleTargets.empty()) - break; - info.status = NewRpgStatus::NEAR_NPC; - return true; + if (!possibleTargets.empty()) + { + info.status = NewRpgStatus::NEAR_NPC; + return true; + } } // IDLE -> GO_INNKEEPER - if (bot->GetLevel() >= 6 && roll <= 30) + if (bot->GetLevel() >= 6 && roll <= 55) { WorldPosition pos = SelectRandomInnKeeperPos(); - if (pos == WorldPosition() || bot->GetExactDist(pos) < 50.0f) - break; - info.lastGoInnKeeper = getMSTime(); - info.status = NewRpgStatus::GO_INNKEEPER; - info.innKeeperPos = pos; - return true; + if (pos != WorldPosition() && bot->GetExactDist(pos) > 50.0f) + { + info.lastGoInnKeeper = getMSTime(); + info.status = NewRpgStatus::GO_INNKEEPER; + info.innKeeperPos = pos; + return true; + } } // IDLE -> GO_GRIND if (roll <= 90) { WorldPosition pos = SelectRandomGrindPos(); - if (pos == WorldPosition()) - break; - info.lastGoGrind = getMSTime(); - info.status = NewRpgStatus::GO_GRIND; - info.grindPos = pos; - return true; + if (pos != WorldPosition()) + { + info.lastGoGrind = getMSTime(); + info.status = NewRpgStatus::GO_GRIND; + info.grindPos = pos; + return true; + } } // IDLE -> REST info.status = NewRpgStatus::REST; @@ -164,7 +167,7 @@ WorldPosition NewRpgStatusUpdateAction::SelectRandomGrindPos() } } WorldPosition dest; - if (urand(1, 100) <= 50 && !hi_prepared_locs.empty()) + if (urand(1, 100) <= 75 && !hi_prepared_locs.empty()) { uint32 idx = urand(0, hi_prepared_locs.size() - 1); dest = hi_prepared_locs[idx]; @@ -236,7 +239,7 @@ bool NewRpgGoFarAwayPosAction::MoveFarTo(WorldPosition dest) PathGenerator path(bot); path.CalculatePath(dx, dy, dz); // bool canReach = bot->GetMap()->CanReachPositionAndGetValidCoords(bot, x, y, z, dx, dy, dz, false); - bool canReach = path.GetPathType() & (PATHFIND_NORMAL | PATHFIND_INCOMPLETE); + bool canReach = path.GetPathType() & PATHFIND_NORMAL; if (canReach) { diff --git a/src/strategy/actions/NewRpgAction.h b/src/strategy/actions/NewRpgAction.h index bb07581a..5bef88aa 100644 --- a/src/strategy/actions/NewRpgAction.h +++ b/src/strategy/actions/NewRpgAction.h @@ -23,9 +23,9 @@ public: protected: // const int32 setGrindInterval = 5 * 60 * 1000; // const int32 setNpcInterval = 1 * 60 * 1000; - const int32 statusNearNpcDuration = 3 * 60 * 1000; + const int32 statusNearNpcDuration = 5 * 60 * 1000; const int32 statusNearRandomDuration = 3 * 60 * 1000; - const int32 statusRestDuration = 1 * 60 * 1000; + const int32 statusRestDuration = 2 * 60 * 1000; WorldPosition SelectRandomGrindPos(); WorldPosition SelectRandomInnKeeperPos(); }; diff --git a/src/strategy/values/PossibleRpgTargetsValue.h b/src/strategy/values/PossibleRpgTargetsValue.h index 02df8701..287f5db3 100644 --- a/src/strategy/values/PossibleRpgTargetsValue.h +++ b/src/strategy/values/PossibleRpgTargetsValue.h @@ -14,7 +14,7 @@ class PlayerbotAI; class PossibleRpgTargetsValue : public NearestUnitsValue { public: - PossibleRpgTargetsValue(PlayerbotAI* botAI, float range = sPlayerbotAIConfig->rpgDistance); + PossibleRpgTargetsValue(PlayerbotAI* botAI, float range = 70.0f); static std::vector allowedNpcFlags; From f26cebb51840c0609dfe157f13ad49203f7558e8 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Wed, 11 Dec 2024 23:00:03 +0800 Subject: [PATCH 13/26] Update rpg status probability --- src/factory/PlayerbotFactory.cpp | 2 +- src/strategy/actions/NewRpgAction.cpp | 6 +++--- src/strategy/actions/NewRpgAction.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/factory/PlayerbotFactory.cpp b/src/factory/PlayerbotFactory.cpp index 076500f6..89de2570 100644 --- a/src/factory/PlayerbotFactory.cpp +++ b/src/factory/PlayerbotFactory.cpp @@ -424,7 +424,7 @@ void PlayerbotFactory::Randomize(bool incremental) bot->SetHealth(bot->GetMaxHealth()); bot->SetPower(POWER_MANA, bot->GetMaxPower(POWER_MANA)); bot->SaveToDB(false, false); - LOG_INFO("playerbots", "Initialization Done."); + // LOG_INFO("playerbots", "Initialization Done."); if (pmo) pmo->finish(); } diff --git a/src/strategy/actions/NewRpgAction.cpp b/src/strategy/actions/NewRpgAction.cpp index 4c5f8d6a..6b7e9e07 100644 --- a/src/strategy/actions/NewRpgAction.cpp +++ b/src/strategy/actions/NewRpgAction.cpp @@ -44,7 +44,7 @@ bool NewRpgStatusUpdateAction::Execute(Event event) } } // IDLE -> GO_INNKEEPER - if (bot->GetLevel() >= 6 && roll <= 55) + else if (bot->GetLevel() >= 6 && roll <= 50) { WorldPosition pos = SelectRandomInnKeeperPos(); if (pos != WorldPosition() && bot->GetExactDist(pos) > 50.0f) @@ -56,7 +56,7 @@ bool NewRpgStatusUpdateAction::Execute(Event event) } } // IDLE -> GO_GRIND - if (roll <= 90) + else if (roll <= 90) { WorldPosition pos = SelectRandomGrindPos(); if (pos != WorldPosition()) @@ -167,7 +167,7 @@ WorldPosition NewRpgStatusUpdateAction::SelectRandomGrindPos() } } WorldPosition dest; - if (urand(1, 100) <= 75 && !hi_prepared_locs.empty()) + if (urand(1, 100) <= 50 && !hi_prepared_locs.empty()) { uint32 idx = urand(0, hi_prepared_locs.size() - 1); dest = hi_prepared_locs[idx]; diff --git a/src/strategy/actions/NewRpgAction.h b/src/strategy/actions/NewRpgAction.h index 5bef88aa..a61b83d4 100644 --- a/src/strategy/actions/NewRpgAction.h +++ b/src/strategy/actions/NewRpgAction.h @@ -24,7 +24,7 @@ protected: // const int32 setGrindInterval = 5 * 60 * 1000; // const int32 setNpcInterval = 1 * 60 * 1000; const int32 statusNearNpcDuration = 5 * 60 * 1000; - const int32 statusNearRandomDuration = 3 * 60 * 1000; + const int32 statusNearRandomDuration = 5 * 60 * 1000; const int32 statusRestDuration = 2 * 60 * 1000; WorldPosition SelectRandomGrindPos(); WorldPosition SelectRandomInnKeeperPos(); From e7416db7dc0b032d05e6ff10d77a19d7d8ba4c06 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Fri, 13 Dec 2024 20:14:25 +0800 Subject: [PATCH 14/26] Modify file structure --- src/strategy/{ => classes}/deathknight/BloodDKStrategy.cpp | 0 src/strategy/{ => classes}/deathknight/BloodDKStrategy.h | 0 src/strategy/{ => classes}/deathknight/DKActions.cpp | 0 src/strategy/{ => classes}/deathknight/DKActions.h | 0 src/strategy/{ => classes}/deathknight/DKAiObjectContext.cpp | 0 src/strategy/{ => classes}/deathknight/DKAiObjectContext.h | 0 src/strategy/{ => classes}/deathknight/DKTriggers.cpp | 0 src/strategy/{ => classes}/deathknight/DKTriggers.h | 0 src/strategy/{ => classes}/deathknight/FrostDKStrategy.cpp | 0 src/strategy/{ => classes}/deathknight/FrostDKStrategy.h | 0 .../{ => classes}/deathknight/GenericDKNonCombatStrategy.cpp | 0 .../{ => classes}/deathknight/GenericDKNonCombatStrategy.h | 0 src/strategy/{ => classes}/deathknight/GenericDKStrategy.cpp | 0 src/strategy/{ => classes}/deathknight/GenericDKStrategy.h | 0 src/strategy/{ => classes}/deathknight/UnholyDKStrategy.cpp | 0 src/strategy/{ => classes}/deathknight/UnholyDKStrategy.h | 0 src/strategy/{ => classes}/druid/BearTankDruidStrategy.cpp | 0 src/strategy/{ => classes}/druid/BearTankDruidStrategy.h | 0 src/strategy/{ => classes}/druid/CasterDruidStrategy.cpp | 0 src/strategy/{ => classes}/druid/CasterDruidStrategy.h | 0 src/strategy/{ => classes}/druid/CatDpsDruidStrategy.cpp | 0 src/strategy/{ => classes}/druid/CatDpsDruidStrategy.h | 0 src/strategy/{ => classes}/druid/DruidActions.cpp | 0 src/strategy/{ => classes}/druid/DruidActions.h | 0 src/strategy/{ => classes}/druid/DruidAiObjectContext.cpp | 0 src/strategy/{ => classes}/druid/DruidAiObjectContext.h | 0 src/strategy/{ => classes}/druid/DruidBearActions.cpp | 0 src/strategy/{ => classes}/druid/DruidBearActions.h | 0 src/strategy/{ => classes}/druid/DruidCatActions.cpp | 0 src/strategy/{ => classes}/druid/DruidCatActions.h | 0 src/strategy/{ => classes}/druid/DruidShapeshiftActions.cpp | 0 src/strategy/{ => classes}/druid/DruidShapeshiftActions.h | 0 src/strategy/{ => classes}/druid/DruidTriggers.cpp | 0 src/strategy/{ => classes}/druid/DruidTriggers.h | 0 src/strategy/{ => classes}/druid/FeralDruidStrategy.cpp | 0 src/strategy/{ => classes}/druid/FeralDruidStrategy.h | 0 .../{ => classes}/druid/GenericDruidNonCombatStrategy.cpp | 0 src/strategy/{ => classes}/druid/GenericDruidNonCombatStrategy.h | 0 src/strategy/{ => classes}/druid/GenericDruidStrategy.cpp | 0 src/strategy/{ => classes}/druid/GenericDruidStrategy.h | 0 src/strategy/{ => classes}/druid/HealDruidStrategy.cpp | 0 src/strategy/{ => classes}/druid/HealDruidStrategy.h | 0 src/strategy/{ => classes}/druid/MeleeDruidStrategy.cpp | 0 src/strategy/{ => classes}/druid/MeleeDruidStrategy.h | 0 src/strategy/{ => classes}/hunter/DpsHunterStrategy.cpp | 0 src/strategy/{ => classes}/hunter/DpsHunterStrategy.h | 0 .../{ => classes}/hunter/GenericHunterNonCombatStrategy.cpp | 0 .../{ => classes}/hunter/GenericHunterNonCombatStrategy.h | 0 src/strategy/{ => classes}/hunter/GenericHunterStrategy.cpp | 0 src/strategy/{ => classes}/hunter/GenericHunterStrategy.h | 0 src/strategy/{ => classes}/hunter/HunterActions.cpp | 0 src/strategy/{ => classes}/hunter/HunterActions.h | 0 src/strategy/{ => classes}/hunter/HunterAiObjectContext.cpp | 0 src/strategy/{ => classes}/hunter/HunterAiObjectContext.h | 0 src/strategy/{ => classes}/hunter/HunterBuffStrategies.cpp | 0 src/strategy/{ => classes}/hunter/HunterBuffStrategies.h | 0 src/strategy/{ => classes}/hunter/HunterTriggers.cpp | 0 src/strategy/{ => classes}/hunter/HunterTriggers.h | 0 src/strategy/{ => classes}/mage/ArcaneMageStrategy.cpp | 0 src/strategy/{ => classes}/mage/ArcaneMageStrategy.h | 0 src/strategy/{ => classes}/mage/FireMageStrategy.cpp | 0 src/strategy/{ => classes}/mage/FireMageStrategy.h | 0 src/strategy/{ => classes}/mage/FrostMageStrategy.cpp | 0 src/strategy/{ => classes}/mage/FrostMageStrategy.h | 0 src/strategy/{ => classes}/mage/GenericMageNonCombatStrategy.cpp | 0 src/strategy/{ => classes}/mage/GenericMageNonCombatStrategy.h | 0 src/strategy/{ => classes}/mage/GenericMageStrategy.cpp | 0 src/strategy/{ => classes}/mage/GenericMageStrategy.h | 0 src/strategy/{ => classes}/mage/MageActions.cpp | 0 src/strategy/{ => classes}/mage/MageActions.h | 0 src/strategy/{ => classes}/mage/MageAiObjectContext.cpp | 0 src/strategy/{ => classes}/mage/MageAiObjectContext.h | 0 src/strategy/{ => classes}/mage/MageTriggers.cpp | 0 src/strategy/{ => classes}/mage/MageTriggers.h | 0 src/strategy/{ => classes}/paladin/DpsPaladinStrategy.cpp | 0 src/strategy/{ => classes}/paladin/DpsPaladinStrategy.h | 0 .../{ => classes}/paladin/GenericPaladinNonCombatStrategy.cpp | 0 .../{ => classes}/paladin/GenericPaladinNonCombatStrategy.h | 0 src/strategy/{ => classes}/paladin/GenericPaladinStrategy.cpp | 0 src/strategy/{ => classes}/paladin/GenericPaladinStrategy.h | 0 .../paladin/GenericPaladinStrategyActionNodeFactory.h | 0 src/strategy/{ => classes}/paladin/HealPaladinStrategy.cpp | 0 src/strategy/{ => classes}/paladin/HealPaladinStrategy.h | 0 src/strategy/{ => classes}/paladin/PaladinActions.cpp | 0 src/strategy/{ => classes}/paladin/PaladinActions.h | 0 src/strategy/{ => classes}/paladin/PaladinAiObjectContext.cpp | 0 src/strategy/{ => classes}/paladin/PaladinAiObjectContext.h | 0 src/strategy/{ => classes}/paladin/PaladinBuffStrategies.cpp | 0 src/strategy/{ => classes}/paladin/PaladinBuffStrategies.h | 0 src/strategy/{ => classes}/paladin/PaladinTriggers.cpp | 0 src/strategy/{ => classes}/paladin/PaladinTriggers.h | 0 src/strategy/{ => classes}/paladin/TankPaladinStrategy.cpp | 0 src/strategy/{ => classes}/paladin/TankPaladinStrategy.h | 0 src/strategy/{ => classes}/priest/GenericPriestStrategy.cpp | 0 src/strategy/{ => classes}/priest/GenericPriestStrategy.h | 0 .../{ => classes}/priest/GenericPriestStrategyActionNodeFactory.h | 0 src/strategy/{ => classes}/priest/HealPriestStrategy.cpp | 0 src/strategy/{ => classes}/priest/HealPriestStrategy.h | 0 src/strategy/{ => classes}/priest/HolyPriestStrategy.cpp | 0 src/strategy/{ => classes}/priest/HolyPriestStrategy.h | 0 src/strategy/{ => classes}/priest/PriestActions.cpp | 0 src/strategy/{ => classes}/priest/PriestActions.h | 0 src/strategy/{ => classes}/priest/PriestAiObjectContext.cpp | 0 src/strategy/{ => classes}/priest/PriestAiObjectContext.h | 0 src/strategy/{ => classes}/priest/PriestNonCombatStrategy.cpp | 0 src/strategy/{ => classes}/priest/PriestNonCombatStrategy.h | 0 .../priest/PriestNonCombatStrategyActionNodeFactory.h | 0 src/strategy/{ => classes}/priest/PriestTriggers.cpp | 0 src/strategy/{ => classes}/priest/PriestTriggers.h | 0 src/strategy/{ => classes}/priest/ShadowPriestStrategy.cpp | 0 src/strategy/{ => classes}/priest/ShadowPriestStrategy.h | 0 .../{ => classes}/priest/ShadowPriestStrategyActionNodeFactory.h | 0 src/strategy/{ => classes}/rogue/AssassinationRogueStrategy.cpp | 0 src/strategy/{ => classes}/rogue/AssassinationRogueStrategy.h | 0 src/strategy/{ => classes}/rogue/DpsRogueStrategy.cpp | 0 src/strategy/{ => classes}/rogue/DpsRogueStrategy.h | 0 .../{ => classes}/rogue/GenericRogueNonCombatStrategy.cpp | 0 src/strategy/{ => classes}/rogue/GenericRogueNonCombatStrategy.h | 0 src/strategy/{ => classes}/rogue/RogueActions.cpp | 0 src/strategy/{ => classes}/rogue/RogueActions.h | 0 src/strategy/{ => classes}/rogue/RogueAiObjectContext.cpp | 0 src/strategy/{ => classes}/rogue/RogueAiObjectContext.h | 0 src/strategy/{ => classes}/rogue/RogueComboActions.cpp | 0 src/strategy/{ => classes}/rogue/RogueComboActions.h | 0 src/strategy/{ => classes}/rogue/RogueFinishingActions.h | 0 src/strategy/{ => classes}/rogue/RogueOpeningActions.cpp | 0 src/strategy/{ => classes}/rogue/RogueOpeningActions.h | 0 src/strategy/{ => classes}/rogue/RogueTriggers.cpp | 0 src/strategy/{ => classes}/rogue/RogueTriggers.h | 0 src/strategy/{ => classes}/shaman/CasterShamanStrategy.cpp | 0 src/strategy/{ => classes}/shaman/CasterShamanStrategy.h | 0 src/strategy/{ => classes}/shaman/GenericShamanStrategy.cpp | 0 src/strategy/{ => classes}/shaman/GenericShamanStrategy.h | 0 src/strategy/{ => classes}/shaman/HealShamanStrategy.cpp | 0 src/strategy/{ => classes}/shaman/HealShamanStrategy.h | 0 src/strategy/{ => classes}/shaman/MeleeShamanStrategy.cpp | 0 src/strategy/{ => classes}/shaman/MeleeShamanStrategy.h | 0 src/strategy/{ => classes}/shaman/ShamanActions.cpp | 0 src/strategy/{ => classes}/shaman/ShamanActions.h | 0 src/strategy/{ => classes}/shaman/ShamanAiObjectContext.cpp | 0 src/strategy/{ => classes}/shaman/ShamanAiObjectContext.h | 0 src/strategy/{ => classes}/shaman/ShamanNonCombatStrategy.cpp | 0 src/strategy/{ => classes}/shaman/ShamanNonCombatStrategy.h | 0 src/strategy/{ => classes}/shaman/ShamanTriggers.cpp | 0 src/strategy/{ => classes}/shaman/ShamanTriggers.h | 0 src/strategy/{ => classes}/shaman/TotemsShamanStrategy.cpp | 0 src/strategy/{ => classes}/shaman/TotemsShamanStrategy.h | 0 src/strategy/{ => classes}/warlock/DpsWarlockStrategy.cpp | 0 src/strategy/{ => classes}/warlock/DpsWarlockStrategy.h | 0 .../{ => classes}/warlock/GenericWarlockNonCombatStrategy.cpp | 0 .../{ => classes}/warlock/GenericWarlockNonCombatStrategy.h | 0 src/strategy/{ => classes}/warlock/GenericWarlockStrategy.cpp | 0 src/strategy/{ => classes}/warlock/GenericWarlockStrategy.h | 0 src/strategy/{ => classes}/warlock/TankWarlockStrategy.cpp | 0 src/strategy/{ => classes}/warlock/TankWarlockStrategy.h | 0 src/strategy/{ => classes}/warlock/WarlockActions.cpp | 0 src/strategy/{ => classes}/warlock/WarlockActions.h | 0 src/strategy/{ => classes}/warlock/WarlockAiObjectContext.cpp | 0 src/strategy/{ => classes}/warlock/WarlockAiObjectContext.h | 0 src/strategy/{ => classes}/warlock/WarlockTriggers.cpp | 0 src/strategy/{ => classes}/warlock/WarlockTriggers.h | 0 src/strategy/{ => classes}/warrior/ArmsWarriorStrategy.cpp | 0 src/strategy/{ => classes}/warrior/ArmsWarriorStrategy.h | 0 src/strategy/{ => classes}/warrior/FuryWarriorStrategy.cpp | 0 src/strategy/{ => classes}/warrior/FuryWarriorStrategy.h | 0 .../{ => classes}/warrior/GenericWarriorNonCombatStrategy.cpp | 0 .../{ => classes}/warrior/GenericWarriorNonCombatStrategy.h | 0 src/strategy/{ => classes}/warrior/GenericWarriorStrategy.cpp | 0 src/strategy/{ => classes}/warrior/GenericWarriorStrategy.h | 0 src/strategy/{ => classes}/warrior/TankWarriorStrategy.cpp | 0 src/strategy/{ => classes}/warrior/TankWarriorStrategy.h | 0 src/strategy/{ => classes}/warrior/WarriorActions.cpp | 0 src/strategy/{ => classes}/warrior/WarriorActions.h | 0 src/strategy/{ => classes}/warrior/WarriorAiObjectContext.cpp | 0 src/strategy/{ => classes}/warrior/WarriorAiObjectContext.h | 0 src/strategy/{ => classes}/warrior/WarriorTriggers.cpp | 0 src/strategy/{ => classes}/warrior/WarriorTriggers.h | 0 src/strategy/{actions => rpg}/NewRpgAction.cpp | 0 src/strategy/{actions => rpg}/NewRpgAction.h | 0 src/strategy/{generic => rpg}/NewRpgStrategy.cpp | 0 src/strategy/{generic => rpg}/NewRpgStrategy.h | 0 src/strategy/{triggers => rpg}/NewRpgTrigger.cpp | 0 src/strategy/{triggers => rpg}/NewRpgTriggers.h | 0 183 files changed, 0 insertions(+), 0 deletions(-) rename src/strategy/{ => classes}/deathknight/BloodDKStrategy.cpp (100%) rename src/strategy/{ => classes}/deathknight/BloodDKStrategy.h (100%) rename src/strategy/{ => classes}/deathknight/DKActions.cpp (100%) rename src/strategy/{ => classes}/deathknight/DKActions.h (100%) rename src/strategy/{ => classes}/deathknight/DKAiObjectContext.cpp (100%) rename src/strategy/{ => classes}/deathknight/DKAiObjectContext.h (100%) rename src/strategy/{ => classes}/deathknight/DKTriggers.cpp (100%) rename src/strategy/{ => classes}/deathknight/DKTriggers.h (100%) rename src/strategy/{ => classes}/deathknight/FrostDKStrategy.cpp (100%) rename src/strategy/{ => classes}/deathknight/FrostDKStrategy.h (100%) rename src/strategy/{ => classes}/deathknight/GenericDKNonCombatStrategy.cpp (100%) rename src/strategy/{ => classes}/deathknight/GenericDKNonCombatStrategy.h (100%) rename src/strategy/{ => classes}/deathknight/GenericDKStrategy.cpp (100%) rename src/strategy/{ => classes}/deathknight/GenericDKStrategy.h (100%) rename src/strategy/{ => classes}/deathknight/UnholyDKStrategy.cpp (100%) rename src/strategy/{ => classes}/deathknight/UnholyDKStrategy.h (100%) rename src/strategy/{ => classes}/druid/BearTankDruidStrategy.cpp (100%) rename src/strategy/{ => classes}/druid/BearTankDruidStrategy.h (100%) rename src/strategy/{ => classes}/druid/CasterDruidStrategy.cpp (100%) rename src/strategy/{ => classes}/druid/CasterDruidStrategy.h (100%) rename src/strategy/{ => classes}/druid/CatDpsDruidStrategy.cpp (100%) rename src/strategy/{ => classes}/druid/CatDpsDruidStrategy.h (100%) rename src/strategy/{ => classes}/druid/DruidActions.cpp (100%) rename src/strategy/{ => classes}/druid/DruidActions.h (100%) rename src/strategy/{ => classes}/druid/DruidAiObjectContext.cpp (100%) rename src/strategy/{ => classes}/druid/DruidAiObjectContext.h (100%) rename src/strategy/{ => classes}/druid/DruidBearActions.cpp (100%) rename src/strategy/{ => classes}/druid/DruidBearActions.h (100%) rename src/strategy/{ => classes}/druid/DruidCatActions.cpp (100%) rename src/strategy/{ => classes}/druid/DruidCatActions.h (100%) rename src/strategy/{ => classes}/druid/DruidShapeshiftActions.cpp (100%) rename src/strategy/{ => classes}/druid/DruidShapeshiftActions.h (100%) rename src/strategy/{ => classes}/druid/DruidTriggers.cpp (100%) rename src/strategy/{ => classes}/druid/DruidTriggers.h (100%) rename src/strategy/{ => classes}/druid/FeralDruidStrategy.cpp (100%) rename src/strategy/{ => classes}/druid/FeralDruidStrategy.h (100%) rename src/strategy/{ => classes}/druid/GenericDruidNonCombatStrategy.cpp (100%) rename src/strategy/{ => classes}/druid/GenericDruidNonCombatStrategy.h (100%) rename src/strategy/{ => classes}/druid/GenericDruidStrategy.cpp (100%) rename src/strategy/{ => classes}/druid/GenericDruidStrategy.h (100%) rename src/strategy/{ => classes}/druid/HealDruidStrategy.cpp (100%) rename src/strategy/{ => classes}/druid/HealDruidStrategy.h (100%) rename src/strategy/{ => classes}/druid/MeleeDruidStrategy.cpp (100%) rename src/strategy/{ => classes}/druid/MeleeDruidStrategy.h (100%) rename src/strategy/{ => classes}/hunter/DpsHunterStrategy.cpp (100%) rename src/strategy/{ => classes}/hunter/DpsHunterStrategy.h (100%) rename src/strategy/{ => classes}/hunter/GenericHunterNonCombatStrategy.cpp (100%) rename src/strategy/{ => classes}/hunter/GenericHunterNonCombatStrategy.h (100%) rename src/strategy/{ => classes}/hunter/GenericHunterStrategy.cpp (100%) rename src/strategy/{ => classes}/hunter/GenericHunterStrategy.h (100%) rename src/strategy/{ => classes}/hunter/HunterActions.cpp (100%) rename src/strategy/{ => classes}/hunter/HunterActions.h (100%) rename src/strategy/{ => classes}/hunter/HunterAiObjectContext.cpp (100%) rename src/strategy/{ => classes}/hunter/HunterAiObjectContext.h (100%) rename src/strategy/{ => classes}/hunter/HunterBuffStrategies.cpp (100%) rename src/strategy/{ => classes}/hunter/HunterBuffStrategies.h (100%) rename src/strategy/{ => classes}/hunter/HunterTriggers.cpp (100%) rename src/strategy/{ => classes}/hunter/HunterTriggers.h (100%) rename src/strategy/{ => classes}/mage/ArcaneMageStrategy.cpp (100%) rename src/strategy/{ => classes}/mage/ArcaneMageStrategy.h (100%) rename src/strategy/{ => classes}/mage/FireMageStrategy.cpp (100%) rename src/strategy/{ => classes}/mage/FireMageStrategy.h (100%) rename src/strategy/{ => classes}/mage/FrostMageStrategy.cpp (100%) rename src/strategy/{ => classes}/mage/FrostMageStrategy.h (100%) rename src/strategy/{ => classes}/mage/GenericMageNonCombatStrategy.cpp (100%) rename src/strategy/{ => classes}/mage/GenericMageNonCombatStrategy.h (100%) rename src/strategy/{ => classes}/mage/GenericMageStrategy.cpp (100%) rename src/strategy/{ => classes}/mage/GenericMageStrategy.h (100%) rename src/strategy/{ => classes}/mage/MageActions.cpp (100%) rename src/strategy/{ => classes}/mage/MageActions.h (100%) rename src/strategy/{ => classes}/mage/MageAiObjectContext.cpp (100%) rename src/strategy/{ => classes}/mage/MageAiObjectContext.h (100%) rename src/strategy/{ => classes}/mage/MageTriggers.cpp (100%) rename src/strategy/{ => classes}/mage/MageTriggers.h (100%) rename src/strategy/{ => classes}/paladin/DpsPaladinStrategy.cpp (100%) rename src/strategy/{ => classes}/paladin/DpsPaladinStrategy.h (100%) rename src/strategy/{ => classes}/paladin/GenericPaladinNonCombatStrategy.cpp (100%) rename src/strategy/{ => classes}/paladin/GenericPaladinNonCombatStrategy.h (100%) rename src/strategy/{ => classes}/paladin/GenericPaladinStrategy.cpp (100%) rename src/strategy/{ => classes}/paladin/GenericPaladinStrategy.h (100%) rename src/strategy/{ => classes}/paladin/GenericPaladinStrategyActionNodeFactory.h (100%) rename src/strategy/{ => classes}/paladin/HealPaladinStrategy.cpp (100%) rename src/strategy/{ => classes}/paladin/HealPaladinStrategy.h (100%) rename src/strategy/{ => classes}/paladin/PaladinActions.cpp (100%) rename src/strategy/{ => classes}/paladin/PaladinActions.h (100%) rename src/strategy/{ => classes}/paladin/PaladinAiObjectContext.cpp (100%) rename src/strategy/{ => classes}/paladin/PaladinAiObjectContext.h (100%) rename src/strategy/{ => classes}/paladin/PaladinBuffStrategies.cpp (100%) rename src/strategy/{ => classes}/paladin/PaladinBuffStrategies.h (100%) rename src/strategy/{ => classes}/paladin/PaladinTriggers.cpp (100%) rename src/strategy/{ => classes}/paladin/PaladinTriggers.h (100%) rename src/strategy/{ => classes}/paladin/TankPaladinStrategy.cpp (100%) rename src/strategy/{ => classes}/paladin/TankPaladinStrategy.h (100%) rename src/strategy/{ => classes}/priest/GenericPriestStrategy.cpp (100%) rename src/strategy/{ => classes}/priest/GenericPriestStrategy.h (100%) rename src/strategy/{ => classes}/priest/GenericPriestStrategyActionNodeFactory.h (100%) rename src/strategy/{ => classes}/priest/HealPriestStrategy.cpp (100%) rename src/strategy/{ => classes}/priest/HealPriestStrategy.h (100%) rename src/strategy/{ => classes}/priest/HolyPriestStrategy.cpp (100%) rename src/strategy/{ => classes}/priest/HolyPriestStrategy.h (100%) rename src/strategy/{ => classes}/priest/PriestActions.cpp (100%) rename src/strategy/{ => classes}/priest/PriestActions.h (100%) rename src/strategy/{ => classes}/priest/PriestAiObjectContext.cpp (100%) rename src/strategy/{ => classes}/priest/PriestAiObjectContext.h (100%) rename src/strategy/{ => classes}/priest/PriestNonCombatStrategy.cpp (100%) rename src/strategy/{ => classes}/priest/PriestNonCombatStrategy.h (100%) rename src/strategy/{ => classes}/priest/PriestNonCombatStrategyActionNodeFactory.h (100%) rename src/strategy/{ => classes}/priest/PriestTriggers.cpp (100%) rename src/strategy/{ => classes}/priest/PriestTriggers.h (100%) rename src/strategy/{ => classes}/priest/ShadowPriestStrategy.cpp (100%) rename src/strategy/{ => classes}/priest/ShadowPriestStrategy.h (100%) rename src/strategy/{ => classes}/priest/ShadowPriestStrategyActionNodeFactory.h (100%) rename src/strategy/{ => classes}/rogue/AssassinationRogueStrategy.cpp (100%) rename src/strategy/{ => classes}/rogue/AssassinationRogueStrategy.h (100%) rename src/strategy/{ => classes}/rogue/DpsRogueStrategy.cpp (100%) rename src/strategy/{ => classes}/rogue/DpsRogueStrategy.h (100%) rename src/strategy/{ => classes}/rogue/GenericRogueNonCombatStrategy.cpp (100%) rename src/strategy/{ => classes}/rogue/GenericRogueNonCombatStrategy.h (100%) rename src/strategy/{ => classes}/rogue/RogueActions.cpp (100%) rename src/strategy/{ => classes}/rogue/RogueActions.h (100%) rename src/strategy/{ => classes}/rogue/RogueAiObjectContext.cpp (100%) rename src/strategy/{ => classes}/rogue/RogueAiObjectContext.h (100%) rename src/strategy/{ => classes}/rogue/RogueComboActions.cpp (100%) rename src/strategy/{ => classes}/rogue/RogueComboActions.h (100%) rename src/strategy/{ => classes}/rogue/RogueFinishingActions.h (100%) rename src/strategy/{ => classes}/rogue/RogueOpeningActions.cpp (100%) rename src/strategy/{ => classes}/rogue/RogueOpeningActions.h (100%) rename src/strategy/{ => classes}/rogue/RogueTriggers.cpp (100%) rename src/strategy/{ => classes}/rogue/RogueTriggers.h (100%) rename src/strategy/{ => classes}/shaman/CasterShamanStrategy.cpp (100%) rename src/strategy/{ => classes}/shaman/CasterShamanStrategy.h (100%) rename src/strategy/{ => classes}/shaman/GenericShamanStrategy.cpp (100%) rename src/strategy/{ => classes}/shaman/GenericShamanStrategy.h (100%) rename src/strategy/{ => classes}/shaman/HealShamanStrategy.cpp (100%) rename src/strategy/{ => classes}/shaman/HealShamanStrategy.h (100%) rename src/strategy/{ => classes}/shaman/MeleeShamanStrategy.cpp (100%) rename src/strategy/{ => classes}/shaman/MeleeShamanStrategy.h (100%) rename src/strategy/{ => classes}/shaman/ShamanActions.cpp (100%) rename src/strategy/{ => classes}/shaman/ShamanActions.h (100%) rename src/strategy/{ => classes}/shaman/ShamanAiObjectContext.cpp (100%) rename src/strategy/{ => classes}/shaman/ShamanAiObjectContext.h (100%) rename src/strategy/{ => classes}/shaman/ShamanNonCombatStrategy.cpp (100%) rename src/strategy/{ => classes}/shaman/ShamanNonCombatStrategy.h (100%) rename src/strategy/{ => classes}/shaman/ShamanTriggers.cpp (100%) rename src/strategy/{ => classes}/shaman/ShamanTriggers.h (100%) rename src/strategy/{ => classes}/shaman/TotemsShamanStrategy.cpp (100%) rename src/strategy/{ => classes}/shaman/TotemsShamanStrategy.h (100%) rename src/strategy/{ => classes}/warlock/DpsWarlockStrategy.cpp (100%) rename src/strategy/{ => classes}/warlock/DpsWarlockStrategy.h (100%) rename src/strategy/{ => classes}/warlock/GenericWarlockNonCombatStrategy.cpp (100%) rename src/strategy/{ => classes}/warlock/GenericWarlockNonCombatStrategy.h (100%) rename src/strategy/{ => classes}/warlock/GenericWarlockStrategy.cpp (100%) rename src/strategy/{ => classes}/warlock/GenericWarlockStrategy.h (100%) rename src/strategy/{ => classes}/warlock/TankWarlockStrategy.cpp (100%) rename src/strategy/{ => classes}/warlock/TankWarlockStrategy.h (100%) rename src/strategy/{ => classes}/warlock/WarlockActions.cpp (100%) rename src/strategy/{ => classes}/warlock/WarlockActions.h (100%) rename src/strategy/{ => classes}/warlock/WarlockAiObjectContext.cpp (100%) rename src/strategy/{ => classes}/warlock/WarlockAiObjectContext.h (100%) rename src/strategy/{ => classes}/warlock/WarlockTriggers.cpp (100%) rename src/strategy/{ => classes}/warlock/WarlockTriggers.h (100%) rename src/strategy/{ => classes}/warrior/ArmsWarriorStrategy.cpp (100%) rename src/strategy/{ => classes}/warrior/ArmsWarriorStrategy.h (100%) rename src/strategy/{ => classes}/warrior/FuryWarriorStrategy.cpp (100%) rename src/strategy/{ => classes}/warrior/FuryWarriorStrategy.h (100%) rename src/strategy/{ => classes}/warrior/GenericWarriorNonCombatStrategy.cpp (100%) rename src/strategy/{ => classes}/warrior/GenericWarriorNonCombatStrategy.h (100%) rename src/strategy/{ => classes}/warrior/GenericWarriorStrategy.cpp (100%) rename src/strategy/{ => classes}/warrior/GenericWarriorStrategy.h (100%) rename src/strategy/{ => classes}/warrior/TankWarriorStrategy.cpp (100%) rename src/strategy/{ => classes}/warrior/TankWarriorStrategy.h (100%) rename src/strategy/{ => classes}/warrior/WarriorActions.cpp (100%) rename src/strategy/{ => classes}/warrior/WarriorActions.h (100%) rename src/strategy/{ => classes}/warrior/WarriorAiObjectContext.cpp (100%) rename src/strategy/{ => classes}/warrior/WarriorAiObjectContext.h (100%) rename src/strategy/{ => classes}/warrior/WarriorTriggers.cpp (100%) rename src/strategy/{ => classes}/warrior/WarriorTriggers.h (100%) rename src/strategy/{actions => rpg}/NewRpgAction.cpp (100%) rename src/strategy/{actions => rpg}/NewRpgAction.h (100%) rename src/strategy/{generic => rpg}/NewRpgStrategy.cpp (100%) rename src/strategy/{generic => rpg}/NewRpgStrategy.h (100%) rename src/strategy/{triggers => rpg}/NewRpgTrigger.cpp (100%) rename src/strategy/{triggers => rpg}/NewRpgTriggers.h (100%) diff --git a/src/strategy/deathknight/BloodDKStrategy.cpp b/src/strategy/classes/deathknight/BloodDKStrategy.cpp similarity index 100% rename from src/strategy/deathknight/BloodDKStrategy.cpp rename to src/strategy/classes/deathknight/BloodDKStrategy.cpp diff --git a/src/strategy/deathknight/BloodDKStrategy.h b/src/strategy/classes/deathknight/BloodDKStrategy.h similarity index 100% rename from src/strategy/deathknight/BloodDKStrategy.h rename to src/strategy/classes/deathknight/BloodDKStrategy.h diff --git a/src/strategy/deathknight/DKActions.cpp b/src/strategy/classes/deathknight/DKActions.cpp similarity index 100% rename from src/strategy/deathknight/DKActions.cpp rename to src/strategy/classes/deathknight/DKActions.cpp diff --git a/src/strategy/deathknight/DKActions.h b/src/strategy/classes/deathknight/DKActions.h similarity index 100% rename from src/strategy/deathknight/DKActions.h rename to src/strategy/classes/deathknight/DKActions.h diff --git a/src/strategy/deathknight/DKAiObjectContext.cpp b/src/strategy/classes/deathknight/DKAiObjectContext.cpp similarity index 100% rename from src/strategy/deathknight/DKAiObjectContext.cpp rename to src/strategy/classes/deathknight/DKAiObjectContext.cpp diff --git a/src/strategy/deathknight/DKAiObjectContext.h b/src/strategy/classes/deathknight/DKAiObjectContext.h similarity index 100% rename from src/strategy/deathknight/DKAiObjectContext.h rename to src/strategy/classes/deathknight/DKAiObjectContext.h diff --git a/src/strategy/deathknight/DKTriggers.cpp b/src/strategy/classes/deathknight/DKTriggers.cpp similarity index 100% rename from src/strategy/deathknight/DKTriggers.cpp rename to src/strategy/classes/deathknight/DKTriggers.cpp diff --git a/src/strategy/deathknight/DKTriggers.h b/src/strategy/classes/deathknight/DKTriggers.h similarity index 100% rename from src/strategy/deathknight/DKTriggers.h rename to src/strategy/classes/deathknight/DKTriggers.h diff --git a/src/strategy/deathknight/FrostDKStrategy.cpp b/src/strategy/classes/deathknight/FrostDKStrategy.cpp similarity index 100% rename from src/strategy/deathknight/FrostDKStrategy.cpp rename to src/strategy/classes/deathknight/FrostDKStrategy.cpp diff --git a/src/strategy/deathknight/FrostDKStrategy.h b/src/strategy/classes/deathknight/FrostDKStrategy.h similarity index 100% rename from src/strategy/deathknight/FrostDKStrategy.h rename to src/strategy/classes/deathknight/FrostDKStrategy.h diff --git a/src/strategy/deathknight/GenericDKNonCombatStrategy.cpp b/src/strategy/classes/deathknight/GenericDKNonCombatStrategy.cpp similarity index 100% rename from src/strategy/deathknight/GenericDKNonCombatStrategy.cpp rename to src/strategy/classes/deathknight/GenericDKNonCombatStrategy.cpp diff --git a/src/strategy/deathknight/GenericDKNonCombatStrategy.h b/src/strategy/classes/deathknight/GenericDKNonCombatStrategy.h similarity index 100% rename from src/strategy/deathknight/GenericDKNonCombatStrategy.h rename to src/strategy/classes/deathknight/GenericDKNonCombatStrategy.h diff --git a/src/strategy/deathknight/GenericDKStrategy.cpp b/src/strategy/classes/deathknight/GenericDKStrategy.cpp similarity index 100% rename from src/strategy/deathknight/GenericDKStrategy.cpp rename to src/strategy/classes/deathknight/GenericDKStrategy.cpp diff --git a/src/strategy/deathknight/GenericDKStrategy.h b/src/strategy/classes/deathknight/GenericDKStrategy.h similarity index 100% rename from src/strategy/deathknight/GenericDKStrategy.h rename to src/strategy/classes/deathknight/GenericDKStrategy.h diff --git a/src/strategy/deathknight/UnholyDKStrategy.cpp b/src/strategy/classes/deathknight/UnholyDKStrategy.cpp similarity index 100% rename from src/strategy/deathknight/UnholyDKStrategy.cpp rename to src/strategy/classes/deathknight/UnholyDKStrategy.cpp diff --git a/src/strategy/deathknight/UnholyDKStrategy.h b/src/strategy/classes/deathknight/UnholyDKStrategy.h similarity index 100% rename from src/strategy/deathknight/UnholyDKStrategy.h rename to src/strategy/classes/deathknight/UnholyDKStrategy.h diff --git a/src/strategy/druid/BearTankDruidStrategy.cpp b/src/strategy/classes/druid/BearTankDruidStrategy.cpp similarity index 100% rename from src/strategy/druid/BearTankDruidStrategy.cpp rename to src/strategy/classes/druid/BearTankDruidStrategy.cpp diff --git a/src/strategy/druid/BearTankDruidStrategy.h b/src/strategy/classes/druid/BearTankDruidStrategy.h similarity index 100% rename from src/strategy/druid/BearTankDruidStrategy.h rename to src/strategy/classes/druid/BearTankDruidStrategy.h diff --git a/src/strategy/druid/CasterDruidStrategy.cpp b/src/strategy/classes/druid/CasterDruidStrategy.cpp similarity index 100% rename from src/strategy/druid/CasterDruidStrategy.cpp rename to src/strategy/classes/druid/CasterDruidStrategy.cpp diff --git a/src/strategy/druid/CasterDruidStrategy.h b/src/strategy/classes/druid/CasterDruidStrategy.h similarity index 100% rename from src/strategy/druid/CasterDruidStrategy.h rename to src/strategy/classes/druid/CasterDruidStrategy.h diff --git a/src/strategy/druid/CatDpsDruidStrategy.cpp b/src/strategy/classes/druid/CatDpsDruidStrategy.cpp similarity index 100% rename from src/strategy/druid/CatDpsDruidStrategy.cpp rename to src/strategy/classes/druid/CatDpsDruidStrategy.cpp diff --git a/src/strategy/druid/CatDpsDruidStrategy.h b/src/strategy/classes/druid/CatDpsDruidStrategy.h similarity index 100% rename from src/strategy/druid/CatDpsDruidStrategy.h rename to src/strategy/classes/druid/CatDpsDruidStrategy.h diff --git a/src/strategy/druid/DruidActions.cpp b/src/strategy/classes/druid/DruidActions.cpp similarity index 100% rename from src/strategy/druid/DruidActions.cpp rename to src/strategy/classes/druid/DruidActions.cpp diff --git a/src/strategy/druid/DruidActions.h b/src/strategy/classes/druid/DruidActions.h similarity index 100% rename from src/strategy/druid/DruidActions.h rename to src/strategy/classes/druid/DruidActions.h diff --git a/src/strategy/druid/DruidAiObjectContext.cpp b/src/strategy/classes/druid/DruidAiObjectContext.cpp similarity index 100% rename from src/strategy/druid/DruidAiObjectContext.cpp rename to src/strategy/classes/druid/DruidAiObjectContext.cpp diff --git a/src/strategy/druid/DruidAiObjectContext.h b/src/strategy/classes/druid/DruidAiObjectContext.h similarity index 100% rename from src/strategy/druid/DruidAiObjectContext.h rename to src/strategy/classes/druid/DruidAiObjectContext.h diff --git a/src/strategy/druid/DruidBearActions.cpp b/src/strategy/classes/druid/DruidBearActions.cpp similarity index 100% rename from src/strategy/druid/DruidBearActions.cpp rename to src/strategy/classes/druid/DruidBearActions.cpp diff --git a/src/strategy/druid/DruidBearActions.h b/src/strategy/classes/druid/DruidBearActions.h similarity index 100% rename from src/strategy/druid/DruidBearActions.h rename to src/strategy/classes/druid/DruidBearActions.h diff --git a/src/strategy/druid/DruidCatActions.cpp b/src/strategy/classes/druid/DruidCatActions.cpp similarity index 100% rename from src/strategy/druid/DruidCatActions.cpp rename to src/strategy/classes/druid/DruidCatActions.cpp diff --git a/src/strategy/druid/DruidCatActions.h b/src/strategy/classes/druid/DruidCatActions.h similarity index 100% rename from src/strategy/druid/DruidCatActions.h rename to src/strategy/classes/druid/DruidCatActions.h diff --git a/src/strategy/druid/DruidShapeshiftActions.cpp b/src/strategy/classes/druid/DruidShapeshiftActions.cpp similarity index 100% rename from src/strategy/druid/DruidShapeshiftActions.cpp rename to src/strategy/classes/druid/DruidShapeshiftActions.cpp diff --git a/src/strategy/druid/DruidShapeshiftActions.h b/src/strategy/classes/druid/DruidShapeshiftActions.h similarity index 100% rename from src/strategy/druid/DruidShapeshiftActions.h rename to src/strategy/classes/druid/DruidShapeshiftActions.h diff --git a/src/strategy/druid/DruidTriggers.cpp b/src/strategy/classes/druid/DruidTriggers.cpp similarity index 100% rename from src/strategy/druid/DruidTriggers.cpp rename to src/strategy/classes/druid/DruidTriggers.cpp diff --git a/src/strategy/druid/DruidTriggers.h b/src/strategy/classes/druid/DruidTriggers.h similarity index 100% rename from src/strategy/druid/DruidTriggers.h rename to src/strategy/classes/druid/DruidTriggers.h diff --git a/src/strategy/druid/FeralDruidStrategy.cpp b/src/strategy/classes/druid/FeralDruidStrategy.cpp similarity index 100% rename from src/strategy/druid/FeralDruidStrategy.cpp rename to src/strategy/classes/druid/FeralDruidStrategy.cpp diff --git a/src/strategy/druid/FeralDruidStrategy.h b/src/strategy/classes/druid/FeralDruidStrategy.h similarity index 100% rename from src/strategy/druid/FeralDruidStrategy.h rename to src/strategy/classes/druid/FeralDruidStrategy.h diff --git a/src/strategy/druid/GenericDruidNonCombatStrategy.cpp b/src/strategy/classes/druid/GenericDruidNonCombatStrategy.cpp similarity index 100% rename from src/strategy/druid/GenericDruidNonCombatStrategy.cpp rename to src/strategy/classes/druid/GenericDruidNonCombatStrategy.cpp diff --git a/src/strategy/druid/GenericDruidNonCombatStrategy.h b/src/strategy/classes/druid/GenericDruidNonCombatStrategy.h similarity index 100% rename from src/strategy/druid/GenericDruidNonCombatStrategy.h rename to src/strategy/classes/druid/GenericDruidNonCombatStrategy.h diff --git a/src/strategy/druid/GenericDruidStrategy.cpp b/src/strategy/classes/druid/GenericDruidStrategy.cpp similarity index 100% rename from src/strategy/druid/GenericDruidStrategy.cpp rename to src/strategy/classes/druid/GenericDruidStrategy.cpp diff --git a/src/strategy/druid/GenericDruidStrategy.h b/src/strategy/classes/druid/GenericDruidStrategy.h similarity index 100% rename from src/strategy/druid/GenericDruidStrategy.h rename to src/strategy/classes/druid/GenericDruidStrategy.h diff --git a/src/strategy/druid/HealDruidStrategy.cpp b/src/strategy/classes/druid/HealDruidStrategy.cpp similarity index 100% rename from src/strategy/druid/HealDruidStrategy.cpp rename to src/strategy/classes/druid/HealDruidStrategy.cpp diff --git a/src/strategy/druid/HealDruidStrategy.h b/src/strategy/classes/druid/HealDruidStrategy.h similarity index 100% rename from src/strategy/druid/HealDruidStrategy.h rename to src/strategy/classes/druid/HealDruidStrategy.h diff --git a/src/strategy/druid/MeleeDruidStrategy.cpp b/src/strategy/classes/druid/MeleeDruidStrategy.cpp similarity index 100% rename from src/strategy/druid/MeleeDruidStrategy.cpp rename to src/strategy/classes/druid/MeleeDruidStrategy.cpp diff --git a/src/strategy/druid/MeleeDruidStrategy.h b/src/strategy/classes/druid/MeleeDruidStrategy.h similarity index 100% rename from src/strategy/druid/MeleeDruidStrategy.h rename to src/strategy/classes/druid/MeleeDruidStrategy.h diff --git a/src/strategy/hunter/DpsHunterStrategy.cpp b/src/strategy/classes/hunter/DpsHunterStrategy.cpp similarity index 100% rename from src/strategy/hunter/DpsHunterStrategy.cpp rename to src/strategy/classes/hunter/DpsHunterStrategy.cpp diff --git a/src/strategy/hunter/DpsHunterStrategy.h b/src/strategy/classes/hunter/DpsHunterStrategy.h similarity index 100% rename from src/strategy/hunter/DpsHunterStrategy.h rename to src/strategy/classes/hunter/DpsHunterStrategy.h diff --git a/src/strategy/hunter/GenericHunterNonCombatStrategy.cpp b/src/strategy/classes/hunter/GenericHunterNonCombatStrategy.cpp similarity index 100% rename from src/strategy/hunter/GenericHunterNonCombatStrategy.cpp rename to src/strategy/classes/hunter/GenericHunterNonCombatStrategy.cpp diff --git a/src/strategy/hunter/GenericHunterNonCombatStrategy.h b/src/strategy/classes/hunter/GenericHunterNonCombatStrategy.h similarity index 100% rename from src/strategy/hunter/GenericHunterNonCombatStrategy.h rename to src/strategy/classes/hunter/GenericHunterNonCombatStrategy.h diff --git a/src/strategy/hunter/GenericHunterStrategy.cpp b/src/strategy/classes/hunter/GenericHunterStrategy.cpp similarity index 100% rename from src/strategy/hunter/GenericHunterStrategy.cpp rename to src/strategy/classes/hunter/GenericHunterStrategy.cpp diff --git a/src/strategy/hunter/GenericHunterStrategy.h b/src/strategy/classes/hunter/GenericHunterStrategy.h similarity index 100% rename from src/strategy/hunter/GenericHunterStrategy.h rename to src/strategy/classes/hunter/GenericHunterStrategy.h diff --git a/src/strategy/hunter/HunterActions.cpp b/src/strategy/classes/hunter/HunterActions.cpp similarity index 100% rename from src/strategy/hunter/HunterActions.cpp rename to src/strategy/classes/hunter/HunterActions.cpp diff --git a/src/strategy/hunter/HunterActions.h b/src/strategy/classes/hunter/HunterActions.h similarity index 100% rename from src/strategy/hunter/HunterActions.h rename to src/strategy/classes/hunter/HunterActions.h diff --git a/src/strategy/hunter/HunterAiObjectContext.cpp b/src/strategy/classes/hunter/HunterAiObjectContext.cpp similarity index 100% rename from src/strategy/hunter/HunterAiObjectContext.cpp rename to src/strategy/classes/hunter/HunterAiObjectContext.cpp diff --git a/src/strategy/hunter/HunterAiObjectContext.h b/src/strategy/classes/hunter/HunterAiObjectContext.h similarity index 100% rename from src/strategy/hunter/HunterAiObjectContext.h rename to src/strategy/classes/hunter/HunterAiObjectContext.h diff --git a/src/strategy/hunter/HunterBuffStrategies.cpp b/src/strategy/classes/hunter/HunterBuffStrategies.cpp similarity index 100% rename from src/strategy/hunter/HunterBuffStrategies.cpp rename to src/strategy/classes/hunter/HunterBuffStrategies.cpp diff --git a/src/strategy/hunter/HunterBuffStrategies.h b/src/strategy/classes/hunter/HunterBuffStrategies.h similarity index 100% rename from src/strategy/hunter/HunterBuffStrategies.h rename to src/strategy/classes/hunter/HunterBuffStrategies.h diff --git a/src/strategy/hunter/HunterTriggers.cpp b/src/strategy/classes/hunter/HunterTriggers.cpp similarity index 100% rename from src/strategy/hunter/HunterTriggers.cpp rename to src/strategy/classes/hunter/HunterTriggers.cpp diff --git a/src/strategy/hunter/HunterTriggers.h b/src/strategy/classes/hunter/HunterTriggers.h similarity index 100% rename from src/strategy/hunter/HunterTriggers.h rename to src/strategy/classes/hunter/HunterTriggers.h diff --git a/src/strategy/mage/ArcaneMageStrategy.cpp b/src/strategy/classes/mage/ArcaneMageStrategy.cpp similarity index 100% rename from src/strategy/mage/ArcaneMageStrategy.cpp rename to src/strategy/classes/mage/ArcaneMageStrategy.cpp diff --git a/src/strategy/mage/ArcaneMageStrategy.h b/src/strategy/classes/mage/ArcaneMageStrategy.h similarity index 100% rename from src/strategy/mage/ArcaneMageStrategy.h rename to src/strategy/classes/mage/ArcaneMageStrategy.h diff --git a/src/strategy/mage/FireMageStrategy.cpp b/src/strategy/classes/mage/FireMageStrategy.cpp similarity index 100% rename from src/strategy/mage/FireMageStrategy.cpp rename to src/strategy/classes/mage/FireMageStrategy.cpp diff --git a/src/strategy/mage/FireMageStrategy.h b/src/strategy/classes/mage/FireMageStrategy.h similarity index 100% rename from src/strategy/mage/FireMageStrategy.h rename to src/strategy/classes/mage/FireMageStrategy.h diff --git a/src/strategy/mage/FrostMageStrategy.cpp b/src/strategy/classes/mage/FrostMageStrategy.cpp similarity index 100% rename from src/strategy/mage/FrostMageStrategy.cpp rename to src/strategy/classes/mage/FrostMageStrategy.cpp diff --git a/src/strategy/mage/FrostMageStrategy.h b/src/strategy/classes/mage/FrostMageStrategy.h similarity index 100% rename from src/strategy/mage/FrostMageStrategy.h rename to src/strategy/classes/mage/FrostMageStrategy.h diff --git a/src/strategy/mage/GenericMageNonCombatStrategy.cpp b/src/strategy/classes/mage/GenericMageNonCombatStrategy.cpp similarity index 100% rename from src/strategy/mage/GenericMageNonCombatStrategy.cpp rename to src/strategy/classes/mage/GenericMageNonCombatStrategy.cpp diff --git a/src/strategy/mage/GenericMageNonCombatStrategy.h b/src/strategy/classes/mage/GenericMageNonCombatStrategy.h similarity index 100% rename from src/strategy/mage/GenericMageNonCombatStrategy.h rename to src/strategy/classes/mage/GenericMageNonCombatStrategy.h diff --git a/src/strategy/mage/GenericMageStrategy.cpp b/src/strategy/classes/mage/GenericMageStrategy.cpp similarity index 100% rename from src/strategy/mage/GenericMageStrategy.cpp rename to src/strategy/classes/mage/GenericMageStrategy.cpp diff --git a/src/strategy/mage/GenericMageStrategy.h b/src/strategy/classes/mage/GenericMageStrategy.h similarity index 100% rename from src/strategy/mage/GenericMageStrategy.h rename to src/strategy/classes/mage/GenericMageStrategy.h diff --git a/src/strategy/mage/MageActions.cpp b/src/strategy/classes/mage/MageActions.cpp similarity index 100% rename from src/strategy/mage/MageActions.cpp rename to src/strategy/classes/mage/MageActions.cpp diff --git a/src/strategy/mage/MageActions.h b/src/strategy/classes/mage/MageActions.h similarity index 100% rename from src/strategy/mage/MageActions.h rename to src/strategy/classes/mage/MageActions.h diff --git a/src/strategy/mage/MageAiObjectContext.cpp b/src/strategy/classes/mage/MageAiObjectContext.cpp similarity index 100% rename from src/strategy/mage/MageAiObjectContext.cpp rename to src/strategy/classes/mage/MageAiObjectContext.cpp diff --git a/src/strategy/mage/MageAiObjectContext.h b/src/strategy/classes/mage/MageAiObjectContext.h similarity index 100% rename from src/strategy/mage/MageAiObjectContext.h rename to src/strategy/classes/mage/MageAiObjectContext.h diff --git a/src/strategy/mage/MageTriggers.cpp b/src/strategy/classes/mage/MageTriggers.cpp similarity index 100% rename from src/strategy/mage/MageTriggers.cpp rename to src/strategy/classes/mage/MageTriggers.cpp diff --git a/src/strategy/mage/MageTriggers.h b/src/strategy/classes/mage/MageTriggers.h similarity index 100% rename from src/strategy/mage/MageTriggers.h rename to src/strategy/classes/mage/MageTriggers.h diff --git a/src/strategy/paladin/DpsPaladinStrategy.cpp b/src/strategy/classes/paladin/DpsPaladinStrategy.cpp similarity index 100% rename from src/strategy/paladin/DpsPaladinStrategy.cpp rename to src/strategy/classes/paladin/DpsPaladinStrategy.cpp diff --git a/src/strategy/paladin/DpsPaladinStrategy.h b/src/strategy/classes/paladin/DpsPaladinStrategy.h similarity index 100% rename from src/strategy/paladin/DpsPaladinStrategy.h rename to src/strategy/classes/paladin/DpsPaladinStrategy.h diff --git a/src/strategy/paladin/GenericPaladinNonCombatStrategy.cpp b/src/strategy/classes/paladin/GenericPaladinNonCombatStrategy.cpp similarity index 100% rename from src/strategy/paladin/GenericPaladinNonCombatStrategy.cpp rename to src/strategy/classes/paladin/GenericPaladinNonCombatStrategy.cpp diff --git a/src/strategy/paladin/GenericPaladinNonCombatStrategy.h b/src/strategy/classes/paladin/GenericPaladinNonCombatStrategy.h similarity index 100% rename from src/strategy/paladin/GenericPaladinNonCombatStrategy.h rename to src/strategy/classes/paladin/GenericPaladinNonCombatStrategy.h diff --git a/src/strategy/paladin/GenericPaladinStrategy.cpp b/src/strategy/classes/paladin/GenericPaladinStrategy.cpp similarity index 100% rename from src/strategy/paladin/GenericPaladinStrategy.cpp rename to src/strategy/classes/paladin/GenericPaladinStrategy.cpp diff --git a/src/strategy/paladin/GenericPaladinStrategy.h b/src/strategy/classes/paladin/GenericPaladinStrategy.h similarity index 100% rename from src/strategy/paladin/GenericPaladinStrategy.h rename to src/strategy/classes/paladin/GenericPaladinStrategy.h diff --git a/src/strategy/paladin/GenericPaladinStrategyActionNodeFactory.h b/src/strategy/classes/paladin/GenericPaladinStrategyActionNodeFactory.h similarity index 100% rename from src/strategy/paladin/GenericPaladinStrategyActionNodeFactory.h rename to src/strategy/classes/paladin/GenericPaladinStrategyActionNodeFactory.h diff --git a/src/strategy/paladin/HealPaladinStrategy.cpp b/src/strategy/classes/paladin/HealPaladinStrategy.cpp similarity index 100% rename from src/strategy/paladin/HealPaladinStrategy.cpp rename to src/strategy/classes/paladin/HealPaladinStrategy.cpp diff --git a/src/strategy/paladin/HealPaladinStrategy.h b/src/strategy/classes/paladin/HealPaladinStrategy.h similarity index 100% rename from src/strategy/paladin/HealPaladinStrategy.h rename to src/strategy/classes/paladin/HealPaladinStrategy.h diff --git a/src/strategy/paladin/PaladinActions.cpp b/src/strategy/classes/paladin/PaladinActions.cpp similarity index 100% rename from src/strategy/paladin/PaladinActions.cpp rename to src/strategy/classes/paladin/PaladinActions.cpp diff --git a/src/strategy/paladin/PaladinActions.h b/src/strategy/classes/paladin/PaladinActions.h similarity index 100% rename from src/strategy/paladin/PaladinActions.h rename to src/strategy/classes/paladin/PaladinActions.h diff --git a/src/strategy/paladin/PaladinAiObjectContext.cpp b/src/strategy/classes/paladin/PaladinAiObjectContext.cpp similarity index 100% rename from src/strategy/paladin/PaladinAiObjectContext.cpp rename to src/strategy/classes/paladin/PaladinAiObjectContext.cpp diff --git a/src/strategy/paladin/PaladinAiObjectContext.h b/src/strategy/classes/paladin/PaladinAiObjectContext.h similarity index 100% rename from src/strategy/paladin/PaladinAiObjectContext.h rename to src/strategy/classes/paladin/PaladinAiObjectContext.h diff --git a/src/strategy/paladin/PaladinBuffStrategies.cpp b/src/strategy/classes/paladin/PaladinBuffStrategies.cpp similarity index 100% rename from src/strategy/paladin/PaladinBuffStrategies.cpp rename to src/strategy/classes/paladin/PaladinBuffStrategies.cpp diff --git a/src/strategy/paladin/PaladinBuffStrategies.h b/src/strategy/classes/paladin/PaladinBuffStrategies.h similarity index 100% rename from src/strategy/paladin/PaladinBuffStrategies.h rename to src/strategy/classes/paladin/PaladinBuffStrategies.h diff --git a/src/strategy/paladin/PaladinTriggers.cpp b/src/strategy/classes/paladin/PaladinTriggers.cpp similarity index 100% rename from src/strategy/paladin/PaladinTriggers.cpp rename to src/strategy/classes/paladin/PaladinTriggers.cpp diff --git a/src/strategy/paladin/PaladinTriggers.h b/src/strategy/classes/paladin/PaladinTriggers.h similarity index 100% rename from src/strategy/paladin/PaladinTriggers.h rename to src/strategy/classes/paladin/PaladinTriggers.h diff --git a/src/strategy/paladin/TankPaladinStrategy.cpp b/src/strategy/classes/paladin/TankPaladinStrategy.cpp similarity index 100% rename from src/strategy/paladin/TankPaladinStrategy.cpp rename to src/strategy/classes/paladin/TankPaladinStrategy.cpp diff --git a/src/strategy/paladin/TankPaladinStrategy.h b/src/strategy/classes/paladin/TankPaladinStrategy.h similarity index 100% rename from src/strategy/paladin/TankPaladinStrategy.h rename to src/strategy/classes/paladin/TankPaladinStrategy.h diff --git a/src/strategy/priest/GenericPriestStrategy.cpp b/src/strategy/classes/priest/GenericPriestStrategy.cpp similarity index 100% rename from src/strategy/priest/GenericPriestStrategy.cpp rename to src/strategy/classes/priest/GenericPriestStrategy.cpp diff --git a/src/strategy/priest/GenericPriestStrategy.h b/src/strategy/classes/priest/GenericPriestStrategy.h similarity index 100% rename from src/strategy/priest/GenericPriestStrategy.h rename to src/strategy/classes/priest/GenericPriestStrategy.h diff --git a/src/strategy/priest/GenericPriestStrategyActionNodeFactory.h b/src/strategy/classes/priest/GenericPriestStrategyActionNodeFactory.h similarity index 100% rename from src/strategy/priest/GenericPriestStrategyActionNodeFactory.h rename to src/strategy/classes/priest/GenericPriestStrategyActionNodeFactory.h diff --git a/src/strategy/priest/HealPriestStrategy.cpp b/src/strategy/classes/priest/HealPriestStrategy.cpp similarity index 100% rename from src/strategy/priest/HealPriestStrategy.cpp rename to src/strategy/classes/priest/HealPriestStrategy.cpp diff --git a/src/strategy/priest/HealPriestStrategy.h b/src/strategy/classes/priest/HealPriestStrategy.h similarity index 100% rename from src/strategy/priest/HealPriestStrategy.h rename to src/strategy/classes/priest/HealPriestStrategy.h diff --git a/src/strategy/priest/HolyPriestStrategy.cpp b/src/strategy/classes/priest/HolyPriestStrategy.cpp similarity index 100% rename from src/strategy/priest/HolyPriestStrategy.cpp rename to src/strategy/classes/priest/HolyPriestStrategy.cpp diff --git a/src/strategy/priest/HolyPriestStrategy.h b/src/strategy/classes/priest/HolyPriestStrategy.h similarity index 100% rename from src/strategy/priest/HolyPriestStrategy.h rename to src/strategy/classes/priest/HolyPriestStrategy.h diff --git a/src/strategy/priest/PriestActions.cpp b/src/strategy/classes/priest/PriestActions.cpp similarity index 100% rename from src/strategy/priest/PriestActions.cpp rename to src/strategy/classes/priest/PriestActions.cpp diff --git a/src/strategy/priest/PriestActions.h b/src/strategy/classes/priest/PriestActions.h similarity index 100% rename from src/strategy/priest/PriestActions.h rename to src/strategy/classes/priest/PriestActions.h diff --git a/src/strategy/priest/PriestAiObjectContext.cpp b/src/strategy/classes/priest/PriestAiObjectContext.cpp similarity index 100% rename from src/strategy/priest/PriestAiObjectContext.cpp rename to src/strategy/classes/priest/PriestAiObjectContext.cpp diff --git a/src/strategy/priest/PriestAiObjectContext.h b/src/strategy/classes/priest/PriestAiObjectContext.h similarity index 100% rename from src/strategy/priest/PriestAiObjectContext.h rename to src/strategy/classes/priest/PriestAiObjectContext.h diff --git a/src/strategy/priest/PriestNonCombatStrategy.cpp b/src/strategy/classes/priest/PriestNonCombatStrategy.cpp similarity index 100% rename from src/strategy/priest/PriestNonCombatStrategy.cpp rename to src/strategy/classes/priest/PriestNonCombatStrategy.cpp diff --git a/src/strategy/priest/PriestNonCombatStrategy.h b/src/strategy/classes/priest/PriestNonCombatStrategy.h similarity index 100% rename from src/strategy/priest/PriestNonCombatStrategy.h rename to src/strategy/classes/priest/PriestNonCombatStrategy.h diff --git a/src/strategy/priest/PriestNonCombatStrategyActionNodeFactory.h b/src/strategy/classes/priest/PriestNonCombatStrategyActionNodeFactory.h similarity index 100% rename from src/strategy/priest/PriestNonCombatStrategyActionNodeFactory.h rename to src/strategy/classes/priest/PriestNonCombatStrategyActionNodeFactory.h diff --git a/src/strategy/priest/PriestTriggers.cpp b/src/strategy/classes/priest/PriestTriggers.cpp similarity index 100% rename from src/strategy/priest/PriestTriggers.cpp rename to src/strategy/classes/priest/PriestTriggers.cpp diff --git a/src/strategy/priest/PriestTriggers.h b/src/strategy/classes/priest/PriestTriggers.h similarity index 100% rename from src/strategy/priest/PriestTriggers.h rename to src/strategy/classes/priest/PriestTriggers.h diff --git a/src/strategy/priest/ShadowPriestStrategy.cpp b/src/strategy/classes/priest/ShadowPriestStrategy.cpp similarity index 100% rename from src/strategy/priest/ShadowPriestStrategy.cpp rename to src/strategy/classes/priest/ShadowPriestStrategy.cpp diff --git a/src/strategy/priest/ShadowPriestStrategy.h b/src/strategy/classes/priest/ShadowPriestStrategy.h similarity index 100% rename from src/strategy/priest/ShadowPriestStrategy.h rename to src/strategy/classes/priest/ShadowPriestStrategy.h diff --git a/src/strategy/priest/ShadowPriestStrategyActionNodeFactory.h b/src/strategy/classes/priest/ShadowPriestStrategyActionNodeFactory.h similarity index 100% rename from src/strategy/priest/ShadowPriestStrategyActionNodeFactory.h rename to src/strategy/classes/priest/ShadowPriestStrategyActionNodeFactory.h diff --git a/src/strategy/rogue/AssassinationRogueStrategy.cpp b/src/strategy/classes/rogue/AssassinationRogueStrategy.cpp similarity index 100% rename from src/strategy/rogue/AssassinationRogueStrategy.cpp rename to src/strategy/classes/rogue/AssassinationRogueStrategy.cpp diff --git a/src/strategy/rogue/AssassinationRogueStrategy.h b/src/strategy/classes/rogue/AssassinationRogueStrategy.h similarity index 100% rename from src/strategy/rogue/AssassinationRogueStrategy.h rename to src/strategy/classes/rogue/AssassinationRogueStrategy.h diff --git a/src/strategy/rogue/DpsRogueStrategy.cpp b/src/strategy/classes/rogue/DpsRogueStrategy.cpp similarity index 100% rename from src/strategy/rogue/DpsRogueStrategy.cpp rename to src/strategy/classes/rogue/DpsRogueStrategy.cpp diff --git a/src/strategy/rogue/DpsRogueStrategy.h b/src/strategy/classes/rogue/DpsRogueStrategy.h similarity index 100% rename from src/strategy/rogue/DpsRogueStrategy.h rename to src/strategy/classes/rogue/DpsRogueStrategy.h diff --git a/src/strategy/rogue/GenericRogueNonCombatStrategy.cpp b/src/strategy/classes/rogue/GenericRogueNonCombatStrategy.cpp similarity index 100% rename from src/strategy/rogue/GenericRogueNonCombatStrategy.cpp rename to src/strategy/classes/rogue/GenericRogueNonCombatStrategy.cpp diff --git a/src/strategy/rogue/GenericRogueNonCombatStrategy.h b/src/strategy/classes/rogue/GenericRogueNonCombatStrategy.h similarity index 100% rename from src/strategy/rogue/GenericRogueNonCombatStrategy.h rename to src/strategy/classes/rogue/GenericRogueNonCombatStrategy.h diff --git a/src/strategy/rogue/RogueActions.cpp b/src/strategy/classes/rogue/RogueActions.cpp similarity index 100% rename from src/strategy/rogue/RogueActions.cpp rename to src/strategy/classes/rogue/RogueActions.cpp diff --git a/src/strategy/rogue/RogueActions.h b/src/strategy/classes/rogue/RogueActions.h similarity index 100% rename from src/strategy/rogue/RogueActions.h rename to src/strategy/classes/rogue/RogueActions.h diff --git a/src/strategy/rogue/RogueAiObjectContext.cpp b/src/strategy/classes/rogue/RogueAiObjectContext.cpp similarity index 100% rename from src/strategy/rogue/RogueAiObjectContext.cpp rename to src/strategy/classes/rogue/RogueAiObjectContext.cpp diff --git a/src/strategy/rogue/RogueAiObjectContext.h b/src/strategy/classes/rogue/RogueAiObjectContext.h similarity index 100% rename from src/strategy/rogue/RogueAiObjectContext.h rename to src/strategy/classes/rogue/RogueAiObjectContext.h diff --git a/src/strategy/rogue/RogueComboActions.cpp b/src/strategy/classes/rogue/RogueComboActions.cpp similarity index 100% rename from src/strategy/rogue/RogueComboActions.cpp rename to src/strategy/classes/rogue/RogueComboActions.cpp diff --git a/src/strategy/rogue/RogueComboActions.h b/src/strategy/classes/rogue/RogueComboActions.h similarity index 100% rename from src/strategy/rogue/RogueComboActions.h rename to src/strategy/classes/rogue/RogueComboActions.h diff --git a/src/strategy/rogue/RogueFinishingActions.h b/src/strategy/classes/rogue/RogueFinishingActions.h similarity index 100% rename from src/strategy/rogue/RogueFinishingActions.h rename to src/strategy/classes/rogue/RogueFinishingActions.h diff --git a/src/strategy/rogue/RogueOpeningActions.cpp b/src/strategy/classes/rogue/RogueOpeningActions.cpp similarity index 100% rename from src/strategy/rogue/RogueOpeningActions.cpp rename to src/strategy/classes/rogue/RogueOpeningActions.cpp diff --git a/src/strategy/rogue/RogueOpeningActions.h b/src/strategy/classes/rogue/RogueOpeningActions.h similarity index 100% rename from src/strategy/rogue/RogueOpeningActions.h rename to src/strategy/classes/rogue/RogueOpeningActions.h diff --git a/src/strategy/rogue/RogueTriggers.cpp b/src/strategy/classes/rogue/RogueTriggers.cpp similarity index 100% rename from src/strategy/rogue/RogueTriggers.cpp rename to src/strategy/classes/rogue/RogueTriggers.cpp diff --git a/src/strategy/rogue/RogueTriggers.h b/src/strategy/classes/rogue/RogueTriggers.h similarity index 100% rename from src/strategy/rogue/RogueTriggers.h rename to src/strategy/classes/rogue/RogueTriggers.h diff --git a/src/strategy/shaman/CasterShamanStrategy.cpp b/src/strategy/classes/shaman/CasterShamanStrategy.cpp similarity index 100% rename from src/strategy/shaman/CasterShamanStrategy.cpp rename to src/strategy/classes/shaman/CasterShamanStrategy.cpp diff --git a/src/strategy/shaman/CasterShamanStrategy.h b/src/strategy/classes/shaman/CasterShamanStrategy.h similarity index 100% rename from src/strategy/shaman/CasterShamanStrategy.h rename to src/strategy/classes/shaman/CasterShamanStrategy.h diff --git a/src/strategy/shaman/GenericShamanStrategy.cpp b/src/strategy/classes/shaman/GenericShamanStrategy.cpp similarity index 100% rename from src/strategy/shaman/GenericShamanStrategy.cpp rename to src/strategy/classes/shaman/GenericShamanStrategy.cpp diff --git a/src/strategy/shaman/GenericShamanStrategy.h b/src/strategy/classes/shaman/GenericShamanStrategy.h similarity index 100% rename from src/strategy/shaman/GenericShamanStrategy.h rename to src/strategy/classes/shaman/GenericShamanStrategy.h diff --git a/src/strategy/shaman/HealShamanStrategy.cpp b/src/strategy/classes/shaman/HealShamanStrategy.cpp similarity index 100% rename from src/strategy/shaman/HealShamanStrategy.cpp rename to src/strategy/classes/shaman/HealShamanStrategy.cpp diff --git a/src/strategy/shaman/HealShamanStrategy.h b/src/strategy/classes/shaman/HealShamanStrategy.h similarity index 100% rename from src/strategy/shaman/HealShamanStrategy.h rename to src/strategy/classes/shaman/HealShamanStrategy.h diff --git a/src/strategy/shaman/MeleeShamanStrategy.cpp b/src/strategy/classes/shaman/MeleeShamanStrategy.cpp similarity index 100% rename from src/strategy/shaman/MeleeShamanStrategy.cpp rename to src/strategy/classes/shaman/MeleeShamanStrategy.cpp diff --git a/src/strategy/shaman/MeleeShamanStrategy.h b/src/strategy/classes/shaman/MeleeShamanStrategy.h similarity index 100% rename from src/strategy/shaman/MeleeShamanStrategy.h rename to src/strategy/classes/shaman/MeleeShamanStrategy.h diff --git a/src/strategy/shaman/ShamanActions.cpp b/src/strategy/classes/shaman/ShamanActions.cpp similarity index 100% rename from src/strategy/shaman/ShamanActions.cpp rename to src/strategy/classes/shaman/ShamanActions.cpp diff --git a/src/strategy/shaman/ShamanActions.h b/src/strategy/classes/shaman/ShamanActions.h similarity index 100% rename from src/strategy/shaman/ShamanActions.h rename to src/strategy/classes/shaman/ShamanActions.h diff --git a/src/strategy/shaman/ShamanAiObjectContext.cpp b/src/strategy/classes/shaman/ShamanAiObjectContext.cpp similarity index 100% rename from src/strategy/shaman/ShamanAiObjectContext.cpp rename to src/strategy/classes/shaman/ShamanAiObjectContext.cpp diff --git a/src/strategy/shaman/ShamanAiObjectContext.h b/src/strategy/classes/shaman/ShamanAiObjectContext.h similarity index 100% rename from src/strategy/shaman/ShamanAiObjectContext.h rename to src/strategy/classes/shaman/ShamanAiObjectContext.h diff --git a/src/strategy/shaman/ShamanNonCombatStrategy.cpp b/src/strategy/classes/shaman/ShamanNonCombatStrategy.cpp similarity index 100% rename from src/strategy/shaman/ShamanNonCombatStrategy.cpp rename to src/strategy/classes/shaman/ShamanNonCombatStrategy.cpp diff --git a/src/strategy/shaman/ShamanNonCombatStrategy.h b/src/strategy/classes/shaman/ShamanNonCombatStrategy.h similarity index 100% rename from src/strategy/shaman/ShamanNonCombatStrategy.h rename to src/strategy/classes/shaman/ShamanNonCombatStrategy.h diff --git a/src/strategy/shaman/ShamanTriggers.cpp b/src/strategy/classes/shaman/ShamanTriggers.cpp similarity index 100% rename from src/strategy/shaman/ShamanTriggers.cpp rename to src/strategy/classes/shaman/ShamanTriggers.cpp diff --git a/src/strategy/shaman/ShamanTriggers.h b/src/strategy/classes/shaman/ShamanTriggers.h similarity index 100% rename from src/strategy/shaman/ShamanTriggers.h rename to src/strategy/classes/shaman/ShamanTriggers.h diff --git a/src/strategy/shaman/TotemsShamanStrategy.cpp b/src/strategy/classes/shaman/TotemsShamanStrategy.cpp similarity index 100% rename from src/strategy/shaman/TotemsShamanStrategy.cpp rename to src/strategy/classes/shaman/TotemsShamanStrategy.cpp diff --git a/src/strategy/shaman/TotemsShamanStrategy.h b/src/strategy/classes/shaman/TotemsShamanStrategy.h similarity index 100% rename from src/strategy/shaman/TotemsShamanStrategy.h rename to src/strategy/classes/shaman/TotemsShamanStrategy.h diff --git a/src/strategy/warlock/DpsWarlockStrategy.cpp b/src/strategy/classes/warlock/DpsWarlockStrategy.cpp similarity index 100% rename from src/strategy/warlock/DpsWarlockStrategy.cpp rename to src/strategy/classes/warlock/DpsWarlockStrategy.cpp diff --git a/src/strategy/warlock/DpsWarlockStrategy.h b/src/strategy/classes/warlock/DpsWarlockStrategy.h similarity index 100% rename from src/strategy/warlock/DpsWarlockStrategy.h rename to src/strategy/classes/warlock/DpsWarlockStrategy.h diff --git a/src/strategy/warlock/GenericWarlockNonCombatStrategy.cpp b/src/strategy/classes/warlock/GenericWarlockNonCombatStrategy.cpp similarity index 100% rename from src/strategy/warlock/GenericWarlockNonCombatStrategy.cpp rename to src/strategy/classes/warlock/GenericWarlockNonCombatStrategy.cpp diff --git a/src/strategy/warlock/GenericWarlockNonCombatStrategy.h b/src/strategy/classes/warlock/GenericWarlockNonCombatStrategy.h similarity index 100% rename from src/strategy/warlock/GenericWarlockNonCombatStrategy.h rename to src/strategy/classes/warlock/GenericWarlockNonCombatStrategy.h diff --git a/src/strategy/warlock/GenericWarlockStrategy.cpp b/src/strategy/classes/warlock/GenericWarlockStrategy.cpp similarity index 100% rename from src/strategy/warlock/GenericWarlockStrategy.cpp rename to src/strategy/classes/warlock/GenericWarlockStrategy.cpp diff --git a/src/strategy/warlock/GenericWarlockStrategy.h b/src/strategy/classes/warlock/GenericWarlockStrategy.h similarity index 100% rename from src/strategy/warlock/GenericWarlockStrategy.h rename to src/strategy/classes/warlock/GenericWarlockStrategy.h diff --git a/src/strategy/warlock/TankWarlockStrategy.cpp b/src/strategy/classes/warlock/TankWarlockStrategy.cpp similarity index 100% rename from src/strategy/warlock/TankWarlockStrategy.cpp rename to src/strategy/classes/warlock/TankWarlockStrategy.cpp diff --git a/src/strategy/warlock/TankWarlockStrategy.h b/src/strategy/classes/warlock/TankWarlockStrategy.h similarity index 100% rename from src/strategy/warlock/TankWarlockStrategy.h rename to src/strategy/classes/warlock/TankWarlockStrategy.h diff --git a/src/strategy/warlock/WarlockActions.cpp b/src/strategy/classes/warlock/WarlockActions.cpp similarity index 100% rename from src/strategy/warlock/WarlockActions.cpp rename to src/strategy/classes/warlock/WarlockActions.cpp diff --git a/src/strategy/warlock/WarlockActions.h b/src/strategy/classes/warlock/WarlockActions.h similarity index 100% rename from src/strategy/warlock/WarlockActions.h rename to src/strategy/classes/warlock/WarlockActions.h diff --git a/src/strategy/warlock/WarlockAiObjectContext.cpp b/src/strategy/classes/warlock/WarlockAiObjectContext.cpp similarity index 100% rename from src/strategy/warlock/WarlockAiObjectContext.cpp rename to src/strategy/classes/warlock/WarlockAiObjectContext.cpp diff --git a/src/strategy/warlock/WarlockAiObjectContext.h b/src/strategy/classes/warlock/WarlockAiObjectContext.h similarity index 100% rename from src/strategy/warlock/WarlockAiObjectContext.h rename to src/strategy/classes/warlock/WarlockAiObjectContext.h diff --git a/src/strategy/warlock/WarlockTriggers.cpp b/src/strategy/classes/warlock/WarlockTriggers.cpp similarity index 100% rename from src/strategy/warlock/WarlockTriggers.cpp rename to src/strategy/classes/warlock/WarlockTriggers.cpp diff --git a/src/strategy/warlock/WarlockTriggers.h b/src/strategy/classes/warlock/WarlockTriggers.h similarity index 100% rename from src/strategy/warlock/WarlockTriggers.h rename to src/strategy/classes/warlock/WarlockTriggers.h diff --git a/src/strategy/warrior/ArmsWarriorStrategy.cpp b/src/strategy/classes/warrior/ArmsWarriorStrategy.cpp similarity index 100% rename from src/strategy/warrior/ArmsWarriorStrategy.cpp rename to src/strategy/classes/warrior/ArmsWarriorStrategy.cpp diff --git a/src/strategy/warrior/ArmsWarriorStrategy.h b/src/strategy/classes/warrior/ArmsWarriorStrategy.h similarity index 100% rename from src/strategy/warrior/ArmsWarriorStrategy.h rename to src/strategy/classes/warrior/ArmsWarriorStrategy.h diff --git a/src/strategy/warrior/FuryWarriorStrategy.cpp b/src/strategy/classes/warrior/FuryWarriorStrategy.cpp similarity index 100% rename from src/strategy/warrior/FuryWarriorStrategy.cpp rename to src/strategy/classes/warrior/FuryWarriorStrategy.cpp diff --git a/src/strategy/warrior/FuryWarriorStrategy.h b/src/strategy/classes/warrior/FuryWarriorStrategy.h similarity index 100% rename from src/strategy/warrior/FuryWarriorStrategy.h rename to src/strategy/classes/warrior/FuryWarriorStrategy.h diff --git a/src/strategy/warrior/GenericWarriorNonCombatStrategy.cpp b/src/strategy/classes/warrior/GenericWarriorNonCombatStrategy.cpp similarity index 100% rename from src/strategy/warrior/GenericWarriorNonCombatStrategy.cpp rename to src/strategy/classes/warrior/GenericWarriorNonCombatStrategy.cpp diff --git a/src/strategy/warrior/GenericWarriorNonCombatStrategy.h b/src/strategy/classes/warrior/GenericWarriorNonCombatStrategy.h similarity index 100% rename from src/strategy/warrior/GenericWarriorNonCombatStrategy.h rename to src/strategy/classes/warrior/GenericWarriorNonCombatStrategy.h diff --git a/src/strategy/warrior/GenericWarriorStrategy.cpp b/src/strategy/classes/warrior/GenericWarriorStrategy.cpp similarity index 100% rename from src/strategy/warrior/GenericWarriorStrategy.cpp rename to src/strategy/classes/warrior/GenericWarriorStrategy.cpp diff --git a/src/strategy/warrior/GenericWarriorStrategy.h b/src/strategy/classes/warrior/GenericWarriorStrategy.h similarity index 100% rename from src/strategy/warrior/GenericWarriorStrategy.h rename to src/strategy/classes/warrior/GenericWarriorStrategy.h diff --git a/src/strategy/warrior/TankWarriorStrategy.cpp b/src/strategy/classes/warrior/TankWarriorStrategy.cpp similarity index 100% rename from src/strategy/warrior/TankWarriorStrategy.cpp rename to src/strategy/classes/warrior/TankWarriorStrategy.cpp diff --git a/src/strategy/warrior/TankWarriorStrategy.h b/src/strategy/classes/warrior/TankWarriorStrategy.h similarity index 100% rename from src/strategy/warrior/TankWarriorStrategy.h rename to src/strategy/classes/warrior/TankWarriorStrategy.h diff --git a/src/strategy/warrior/WarriorActions.cpp b/src/strategy/classes/warrior/WarriorActions.cpp similarity index 100% rename from src/strategy/warrior/WarriorActions.cpp rename to src/strategy/classes/warrior/WarriorActions.cpp diff --git a/src/strategy/warrior/WarriorActions.h b/src/strategy/classes/warrior/WarriorActions.h similarity index 100% rename from src/strategy/warrior/WarriorActions.h rename to src/strategy/classes/warrior/WarriorActions.h diff --git a/src/strategy/warrior/WarriorAiObjectContext.cpp b/src/strategy/classes/warrior/WarriorAiObjectContext.cpp similarity index 100% rename from src/strategy/warrior/WarriorAiObjectContext.cpp rename to src/strategy/classes/warrior/WarriorAiObjectContext.cpp diff --git a/src/strategy/warrior/WarriorAiObjectContext.h b/src/strategy/classes/warrior/WarriorAiObjectContext.h similarity index 100% rename from src/strategy/warrior/WarriorAiObjectContext.h rename to src/strategy/classes/warrior/WarriorAiObjectContext.h diff --git a/src/strategy/warrior/WarriorTriggers.cpp b/src/strategy/classes/warrior/WarriorTriggers.cpp similarity index 100% rename from src/strategy/warrior/WarriorTriggers.cpp rename to src/strategy/classes/warrior/WarriorTriggers.cpp diff --git a/src/strategy/warrior/WarriorTriggers.h b/src/strategy/classes/warrior/WarriorTriggers.h similarity index 100% rename from src/strategy/warrior/WarriorTriggers.h rename to src/strategy/classes/warrior/WarriorTriggers.h diff --git a/src/strategy/actions/NewRpgAction.cpp b/src/strategy/rpg/NewRpgAction.cpp similarity index 100% rename from src/strategy/actions/NewRpgAction.cpp rename to src/strategy/rpg/NewRpgAction.cpp diff --git a/src/strategy/actions/NewRpgAction.h b/src/strategy/rpg/NewRpgAction.h similarity index 100% rename from src/strategy/actions/NewRpgAction.h rename to src/strategy/rpg/NewRpgAction.h diff --git a/src/strategy/generic/NewRpgStrategy.cpp b/src/strategy/rpg/NewRpgStrategy.cpp similarity index 100% rename from src/strategy/generic/NewRpgStrategy.cpp rename to src/strategy/rpg/NewRpgStrategy.cpp diff --git a/src/strategy/generic/NewRpgStrategy.h b/src/strategy/rpg/NewRpgStrategy.h similarity index 100% rename from src/strategy/generic/NewRpgStrategy.h rename to src/strategy/rpg/NewRpgStrategy.h diff --git a/src/strategy/triggers/NewRpgTrigger.cpp b/src/strategy/rpg/NewRpgTrigger.cpp similarity index 100% rename from src/strategy/triggers/NewRpgTrigger.cpp rename to src/strategy/rpg/NewRpgTrigger.cpp diff --git a/src/strategy/triggers/NewRpgTriggers.h b/src/strategy/rpg/NewRpgTriggers.h similarity index 100% rename from src/strategy/triggers/NewRpgTriggers.h rename to src/strategy/rpg/NewRpgTriggers.h From 2171493d5e8aa3541eec11dc2256d7a73f461f46 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Fri, 13 Dec 2024 20:20:13 +0800 Subject: [PATCH 15/26] Update GO_INNKEEPER prob --- src/strategy/rpg/NewRpgAction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/strategy/rpg/NewRpgAction.cpp b/src/strategy/rpg/NewRpgAction.cpp index 6b7e9e07..ff91251c 100644 --- a/src/strategy/rpg/NewRpgAction.cpp +++ b/src/strategy/rpg/NewRpgAction.cpp @@ -44,7 +44,7 @@ bool NewRpgStatusUpdateAction::Execute(Event event) } } // IDLE -> GO_INNKEEPER - else if (bot->GetLevel() >= 6 && roll <= 50) + else if (bot->GetLevel() >= 6 && roll <= 55) { WorldPosition pos = SelectRandomInnKeeperPos(); if (pos != WorldPosition() && bot->GetExactDist(pos) > 50.0f) From 1f8d0d244ccbfa67a8960a5d1cf20f5becba77d6 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sat, 14 Dec 2024 01:33:39 +0800 Subject: [PATCH 16/26] Update starter position --- src/RandomPlayerbotMgr.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index d8922a12..ba9e458c 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -1451,6 +1451,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() "AND t.faction not in (11, 71, 79, 85, 188, 1575) " "AND (t.unit_flags & 256) = 0 " "AND (t.unit_flags & 4096) = 0 " + "AND t.rank = 0 " // "AND (t.flags_extra & 32768) = 0 " "GROUP BY " "map, " @@ -1531,20 +1532,28 @@ void RandomPlayerbotMgr::PrepareTeleportCache() continue; const AreaTableEntry* area = sAreaTableStore.LookupEntry(map->GetAreaId(1, x, y, z)); uint32 level = area->area_level; - for (int i = 1; i <= 80; i++) + for (int i = 5; i <= 80; i++) { std::vector& locs = locsPerLevelCache[i]; int counter = 0; WorldLocation levelLoc; for (auto& checkLoc : locs) { - if (loc.GetMapId() == checkLoc.GetMapId() && loc.GetExactDist(checkLoc) <= 500.0f) + if (loc.GetMapId() != checkLoc.GetMapId()) + continue; + + if (map->GetZoneId(1, loc.GetPositionX(), loc.GetPositionY(), loc.GetPositionZ()) != + map->GetZoneId(1, checkLoc.GetPositionX(), checkLoc.GetPositionY(), checkLoc.GetPositionZ())) + continue; + + if (loc.GetMapId() == checkLoc.GetMapId() && loc.GetExactDist(checkLoc) <= 1000.0f) { + counter++; levelLoc = checkLoc; } } - if (counter < 3) + if (counter < 15) continue; if (!(entry->hostileMask & 4)) From 912ef6d56f15dfb04ffcad77f08e7c4b1dbe0759 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sat, 14 Dec 2024 01:43:38 +0800 Subject: [PATCH 17/26] Increase reach melee relevance --- src/strategy/classes/druid/FeralDruidStrategy.cpp | 2 +- src/strategy/classes/paladin/DpsPaladinStrategy.cpp | 2 +- src/strategy/classes/paladin/TankPaladinStrategy.cpp | 2 +- src/strategy/classes/rogue/AssassinationRogueStrategy.cpp | 4 ++-- src/strategy/classes/rogue/DpsRogueStrategy.cpp | 4 ++-- src/strategy/classes/shaman/MeleeShamanStrategy.cpp | 2 +- src/strategy/classes/warrior/GenericWarriorStrategy.cpp | 2 +- src/strategy/generic/MeleeCombatStrategy.cpp | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/strategy/classes/druid/FeralDruidStrategy.cpp b/src/strategy/classes/druid/FeralDruidStrategy.cpp index 91e315b2..5fe2f63b 100644 --- a/src/strategy/classes/druid/FeralDruidStrategy.cpp +++ b/src/strategy/classes/druid/FeralDruidStrategy.cpp @@ -101,7 +101,7 @@ void FeralDruidStrategy::InitTriggers(std::vector& triggers) // triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", // ACTION_NORMAL + 7), nullptr))); triggers.push_back(new TriggerNode( - "enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_NORMAL + 8), nullptr))); + "enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_HIGH + 1), nullptr))); // triggers.push_back(new TriggerNode("enemy too close for melee", NextAction::array(0, new NextAction("move out of // enemy contact", ACTION_NORMAL + 8), nullptr))); triggers.push_back(new TriggerNode( diff --git a/src/strategy/classes/paladin/DpsPaladinStrategy.cpp b/src/strategy/classes/paladin/DpsPaladinStrategy.cpp index efd55a6a..4b6bf78c 100644 --- a/src/strategy/classes/paladin/DpsPaladinStrategy.cpp +++ b/src/strategy/classes/paladin/DpsPaladinStrategy.cpp @@ -131,5 +131,5 @@ void DpsPaladinStrategy::InitTriggers(std::vector& triggers) // NextAction::array(0, new NextAction("set facing", ACTION_NORMAL + 7), NULL))); triggers.push_back(new TriggerNode("enemy out of melee", - NextAction::array(0, new NextAction("reach melee", ACTION_NORMAL + 8), NULL))); + NextAction::array(0, new NextAction("reach melee", ACTION_HIGH + 1), NULL))); } diff --git a/src/strategy/classes/paladin/TankPaladinStrategy.cpp b/src/strategy/classes/paladin/TankPaladinStrategy.cpp index 25e761b7..aa017d0d 100644 --- a/src/strategy/classes/paladin/TankPaladinStrategy.cpp +++ b/src/strategy/classes/paladin/TankPaladinStrategy.cpp @@ -113,5 +113,5 @@ void TankPaladinStrategy::InitTriggers(std::vector& triggers) triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", ACTION_NORMAL + 7), nullptr))); triggers.push_back(new TriggerNode( - "enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_NORMAL + 8), nullptr))); + "enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_HIGH + 1), nullptr))); } diff --git a/src/strategy/classes/rogue/AssassinationRogueStrategy.cpp b/src/strategy/classes/rogue/AssassinationRogueStrategy.cpp index 5f3d2211..6069b383 100644 --- a/src/strategy/classes/rogue/AssassinationRogueStrategy.cpp +++ b/src/strategy/classes/rogue/AssassinationRogueStrategy.cpp @@ -88,6 +88,6 @@ void AssassinationRogueStrategy::InitTriggers(std::vector& trigger triggers.push_back(new TriggerNode( "enemy out of melee", - NextAction::array(0, new NextAction("stealth", ACTION_NORMAL + 9), new NextAction("sprint", ACTION_NORMAL + 8), - new NextAction("reach melee", ACTION_NORMAL + 7), NULL))); + NextAction::array(0, new NextAction("stealth", ACTION_HIGH + 3), new NextAction("sprint", ACTION_HIGH + 2), + new NextAction("reach melee", ACTION_HIGH + 1), NULL))); } diff --git a/src/strategy/classes/rogue/DpsRogueStrategy.cpp b/src/strategy/classes/rogue/DpsRogueStrategy.cpp index 0fd0d003..de4815df 100644 --- a/src/strategy/classes/rogue/DpsRogueStrategy.cpp +++ b/src/strategy/classes/rogue/DpsRogueStrategy.cpp @@ -134,8 +134,8 @@ void DpsRogueStrategy::InitTriggers(std::vector& triggers) triggers.push_back(new TriggerNode( "enemy out of melee", - NextAction::array(0, new NextAction("stealth", ACTION_NORMAL + 9), new NextAction("sprint", ACTION_NORMAL + 8), - new NextAction("reach melee", ACTION_NORMAL + 7), nullptr))); + NextAction::array(0, new NextAction("stealth", ACTION_HIGH + 3), new NextAction("sprint", ACTION_HIGH + 2), + new NextAction("reach melee", ACTION_HIGH + 1), nullptr))); triggers.push_back(new TriggerNode("expose armor", NextAction::array(0, new NextAction("expose armor", ACTION_HIGH + 3), nullptr))); diff --git a/src/strategy/classes/shaman/MeleeShamanStrategy.cpp b/src/strategy/classes/shaman/MeleeShamanStrategy.cpp index d38c163a..96cea7b7 100644 --- a/src/strategy/classes/shaman/MeleeShamanStrategy.cpp +++ b/src/strategy/classes/shaman/MeleeShamanStrategy.cpp @@ -77,7 +77,7 @@ void MeleeShamanStrategy::InitTriggers(std::vector& triggers) triggers.push_back(new TriggerNode( "medium aoe", NextAction::array(0, new NextAction("strength of earth totem", ACTION_LIGHT_HEAL), nullptr))); triggers.push_back(new TriggerNode( - "enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_NORMAL + 8), nullptr))); + "enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_HIGH + 1), nullptr))); triggers.push_back(new TriggerNode( "no fire totem", diff --git a/src/strategy/classes/warrior/GenericWarriorStrategy.cpp b/src/strategy/classes/warrior/GenericWarriorStrategy.cpp index 99b107fc..3b5588ea 100644 --- a/src/strategy/classes/warrior/GenericWarriorStrategy.cpp +++ b/src/strategy/classes/warrior/GenericWarriorStrategy.cpp @@ -16,7 +16,7 @@ void GenericWarriorStrategy::InitTriggers(std::vector& triggers) { CombatStrategy::InitTriggers(triggers); triggers.push_back(new TriggerNode( - "enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_NORMAL + 8), nullptr))); + "enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_HIGH + 1), nullptr))); /*triggers.push_back(new TriggerNode("bloodrage", NextAction::array(0, new NextAction("bloodrage", ACTION_HIGH + 1), nullptr))); triggers.push_back(new TriggerNode("shield bash", NextAction::array(0, new NextAction("shield bash", ACTION_INTERRUPT + 4), nullptr))); triggers.push_back(new TriggerNode("shield bash on enemy healer", diff --git a/src/strategy/generic/MeleeCombatStrategy.cpp b/src/strategy/generic/MeleeCombatStrategy.cpp index 178bd418..67a5f1db 100644 --- a/src/strategy/generic/MeleeCombatStrategy.cpp +++ b/src/strategy/generic/MeleeCombatStrategy.cpp @@ -14,7 +14,7 @@ void MeleeCombatStrategy::InitTriggers(std::vector& triggers) // triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", // ACTION_MOVE + 7), nullptr))); triggers.push_back(new TriggerNode( - "enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_NORMAL + 8), nullptr))); + "enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_HIGH + 1), nullptr))); // triggers.push_back(new TriggerNode("enemy too close for melee", NextAction::array(0, new NextAction("move out of // enemy contact", ACTION_NORMAL + 8), nullptr))); } From be718721127c155ed46414e0993fdc5ce1411122 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sat, 14 Dec 2024 02:33:52 +0800 Subject: [PATCH 18/26] Update far move to prevent invalid movement --- src/RandomPlayerbotMgr.cpp | 3 ++- src/strategy/rpg/NewRpgAction.cpp | 29 ++++++++++++++++++++--------- src/strategy/rpg/NewRpgAction.h | 4 ++-- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index ba9e458c..a449e07d 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -1525,7 +1525,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() uint32 c_entry = fields[6].Get(); const FactionTemplateEntry* entry = sFactionTemplateStore.LookupEntry(faction); - WorldLocation loc(mapId, x, y, z, orient + M_PI); + WorldLocation loc(mapId, x + cos(orient) * 5.0f, y + sin(orient) * 5.0f, z + 0.5f, orient + M_PI); collected_locs++; Map* map = sMapMgr->FindMap(loc.GetMapId(), 0); if (!map) @@ -1631,6 +1631,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() "AND t.faction != 69 " "AND t.entry != 30606 " "AND t.entry != 30608 " + "AND t.entry != 29282 " "AND t.faction != 69 " "AND map IN ({}) " "ORDER BY " diff --git a/src/strategy/rpg/NewRpgAction.cpp b/src/strategy/rpg/NewRpgAction.cpp index ff91251c..2dbd139b 100644 --- a/src/strategy/rpg/NewRpgAction.cpp +++ b/src/strategy/rpg/NewRpgAction.cpp @@ -155,6 +155,10 @@ WorldPosition NewRpgStatusUpdateAction::SelectRandomGrindPos() { if (bot->GetMapId() != loc.GetMapId()) continue; + + if (bot->GetMap()->GetZoneId(bot->GetPhaseMask(), loc.GetPositionX(), loc.GetPositionY(), loc.GetPositionZ()) != + bot->GetZoneId()) + continue; if (bot->GetExactDist(loc) < 500.0f) { @@ -220,35 +224,41 @@ bool NewRpgGoFarAwayPosAction::MoveFarTo(WorldPosition dest) return MoveTo(dest.getMapId(), dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ()); } + // performance optimization + if (IsWaitingForLastMove(MovementPriority::MOVEMENT_NORMAL)) + { + return false; + } + float minDelta = M_PI; const float x = bot->GetPositionX(); const float y = bot->GetPositionY(); const float z = bot->GetPositionZ(); float rx, ry, rz; bool found = false; - int attempt = 5; + int attempt = 10; while (--attempt) { float angle = bot->GetAngle(&dest); - float delta = (rand_norm() - 0.5) * M_PI * 0.6; + float delta = (rand_norm() - 0.5) * M_PI * 2; angle += delta; float dis = rand_norm() * pathFinderDis; float dx = x + cos(angle) * dis; float dy = y + sin(angle) * dis; - float dz = z; + float dz = z + 5.0f; + bot->UpdateAllowedPositionZ(dx, dy, dz); PathGenerator path(bot); path.CalculatePath(dx, dy, dz); - // bool canReach = bot->GetMap()->CanReachPositionAndGetValidCoords(bot, x, y, z, dx, dy, dz, false); bool canReach = path.GetPathType() & PATHFIND_NORMAL; - if (canReach) + if (canReach && fabs(delta) <= minDelta) { - G3D::Vector3 endPos = path.GetPath().back(); found = true; + G3D::Vector3 endPos = path.GetPath().back(); rx = endPos.x; ry = endPos.y; rz = endPos.z; - break; + minDelta = fabs(delta); } } if (found) @@ -256,8 +266,9 @@ bool NewRpgGoFarAwayPosAction::MoveFarTo(WorldPosition dest) return MoveTo(bot->GetMapId(), rx, ry, rz, false, false, false, true); } // fallback to direct move - float angle = bot->GetAngle(&dest); - return MoveTo(bot->GetMapId(), x + cos(angle) * pathFinderDis, y + sin(angle) * pathFinderDis, z); + // float angle = bot->GetAngle(&dest); + // return MoveTo(bot->GetMapId(), x + cos(angle) * pathFinderDis, y + sin(angle) * pathFinderDis, z); + return false; } bool NewRpgGoGrindAction::Execute(Event event) { return MoveFarTo(botAI->rpgInfo.grindPos); } diff --git a/src/strategy/rpg/NewRpgAction.h b/src/strategy/rpg/NewRpgAction.h index a61b83d4..c95685c8 100644 --- a/src/strategy/rpg/NewRpgAction.h +++ b/src/strategy/rpg/NewRpgAction.h @@ -24,8 +24,8 @@ protected: // const int32 setGrindInterval = 5 * 60 * 1000; // const int32 setNpcInterval = 1 * 60 * 1000; const int32 statusNearNpcDuration = 5 * 60 * 1000; - const int32 statusNearRandomDuration = 5 * 60 * 1000; - const int32 statusRestDuration = 2 * 60 * 1000; + const int32 statusNearRandomDuration = 3 * 60 * 1000; + const int32 statusRestDuration = 30 * 1000; WorldPosition SelectRandomGrindPos(); WorldPosition SelectRandomInnKeeperPos(); }; From df5b10c9adf6aad6387eae4423c3b3ca526e3cfa Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sat, 14 Dec 2024 16:23:13 +0800 Subject: [PATCH 19/26] Revert classes folder --- .../{classes => }/deathknight/BloodDKStrategy.cpp | 0 .../{classes => }/deathknight/BloodDKStrategy.h | 0 src/strategy/{classes => }/deathknight/DKActions.cpp | 0 src/strategy/{classes => }/deathknight/DKActions.h | 0 .../{classes => }/deathknight/DKAiObjectContext.cpp | 0 .../{classes => }/deathknight/DKAiObjectContext.h | 0 .../{classes => }/deathknight/DKTriggers.cpp | 0 src/strategy/{classes => }/deathknight/DKTriggers.h | 0 .../{classes => }/deathknight/FrostDKStrategy.cpp | 0 .../{classes => }/deathknight/FrostDKStrategy.h | 0 .../deathknight/GenericDKNonCombatStrategy.cpp | 0 .../deathknight/GenericDKNonCombatStrategy.h | 0 .../{classes => }/deathknight/GenericDKStrategy.cpp | 0 .../{classes => }/deathknight/GenericDKStrategy.h | 0 .../{classes => }/deathknight/UnholyDKStrategy.cpp | 0 .../{classes => }/deathknight/UnholyDKStrategy.h | 0 .../{classes => }/druid/BearTankDruidStrategy.cpp | 0 .../{classes => }/druid/BearTankDruidStrategy.h | 0 .../{classes => }/druid/CasterDruidStrategy.cpp | 0 .../{classes => }/druid/CasterDruidStrategy.h | 0 .../{classes => }/druid/CatDpsDruidStrategy.cpp | 0 .../{classes => }/druid/CatDpsDruidStrategy.h | 0 src/strategy/{classes => }/druid/DruidActions.cpp | 0 src/strategy/{classes => }/druid/DruidActions.h | 0 .../{classes => }/druid/DruidAiObjectContext.cpp | 0 .../{classes => }/druid/DruidAiObjectContext.h | 0 .../{classes => }/druid/DruidBearActions.cpp | 0 src/strategy/{classes => }/druid/DruidBearActions.h | 0 src/strategy/{classes => }/druid/DruidCatActions.cpp | 0 src/strategy/{classes => }/druid/DruidCatActions.h | 0 .../{classes => }/druid/DruidShapeshiftActions.cpp | 0 .../{classes => }/druid/DruidShapeshiftActions.h | 0 src/strategy/{classes => }/druid/DruidTriggers.cpp | 0 src/strategy/{classes => }/druid/DruidTriggers.h | 0 .../{classes => }/druid/FeralDruidStrategy.cpp | 0 .../{classes => }/druid/FeralDruidStrategy.h | 0 .../druid/GenericDruidNonCombatStrategy.cpp | 0 .../druid/GenericDruidNonCombatStrategy.h | 0 .../{classes => }/druid/GenericDruidStrategy.cpp | 0 .../{classes => }/druid/GenericDruidStrategy.h | 0 .../{classes => }/druid/HealDruidStrategy.cpp | 0 src/strategy/{classes => }/druid/HealDruidStrategy.h | 0 .../{classes => }/druid/MeleeDruidStrategy.cpp | 0 .../{classes => }/druid/MeleeDruidStrategy.h | 0 .../{classes => }/hunter/DpsHunterStrategy.cpp | 0 .../{classes => }/hunter/DpsHunterStrategy.h | 0 .../hunter/GenericHunterNonCombatStrategy.cpp | 0 .../hunter/GenericHunterNonCombatStrategy.h | 0 .../{classes => }/hunter/GenericHunterStrategy.cpp | 0 .../{classes => }/hunter/GenericHunterStrategy.h | 0 src/strategy/{classes => }/hunter/HunterActions.cpp | 0 src/strategy/{classes => }/hunter/HunterActions.h | 0 .../{classes => }/hunter/HunterAiObjectContext.cpp | 0 .../{classes => }/hunter/HunterAiObjectContext.h | 0 .../{classes => }/hunter/HunterBuffStrategies.cpp | 0 .../{classes => }/hunter/HunterBuffStrategies.h | 0 src/strategy/{classes => }/hunter/HunterTriggers.cpp | 0 src/strategy/{classes => }/hunter/HunterTriggers.h | 0 .../{classes => }/mage/ArcaneMageStrategy.cpp | 0 src/strategy/{classes => }/mage/ArcaneMageStrategy.h | 0 src/strategy/{classes => }/mage/FireMageStrategy.cpp | 0 src/strategy/{classes => }/mage/FireMageStrategy.h | 0 .../{classes => }/mage/FrostMageStrategy.cpp | 4 ++-- src/strategy/{classes => }/mage/FrostMageStrategy.h | 0 .../mage/GenericMageNonCombatStrategy.cpp | 0 .../mage/GenericMageNonCombatStrategy.h | 0 .../{classes => }/mage/GenericMageStrategy.cpp | 0 .../{classes => }/mage/GenericMageStrategy.h | 0 src/strategy/{classes => }/mage/MageActions.cpp | 0 src/strategy/{classes => }/mage/MageActions.h | 0 .../{classes => }/mage/MageAiObjectContext.cpp | 0 .../{classes => }/mage/MageAiObjectContext.h | 0 src/strategy/{classes => }/mage/MageTriggers.cpp | 0 src/strategy/{classes => }/mage/MageTriggers.h | 0 .../{classes => }/paladin/DpsPaladinStrategy.cpp | 0 .../{classes => }/paladin/DpsPaladinStrategy.h | 0 .../paladin/GenericPaladinNonCombatStrategy.cpp | 0 .../paladin/GenericPaladinNonCombatStrategy.h | 0 .../{classes => }/paladin/GenericPaladinStrategy.cpp | 0 .../{classes => }/paladin/GenericPaladinStrategy.h | 0 .../GenericPaladinStrategyActionNodeFactory.h | 0 .../{classes => }/paladin/HealPaladinStrategy.cpp | 0 .../{classes => }/paladin/HealPaladinStrategy.h | 0 .../{classes => }/paladin/PaladinActions.cpp | 0 src/strategy/{classes => }/paladin/PaladinActions.h | 0 .../{classes => }/paladin/PaladinAiObjectContext.cpp | 0 .../{classes => }/paladin/PaladinAiObjectContext.h | 0 .../{classes => }/paladin/PaladinBuffStrategies.cpp | 0 .../{classes => }/paladin/PaladinBuffStrategies.h | 0 .../{classes => }/paladin/PaladinTriggers.cpp | 0 src/strategy/{classes => }/paladin/PaladinTriggers.h | 0 .../{classes => }/paladin/TankPaladinStrategy.cpp | 0 .../{classes => }/paladin/TankPaladinStrategy.h | 0 .../{classes => }/priest/GenericPriestStrategy.cpp | 0 .../{classes => }/priest/GenericPriestStrategy.h | 0 .../priest/GenericPriestStrategyActionNodeFactory.h | 0 .../{classes => }/priest/HealPriestStrategy.cpp | 0 .../{classes => }/priest/HealPriestStrategy.h | 0 .../{classes => }/priest/HolyPriestStrategy.cpp | 0 .../{classes => }/priest/HolyPriestStrategy.h | 0 src/strategy/{classes => }/priest/PriestActions.cpp | 0 src/strategy/{classes => }/priest/PriestActions.h | 0 .../{classes => }/priest/PriestAiObjectContext.cpp | 0 .../{classes => }/priest/PriestAiObjectContext.h | 0 .../{classes => }/priest/PriestNonCombatStrategy.cpp | 0 .../{classes => }/priest/PriestNonCombatStrategy.h | 0 .../PriestNonCombatStrategyActionNodeFactory.h | 0 src/strategy/{classes => }/priest/PriestTriggers.cpp | 0 src/strategy/{classes => }/priest/PriestTriggers.h | 0 .../{classes => }/priest/ShadowPriestStrategy.cpp | 0 .../{classes => }/priest/ShadowPriestStrategy.h | 0 .../priest/ShadowPriestStrategyActionNodeFactory.h | 0 .../rogue/AssassinationRogueStrategy.cpp | 0 .../{classes => }/rogue/AssassinationRogueStrategy.h | 0 .../{classes => }/rogue/DpsRogueStrategy.cpp | 0 src/strategy/{classes => }/rogue/DpsRogueStrategy.h | 0 .../rogue/GenericRogueNonCombatStrategy.cpp | 0 .../rogue/GenericRogueNonCombatStrategy.h | 0 src/strategy/{classes => }/rogue/RogueActions.cpp | 0 src/strategy/{classes => }/rogue/RogueActions.h | 0 .../{classes => }/rogue/RogueAiObjectContext.cpp | 0 .../{classes => }/rogue/RogueAiObjectContext.h | 0 .../{classes => }/rogue/RogueComboActions.cpp | 0 src/strategy/{classes => }/rogue/RogueComboActions.h | 0 .../{classes => }/rogue/RogueFinishingActions.h | 0 .../{classes => }/rogue/RogueOpeningActions.cpp | 0 .../{classes => }/rogue/RogueOpeningActions.h | 0 src/strategy/{classes => }/rogue/RogueTriggers.cpp | 0 src/strategy/{classes => }/rogue/RogueTriggers.h | 0 src/strategy/rpg/NewRpgAction.cpp | 12 +++++++----- src/strategy/rpg/NewRpgAction.h | 4 ++-- .../{classes => }/shaman/CasterShamanStrategy.cpp | 0 .../{classes => }/shaman/CasterShamanStrategy.h | 0 .../{classes => }/shaman/GenericShamanStrategy.cpp | 0 .../{classes => }/shaman/GenericShamanStrategy.h | 0 .../{classes => }/shaman/HealShamanStrategy.cpp | 0 .../{classes => }/shaman/HealShamanStrategy.h | 0 .../{classes => }/shaman/MeleeShamanStrategy.cpp | 0 .../{classes => }/shaman/MeleeShamanStrategy.h | 0 src/strategy/{classes => }/shaman/ShamanActions.cpp | 0 src/strategy/{classes => }/shaman/ShamanActions.h | 0 .../{classes => }/shaman/ShamanAiObjectContext.cpp | 0 .../{classes => }/shaman/ShamanAiObjectContext.h | 0 .../{classes => }/shaman/ShamanNonCombatStrategy.cpp | 0 .../{classes => }/shaman/ShamanNonCombatStrategy.h | 0 src/strategy/{classes => }/shaman/ShamanTriggers.cpp | 0 src/strategy/{classes => }/shaman/ShamanTriggers.h | 0 .../{classes => }/shaman/TotemsShamanStrategy.cpp | 0 .../{classes => }/shaman/TotemsShamanStrategy.h | 0 .../{classes => }/warlock/DpsWarlockStrategy.cpp | 0 .../{classes => }/warlock/DpsWarlockStrategy.h | 0 .../warlock/GenericWarlockNonCombatStrategy.cpp | 0 .../warlock/GenericWarlockNonCombatStrategy.h | 0 .../{classes => }/warlock/GenericWarlockStrategy.cpp | 0 .../{classes => }/warlock/GenericWarlockStrategy.h | 0 .../{classes => }/warlock/TankWarlockStrategy.cpp | 0 .../{classes => }/warlock/TankWarlockStrategy.h | 0 .../{classes => }/warlock/WarlockActions.cpp | 0 src/strategy/{classes => }/warlock/WarlockActions.h | 0 .../{classes => }/warlock/WarlockAiObjectContext.cpp | 0 .../{classes => }/warlock/WarlockAiObjectContext.h | 0 .../{classes => }/warlock/WarlockTriggers.cpp | 0 src/strategy/{classes => }/warlock/WarlockTriggers.h | 0 .../{classes => }/warrior/ArmsWarriorStrategy.cpp | 0 .../{classes => }/warrior/ArmsWarriorStrategy.h | 0 .../{classes => }/warrior/FuryWarriorStrategy.cpp | 0 .../{classes => }/warrior/FuryWarriorStrategy.h | 0 .../warrior/GenericWarriorNonCombatStrategy.cpp | 0 .../warrior/GenericWarriorNonCombatStrategy.h | 0 .../{classes => }/warrior/GenericWarriorStrategy.cpp | 0 .../{classes => }/warrior/GenericWarriorStrategy.h | 0 .../{classes => }/warrior/TankWarriorStrategy.cpp | 0 .../{classes => }/warrior/TankWarriorStrategy.h | 0 .../{classes => }/warrior/WarriorActions.cpp | 0 src/strategy/{classes => }/warrior/WarriorActions.h | 0 .../{classes => }/warrior/WarriorAiObjectContext.cpp | 0 .../{classes => }/warrior/WarriorAiObjectContext.h | 0 .../{classes => }/warrior/WarriorTriggers.cpp | 0 src/strategy/{classes => }/warrior/WarriorTriggers.h | 0 179 files changed, 11 insertions(+), 9 deletions(-) rename src/strategy/{classes => }/deathknight/BloodDKStrategy.cpp (100%) rename src/strategy/{classes => }/deathknight/BloodDKStrategy.h (100%) rename src/strategy/{classes => }/deathknight/DKActions.cpp (100%) rename src/strategy/{classes => }/deathknight/DKActions.h (100%) rename src/strategy/{classes => }/deathknight/DKAiObjectContext.cpp (100%) rename src/strategy/{classes => }/deathknight/DKAiObjectContext.h (100%) rename src/strategy/{classes => }/deathknight/DKTriggers.cpp (100%) rename src/strategy/{classes => }/deathknight/DKTriggers.h (100%) rename src/strategy/{classes => }/deathknight/FrostDKStrategy.cpp (100%) rename src/strategy/{classes => }/deathknight/FrostDKStrategy.h (100%) rename src/strategy/{classes => }/deathknight/GenericDKNonCombatStrategy.cpp (100%) rename src/strategy/{classes => }/deathknight/GenericDKNonCombatStrategy.h (100%) rename src/strategy/{classes => }/deathknight/GenericDKStrategy.cpp (100%) rename src/strategy/{classes => }/deathknight/GenericDKStrategy.h (100%) rename src/strategy/{classes => }/deathknight/UnholyDKStrategy.cpp (100%) rename src/strategy/{classes => }/deathknight/UnholyDKStrategy.h (100%) rename src/strategy/{classes => }/druid/BearTankDruidStrategy.cpp (100%) rename src/strategy/{classes => }/druid/BearTankDruidStrategy.h (100%) rename src/strategy/{classes => }/druid/CasterDruidStrategy.cpp (100%) rename src/strategy/{classes => }/druid/CasterDruidStrategy.h (100%) rename src/strategy/{classes => }/druid/CatDpsDruidStrategy.cpp (100%) rename src/strategy/{classes => }/druid/CatDpsDruidStrategy.h (100%) rename src/strategy/{classes => }/druid/DruidActions.cpp (100%) rename src/strategy/{classes => }/druid/DruidActions.h (100%) rename src/strategy/{classes => }/druid/DruidAiObjectContext.cpp (100%) rename src/strategy/{classes => }/druid/DruidAiObjectContext.h (100%) rename src/strategy/{classes => }/druid/DruidBearActions.cpp (100%) rename src/strategy/{classes => }/druid/DruidBearActions.h (100%) rename src/strategy/{classes => }/druid/DruidCatActions.cpp (100%) rename src/strategy/{classes => }/druid/DruidCatActions.h (100%) rename src/strategy/{classes => }/druid/DruidShapeshiftActions.cpp (100%) rename src/strategy/{classes => }/druid/DruidShapeshiftActions.h (100%) rename src/strategy/{classes => }/druid/DruidTriggers.cpp (100%) rename src/strategy/{classes => }/druid/DruidTriggers.h (100%) rename src/strategy/{classes => }/druid/FeralDruidStrategy.cpp (100%) rename src/strategy/{classes => }/druid/FeralDruidStrategy.h (100%) rename src/strategy/{classes => }/druid/GenericDruidNonCombatStrategy.cpp (100%) rename src/strategy/{classes => }/druid/GenericDruidNonCombatStrategy.h (100%) rename src/strategy/{classes => }/druid/GenericDruidStrategy.cpp (100%) rename src/strategy/{classes => }/druid/GenericDruidStrategy.h (100%) rename src/strategy/{classes => }/druid/HealDruidStrategy.cpp (100%) rename src/strategy/{classes => }/druid/HealDruidStrategy.h (100%) rename src/strategy/{classes => }/druid/MeleeDruidStrategy.cpp (100%) rename src/strategy/{classes => }/druid/MeleeDruidStrategy.h (100%) rename src/strategy/{classes => }/hunter/DpsHunterStrategy.cpp (100%) rename src/strategy/{classes => }/hunter/DpsHunterStrategy.h (100%) rename src/strategy/{classes => }/hunter/GenericHunterNonCombatStrategy.cpp (100%) rename src/strategy/{classes => }/hunter/GenericHunterNonCombatStrategy.h (100%) rename src/strategy/{classes => }/hunter/GenericHunterStrategy.cpp (100%) rename src/strategy/{classes => }/hunter/GenericHunterStrategy.h (100%) rename src/strategy/{classes => }/hunter/HunterActions.cpp (100%) rename src/strategy/{classes => }/hunter/HunterActions.h (100%) rename src/strategy/{classes => }/hunter/HunterAiObjectContext.cpp (100%) rename src/strategy/{classes => }/hunter/HunterAiObjectContext.h (100%) rename src/strategy/{classes => }/hunter/HunterBuffStrategies.cpp (100%) rename src/strategy/{classes => }/hunter/HunterBuffStrategies.h (100%) rename src/strategy/{classes => }/hunter/HunterTriggers.cpp (100%) rename src/strategy/{classes => }/hunter/HunterTriggers.h (100%) rename src/strategy/{classes => }/mage/ArcaneMageStrategy.cpp (100%) rename src/strategy/{classes => }/mage/ArcaneMageStrategy.h (100%) rename src/strategy/{classes => }/mage/FireMageStrategy.cpp (100%) rename src/strategy/{classes => }/mage/FireMageStrategy.h (100%) rename src/strategy/{classes => }/mage/FrostMageStrategy.cpp (99%) rename src/strategy/{classes => }/mage/FrostMageStrategy.h (100%) rename src/strategy/{classes => }/mage/GenericMageNonCombatStrategy.cpp (100%) rename src/strategy/{classes => }/mage/GenericMageNonCombatStrategy.h (100%) rename src/strategy/{classes => }/mage/GenericMageStrategy.cpp (100%) rename src/strategy/{classes => }/mage/GenericMageStrategy.h (100%) rename src/strategy/{classes => }/mage/MageActions.cpp (100%) rename src/strategy/{classes => }/mage/MageActions.h (100%) rename src/strategy/{classes => }/mage/MageAiObjectContext.cpp (100%) rename src/strategy/{classes => }/mage/MageAiObjectContext.h (100%) rename src/strategy/{classes => }/mage/MageTriggers.cpp (100%) rename src/strategy/{classes => }/mage/MageTriggers.h (100%) rename src/strategy/{classes => }/paladin/DpsPaladinStrategy.cpp (100%) rename src/strategy/{classes => }/paladin/DpsPaladinStrategy.h (100%) rename src/strategy/{classes => }/paladin/GenericPaladinNonCombatStrategy.cpp (100%) rename src/strategy/{classes => }/paladin/GenericPaladinNonCombatStrategy.h (100%) rename src/strategy/{classes => }/paladin/GenericPaladinStrategy.cpp (100%) rename src/strategy/{classes => }/paladin/GenericPaladinStrategy.h (100%) rename src/strategy/{classes => }/paladin/GenericPaladinStrategyActionNodeFactory.h (100%) rename src/strategy/{classes => }/paladin/HealPaladinStrategy.cpp (100%) rename src/strategy/{classes => }/paladin/HealPaladinStrategy.h (100%) rename src/strategy/{classes => }/paladin/PaladinActions.cpp (100%) rename src/strategy/{classes => }/paladin/PaladinActions.h (100%) rename src/strategy/{classes => }/paladin/PaladinAiObjectContext.cpp (100%) rename src/strategy/{classes => }/paladin/PaladinAiObjectContext.h (100%) rename src/strategy/{classes => }/paladin/PaladinBuffStrategies.cpp (100%) rename src/strategy/{classes => }/paladin/PaladinBuffStrategies.h (100%) rename src/strategy/{classes => }/paladin/PaladinTriggers.cpp (100%) rename src/strategy/{classes => }/paladin/PaladinTriggers.h (100%) rename src/strategy/{classes => }/paladin/TankPaladinStrategy.cpp (100%) rename src/strategy/{classes => }/paladin/TankPaladinStrategy.h (100%) rename src/strategy/{classes => }/priest/GenericPriestStrategy.cpp (100%) rename src/strategy/{classes => }/priest/GenericPriestStrategy.h (100%) rename src/strategy/{classes => }/priest/GenericPriestStrategyActionNodeFactory.h (100%) rename src/strategy/{classes => }/priest/HealPriestStrategy.cpp (100%) rename src/strategy/{classes => }/priest/HealPriestStrategy.h (100%) rename src/strategy/{classes => }/priest/HolyPriestStrategy.cpp (100%) rename src/strategy/{classes => }/priest/HolyPriestStrategy.h (100%) rename src/strategy/{classes => }/priest/PriestActions.cpp (100%) rename src/strategy/{classes => }/priest/PriestActions.h (100%) rename src/strategy/{classes => }/priest/PriestAiObjectContext.cpp (100%) rename src/strategy/{classes => }/priest/PriestAiObjectContext.h (100%) rename src/strategy/{classes => }/priest/PriestNonCombatStrategy.cpp (100%) rename src/strategy/{classes => }/priest/PriestNonCombatStrategy.h (100%) rename src/strategy/{classes => }/priest/PriestNonCombatStrategyActionNodeFactory.h (100%) rename src/strategy/{classes => }/priest/PriestTriggers.cpp (100%) rename src/strategy/{classes => }/priest/PriestTriggers.h (100%) rename src/strategy/{classes => }/priest/ShadowPriestStrategy.cpp (100%) rename src/strategy/{classes => }/priest/ShadowPriestStrategy.h (100%) rename src/strategy/{classes => }/priest/ShadowPriestStrategyActionNodeFactory.h (100%) rename src/strategy/{classes => }/rogue/AssassinationRogueStrategy.cpp (100%) rename src/strategy/{classes => }/rogue/AssassinationRogueStrategy.h (100%) rename src/strategy/{classes => }/rogue/DpsRogueStrategy.cpp (100%) rename src/strategy/{classes => }/rogue/DpsRogueStrategy.h (100%) rename src/strategy/{classes => }/rogue/GenericRogueNonCombatStrategy.cpp (100%) rename src/strategy/{classes => }/rogue/GenericRogueNonCombatStrategy.h (100%) rename src/strategy/{classes => }/rogue/RogueActions.cpp (100%) rename src/strategy/{classes => }/rogue/RogueActions.h (100%) rename src/strategy/{classes => }/rogue/RogueAiObjectContext.cpp (100%) rename src/strategy/{classes => }/rogue/RogueAiObjectContext.h (100%) rename src/strategy/{classes => }/rogue/RogueComboActions.cpp (100%) rename src/strategy/{classes => }/rogue/RogueComboActions.h (100%) rename src/strategy/{classes => }/rogue/RogueFinishingActions.h (100%) rename src/strategy/{classes => }/rogue/RogueOpeningActions.cpp (100%) rename src/strategy/{classes => }/rogue/RogueOpeningActions.h (100%) rename src/strategy/{classes => }/rogue/RogueTriggers.cpp (100%) rename src/strategy/{classes => }/rogue/RogueTriggers.h (100%) rename src/strategy/{classes => }/shaman/CasterShamanStrategy.cpp (100%) rename src/strategy/{classes => }/shaman/CasterShamanStrategy.h (100%) rename src/strategy/{classes => }/shaman/GenericShamanStrategy.cpp (100%) rename src/strategy/{classes => }/shaman/GenericShamanStrategy.h (100%) rename src/strategy/{classes => }/shaman/HealShamanStrategy.cpp (100%) rename src/strategy/{classes => }/shaman/HealShamanStrategy.h (100%) rename src/strategy/{classes => }/shaman/MeleeShamanStrategy.cpp (100%) rename src/strategy/{classes => }/shaman/MeleeShamanStrategy.h (100%) rename src/strategy/{classes => }/shaman/ShamanActions.cpp (100%) rename src/strategy/{classes => }/shaman/ShamanActions.h (100%) rename src/strategy/{classes => }/shaman/ShamanAiObjectContext.cpp (100%) rename src/strategy/{classes => }/shaman/ShamanAiObjectContext.h (100%) rename src/strategy/{classes => }/shaman/ShamanNonCombatStrategy.cpp (100%) rename src/strategy/{classes => }/shaman/ShamanNonCombatStrategy.h (100%) rename src/strategy/{classes => }/shaman/ShamanTriggers.cpp (100%) rename src/strategy/{classes => }/shaman/ShamanTriggers.h (100%) rename src/strategy/{classes => }/shaman/TotemsShamanStrategy.cpp (100%) rename src/strategy/{classes => }/shaman/TotemsShamanStrategy.h (100%) rename src/strategy/{classes => }/warlock/DpsWarlockStrategy.cpp (100%) rename src/strategy/{classes => }/warlock/DpsWarlockStrategy.h (100%) rename src/strategy/{classes => }/warlock/GenericWarlockNonCombatStrategy.cpp (100%) rename src/strategy/{classes => }/warlock/GenericWarlockNonCombatStrategy.h (100%) rename src/strategy/{classes => }/warlock/GenericWarlockStrategy.cpp (100%) rename src/strategy/{classes => }/warlock/GenericWarlockStrategy.h (100%) rename src/strategy/{classes => }/warlock/TankWarlockStrategy.cpp (100%) rename src/strategy/{classes => }/warlock/TankWarlockStrategy.h (100%) rename src/strategy/{classes => }/warlock/WarlockActions.cpp (100%) rename src/strategy/{classes => }/warlock/WarlockActions.h (100%) rename src/strategy/{classes => }/warlock/WarlockAiObjectContext.cpp (100%) rename src/strategy/{classes => }/warlock/WarlockAiObjectContext.h (100%) rename src/strategy/{classes => }/warlock/WarlockTriggers.cpp (100%) rename src/strategy/{classes => }/warlock/WarlockTriggers.h (100%) rename src/strategy/{classes => }/warrior/ArmsWarriorStrategy.cpp (100%) rename src/strategy/{classes => }/warrior/ArmsWarriorStrategy.h (100%) rename src/strategy/{classes => }/warrior/FuryWarriorStrategy.cpp (100%) rename src/strategy/{classes => }/warrior/FuryWarriorStrategy.h (100%) rename src/strategy/{classes => }/warrior/GenericWarriorNonCombatStrategy.cpp (100%) rename src/strategy/{classes => }/warrior/GenericWarriorNonCombatStrategy.h (100%) rename src/strategy/{classes => }/warrior/GenericWarriorStrategy.cpp (100%) rename src/strategy/{classes => }/warrior/GenericWarriorStrategy.h (100%) rename src/strategy/{classes => }/warrior/TankWarriorStrategy.cpp (100%) rename src/strategy/{classes => }/warrior/TankWarriorStrategy.h (100%) rename src/strategy/{classes => }/warrior/WarriorActions.cpp (100%) rename src/strategy/{classes => }/warrior/WarriorActions.h (100%) rename src/strategy/{classes => }/warrior/WarriorAiObjectContext.cpp (100%) rename src/strategy/{classes => }/warrior/WarriorAiObjectContext.h (100%) rename src/strategy/{classes => }/warrior/WarriorTriggers.cpp (100%) rename src/strategy/{classes => }/warrior/WarriorTriggers.h (100%) diff --git a/src/strategy/classes/deathknight/BloodDKStrategy.cpp b/src/strategy/deathknight/BloodDKStrategy.cpp similarity index 100% rename from src/strategy/classes/deathknight/BloodDKStrategy.cpp rename to src/strategy/deathknight/BloodDKStrategy.cpp diff --git a/src/strategy/classes/deathknight/BloodDKStrategy.h b/src/strategy/deathknight/BloodDKStrategy.h similarity index 100% rename from src/strategy/classes/deathknight/BloodDKStrategy.h rename to src/strategy/deathknight/BloodDKStrategy.h diff --git a/src/strategy/classes/deathknight/DKActions.cpp b/src/strategy/deathknight/DKActions.cpp similarity index 100% rename from src/strategy/classes/deathknight/DKActions.cpp rename to src/strategy/deathknight/DKActions.cpp diff --git a/src/strategy/classes/deathknight/DKActions.h b/src/strategy/deathknight/DKActions.h similarity index 100% rename from src/strategy/classes/deathknight/DKActions.h rename to src/strategy/deathknight/DKActions.h diff --git a/src/strategy/classes/deathknight/DKAiObjectContext.cpp b/src/strategy/deathknight/DKAiObjectContext.cpp similarity index 100% rename from src/strategy/classes/deathknight/DKAiObjectContext.cpp rename to src/strategy/deathknight/DKAiObjectContext.cpp diff --git a/src/strategy/classes/deathknight/DKAiObjectContext.h b/src/strategy/deathknight/DKAiObjectContext.h similarity index 100% rename from src/strategy/classes/deathknight/DKAiObjectContext.h rename to src/strategy/deathknight/DKAiObjectContext.h diff --git a/src/strategy/classes/deathknight/DKTriggers.cpp b/src/strategy/deathknight/DKTriggers.cpp similarity index 100% rename from src/strategy/classes/deathknight/DKTriggers.cpp rename to src/strategy/deathknight/DKTriggers.cpp diff --git a/src/strategy/classes/deathknight/DKTriggers.h b/src/strategy/deathknight/DKTriggers.h similarity index 100% rename from src/strategy/classes/deathknight/DKTriggers.h rename to src/strategy/deathknight/DKTriggers.h diff --git a/src/strategy/classes/deathknight/FrostDKStrategy.cpp b/src/strategy/deathknight/FrostDKStrategy.cpp similarity index 100% rename from src/strategy/classes/deathknight/FrostDKStrategy.cpp rename to src/strategy/deathknight/FrostDKStrategy.cpp diff --git a/src/strategy/classes/deathknight/FrostDKStrategy.h b/src/strategy/deathknight/FrostDKStrategy.h similarity index 100% rename from src/strategy/classes/deathknight/FrostDKStrategy.h rename to src/strategy/deathknight/FrostDKStrategy.h diff --git a/src/strategy/classes/deathknight/GenericDKNonCombatStrategy.cpp b/src/strategy/deathknight/GenericDKNonCombatStrategy.cpp similarity index 100% rename from src/strategy/classes/deathknight/GenericDKNonCombatStrategy.cpp rename to src/strategy/deathknight/GenericDKNonCombatStrategy.cpp diff --git a/src/strategy/classes/deathknight/GenericDKNonCombatStrategy.h b/src/strategy/deathknight/GenericDKNonCombatStrategy.h similarity index 100% rename from src/strategy/classes/deathknight/GenericDKNonCombatStrategy.h rename to src/strategy/deathknight/GenericDKNonCombatStrategy.h diff --git a/src/strategy/classes/deathknight/GenericDKStrategy.cpp b/src/strategy/deathknight/GenericDKStrategy.cpp similarity index 100% rename from src/strategy/classes/deathknight/GenericDKStrategy.cpp rename to src/strategy/deathknight/GenericDKStrategy.cpp diff --git a/src/strategy/classes/deathknight/GenericDKStrategy.h b/src/strategy/deathknight/GenericDKStrategy.h similarity index 100% rename from src/strategy/classes/deathknight/GenericDKStrategy.h rename to src/strategy/deathknight/GenericDKStrategy.h diff --git a/src/strategy/classes/deathknight/UnholyDKStrategy.cpp b/src/strategy/deathknight/UnholyDKStrategy.cpp similarity index 100% rename from src/strategy/classes/deathknight/UnholyDKStrategy.cpp rename to src/strategy/deathknight/UnholyDKStrategy.cpp diff --git a/src/strategy/classes/deathknight/UnholyDKStrategy.h b/src/strategy/deathknight/UnholyDKStrategy.h similarity index 100% rename from src/strategy/classes/deathknight/UnholyDKStrategy.h rename to src/strategy/deathknight/UnholyDKStrategy.h diff --git a/src/strategy/classes/druid/BearTankDruidStrategy.cpp b/src/strategy/druid/BearTankDruidStrategy.cpp similarity index 100% rename from src/strategy/classes/druid/BearTankDruidStrategy.cpp rename to src/strategy/druid/BearTankDruidStrategy.cpp diff --git a/src/strategy/classes/druid/BearTankDruidStrategy.h b/src/strategy/druid/BearTankDruidStrategy.h similarity index 100% rename from src/strategy/classes/druid/BearTankDruidStrategy.h rename to src/strategy/druid/BearTankDruidStrategy.h diff --git a/src/strategy/classes/druid/CasterDruidStrategy.cpp b/src/strategy/druid/CasterDruidStrategy.cpp similarity index 100% rename from src/strategy/classes/druid/CasterDruidStrategy.cpp rename to src/strategy/druid/CasterDruidStrategy.cpp diff --git a/src/strategy/classes/druid/CasterDruidStrategy.h b/src/strategy/druid/CasterDruidStrategy.h similarity index 100% rename from src/strategy/classes/druid/CasterDruidStrategy.h rename to src/strategy/druid/CasterDruidStrategy.h diff --git a/src/strategy/classes/druid/CatDpsDruidStrategy.cpp b/src/strategy/druid/CatDpsDruidStrategy.cpp similarity index 100% rename from src/strategy/classes/druid/CatDpsDruidStrategy.cpp rename to src/strategy/druid/CatDpsDruidStrategy.cpp diff --git a/src/strategy/classes/druid/CatDpsDruidStrategy.h b/src/strategy/druid/CatDpsDruidStrategy.h similarity index 100% rename from src/strategy/classes/druid/CatDpsDruidStrategy.h rename to src/strategy/druid/CatDpsDruidStrategy.h diff --git a/src/strategy/classes/druid/DruidActions.cpp b/src/strategy/druid/DruidActions.cpp similarity index 100% rename from src/strategy/classes/druid/DruidActions.cpp rename to src/strategy/druid/DruidActions.cpp diff --git a/src/strategy/classes/druid/DruidActions.h b/src/strategy/druid/DruidActions.h similarity index 100% rename from src/strategy/classes/druid/DruidActions.h rename to src/strategy/druid/DruidActions.h diff --git a/src/strategy/classes/druid/DruidAiObjectContext.cpp b/src/strategy/druid/DruidAiObjectContext.cpp similarity index 100% rename from src/strategy/classes/druid/DruidAiObjectContext.cpp rename to src/strategy/druid/DruidAiObjectContext.cpp diff --git a/src/strategy/classes/druid/DruidAiObjectContext.h b/src/strategy/druid/DruidAiObjectContext.h similarity index 100% rename from src/strategy/classes/druid/DruidAiObjectContext.h rename to src/strategy/druid/DruidAiObjectContext.h diff --git a/src/strategy/classes/druid/DruidBearActions.cpp b/src/strategy/druid/DruidBearActions.cpp similarity index 100% rename from src/strategy/classes/druid/DruidBearActions.cpp rename to src/strategy/druid/DruidBearActions.cpp diff --git a/src/strategy/classes/druid/DruidBearActions.h b/src/strategy/druid/DruidBearActions.h similarity index 100% rename from src/strategy/classes/druid/DruidBearActions.h rename to src/strategy/druid/DruidBearActions.h diff --git a/src/strategy/classes/druid/DruidCatActions.cpp b/src/strategy/druid/DruidCatActions.cpp similarity index 100% rename from src/strategy/classes/druid/DruidCatActions.cpp rename to src/strategy/druid/DruidCatActions.cpp diff --git a/src/strategy/classes/druid/DruidCatActions.h b/src/strategy/druid/DruidCatActions.h similarity index 100% rename from src/strategy/classes/druid/DruidCatActions.h rename to src/strategy/druid/DruidCatActions.h diff --git a/src/strategy/classes/druid/DruidShapeshiftActions.cpp b/src/strategy/druid/DruidShapeshiftActions.cpp similarity index 100% rename from src/strategy/classes/druid/DruidShapeshiftActions.cpp rename to src/strategy/druid/DruidShapeshiftActions.cpp diff --git a/src/strategy/classes/druid/DruidShapeshiftActions.h b/src/strategy/druid/DruidShapeshiftActions.h similarity index 100% rename from src/strategy/classes/druid/DruidShapeshiftActions.h rename to src/strategy/druid/DruidShapeshiftActions.h diff --git a/src/strategy/classes/druid/DruidTriggers.cpp b/src/strategy/druid/DruidTriggers.cpp similarity index 100% rename from src/strategy/classes/druid/DruidTriggers.cpp rename to src/strategy/druid/DruidTriggers.cpp diff --git a/src/strategy/classes/druid/DruidTriggers.h b/src/strategy/druid/DruidTriggers.h similarity index 100% rename from src/strategy/classes/druid/DruidTriggers.h rename to src/strategy/druid/DruidTriggers.h diff --git a/src/strategy/classes/druid/FeralDruidStrategy.cpp b/src/strategy/druid/FeralDruidStrategy.cpp similarity index 100% rename from src/strategy/classes/druid/FeralDruidStrategy.cpp rename to src/strategy/druid/FeralDruidStrategy.cpp diff --git a/src/strategy/classes/druid/FeralDruidStrategy.h b/src/strategy/druid/FeralDruidStrategy.h similarity index 100% rename from src/strategy/classes/druid/FeralDruidStrategy.h rename to src/strategy/druid/FeralDruidStrategy.h diff --git a/src/strategy/classes/druid/GenericDruidNonCombatStrategy.cpp b/src/strategy/druid/GenericDruidNonCombatStrategy.cpp similarity index 100% rename from src/strategy/classes/druid/GenericDruidNonCombatStrategy.cpp rename to src/strategy/druid/GenericDruidNonCombatStrategy.cpp diff --git a/src/strategy/classes/druid/GenericDruidNonCombatStrategy.h b/src/strategy/druid/GenericDruidNonCombatStrategy.h similarity index 100% rename from src/strategy/classes/druid/GenericDruidNonCombatStrategy.h rename to src/strategy/druid/GenericDruidNonCombatStrategy.h diff --git a/src/strategy/classes/druid/GenericDruidStrategy.cpp b/src/strategy/druid/GenericDruidStrategy.cpp similarity index 100% rename from src/strategy/classes/druid/GenericDruidStrategy.cpp rename to src/strategy/druid/GenericDruidStrategy.cpp diff --git a/src/strategy/classes/druid/GenericDruidStrategy.h b/src/strategy/druid/GenericDruidStrategy.h similarity index 100% rename from src/strategy/classes/druid/GenericDruidStrategy.h rename to src/strategy/druid/GenericDruidStrategy.h diff --git a/src/strategy/classes/druid/HealDruidStrategy.cpp b/src/strategy/druid/HealDruidStrategy.cpp similarity index 100% rename from src/strategy/classes/druid/HealDruidStrategy.cpp rename to src/strategy/druid/HealDruidStrategy.cpp diff --git a/src/strategy/classes/druid/HealDruidStrategy.h b/src/strategy/druid/HealDruidStrategy.h similarity index 100% rename from src/strategy/classes/druid/HealDruidStrategy.h rename to src/strategy/druid/HealDruidStrategy.h diff --git a/src/strategy/classes/druid/MeleeDruidStrategy.cpp b/src/strategy/druid/MeleeDruidStrategy.cpp similarity index 100% rename from src/strategy/classes/druid/MeleeDruidStrategy.cpp rename to src/strategy/druid/MeleeDruidStrategy.cpp diff --git a/src/strategy/classes/druid/MeleeDruidStrategy.h b/src/strategy/druid/MeleeDruidStrategy.h similarity index 100% rename from src/strategy/classes/druid/MeleeDruidStrategy.h rename to src/strategy/druid/MeleeDruidStrategy.h diff --git a/src/strategy/classes/hunter/DpsHunterStrategy.cpp b/src/strategy/hunter/DpsHunterStrategy.cpp similarity index 100% rename from src/strategy/classes/hunter/DpsHunterStrategy.cpp rename to src/strategy/hunter/DpsHunterStrategy.cpp diff --git a/src/strategy/classes/hunter/DpsHunterStrategy.h b/src/strategy/hunter/DpsHunterStrategy.h similarity index 100% rename from src/strategy/classes/hunter/DpsHunterStrategy.h rename to src/strategy/hunter/DpsHunterStrategy.h diff --git a/src/strategy/classes/hunter/GenericHunterNonCombatStrategy.cpp b/src/strategy/hunter/GenericHunterNonCombatStrategy.cpp similarity index 100% rename from src/strategy/classes/hunter/GenericHunterNonCombatStrategy.cpp rename to src/strategy/hunter/GenericHunterNonCombatStrategy.cpp diff --git a/src/strategy/classes/hunter/GenericHunterNonCombatStrategy.h b/src/strategy/hunter/GenericHunterNonCombatStrategy.h similarity index 100% rename from src/strategy/classes/hunter/GenericHunterNonCombatStrategy.h rename to src/strategy/hunter/GenericHunterNonCombatStrategy.h diff --git a/src/strategy/classes/hunter/GenericHunterStrategy.cpp b/src/strategy/hunter/GenericHunterStrategy.cpp similarity index 100% rename from src/strategy/classes/hunter/GenericHunterStrategy.cpp rename to src/strategy/hunter/GenericHunterStrategy.cpp diff --git a/src/strategy/classes/hunter/GenericHunterStrategy.h b/src/strategy/hunter/GenericHunterStrategy.h similarity index 100% rename from src/strategy/classes/hunter/GenericHunterStrategy.h rename to src/strategy/hunter/GenericHunterStrategy.h diff --git a/src/strategy/classes/hunter/HunterActions.cpp b/src/strategy/hunter/HunterActions.cpp similarity index 100% rename from src/strategy/classes/hunter/HunterActions.cpp rename to src/strategy/hunter/HunterActions.cpp diff --git a/src/strategy/classes/hunter/HunterActions.h b/src/strategy/hunter/HunterActions.h similarity index 100% rename from src/strategy/classes/hunter/HunterActions.h rename to src/strategy/hunter/HunterActions.h diff --git a/src/strategy/classes/hunter/HunterAiObjectContext.cpp b/src/strategy/hunter/HunterAiObjectContext.cpp similarity index 100% rename from src/strategy/classes/hunter/HunterAiObjectContext.cpp rename to src/strategy/hunter/HunterAiObjectContext.cpp diff --git a/src/strategy/classes/hunter/HunterAiObjectContext.h b/src/strategy/hunter/HunterAiObjectContext.h similarity index 100% rename from src/strategy/classes/hunter/HunterAiObjectContext.h rename to src/strategy/hunter/HunterAiObjectContext.h diff --git a/src/strategy/classes/hunter/HunterBuffStrategies.cpp b/src/strategy/hunter/HunterBuffStrategies.cpp similarity index 100% rename from src/strategy/classes/hunter/HunterBuffStrategies.cpp rename to src/strategy/hunter/HunterBuffStrategies.cpp diff --git a/src/strategy/classes/hunter/HunterBuffStrategies.h b/src/strategy/hunter/HunterBuffStrategies.h similarity index 100% rename from src/strategy/classes/hunter/HunterBuffStrategies.h rename to src/strategy/hunter/HunterBuffStrategies.h diff --git a/src/strategy/classes/hunter/HunterTriggers.cpp b/src/strategy/hunter/HunterTriggers.cpp similarity index 100% rename from src/strategy/classes/hunter/HunterTriggers.cpp rename to src/strategy/hunter/HunterTriggers.cpp diff --git a/src/strategy/classes/hunter/HunterTriggers.h b/src/strategy/hunter/HunterTriggers.h similarity index 100% rename from src/strategy/classes/hunter/HunterTriggers.h rename to src/strategy/hunter/HunterTriggers.h diff --git a/src/strategy/classes/mage/ArcaneMageStrategy.cpp b/src/strategy/mage/ArcaneMageStrategy.cpp similarity index 100% rename from src/strategy/classes/mage/ArcaneMageStrategy.cpp rename to src/strategy/mage/ArcaneMageStrategy.cpp diff --git a/src/strategy/classes/mage/ArcaneMageStrategy.h b/src/strategy/mage/ArcaneMageStrategy.h similarity index 100% rename from src/strategy/classes/mage/ArcaneMageStrategy.h rename to src/strategy/mage/ArcaneMageStrategy.h diff --git a/src/strategy/classes/mage/FireMageStrategy.cpp b/src/strategy/mage/FireMageStrategy.cpp similarity index 100% rename from src/strategy/classes/mage/FireMageStrategy.cpp rename to src/strategy/mage/FireMageStrategy.cpp diff --git a/src/strategy/classes/mage/FireMageStrategy.h b/src/strategy/mage/FireMageStrategy.h similarity index 100% rename from src/strategy/classes/mage/FireMageStrategy.h rename to src/strategy/mage/FireMageStrategy.h diff --git a/src/strategy/classes/mage/FrostMageStrategy.cpp b/src/strategy/mage/FrostMageStrategy.cpp similarity index 99% rename from src/strategy/classes/mage/FrostMageStrategy.cpp rename to src/strategy/mage/FrostMageStrategy.cpp index c9b8ee9e..6dd46152 100644 --- a/src/strategy/classes/mage/FrostMageStrategy.cpp +++ b/src/strategy/mage/FrostMageStrategy.cpp @@ -60,8 +60,8 @@ FrostMageStrategy::FrostMageStrategy(PlayerbotAI* botAI) : GenericMageStrategy(b NextAction** FrostMageStrategy::getDefaultActions() { return NextAction::array(0, new NextAction("frostbolt", ACTION_DEFAULT + 0.2f), - new NextAction("fireball", ACTION_DEFAULT + 0.1f), - new NextAction("shoot", ACTION_DEFAULT), nullptr); + new NextAction("shoot", ACTION_DEFAULT + 0.1f), + new NextAction("fireball", ACTION_DEFAULT), nullptr); } void FrostMageStrategy::InitTriggers(std::vector& triggers) diff --git a/src/strategy/classes/mage/FrostMageStrategy.h b/src/strategy/mage/FrostMageStrategy.h similarity index 100% rename from src/strategy/classes/mage/FrostMageStrategy.h rename to src/strategy/mage/FrostMageStrategy.h diff --git a/src/strategy/classes/mage/GenericMageNonCombatStrategy.cpp b/src/strategy/mage/GenericMageNonCombatStrategy.cpp similarity index 100% rename from src/strategy/classes/mage/GenericMageNonCombatStrategy.cpp rename to src/strategy/mage/GenericMageNonCombatStrategy.cpp diff --git a/src/strategy/classes/mage/GenericMageNonCombatStrategy.h b/src/strategy/mage/GenericMageNonCombatStrategy.h similarity index 100% rename from src/strategy/classes/mage/GenericMageNonCombatStrategy.h rename to src/strategy/mage/GenericMageNonCombatStrategy.h diff --git a/src/strategy/classes/mage/GenericMageStrategy.cpp b/src/strategy/mage/GenericMageStrategy.cpp similarity index 100% rename from src/strategy/classes/mage/GenericMageStrategy.cpp rename to src/strategy/mage/GenericMageStrategy.cpp diff --git a/src/strategy/classes/mage/GenericMageStrategy.h b/src/strategy/mage/GenericMageStrategy.h similarity index 100% rename from src/strategy/classes/mage/GenericMageStrategy.h rename to src/strategy/mage/GenericMageStrategy.h diff --git a/src/strategy/classes/mage/MageActions.cpp b/src/strategy/mage/MageActions.cpp similarity index 100% rename from src/strategy/classes/mage/MageActions.cpp rename to src/strategy/mage/MageActions.cpp diff --git a/src/strategy/classes/mage/MageActions.h b/src/strategy/mage/MageActions.h similarity index 100% rename from src/strategy/classes/mage/MageActions.h rename to src/strategy/mage/MageActions.h diff --git a/src/strategy/classes/mage/MageAiObjectContext.cpp b/src/strategy/mage/MageAiObjectContext.cpp similarity index 100% rename from src/strategy/classes/mage/MageAiObjectContext.cpp rename to src/strategy/mage/MageAiObjectContext.cpp diff --git a/src/strategy/classes/mage/MageAiObjectContext.h b/src/strategy/mage/MageAiObjectContext.h similarity index 100% rename from src/strategy/classes/mage/MageAiObjectContext.h rename to src/strategy/mage/MageAiObjectContext.h diff --git a/src/strategy/classes/mage/MageTriggers.cpp b/src/strategy/mage/MageTriggers.cpp similarity index 100% rename from src/strategy/classes/mage/MageTriggers.cpp rename to src/strategy/mage/MageTriggers.cpp diff --git a/src/strategy/classes/mage/MageTriggers.h b/src/strategy/mage/MageTriggers.h similarity index 100% rename from src/strategy/classes/mage/MageTriggers.h rename to src/strategy/mage/MageTriggers.h diff --git a/src/strategy/classes/paladin/DpsPaladinStrategy.cpp b/src/strategy/paladin/DpsPaladinStrategy.cpp similarity index 100% rename from src/strategy/classes/paladin/DpsPaladinStrategy.cpp rename to src/strategy/paladin/DpsPaladinStrategy.cpp diff --git a/src/strategy/classes/paladin/DpsPaladinStrategy.h b/src/strategy/paladin/DpsPaladinStrategy.h similarity index 100% rename from src/strategy/classes/paladin/DpsPaladinStrategy.h rename to src/strategy/paladin/DpsPaladinStrategy.h diff --git a/src/strategy/classes/paladin/GenericPaladinNonCombatStrategy.cpp b/src/strategy/paladin/GenericPaladinNonCombatStrategy.cpp similarity index 100% rename from src/strategy/classes/paladin/GenericPaladinNonCombatStrategy.cpp rename to src/strategy/paladin/GenericPaladinNonCombatStrategy.cpp diff --git a/src/strategy/classes/paladin/GenericPaladinNonCombatStrategy.h b/src/strategy/paladin/GenericPaladinNonCombatStrategy.h similarity index 100% rename from src/strategy/classes/paladin/GenericPaladinNonCombatStrategy.h rename to src/strategy/paladin/GenericPaladinNonCombatStrategy.h diff --git a/src/strategy/classes/paladin/GenericPaladinStrategy.cpp b/src/strategy/paladin/GenericPaladinStrategy.cpp similarity index 100% rename from src/strategy/classes/paladin/GenericPaladinStrategy.cpp rename to src/strategy/paladin/GenericPaladinStrategy.cpp diff --git a/src/strategy/classes/paladin/GenericPaladinStrategy.h b/src/strategy/paladin/GenericPaladinStrategy.h similarity index 100% rename from src/strategy/classes/paladin/GenericPaladinStrategy.h rename to src/strategy/paladin/GenericPaladinStrategy.h diff --git a/src/strategy/classes/paladin/GenericPaladinStrategyActionNodeFactory.h b/src/strategy/paladin/GenericPaladinStrategyActionNodeFactory.h similarity index 100% rename from src/strategy/classes/paladin/GenericPaladinStrategyActionNodeFactory.h rename to src/strategy/paladin/GenericPaladinStrategyActionNodeFactory.h diff --git a/src/strategy/classes/paladin/HealPaladinStrategy.cpp b/src/strategy/paladin/HealPaladinStrategy.cpp similarity index 100% rename from src/strategy/classes/paladin/HealPaladinStrategy.cpp rename to src/strategy/paladin/HealPaladinStrategy.cpp diff --git a/src/strategy/classes/paladin/HealPaladinStrategy.h b/src/strategy/paladin/HealPaladinStrategy.h similarity index 100% rename from src/strategy/classes/paladin/HealPaladinStrategy.h rename to src/strategy/paladin/HealPaladinStrategy.h diff --git a/src/strategy/classes/paladin/PaladinActions.cpp b/src/strategy/paladin/PaladinActions.cpp similarity index 100% rename from src/strategy/classes/paladin/PaladinActions.cpp rename to src/strategy/paladin/PaladinActions.cpp diff --git a/src/strategy/classes/paladin/PaladinActions.h b/src/strategy/paladin/PaladinActions.h similarity index 100% rename from src/strategy/classes/paladin/PaladinActions.h rename to src/strategy/paladin/PaladinActions.h diff --git a/src/strategy/classes/paladin/PaladinAiObjectContext.cpp b/src/strategy/paladin/PaladinAiObjectContext.cpp similarity index 100% rename from src/strategy/classes/paladin/PaladinAiObjectContext.cpp rename to src/strategy/paladin/PaladinAiObjectContext.cpp diff --git a/src/strategy/classes/paladin/PaladinAiObjectContext.h b/src/strategy/paladin/PaladinAiObjectContext.h similarity index 100% rename from src/strategy/classes/paladin/PaladinAiObjectContext.h rename to src/strategy/paladin/PaladinAiObjectContext.h diff --git a/src/strategy/classes/paladin/PaladinBuffStrategies.cpp b/src/strategy/paladin/PaladinBuffStrategies.cpp similarity index 100% rename from src/strategy/classes/paladin/PaladinBuffStrategies.cpp rename to src/strategy/paladin/PaladinBuffStrategies.cpp diff --git a/src/strategy/classes/paladin/PaladinBuffStrategies.h b/src/strategy/paladin/PaladinBuffStrategies.h similarity index 100% rename from src/strategy/classes/paladin/PaladinBuffStrategies.h rename to src/strategy/paladin/PaladinBuffStrategies.h diff --git a/src/strategy/classes/paladin/PaladinTriggers.cpp b/src/strategy/paladin/PaladinTriggers.cpp similarity index 100% rename from src/strategy/classes/paladin/PaladinTriggers.cpp rename to src/strategy/paladin/PaladinTriggers.cpp diff --git a/src/strategy/classes/paladin/PaladinTriggers.h b/src/strategy/paladin/PaladinTriggers.h similarity index 100% rename from src/strategy/classes/paladin/PaladinTriggers.h rename to src/strategy/paladin/PaladinTriggers.h diff --git a/src/strategy/classes/paladin/TankPaladinStrategy.cpp b/src/strategy/paladin/TankPaladinStrategy.cpp similarity index 100% rename from src/strategy/classes/paladin/TankPaladinStrategy.cpp rename to src/strategy/paladin/TankPaladinStrategy.cpp diff --git a/src/strategy/classes/paladin/TankPaladinStrategy.h b/src/strategy/paladin/TankPaladinStrategy.h similarity index 100% rename from src/strategy/classes/paladin/TankPaladinStrategy.h rename to src/strategy/paladin/TankPaladinStrategy.h diff --git a/src/strategy/classes/priest/GenericPriestStrategy.cpp b/src/strategy/priest/GenericPriestStrategy.cpp similarity index 100% rename from src/strategy/classes/priest/GenericPriestStrategy.cpp rename to src/strategy/priest/GenericPriestStrategy.cpp diff --git a/src/strategy/classes/priest/GenericPriestStrategy.h b/src/strategy/priest/GenericPriestStrategy.h similarity index 100% rename from src/strategy/classes/priest/GenericPriestStrategy.h rename to src/strategy/priest/GenericPriestStrategy.h diff --git a/src/strategy/classes/priest/GenericPriestStrategyActionNodeFactory.h b/src/strategy/priest/GenericPriestStrategyActionNodeFactory.h similarity index 100% rename from src/strategy/classes/priest/GenericPriestStrategyActionNodeFactory.h rename to src/strategy/priest/GenericPriestStrategyActionNodeFactory.h diff --git a/src/strategy/classes/priest/HealPriestStrategy.cpp b/src/strategy/priest/HealPriestStrategy.cpp similarity index 100% rename from src/strategy/classes/priest/HealPriestStrategy.cpp rename to src/strategy/priest/HealPriestStrategy.cpp diff --git a/src/strategy/classes/priest/HealPriestStrategy.h b/src/strategy/priest/HealPriestStrategy.h similarity index 100% rename from src/strategy/classes/priest/HealPriestStrategy.h rename to src/strategy/priest/HealPriestStrategy.h diff --git a/src/strategy/classes/priest/HolyPriestStrategy.cpp b/src/strategy/priest/HolyPriestStrategy.cpp similarity index 100% rename from src/strategy/classes/priest/HolyPriestStrategy.cpp rename to src/strategy/priest/HolyPriestStrategy.cpp diff --git a/src/strategy/classes/priest/HolyPriestStrategy.h b/src/strategy/priest/HolyPriestStrategy.h similarity index 100% rename from src/strategy/classes/priest/HolyPriestStrategy.h rename to src/strategy/priest/HolyPriestStrategy.h diff --git a/src/strategy/classes/priest/PriestActions.cpp b/src/strategy/priest/PriestActions.cpp similarity index 100% rename from src/strategy/classes/priest/PriestActions.cpp rename to src/strategy/priest/PriestActions.cpp diff --git a/src/strategy/classes/priest/PriestActions.h b/src/strategy/priest/PriestActions.h similarity index 100% rename from src/strategy/classes/priest/PriestActions.h rename to src/strategy/priest/PriestActions.h diff --git a/src/strategy/classes/priest/PriestAiObjectContext.cpp b/src/strategy/priest/PriestAiObjectContext.cpp similarity index 100% rename from src/strategy/classes/priest/PriestAiObjectContext.cpp rename to src/strategy/priest/PriestAiObjectContext.cpp diff --git a/src/strategy/classes/priest/PriestAiObjectContext.h b/src/strategy/priest/PriestAiObjectContext.h similarity index 100% rename from src/strategy/classes/priest/PriestAiObjectContext.h rename to src/strategy/priest/PriestAiObjectContext.h diff --git a/src/strategy/classes/priest/PriestNonCombatStrategy.cpp b/src/strategy/priest/PriestNonCombatStrategy.cpp similarity index 100% rename from src/strategy/classes/priest/PriestNonCombatStrategy.cpp rename to src/strategy/priest/PriestNonCombatStrategy.cpp diff --git a/src/strategy/classes/priest/PriestNonCombatStrategy.h b/src/strategy/priest/PriestNonCombatStrategy.h similarity index 100% rename from src/strategy/classes/priest/PriestNonCombatStrategy.h rename to src/strategy/priest/PriestNonCombatStrategy.h diff --git a/src/strategy/classes/priest/PriestNonCombatStrategyActionNodeFactory.h b/src/strategy/priest/PriestNonCombatStrategyActionNodeFactory.h similarity index 100% rename from src/strategy/classes/priest/PriestNonCombatStrategyActionNodeFactory.h rename to src/strategy/priest/PriestNonCombatStrategyActionNodeFactory.h diff --git a/src/strategy/classes/priest/PriestTriggers.cpp b/src/strategy/priest/PriestTriggers.cpp similarity index 100% rename from src/strategy/classes/priest/PriestTriggers.cpp rename to src/strategy/priest/PriestTriggers.cpp diff --git a/src/strategy/classes/priest/PriestTriggers.h b/src/strategy/priest/PriestTriggers.h similarity index 100% rename from src/strategy/classes/priest/PriestTriggers.h rename to src/strategy/priest/PriestTriggers.h diff --git a/src/strategy/classes/priest/ShadowPriestStrategy.cpp b/src/strategy/priest/ShadowPriestStrategy.cpp similarity index 100% rename from src/strategy/classes/priest/ShadowPriestStrategy.cpp rename to src/strategy/priest/ShadowPriestStrategy.cpp diff --git a/src/strategy/classes/priest/ShadowPriestStrategy.h b/src/strategy/priest/ShadowPriestStrategy.h similarity index 100% rename from src/strategy/classes/priest/ShadowPriestStrategy.h rename to src/strategy/priest/ShadowPriestStrategy.h diff --git a/src/strategy/classes/priest/ShadowPriestStrategyActionNodeFactory.h b/src/strategy/priest/ShadowPriestStrategyActionNodeFactory.h similarity index 100% rename from src/strategy/classes/priest/ShadowPriestStrategyActionNodeFactory.h rename to src/strategy/priest/ShadowPriestStrategyActionNodeFactory.h diff --git a/src/strategy/classes/rogue/AssassinationRogueStrategy.cpp b/src/strategy/rogue/AssassinationRogueStrategy.cpp similarity index 100% rename from src/strategy/classes/rogue/AssassinationRogueStrategy.cpp rename to src/strategy/rogue/AssassinationRogueStrategy.cpp diff --git a/src/strategy/classes/rogue/AssassinationRogueStrategy.h b/src/strategy/rogue/AssassinationRogueStrategy.h similarity index 100% rename from src/strategy/classes/rogue/AssassinationRogueStrategy.h rename to src/strategy/rogue/AssassinationRogueStrategy.h diff --git a/src/strategy/classes/rogue/DpsRogueStrategy.cpp b/src/strategy/rogue/DpsRogueStrategy.cpp similarity index 100% rename from src/strategy/classes/rogue/DpsRogueStrategy.cpp rename to src/strategy/rogue/DpsRogueStrategy.cpp diff --git a/src/strategy/classes/rogue/DpsRogueStrategy.h b/src/strategy/rogue/DpsRogueStrategy.h similarity index 100% rename from src/strategy/classes/rogue/DpsRogueStrategy.h rename to src/strategy/rogue/DpsRogueStrategy.h diff --git a/src/strategy/classes/rogue/GenericRogueNonCombatStrategy.cpp b/src/strategy/rogue/GenericRogueNonCombatStrategy.cpp similarity index 100% rename from src/strategy/classes/rogue/GenericRogueNonCombatStrategy.cpp rename to src/strategy/rogue/GenericRogueNonCombatStrategy.cpp diff --git a/src/strategy/classes/rogue/GenericRogueNonCombatStrategy.h b/src/strategy/rogue/GenericRogueNonCombatStrategy.h similarity index 100% rename from src/strategy/classes/rogue/GenericRogueNonCombatStrategy.h rename to src/strategy/rogue/GenericRogueNonCombatStrategy.h diff --git a/src/strategy/classes/rogue/RogueActions.cpp b/src/strategy/rogue/RogueActions.cpp similarity index 100% rename from src/strategy/classes/rogue/RogueActions.cpp rename to src/strategy/rogue/RogueActions.cpp diff --git a/src/strategy/classes/rogue/RogueActions.h b/src/strategy/rogue/RogueActions.h similarity index 100% rename from src/strategy/classes/rogue/RogueActions.h rename to src/strategy/rogue/RogueActions.h diff --git a/src/strategy/classes/rogue/RogueAiObjectContext.cpp b/src/strategy/rogue/RogueAiObjectContext.cpp similarity index 100% rename from src/strategy/classes/rogue/RogueAiObjectContext.cpp rename to src/strategy/rogue/RogueAiObjectContext.cpp diff --git a/src/strategy/classes/rogue/RogueAiObjectContext.h b/src/strategy/rogue/RogueAiObjectContext.h similarity index 100% rename from src/strategy/classes/rogue/RogueAiObjectContext.h rename to src/strategy/rogue/RogueAiObjectContext.h diff --git a/src/strategy/classes/rogue/RogueComboActions.cpp b/src/strategy/rogue/RogueComboActions.cpp similarity index 100% rename from src/strategy/classes/rogue/RogueComboActions.cpp rename to src/strategy/rogue/RogueComboActions.cpp diff --git a/src/strategy/classes/rogue/RogueComboActions.h b/src/strategy/rogue/RogueComboActions.h similarity index 100% rename from src/strategy/classes/rogue/RogueComboActions.h rename to src/strategy/rogue/RogueComboActions.h diff --git a/src/strategy/classes/rogue/RogueFinishingActions.h b/src/strategy/rogue/RogueFinishingActions.h similarity index 100% rename from src/strategy/classes/rogue/RogueFinishingActions.h rename to src/strategy/rogue/RogueFinishingActions.h diff --git a/src/strategy/classes/rogue/RogueOpeningActions.cpp b/src/strategy/rogue/RogueOpeningActions.cpp similarity index 100% rename from src/strategy/classes/rogue/RogueOpeningActions.cpp rename to src/strategy/rogue/RogueOpeningActions.cpp diff --git a/src/strategy/classes/rogue/RogueOpeningActions.h b/src/strategy/rogue/RogueOpeningActions.h similarity index 100% rename from src/strategy/classes/rogue/RogueOpeningActions.h rename to src/strategy/rogue/RogueOpeningActions.h diff --git a/src/strategy/classes/rogue/RogueTriggers.cpp b/src/strategy/rogue/RogueTriggers.cpp similarity index 100% rename from src/strategy/classes/rogue/RogueTriggers.cpp rename to src/strategy/rogue/RogueTriggers.cpp diff --git a/src/strategy/classes/rogue/RogueTriggers.h b/src/strategy/rogue/RogueTriggers.h similarity index 100% rename from src/strategy/classes/rogue/RogueTriggers.h rename to src/strategy/rogue/RogueTriggers.h diff --git a/src/strategy/rpg/NewRpgAction.cpp b/src/strategy/rpg/NewRpgAction.cpp index 2dbd139b..7fd6931f 100644 --- a/src/strategy/rpg/NewRpgAction.cpp +++ b/src/strategy/rpg/NewRpgAction.cpp @@ -165,7 +165,7 @@ WorldPosition NewRpgStatusUpdateAction::SelectRandomGrindPos() hi_prepared_locs.push_back(loc); } - if (bot->GetExactDist(loc) < 1500.0f) + if (bot->GetExactDist(loc) < 2500.0f) { lo_prepared_locs.push_back(loc); } @@ -221,7 +221,7 @@ bool NewRpgGoFarAwayPosAction::MoveFarTo(WorldPosition dest) float dis = bot->GetExactDist(dest); if (dis < pathFinderDis) { - return MoveTo(dest.getMapId(), dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ()); + return MoveTo(dest.getMapId(), dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(), false, false, false, true); } // performance optimization @@ -249,12 +249,14 @@ bool NewRpgGoFarAwayPosAction::MoveFarTo(WorldPosition dest) bot->UpdateAllowedPositionZ(dx, dy, dz); PathGenerator path(bot); path.CalculatePath(dx, dy, dz); - bool canReach = path.GetPathType() & PATHFIND_NORMAL; + PathType type = path.GetPathType(); + + bool canReach = type == PATHFIND_INCOMPLETE || type == PATHFIND_NORMAL; if (canReach && fabs(delta) <= minDelta) { found = true; - G3D::Vector3 endPos = path.GetPath().back(); + const G3D::Vector3 &endPos = path.GetActualEndPosition(); rx = endPos.x; ry = endPos.y; rz = endPos.z; @@ -265,7 +267,7 @@ bool NewRpgGoFarAwayPosAction::MoveFarTo(WorldPosition dest) { return MoveTo(bot->GetMapId(), rx, ry, rz, false, false, false, true); } - // fallback to direct move + // don't fallback to direct move // float angle = bot->GetAngle(&dest); // return MoveTo(bot->GetMapId(), x + cos(angle) * pathFinderDis, y + sin(angle) * pathFinderDis, z); return false; diff --git a/src/strategy/rpg/NewRpgAction.h b/src/strategy/rpg/NewRpgAction.h index c95685c8..fb293b8e 100644 --- a/src/strategy/rpg/NewRpgAction.h +++ b/src/strategy/rpg/NewRpgAction.h @@ -23,8 +23,8 @@ public: protected: // const int32 setGrindInterval = 5 * 60 * 1000; // const int32 setNpcInterval = 1 * 60 * 1000; - const int32 statusNearNpcDuration = 5 * 60 * 1000; - const int32 statusNearRandomDuration = 3 * 60 * 1000; + const int32 statusNearNpcDuration = 2 * 60 * 1000; + const int32 statusNearRandomDuration = 2 * 60 * 1000; const int32 statusRestDuration = 30 * 1000; WorldPosition SelectRandomGrindPos(); WorldPosition SelectRandomInnKeeperPos(); diff --git a/src/strategy/classes/shaman/CasterShamanStrategy.cpp b/src/strategy/shaman/CasterShamanStrategy.cpp similarity index 100% rename from src/strategy/classes/shaman/CasterShamanStrategy.cpp rename to src/strategy/shaman/CasterShamanStrategy.cpp diff --git a/src/strategy/classes/shaman/CasterShamanStrategy.h b/src/strategy/shaman/CasterShamanStrategy.h similarity index 100% rename from src/strategy/classes/shaman/CasterShamanStrategy.h rename to src/strategy/shaman/CasterShamanStrategy.h diff --git a/src/strategy/classes/shaman/GenericShamanStrategy.cpp b/src/strategy/shaman/GenericShamanStrategy.cpp similarity index 100% rename from src/strategy/classes/shaman/GenericShamanStrategy.cpp rename to src/strategy/shaman/GenericShamanStrategy.cpp diff --git a/src/strategy/classes/shaman/GenericShamanStrategy.h b/src/strategy/shaman/GenericShamanStrategy.h similarity index 100% rename from src/strategy/classes/shaman/GenericShamanStrategy.h rename to src/strategy/shaman/GenericShamanStrategy.h diff --git a/src/strategy/classes/shaman/HealShamanStrategy.cpp b/src/strategy/shaman/HealShamanStrategy.cpp similarity index 100% rename from src/strategy/classes/shaman/HealShamanStrategy.cpp rename to src/strategy/shaman/HealShamanStrategy.cpp diff --git a/src/strategy/classes/shaman/HealShamanStrategy.h b/src/strategy/shaman/HealShamanStrategy.h similarity index 100% rename from src/strategy/classes/shaman/HealShamanStrategy.h rename to src/strategy/shaman/HealShamanStrategy.h diff --git a/src/strategy/classes/shaman/MeleeShamanStrategy.cpp b/src/strategy/shaman/MeleeShamanStrategy.cpp similarity index 100% rename from src/strategy/classes/shaman/MeleeShamanStrategy.cpp rename to src/strategy/shaman/MeleeShamanStrategy.cpp diff --git a/src/strategy/classes/shaman/MeleeShamanStrategy.h b/src/strategy/shaman/MeleeShamanStrategy.h similarity index 100% rename from src/strategy/classes/shaman/MeleeShamanStrategy.h rename to src/strategy/shaman/MeleeShamanStrategy.h diff --git a/src/strategy/classes/shaman/ShamanActions.cpp b/src/strategy/shaman/ShamanActions.cpp similarity index 100% rename from src/strategy/classes/shaman/ShamanActions.cpp rename to src/strategy/shaman/ShamanActions.cpp diff --git a/src/strategy/classes/shaman/ShamanActions.h b/src/strategy/shaman/ShamanActions.h similarity index 100% rename from src/strategy/classes/shaman/ShamanActions.h rename to src/strategy/shaman/ShamanActions.h diff --git a/src/strategy/classes/shaman/ShamanAiObjectContext.cpp b/src/strategy/shaman/ShamanAiObjectContext.cpp similarity index 100% rename from src/strategy/classes/shaman/ShamanAiObjectContext.cpp rename to src/strategy/shaman/ShamanAiObjectContext.cpp diff --git a/src/strategy/classes/shaman/ShamanAiObjectContext.h b/src/strategy/shaman/ShamanAiObjectContext.h similarity index 100% rename from src/strategy/classes/shaman/ShamanAiObjectContext.h rename to src/strategy/shaman/ShamanAiObjectContext.h diff --git a/src/strategy/classes/shaman/ShamanNonCombatStrategy.cpp b/src/strategy/shaman/ShamanNonCombatStrategy.cpp similarity index 100% rename from src/strategy/classes/shaman/ShamanNonCombatStrategy.cpp rename to src/strategy/shaman/ShamanNonCombatStrategy.cpp diff --git a/src/strategy/classes/shaman/ShamanNonCombatStrategy.h b/src/strategy/shaman/ShamanNonCombatStrategy.h similarity index 100% rename from src/strategy/classes/shaman/ShamanNonCombatStrategy.h rename to src/strategy/shaman/ShamanNonCombatStrategy.h diff --git a/src/strategy/classes/shaman/ShamanTriggers.cpp b/src/strategy/shaman/ShamanTriggers.cpp similarity index 100% rename from src/strategy/classes/shaman/ShamanTriggers.cpp rename to src/strategy/shaman/ShamanTriggers.cpp diff --git a/src/strategy/classes/shaman/ShamanTriggers.h b/src/strategy/shaman/ShamanTriggers.h similarity index 100% rename from src/strategy/classes/shaman/ShamanTriggers.h rename to src/strategy/shaman/ShamanTriggers.h diff --git a/src/strategy/classes/shaman/TotemsShamanStrategy.cpp b/src/strategy/shaman/TotemsShamanStrategy.cpp similarity index 100% rename from src/strategy/classes/shaman/TotemsShamanStrategy.cpp rename to src/strategy/shaman/TotemsShamanStrategy.cpp diff --git a/src/strategy/classes/shaman/TotemsShamanStrategy.h b/src/strategy/shaman/TotemsShamanStrategy.h similarity index 100% rename from src/strategy/classes/shaman/TotemsShamanStrategy.h rename to src/strategy/shaman/TotemsShamanStrategy.h diff --git a/src/strategy/classes/warlock/DpsWarlockStrategy.cpp b/src/strategy/warlock/DpsWarlockStrategy.cpp similarity index 100% rename from src/strategy/classes/warlock/DpsWarlockStrategy.cpp rename to src/strategy/warlock/DpsWarlockStrategy.cpp diff --git a/src/strategy/classes/warlock/DpsWarlockStrategy.h b/src/strategy/warlock/DpsWarlockStrategy.h similarity index 100% rename from src/strategy/classes/warlock/DpsWarlockStrategy.h rename to src/strategy/warlock/DpsWarlockStrategy.h diff --git a/src/strategy/classes/warlock/GenericWarlockNonCombatStrategy.cpp b/src/strategy/warlock/GenericWarlockNonCombatStrategy.cpp similarity index 100% rename from src/strategy/classes/warlock/GenericWarlockNonCombatStrategy.cpp rename to src/strategy/warlock/GenericWarlockNonCombatStrategy.cpp diff --git a/src/strategy/classes/warlock/GenericWarlockNonCombatStrategy.h b/src/strategy/warlock/GenericWarlockNonCombatStrategy.h similarity index 100% rename from src/strategy/classes/warlock/GenericWarlockNonCombatStrategy.h rename to src/strategy/warlock/GenericWarlockNonCombatStrategy.h diff --git a/src/strategy/classes/warlock/GenericWarlockStrategy.cpp b/src/strategy/warlock/GenericWarlockStrategy.cpp similarity index 100% rename from src/strategy/classes/warlock/GenericWarlockStrategy.cpp rename to src/strategy/warlock/GenericWarlockStrategy.cpp diff --git a/src/strategy/classes/warlock/GenericWarlockStrategy.h b/src/strategy/warlock/GenericWarlockStrategy.h similarity index 100% rename from src/strategy/classes/warlock/GenericWarlockStrategy.h rename to src/strategy/warlock/GenericWarlockStrategy.h diff --git a/src/strategy/classes/warlock/TankWarlockStrategy.cpp b/src/strategy/warlock/TankWarlockStrategy.cpp similarity index 100% rename from src/strategy/classes/warlock/TankWarlockStrategy.cpp rename to src/strategy/warlock/TankWarlockStrategy.cpp diff --git a/src/strategy/classes/warlock/TankWarlockStrategy.h b/src/strategy/warlock/TankWarlockStrategy.h similarity index 100% rename from src/strategy/classes/warlock/TankWarlockStrategy.h rename to src/strategy/warlock/TankWarlockStrategy.h diff --git a/src/strategy/classes/warlock/WarlockActions.cpp b/src/strategy/warlock/WarlockActions.cpp similarity index 100% rename from src/strategy/classes/warlock/WarlockActions.cpp rename to src/strategy/warlock/WarlockActions.cpp diff --git a/src/strategy/classes/warlock/WarlockActions.h b/src/strategy/warlock/WarlockActions.h similarity index 100% rename from src/strategy/classes/warlock/WarlockActions.h rename to src/strategy/warlock/WarlockActions.h diff --git a/src/strategy/classes/warlock/WarlockAiObjectContext.cpp b/src/strategy/warlock/WarlockAiObjectContext.cpp similarity index 100% rename from src/strategy/classes/warlock/WarlockAiObjectContext.cpp rename to src/strategy/warlock/WarlockAiObjectContext.cpp diff --git a/src/strategy/classes/warlock/WarlockAiObjectContext.h b/src/strategy/warlock/WarlockAiObjectContext.h similarity index 100% rename from src/strategy/classes/warlock/WarlockAiObjectContext.h rename to src/strategy/warlock/WarlockAiObjectContext.h diff --git a/src/strategy/classes/warlock/WarlockTriggers.cpp b/src/strategy/warlock/WarlockTriggers.cpp similarity index 100% rename from src/strategy/classes/warlock/WarlockTriggers.cpp rename to src/strategy/warlock/WarlockTriggers.cpp diff --git a/src/strategy/classes/warlock/WarlockTriggers.h b/src/strategy/warlock/WarlockTriggers.h similarity index 100% rename from src/strategy/classes/warlock/WarlockTriggers.h rename to src/strategy/warlock/WarlockTriggers.h diff --git a/src/strategy/classes/warrior/ArmsWarriorStrategy.cpp b/src/strategy/warrior/ArmsWarriorStrategy.cpp similarity index 100% rename from src/strategy/classes/warrior/ArmsWarriorStrategy.cpp rename to src/strategy/warrior/ArmsWarriorStrategy.cpp diff --git a/src/strategy/classes/warrior/ArmsWarriorStrategy.h b/src/strategy/warrior/ArmsWarriorStrategy.h similarity index 100% rename from src/strategy/classes/warrior/ArmsWarriorStrategy.h rename to src/strategy/warrior/ArmsWarriorStrategy.h diff --git a/src/strategy/classes/warrior/FuryWarriorStrategy.cpp b/src/strategy/warrior/FuryWarriorStrategy.cpp similarity index 100% rename from src/strategy/classes/warrior/FuryWarriorStrategy.cpp rename to src/strategy/warrior/FuryWarriorStrategy.cpp diff --git a/src/strategy/classes/warrior/FuryWarriorStrategy.h b/src/strategy/warrior/FuryWarriorStrategy.h similarity index 100% rename from src/strategy/classes/warrior/FuryWarriorStrategy.h rename to src/strategy/warrior/FuryWarriorStrategy.h diff --git a/src/strategy/classes/warrior/GenericWarriorNonCombatStrategy.cpp b/src/strategy/warrior/GenericWarriorNonCombatStrategy.cpp similarity index 100% rename from src/strategy/classes/warrior/GenericWarriorNonCombatStrategy.cpp rename to src/strategy/warrior/GenericWarriorNonCombatStrategy.cpp diff --git a/src/strategy/classes/warrior/GenericWarriorNonCombatStrategy.h b/src/strategy/warrior/GenericWarriorNonCombatStrategy.h similarity index 100% rename from src/strategy/classes/warrior/GenericWarriorNonCombatStrategy.h rename to src/strategy/warrior/GenericWarriorNonCombatStrategy.h diff --git a/src/strategy/classes/warrior/GenericWarriorStrategy.cpp b/src/strategy/warrior/GenericWarriorStrategy.cpp similarity index 100% rename from src/strategy/classes/warrior/GenericWarriorStrategy.cpp rename to src/strategy/warrior/GenericWarriorStrategy.cpp diff --git a/src/strategy/classes/warrior/GenericWarriorStrategy.h b/src/strategy/warrior/GenericWarriorStrategy.h similarity index 100% rename from src/strategy/classes/warrior/GenericWarriorStrategy.h rename to src/strategy/warrior/GenericWarriorStrategy.h diff --git a/src/strategy/classes/warrior/TankWarriorStrategy.cpp b/src/strategy/warrior/TankWarriorStrategy.cpp similarity index 100% rename from src/strategy/classes/warrior/TankWarriorStrategy.cpp rename to src/strategy/warrior/TankWarriorStrategy.cpp diff --git a/src/strategy/classes/warrior/TankWarriorStrategy.h b/src/strategy/warrior/TankWarriorStrategy.h similarity index 100% rename from src/strategy/classes/warrior/TankWarriorStrategy.h rename to src/strategy/warrior/TankWarriorStrategy.h diff --git a/src/strategy/classes/warrior/WarriorActions.cpp b/src/strategy/warrior/WarriorActions.cpp similarity index 100% rename from src/strategy/classes/warrior/WarriorActions.cpp rename to src/strategy/warrior/WarriorActions.cpp diff --git a/src/strategy/classes/warrior/WarriorActions.h b/src/strategy/warrior/WarriorActions.h similarity index 100% rename from src/strategy/classes/warrior/WarriorActions.h rename to src/strategy/warrior/WarriorActions.h diff --git a/src/strategy/classes/warrior/WarriorAiObjectContext.cpp b/src/strategy/warrior/WarriorAiObjectContext.cpp similarity index 100% rename from src/strategy/classes/warrior/WarriorAiObjectContext.cpp rename to src/strategy/warrior/WarriorAiObjectContext.cpp diff --git a/src/strategy/classes/warrior/WarriorAiObjectContext.h b/src/strategy/warrior/WarriorAiObjectContext.h similarity index 100% rename from src/strategy/classes/warrior/WarriorAiObjectContext.h rename to src/strategy/warrior/WarriorAiObjectContext.h diff --git a/src/strategy/classes/warrior/WarriorTriggers.cpp b/src/strategy/warrior/WarriorTriggers.cpp similarity index 100% rename from src/strategy/classes/warrior/WarriorTriggers.cpp rename to src/strategy/warrior/WarriorTriggers.cpp diff --git a/src/strategy/classes/warrior/WarriorTriggers.h b/src/strategy/warrior/WarriorTriggers.h similarity index 100% rename from src/strategy/classes/warrior/WarriorTriggers.h rename to src/strategy/warrior/WarriorTriggers.h From 2656b2d0d9fa8a08cbb0d7a0ceb64103d8186226 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sat, 14 Dec 2024 16:23:33 +0800 Subject: [PATCH 20/26] Update starter position --- src/RandomPlayerbotMgr.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index a449e07d..486d7d5d 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -1532,7 +1532,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() continue; const AreaTableEntry* area = sAreaTableStore.LookupEntry(map->GetAreaId(1, x, y, z)); uint32 level = area->area_level; - for (int i = 5; i <= 80; i++) + for (int i = 5; i <= maxLevel; i++) { std::vector& locs = locsPerLevelCache[i]; int counter = 0; @@ -1542,11 +1542,11 @@ void RandomPlayerbotMgr::PrepareTeleportCache() if (loc.GetMapId() != checkLoc.GetMapId()) continue; - if (map->GetZoneId(1, loc.GetPositionX(), loc.GetPositionY(), loc.GetPositionZ()) != + if (area->zone != map->GetZoneId(1, checkLoc.GetPositionX(), checkLoc.GetPositionY(), checkLoc.GetPositionZ())) continue; - if (loc.GetMapId() == checkLoc.GetMapId() && loc.GetExactDist(checkLoc) <= 1000.0f) + if (loc.GetExactDist(checkLoc) <= 1000.0f) { counter++; @@ -1564,7 +1564,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() { allianceStarterPerLevelCache[i].push_back(loc); } - LOG_INFO("playerbots", "Area: {} Level: {} creature_entry: {} add to: {} {}({},{},{},{})", area->ID, + LOG_DEBUG("playerbots", "Area: {} Level: {} creature_entry: {} add to: {} {}({},{},{},{})", area->ID, level, c_entry, i, counter, levelLoc.GetPositionX(), levelLoc.GetPositionY(), levelLoc.GetPositionZ(), levelLoc.GetMapId()); } From a5d1d7579dcf358dcf3affef012d419c567fe43e Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sat, 14 Dec 2024 21:46:33 +0800 Subject: [PATCH 21/26] EnableNewRpgStrategy switch for initialization --- src/PlayerbotAI.h | 2 +- src/PlayerbotAIConfig.cpp | 1 + src/RandomPlayerbotFactory.cpp | 2 +- src/RandomPlayerbotMgr.cpp | 180 +++++++++++++++--------------- src/strategy/rpg/NewRpgAction.cpp | 25 +++-- 5 files changed, 107 insertions(+), 103 deletions(-) diff --git a/src/PlayerbotAI.h b/src/PlayerbotAI.h index 603dd851..7c61d48b 100644 --- a/src/PlayerbotAI.h +++ b/src/PlayerbotAI.h @@ -433,7 +433,7 @@ public: std::vector GetPlayersInGroup(); const AreaTableEntry* GetCurrentArea(); const AreaTableEntry* GetCurrentZone(); - std::string GetLocalizedAreaName(const AreaTableEntry* entry); + static std::string GetLocalizedAreaName(const AreaTableEntry* entry); bool TellMaster(std::ostringstream& stream, PlayerbotSecurityLevel securityLevel = PLAYERBOT_SECURITY_ALLOW_ALL); bool TellMaster(std::string const text, PlayerbotSecurityLevel securityLevel = PLAYERBOT_SECURITY_ALLOW_ALL); diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index fa21ad5c..b3a7afc2 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -399,6 +399,7 @@ bool PlayerbotAIConfig::Initialize() worldBuffs.clear(); + LOG_INFO("playerbots", "Loading Worldbuff..."); for (uint32 factionId = 0; factionId < 3; factionId++) { for (uint32 classId = 0; classId < MAX_CLASSES; classId++) diff --git a/src/RandomPlayerbotFactory.cpp b/src/RandomPlayerbotFactory.cpp index 57b42bda..3241978e 100644 --- a/src/RandomPlayerbotFactory.cpp +++ b/src/RandomPlayerbotFactory.cpp @@ -556,7 +556,7 @@ void RandomPlayerbotFactory::CreateRandomBots() totalRandomBotChars += AccountMgr::GetCharactersCount(accountId); } - LOG_INFO("server.loading", "{} random bot accounts with {} characters available", + LOG_INFO("server.loading", ">> {} random bot accounts with {} characters available", sPlayerbotAIConfig->randomBotAccounts.size(), totalRandomBotChars); } diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index 486d7d5d..d135b55c 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -1433,6 +1433,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() "position_x, " "position_y, " "position_z, " + "t.minlevel, " "t.maxlevel " "FROM " "(SELECT " @@ -1476,7 +1477,9 @@ void RandomPlayerbotMgr::PrepareTeleportCache() float x = fields[1].Get(); float y = fields[2].Get(); float z = fields[3].Get(); - uint32 level = fields[4].Get(); + uint32 min_level = fields[4].Get(); + uint32 max_level = fields[5].Get(); + uint32 level = (min_level + max_level) / 2; WorldLocation loc(mapId, x, y, z, 0); collected_locs++; for (int32 l = (int32)level - (int32)sPlayerbotAIConfig->randomBotTeleHigherLevel; @@ -1490,9 +1493,12 @@ void RandomPlayerbotMgr::PrepareTeleportCache() } } while (results->NextRow()); } - LOG_INFO("playerbots", "{} locations for level collected.", collected_locs); + LOG_INFO("playerbots", ">> {} locations for level collected.", collected_locs); - results = WorldDatabase.Query( + LOG_INFO("playerbots", "Preparing innkeepers locations for level collected"); + if (sPlayerbotAIConfig->enableNewRpgStrategy) + { + results = WorldDatabase.Query( "SELECT " "map, " "position_x, " @@ -1510,106 +1516,90 @@ void RandomPlayerbotMgr::PrepareTeleportCache() "ORDER BY " "t.minlevel;", sPlayerbotAIConfig->randomBotMapsAsString.c_str()); - collected_locs = 0; - if (results) - { - do + collected_locs = 0; + if (results) { - Field* fields = results->Fetch(); - uint16 mapId = fields[0].Get(); - float x = fields[1].Get(); - float y = fields[2].Get(); - float z = fields[3].Get(); - float orient = fields[4].Get(); - uint32 faction = fields[5].Get(); - uint32 c_entry = fields[6].Get(); - const FactionTemplateEntry* entry = sFactionTemplateStore.LookupEntry(faction); - - WorldLocation loc(mapId, x + cos(orient) * 5.0f, y + sin(orient) * 5.0f, z + 0.5f, orient + M_PI); - collected_locs++; - Map* map = sMapMgr->FindMap(loc.GetMapId(), 0); - if (!map) - continue; - const AreaTableEntry* area = sAreaTableStore.LookupEntry(map->GetAreaId(1, x, y, z)); - uint32 level = area->area_level; - for (int i = 5; i <= maxLevel; i++) + do { - std::vector& locs = locsPerLevelCache[i]; - int counter = 0; - WorldLocation levelLoc; - for (auto& checkLoc : locs) + Field* fields = results->Fetch(); + uint16 mapId = fields[0].Get(); + float x = fields[1].Get(); + float y = fields[2].Get(); + float z = fields[3].Get(); + float orient = fields[4].Get(); + uint32 faction = fields[5].Get(); + uint32 c_entry = fields[6].Get(); + const FactionTemplateEntry* entry = sFactionTemplateStore.LookupEntry(faction); + + WorldLocation loc(mapId, x + cos(orient) * 5.0f, y + sin(orient) * 5.0f, z + 0.5f, orient + M_PI); + collected_locs++; + Map* map = sMapMgr->FindMap(loc.GetMapId(), 0); + if (!map) + continue; + const AreaTableEntry* area = sAreaTableStore.LookupEntry(map->GetAreaId(1, x, y, z)); + uint32 level = area->area_level; + for (int i = 5; i <= maxLevel; i++) { - if (loc.GetMapId() != checkLoc.GetMapId()) - continue; - - if (area->zone != - map->GetZoneId(1, checkLoc.GetPositionX(), checkLoc.GetPositionY(), checkLoc.GetPositionZ())) - continue; - - if (loc.GetExactDist(checkLoc) <= 1000.0f) + std::vector& locs = locsPerLevelCache[i]; + int counter = 0; + WorldLocation levelLoc; + for (auto& checkLoc : locs) { + if (loc.GetMapId() != checkLoc.GetMapId()) + continue; + if (loc.GetExactDist(checkLoc) > 1000.0f) + continue; + + if (area->zone != + map->GetZoneId(1, checkLoc.GetPositionX(), checkLoc.GetPositionY(), checkLoc.GetPositionZ())) + continue; + counter++; levelLoc = checkLoc; } + if (counter < 15) + continue; + + if (!(entry->hostileMask & 4)) + { + hordeStarterPerLevelCache[i].push_back(loc); + } + if (!(entry->hostileMask & 2)) + { + allianceStarterPerLevelCache[i].push_back(loc); + } + LOG_DEBUG("playerbots", "Area: {} Level: {} creature_entry: {} add to: {} {}({},{},{},{})", area->ID, + level, c_entry, i, counter, levelLoc.GetPositionX(), levelLoc.GetPositionY(), + levelLoc.GetPositionZ(), levelLoc.GetMapId()); } - if (counter < 15) + } while (results->NextRow()); + } + // add all initial position + for (uint32 i = 1; i < MAX_RACES; i++) + { + for (uint32 j = 1; j < MAX_CLASSES; j++) + { + PlayerInfo const* info = sObjectMgr->GetPlayerInfo(i, j); + + if (!info) continue; - if (!(entry->hostileMask & 4)) + WorldPosition pos(info->mapId, info->positionX, info->positionY, info->positionZ, info->orientation); + + for (int32 l = 1; l <= 5; l++) { - hordeStarterPerLevelCache[i].push_back(loc); + if ((1 << (i - 1)) & RACEMASK_ALLIANCE) + allianceStarterPerLevelCache[(uint8)l].push_back(pos); + else + hordeStarterPerLevelCache[(uint8)l].push_back(pos); } - if (!(entry->hostileMask & 2)) - { - allianceStarterPerLevelCache[i].push_back(loc); - } - LOG_DEBUG("playerbots", "Area: {} Level: {} creature_entry: {} add to: {} {}({},{},{},{})", area->ID, - level, c_entry, i, counter, levelLoc.GetPositionX(), levelLoc.GetPositionY(), - levelLoc.GetPositionZ(), levelLoc.GetMapId()); + break; } - // int range = level <= 10 ? 6 : 8; - // for (int32 l = (int32)level; l <= (int32)level + range; l++) - // { - // if (l < 1 || l > maxLevel) - // { - // continue; - // } - // if (!(entry->hostileMask & 4)) - // { - // hordeStarterPerLevelCache[(uint8)l].push_back(loc); - // } - // if (!(entry->hostileMask & 2)) - // { - // allianceStarterPerLevelCache[(uint8)l].push_back(loc); - // } - // } - } while (results->NextRow()); - } - // add all initial position - for (uint32 i = 1; i < MAX_RACES; i++) - { - for (uint32 j = 1; j < MAX_CLASSES; j++) - { - PlayerInfo const* info = sObjectMgr->GetPlayerInfo(i, j); - - if (!info) - continue; - - WorldPosition pos(info->mapId, info->positionX, info->positionY, info->positionZ, info->orientation); - - for (int32 l = 1; l <= 5; l++) - { - if ((1 << (i - 1)) & RACEMASK_ALLIANCE) - allianceStarterPerLevelCache[(uint8)l].push_back(pos); - else - hordeStarterPerLevelCache[(uint8)l].push_back(pos); - } - break; } + LOG_INFO("playerbots", ">> {} innkeepers locations for level collected.", collected_locs); } - LOG_INFO("playerbots", "{} innkeepers locations for level collected.", collected_locs); - + results = WorldDatabase.Query( "SELECT " "map, " @@ -1673,7 +1663,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() } } while (results->NextRow()); } - LOG_INFO("playerbots", "{} banker locations for level collected.", collected_locs); + LOG_INFO("playerbots", ">> {} banker locations for level collected.", collected_locs); } void RandomPlayerbotMgr::PrepareAddclassCache() @@ -1711,7 +1701,7 @@ void RandomPlayerbotMgr::PrepareAddclassCache() } while (results->NextRow()); } } - LOG_INFO("playerbots", "{} characters collected for addclass command.", collected); + LOG_INFO("playerbots", ">> {} characters collected for addclass command.", collected); } void RandomPlayerbotMgr::RandomTeleportForLevel(Player* bot) @@ -2565,6 +2555,7 @@ void RandomPlayerbotMgr::PrintStats() uint32 stateCount[MAX_TRAVEL_STATE + 1] = {0}; std::vector> questCount; std::unordered_map rpgStatusCount; + std::unordered_map zoneCount; uint8 maxBotLevel = 0; for (PlayerBotMap::iterator i = playerBots.begin(); i != playerBots.end(); ++i) { @@ -2634,6 +2625,8 @@ void RandomPlayerbotMgr::PrintStats() ++tank; else ++dps; + + zoneCount[bot->GetZoneId()]++; if (sPlayerbotAIConfig->enableNewRpgStrategy) rpgStatusCount[botAI->rpgInfo.status]++; @@ -2719,6 +2712,15 @@ void RandomPlayerbotMgr::PrintStats() LOG_INFO("playerbots", " In BG: {}", inBg); LOG_INFO("playerbots", " In Rest: {}", rest); LOG_INFO("playerbots", " Dead: {}", dead); + + // LOG_INFO("playerbots", "Bots zone:"); + // for (auto &[zond_id, counter] : zoneCount) + // { + // const AreaTableEntry* entry = sAreaTableStore.LookupEntry(zond_id); + // std::string name = PlayerbotAI::GetLocalizedAreaName(entry); + // LOG_INFO("playerbots", " {}: {}", name, counter); + // } + if (sPlayerbotAIConfig->enableNewRpgStrategy) { LOG_INFO("playerbots", "Bots rpg status:", dead); diff --git a/src/strategy/rpg/NewRpgAction.cpp b/src/strategy/rpg/NewRpgAction.cpp index 7fd6931f..94d8aeae 100644 --- a/src/strategy/rpg/NewRpgAction.cpp +++ b/src/strategy/rpg/NewRpgAction.cpp @@ -33,7 +33,7 @@ bool NewRpgStatusUpdateAction::Execute(Event event) uint32 roll = urand(1, 100); // IDLE -> NEAR_NPC // if ((!info.lastNearNpc || info.lastNearNpc + setNpcInterval < getMSTime()) && roll <= 30) - if (roll <= 40) + if (roll <= 30) { info.lastNearNpc = getMSTime(); GuidVector possibleTargets = AI_VALUE(GuidVector, "possible rpg targets"); @@ -44,7 +44,7 @@ bool NewRpgStatusUpdateAction::Execute(Event event) } } // IDLE -> GO_INNKEEPER - else if (bot->GetLevel() >= 6 && roll <= 55) + else if (bot->GetLevel() >= 6 && roll <= 45) { WorldPosition pos = SelectRandomInnKeeperPos(); if (pos != WorldPosition() && bot->GetExactDist(pos) > 50.0f) @@ -155,8 +155,8 @@ WorldPosition NewRpgStatusUpdateAction::SelectRandomGrindPos() { if (bot->GetMapId() != loc.GetMapId()) continue; - - if (bot->GetMap()->GetZoneId(bot->GetPhaseMask(), loc.GetPositionX(), loc.GetPositionY(), loc.GetPositionZ()) != + + if (bot->GetMap()->GetZoneId(bot->GetPhaseMask(), loc.GetPositionX(), loc.GetPositionY(), loc.GetPositionZ()) != bot->GetZoneId()) continue; @@ -182,8 +182,8 @@ WorldPosition NewRpgStatusUpdateAction::SelectRandomGrindPos() dest = lo_prepared_locs[idx]; } LOG_DEBUG("playerbots", "[New Rpg] Bot {} select random grind pos Map:{} X:{} Y:{} Z:{} ({}+{} available in {})", - bot->GetName(), dest.GetMapId(), dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(), - hi_prepared_locs.size(), lo_prepared_locs.size() - hi_prepared_locs.size(), locs.size()); + bot->GetName(), dest.GetMapId(), dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(), + hi_prepared_locs.size(), lo_prepared_locs.size() - hi_prepared_locs.size(), locs.size()); return dest; } @@ -197,7 +197,7 @@ WorldPosition NewRpgStatusUpdateAction::SelectRandomInnKeeperPos() { if (bot->GetMapId() != loc.GetMapId()) continue; - + float range = bot->GetLevel() <= 5 ? 500.0f : 2500.0f; if (bot->GetExactDist(loc) < range) { @@ -211,8 +211,8 @@ WorldPosition NewRpgStatusUpdateAction::SelectRandomInnKeeperPos() dest = prepared_locs[idx]; } LOG_DEBUG("playerbots", "[New Rpg] Bot {} select random inn keeper pos Map:{} X:{} Y:{} Z:{} ({} available in {})", - bot->GetName(), dest.GetMapId(), dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(), - prepared_locs.size(), locs.size()); + bot->GetName(), dest.GetMapId(), dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(), + prepared_locs.size(), locs.size()); return dest; } @@ -221,7 +221,8 @@ bool NewRpgGoFarAwayPosAction::MoveFarTo(WorldPosition dest) float dis = bot->GetExactDist(dest); if (dis < pathFinderDis) { - return MoveTo(dest.getMapId(), dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(), false, false, false, true); + return MoveTo(dest.getMapId(), dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(), false, false, + false, true); } // performance optimization @@ -250,13 +251,13 @@ bool NewRpgGoFarAwayPosAction::MoveFarTo(WorldPosition dest) PathGenerator path(bot); path.CalculatePath(dx, dy, dz); PathType type = path.GetPathType(); - + bool canReach = type == PATHFIND_INCOMPLETE || type == PATHFIND_NORMAL; if (canReach && fabs(delta) <= minDelta) { found = true; - const G3D::Vector3 &endPos = path.GetActualEndPosition(); + const G3D::Vector3& endPos = path.GetActualEndPosition(); rx = endPos.x; ry = endPos.y; rz = endPos.z; From 9b41798eee423ef75b3991f6526aa141a848e260 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sat, 14 Dec 2024 22:29:31 +0800 Subject: [PATCH 22/26] Fix get zone id --- src/RandomPlayerbotMgr.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index d135b55c..407f5323 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -1537,6 +1537,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() if (!map) continue; const AreaTableEntry* area = sAreaTableStore.LookupEntry(map->GetAreaId(1, x, y, z)); + uint32 zoneId = area->zone ? area->zone : area->ID; uint32 level = area->area_level; for (int i = 5; i <= maxLevel; i++) { @@ -1550,14 +1551,15 @@ void RandomPlayerbotMgr::PrepareTeleportCache() if (loc.GetExactDist(checkLoc) > 1000.0f) continue; - - if (area->zone != + + if (zoneId != map->GetZoneId(1, checkLoc.GetPositionX(), checkLoc.GetPositionY(), checkLoc.GetPositionZ())) continue; counter++; levelLoc = checkLoc; } + if (counter < 15) continue; From a91aa3e39240d9e2ffad9e6777bd9825276921b2 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sun, 15 Dec 2024 16:46:44 +0800 Subject: [PATCH 23/26] New rpg bug fix that preventing bots from long distance movement --- src/PlayerbotAI.cpp | 6 +++--- src/RandomPlayerbotMgr.cpp | 2 +- src/strategy/rpg/NewRpgAction.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 4abb5b1b..1d3ef76f 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -720,7 +720,7 @@ void PlayerbotAI::HandleTeleportAck() // SetNextCheckDelay(urand(2000, 5000)); if (sPlayerbotAIConfig->applyInstanceStrategies) ApplyInstanceStrategies(bot->GetMapId(), true); - Reset(); + Reset(true); } SetNextCheckDelay(sPlayerbotAIConfig->globalCoolDown); @@ -769,14 +769,14 @@ void PlayerbotAI::Reset(bool full) ->setTarget(sTravelMgr->nullTravelDestination, sTravelMgr->nullWorldPosition, true); aiObjectContext->GetValue("travel target")->Get()->setStatus(TRAVEL_STATUS_EXPIRED); aiObjectContext->GetValue("travel target")->Get()->setExpireIn(1000); + rpgInfo = NewRpgInfo(); } aiObjectContext->GetValue("ignore rpg target")->Get().clear(); bot->GetMotionMaster()->Clear(); - // bot->CleanupAfterTaxiFlight(); + InterruptSpell(); - rpgInfo = NewRpgInfo(); if (full) { diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index 407f5323..1774473b 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -1495,7 +1495,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() } LOG_INFO("playerbots", ">> {} locations for level collected.", collected_locs); - LOG_INFO("playerbots", "Preparing innkeepers locations for level collected"); + LOG_INFO("playerbots", "Preparing innkeepers locations for level collected..."); if (sPlayerbotAIConfig->enableNewRpgStrategy) { results = WorldDatabase.Query( diff --git a/src/strategy/rpg/NewRpgAction.cpp b/src/strategy/rpg/NewRpgAction.cpp index 94d8aeae..925585ba 100644 --- a/src/strategy/rpg/NewRpgAction.cpp +++ b/src/strategy/rpg/NewRpgAction.cpp @@ -44,7 +44,7 @@ bool NewRpgStatusUpdateAction::Execute(Event event) } } // IDLE -> GO_INNKEEPER - else if (bot->GetLevel() >= 6 && roll <= 45) + else if (bot->GetLevel() >= 6 && roll <= 40) { WorldPosition pos = SelectRandomInnKeeperPos(); if (pos != WorldPosition() && bot->GetExactDist(pos) > 50.0f) From 45629cb3df78db3c6dda67a61e8a56bad55d90d1 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sun, 15 Dec 2024 21:36:26 +0800 Subject: [PATCH 24/26] Starter location collection --- src/RandomPlayerbotMgr.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index 1774473b..7ad4a02a 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -1549,7 +1549,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() if (loc.GetMapId() != checkLoc.GetMapId()) continue; - if (loc.GetExactDist(checkLoc) > 1000.0f) + if (loc.GetExactDist(checkLoc) > 1500.0f) continue; if (zoneId != @@ -1558,6 +1558,8 @@ void RandomPlayerbotMgr::PrepareTeleportCache() counter++; levelLoc = checkLoc; + if (counter >= 15) + break; } if (counter < 15) From 677ee83e451363c3b697006d0d3521963c754b5e Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sun, 15 Dec 2024 22:30:24 +0800 Subject: [PATCH 25/26] Update locs level --- src/RandomPlayerbotMgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index 7ad4a02a..18b6ab3a 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -1479,7 +1479,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache() float z = fields[3].Get(); uint32 min_level = fields[4].Get(); uint32 max_level = fields[5].Get(); - uint32 level = (min_level + max_level) / 2; + uint32 level = (min_level + max_level + 1) / 2; WorldLocation loc(mapId, x, y, z, 0); collected_locs++; for (int32 l = (int32)level - (int32)sPlayerbotAIConfig->randomBotTeleHigherLevel; From a9e33bbcae88400440efba2323c8668b70d4fb95 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Mon, 16 Dec 2024 00:53:07 +0800 Subject: [PATCH 26/26] Increase pet attack priority --- src/strategy/generic/CombatStrategy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/strategy/generic/CombatStrategy.cpp b/src/strategy/generic/CombatStrategy.cpp index bd1e3838..29c525fb 100644 --- a/src/strategy/generic/CombatStrategy.cpp +++ b/src/strategy/generic/CombatStrategy.cpp @@ -22,7 +22,7 @@ void CombatStrategy::InitTriggers(std::vector& triggers) triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", ACTION_MOVE + 7), nullptr))); triggers.push_back( - new TriggerNode("pet attack", NextAction::array(0, new NextAction("pet attack", ACTION_NORMAL), nullptr))); + new TriggerNode("pet attack", NextAction::array(0, new NextAction("pet attack", 40.0f), nullptr))); // triggers.push_back(new TriggerNode("combat long stuck", NextAction::array(0, new NextAction("hearthstone", 0.9f), // new NextAction("repop", 0.8f), nullptr))); }