mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +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:
+2
-41
@@ -4518,47 +4518,8 @@ namespace RoF
|
||||
DECODE_LENGTH_EXACT(structs::PetCommand_Struct);
|
||||
SETUP_DIRECT_DECODE(PetCommand_Struct, structs::PetCommand_Struct);
|
||||
|
||||
switch (eq->command)
|
||||
{
|
||||
case 0x00:
|
||||
emu->command = 0x04; // Health
|
||||
break;
|
||||
case 0x01:
|
||||
emu->command = 0x10; // Leader
|
||||
break;
|
||||
case 0x02:
|
||||
emu->command = 0x07; // Attack
|
||||
break;
|
||||
case 0x04:
|
||||
emu->command = 0x08; // Follow
|
||||
break;
|
||||
case 0x05:
|
||||
emu->command = 0x05; // Guard
|
||||
break;
|
||||
case 0x06:
|
||||
emu->command = 0x09; // Sit. Needs work. This appears to be a toggle between Sit/Stand now.
|
||||
break;
|
||||
case 0x0c:
|
||||
emu->command = 0x0b; // Taunt
|
||||
break;
|
||||
case 0x0f:
|
||||
emu->command = 0x0c; // Hold
|
||||
break;
|
||||
case 0x10:
|
||||
emu->command = 0x1b; // Hold on
|
||||
break;
|
||||
case 0x11:
|
||||
emu->command = 0x1c; // Hold off
|
||||
break;
|
||||
case 0x1c:
|
||||
emu->command = 0x01; // Back
|
||||
break;
|
||||
case 0x1d:
|
||||
emu->command = 0x02; // Leave/Go Away
|
||||
break;
|
||||
default:
|
||||
emu->command = eq->command;
|
||||
}
|
||||
IN(command);
|
||||
emu->unknown = eq->unknown04;
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
|
||||
+2
-41
@@ -4589,47 +4589,8 @@ namespace RoF2
|
||||
DECODE_LENGTH_EXACT(structs::PetCommand_Struct);
|
||||
SETUP_DIRECT_DECODE(PetCommand_Struct, structs::PetCommand_Struct);
|
||||
|
||||
switch (eq->command)
|
||||
{
|
||||
case 0x00:
|
||||
emu->command = 0x04; // Health
|
||||
break;
|
||||
case 0x01:
|
||||
emu->command = 0x10; // Leader
|
||||
break;
|
||||
case 0x02:
|
||||
emu->command = 0x07; // Attack
|
||||
break;
|
||||
case 0x04:
|
||||
emu->command = 0x08; // Follow
|
||||
break;
|
||||
case 0x05:
|
||||
emu->command = 0x05; // Guard
|
||||
break;
|
||||
case 0x06:
|
||||
emu->command = 0x09; // Sit. Needs work. This appears to be a toggle between Sit/Stand now.
|
||||
break;
|
||||
case 0x0c:
|
||||
emu->command = 0x0b; // Taunt
|
||||
break;
|
||||
case 0x0f:
|
||||
emu->command = 0x0c; // Hold
|
||||
break;
|
||||
case 0x10:
|
||||
emu->command = 0x1b; // Hold on
|
||||
break;
|
||||
case 0x11:
|
||||
emu->command = 0x1c; // Hold off
|
||||
break;
|
||||
case 0x1c:
|
||||
emu->command = 0x01; // Back
|
||||
break;
|
||||
case 0x1d:
|
||||
emu->command = 0x02; // Leave/Go Away
|
||||
break;
|
||||
default:
|
||||
emu->command = eq->command;
|
||||
}
|
||||
IN(command);
|
||||
emu->unknown = eq->unknown04;
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
|
||||
@@ -3105,6 +3105,87 @@ namespace SoD
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
|
||||
DECODE(OP_PetCommands)
|
||||
{
|
||||
DECODE_LENGTH_EXACT(structs::PetCommand_Struct);
|
||||
SETUP_DIRECT_DECODE(PetCommand_Struct, structs::PetCommand_Struct);
|
||||
|
||||
switch (eq->command)
|
||||
{
|
||||
case 0x04:
|
||||
emu->command = 0x00; // /pet health
|
||||
break;
|
||||
case 0x10:
|
||||
emu->command = 0x01; // /pet leader
|
||||
break;
|
||||
case 0x07:
|
||||
emu->command = 0x02; // /pet attack or Pet Window
|
||||
break;
|
||||
case 0x08:
|
||||
emu->command = 0x04; // /pet follow or Pet Window
|
||||
break;
|
||||
case 0x05:
|
||||
emu->command = 0x05; // /pet guard or Pet Window
|
||||
break;
|
||||
case 0x09:
|
||||
emu->command = 0x07; // /pet sit or Pet Window
|
||||
break;
|
||||
case 0x0a:
|
||||
emu->command = 0x08; // /pet stand or Pet Window
|
||||
break;
|
||||
case 0x06:
|
||||
emu->command = 0x03; // /pet guard me
|
||||
break;
|
||||
case 0x03: // Case Made Up
|
||||
emu->command = 0x09; // Stop?
|
||||
break;
|
||||
case 0x0b:
|
||||
emu->command = 0x0d; // /pet taunt or Pet Window
|
||||
break;
|
||||
case 0x0e:
|
||||
emu->command = 0x0e; // /pet notaunt or Pet Window
|
||||
break;
|
||||
case 0x0c:
|
||||
emu->command = 0x0f; // /pet hold
|
||||
break;
|
||||
case 0x1b:
|
||||
emu->command = 0x10; // /pet hold on
|
||||
break;
|
||||
case 0x1c:
|
||||
emu->command = 0x11; // /pet hold off
|
||||
break;
|
||||
case 0x11:
|
||||
emu->command = 0x12; // Slumber?
|
||||
break;
|
||||
case 0x12:
|
||||
emu->command = 0x15; // /pet no cast
|
||||
break;
|
||||
case 0x0d: // Case Made Up
|
||||
emu->command = 0x16; // Pet Window No Cast
|
||||
break;
|
||||
case 0x13:
|
||||
emu->command = 0x18; // /pet focus
|
||||
break;
|
||||
case 0x19:
|
||||
emu->command = 0x19; // /pet focus on
|
||||
break;
|
||||
case 0x1a:
|
||||
emu->command = 0x1a; // /pet focus off
|
||||
break;
|
||||
case 0x01:
|
||||
emu->command = 0x1c; // /pet back off
|
||||
break;
|
||||
case 0x02:
|
||||
emu->command = 0x1d; // /pet get lost
|
||||
break;
|
||||
default:
|
||||
emu->command = eq->command;
|
||||
}
|
||||
OUT(unknown);
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
|
||||
DECODE(OP_RaidInvite)
|
||||
{
|
||||
DECODE_LENGTH_ATLEAST(structs::RaidGeneral_Struct);
|
||||
|
||||
@@ -104,6 +104,7 @@ D(OP_ItemVerifyRequest)
|
||||
D(OP_LoadSpellSet)
|
||||
D(OP_LootItem)
|
||||
D(OP_MoveItem)
|
||||
D(OP_PetCommands)
|
||||
D(OP_RaidInvite)
|
||||
D(OP_ReadBook)
|
||||
D(OP_Save)
|
||||
|
||||
@@ -2443,6 +2443,87 @@ namespace SoF
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
|
||||
DECODE(OP_PetCommands)
|
||||
{
|
||||
DECODE_LENGTH_EXACT(structs::PetCommand_Struct);
|
||||
SETUP_DIRECT_DECODE(PetCommand_Struct, structs::PetCommand_Struct);
|
||||
|
||||
switch (eq->command)
|
||||
{
|
||||
case 0x04:
|
||||
emu->command = 0x00; // /pet health
|
||||
break;
|
||||
case 0x10:
|
||||
emu->command = 0x01; // /pet leader
|
||||
break;
|
||||
case 0x07:
|
||||
emu->command = 0x02; // /pet attack or Pet Window
|
||||
break;
|
||||
case 0x08:
|
||||
emu->command = 0x04; // /pet follow or Pet Window
|
||||
break;
|
||||
case 0x05:
|
||||
emu->command = 0x05; // /pet guard or Pet Window
|
||||
break;
|
||||
case 0x09:
|
||||
emu->command = 0x07; // /pet sit or Pet Window
|
||||
break;
|
||||
case 0x0a:
|
||||
emu->command = 0x08; // /pet stand or Pet Window
|
||||
break;
|
||||
case 0x06:
|
||||
emu->command = 0x03; // /pet guard me
|
||||
break;
|
||||
case 0x03: // Case Made Up
|
||||
emu->command = 0x09; // Stop?
|
||||
break;
|
||||
case 0x0b:
|
||||
emu->command = 0x0d; // /pet taunt or Pet Window
|
||||
break;
|
||||
case 0x0e:
|
||||
emu->command = 0x0e; // /pet notaunt or Pet Window
|
||||
break;
|
||||
case 0x0c:
|
||||
emu->command = 0x0f; // /pet hold
|
||||
break;
|
||||
case 0x1b:
|
||||
emu->command = 0x10; // /pet hold on
|
||||
break;
|
||||
case 0x1c:
|
||||
emu->command = 0x11; // /pet hold off
|
||||
break;
|
||||
case 0x11:
|
||||
emu->command = 0x12; // Slumber?
|
||||
break;
|
||||
case 0x12:
|
||||
emu->command = 0x15; // /pet no cast
|
||||
break;
|
||||
case 0x0d: // Case Made Up
|
||||
emu->command = 0x16; // Pet Window No Cast
|
||||
break;
|
||||
case 0x13:
|
||||
emu->command = 0x18; // /pet focus
|
||||
break;
|
||||
case 0x19:
|
||||
emu->command = 0x19; // /pet focus on
|
||||
break;
|
||||
case 0x1a:
|
||||
emu->command = 0x1a; // /pet focus off
|
||||
break;
|
||||
case 0x01:
|
||||
emu->command = 0x1c; // /pet back off
|
||||
break;
|
||||
case 0x02:
|
||||
emu->command = 0x1d; // /pet get lost
|
||||
break;
|
||||
default:
|
||||
emu->command = eq->command;
|
||||
}
|
||||
OUT(unknown);
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
|
||||
DECODE(OP_RaidInvite)
|
||||
{
|
||||
DECODE_LENGTH_ATLEAST(structs::RaidGeneral_Struct);
|
||||
|
||||
@@ -88,6 +88,7 @@ D(OP_ItemLinkClick)
|
||||
D(OP_ItemVerifyRequest)
|
||||
D(OP_LootItem)
|
||||
D(OP_MoveItem)
|
||||
D(OP_PetCommands)
|
||||
D(OP_RaidInvite)
|
||||
D(OP_ReadBook)
|
||||
D(OP_Save)
|
||||
|
||||
@@ -1637,6 +1637,87 @@ namespace Titanium
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
|
||||
DECODE(OP_PetCommands)
|
||||
{
|
||||
DECODE_LENGTH_EXACT(structs::PetCommand_Struct);
|
||||
SETUP_DIRECT_DECODE(PetCommand_Struct, structs::PetCommand_Struct);
|
||||
|
||||
switch (eq->command)
|
||||
{
|
||||
case 0x04:
|
||||
emu->command = 0x00; // /pet health
|
||||
break;
|
||||
case 0x10:
|
||||
emu->command = 0x01; // /pet leader
|
||||
break;
|
||||
case 0x07:
|
||||
emu->command = 0x02; // /pet attack or Pet Window
|
||||
break;
|
||||
case 0x08:
|
||||
emu->command = 0x04; // /pet follow or Pet Window
|
||||
break;
|
||||
case 0x05:
|
||||
emu->command = 0x05; // /pet guard or Pet Window
|
||||
break;
|
||||
case 0x09:
|
||||
emu->command = 0x07; // /pet sit or Pet Window
|
||||
break;
|
||||
case 0x0a:
|
||||
emu->command = 0x08; // /pet stand or Pet Window
|
||||
break;
|
||||
case 0x06:
|
||||
emu->command = 0x03; // /pet guard me
|
||||
break;
|
||||
case 0x03: // Case Made Up
|
||||
emu->command = 0x09; // Stop?
|
||||
break;
|
||||
case 0x0b:
|
||||
emu->command = 0x0d; // /pet taunt or Pet Window
|
||||
break;
|
||||
case 0x0e:
|
||||
emu->command = 0x0e; // /pet notaunt or Pet Window
|
||||
break;
|
||||
case 0x0c:
|
||||
emu->command = 0x0f; // /pet hold
|
||||
break;
|
||||
case 0x1b:
|
||||
emu->command = 0x10; // /pet hold on
|
||||
break;
|
||||
case 0x1c:
|
||||
emu->command = 0x11; // /pet hold off
|
||||
break;
|
||||
case 0x11:
|
||||
emu->command = 0x12; // Slumber?
|
||||
break;
|
||||
case 0x12:
|
||||
emu->command = 0x15; // /pet no cast
|
||||
break;
|
||||
case 0x0d: // Case Made Up
|
||||
emu->command = 0x16; // Pet Window No Cast
|
||||
break;
|
||||
case 0x13:
|
||||
emu->command = 0x18; // /pet focus
|
||||
break;
|
||||
case 0x19:
|
||||
emu->command = 0x19; // /pet focus on
|
||||
break;
|
||||
case 0x1a:
|
||||
emu->command = 0x1a; // /pet focus off
|
||||
break;
|
||||
case 0x01:
|
||||
emu->command = 0x1c; // /pet back off
|
||||
break;
|
||||
case 0x02:
|
||||
emu->command = 0x1d; // /pet get lost
|
||||
break;
|
||||
default:
|
||||
emu->command = eq->command;
|
||||
}
|
||||
OUT(unknown);
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
|
||||
DECODE(OP_ReadBook)
|
||||
{
|
||||
// no apparent slot translation needed -U
|
||||
|
||||
@@ -62,6 +62,7 @@ D(OP_ItemLinkClick)
|
||||
D(OP_LFGuild)
|
||||
D(OP_LootItem)
|
||||
D(OP_MoveItem)
|
||||
D(OP_PetCommands)
|
||||
D(OP_ReadBook)
|
||||
D(OP_SetServerFilter)
|
||||
D(OP_ShopPlayerSell)
|
||||
|
||||
@@ -3425,57 +3425,8 @@ namespace Underfoot
|
||||
DECODE_LENGTH_EXACT(structs::PetCommand_Struct);
|
||||
SETUP_DIRECT_DECODE(PetCommand_Struct, structs::PetCommand_Struct);
|
||||
|
||||
switch (eq->command)
|
||||
{
|
||||
case 0x00:
|
||||
emu->command = 0x04; // Health
|
||||
break;
|
||||
case 0x01:
|
||||
emu->command = 0x10; // Leader
|
||||
break;
|
||||
case 0x02:
|
||||
emu->command = 0x07; // Attack
|
||||
break;
|
||||
case 0x04:
|
||||
emu->command = 0x08; // Follow
|
||||
break;
|
||||
case 0x05:
|
||||
emu->command = 0x05; // Guard
|
||||
break;
|
||||
case 0x06:
|
||||
emu->command = 0x09; // Sit. Needs work. This appears to be a toggle between Sit/Stand now.
|
||||
break;
|
||||
case 0x0c:
|
||||
emu->command = 0x0b; // Taunt
|
||||
break;
|
||||
case 0x0f:
|
||||
emu->command = 0x0c; // Hold
|
||||
break;
|
||||
case 0x10:
|
||||
emu->command = 0x1b; // Hold on
|
||||
break;
|
||||
case 0x11:
|
||||
emu->command = 0x1c; // Hold off
|
||||
break;
|
||||
case 0x1c:
|
||||
emu->command = 0x01; // Back
|
||||
break;
|
||||
case 0x1d:
|
||||
emu->command = 0x02; // Leave/Go Away
|
||||
break;
|
||||
case 0x15:
|
||||
emu->command = 0x12; // No Cast - /command
|
||||
break;
|
||||
case 0x16:
|
||||
emu->command = 0x12; // No Cast - Pet Window
|
||||
break;
|
||||
case 0x18:
|
||||
emu->command = 0x13; // Focus - Pet Window
|
||||
break;
|
||||
default:
|
||||
emu->command = eq->command;
|
||||
}
|
||||
OUT(unknown);
|
||||
IN(command);
|
||||
IN(unknown);
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user