From f91a8492e3eb5ba38ca120c46b75dcc12b182791 Mon Sep 17 00:00:00 2001 From: celguar Date: Wed, 13 Sep 2023 12:03:57 +0300 Subject: [PATCH 1/6] Do not offer equipped items to other bots --- playerbot/strategy/values/TradeValues.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playerbot/strategy/values/TradeValues.cpp b/playerbot/strategy/values/TradeValues.cpp index 97ae0d82f..a9203c970 100644 --- a/playerbot/strategy/values/TradeValues.cpp +++ b/playerbot/strategy/values/TradeValues.cpp @@ -47,6 +47,10 @@ list ItemsUsefulToGiveValue::Calculate() if (!item->CanBeTraded()) continue; + // do not trade equipped items + if (item->IsEquipped()) + continue; + TradeData* trade = bot->GetTradeData(); if (trade) From c5b21b93ca0b6aca33138dab7e6d975939d4a3b2 Mon Sep 17 00:00:00 2001 From: celguar Date: Wed, 13 Sep 2023 12:04:28 +0300 Subject: [PATCH 2/6] Fix retri paladin alternative actions --- playerbot/strategy/paladin/RetributionPaladinStrategy.cpp | 5 +++++ playerbot/strategy/paladin/RetributionPaladinStrategy.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/playerbot/strategy/paladin/RetributionPaladinStrategy.cpp b/playerbot/strategy/paladin/RetributionPaladinStrategy.cpp index e83a17556..e6f051499 100644 --- a/playerbot/strategy/paladin/RetributionPaladinStrategy.cpp +++ b/playerbot/strategy/paladin/RetributionPaladinStrategy.cpp @@ -44,6 +44,11 @@ class RetributionPaladinStrategyActionNodeFactory : public NamedObjectFactory& triggers) override; From 057cccc72cd3c2acd8f249c1b74079ad264e622f Mon Sep 17 00:00:00 2001 From: celguar Date: Wed, 13 Sep 2023 12:04:38 +0300 Subject: [PATCH 3/6] Rename seal trigger to just seal --- playerbot/strategy/paladin/PaladinTriggers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playerbot/strategy/paladin/PaladinTriggers.h b/playerbot/strategy/paladin/PaladinTriggers.h index 4d0c48f6a..ce4985ca7 100644 --- a/playerbot/strategy/paladin/PaladinTriggers.h +++ b/playerbot/strategy/paladin/PaladinTriggers.h @@ -25,7 +25,7 @@ namespace ai class SealTrigger : public BuffTrigger { public: - SealTrigger(PlayerbotAI* ai) : BuffTrigger(ai, "seal of justice") {} + SealTrigger(PlayerbotAI* ai) : BuffTrigger(ai, "seal") {} virtual bool IsActive(); }; From 7e6bf8663e260eface34c715c3a274f55b25c41c Mon Sep 17 00:00:00 2001 From: celguar Date: Wed, 13 Sep 2023 12:06:30 +0300 Subject: [PATCH 4/6] use poor quality as lower limit for low levels some slots might not have green items for <10 lvl --- playerbot/PlayerbotFactory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playerbot/PlayerbotFactory.cpp b/playerbot/PlayerbotFactory.cpp index 810f20975..8e1162a61 100644 --- a/playerbot/PlayerbotFactory.cpp +++ b/playerbot/PlayerbotFactory.cpp @@ -1415,7 +1415,7 @@ void PlayerbotFactory::InitEquipment(bool incremental, bool syncWithMaster) if (!incremental) { if (level < 10) - quality = urand(ITEM_QUALITY_POOR, ITEM_QUALITY_UNCOMMON); + quality = ITEM_QUALITY_POOR; else if (level < 20) quality = urand(ITEM_QUALITY_NORMAL, ITEM_QUALITY_UNCOMMON); else if (level < 40) From 7e349c08e7b388d0e7e5ac5a7c6a51e9fc8d1567 Mon Sep 17 00:00:00 2001 From: celguar Date: Wed, 13 Sep 2023 12:13:09 +0300 Subject: [PATCH 5/6] Consider low lvl paladin retribution Makes them have retribution strategy as default until lvl 10 Makes randomiser give mail items instead of cloth --- playerbot/AiFactory.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/playerbot/AiFactory.cpp b/playerbot/AiFactory.cpp index 3bd095fa6..0fc6167bc 100644 --- a/playerbot/AiFactory.cpp +++ b/playerbot/AiFactory.cpp @@ -115,7 +115,7 @@ int AiFactory::GetPlayerSpecTab(Player* bot) tab = 1; break; case CLASS_PALADIN: - tab = 0; + tab = 2; break; case CLASS_PRIEST: tab = 1; @@ -518,13 +518,6 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa } } - // enable paladin fight at low level - if (player->getClass() == CLASS_PALADIN && tab == 0 && player->GetLevel() < 10) - { - combatEngine->addStrategies("retribution", "close", NULL); - combatEngine->removeStrategy("ranged"); - } - // remove threat for now //engine->removeStrategy("threat"); From 2ced2ef92c809564f4b43815130e3a8b709861e1 Mon Sep 17 00:00:00 2001 From: celguar Date: Wed, 13 Sep 2023 12:13:35 +0300 Subject: [PATCH 6/6] Consider low lvl warriors protection Makes randomiser give 1h and a shield to warriors <10 lvl --- playerbot/AiFactory.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/playerbot/AiFactory.cpp b/playerbot/AiFactory.cpp index 0fc6167bc..668f6db8e 100644 --- a/playerbot/AiFactory.cpp +++ b/playerbot/AiFactory.cpp @@ -120,6 +120,9 @@ int AiFactory::GetPlayerSpecTab(Player* bot) case CLASS_PRIEST: tab = 1; break; + case CLASS_WARRIOR: + tab = 2; + break; } return tab; }