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
+36
View File
@@ -2732,6 +2732,22 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
break;
}
case SE_Sanctuary:
{
std::list<NPC*> npc_list;
entity_list.GetNPCList(npc_list);
for(std::list<NPC*>::iterator itr = npc_list.begin(); itr != npc_list.end(); ++itr) {
NPC* npc = *itr;
if (npc && npc->CheckAggro(this))
npc->SetHate(caster, 1);
}
break;
}
// Handled Elsewhere
case SE_ImmuneFleeing:
case SE_NegateSpellEffect:
@@ -2960,6 +2976,10 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
case SE_Berserk:
case SE_Vampirism:
case SE_Metabolism:
case SE_FinishingBlow:
case SE_FinishingBlowLvl:
case SE_Assassinate:
case SE_AssassinateLevel:
{
break;
}
@@ -3604,6 +3624,22 @@ void Mob::DoBuffTic(uint16 spell_id, int slot, uint32 ticsremaining, uint8 caste
break;
}
case SE_Sanctuary:
{
std::list<NPC*> npc_list;
entity_list.GetNPCList(npc_list);
for(std::list<NPC*>::iterator itr = npc_list.begin(); itr != npc_list.end(); ++itr) {
NPC* npc = *itr;
if (npc && npc->CheckAggro(this))
npc->SetHate(caster, 1);
}
break;
}
default:
{
// do we need to do anyting here?