Update to SE_NegateAttack, 'max' value can now set upper limit of damage absorbed.

DOT ticks will no longer be absorbed.
This commit is contained in:
KayenEQ 2014-06-22 10:30:18 -04:00 committed by Arthur Ice
parent ef7e107443
commit 6821dc27f5
4 changed files with 14 additions and 4 deletions

View File

@ -13,6 +13,7 @@ Kayen: Implemented SE_Vampirsm (Stackable lifetap from melee effect) *Not used i
Kayen: Minor fixes to how lifetap from melee effects are calced. Removed arbitrary hard cap of 100%, Negative value will now dmg client. Kayen: Minor fixes to how lifetap from melee effects are calced. Removed arbitrary hard cap of 100%, Negative value will now dmg client.
Kayen: Fix to issue that prevented NPC's from receiving HP Regeneration derived from spell buffs. Kayen: Fix to issue that prevented NPC's from receiving HP Regeneration derived from spell buffs.
Kayen: Fixes and Updates for melee and spell mitigation runes. Kayen: Fixes and Updates for melee and spell mitigation runes.
Kayen: Update to SE_NegateAttack, 'max' value can now set upper limit of damage absorbed. DOT ticks will no longer be absorbed.
== 06/13/2014 == == 06/13/2014 ==
Kayen: For table 'npc_spell_effects_entries' setting se_max for damage shield effects (59) will now determine the DS Type (ie burning) Kayen: For table 'npc_spell_effects_entries' setting se_max for damage shield effects (59) will now determine the DS Type (ie burning)

View File

@ -3176,6 +3176,10 @@ int32 Mob::ReduceDamage(int32 damage)
if(!TryFadeEffect(slot)) if(!TryFadeEffect(slot))
BuffFadeBySlot(slot , true); BuffFadeBySlot(slot , true);
} }
if (spellbonuses.NegateAttacks[2] && (damage > spellbonuses.NegateAttacks[2]))
damage -= spellbonuses.NegateAttacks[2];
else
return -6; return -6;
} }
} }
@ -3272,7 +3276,7 @@ int32 Mob::AffectMagicalDamage(int32 damage, uint16 spell_id, const bool iBuffTi
int32 slot = -1; int32 slot = -1;
// See if we block the spell outright first // See if we block the spell outright first
if (spellbonuses.NegateAttacks[0]){ if (!iBuffTic && spellbonuses.NegateAttacks[0]){
slot = spellbonuses.NegateAttacks[1]; slot = spellbonuses.NegateAttacks[1];
if(slot >= 0) { if(slot >= 0) {
if(--buffs[slot].numhits == 0) { if(--buffs[slot].numhits == 0) {
@ -3280,6 +3284,10 @@ int32 Mob::AffectMagicalDamage(int32 damage, uint16 spell_id, const bool iBuffTi
if(!TryFadeEffect(slot)) if(!TryFadeEffect(slot))
BuffFadeBySlot(slot , true); BuffFadeBySlot(slot , true);
} }
if (spellbonuses.NegateAttacks[2] && (damage > spellbonuses.NegateAttacks[2]))
damage -= spellbonuses.NegateAttacks[2];
else
return 0; return 0;
} }
} }

View File

@ -2294,6 +2294,7 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* ne
if (!newbon->NegateAttacks[0]){ if (!newbon->NegateAttacks[0]){
newbon->NegateAttacks[0] = 1; newbon->NegateAttacks[0] = 1;
newbon->NegateAttacks[1] = buffslot; newbon->NegateAttacks[1] = buffslot;
newbon->NegateAttacks[2] = max;
} }
break; break;
} }

View File

@ -328,7 +328,7 @@ struct StatBonuses {
uint16 FocusEffects[HIGHEST_FOCUS+1]; // Stores the focus effectid for each focustype you have. uint16 FocusEffects[HIGHEST_FOCUS+1]; // Stores the focus effectid for each focustype you have.
bool NegateEffects; // Check if you contain a buff with negate effect. (only spellbonuses) bool NegateEffects; // Check if you contain a buff with negate effect. (only spellbonuses)
int16 SkillDamageAmount2[HIGHEST_SKILL+2]; // Adds skill specific damage int16 SkillDamageAmount2[HIGHEST_SKILL+2]; // Adds skill specific damage
uint16 NegateAttacks[2]; // 0 = bool HasEffect 1 = Buff Slot uint16 NegateAttacks[3]; // 0 = bool HasEffect 1 = Buff Slot 2 = Max damage absorbed per hit
uint16 MitigateMeleeRune[4]; // 0 = Mitigation value 1 = Buff Slot 2 = Max mitigation per hit 3 = Rune Amt uint16 MitigateMeleeRune[4]; // 0 = Mitigation value 1 = Buff Slot 2 = Max mitigation per hit 3 = Rune Amt
uint16 MeleeThresholdGuard[3]; // 0 = Mitigation value 1 = Buff Slot 2 = Min damage to trigger. uint16 MeleeThresholdGuard[3]; // 0 = Mitigation value 1 = Buff Slot 2 = Min damage to trigger.
uint16 SpellThresholdGuard[3]; // 0 = Mitigation value 1 = Buff Slot 2 = Min damage to trigger. uint16 SpellThresholdGuard[3]; // 0 = Mitigation value 1 = Buff Slot 2 = Min damage to trigger.