It looks like this was merged correctly, so unfortunately we can't blame it on you this time cd
Code:
Index: spell_effects.cpp
===================================================================
--- spell_effects.cpp (revision 112)
+++ spell_effects.cpp (revision 113)
@@ -1763,6 +1763,7 @@
CastToClient()->cheat_timer.Start(3500, false);
CastToClient()->MovePC(zone->GetZoneID(), caster->GetX(), caster->GetY(), caster->GetZ(), caster->GetHeading(), 2, SummonPC);
Message(15, "You have been summoned!");
+ WipeHateList();
}
else
caster->Message(13, "This spell can only be cast on players.");
The issue is that we're wiping the hate list for the client it's being cast on, and not from the mobs that have them on their hate list.
To wipe from the mob hate list, I think we can use EntityList::ClearFeignAggro & EntityList::ClearZoneFeignAggro:
Code:
case SE_SummonPC:
{
if(IsClient()){
CastToClient()->cheat_timer.Start(3500, false);
CastToClient()->MovePC(zone->GetZoneID(), caster->GetX(), caster->GetY(), caster->GetZ(), caster->GetHeading(), 2, SummonPC);
Message(15, "You have been summoned!");
entity_list.ClearFeignAggro(CastToClient()); //clear aggro just like FD
entity_list.ClearZoneFeignAggro(CastToClient()); //clear any aggro that didn't succeed from FD
WipeHateList(); //wipe client's hate list
}
else
caster->Message(13, "This spell can only be cast on players.");
break;
}
Ideally, we might want to make a new function, EntityList::ClearZoneAggro(), that just does what both of the 2 do, but in 1 function:
Code:
void EntityList::ClearZoneAggro(Client* targ)
{
LinkedListIterator<NPC*> iterator(npc_list);
iterator.Reset();
while(iterator.MoreElements())
{
if (iterator.GetData()->CheckAggro(targ))
iterator.GetData()->RemoveFromHateList(targ);
iterator.GetData()->RemoveFromFeignMemory(targ);
iterator.Advance();
}
}
Anyone wanna give this a shot?