Explorar o código

NPCs aggro on unfriendly spell casted on them

Fix #89 -- need further review on how much hate should be added by the spell
Image %!s(int64=4) %!d(string=hai) anos
pai
achega
c1c6fc8d2d
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      EQ2/source/WorldServer/SpellProcess.cpp

+ 4 - 0
EQ2/source/WorldServer/SpellProcess.cpp

@@ -1306,6 +1306,10 @@ bool SpellProcess::CastProcessedSpell(LuaSpell* spell, bool passive){
 			if (client && client->IsZoning())
 				continue;
 
+			// TODO: Establish actual hate per spell
+			if (!spell->spell->GetSpellData()->friendly_spell && target->IsNPC())
+				((NPC*)target)->AddHate((Entity*)spell->caster, 50);
+
 			if(spell->spell->GetSpellData()->success_message.length() > 0){
 				if(client){
 					string success_message = spell->spell->GetSpellData()->success_message;