miscs: CMSG received correctly (quest, loot etc.)

This commit is contained in:
Yunfan Li
2023-07-26 13:17:48 +08:00
parent 38f385dae8
commit a2045d6d76
5 changed files with 9 additions and 6 deletions

View File

@@ -122,7 +122,7 @@ AiPlayerbot.AutoPickReward = yes
# Bots equip upgrades (Bots will equip any item obtained from looting or a quest if they are upgrades)
# Default: 0 (disabled)
AiPlayerbot.AutoEquipUpgradeLoot = 1
AiPlayerbot.AutoEquipUpgradeLoot = 0
# Sync quests with player (Bots will complete quests the moment you hand them in. Bots will ignore looting quest items.)
# Default: 0 (disabled)

View File

@@ -1226,6 +1226,9 @@ void MovementAction::ClearIdleState()
bool MovementAction::MoveAway(Unit* target)
{
if (!target) {
return false;
}
float angle = target->GetAngle(bot);
float dx = bot->GetPositionX() + cos(angle) * sPlayerbotAIConfig->fleeDistance;
float dy = bot->GetPositionY() + sin(angle) * sPlayerbotAIConfig->fleeDistance;

View File

@@ -123,8 +123,8 @@ class WorldPacketActionContext : public NamedObjectContext<Action>
static Action* accept_quest(PlayerbotAI* botAI) { return new AcceptQuestAction(botAI); }
static Action* accept_all_quests(PlayerbotAI* botAI) { return new AcceptAllQuestsAction(botAI); }
static Action* accept_quest_share(PlayerbotAI* botAI) { return new AcceptQuestShareAction(botAI); }
static Action* loot_roll(PlayerbotAI* botAI) { return (QueryItemUsageAction*)new LootRollAction(botAI); }
static Action* master_loot_roll(PlayerbotAI* botAI) { return (QueryItemUsageAction*)new MasterLootRollAction(botAI); }
static Action* loot_roll(PlayerbotAI* botAI) { return new LootRollAction(botAI); }
static Action* master_loot_roll(PlayerbotAI* botAI) { return new MasterLootRollAction(botAI); }
static Action* bg_join(PlayerbotAI* botAI) { return new BGJoinAction(botAI); }
static Action* bg_leave(PlayerbotAI* botAI) { return new BGLeaveAction(botAI); }
static Action* bg_status(PlayerbotAI* botAI) { return new BGStatusAction(botAI); }

View File

@@ -89,5 +89,5 @@ void FrostDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
void FrostDKAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("light aoe", NextAction::array(0, new NextAction("howling blast", ACTION_NORMAL + 4), nullptr)));
triggers.push_back(new TriggerNode("high aoe", NextAction::array(0, new NextAction("howling blast", ACTION_NORMAL + 4), nullptr)));
}

View File

@@ -36,8 +36,8 @@ GuidVector NearestGameObjects::Calculate()
GuidVector result;
for (GameObject* go : targets)
{
if (ignoreLos || bot->IsWithinLOSInMap(go))
result.push_back(go->GetGUID());
// if (ignoreLos || bot->IsWithinLOSInMap(go))
result.push_back(go->GetGUID());
}
return result;