mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
Implement 49220 and ranks
This commit is contained in:
parent
16ae6a2f85
commit
9811858d44
3 changed files with 28 additions and 1 deletions
|
|
@ -8925,7 +8925,23 @@ int32 Unit::SpellBonusWithCoeffs(SpellEntry const *spellProto, int32 total, int3
|
|||
|
||||
// apply ap bonus at done part calculation only (it flat total mod so common with taken)
|
||||
if (donePart && bonus->ap_bonus)
|
||||
total += int32(bonus->ap_bonus * (GetTotalAttackPowerValue(BASE_ATTACK) + ap_benefit));
|
||||
{
|
||||
float ap_bonus = bonus->ap_bonus;
|
||||
|
||||
// Impurity
|
||||
if (GetTypeId() == TYPEID_PLAYER && spellProto->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT)
|
||||
{
|
||||
PlayerTalent const* talent = ((Player*)this)->GetTalentById(2005);
|
||||
if (talent && talent->state != PLAYERSPELL_REMOVED)
|
||||
{
|
||||
SpellEntry const* spell = sSpellStore.LookupEntry(talent->m_talentEntry->RankID[talent->currentRank]);
|
||||
if (spell)
|
||||
ap_bonus += ((spell->CalculateSimpleValue(EFFECT_INDEX_0) * ap_bonus) / 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
total += int32(ap_bonus * (GetTotalAttackPowerValue(BASE_ATTACK) + ap_benefit));
|
||||
}
|
||||
}
|
||||
// Default calculation
|
||||
else if (benefit)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue