mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-03 03:50:40 +00:00
[Pets] Add Pet Constants and Methods (#4987)
* [Pets] Add Pet Constants and Methods * Remove GetID * GetPetTypeName() * Cleanup
This commit is contained in:
+18
-15
@@ -6415,17 +6415,17 @@ void Client::SuspendMinion(int value)
|
||||
// TODO: These pet command states need to be synced ...
|
||||
// Will just fix them for now
|
||||
if (m_ClientVersionBit & EQ::versions::maskUFAndLater) {
|
||||
SetPetCommandState(PET_BUTTON_SIT, 0);
|
||||
SetPetCommandState(PET_BUTTON_STOP, 0);
|
||||
SetPetCommandState(PET_BUTTON_REGROUP, 0);
|
||||
SetPetCommandState(PET_BUTTON_FOLLOW, 1);
|
||||
SetPetCommandState(PET_BUTTON_GUARD, 0);
|
||||
SetPetCommandState(PetButton::Sit, PetButtonState::Off);
|
||||
SetPetCommandState(PetButton::Stop, PetButtonState::Off);
|
||||
SetPetCommandState(PetButton::Regroup, PetButtonState::Off);
|
||||
SetPetCommandState(PetButton::Follow, PetButtonState::On);
|
||||
SetPetCommandState(PetButton::Guard, PetButtonState::Off);
|
||||
// Taunt saved on client side for logging on with pet
|
||||
// In our db for when we zone.
|
||||
SetPetCommandState(PET_BUTTON_HOLD, 0);
|
||||
SetPetCommandState(PET_BUTTON_GHOLD, 0);
|
||||
SetPetCommandState(PET_BUTTON_FOCUS, 0);
|
||||
SetPetCommandState(PET_BUTTON_SPELLHOLD, 0);
|
||||
SetPetCommandState(PetButton::Hold, PetButtonState::Off);
|
||||
SetPetCommandState(PetButton::GreaterHold, PetButtonState::Off);
|
||||
SetPetCommandState(PetButton::Focus, PetButtonState::Off);
|
||||
SetPetCommandState(PetButton::SpellHold, PetButtonState::Off);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -6906,9 +6906,9 @@ void Client::CheckLDoNHail(NPC* n)
|
||||
|
||||
auto pet = GetPet();
|
||||
if (pet) {
|
||||
if (pet->GetPetType() == petCharmed) {
|
||||
if (pet->GetPetType() == PetType::Charmed) {
|
||||
pet->BuffFadeByEffect(SE_Charm);
|
||||
} else if (pet->GetPetType() == petNPCFollow) {
|
||||
} else if (pet->GetPetType() == PetType::Follow) {
|
||||
pet->SetOwnerID(0);
|
||||
} else {
|
||||
pet->Depop();
|
||||
@@ -9450,12 +9450,15 @@ void Client::ProcessAggroMeter()
|
||||
}
|
||||
}
|
||||
|
||||
void Client::SetPetCommandState(int button, int state)
|
||||
void Client::SetPetCommandState(uint8 button, uint8 state)
|
||||
{
|
||||
auto app = new EQApplicationPacket(OP_PetCommandState, sizeof(PetCommandState_Struct));
|
||||
auto pcs = (PetCommandState_Struct *)app->pBuffer;
|
||||
pcs->button_id = button;
|
||||
pcs->state = state;
|
||||
|
||||
auto s = (PetCommandState_Struct*) app->pBuffer;
|
||||
|
||||
s->button_id = button;
|
||||
s->state = state;
|
||||
|
||||
FastQueuePacket(&app);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user