PDA

View Full Version : Mounted Out of Combated Regeration (Complete)


Sikkun
05-18-2011, 02:50 PM
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.

//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");

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


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

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;
}