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:
Trevius
2015-01-06 01:19:33 -06:00
parent 668823eaf2
commit f1a73d4da2
13 changed files with 343 additions and 164 deletions
+2 -41
View File
@@ -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
View File
@@ -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();
}
+81
View File
@@ -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);
+1
View File
@@ -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)
+81
View File
@@ -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);
+1
View File
@@ -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)
+81
View File
@@ -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
+1
View File
@@ -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)
+2 -51
View File
@@ -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();
}