mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-20 18:38:27 +00:00
Kayen: Implemented SE_ArcheryDoubleAttack (Chance to do an extra archery attack)
Kayen: Implemented SE_ShieldEquipDmgMod (Increase damage in primary hand if shield equiped) Kayen: Implemented SE_ShieldEquipHateMod (Increase hate generated if shield equiped) Kayen: Implemented SE_TriggerOnAmountValue (Trigger spell if HP/Mana/End bellow X value or num pet on target)
This commit is contained in:
+20
-3
@@ -180,6 +180,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
|
||||
if (caster && caster->IsClient())
|
||||
numhit += caster->CastToClient()->GetFocusEffect(focusIncreaseNumHits, spell_id);
|
||||
|
||||
buffs[buffslot].numhits = numhit;
|
||||
}
|
||||
|
||||
@@ -467,6 +468,9 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
#endif
|
||||
SetMana(GetMana() + effect_value);
|
||||
caster->SetMana(caster->GetMana() + abs(effect_value));
|
||||
|
||||
if (effect_value < 0)
|
||||
TryTriggerOnValueAmount(false, true);
|
||||
#ifdef SPELL_EFFECT_SPAM
|
||||
caster->Message(0, "You have gained %+i mana!", effect_value);
|
||||
#endif
|
||||
@@ -480,6 +484,8 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
break;
|
||||
|
||||
SetMana(GetMana() + effect_value);
|
||||
if (effect_value < 0)
|
||||
TryTriggerOnValueAmount(false, true);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -2366,6 +2372,8 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
#endif
|
||||
if(IsClient()) {
|
||||
CastToClient()->SetEndurance(CastToClient()->GetEndurance() + effect_value);
|
||||
if (effect_value < 0)
|
||||
TryTriggerOnValueAmount(false, false, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2378,6 +2386,8 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
|
||||
if(IsClient()) {
|
||||
CastToClient()->SetEndurance(CastToClient()->GetEndurance() + effect_value);
|
||||
if (effect_value < 0)
|
||||
TryTriggerOnValueAmount(false, false, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2549,7 +2559,8 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
int mana_damage = 0;
|
||||
int32 mana_to_use = GetMana() - spell.base[i];
|
||||
if(mana_to_use > -1) {
|
||||
SetMana(GetMana() - spell.base[i]);
|
||||
SetMana(GetMana() - spell.base[i]);
|
||||
TryTriggerOnValueAmount(false, true);
|
||||
// we take full dmg(-10 to make the damage the right sign)
|
||||
mana_damage = spell.base[i] / -10 * spell.base2[i];
|
||||
Damage(caster, mana_damage, spell_id, spell.skill, false, i, true);
|
||||
@@ -2569,6 +2580,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
int32 end_to_use = CastToClient()->GetEndurance() - spell.base[i];
|
||||
if(end_to_use > -1) {
|
||||
CastToClient()->SetEndurance(CastToClient()->GetEndurance() - spell.base[i]);
|
||||
TryTriggerOnValueAmount(false, false, true);
|
||||
// we take full dmg(-10 to make the damage the right sign)
|
||||
end_damage = spell.base[i] / -10 * spell.base2[i];
|
||||
Damage(caster, end_damage, spell_id, spell.skill, false, i, true);
|
||||
@@ -2650,6 +2662,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
else {
|
||||
dmg = ratio*max_mana/10;
|
||||
caster->SetMana(caster->GetMana() - max_mana);
|
||||
TryTriggerOnValueAmount(false, true);
|
||||
}
|
||||
|
||||
if(IsDetrimentalSpell(spell_id)) {
|
||||
@@ -2896,6 +2909,10 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
case SE_CastonFocusEffect:
|
||||
case SE_ReduceHeal:
|
||||
case SE_IncreaseHitDmgTaken:
|
||||
case SE_ArcheryDoubleAttack:
|
||||
case SE_ShieldEquipHateMod:
|
||||
case SE_ShieldEquipDmgMod:
|
||||
case SE_TriggerOnValueAmount:
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -3772,7 +3789,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
||||
SetBodyType(GetOrigBodyType(), false);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case SE_MovementSpeed:
|
||||
{
|
||||
if(IsClient())
|
||||
@@ -5206,7 +5223,7 @@ bool Mob::CheckHitsRemaining(uint32 buff_slot, bool when_spell_done, bool negate
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// For spell buffs that are limited by the number of times it can successfully trigger a spell.
|
||||
// Effects: SE_TriggerOnCast, SE_SympatheticProc,SE_DefensiveProc, SE_SkillProc, SE_RangedProc
|
||||
if(spell_id){
|
||||
|
||||
Reference in New Issue
Block a user