Merge pull request #517 from liyunfan1223/fix_ammo

Fix ammo init (Nether spike)
This commit is contained in:
Yunfan Li
2024-09-11 14:24:48 +08:00
committed by GitHub
7 changed files with 12 additions and 8 deletions

View File

@@ -35,7 +35,7 @@ bool FollowChatShortcutAction::Execute(Event event)
// botAI->Reset();
botAI->ChangeStrategy("+follow,-passive,-grind,-move from group", BOT_STATE_NON_COMBAT);
botAI->ChangeStrategy("-follow,-passive,-grind,-move from group", BOT_STATE_COMBAT);
botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Set({});
botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Reset();
PositionMap& posMap = context->GetValue<PositionMap&>("position")->Get();
PositionInfo pos = posMap["return"];

View File

@@ -38,7 +38,7 @@ bool TogglePetSpellAutoCastAction::Execute(Event event)
bool shouldApply = true;
// imp's spell, felhunte's intelligence, cat stealth
if (spellId == 4511 || spellId == 1742 || spellId == 54424 || spellId == 57564 || spellId == 57565 ||
spellId == 57566 || spellId == 57567 || spellId == 24450)
spellId == 57566 || spellId == 57567 || spellId == 24450 || spellId == 53477)
{
shouldApply = false;
}

View File

@@ -218,7 +218,7 @@ bool SummonAction::Teleport(Player* summoner, Player* player)
{
bot->ResurrectPlayer(1.0f, false);
botAI->TellMasterNoFacing("I live, again!");
botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Set({});
botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Reset();
}
player->GetMotionMaster()->Clear();

View File

@@ -31,6 +31,8 @@ void GenericPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
// NextAction("inner focus", 42.0f), nullptr))); triggers.push_back(new TriggerNode("medium mana",
// NextAction::array(0, new NextAction("symbol of hope", ACTION_EMERGENCY), nullptr))); triggers.push_back(new
// TriggerNode("low mana", NextAction::array(0, new NextAction("consume magic", 10.0f), nullptr)));
// triggers.push_back(
// new TriggerNode("inner focus", NextAction::array(0, new NextAction("inner focus", 42.0f), nullptr)));
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("desperate prayer",
ACTION_HIGH + 5), nullptr)));
// triggers.push_back(new TriggerNode("enemy is close", NextAction::array(0, new
@@ -43,7 +45,10 @@ void GenericPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
new TriggerNode("low health", NextAction::array(0, new NextAction("power word: shield", ACTION_HIGH), NULL)));
triggers.push_back(
new TriggerNode("medium mana", NextAction::array(0, new NextAction("shadowfiend", ACTION_HIGH + 1), NULL)));
new TriggerNode("medium mana",
NextAction::array(0,
new NextAction("shadowfiend", ACTION_HIGH + 2),
new NextAction("inner focus", ACTION_HIGH + 1), nullptr)));
triggers.push_back(
new TriggerNode("low mana", NextAction::array(0, new NextAction("hymn of hope", ACTION_HIGH), NULL)));
@@ -72,8 +77,6 @@ void PriestCureStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
void PriestBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(
new TriggerNode("inner focus", NextAction::array(0, new NextAction("inner focus", 42.0f), nullptr)));
triggers.push_back(
new TriggerNode("power infusion", NextAction::array(0, new NextAction("power infusion", 41.0f), nullptr)));
triggers.push_back(new TriggerNode("boost", NextAction::array(0, new NextAction("shadowfiend", 20.0f), nullptr)));