EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   Mounted Out of Combated Regeration (Complete) (https://www.eqemulator.org/forums/showthread.php?t=33585)

Sikkun 05-18-2011 02:50 PM

Mounted Out of Combated Regeration (Complete)
 
Zone
client_packet.cpp
void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) method
Insert code after // Break Hide if moving without sneaking and set rewind timer if moved
code block.

Code:

//allow player to have OOC regeneration on a mount
        if(ppu->y_pos == y_pos || ppu->x_pos == x_pos)
        {
                if(GetHorseId() != 0)
                {
                        playeraction = 1;
                }
        }
        else if(ppu->y_pos != y_pos || ppu->x_pos != x_pos)
        {
                if(GetHorseId() != 0)
                {
                        playeraction = 0;
                }
        }

Zone
client_packet.cpp
void Client::Handle_OP_AAAction(const EQApplicationPacket *app) method
insert code before mlog(AA__IN, "Received OP_AAAction");

Code:

//check if you are on a mount
        if (GetHorseId() != 0)
        {
                playeraction = 0;
        }

Zone
horse.cpp
void Client::SetHorseId(int16 horseid_in) method

Code:

void Client::SetHorseId(int16 horseid_in) {
        //if its the same, do nothing
        if(horseId == horseid_in)
                return;
       
        //otherwise it changed.
        //if we have a horse, get rid of it no matter what.
        if(horseId) {
                Mob *horse = entity_list.GetMob(horseId);
                if(horse != NULL)
                {
                        horse->Depop();
                        //set player to standing
                        playeraction = 0;
                }
        }
       
        //now we take whatever they gave us.
        horseId = horseid_in;
}



All times are GMT -4. The time now is 04:25 AM.

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