Dps hunter

This commit is contained in:
Yunfan Li
2024-09-04 15:12:39 +08:00
parent 9fb8f2fdf4
commit 6789237843
5 changed files with 38 additions and 6 deletions

View File

@@ -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();