Merge branch 'master' into StringFormatting.

Cleaned up the problems. Tested on Linux. Still need to test on windows.

Conflicts:
	common/CMakeLists.txt
	common/MiscFunctions.cpp
	common/MiscFunctions.h
	common/debug.cpp
	world/Adventure.cpp
This commit is contained in:
Arthur Ice
2013-05-19 18:56:21 -07:00
618 changed files with 38225 additions and 38967 deletions
+100 -100
View File
@@ -24,7 +24,7 @@ static OpcodeManager *opcodes = nullptr;
static Strategy struct_strategy;
char* SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth);
void Register(EQStreamIdentifier &into) {
//create our opcode manager if we havent already
if(opcodes == nullptr) {
@@ -40,37 +40,37 @@ void Register(EQStreamIdentifier &into) {
return;
}
}
//ok, now we have what we need to register.
EQStream::Signature signature;
string pname;
//register our world signature.
pname = string(name) + "_world";
signature.ignore_eq_opcode = 0;
signature.first_length = sizeof(structs::LoginInfo_Struct);
signature.first_eq_opcode = opcodes->EmuToEQ(OP_SendLoginInfo);
into.RegisterPatch(signature, pname.c_str(), &opcodes, &struct_strategy);
//register our zone signature.
pname = string(name) + "_zone";
signature.ignore_eq_opcode = opcodes->EmuToEQ(OP_AckPacket);
signature.first_length = sizeof(structs::ClientZoneEntry_Struct);
signature.first_eq_opcode = opcodes->EmuToEQ(OP_ZoneEntry);
into.RegisterPatch(signature, pname.c_str(), &opcodes, &struct_strategy);
_log(NET__IDENTIFY, "Registered patch %s", name);
}
void Reload() {
//we have a big problem to solve here when we switch back to shared memory
//opcode managers because we need to change the manager pointer, which means
//we need to go to every stream and replace it's manager.
if(opcodes != nullptr) {
//TODO: get this file name from the config file
string opfile = "patch_";
@@ -100,7 +100,7 @@ std::string Strategy::Describe() const {
r += name;
return(r);
}
const EQClientVersion Strategy::ClientVersion() const
{
return EQClientUnderfoot;
@@ -117,7 +117,7 @@ static inline uint32 TitaniumToUnderfootSlot(uint32 TitaniumSlot) {
{
UnderfootSlot = TitaniumSlot + 1;
}
else if(TitaniumSlot >= 251 && TitaniumSlot <= 340) // Bag Slots for Normal Inventory and Cursor
else if(TitaniumSlot >= 251 && TitaniumSlot <= 340) // Bag Slots for Normal Inventory and Cursor
{
UnderfootSlot = TitaniumSlot + 11;
}
@@ -136,20 +136,20 @@ static inline uint32 TitaniumToUnderfootSlot(uint32 TitaniumSlot) {
else
{
UnderfootSlot = TitaniumSlot;
}
}
return UnderfootSlot;
}
// Converts Underfoot Slot IDs to Titanium Slot IDs for use in Decodes
static inline uint32 UnderfootToTitaniumSlot(uint32 UnderfootSlot) {
uint32 TitaniumSlot = 0;
if(UnderfootSlot >= 22 && UnderfootSlot <= 54) // Cursor/Ammo/Power Source and Normal Inventory Slots
{
TitaniumSlot = UnderfootSlot - 1;
}
else if(UnderfootSlot >= 262 && UnderfootSlot <= 351) // Bag Slots for Normal Inventory and Cursor
else if(UnderfootSlot >= 262 && UnderfootSlot <= 351) // Bag Slots for Normal Inventory and Cursor
{
TitaniumSlot = UnderfootSlot - 11;
}
@@ -188,7 +188,7 @@ ENCODE(OP_OpenNewTasksWindow) {
EQApplicationPacket *in = *p;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
__emu_AvailableTaskHeader = (AvailableTaskHeader_Struct*)__emu_buffer;
@@ -224,7 +224,7 @@ ENCODE(OP_OpenNewTasksWindow) {
__eq_AvailableTaskData1->TaskID = __emu_AvailableTaskData1->TaskID;
// This next unknown seems to affect the colour of the task title. 0x3f80000 is what I have seen
// in Underfoot packets. Changing it to 0x3f000000 makes the title red.
__eq_AvailableTaskData1->unknown1 = 0x3f800000;
__eq_AvailableTaskData1->unknown1 = 0x3f800000;
__eq_AvailableTaskData1->TimeLimit = __emu_AvailableTaskData1->TimeLimit;
__eq_AvailableTaskData1->unknown2 = __emu_AvailableTaskData1->unknown2;
@@ -283,7 +283,7 @@ ENCODE(OP_OpenNewTasksWindow) {
}
delete[] __emu_buffer;
dest->FastQueuePacket(&in, ack_req);
}
@@ -291,8 +291,8 @@ ENCODE(OP_OpenNewTasksWindow) {
ENCODE(OP_SendCharInfo) {
ENCODE_LENGTH_EXACT(CharacterSelect_Struct);
SETUP_VAR_ENCODE(CharacterSelect_Struct);
//EQApplicationPacket *packet = *p;
//const CharacterSelect_Struct *emu = (CharacterSelect_Struct *) packet->pBuffer;
@@ -311,10 +311,10 @@ ENCODE(OP_SendCharInfo) {
+ namelen;
ALLOC_VAR_ENCODE(structs::CharacterSelect_Struct, total_length);
//unsigned char *eq_buffer = new unsigned char[total_length];
//structs::CharacterSelect_Struct *eq_head = (structs::CharacterSelect_Struct *) eq_buffer;
eq->char_count = char_count;
eq->total_chars = 10;
@@ -361,9 +361,9 @@ ENCODE(OP_SendCharInfo) {
}
bufptr += sizeof(structs::CharacterSelectEntry_Struct);
}
FINISH_ENCODE();
}
ENCODE(OP_ZoneServerInfo) {
@@ -394,10 +394,10 @@ ENCODE(OP_SendZonepoints) {
ENCODE(OP_SendAATable) {
ENCODE_LENGTH_ATLEAST(SendAA_Struct);
SETUP_VAR_ENCODE(SendAA_Struct);
ALLOC_VAR_ENCODE(structs::SendAA_Struct, sizeof(structs::SendAA_Struct) + emu->total_abilities*sizeof(structs::AA_Ability));
// Check clientver field to verify this AA should be sent for SoF
// clientver 1 is for all clients and 6 is for Underfoot
if (emu->clientver <= 6 )
@@ -474,13 +474,13 @@ ENCODE(OP_RespondAA) {
ENCODE(OP_PlayerProfile) {
SETUP_DIRECT_ENCODE(PlayerProfile_Struct, structs::PlayerProfile_Struct);
uint32 r;
eq->available_slots=0xffffffff;
memset(eq->unknown06284, 0xff, sizeof(eq->unknown06284));
memset(eq->unknown07284, 0xff, sizeof(eq->unknown07284));
// OUT(checksum);
OUT(gender);
OUT(race);
@@ -555,7 +555,7 @@ ENCODE(OP_PlayerProfile) {
OUT(thirst_level);
OUT(hunger_level);
//PS this needs to be figured out more; but it was 'good enough'
for(r = 0; r < structs::BUFF_COUNT; r++)
for(r = 0; r < structs::BUFF_COUNT; r++)
{
if(emu->buffs[r].spellid != 0xFFFF && emu->buffs[r].spellid != 0)
{
@@ -585,7 +585,7 @@ ENCODE(OP_PlayerProfile) {
OUT(aapoints_spent);
OUT(aapoints);
// OUT(unknown06160[4]);
//NOTE: new client supports 20 bandoliers, our internal rep
//NOTE: new client supports 20 bandoliers, our internal rep
//only supports 4..
for(r = 0; r < 4; r++) {
OUT_str(bandoliers[r].name);
@@ -708,10 +708,10 @@ const uint8 bytes[] = {
};
memcpy(eq->unknown18020, bytes, sizeof(bytes));
//set the checksum...
CRC32::SetEQChecksum(__packet->pBuffer, sizeof(structs::PlayerProfile_Struct)-4);
FINISH_ENCODE();
}
@@ -749,7 +749,7 @@ ENCODE(OP_NewZone) {
OUT(SuspendBuffs);
eq->FogDensity = emu->fog_density;
/*fill in some unknowns with observed values, hopefully it will help */
eq->unknown800 = -1;
eq->unknown844 = 600;
@@ -896,7 +896,7 @@ ENCODE(OP_Barter)
delete[] __emu_buffer;
dest->FastQueuePacket(&in, ack_req);
}
ENCODE(OP_BazaarSearch)
@@ -959,11 +959,11 @@ ENCODE(OP_ZoneSpawns) {
//consume the packet
EQApplicationPacket *in = *p;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
Spawn_Struct *emu = (Spawn_Struct *) __emu_buffer;
//determine and verify length
int entrycount = in->size / sizeof(Spawn_Struct);
if(entrycount == 0 || (in->size % sizeof(Spawn_Struct)) != 0) {
@@ -972,7 +972,7 @@ ENCODE(OP_ZoneSpawns) {
return;
}
//_log(NET__STRUCTS, "Spawn name is [%s]", emu->name);
emu = (Spawn_Struct *) __emu_buffer;
@@ -981,7 +981,7 @@ ENCODE(OP_ZoneSpawns) {
char *Buffer = (char *) in->pBuffer;
int r;
int k;
for(r = 0; r < entrycount; r++, emu++) {
@@ -1154,7 +1154,7 @@ ENCODE(OP_ZoneSpawns) {
{
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0);
}
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, emu->curHp);
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, emu->haircolor);
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, emu->beardcolor);
@@ -1212,8 +1212,8 @@ ENCODE(OP_ZoneSpawns) {
Position->deltaZ = emu->deltaZ;
Buffer += sizeof(structs::Spawn_Struct_Position);
if((emu->NPC == 0) || (emu->race <=12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
if((emu->NPC == 0) || (emu->race <=12) || (emu->race == 128) || (emu ->race == 130) || (emu->race == 330) || (emu->race == 522))
{
for(k = 0; k < 9; ++k)
{
@@ -1266,7 +1266,7 @@ ENCODE(OP_ZoneSpawns) {
dest->FastQueuePacket(&outapp, ack_req);
}
delete in;
}
@@ -1274,7 +1274,7 @@ ENCODE(OP_MercenaryDataResponse) {
//consume the packet
EQApplicationPacket *in = *p;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
MercenaryMerchantList_Struct *emu = (MercenaryMerchantList_Struct *) __emu_buffer;
@@ -1337,7 +1337,7 @@ ENCODE(OP_MercenaryDataUpdate) {
//consume the packet
EQApplicationPacket *in = *p;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
MercenaryDataUpdate_Struct *emu = (MercenaryDataUpdate_Struct *) __emu_buffer;
@@ -1413,7 +1413,7 @@ ENCODE(OP_ItemPacket) {
//consume the packet
EQApplicationPacket *in = *p;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
ItemPacket_Struct *old_item_pkt=(ItemPacket_Struct *)__emu_buffer;
InternalSerializedItem_Struct *int_struct=(InternalSerializedItem_Struct *)(old_item_pkt->SerializedItem);
@@ -1455,7 +1455,7 @@ ENCODE(OP_CharInventory) {
return;
}
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -1463,7 +1463,7 @@ ENCODE(OP_CharInventory) {
if(ItemCount == 0 || (in->size % sizeof(InternalSerializedItem_Struct)) != 0) {
_log(NET__STRUCTS, "Wrong size on outbound %s: Got %d, expected multiple of %d",
_log(NET__STRUCTS, "Wrong size on outbound %s: Got %d, expected multiple of %d",
opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(InternalSerializedItem_Struct));
delete in;
@@ -1476,7 +1476,7 @@ ENCODE(OP_CharInventory) {
in->pBuffer = new uchar[4];
*(uint32 *)in->pBuffer = ItemCount;
in->size = 4;
for(int r = 0; r < ItemCount; r++, eq++) {
@@ -1520,39 +1520,39 @@ ENCODE(OP_GuildMemberList) {
//consume the packet
EQApplicationPacket *in = *p;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
Internal_GuildMembers_Struct *emu = (Internal_GuildMembers_Struct *) in->pBuffer;
//make a new EQ buffer.
uint32 pnl = strlen(emu->player_name);
uint32 length = sizeof(structs::GuildMembers_Struct) + pnl +
uint32 length = sizeof(structs::GuildMembers_Struct) + pnl +
emu->count*sizeof(structs::GuildMemberEntry_Struct)
+ emu->name_length + emu->note_length;
in->pBuffer = new uint8[length];
in->size = length;
//no memset since we fill every byte.
uint8 *buffer;
buffer = in->pBuffer;
//easier way to setup GuildMembers_Struct
//set prefix name
strcpy((char *)buffer, emu->player_name);
buffer += pnl;
*buffer = '\0';
buffer++;
//add member count.
*((uint32 *) buffer) = htonl( emu->count );
buffer += sizeof(uint32);
if(emu->count > 0) {
Internal_GuildMemberEntry_Struct *emu_e = emu->member;
const char *emu_name = (const char *) (__emu_buffer +
const char *emu_name = (const char *) (__emu_buffer +
sizeof(Internal_GuildMembers_Struct) + //skip header
emu->count * sizeof(Internal_GuildMemberEntry_Struct) //skip static length member data
);
@@ -1560,12 +1560,12 @@ ENCODE(OP_GuildMemberList) {
emu->name_length + //skip name contents
emu->count //skip string terminators
);
structs::GuildMemberEntry_Struct *e = (structs::GuildMemberEntry_Struct *) buffer;
uint32 r;
for(r = 0; r < emu->count; r++, emu_e++) {
//the order we set things here must match the struct
//nice helper macro
@@ -1581,7 +1581,7 @@ ENCODE(OP_GuildMemberList) {
}
#define PutFieldN(field) \
e->field = htonl(emu_e->field)
SlideStructString( name, emu_name );
PutFieldN(level);
PutFieldN(banker);
@@ -1595,15 +1595,15 @@ ENCODE(OP_GuildMemberList) {
SlideStructString( public_note, emu_note );
e->zoneinstance = 0;
e->zone_id = htons(emu_e->zone_id);
#undef SlideStructString
#undef PutFieldN
e++;
}
}
delete[] __emu_buffer;
@@ -1656,7 +1656,7 @@ ENCODE(OP_GroundSpawn)
in->size = strlen(emu->object_name) + 58;
in->pBuffer = new unsigned char[in->size];
char *OutBuffer = (char *)in->pBuffer;
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, emu->drop_id);
@@ -1669,7 +1669,7 @@ ENCODE(OP_GroundSpawn)
// This next field is actually a float. There is a groundspawn in freeportwest (sack of money sitting on some barrels) which requires this
// field to be set to (float)255.0 to appear at all, and also the size field below to be 5, to be the correct size. I think SoD has the same
// issue.
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, 0); // Unknown, observed 0
VARSTRUCT_ENCODE_TYPE(uint32, OutBuffer, 0); // This appears to be the size field.
VARSTRUCT_ENCODE_TYPE(float, OutBuffer, emu->y);
@@ -1681,7 +1681,7 @@ ENCODE(OP_GroundSpawn)
VARSTRUCT_ENCODE_TYPE(uint8, OutBuffer, 0); // Unknown, observed 0x00
delete[] __emu_buffer;
dest->FastQueuePacket(&in, ack_req);
}
@@ -1775,7 +1775,7 @@ ENCODE(OP_LogServer) {
ENCODE_LENGTH_EXACT(LogServer_Struct);
SETUP_DIRECT_ENCODE(LogServer_Struct, structs::LogServer_Struct);
strcpy(eq->worldshortname, emu->worldshortname);
OUT(enablevoicemacros);
OUT(enablemail);
OUT(enable_pvp);
@@ -1796,7 +1796,7 @@ ENCODE(OP_LogServer) {
eq->unknown263[23] = 0x80;
eq->unknown263[24] = 0x3f;
eq->unknown263[33] = 1;
FINISH_ENCODE();
}
@@ -2038,7 +2038,7 @@ ENCODE(OP_Stun) {
FINISH_ENCODE();
}
ENCODE(OP_ZonePlayerToBind)
ENCODE(OP_ZonePlayerToBind)
{
ENCODE_LENGTH_ATLEAST(ZonePlayerToBind_Struct);
ZonePlayerToBind_Struct *zps = (ZonePlayerToBind_Struct*)(*p)->pBuffer;
@@ -2091,7 +2091,7 @@ ENCODE(OP_AdventureMerchantSell) {
FINISH_ENCODE();
}
ENCODE(OP_RaidUpdate)
ENCODE(OP_RaidUpdate)
{
EQApplicationPacket *inapp = *p;
*p = nullptr;
@@ -2104,7 +2104,7 @@ ENCODE(OP_RaidUpdate)
EQApplicationPacket *outapp = new EQApplicationPacket(OP_RaidUpdate, sizeof(structs::RaidAddMember_Struct));
structs::RaidAddMember_Struct *add_member = (structs::RaidAddMember_Struct*)outapp->pBuffer;
add_member->raidGen.action = in_add_member->raidGen.action;
add_member->raidGen.parameter = in_add_member->raidGen.parameter;
strn0cpy(add_member->raidGen.leader_name, in_add_member->raidGen.leader_name, 64);
@@ -2181,7 +2181,7 @@ ENCODE(OP_VetRewardsAvaliable)
old_data += sizeof(InternalVeteranReward);
data += sizeof(structs::VeteranReward);
}
dest->FastQueuePacket(&outapp_create);
delete inapp;
}
@@ -2289,7 +2289,7 @@ ENCODE(OP_GroupUpdate)
EQApplicationPacket *in = *p;
GroupJoin_Struct *gjs = (GroupJoin_Struct*)in->pBuffer;
//_log(NET__ERROR, "Received outgoing OP_GroupUpdate with action code %i", gjs->action);
if((gjs->action == groupActLeave) || (gjs->action == groupActDisband))
{
@@ -2335,10 +2335,10 @@ ENCODE(OP_GroupUpdate)
{
// Group Update2
//_log(NET__ERROR, "Struct is GroupUpdate2");
unsigned char *__emu_buffer = in->pBuffer;
GroupUpdate2_Struct *gu2 = (GroupUpdate2_Struct*) __emu_buffer;
//_log(NET__ERROR, "Yourname is %s", gu2->yourname);
int MemberCount = 1;
@@ -2360,7 +2360,7 @@ ENCODE(OP_GroupUpdate)
EQApplicationPacket *outapp = new EQApplicationPacket(OP_GroupUpdateB, PacketLength);
char *Buffer = (char *)outapp->pBuffer;
// Header
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); // Think this should be SpawnID, but it doesn't seem to matter
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, MemberCount);
@@ -2368,7 +2368,7 @@ ENCODE(OP_GroupUpdate)
// Leader
//
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_STRING(Buffer, gu2->yourname);
VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0);
@@ -2410,7 +2410,7 @@ ENCODE(OP_GroupUpdate)
GLAAus->NPCMarkerID = gu2->NPCMarkerID;
memcpy(&GLAAus->LeaderAAs, &gu2->leader_aas, sizeof(GLAAus->LeaderAAs));
dest->FastQueuePacket(&outapp);
delete in;
@@ -2448,7 +2448,7 @@ ENCODE(OP_ChannelMessage)
in->size = strlen(emu->sender) + 1 + strlen(emu->targetname) + 1 + strlen(emu->message) + 1 + 36;
in->pBuffer = new unsigned char[in->size];
char *OutBuffer = (char *)in->pBuffer;
VARSTRUCT_ENCODE_STRING(OutBuffer, emu->sender);
@@ -2496,7 +2496,7 @@ ENCODE(OP_GuildsList)
}
InBuffer += 64;
}
PacketSize++; // Appears to be an extra 0x00 at the very end.
in->size = PacketSize;
@@ -2583,7 +2583,7 @@ ENCODE(OP_DzMemberList)
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&emu->entries[i].status, sizeof(char));
}
__packet->size = ss.str().length();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
@@ -2640,7 +2640,7 @@ ENCODE(OP_DzLeaderStatus)
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));//1
ss.write((const char*)&client_id, sizeof(uint32));
__packet->size = ss.str().length();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
@@ -2754,7 +2754,7 @@ ENCODE(OP_SpawnAppearance)
dest->FastQueuePacket(&in, ack_req);
return;
}
EQApplicationPacket *outapp = new EQApplicationPacket(OP_ChangeSize, sizeof(ChangeSize_Struct));
ChangeSize_Struct *css = (ChangeSize_Struct *)outapp->pBuffer;
@@ -2765,7 +2765,7 @@ ENCODE(OP_SpawnAppearance)
css->Unknown12 = 1.0f;
dest->FastQueuePacket(&outapp, ack_req);
delete in;
}
@@ -2779,7 +2779,7 @@ ENCODE(OP_DisciplineUpdate)
FINISH_ENCODE();
}
ENCODE(OP_AltCurrencySell)
ENCODE(OP_AltCurrencySell)
{
ENCODE_LENGTH_EXACT(AltCurrencySellItem_Struct);
SETUP_DIRECT_ENCODE(AltCurrencySellItem_Struct, structs::AltCurrencySellItem_Struct);
@@ -2802,7 +2802,7 @@ ENCODE(OP_AltCurrency)
if(opcode == 8) {
AltCurrencyPopulate_Struct *populate = (AltCurrencyPopulate_Struct*)emu_buffer;
EQApplicationPacket *outapp = new EQApplicationPacket(OP_AltCurrency, sizeof(structs::AltCurrencyPopulate_Struct)
EQApplicationPacket *outapp = new EQApplicationPacket(OP_AltCurrency, sizeof(structs::AltCurrencyPopulate_Struct)
+ sizeof(structs::AltCurrencyPopulateEntry_Struct) * populate->count);
structs::AltCurrencyPopulate_Struct *out_populate = (structs::AltCurrencyPopulate_Struct*)outapp->pBuffer;
@@ -2967,7 +2967,7 @@ DECODE(OP_ItemLinkClick) {
DECODE_LENGTH_EXACT(structs::ItemViewRequest_Struct);
SETUP_DIRECT_DECODE(ItemViewRequest_Struct, structs::ItemViewRequest_Struct);
MEMSET_IN(ItemViewRequest_Struct);
IN(item_id);
int r;
for (r = 0; r < 5; r++) {
@@ -2975,7 +2975,7 @@ DECODE(OP_ItemLinkClick) {
}
IN(link_hash);
IN(icon);
FINISH_DIRECT_DECODE();
}
@@ -3018,7 +3018,7 @@ DECODE(OP_ShopPlayerBuy)
}
DECODE(OP_ClientUpdate) {
// for some odd reason, there is an extra byte on the end of this on occasion..
// for some odd reason, there is an extra byte on the end of this on occasion..
DECODE_LENGTH_ATLEAST(structs::PlayerPositionUpdateClient_Struct);
SETUP_DIRECT_DECODE(PlayerPositionUpdateClient_Struct, structs::PlayerPositionUpdateClient_Struct);
IN(spawn_id);
@@ -3049,7 +3049,7 @@ DECODE(OP_CharacterCreate) {
emu->start_zone = RuleI(World, TutorialZoneID);
else
emu->start_zone = eq->start_zone;
IN(haircolor);
IN(deity);
IN(STR);
@@ -3081,7 +3081,7 @@ DECODE(OP_WhoAllRequest) {
IN(gmlookup);
IN(guildid);
IN(type);
FINISH_DIRECT_DECODE();
}
@@ -3683,7 +3683,7 @@ char* SerializeItem(const ItemInst *inst, int16 slot_id_in, uint32 *length, uint
Underfoot::structs::ItemTertiaryBodyStruct itbs;
memset(&itbs, 0, sizeof(Underfoot::structs::ItemTertiaryBodyStruct));
itbs.loregroup = item->LoreGroup;
itbs.artifact = item->ArtifactFlag;
itbs.summonedflag = item->SummonedFlag;
@@ -3881,7 +3881,7 @@ char* SerializeItem(const ItemInst *inst, int16 slot_id_in, uint32 *length, uint
uint32 SubLengths[10];
for(int x = 0; x < 10; ++x) {
SubSerializations[x] = nullptr;
const ItemInst* subitem = ((const ItemInst*)inst)->GetItem(x);
@@ -3927,7 +3927,7 @@ char* SerializeItem(const ItemInst *inst, int16 slot_id_in, uint32 *length, uint
return item_serial;
}
DECODE(OP_AltCurrencySellSelection)
DECODE(OP_AltCurrencySellSelection)
{
DECODE_LENGTH_EXACT(structs::AltCurrencySelectItem_Struct);
SETUP_DIRECT_DECODE(AltCurrencySelectItem_Struct, structs::AltCurrencySelectItem_Struct);
@@ -3936,7 +3936,7 @@ DECODE(OP_AltCurrencySellSelection)
FINISH_DIRECT_DECODE();
}
DECODE(OP_AltCurrencySell)
DECODE(OP_AltCurrencySell)
{
DECODE_LENGTH_EXACT(structs::AltCurrencySellItem_Struct);
SETUP_DIRECT_DECODE(AltCurrencySellItem_Struct, structs::AltCurrencySellItem_Struct);