diff --git a/src/factory/StatsWeightCalculator.cpp b/src/factory/StatsWeightCalculator.cpp index c708c946..bf08e19e 100644 --- a/src/factory/StatsWeightCalculator.cpp +++ b/src/factory/StatsWeightCalculator.cpp @@ -108,6 +108,7 @@ void StatsWeightCalculator::GenerateWeights(Player* player) { GenerateBasicWeights(player); GenerateAdditionalWeights(player); + ApplyWeightFinetune(player); } void StatsWeightCalculator::GenerateBasicWeights(Player* player) @@ -458,7 +459,7 @@ void StatsWeightCalculator::CalculateItemTypePenalty(ItemTemplate const* proto) weight_ *= 0.1; } // fury with titan's grip - if ((!isDoubleHand || proto->SubClass == ITEM_SUBCLASS_WEAPON_POLEARM) && + if ((!isDoubleHand || proto->SubClass == ITEM_SUBCLASS_WEAPON_POLEARM || proto->SubClass == ITEM_SUBCLASS_WEAPON_STAFF) && (cls == CLASS_WARRIOR && tab == WARRIOR_TAB_FURY && player_->CanTitanGrip())) { weight_ *= 0.1; @@ -600,6 +601,19 @@ void StatsWeightCalculator::ApplyOverflowPenalty(Player* player) } } +void StatsWeightCalculator::ApplyWeightFinetune(Player* player) +{ + { + if (type_ == CollectorType::MELEE || type_ == CollectorType::RANGED) + { + float armor_penetration_current, armor_penetration_overflow; + armor_penetration_current = player->GetRatingBonusValue(CR_ARMOR_PENETRATION); + if (armor_penetration_current > 50) + stats_weights_[STATS_TYPE_ARMOR_PENETRATION] *= 1.2f; + } + } +} + CollectorType StatsWeightCalculator::GetHitOverflowType(Player* player) { cls = player->getClass(); diff --git a/src/factory/StatsWeightCalculator.h b/src/factory/StatsWeightCalculator.h index 81b8aa67..f6f4bf7e 100644 --- a/src/factory/StatsWeightCalculator.h +++ b/src/factory/StatsWeightCalculator.h @@ -48,6 +48,7 @@ private: bool NotBestArmorType(uint32 item_subclass_armor); void ApplyOverflowPenalty(Player* player); + void ApplyWeightFinetune(Player* player); CollectorType GetHitOverflowType(Player* player); private: diff --git a/src/strategy/hunter/DpsHunterStrategy.cpp b/src/strategy/hunter/DpsHunterStrategy.cpp index 325f3b93..e9d0e2f5 100644 --- a/src/strategy/hunter/DpsHunterStrategy.cpp +++ b/src/strategy/hunter/DpsHunterStrategy.cpp @@ -41,12 +41,13 @@ DpsHunterStrategy::DpsHunterStrategy(PlayerbotAI* botAI) : GenericHunterStrategy NextAction** DpsHunterStrategy::getDefaultActions() { return NextAction::array( - 0, new NextAction("kill shot", ACTION_DEFAULT + 0.6f), new NextAction("chimera shot", ACTION_DEFAULT + 0.5f), - new NextAction("explosive shot", ACTION_DEFAULT + 0.4f), new NextAction("aimed shot", ACTION_DEFAULT + 0.3f), - /*new NextAction("arcane shot", ACTION_DEFAULT + 0.2f),*/ new NextAction("steady shot", ACTION_DEFAULT + 0.1f), + 0, new NextAction("kill shot", ACTION_DEFAULT + 0.8f), new NextAction("chimera shot", ACTION_DEFAULT + 0.7f), + new NextAction("explosive shot", ACTION_DEFAULT + 0.6f), new NextAction("aimed shot", ACTION_DEFAULT + 0.5f), + new NextAction("silencing shot", ACTION_DEFAULT + 0.4f), + new NextAction("kill command", ACTION_DEFAULT + 0.3f), + new NextAction("arcane shot", ACTION_DEFAULT + 0.2f), + new NextAction("steady shot", ACTION_DEFAULT + 0.1f), new NextAction("auto shot", ACTION_DEFAULT), nullptr); - // return NextAction::array(0, new NextAction("explosive shot", 11.0f), new NextAction("auto shot", 10.0f), new - // NextAction("auto attack", 9.0f), nullptr); } void DpsHunterStrategy::InitTriggers(std::vector& triggers) diff --git a/src/strategy/hunter/HunterActions.h b/src/strategy/hunter/HunterActions.h index 868905c6..87595b3b 100644 --- a/src/strategy/hunter/HunterActions.h +++ b/src/strategy/hunter/HunterActions.h @@ -78,6 +78,9 @@ END_SPELL_ACTION() BEGIN_RANGED_SPELL_ACTION(CastKillShotAction, "kill shot") END_SPELL_ACTION() +BEGIN_RANGED_SPELL_ACTION(CastSilencingShotAction, "silencing shot") +END_SPELL_ACTION() + BEGIN_RANGED_SPELL_ACTION(CastTranquilizingShotAction, "tranquilizing shot") END_SPELL_ACTION() @@ -139,6 +142,14 @@ public: std::string const GetTargetName() override { return "pet target"; } }; +class CastKillCommandAction : public CastAuraSpellAction +{ +public: + CastKillCommandAction(PlayerbotAI* botAI) : CastAuraSpellAction(botAI, "kill command") {} + + std::string const GetTargetName() override { return "pet target"; } +}; + class CastRevivePetAction : public CastBuffSpellAction { public: diff --git a/src/strategy/hunter/HunterAiObjectContext.cpp b/src/strategy/hunter/HunterAiObjectContext.cpp index 32548aad..dbfb6a54 100644 --- a/src/strategy/hunter/HunterAiObjectContext.cpp +++ b/src/strategy/hunter/HunterAiObjectContext.cpp @@ -143,6 +143,7 @@ public: creators["scorpid sting"] = &HunterAiObjectContextInternal::scorpid_sting; creators["hunter's mark"] = &HunterAiObjectContextInternal::hunters_mark; creators["mend pet"] = &HunterAiObjectContextInternal::mend_pet; + creators["kill command"] = &HunterAiObjectContextInternal::kill_command; creators["revive pet"] = &HunterAiObjectContextInternal::revive_pet; creators["call pet"] = &HunterAiObjectContextInternal::call_pet; creators["black arrow"] = &HunterAiObjectContextInternal::black_arrow; @@ -171,6 +172,7 @@ public: creators["steady shot"] = &HunterAiObjectContextInternal::steady_shot; creators["kill shot"] = &HunterAiObjectContextInternal::kill_shot; creators["misdirection on main tank"] = &HunterAiObjectContextInternal::misdirection_on_main_tank; + creators["silencing shot"] = &HunterAiObjectContextInternal::silencing_shot; } private: @@ -196,6 +198,7 @@ private: static Action* scorpid_sting(PlayerbotAI* botAI) { return new CastScorpidStingAction(botAI); } static Action* hunters_mark(PlayerbotAI* botAI) { return new CastHuntersMarkAction(botAI); } static Action* mend_pet(PlayerbotAI* botAI) { return new CastMendPetAction(botAI); } + static Action* kill_command(PlayerbotAI* botAI) { return new CastKillCommandAction(botAI); } static Action* revive_pet(PlayerbotAI* botAI) { return new CastRevivePetAction(botAI); } static Action* call_pet(PlayerbotAI* botAI) { return new CastCallPetAction(botAI); } static Action* black_arrow(PlayerbotAI* botAI) { return new CastBlackArrow(botAI); } @@ -217,6 +220,8 @@ private: static Action* steady_shot(PlayerbotAI* ai) { return new CastSteadyShotAction(ai); } static Action* kill_shot(PlayerbotAI* ai) { return new CastKillShotAction(ai); } static Action* misdirection_on_main_tank(PlayerbotAI* ai) { return new CastMisdirectionOnMainTankAction(ai); } + static Action* silencing_shot(PlayerbotAI* ai) { return new CastSilencingShotAction(ai); } + }; HunterAiObjectContext::HunterAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)