AA struct work

This commit is contained in:
KimLS
2024-12-16 18:08:27 -08:00
parent 33ab28c1e0
commit 62a84388c0
5 changed files with 61 additions and 18 deletions
+24
View File
@@ -3162,6 +3162,30 @@ namespace Laurion
FINISH_ENCODE();
}
ENCODE(OP_RespondAA)
{
SETUP_DIRECT_ENCODE(AATable_Struct, structs::AATable_Struct);
eq->aa_spent = emu->aa_spent;
// These fields may need to be correctly populated at some point
eq->aapoints_assigned[0] = emu->aa_spent;
eq->aapoints_assigned[1] = 0;
eq->aapoints_assigned[2] = 0;
eq->aapoints_assigned[3] = 0;
eq->aapoints_assigned[4] = 0;
eq->aapoints_assigned[5] = 0;
for (uint32 i = 0; i < MAX_PP_AA_ARRAY; ++i)
{
eq->aa_list[i].AA = emu->aa_list[i].AA;
eq->aa_list[i].value = emu->aa_list[i].value;
eq->aa_list[i].charges = emu->aa_list[i].charges;
eq->aa_list[i].bUnknown0x0c = false;
}
FINISH_ENCODE();
}
// DECODE methods
DECODE(OP_EnterWorld)
+1 -1
View File
@@ -7,7 +7,6 @@ E(OP_SendMaxCharacters)
E(OP_SendCharInfo)
E(OP_ExpansionInfo)
E(OP_SpawnAppearance)
//E(OP_SendAATable)
E(OP_PlayerProfile)
E(OP_ZoneEntry)
E(OP_ZoneSpawns)
@@ -44,6 +43,7 @@ E(OP_MobHealth)
E(OP_GMTraining)
E(OP_GMTrainSkillConfirm)
E(OP_SkillUpdate)
E(OP_RespondAA)
//list of packets we need to decode on the way in:
D(OP_EnterWorld)
D(OP_ZoneEntry)
+20
View File
@@ -765,6 +765,26 @@ namespace Laurion {
/*12*/
};
struct AA_Array
{
uint32 AA;
uint32 value;
uint32 charges; // expendable charges
bool bUnknown0x0c; // added test winter 2024; removed sometime in summer 2024
};
struct AATable_Struct {
/*00*/ uint32 aa_spent; // Total AAs Spent
/*04*/ uint32 aapoints_assigned[6]; // none, general, arch, class, special, focus, merc
/*24*/ AA_Array aa_list[MAX_PP_AA_ARRAY];
};
struct AltAdvStats_Struct {
/*000*/ uint32 experience;
/*004*/ uint32 unspent;
/*008*/ uint8 percentage;
/*009*/ uint8 unknown009[3];
};
#pragma pack()
}; //end namespace structs