mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-24 09:28:21 +00:00
Delinked current inventory slot enumeration and constants from EQEmu::constants and global definition
This commit is contained in:
+63
-63
@@ -2342,7 +2342,7 @@ namespace RoF
|
||||
outapp->WriteUInt32(consts::BANDOLIERS_SIZE);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (uint32 r = 0; r < EQEmu::constants::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (uint32 r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
outapp->WriteString(emu->bandoliers[r].Name);
|
||||
for (uint32 j = 0; j < consts::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString(emu->bandoliers[r].Items[j].Name);
|
||||
@@ -2357,7 +2357,7 @@ namespace RoF
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (uint32 r = EQEmu::constants::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (uint32 r = EQEmu::legacy::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
outapp->WriteString("");
|
||||
for (uint32 j = 0; j < consts::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString("");
|
||||
@@ -2369,7 +2369,7 @@ namespace RoF
|
||||
outapp->WriteUInt32(consts::POTION_BELT_ITEM_COUNT);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (uint32 r = 0; r < EQEmu::constants::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (uint32 r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
outapp->WriteString(emu->potionbelt.Items[r].Name);
|
||||
outapp->WriteUInt32(emu->potionbelt.Items[r].ID);
|
||||
if (emu->potionbelt.Items[r].Icon) {
|
||||
@@ -2381,7 +2381,7 @@ namespace RoF
|
||||
}
|
||||
}
|
||||
// Nullify potion belt where server and client indexes diverge, with a client bias
|
||||
for (uint32 r = EQEmu::constants::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (uint32 r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
outapp->WriteString("");
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteSInt32(-1);
|
||||
@@ -2502,9 +2502,9 @@ namespace RoF
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
outapp->WriteUInt32(EQEmu::constants::TRIBUTE_SIZE);
|
||||
outapp->WriteUInt32(EQEmu::legacy::TRIBUTE_SIZE);
|
||||
|
||||
for (uint32 r = 0; r < EQEmu::constants::TRIBUTE_SIZE; r++)
|
||||
for (uint32 r = 0; r < EQEmu::legacy::TRIBUTE_SIZE; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->tributes[r].tribute);
|
||||
outapp->WriteUInt32(emu->tributes[r].tier);
|
||||
@@ -3037,7 +3037,7 @@ namespace RoF
|
||||
eq_cse->Gender = emu_cse->Gender;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < MaterialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
@@ -4101,13 +4101,13 @@ namespace RoF
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
@@ -4810,7 +4810,7 @@ namespace RoF
|
||||
|
||||
IN(item_id);
|
||||
int r;
|
||||
for (r = 0; r < EQEmu::constants::ITEM_COMMON_SIZE; r++) {
|
||||
for (r = 0; r < EQEmu::legacy::ITEM_COMMON_SIZE; r++) {
|
||||
IN(augments[r]);
|
||||
}
|
||||
// Max Augs is now 6, but no code to support that many yet
|
||||
@@ -5678,7 +5678,7 @@ namespace RoF
|
||||
|
||||
uint32 SubLengths[10];
|
||||
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::constants::ITEM_CONTAINER_SIZE; ++x) {
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++x) {
|
||||
|
||||
SubSerializations[x] = nullptr;
|
||||
|
||||
@@ -5690,15 +5690,15 @@ namespace RoF
|
||||
|
||||
iqbs.subitem_count++;
|
||||
|
||||
if (slot_id_in >= EQEmu::constants::GENERAL_BEGIN && slot_id_in <= EQEmu::constants::GENERAL_END) // (< 30) - no cursor?
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END) // (< 30) - no cursor?
|
||||
//SubSlotNumber = (((slot_id_in + 3) * 10) + x + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::constants::BANK_BEGIN && slot_id_in <= EQEmu::constants::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2000) * 10) + 2030 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::constants::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::constants::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2500) * 10) + 2530 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::SHARED_BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::SHARED_BANK_BAGS_BEGIN + x);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + x);
|
||||
else
|
||||
SubSlotNumber = slot_id_in; // ???????
|
||||
|
||||
@@ -5713,7 +5713,7 @@ namespace RoF
|
||||
|
||||
ss.write((const char*)&iqbs, sizeof(RoF::structs::ItemQuaternaryBodyStruct));
|
||||
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::constants::ITEM_CONTAINER_SIZE; ++x) {
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++x) {
|
||||
|
||||
if (SubSerializations[x]) {
|
||||
|
||||
@@ -5745,17 +5745,17 @@ namespace RoF
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == SlotPowerSource) { // Main Inventory and Cursor
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // Main Inventory and Cursor
|
||||
RoFSlot.Type = inventory::TypePossessions;
|
||||
RoFSlot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == SlotPowerSource)
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
RoFSlot.Slot = inventory::SlotPowerSource;
|
||||
|
||||
else if (serverSlot >= SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoFSlot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= SlotAmmo) // (> 20)
|
||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // (> 20)
|
||||
RoFSlot.Slot += 1;
|
||||
}
|
||||
|
||||
@@ -5764,51 +5764,51 @@ namespace RoF
|
||||
RoFSlot.MainSlot = ServerSlot - 31;
|
||||
}*/
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::constants::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
RoFSlot.Type = inventory::TypePossessions;
|
||||
TempSlot = serverSlot - 1;
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
|
||||
if (RoFSlot.Slot >= inventory::SlotGeneral9) // (> 30)
|
||||
RoFSlot.Slot = inventory::SlotCursor;
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::TRIBUTE_BEGIN && serverSlot <= EQEmu::constants::TRIBUTE_END) { // Tribute
|
||||
else if (serverSlot >= EQEmu::legacy::TRIBUTE_BEGIN && serverSlot <= EQEmu::legacy::TRIBUTE_END) { // Tribute
|
||||
RoFSlot.Type = inventory::TypeTribute;
|
||||
RoFSlot.Slot = serverSlot - EQEmu::constants::TRIBUTE_BEGIN;
|
||||
RoFSlot.Slot = serverSlot - EQEmu::legacy::TRIBUTE_BEGIN;
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::BANK_BEGIN && serverSlot <= EQEmu::constants::BANK_BAGS_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END) {
|
||||
RoFSlot.Type = inventory::TypeBank;
|
||||
TempSlot = serverSlot - EQEmu::constants::BANK_BEGIN;
|
||||
TempSlot = serverSlot - EQEmu::legacy::BANK_BEGIN;
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::SHARED_BANK_BEGIN && serverSlot <= EQEmu::constants::SHARED_BANK_BAGS_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END) {
|
||||
RoFSlot.Type = inventory::TypeSharedBank;
|
||||
TempSlot = serverSlot - EQEmu::constants::SHARED_BANK_BEGIN;
|
||||
TempSlot = serverSlot - EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::TRADE_BEGIN && serverSlot <= EQEmu::constants::TRADE_BAGS_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::TRADE_BEGIN && serverSlot <= EQEmu::legacy::TRADE_BAGS_END) {
|
||||
RoFSlot.Type = inventory::TypeTrade;
|
||||
TempSlot = serverSlot - EQEmu::constants::TRADE_BEGIN;
|
||||
TempSlot = serverSlot - EQEmu::legacy::TRADE_BEGIN;
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) {
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -5825,9 +5825,9 @@ namespace RoF
|
||||
*/
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::WORLD_BEGIN && serverSlot <= EQEmu::constants::WORLD_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::WORLD_BEGIN && serverSlot <= EQEmu::legacy::WORLD_END) {
|
||||
RoFSlot.Type = inventory::TypeWorld;
|
||||
TempSlot = serverSlot - EQEmu::constants::WORLD_BEGIN;
|
||||
TempSlot = serverSlot - EQEmu::legacy::WORLD_BEGIN;
|
||||
RoFSlot.Slot = TempSlot;
|
||||
}
|
||||
|
||||
@@ -5846,16 +5846,16 @@ namespace RoF
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == SlotPowerSource) { // (< 52)
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // (< 52)
|
||||
RoFSlot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == SlotPowerSource)
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
RoFSlot.Slot = inventory::SlotPowerSource;
|
||||
|
||||
else if (serverSlot >= SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoFSlot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= SlotAmmo) // Ammo and Personl Inventory
|
||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // Ammo and Personl Inventory
|
||||
RoFSlot.Slot += 1;
|
||||
|
||||
/*else if (ServerSlot >= MainCursor) { // Cursor
|
||||
@@ -5866,10 +5866,10 @@ namespace RoF
|
||||
}*/
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::constants::CURSOR_BAG_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) {
|
||||
TempSlot = serverSlot - 1;
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
}
|
||||
|
||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF Slots: Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoFSlot.Slot, RoFSlot.SubIndex, RoFSlot.AugIndex, RoFSlot.Unknown01);
|
||||
@@ -5889,7 +5889,7 @@ namespace RoF
|
||||
|
||||
if (rofSlot.Type == inventory::TypePossessions && rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||
if (rofSlot.Slot == inventory::SlotPowerSource)
|
||||
TempSlot = SlotPowerSource;
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
|
||||
else if (rofSlot.Slot >= inventory::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rofSlot.Slot - 3;
|
||||
@@ -5912,16 +5912,16 @@ namespace RoF
|
||||
TempSlot = rofSlot.Slot;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rofSlot.Type == inventory::TypeBank) {
|
||||
TempSlot = EQEmu::constants::BANK_BEGIN;
|
||||
TempSlot = EQEmu::legacy::BANK_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rofSlot.Slot;
|
||||
@@ -5930,10 +5930,10 @@ namespace RoF
|
||||
}
|
||||
|
||||
else if (rofSlot.Type == inventory::TypeSharedBank) {
|
||||
TempSlot = EQEmu::constants::SHARED_BANK_BEGIN;
|
||||
TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rofSlot.Slot;
|
||||
@@ -5942,12 +5942,12 @@ namespace RoF
|
||||
}
|
||||
|
||||
else if (rofSlot.Type == inventory::TypeTrade) {
|
||||
TempSlot = EQEmu::constants::TRADE_BEGIN;
|
||||
TempSlot = EQEmu::legacy::TRADE_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
// OLD CODE:
|
||||
//TempSlot += 100 + (RoFSlot.MainSlot * EQEmu::constants::ITEM_CONTAINER_SIZE) + RoFSlot.SubSlot;
|
||||
//TempSlot += 100 + (RoFSlot.MainSlot * EQEmu::legacy::ITEM_CONTAINER_SIZE) + RoFSlot.SubSlot;
|
||||
|
||||
else
|
||||
TempSlot += rofSlot.Slot;
|
||||
@@ -5956,7 +5956,7 @@ namespace RoF
|
||||
}
|
||||
|
||||
else if (rofSlot.Type == inventory::TypeWorld) {
|
||||
TempSlot = EQEmu::constants::WORLD_BEGIN;
|
||||
TempSlot = EQEmu::legacy::WORLD_BEGIN;
|
||||
|
||||
if (rofSlot.Slot >= SUB_INDEX_BEGIN)
|
||||
TempSlot += rofSlot.Slot;
|
||||
@@ -5989,7 +5989,7 @@ namespace RoF
|
||||
|
||||
if (rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
||||
if (rofSlot.Slot == inventory::SlotPowerSource)
|
||||
TempSlot = SlotPowerSource;
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
|
||||
else if (rofSlot.Slot >= inventory::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rofSlot.Slot - 3;
|
||||
@@ -6007,7 +6007,7 @@ namespace RoF
|
||||
TempSlot = rofSlot.Slot;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
@@ -6024,7 +6024,7 @@ namespace RoF
|
||||
|
||||
static inline void ServerToRoFTextLink(std::string& rofTextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::constants::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
rofTextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -6033,7 +6033,7 @@ namespace RoF
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
rofTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -6063,7 +6063,7 @@ namespace RoF
|
||||
|
||||
static inline void RoFToServerTextLink(std::string& serverTextLink, const std::string& rofTextLink)
|
||||
{
|
||||
if ((EQEmu::constants::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (rofTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (rofTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = rofTextLink;
|
||||
return;
|
||||
}
|
||||
|
||||
+66
-66
@@ -2421,7 +2421,7 @@ namespace RoF2
|
||||
outapp->WriteUInt32(consts::BANDOLIERS_SIZE);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (uint32 r = 0; r < EQEmu::constants::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (uint32 r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
outapp->WriteString(emu->bandoliers[r].Name);
|
||||
for (uint32 j = 0; j < consts::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString(emu->bandoliers[r].Items[j].Name);
|
||||
@@ -2436,7 +2436,7 @@ namespace RoF2
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (uint32 r = EQEmu::constants::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (uint32 r = EQEmu::legacy::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
outapp->WriteString("");
|
||||
for (uint32 j = 0; j < consts::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString("");
|
||||
@@ -2448,7 +2448,7 @@ namespace RoF2
|
||||
outapp->WriteUInt32(consts::POTION_BELT_ITEM_COUNT);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (uint32 r = 0; r < EQEmu::constants::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (uint32 r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
outapp->WriteString(emu->potionbelt.Items[r].Name);
|
||||
outapp->WriteUInt32(emu->potionbelt.Items[r].ID);
|
||||
if (emu->potionbelt.Items[r].Icon) {
|
||||
@@ -2460,7 +2460,7 @@ namespace RoF2
|
||||
}
|
||||
}
|
||||
// Nullify potion belt where server and client indexes diverge, with a client bias
|
||||
for (uint32 r = EQEmu::constants::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (uint32 r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
outapp->WriteString("");
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteSInt32(-1);
|
||||
@@ -2577,9 +2577,9 @@ namespace RoF2
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
outapp->WriteUInt32(EQEmu::constants::TRIBUTE_SIZE);
|
||||
outapp->WriteUInt32(EQEmu::legacy::TRIBUTE_SIZE);
|
||||
|
||||
for (uint32 r = 0; r < EQEmu::constants::TRIBUTE_SIZE; r++)
|
||||
for (uint32 r = 0; r < EQEmu::legacy::TRIBUTE_SIZE; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->tributes[r].tribute);
|
||||
outapp->WriteUInt32(emu->tributes[r].tier);
|
||||
@@ -3126,7 +3126,7 @@ namespace RoF2
|
||||
eq_cse->Gender = emu_cse->Gender;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < MaterialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
@@ -4320,13 +4320,13 @@ namespace RoF2
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
@@ -5028,7 +5028,7 @@ namespace RoF2
|
||||
|
||||
IN(item_id);
|
||||
int r;
|
||||
for (r = 0; r < EQEmu::constants::ITEM_COMMON_SIZE; r++) {
|
||||
for (r = 0; r < EQEmu::legacy::ITEM_COMMON_SIZE; r++) {
|
||||
IN(augments[r]);
|
||||
}
|
||||
IN(link_hash);
|
||||
@@ -5961,7 +5961,7 @@ namespace RoF2
|
||||
|
||||
uint32 SubLengths[10];
|
||||
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::constants::ITEM_CONTAINER_SIZE; ++x) {
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++x) {
|
||||
|
||||
SubSerializations[x] = nullptr;
|
||||
|
||||
@@ -5973,15 +5973,15 @@ namespace RoF2
|
||||
|
||||
iqbs.subitem_count++;
|
||||
|
||||
if (slot_id_in >= EQEmu::constants::GENERAL_BEGIN && slot_id_in <= EQEmu::constants::GENERAL_END) // (< 30) - no cursor?
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END) // (< 30) - no cursor?
|
||||
//SubSlotNumber = (((slot_id_in + 3) * 10) + x + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::constants::BANK_BEGIN && slot_id_in <= EQEmu::constants::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2000) * 10) + 2030 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::constants::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::constants::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2500) * 10) + 2530 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::SHARED_BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::SHARED_BANK_BAGS_BEGIN + x);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + x);
|
||||
else
|
||||
SubSlotNumber = slot_id_in; // ???????
|
||||
|
||||
@@ -5996,7 +5996,7 @@ namespace RoF2
|
||||
|
||||
ss.write((const char*)&iqbs, sizeof(RoF2::structs::ItemQuaternaryBodyStruct));
|
||||
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::constants::ITEM_CONTAINER_SIZE; ++x) {
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++x) {
|
||||
|
||||
if (SubSerializations[x]) {
|
||||
|
||||
@@ -6028,11 +6028,11 @@ namespace RoF2
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == SlotPowerSource) { // Main Inventory and Cursor
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // Main Inventory and Cursor
|
||||
if (PacketType == ItemPacketLoot)
|
||||
{
|
||||
RoF2Slot.Type = inventory::TypeCorpse;
|
||||
RoF2Slot.Slot = serverSlot - EQEmu::constants::CORPSE_BEGIN;
|
||||
RoF2Slot.Slot = serverSlot - EQEmu::legacy::CORPSE_BEGIN;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6040,13 +6040,13 @@ namespace RoF2
|
||||
RoF2Slot.Slot = serverSlot;
|
||||
}
|
||||
|
||||
if (serverSlot == SlotPowerSource)
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
RoF2Slot.Slot = inventory::SlotPowerSource;
|
||||
|
||||
else if (serverSlot >= SlotCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory
|
||||
RoF2Slot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= SlotAmmo) // (> 20)
|
||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // (> 20)
|
||||
RoF2Slot.Slot += 1;
|
||||
}
|
||||
|
||||
@@ -6055,51 +6055,51 @@ namespace RoF2
|
||||
RoF2Slot.MainSlot = ServerSlot - 31;
|
||||
}*/
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::constants::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
RoF2Slot.Type = inventory::TypePossessions;
|
||||
TempSlot = serverSlot - 1;
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
|
||||
if (RoF2Slot.Slot >= inventory::SlotGeneral9) // (> 30)
|
||||
RoF2Slot.Slot = inventory::SlotCursor;
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::TRIBUTE_BEGIN && serverSlot <= EQEmu::constants::TRIBUTE_END) { // Tribute
|
||||
else if (serverSlot >= EQEmu::legacy::TRIBUTE_BEGIN && serverSlot <= EQEmu::legacy::TRIBUTE_END) { // Tribute
|
||||
RoF2Slot.Type = inventory::TypeTribute;
|
||||
RoF2Slot.Slot = serverSlot - EQEmu::constants::TRIBUTE_BEGIN;
|
||||
RoF2Slot.Slot = serverSlot - EQEmu::legacy::TRIBUTE_BEGIN;
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::BANK_BEGIN && serverSlot <= EQEmu::constants::BANK_BAGS_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END) {
|
||||
RoF2Slot.Type = inventory::TypeBank;
|
||||
TempSlot = serverSlot - EQEmu::constants::BANK_BEGIN;
|
||||
TempSlot = serverSlot - EQEmu::legacy::BANK_BEGIN;
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::SHARED_BANK_BEGIN && serverSlot <= EQEmu::constants::SHARED_BANK_BAGS_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END) {
|
||||
RoF2Slot.Type = inventory::TypeSharedBank;
|
||||
TempSlot = serverSlot - EQEmu::constants::SHARED_BANK_BEGIN;
|
||||
TempSlot = serverSlot - EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::TRADE_BEGIN && serverSlot <= EQEmu::constants::TRADE_BAGS_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::TRADE_BEGIN && serverSlot <= EQEmu::legacy::TRADE_BAGS_END) {
|
||||
RoF2Slot.Type = inventory::TypeTrade;
|
||||
TempSlot = serverSlot - EQEmu::constants::TRADE_BEGIN;
|
||||
TempSlot = serverSlot - EQEmu::legacy::TRADE_BEGIN;
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) {
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6116,9 +6116,9 @@ namespace RoF2
|
||||
*/
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::WORLD_BEGIN && serverSlot <= EQEmu::constants::WORLD_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::WORLD_BEGIN && serverSlot <= EQEmu::legacy::WORLD_END) {
|
||||
RoF2Slot.Type = inventory::TypeWorld;
|
||||
TempSlot = serverSlot - EQEmu::constants::WORLD_BEGIN;
|
||||
TempSlot = serverSlot - EQEmu::legacy::WORLD_BEGIN;
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
}
|
||||
|
||||
@@ -6137,16 +6137,16 @@ namespace RoF2
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == SlotPowerSource) { // (< 52)
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // (< 52)
|
||||
RoF2Slot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == SlotPowerSource)
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
RoF2Slot.Slot = inventory::SlotPowerSource;
|
||||
|
||||
else if (serverSlot >= SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoF2Slot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= SlotAmmo) // Ammo and Personl Inventory
|
||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // Ammo and Personl Inventory
|
||||
RoF2Slot.Slot += 1;
|
||||
|
||||
/*else if (ServerSlot >= MainCursor) { // Cursor
|
||||
@@ -6157,10 +6157,10 @@ namespace RoF2
|
||||
}*/
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::constants::CURSOR_BAG_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) {
|
||||
TempSlot = serverSlot - 1;
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
}
|
||||
|
||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF2 Slots: Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, RoF2Slot.Unknown01);
|
||||
@@ -6170,7 +6170,7 @@ namespace RoF2
|
||||
|
||||
static inline uint32 ServerToRoF2CorpseSlot(uint32 serverCorpseSlot)
|
||||
{
|
||||
return (serverCorpseSlot - EQEmu::constants::CORPSE_BEGIN + 1);
|
||||
return (serverCorpseSlot - EQEmu::legacy::CORPSE_BEGIN + 1);
|
||||
}
|
||||
|
||||
static inline uint32 RoF2ToServerSlot(structs::InventorySlot_Struct rof2Slot, ItemPacketType PacketType)
|
||||
@@ -6180,7 +6180,7 @@ namespace RoF2
|
||||
|
||||
if (rof2Slot.Type == inventory::TypePossessions && rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||
if (rof2Slot.Slot == inventory::SlotPowerSource)
|
||||
TempSlot = SlotPowerSource;
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
|
||||
else if (rof2Slot.Slot >= inventory::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rof2Slot.Slot - 3;
|
||||
@@ -6203,16 +6203,16 @@ namespace RoF2
|
||||
TempSlot = rof2Slot.Slot;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == inventory::TypeBank) {
|
||||
TempSlot = EQEmu::constants::BANK_BEGIN;
|
||||
TempSlot = EQEmu::legacy::BANK_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rof2Slot.Slot;
|
||||
@@ -6221,10 +6221,10 @@ namespace RoF2
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == inventory::TypeSharedBank) {
|
||||
TempSlot = EQEmu::constants::SHARED_BANK_BEGIN;
|
||||
TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rof2Slot.Slot;
|
||||
@@ -6233,10 +6233,10 @@ namespace RoF2
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == inventory::TypeTrade) {
|
||||
TempSlot = EQEmu::constants::TRADE_BEGIN;
|
||||
TempSlot = EQEmu::legacy::TRADE_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
// OLD CODE:
|
||||
//TempSlot += 100 + (RoF2Slot.MainSlot * EmuConstants::ITEM_CONTAINER_SIZE) + RoF2Slot.SubSlot;
|
||||
|
||||
@@ -6247,7 +6247,7 @@ namespace RoF2
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == inventory::TypeWorld) {
|
||||
TempSlot = EQEmu::constants::WORLD_BEGIN;
|
||||
TempSlot = EQEmu::legacy::WORLD_BEGIN;
|
||||
|
||||
if (rof2Slot.Slot >= SUB_INDEX_BEGIN)
|
||||
TempSlot += rof2Slot.Slot;
|
||||
@@ -6269,7 +6269,7 @@ namespace RoF2
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == inventory::TypeCorpse) {
|
||||
ServerSlot = rof2Slot.Slot + EQEmu::constants::CORPSE_BEGIN;
|
||||
ServerSlot = rof2Slot.Slot + EQEmu::legacy::CORPSE_BEGIN;
|
||||
}
|
||||
|
||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert RoF2 Slots: Type %i, Unk2 %i, Main %i, Sub %i, Aug %i, Unk1 %i to Server Slot %i", rof2Slot.Type, rof2Slot.Unknown02, rof2Slot.Slot, rof2Slot.SubIndex, rof2Slot.AugIndex, rof2Slot.Unknown01, ServerSlot);
|
||||
@@ -6284,7 +6284,7 @@ namespace RoF2
|
||||
|
||||
if (rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
||||
if (rof2Slot.Slot == inventory::SlotPowerSource)
|
||||
TempSlot = SlotPowerSource;
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
|
||||
else if (rof2Slot.Slot >= inventory::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rof2Slot.Slot - 3;
|
||||
@@ -6302,7 +6302,7 @@ namespace RoF2
|
||||
TempSlot = rof2Slot.Slot;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
@@ -6314,12 +6314,12 @@ namespace RoF2
|
||||
|
||||
static inline uint32 RoF2ToServerCorpseSlot(uint32 rof2CorpseSlot)
|
||||
{
|
||||
return (rof2CorpseSlot + EQEmu::constants::CORPSE_BEGIN - 1);
|
||||
return (rof2CorpseSlot + EQEmu::legacy::CORPSE_BEGIN - 1);
|
||||
}
|
||||
|
||||
static inline void ServerToRoF2TextLink(std::string& rof2TextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::constants::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
rof2TextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -6328,7 +6328,7 @@ namespace RoF2
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
rof2TextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -6351,7 +6351,7 @@ namespace RoF2
|
||||
|
||||
static inline void RoF2ToServerTextLink(std::string& serverTextLink, const std::string& rof2TextLink)
|
||||
{
|
||||
if ((EQEmu::constants::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (rof2TextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (rof2TextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = rof2TextLink;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1084,11 +1084,11 @@ union
|
||||
/*00184*/ EquipStruct equipment[22]; // Total Slots
|
||||
};
|
||||
/*00624*/ uint32 equip2_count; // Seen 9
|
||||
/*00628*/ EquipStruct equipment2[MaterialCount]; // Appears to be Visible slots, but all 0s
|
||||
/*00628*/ EquipStruct equipment2[EQEmu::legacy::MaterialCount]; // Appears to be Visible slots, but all 0s
|
||||
/*00808*/ uint32 tint_count; // Seen 9
|
||||
/*00812*/ Color_Struct item_tint[MaterialCount]; // RR GG BB 00
|
||||
/*00812*/ Color_Struct item_tint[EQEmu::legacy::MaterialCount]; // RR GG BB 00
|
||||
/*00848*/ uint32 tint_count2; // Seen 9
|
||||
/*00852*/ Color_Struct item_tint2[MaterialCount]; // RR GG BB 00
|
||||
/*00852*/ Color_Struct item_tint2[EQEmu::legacy::MaterialCount]; // RR GG BB 00
|
||||
/*00888*/ uint8 haircolor; // Player hair color
|
||||
/*00889*/ uint8 beardcolor; // Player beard color
|
||||
/*00890*/ uint32 unknown_rof5; //
|
||||
|
||||
+23
-23
@@ -1614,7 +1614,7 @@ namespace SoD
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::constants::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
@@ -1623,7 +1623,7 @@ namespace SoD
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::constants::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
@@ -1635,13 +1635,13 @@ namespace SoD
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::constants::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// Nullify potion belt where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::constants::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -1981,7 +1981,7 @@ namespace SoD
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < MaterialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
@@ -2779,11 +2779,11 @@ namespace SoD
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
}
|
||||
@@ -3934,7 +3934,7 @@ namespace SoD
|
||||
|
||||
uint32 SubLengths[10];
|
||||
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::constants::ITEM_CONTAINER_SIZE; ++x) {
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++x) {
|
||||
|
||||
SubSerializations[x] = nullptr;
|
||||
|
||||
@@ -3946,15 +3946,15 @@ namespace SoD
|
||||
|
||||
iqbs.subitem_count++;
|
||||
|
||||
if (slot_id_in >= EQEmu::constants::GENERAL_BEGIN && slot_id_in <= EQEmu::constants::GENERAL_END) // (< 30) - no cursor?
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END) // (< 30) - no cursor?
|
||||
//SubSlotNumber = (((slot_id_in + 3) * 10) + x + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::constants::BANK_BEGIN && slot_id_in <= EQEmu::constants::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2000) * 10) + 2030 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::constants::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::constants::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2500) * 10) + 2530 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::SHARED_BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::SHARED_BANK_BAGS_BEGIN + x);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + x);
|
||||
else
|
||||
SubSlotNumber = slot_id_in; // ???????
|
||||
|
||||
@@ -3993,15 +3993,15 @@ namespace SoD
|
||||
{
|
||||
uint32 SoDSlot = 0;
|
||||
|
||||
if (serverSlot >= SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (serverSlot >= EQEmu::legacy::SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
SoDSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::constants::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::constants::CURSOR_BAG_END)
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||
SoDSlot = serverSlot + 11;
|
||||
else if (serverSlot >= EQEmu::constants::BANK_BAGS_BEGIN && serverSlot <= EQEmu::constants::BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END)
|
||||
SoDSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::constants::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::constants::SHARED_BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
SoDSlot = serverSlot + 1;
|
||||
else if (serverSlot == SlotPowerSource)
|
||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
SoDSlot = inventory::SlotPowerSource;
|
||||
else
|
||||
SoDSlot = serverSlot;
|
||||
@@ -4027,7 +4027,7 @@ namespace SoD
|
||||
else if (sodSlot >= consts::SHARED_BANK_BAGS_BEGIN && sodSlot <= consts::SHARED_BANK_BAGS_END)
|
||||
ServerSlot = sodSlot - 1;
|
||||
else if (sodSlot == inventory::SlotPowerSource)
|
||||
ServerSlot = SlotPowerSource;
|
||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
||||
else
|
||||
ServerSlot = sodSlot;
|
||||
return ServerSlot;
|
||||
@@ -4041,7 +4041,7 @@ namespace SoD
|
||||
|
||||
static inline void ServerToSoDTextLink(std::string& sodTextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::constants::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
sodTextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -4050,7 +4050,7 @@ namespace SoD
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
sodTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -4081,7 +4081,7 @@ namespace SoD
|
||||
|
||||
static inline void SoDToServerTextLink(std::string& serverTextLink, const std::string& sodTextLink)
|
||||
{
|
||||
if ((EQEmu::constants::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (sodTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (sodTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = sodTextLink;
|
||||
return;
|
||||
}
|
||||
|
||||
+21
-21
@@ -1271,7 +1271,7 @@ namespace SoF
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::constants::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
@@ -1280,7 +1280,7 @@ namespace SoF
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::constants::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
@@ -1292,13 +1292,13 @@ namespace SoF
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::constants::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// Nullify potion belt where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::constants::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -1638,7 +1638,7 @@ namespace SoF
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < MaterialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
@@ -3256,7 +3256,7 @@ namespace SoF
|
||||
|
||||
uint32 SubLengths[10];
|
||||
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::constants::ITEM_CONTAINER_SIZE; ++x) {
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++x) {
|
||||
|
||||
SubSerializations[x] = nullptr;
|
||||
const ItemInst* subitem = ((const ItemInst*)inst)->GetItem(x);
|
||||
@@ -3267,15 +3267,15 @@ namespace SoF
|
||||
|
||||
iqbs.subitem_count++;
|
||||
|
||||
if (slot_id_in >= EQEmu::constants::GENERAL_BEGIN && slot_id_in <= EQEmu::constants::GENERAL_END) // (< 30) - no cursor?
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END) // (< 30) - no cursor?
|
||||
//SubSlotNumber = (((slot_id_in + 3) * 10) + x + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::constants::BANK_BEGIN && slot_id_in <= EQEmu::constants::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2000) * 10) + 2030 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::constants::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::constants::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2500) * 10) + 2530 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::SHARED_BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::SHARED_BANK_BAGS_BEGIN + x);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + x);
|
||||
else
|
||||
SubSlotNumber = slot_id_in; // ???????
|
||||
|
||||
@@ -3312,15 +3312,15 @@ namespace SoF
|
||||
{
|
||||
uint32 SoFSlot = 0;
|
||||
|
||||
if (serverSlot >= SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (serverSlot >= EQEmu::legacy::SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::constants::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::constants::CURSOR_BAG_END)
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||
SoFSlot = serverSlot + 11;
|
||||
else if (serverSlot >= EQEmu::constants::BANK_BAGS_BEGIN && serverSlot <= EQEmu::constants::BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END)
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::constants::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::constants::SHARED_BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot == SlotPowerSource)
|
||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
SoFSlot = inventory::SlotPowerSource;
|
||||
else
|
||||
SoFSlot = serverSlot;
|
||||
@@ -3347,7 +3347,7 @@ namespace SoF
|
||||
else if (sofSlot >= consts::SHARED_BANK_BAGS_BEGIN && sofSlot <= consts::SHARED_BANK_BAGS_END)
|
||||
ServerSlot = sofSlot - 1;
|
||||
else if (sofSlot == inventory::SlotPowerSource)
|
||||
ServerSlot = SlotPowerSource;
|
||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
||||
else
|
||||
ServerSlot = sofSlot;
|
||||
|
||||
@@ -3362,7 +3362,7 @@ namespace SoF
|
||||
|
||||
static inline void ServerToSoFTextLink(std::string& sofTextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::constants::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
sofTextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -3371,7 +3371,7 @@ namespace SoF
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
sofTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -3402,7 +3402,7 @@ namespace SoF
|
||||
|
||||
static inline void SoFToServerTextLink(std::string& serverTextLink, const std::string& sofTextLink)
|
||||
{
|
||||
if ((EQEmu::constants::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (sofTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (sofTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = sofTextLink;
|
||||
return;
|
||||
}
|
||||
|
||||
+11
-11
@@ -943,7 +943,7 @@ namespace Titanium
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::constants::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
@@ -952,7 +952,7 @@ namespace Titanium
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::constants::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
@@ -964,13 +964,13 @@ namespace Titanium
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::constants::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// Nullify potion belt where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::constants::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -1199,14 +1199,14 @@ namespace Titanium
|
||||
if (eq->Race[char_index] > 473)
|
||||
eq->Race[char_index] = 1;
|
||||
|
||||
for (int index = 0; index < MaterialCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::legacy::MaterialCount; ++index) {
|
||||
eq->CS_Colors[char_index][index].Color = emu_cse->Equip[index].Color.Color;
|
||||
}
|
||||
|
||||
eq->BeardColor[char_index] = emu_cse->BeardColor;
|
||||
eq->HairStyle[char_index] = emu_cse->HairStyle;
|
||||
|
||||
for (int index = 0; index < MaterialCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::legacy::MaterialCount; ++index) {
|
||||
eq->Equip[char_index][index] = emu_cse->Equip[index].Material;
|
||||
}
|
||||
|
||||
@@ -1236,14 +1236,14 @@ namespace Titanium
|
||||
for (; char_index < 10; ++char_index) {
|
||||
eq->Race[char_index] = 0;
|
||||
|
||||
for (int index = 0; index < MaterialCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::legacy::MaterialCount; ++index) {
|
||||
eq->CS_Colors[char_index][index].Color = 0;
|
||||
}
|
||||
|
||||
eq->BeardColor[char_index] = 0;
|
||||
eq->HairStyle[char_index] = 0;
|
||||
|
||||
for (int index = 0; index < MaterialCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::legacy::MaterialCount; ++index) {
|
||||
eq->Equip[char_index][index] = 0;
|
||||
}
|
||||
|
||||
@@ -2198,7 +2198,7 @@ namespace Titanium
|
||||
|
||||
static inline void ServerToTitaniumTextLink(std::string& titaniumTextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::constants::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
titaniumTextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -2207,7 +2207,7 @@ namespace Titanium
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
titaniumTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -2238,7 +2238,7 @@ namespace Titanium
|
||||
|
||||
static inline void TitaniumToServerTextLink(std::string& serverTextLink, const std::string& titaniumTextLink)
|
||||
{
|
||||
if ((EQEmu::constants::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (titaniumTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (titaniumTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = titaniumTextLink;
|
||||
return;
|
||||
}
|
||||
|
||||
+25
-25
@@ -1878,7 +1878,7 @@ namespace UF
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::constants::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
@@ -1887,7 +1887,7 @@ namespace UF
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::constants::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
@@ -1899,13 +1899,13 @@ namespace UF
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::constants::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// Nullify potion belt where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::constants::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -2274,7 +2274,7 @@ namespace UF
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < MaterialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
@@ -3053,19 +3053,19 @@ namespace UF
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
if (emu->equipment[MaterialPrimary].Material > 99999) {
|
||||
if (emu->equipment[EQEmu::legacy::MaterialPrimary].Material > 99999) {
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 63);
|
||||
} else {
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialPrimary].Material);
|
||||
}
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
if (emu->equipment[MaterialSecondary].Material > 99999) {
|
||||
if (emu->equipment[EQEmu::legacy::MaterialSecondary].Material > 99999) {
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 63);
|
||||
} else {
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialSecondary].Material);
|
||||
}
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
@@ -4263,7 +4263,7 @@ namespace UF
|
||||
|
||||
uint32 SubLengths[10];
|
||||
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::constants::ITEM_CONTAINER_SIZE; ++x) {
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++x) {
|
||||
|
||||
SubSerializations[x] = nullptr;
|
||||
|
||||
@@ -4275,15 +4275,15 @@ namespace UF
|
||||
|
||||
iqbs.subitem_count++;
|
||||
|
||||
if (slot_id_in >= EQEmu::constants::GENERAL_BEGIN && slot_id_in <= EQEmu::constants::GENERAL_END) // (< 30) - no cursor?
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END) // (< 30) - no cursor?
|
||||
//SubSlotNumber = (((slot_id_in + 3) * 10) + x + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::constants::BANK_BEGIN && slot_id_in <= EQEmu::constants::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2000) * 10) + 2030 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::constants::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::constants::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2500) * 10) + 2530 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::SHARED_BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::SHARED_BANK_BAGS_BEGIN + x);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + x);
|
||||
else
|
||||
SubSlotNumber = slot_id_in; // ???????
|
||||
|
||||
@@ -4322,15 +4322,15 @@ namespace UF
|
||||
{
|
||||
uint32 UnderfootSlot = 0;
|
||||
|
||||
if (serverSlot >= SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (serverSlot >= EQEmu::legacy::SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
UnderfootSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::constants::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::constants::CURSOR_BAG_END)
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||
UnderfootSlot = serverSlot + 11;
|
||||
else if (serverSlot >= EQEmu::constants::BANK_BAGS_BEGIN && serverSlot <= EQEmu::constants::BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END)
|
||||
UnderfootSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::constants::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::constants::SHARED_BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
UnderfootSlot = serverSlot + 1;
|
||||
else if (serverSlot == SlotPowerSource)
|
||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
UnderfootSlot = inventory::SlotPowerSource;
|
||||
else
|
||||
UnderfootSlot = serverSlot;
|
||||
@@ -4357,7 +4357,7 @@ namespace UF
|
||||
else if (ufSlot >= consts::SHARED_BANK_BAGS_BEGIN && ufSlot <= consts::SHARED_BANK_BAGS_END)
|
||||
ServerSlot = ufSlot - 1;
|
||||
else if (ufSlot == inventory::SlotPowerSource)
|
||||
ServerSlot = SlotPowerSource;
|
||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
||||
else
|
||||
ServerSlot = ufSlot;
|
||||
|
||||
@@ -4372,7 +4372,7 @@ namespace UF
|
||||
|
||||
static inline void ServerToUFTextLink(std::string& ufTextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::constants::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
ufTextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -4381,7 +4381,7 @@ namespace UF
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
ufTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -4412,7 +4412,7 @@ namespace UF
|
||||
|
||||
static inline void UFToServerTextLink(std::string& serverTextLink, const std::string& ufTextLink)
|
||||
{
|
||||
if ((EQEmu::constants::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (ufTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (ufTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = ufTextLink;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user