mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Merge pull request #517 from liyunfan1223/fix_ammo
Fix ammo init (Nether spike)
This commit is contained in:
@@ -802,7 +802,7 @@ AiPlayerbot.PremadeSpecGlyph.2.0 = 41106,43367,45741,43369,43365,41109
|
|||||||
AiPlayerbot.PremadeSpecLink.2.0.60 = 50350151020013053100515221
|
AiPlayerbot.PremadeSpecLink.2.0.60 = 50350151020013053100515221
|
||||||
AiPlayerbot.PremadeSpecLink.2.0.80 = 50350152220013053100515221-503201312
|
AiPlayerbot.PremadeSpecLink.2.0.80 = 50350152220013053100515221-503201312
|
||||||
AiPlayerbot.PremadeSpecName.2.1 = prot pve
|
AiPlayerbot.PremadeSpecName.2.1 = prot pve
|
||||||
AiPlayerbot.PremadeSpecGlyph.2.1 = 41100,43367,43869,43369,43365,45745
|
AiPlayerbot.PremadeSpecGlyph.2.1 = 41099,43367,43869,43369,43365,45745
|
||||||
AiPlayerbot.PremadeSpecLink.2.1.60 = -05005135203102311333112321
|
AiPlayerbot.PremadeSpecLink.2.1.60 = -05005135203102311333112321
|
||||||
AiPlayerbot.PremadeSpecLink.2.1.80 = -05005135203102311333312321-502302012003
|
AiPlayerbot.PremadeSpecLink.2.1.80 = -05005135203102311333312321-502302012003
|
||||||
AiPlayerbot.PremadeSpecName.2.2 = ret pve
|
AiPlayerbot.PremadeSpecName.2.2 = ret pve
|
||||||
|
|||||||
@@ -682,6 +682,7 @@ void PlayerbotAI::Reset(bool full)
|
|||||||
|
|
||||||
aiObjectContext->GetValue<Unit*>("old target")->Set(nullptr);
|
aiObjectContext->GetValue<Unit*>("old target")->Set(nullptr);
|
||||||
aiObjectContext->GetValue<Unit*>("current target")->Set(nullptr);
|
aiObjectContext->GetValue<Unit*>("current target")->Set(nullptr);
|
||||||
|
aiObjectContext->GetValue<GuidVector>("prioritized targets")->Reset();
|
||||||
aiObjectContext->GetValue<ObjectGuid>("pull target")->Set(ObjectGuid::Empty);
|
aiObjectContext->GetValue<ObjectGuid>("pull target")->Set(ObjectGuid::Empty);
|
||||||
aiObjectContext->GetValue<GuidPosition>("rpg target")->Set(GuidPosition());
|
aiObjectContext->GetValue<GuidPosition>("rpg target")->Set(GuidPosition());
|
||||||
aiObjectContext->GetValue<LootObject>("loot target")->Set(LootObject());
|
aiObjectContext->GetValue<LootObject>("loot target")->Set(LootObject());
|
||||||
|
|||||||
@@ -2322,7 +2322,7 @@ void RandomItemMgr::BuildAmmoCache()
|
|||||||
for (uint32 subClass = ITEM_SUBCLASS_ARROW; subClass <= ITEM_SUBCLASS_BULLET; subClass++)
|
for (uint32 subClass = ITEM_SUBCLASS_ARROW; subClass <= ITEM_SUBCLASS_BULLET; subClass++)
|
||||||
{
|
{
|
||||||
QueryResult results = WorldDatabase.Query(
|
QueryResult results = WorldDatabase.Query(
|
||||||
"SELECT entry, Flags FROM item_template WHERE class = {} AND subclass = {} AND RequiredLevel <= {} "
|
"SELECT entry, Flags FROM item_template WHERE class = {} AND subclass = {} AND RequiredLevel <= {} and duration = 0 "
|
||||||
"ORDER BY stackable DESC, RequiredLevel DESC",
|
"ORDER BY stackable DESC, RequiredLevel DESC",
|
||||||
ITEM_CLASS_PROJECTILE, subClass, level);
|
ITEM_CLASS_PROJECTILE, subClass, level);
|
||||||
if (!results)
|
if (!results)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ bool FollowChatShortcutAction::Execute(Event event)
|
|||||||
// botAI->Reset();
|
// botAI->Reset();
|
||||||
botAI->ChangeStrategy("+follow,-passive,-grind,-move from group", BOT_STATE_NON_COMBAT);
|
botAI->ChangeStrategy("+follow,-passive,-grind,-move from group", BOT_STATE_NON_COMBAT);
|
||||||
botAI->ChangeStrategy("-follow,-passive,-grind,-move from group", BOT_STATE_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();
|
PositionMap& posMap = context->GetValue<PositionMap&>("position")->Get();
|
||||||
PositionInfo pos = posMap["return"];
|
PositionInfo pos = posMap["return"];
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ bool TogglePetSpellAutoCastAction::Execute(Event event)
|
|||||||
bool shouldApply = true;
|
bool shouldApply = true;
|
||||||
// imp's spell, felhunte's intelligence, cat stealth
|
// imp's spell, felhunte's intelligence, cat stealth
|
||||||
if (spellId == 4511 || spellId == 1742 || spellId == 54424 || spellId == 57564 || spellId == 57565 ||
|
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;
|
shouldApply = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ bool SummonAction::Teleport(Player* summoner, Player* player)
|
|||||||
{
|
{
|
||||||
bot->ResurrectPlayer(1.0f, false);
|
bot->ResurrectPlayer(1.0f, false);
|
||||||
botAI->TellMasterNoFacing("I live, again!");
|
botAI->TellMasterNoFacing("I live, again!");
|
||||||
botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Set({});
|
botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
player->GetMotionMaster()->Clear();
|
player->GetMotionMaster()->Clear();
|
||||||
|
|||||||
@@ -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("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
|
// 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)));
|
// 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",
|
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("desperate prayer",
|
||||||
ACTION_HIGH + 5), nullptr)));
|
ACTION_HIGH + 5), nullptr)));
|
||||||
// triggers.push_back(new TriggerNode("enemy is close", NextAction::array(0, new
|
// 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)));
|
new TriggerNode("low health", NextAction::array(0, new NextAction("power word: shield", ACTION_HIGH), NULL)));
|
||||||
|
|
||||||
triggers.push_back(
|
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(
|
triggers.push_back(
|
||||||
new TriggerNode("low mana", NextAction::array(0, new NextAction("hymn of hope", ACTION_HIGH), NULL)));
|
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)
|
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(
|
triggers.push_back(
|
||||||
new TriggerNode("power infusion", NextAction::array(0, new NextAction("power infusion", 41.0f), nullptr)));
|
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)));
|
triggers.push_back(new TriggerNode("boost", NextAction::array(0, new NextAction("shadowfiend", 20.0f), nullptr)));
|
||||||
|
|||||||
Reference in New Issue
Block a user