Custom changes.

This commit is contained in:
Alex
2020-08-03 23:14:39 -04:00
parent 98340751b0
commit ff7c3aff92
14 changed files with 190 additions and 20 deletions
+32
View File
@@ -159,6 +159,14 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
if (IsNPC() && CastToNPC()->GetSpellScale())
value = int(static_cast<float>(value) * CastToNPC()->GetSpellScale() / 100.0f);
if (RuleB(Combat, CustomScaling) && IsClient()) {
int scale_value = itembonuses.INT;
float spell_damage_scale = RuleR(Combat, CustomScalingSpellDamage);
if (scale_value > int(spell_damage_scale)) {
value = int(static_cast<float>(value) * static_cast<float>(scale_value / spell_damage_scale));
}
}
return value;
}
@@ -228,6 +236,14 @@ int32 Mob::GetActDoTDamage(uint16 spell_id, int32 value, Mob* target) {
if (IsNPC() && CastToNPC()->GetSpellScale())
value = int(static_cast<float>(value) * CastToNPC()->GetSpellScale() / 100.0f);
if (RuleB(Combat, CustomScaling) && IsClient()) {
int scale_value = itembonuses.INT;
float spell_damage_scale = RuleR(Combat, CustomScalingSpellDamage);
if (scale_value > spell_damage_scale) {
value = int(static_cast<float>(value) * static_cast<float>(scale_value / spell_damage_scale));
}
}
return value;
}
@@ -315,6 +331,14 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
MessageString(Chat::SpellCrit, YOU_CRIT_HEAL, itoa(value));
}
if (RuleB(Combat, CustomScaling) && IsClient()) {
int scale_value = itembonuses.WIS;
float spell_damage_scale = RuleR(Combat, CustomScalingSpellDamage);
if (scale_value > int(spell_damage_scale)) {
value = int(static_cast<float>(value) * static_cast<float>(scale_value / spell_damage_scale));
}
}
return value;
}
@@ -335,6 +359,14 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
if (IsNPC() && CastToNPC()->GetHealScale())
value = int(static_cast<float>(value) * CastToNPC()->GetHealScale() / 100.0f);
if (RuleB(Combat, CustomScaling) && IsClient()) {
int scale_value = itembonuses.WIS;
float spell_healing_scale = RuleR(Combat, CustomScalingSpellHealing);
if (scale_value > int(spell_healing_scale)) {
value = int(static_cast<float>(value) * static_cast<float>(scale_value / spell_healing_scale));
}
}
return value;
}