EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Bug Reports (https://www.eqemulator.org/forums/forumdisplay.php?f=591)
-   -   Mobs don't summon players -- FIX INSIDE (https://www.eqemulator.org/forums/showthread.php?t=18003)

RangerDown 03-04-2005 06:40 PM

Mobs don't summon players -- FIX INSIDE
 
As of the latest CVS mobs will say "You will not evade me, Soandso!" and you get the message "You have been summoned!" But, you don't actually go to the mob.

Server side, it seems that it puts you by the mob like it should -- immediately after I get the summoned message I get a round of melee -- but for some reason the client doesn't get the message to actually go there.

The fix is a change to the code is in mob.cpp, in the function bool Mob::HateSummon()

Change this block of code:
Code:

    // get summon target
    target = GetHateTop();
    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!' ", GetName(), GetHateTop()->GetName() );
                GetHateTop()->GMMove(x_pos, y_pos, z_pos, target->GetHeading());
                return true;
        }
        return false;

to:

Code:

    // get summon target
    target = GetHateTop();
    if(target)
    {
        entity_list.MessageClose(this, true, 500, 10, "%s says,'You will not evade me, %s!' ", GetName(), target->GetName() );
        if (target->IsClient()) // RangerDown - GMMove doesn't seem to be working well with players, so use MovePC for them, GMMove for NPC's
                target->CastToClient()->MovePC(zone->GetZoneID(),x_pos,y_pos,z_pos,0,true);
        else
                GetHateTop()->GMMove(x_pos, y_pos, z_pos, target->GetHeading());
        return true;
    }
    return false;

For whatever reason, GMMove() seems quirky when used on player clients. So, I use MovePC() instead for clients, and GMMove() for NPC's.


All times are GMT -4. The time now is 01:48 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.