diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 30941a1bf..114238d83 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -4389,6 +4389,19 @@ namespace RoF2 delete in; } + ENCODE(OP_CrystalCountUpdate) + { + ENCODE_LENGTH_EXACT(CrystalCountUpdate_Struct); + SETUP_DIRECT_ENCODE(CrystalCountUpdate_Struct, structs::CrystalCountUpdate_Struct); + + OUT(CurrentRadiantCrystals); + OUT(CareerRadiantCrystals); + OUT(CurrentEbonCrystals); + OUT(CareerEbonCrystals); + + FINISH_ENCODE(); + } + // DECODE methods DECODE(OP_AdventureMerchantSell) diff --git a/common/patches/rof2_ops.h b/common/patches/rof2_ops.h index b49784029..1ca7063f4 100644 --- a/common/patches/rof2_ops.h +++ b/common/patches/rof2_ops.h @@ -141,6 +141,7 @@ E(OP_ZoneEntry) E(OP_ZonePlayerToBind) E(OP_ZoneServerInfo) E(OP_ZoneSpawns) +E(OP_CrystalCountUpdate) // Begin RoF Decodes D(OP_AdventureMerchantSell) D(OP_AltCurrencySell) diff --git a/common/patches/rof2_structs.h b/common/patches/rof2_structs.h index ed34d44b8..0b638660e 100644 --- a/common/patches/rof2_structs.h +++ b/common/patches/rof2_structs.h @@ -5081,6 +5081,15 @@ struct MercenaryMerchantResponse_Struct { /*0004*/ }; +// Sent by Server to update character crystals. +struct CrystalCountUpdate_Struct +{ + /*000*/ uint32 CurrentRadiantCrystals; + /*004*/ uint32 CareerRadiantCrystals; + /*008*/ uint32 CurrentEbonCrystals; + /*012*/ uint32 CareerEbonCrystals; +}; + }; /*structs*/ }; /*RoF2*/