From fdb62c6cc02c6283df7a481dacb9215988ba9efa Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Wed, 6 Sep 2023 11:38:03 +0800 Subject: [PATCH] ammo init --- src/PlayerbotFactory.cpp | 6 +++++- src/PlayerbotFactory.h | 2 +- src/strategy/actions/AutoLearnSpellAction.cpp | 1 + src/strategy/actions/AutoTeleportForLevelAction.cpp | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index 75606d47..8424e3eb 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -2406,7 +2406,11 @@ void PlayerbotFactory::InitReagents() } break; case CLASS_SHAMAN: - items.push_back({46978, 1}); // Totem + // items.push_back({46978, 1}); // Totem + items.push_back({5175, 1}); // Earth Totem + items.push_back({5176, 1}); // Flame Totem + items.push_back({5177, 1}); // Water Totem + items.push_back({5178, 1}); // Air Totem if (bot->getLevel() >= 30) items.push_back({17030, 40}); // Ankh break; diff --git a/src/PlayerbotFactory.h b/src/PlayerbotFactory.h index d1f3ad6d..551ad136 100644 --- a/src/PlayerbotFactory.h +++ b/src/PlayerbotFactory.h @@ -120,6 +120,7 @@ class PlayerbotFactory : public InventoryAction void InitClassSpells(); void InitEquipment(bool incremental); void InitPet(); + void InitAmmo(); private: void Prepare(); @@ -140,7 +141,6 @@ class PlayerbotFactory : public InventoryAction void ClearInventory(); void ClearAllItems(); void ResetQuests(); - void InitAmmo(); void InitMounts(); void InitPotions(); void InitFood(); diff --git a/src/strategy/actions/AutoLearnSpellAction.cpp b/src/strategy/actions/AutoLearnSpellAction.cpp index cd151979..3202eb96 100644 --- a/src/strategy/actions/AutoLearnSpellAction.cpp +++ b/src/strategy/actions/AutoLearnSpellAction.cpp @@ -43,6 +43,7 @@ void AutoLearnSpellAction::LearnTrainerSpells(std::ostringstream* out) PlayerbotFactory factory(bot, bot->GetLevel()); factory.InitClassSpells(); factory.InitAvailableSpells(); + factory.InitSkills(); factory.InitPet(); // bot->LearnDefaultSkills(); diff --git a/src/strategy/actions/AutoTeleportForLevelAction.cpp b/src/strategy/actions/AutoTeleportForLevelAction.cpp index 396c522e..a4ddad56 100644 --- a/src/strategy/actions/AutoTeleportForLevelAction.cpp +++ b/src/strategy/actions/AutoTeleportForLevelAction.cpp @@ -21,5 +21,5 @@ void AutoTeleportForLevelAction::AutoUpgradeEquip() { } PlayerbotFactory factory(bot, bot->GetLevel(), ITEM_QUALITY_RARE); factory.InitEquipment(true); - factory.InitSkills(); + factory.InitAmmo(); } \ No newline at end of file