Implemented SE_Sanctuary - Places caster at bottom hate list,

effect fades if caster cast spell on targets other than self.
This commit is contained in:
KayenEQ
2014-07-02 08:42:18 -04:00
parent bd86e70766
commit ee6d7ae6ba
6 changed files with 53 additions and 2 deletions
+3
View File
@@ -183,6 +183,9 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
CastToNPC()->AI_Event_SpellCastFinished(false, casting_spell_slot);
return(false);
}
//It appears that the Sanctuary effect is removed by a check on the client side (keep this however for redundancy)
if (spellbonuses.Sanctuary && (spells[spell_id].targettype != ST_Self && GetTarget() != this) || IsDetrimentalSpell(spell_id))
BuffFadeByEffect(SE_Sanctuary);
if(IsClient()){
int chance = CastToClient()->GetFocusEffect(focusFcMute, spell_id);