PDA

View Full Version : Game Mechanics: Mobs summoning after evac change your next spawn to summon point.


Loly Taa
04-12-2011, 10:15 PM
I've noticed this before but it's only really become a problem now that groups have to evac out of bad situations more than before.

Lets say you aggro and damage until summon an npc, your group then evacs successfully- Every once in a while someone ends up "missing" the evac because they got summoned as/after the evac happened. I figured it was because of the way the summon code was written, and if yours is similar to the code in the EQEmulator SVN, I think I know why.

if(target)
{
if (target->IsClient())
target->CastToClient()->Message(15,"You have been summoned!");
entity_list.MessageClose(this, true, 500, 10, "%s says,'You will not evade me, %s!' ", GetCleanName(), GetHateTop()->GetCleanName() );

// RangerDown - GMMove doesn't seem to be working well with players, so use MovePC for them, GMMove for NPC's
if (target->IsClient()) {
target->CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), x_pos, y_pos, z_pos, target->GetHeading(), 0, SummonPC);
}
else
GetHateTop()->GMMove(x_pos, y_pos, z_pos, target->GetHeading());

return true;
}

Essentially the bolded part above checks to see if the target is a client, and if so it calls MovePC, and I assume when it passes zone->GetZoneID() it passes the zone id of the zone that npc is currently in. Thing is, if the player is already gone and it executes this function it will change their next spawn point from their intended evac/gate/port location and change it to right next to the npc.

I figure, you can either make a new MovePC function that simply does not overwrite their current zone, but then players would be appearing at random locs in their evac'd zone instead of the same loc in the same zone as the npc that summoned them.

I don't know the codebase well anymore but if someone could add a check to make sure the summon target is not only a client, but also still in the zone- you'd save a decent amount of petitions from players affected by this bug. I'm nearly positive it's not classic, just a quirk of the EQEmu codebase.

EDIT;

On second thought, you also might be able to write a function to check the player's current intended zone (in the database) before summon, and if it is not equal to the zone the npc is in then fail the summon.

Blingx
04-13-2011, 12:50 AM
It is my guess that if the player is currently zoning/zoned then the condition you highlighted should fail regardless I believe. Maybe the mob's hatelist is not being properly cleared after an evac/gate/succor/w.e?


Second Thought: The entire block you quoted should not execute after a zone/gate/port. Fixing how it got through the first condition might be better than rewriting/making a new function.
Maybe the "target" variable is not being reset correctly.

Loly Taa
04-13-2011, 12:15 PM
I happened to be pretty wasted when I decided to try poking through the SVN last night but yeah, you might be more spot on about it not clearing hate list properly. The first thing that came to me after searching the summon code was just changing that function. I didn't read much up or down in the source to see what component was actually triggering that code block.