Kayen: Implemented SE_ReduceHealing (Reduces amount of healing on target by X amount)

Kayen: Implemented SE_CastonFocusEffect (Triggers spell as part of a focus, when that focus effect is used)
Kayen: Implemented SE_IncreaseHitDmgTaken (Effect is triggered when X amount of damage is taken)
Kayen: More fixes for various spell triggers/procs to now properly use their resist modifier.
This commit is contained in:
KayenEQ
2013-12-15 03:15:39 -05:00
parent b9c270fab6
commit 52722dc0c8
8 changed files with 79 additions and 26 deletions
+31
View File
@@ -2804,6 +2804,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
case SE_SpellVulnerability:
case SE_SpellTrigger:
case SE_ApplyEffect:
case SE_ApplyEffect2:
case SE_Twincast:
case SE_DelayDeath:
case SE_InterruptCasting:
@@ -2892,6 +2893,9 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
case SE_ChannelChanceItems:
case SE_CriticalHealRate:
case SE_IncreaseNumHits:
case SE_CastonFocusEffect:
case SE_ReduceHeal:
case SE_IncreaseHitDmgTaken:
{
break;
}
@@ -4266,6 +4270,14 @@ int16 Client::CalcAAFocus(focusType type, uint32 aa_ID, uint16 spell_id)
break;
}
case SE_ReduceHeal:
{
if(type == focusReduceHeal)
value = base1;
break;
}
case SE_CriticalHealRate:
{
if (type == focusCriticalHealRate)
@@ -4351,6 +4363,7 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
int lvldiff = 0;
bool LimitSpellSkill = false;
bool SpellSkill_Found = false;
uint32 Caston_spell_id = 0;
for (int i = 0; i < EFFECT_COUNT; i++) {
@@ -4511,6 +4524,11 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
return 0;
break;
case SE_CastonFocusEffect:
if (focus_spell.base[i] > 0)
Caston_spell_id = focus_spell.base[i];
break;
//handle effects
case SE_ImprovedDamage:
// No Spell used this, its handled by different spell effect IDs.
@@ -4732,6 +4750,14 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
break;
}
case SE_ReduceHeal:
{
if(type == focusReduceHeal)
value = focus_spell.base[i];
break;
}
case SE_CriticalHealRate:
{
if (type == focusCriticalHealRate)
@@ -4799,6 +4825,11 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
if ((LimitSpellSkill) && (!SpellSkill_Found))
return 0;
if (Caston_spell_id){
if(IsValidSpell(Caston_spell_id) && (Caston_spell_id != spell_id))
SpellFinished(Caston_spell_id, this, 10, 0, -1, spells[Caston_spell_id].ResistDiff);
}
return(value*lvlModifier/100);
}