mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Changed the pet command #defines to be based on RoF2 list of pet commands and added decodes to Titanium, SoF and SoD.
(RoF+) The /pet focus on/off and /pet hold on/off commands are now functional. Added more toggle and on/off support for pet commands.
This commit is contained in:
+58
-11
@@ -9925,12 +9925,14 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
uint32 PetCommand = pet->command;
|
||||
|
||||
// Handle Sit/Stand toggle in UF and later.
|
||||
/*
|
||||
if (GetClientVersion() >= EQClientUnderfoot)
|
||||
{
|
||||
if (PetCommand == PET_SITDOWN)
|
||||
if (mypet->GetPetOrder() == SPO_Sit)
|
||||
PetCommand = PET_STANDUP;
|
||||
}
|
||||
*/
|
||||
|
||||
switch (PetCommand)
|
||||
{
|
||||
@@ -10036,13 +10038,28 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
break;
|
||||
}
|
||||
case PET_TAUNT: {
|
||||
if ((mypet->GetPetType() == petAnimation && GetAA(aaAnimationEmpathy) >= 3) || mypet->GetPetType() != petAnimation) {
|
||||
if (mypet->CastToNPC()->IsTaunting())
|
||||
{
|
||||
Message_StringID(MT_PetResponse, PET_NO_TAUNT);
|
||||
mypet->CastToNPC()->SetTaunting(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
Message_StringID(MT_PetResponse, PET_DO_TAUNT);
|
||||
mypet->CastToNPC()->SetTaunting(true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PET_TAUNT_ON: {
|
||||
if ((mypet->GetPetType() == petAnimation && GetAA(aaAnimationEmpathy) >= 3) || mypet->GetPetType() != petAnimation) {
|
||||
Message_StringID(MT_PetResponse, PET_DO_TAUNT);
|
||||
mypet->CastToNPC()->SetTaunting(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PET_NOTAUNT: {
|
||||
case PET_TAUNT_OFF: {
|
||||
if ((mypet->GetPetType() == petAnimation && GetAA(aaAnimationEmpathy) >= 3) || mypet->GetPetType() != petAnimation) {
|
||||
Message_StringID(MT_PetResponse, PET_NO_TAUNT);
|
||||
mypet->CastToNPC()->SetTaunting(false);
|
||||
@@ -10060,16 +10077,25 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PET_SITDOWN: {
|
||||
case PET_SIT: {
|
||||
if (mypet->IsFeared()) break; //could be exploited like PET_BACKOFF
|
||||
|
||||
if ((mypet->GetPetType() == petAnimation && GetAA(aaAnimationEmpathy) >= 3) || mypet->GetPetType() != petAnimation) {
|
||||
mypet->Say_StringID(MT_PetResponse, PET_SIT_STRING);
|
||||
mypet->SetPetOrder(SPO_Sit);
|
||||
mypet->SetRunAnimSpeed(0);
|
||||
if (!mypet->UseBardSpellLogic()) //maybe we can have a bard pet
|
||||
mypet->InterruptSpell(); //No cast 4 u. //i guess the pet should start casting
|
||||
mypet->SendAppearancePacket(AT_Anim, ANIM_SIT);
|
||||
if (mypet->GetPetOrder() == SPO_Sit)
|
||||
{
|
||||
mypet->Say_StringID(MT_PetResponse, PET_SIT_STRING);
|
||||
mypet->SetPetOrder(SPO_Follow);
|
||||
mypet->SendAppearancePacket(AT_Anim, ANIM_STAND);
|
||||
}
|
||||
else
|
||||
{
|
||||
mypet->Say_StringID(MT_PetResponse, PET_SIT_STRING);
|
||||
mypet->SetPetOrder(SPO_Sit);
|
||||
mypet->SetRunAnimSpeed(0);
|
||||
if (!mypet->UseBardSpellLogic()) //maybe we can have a bard pet
|
||||
mypet->InterruptSpell(); //No cast 4 u. //i guess the pet should start casting
|
||||
mypet->SendAppearancePacket(AT_Anim, ANIM_SIT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -10083,6 +10109,19 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PET_SITDOWN: {
|
||||
if (mypet->IsFeared()) break; //could be exploited like PET_BACKOFF
|
||||
|
||||
if ((mypet->GetPetType() == petAnimation && GetAA(aaAnimationEmpathy) >= 3) || mypet->GetPetType() != petAnimation) {
|
||||
mypet->Say_StringID(MT_PetResponse, PET_SIT_STRING);
|
||||
mypet->SetPetOrder(SPO_Sit);
|
||||
mypet->SetRunAnimSpeed(0);
|
||||
if (!mypet->UseBardSpellLogic()) //maybe we can have a bard pet
|
||||
mypet->InterruptSpell(); //No cast 4 u. //i guess the pet should start casting
|
||||
mypet->SendAppearancePacket(AT_Anim, ANIM_SIT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PET_SLUMBER: {
|
||||
if (mypet->IsFeared()) break; //could be exploited like PET_BACKOFF
|
||||
|
||||
@@ -10101,9 +10140,16 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
if (mypet->IsFeared())
|
||||
break; //could be exploited like PET_BACKOFF
|
||||
|
||||
mypet->Say_StringID(MT_PetResponse, PET_ON_HOLD);
|
||||
mypet->WipeHateList();
|
||||
mypet->SetHeld(true);
|
||||
if (mypet->IsHeld())
|
||||
{
|
||||
mypet->SetHeld(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
mypet->Say_StringID(MT_PetResponse, PET_ON_HOLD);
|
||||
mypet->WipeHateList();
|
||||
mypet->SetHeld(true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -10123,6 +10169,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
mypet->SetHeld(false);
|
||||
break;
|
||||
}
|
||||
case PET_NOCAST_ON:
|
||||
case PET_NOCAST: {
|
||||
if (GetAA(aaAdvancedPetDiscipline) == 2 && mypet->IsNPC()) {
|
||||
if (mypet->IsFeared())
|
||||
|
||||
Reference in New Issue
Block a user