mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 00:46:46 +00:00
Merge branch 'master' into tasks
This commit is contained in:
+96
-96
@@ -2224,12 +2224,12 @@ namespace RoF
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
outapp->WriteUInt32(profile::BandoliersSize);
|
||||
outapp->WriteUInt32(profile::BANDOLIERS_SIZE);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (uint32 r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) {
|
||||
for (uint32 r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
outapp->WriteString(emu->bandoliers[r].Name);
|
||||
for (uint32 j = 0; j < profile::BandolierItemCount; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 j = 0; j < profile::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString(emu->bandoliers[r].Items[j].Name);
|
||||
outapp->WriteUInt32(emu->bandoliers[r].Items[j].ID);
|
||||
if (emu->bandoliers[r].Items[j].Icon) {
|
||||
@@ -2242,19 +2242,19 @@ namespace RoF
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (uint32 r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) {
|
||||
for (uint32 r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
outapp->WriteString("");
|
||||
for (uint32 j = 0; j < profile::BandolierItemCount; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 j = 0; j < profile::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString("");
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteSInt32(-1);
|
||||
}
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(profile::PotionBeltSize);
|
||||
outapp->WriteUInt32(profile::POTION_BELT_SIZE);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (uint32 r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++r) {
|
||||
for (uint32 r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) {
|
||||
outapp->WriteString(emu->potionbelt.Items[r].Name);
|
||||
outapp->WriteUInt32(emu->potionbelt.Items[r].ID);
|
||||
if (emu->potionbelt.Items[r].Icon) {
|
||||
@@ -2266,7 +2266,7 @@ namespace RoF
|
||||
}
|
||||
}
|
||||
// Nullify potion belt where server and client indexes diverge, with a client bias
|
||||
for (uint32 r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) {
|
||||
for (uint32 r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
outapp->WriteString("");
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteSInt32(-1);
|
||||
@@ -2387,9 +2387,9 @@ namespace RoF
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
outapp->WriteUInt32(EQEmu::legacy::TRIBUTE_SIZE);
|
||||
outapp->WriteUInt32(EQEmu::invtype::TRIBUTE_SIZE);
|
||||
|
||||
for (uint32 r = 0; r < EQEmu::legacy::TRIBUTE_SIZE; r++)
|
||||
for (uint32 r = 0; r < EQEmu::invtype::TRIBUTE_SIZE; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->tributes[r].tribute);
|
||||
outapp->WriteUInt32(emu->tributes[r].tier);
|
||||
@@ -2880,7 +2880,7 @@ namespace RoF
|
||||
|
||||
size_t names_length = 0;
|
||||
size_t character_count = 0;
|
||||
for (; character_count < emu->CharCount && character_count < constants::SayLinkBodySize; ++character_count) {
|
||||
for (; character_count < emu->CharCount && character_count < constants::CHARACTER_CREATION_LIMIT; ++character_count) {
|
||||
emu_cse = (CharacterSelectEntry_Struct *)emu_ptr;
|
||||
names_length += strlen(emu_cse->Name);
|
||||
emu_ptr += sizeof(CharacterSelectEntry_Struct);
|
||||
@@ -4700,7 +4700,7 @@ namespace RoF
|
||||
|
||||
IN(item_id);
|
||||
int r;
|
||||
for (r = EQEmu::inventory::socketBegin; r < EQEmu::inventory::SocketCount; r++) {
|
||||
for (r = EQEmu::invaug::SOCKET_BEGIN; r <= EQEmu::invaug::SOCKET_END; r++) {
|
||||
IN(augments[r]);
|
||||
}
|
||||
IN(link_hash);
|
||||
@@ -5094,7 +5094,7 @@ namespace RoF
|
||||
|
||||
structs::InventorySlot_Struct slot_id = ServerToRoFSlot(slot_id_in);
|
||||
|
||||
hdr.slot_type = (inst->GetMerchantSlot() ? invtype::InvTypeMerchant : slot_id.Type);
|
||||
hdr.slot_type = (inst->GetMerchantSlot() ? invtype::typeMerchant : slot_id.Type);
|
||||
hdr.main_slot = (inst->GetMerchantSlot() ? inst->GetMerchantSlot() : slot_id.Slot);
|
||||
hdr.sub_slot = (inst->GetMerchantSlot() ? 0xffff : slot_id.SubIndex);
|
||||
hdr.aug_slot = (inst->GetMerchantSlot() ? 0xffff : slot_id.AugIndex);
|
||||
@@ -5188,7 +5188,7 @@ namespace RoF
|
||||
ibs.nodrop = item->NoDrop;
|
||||
ibs.attune = item->Attuneable;
|
||||
ibs.size = item->Size;
|
||||
ibs.slots = SwapBits21and22(item->Slots);
|
||||
ibs.slots = SwapBits21And22(item->Slots);
|
||||
ibs.price = item->Price;
|
||||
ibs.icon = item->Icon;
|
||||
ibs.unknown1 = 1;
|
||||
@@ -5282,7 +5282,7 @@ namespace RoF
|
||||
isbs.augdistiller = 65535;
|
||||
isbs.augrestrict = item->AugRestrict;
|
||||
|
||||
for (int index = 0; index < invaug::ItemAugSize; ++index) {
|
||||
for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) {
|
||||
isbs.augslots[index].type = item->AugSlotType[index];
|
||||
isbs.augslots[index].visible = item->AugSlotVisible[index];
|
||||
isbs.augslots[index].unknown = item->AugSlotUnk2[index];
|
||||
@@ -5492,18 +5492,18 @@ namespace RoF
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||
for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
int SubSlotNumber = INVALID_INDEX;
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
if (slot_id_in >= EQEmu::invslot::GENERAL_BEGIN && slot_id_in <= EQEmu::invslot::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::invbag::SLOT_COUNT) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::invslot::BANK_BEGIN && slot_id_in <= EQEmu::invslot::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::invslot::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + index);
|
||||
else
|
||||
SubSlotNumber = slot_id_in;
|
||||
|
||||
@@ -5529,17 +5529,17 @@ namespace RoF
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // Main Inventory and Cursor
|
||||
RoFSlot.Type = invtype::InvTypePossessions;
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) { // Main Inventory and Cursor
|
||||
RoFSlot.Type = invtype::typePossessions;
|
||||
RoFSlot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
RoFSlot.Slot = invslot::PossessionsPowerSource;
|
||||
if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE)
|
||||
RoFSlot.Slot = invslot::slotPowerSource;
|
||||
|
||||
else if (serverSlot >= EQEmu::inventory::slotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::invslot::slotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoFSlot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= EQEmu::inventory::slotAmmo) // (> 20)
|
||||
else if (serverSlot >= EQEmu::invslot::slotAmmo) // (> 20)
|
||||
RoFSlot.Slot += 1;
|
||||
}
|
||||
|
||||
@@ -5548,51 +5548,51 @@ namespace RoF
|
||||
RoFSlot.MainSlot = ServerSlot - 31;
|
||||
}*/
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
RoFSlot.Type = invtype::InvTypePossessions;
|
||||
else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
RoFSlot.Type = invtype::typePossessions;
|
||||
TempSlot = serverSlot - 1;
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::inventory::ContainerCount);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::invbag::SLOT_COUNT);
|
||||
|
||||
if (RoFSlot.Slot >= invslot::PossessionsGeneral9) // (> 30)
|
||||
RoFSlot.Slot = invslot::PossessionsCursor;
|
||||
if (RoFSlot.Slot >= invslot::slotGeneral9) // (> 30)
|
||||
RoFSlot.Slot = invslot::slotCursor;
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::TRIBUTE_BEGIN && serverSlot <= EQEmu::legacy::TRIBUTE_END) { // Tribute
|
||||
RoFSlot.Type = invtype::InvTypeTribute;
|
||||
RoFSlot.Slot = serverSlot - EQEmu::legacy::TRIBUTE_BEGIN;
|
||||
else if (serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN && serverSlot <= EQEmu::invslot::TRIBUTE_END) { // Tribute
|
||||
RoFSlot.Type = invtype::typeTribute;
|
||||
RoFSlot.Slot = serverSlot - EQEmu::invslot::TRIBUTE_BEGIN;
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END) {
|
||||
RoFSlot.Type = invtype::InvTypeBank;
|
||||
TempSlot = serverSlot - EQEmu::legacy::BANK_BEGIN;
|
||||
else if (serverSlot >= EQEmu::invslot::BANK_BEGIN && serverSlot <= EQEmu::invbag::BANK_BAGS_END) {
|
||||
RoFSlot.Type = invtype::typeBank;
|
||||
TempSlot = serverSlot - EQEmu::invslot::BANK_BEGIN;
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT);
|
||||
}
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END) {
|
||||
RoFSlot.Type = invtype::InvTypeSharedBank;
|
||||
TempSlot = serverSlot - EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
else if (serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN && serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END) {
|
||||
RoFSlot.Type = invtype::typeSharedBank;
|
||||
TempSlot = serverSlot - EQEmu::invslot::SHARED_BANK_BEGIN;
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT);
|
||||
}
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::TRADE_BEGIN && serverSlot <= EQEmu::legacy::TRADE_BAGS_END) {
|
||||
RoFSlot.Type = invtype::InvTypeTrade;
|
||||
TempSlot = serverSlot - EQEmu::legacy::TRADE_BEGIN;
|
||||
else if (serverSlot >= EQEmu::invslot::TRADE_BEGIN && serverSlot <= EQEmu::invbag::TRADE_BAGS_END) {
|
||||
RoFSlot.Type = invtype::typeTrade;
|
||||
TempSlot = serverSlot - EQEmu::invslot::TRADE_BEGIN;
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) {
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -5609,9 +5609,9 @@ namespace RoF
|
||||
*/
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::WORLD_BEGIN && serverSlot <= EQEmu::legacy::WORLD_END) {
|
||||
RoFSlot.Type = invtype::InvTypeWorld;
|
||||
TempSlot = serverSlot - EQEmu::legacy::WORLD_BEGIN;
|
||||
else if (serverSlot >= EQEmu::invslot::WORLD_BEGIN && serverSlot <= EQEmu::invslot::WORLD_END) {
|
||||
RoFSlot.Type = invtype::typeWorld;
|
||||
TempSlot = serverSlot - EQEmu::invslot::WORLD_BEGIN;
|
||||
RoFSlot.Slot = TempSlot;
|
||||
}
|
||||
|
||||
@@ -5630,16 +5630,16 @@ namespace RoF
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // (< 52)
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) { // (< 52)
|
||||
RoFSlot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
RoFSlot.Slot = invslot::PossessionsPowerSource;
|
||||
if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE)
|
||||
RoFSlot.Slot = invslot::slotPowerSource;
|
||||
|
||||
else if (serverSlot >= EQEmu::inventory::slotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::invslot::slotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoFSlot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= EQEmu::inventory::slotAmmo) // Ammo and Personl Inventory
|
||||
else if (serverSlot >= EQEmu::invslot::slotAmmo) // Ammo and Personl Inventory
|
||||
RoFSlot.Slot += 1;
|
||||
|
||||
/*else if (ServerSlot >= MainCursor) { // Cursor
|
||||
@@ -5650,10 +5650,10 @@ namespace RoF
|
||||
}*/
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) {
|
||||
else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) {
|
||||
TempSlot = serverSlot - 1;
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::inventory::ContainerCount);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::invbag::SLOT_COUNT);
|
||||
}
|
||||
|
||||
Log(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);
|
||||
@@ -5671,11 +5671,11 @@ namespace RoF
|
||||
uint32 ServerSlot = INVALID_INDEX;
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (rofSlot.Type == invtype::InvTypePossessions && rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||
if (rofSlot.Slot == invslot::PossessionsPowerSource)
|
||||
TempSlot = EQEmu::inventory::slotPowerSource;
|
||||
if (rofSlot.Type == invtype::typePossessions && rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||
if (rofSlot.Slot == invslot::slotPowerSource)
|
||||
TempSlot = EQEmu::invslot::SLOT_POWER_SOURCE;
|
||||
|
||||
else if (rofSlot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (rofSlot.Slot >= invslot::slotCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rofSlot.Slot - 3;
|
||||
|
||||
/*else if (RoFSlot.MainSlot == slots::MainGeneral9 || RoFSlot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF inventory/corpse slots
|
||||
@@ -5689,23 +5689,23 @@ namespace RoF
|
||||
// For now, it's probably best to leave as-is and let this work itself out in the inventory rework.
|
||||
}*/
|
||||
|
||||
else if (rofSlot.Slot >= invslot::PossessionsAmmo) // Ammo and Main Inventory
|
||||
else if (rofSlot.Slot >= invslot::slotAmmo) // Ammo and Main Inventory
|
||||
TempSlot = rofSlot.Slot - 1;
|
||||
|
||||
else // Worn Slots
|
||||
TempSlot = rofSlot.Slot;
|
||||
|
||||
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||
if (rofSlot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::invbag::SLOT_COUNT) + rofSlot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rofSlot.Type == invtype::InvTypeBank) {
|
||||
TempSlot = EQEmu::legacy::BANK_BEGIN;
|
||||
else if (rofSlot.Type == invtype::typeBank) {
|
||||
TempSlot = EQEmu::invslot::BANK_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||
if (rofSlot.SubIndex >= EQEmu::invbag::SLOT_BEGIN)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rofSlot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rofSlot.Slot;
|
||||
@@ -5713,11 +5713,11 @@ namespace RoF
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rofSlot.Type == invtype::InvTypeSharedBank) {
|
||||
TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
else if (rofSlot.Type == invtype::typeSharedBank) {
|
||||
TempSlot = EQEmu::invslot::SHARED_BANK_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||
if (rofSlot.SubIndex >= EQEmu::invbag::SLOT_BEGIN)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rofSlot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rofSlot.Slot;
|
||||
@@ -5725,11 +5725,11 @@ namespace RoF
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rofSlot.Type == invtype::InvTypeTrade) {
|
||||
TempSlot = EQEmu::legacy::TRADE_BEGIN;
|
||||
else if (rofSlot.Type == invtype::typeTrade) {
|
||||
TempSlot = EQEmu::invslot::TRADE_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||
if (rofSlot.SubIndex >= EQEmu::invbag::SLOT_BEGIN)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rofSlot.SubIndex + 1;
|
||||
// OLD CODE:
|
||||
//TempSlot += 100 + (RoFSlot.MainSlot * EQEmu::inventory::ContainerCount) + RoFSlot.SubSlot;
|
||||
|
||||
@@ -5739,10 +5739,10 @@ namespace RoF
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rofSlot.Type == invtype::InvTypeWorld) {
|
||||
TempSlot = EQEmu::legacy::WORLD_BEGIN;
|
||||
else if (rofSlot.Type == invtype::typeWorld) {
|
||||
TempSlot = EQEmu::invslot::WORLD_BEGIN;
|
||||
|
||||
if (rofSlot.Slot >= EQEmu::inventory::containerBegin)
|
||||
if (rofSlot.Slot >= EQEmu::invbag::SLOT_BEGIN)
|
||||
TempSlot += rofSlot.Slot;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
@@ -5757,7 +5757,7 @@ namespace RoF
|
||||
ServerSlot = TempSlot;
|
||||
}*/
|
||||
|
||||
else if (rofSlot.Type == invtype::InvTypeGuildTribute) {
|
||||
else if (rofSlot.Type == invtype::typeGuildTribute) {
|
||||
ServerSlot = INVALID_INDEX;
|
||||
}
|
||||
|
||||
@@ -5772,10 +5772,10 @@ namespace RoF
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
||||
if (rofSlot.Slot == invslot::PossessionsPowerSource)
|
||||
TempSlot = EQEmu::inventory::slotPowerSource;
|
||||
if (rofSlot.Slot == invslot::slotPowerSource)
|
||||
TempSlot = EQEmu::invslot::SLOT_POWER_SOURCE;
|
||||
|
||||
else if (rofSlot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (rofSlot.Slot >= invslot::slotCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rofSlot.Slot - 3;
|
||||
|
||||
/*else if (RoFSlot.MainSlot == slots::MainGeneral9 || RoFSlot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF inventory slots
|
||||
@@ -5784,14 +5784,14 @@ namespace RoF
|
||||
// Same as above
|
||||
}*/
|
||||
|
||||
else if (rofSlot.Slot >= invslot::PossessionsAmmo) // Main Inventory and Ammo Slots
|
||||
else if (rofSlot.Slot >= invslot::slotAmmo) // Main Inventory and Ammo Slots
|
||||
TempSlot = rofSlot.Slot - 1;
|
||||
|
||||
else
|
||||
TempSlot = rofSlot.Slot;
|
||||
|
||||
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||
if (rofSlot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::invbag::SLOT_COUNT) + rofSlot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
@@ -5808,7 +5808,7 @@ namespace RoF
|
||||
|
||||
static inline void ServerToRoFSayLink(std::string& rofSayLink, const std::string& serverSayLink)
|
||||
{
|
||||
if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
rofSayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -5817,7 +5817,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::SayLinkBodySize) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) {
|
||||
rofSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -5847,7 +5847,7 @@ namespace RoF
|
||||
|
||||
static inline void RoFToServerSayLink(std::string& serverSayLink, const std::string& rofSayLink)
|
||||
{
|
||||
if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (rofSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (rofSayLink.find('\x12') == std::string::npos)) {
|
||||
serverSayLink = rofSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -5856,7 +5856,7 @@ namespace RoF
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) {
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
|
||||
+102
-102
@@ -2301,12 +2301,12 @@ namespace RoF2
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
outapp->WriteUInt32(profile::BandoliersSize);
|
||||
outapp->WriteUInt32(profile::BANDOLIERS_SIZE);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (uint32 r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) {
|
||||
for (uint32 r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
outapp->WriteString(emu->bandoliers[r].Name);
|
||||
for (uint32 j = 0; j < profile::BandolierItemCount; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 j = 0; j < profile::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString(emu->bandoliers[r].Items[j].Name);
|
||||
outapp->WriteUInt32(emu->bandoliers[r].Items[j].ID);
|
||||
if (emu->bandoliers[r].Items[j].Icon) {
|
||||
@@ -2319,19 +2319,19 @@ namespace RoF2
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (uint32 r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) {
|
||||
for (uint32 r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
outapp->WriteString("");
|
||||
for (uint32 j = 0; j < profile::BandolierItemCount; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 j = 0; j < profile::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString("");
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteSInt32(-1);
|
||||
}
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(profile::PotionBeltSize);
|
||||
outapp->WriteUInt32(profile::POTION_BELT_SIZE);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (uint32 r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++r) {
|
||||
for (uint32 r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) {
|
||||
outapp->WriteString(emu->potionbelt.Items[r].Name);
|
||||
outapp->WriteUInt32(emu->potionbelt.Items[r].ID);
|
||||
if (emu->potionbelt.Items[r].Icon) {
|
||||
@@ -2343,7 +2343,7 @@ namespace RoF2
|
||||
}
|
||||
}
|
||||
// Nullify potion belt where server and client indexes diverge, with a client bias
|
||||
for (uint32 r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) {
|
||||
for (uint32 r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
outapp->WriteString("");
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteSInt32(-1);
|
||||
@@ -2460,9 +2460,9 @@ namespace RoF2
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
outapp->WriteUInt32(EQEmu::legacy::TRIBUTE_SIZE);
|
||||
outapp->WriteUInt32(EQEmu::invtype::TRIBUTE_SIZE);
|
||||
|
||||
for (uint32 r = 0; r < EQEmu::legacy::TRIBUTE_SIZE; r++)
|
||||
for (uint32 r = 0; r < EQEmu::invtype::TRIBUTE_SIZE; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->tributes[r].tribute);
|
||||
outapp->WriteUInt32(emu->tributes[r].tier);
|
||||
@@ -2967,7 +2967,7 @@ namespace RoF2
|
||||
|
||||
size_t names_length = 0;
|
||||
size_t character_count = 0;
|
||||
for (; character_count < emu->CharCount && character_count < constants::CharacterCreationLimit; ++character_count) {
|
||||
for (; character_count < emu->CharCount && character_count < constants::CHARACTER_CREATION_LIMIT; ++character_count) {
|
||||
emu_cse = (CharacterSelectEntry_Struct *)emu_ptr;
|
||||
names_length += strlen(emu_cse->Name);
|
||||
emu_ptr += sizeof(CharacterSelectEntry_Struct);
|
||||
@@ -4940,7 +4940,7 @@ namespace RoF2
|
||||
|
||||
IN(item_id);
|
||||
int r;
|
||||
for (r = EQEmu::inventory::socketBegin; r < EQEmu::inventory::SocketCount; r++) {
|
||||
for (r = EQEmu::invaug::SOCKET_BEGIN; r <= EQEmu::invaug::SOCKET_END; r++) {
|
||||
IN(augments[r]);
|
||||
}
|
||||
IN(link_hash);
|
||||
@@ -5389,7 +5389,7 @@ namespace RoF2
|
||||
|
||||
structs::InventorySlot_Struct slot_id = ServerToRoF2Slot(slot_id_in, packet_type);
|
||||
|
||||
hdr.slot_type = (inst->GetMerchantSlot() ? invtype::InvTypeMerchant : slot_id.Type);
|
||||
hdr.slot_type = (inst->GetMerchantSlot() ? invtype::typeMerchant : slot_id.Type);
|
||||
hdr.main_slot = (inst->GetMerchantSlot() ? inst->GetMerchantSlot() : slot_id.Slot);
|
||||
hdr.sub_slot = (inst->GetMerchantSlot() ? 0xffff : slot_id.SubIndex);
|
||||
hdr.aug_slot = (inst->GetMerchantSlot() ? 0xffff : slot_id.AugIndex);
|
||||
@@ -5483,7 +5483,7 @@ namespace RoF2
|
||||
ibs.nodrop = item->NoDrop;
|
||||
ibs.attune = item->Attuneable;
|
||||
ibs.size = item->Size;
|
||||
ibs.slots = SwapBits21and22(item->Slots);
|
||||
ibs.slots = SwapBits21And22(item->Slots);
|
||||
ibs.price = item->Price;
|
||||
ibs.icon = item->Icon;
|
||||
ibs.unknown1 = 1;
|
||||
@@ -5577,7 +5577,7 @@ namespace RoF2
|
||||
isbs.augrestrict2 = -1;
|
||||
isbs.augrestrict = item->AugRestrict;
|
||||
|
||||
for (int index = 0; index < invaug::ItemAugSize; ++index) {
|
||||
for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) {
|
||||
isbs.augslots[index].type = item->AugSlotType[index];
|
||||
isbs.augslots[index].visible = item->AugSlotVisible[index];
|
||||
isbs.augslots[index].unknown = item->AugSlotUnk2[index];
|
||||
@@ -5797,18 +5797,18 @@ namespace RoF2
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||
for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
int SubSlotNumber = INVALID_INDEX;
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
if (slot_id_in >= EQEmu::invslot::GENERAL_BEGIN && slot_id_in <= EQEmu::invslot::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::invbag::SLOT_COUNT) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::invslot::BANK_BEGIN && slot_id_in <= EQEmu::invslot::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::invslot::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + index);
|
||||
else
|
||||
SubSlotNumber = slot_id_in;
|
||||
|
||||
@@ -5834,25 +5834,25 @@ namespace RoF2
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // Main Inventory and Cursor
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) { // Main Inventory and Cursor
|
||||
if (PacketType == ItemPacketLoot)
|
||||
{
|
||||
RoF2Slot.Type = invtype::InvTypeCorpse;
|
||||
RoF2Slot.Slot = serverSlot - EQEmu::legacy::CORPSE_BEGIN;
|
||||
RoF2Slot.Type = invtype::typeCorpse;
|
||||
RoF2Slot.Slot = serverSlot - EQEmu::invslot::CORPSE_BEGIN;
|
||||
}
|
||||
else
|
||||
{
|
||||
RoF2Slot.Type = invtype::InvTypePossessions;
|
||||
RoF2Slot.Type = invtype::typePossessions;
|
||||
RoF2Slot.Slot = serverSlot;
|
||||
}
|
||||
|
||||
if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
RoF2Slot.Slot = invslot::PossessionsPowerSource;
|
||||
if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE)
|
||||
RoF2Slot.Slot = invslot::slotPowerSource;
|
||||
|
||||
else if (serverSlot >= EQEmu::inventory::slotCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::invslot::slotCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory
|
||||
RoF2Slot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= EQEmu::inventory::slotAmmo) // (> 20)
|
||||
else if (serverSlot >= EQEmu::invslot::slotAmmo) // (> 20)
|
||||
RoF2Slot.Slot += 1;
|
||||
}
|
||||
|
||||
@@ -5861,51 +5861,51 @@ namespace RoF2
|
||||
RoF2Slot.MainSlot = ServerSlot - 31;
|
||||
}*/
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
RoF2Slot.Type = invtype::InvTypePossessions;
|
||||
else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
RoF2Slot.Type = invtype::typePossessions;
|
||||
TempSlot = serverSlot - 1;
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::inventory::ContainerCount);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::invbag::SLOT_COUNT);
|
||||
|
||||
if (RoF2Slot.Slot >= invslot::PossessionsGeneral9) // (> 30)
|
||||
RoF2Slot.Slot = invslot::PossessionsCursor;
|
||||
if (RoF2Slot.Slot >= invslot::slotGeneral9) // (> 30)
|
||||
RoF2Slot.Slot = invslot::slotCursor;
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::TRIBUTE_BEGIN && serverSlot <= EQEmu::legacy::TRIBUTE_END) { // Tribute
|
||||
RoF2Slot.Type = invtype::InvTypeTribute;
|
||||
RoF2Slot.Slot = serverSlot - EQEmu::legacy::TRIBUTE_BEGIN;
|
||||
else if (serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN && serverSlot <= EQEmu::invslot::TRIBUTE_END) { // Tribute
|
||||
RoF2Slot.Type = invtype::typeTribute;
|
||||
RoF2Slot.Slot = serverSlot - EQEmu::invslot::TRIBUTE_BEGIN;
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END) {
|
||||
RoF2Slot.Type = invtype::InvTypeBank;
|
||||
TempSlot = serverSlot - EQEmu::legacy::BANK_BEGIN;
|
||||
else if (serverSlot >= EQEmu::invslot::BANK_BEGIN && serverSlot <= EQEmu::invbag::BANK_BAGS_END) {
|
||||
RoF2Slot.Type = invtype::typeBank;
|
||||
TempSlot = serverSlot - EQEmu::invslot::BANK_BEGIN;
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT);
|
||||
}
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END) {
|
||||
RoF2Slot.Type = invtype::InvTypeSharedBank;
|
||||
TempSlot = serverSlot - EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
else if (serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN && serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END) {
|
||||
RoF2Slot.Type = invtype::typeSharedBank;
|
||||
TempSlot = serverSlot - EQEmu::invslot::SHARED_BANK_BEGIN;
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT);
|
||||
}
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::TRADE_BEGIN && serverSlot <= EQEmu::legacy::TRADE_BAGS_END) {
|
||||
RoF2Slot.Type = invtype::InvTypeTrade;
|
||||
TempSlot = serverSlot - EQEmu::legacy::TRADE_BEGIN;
|
||||
else if (serverSlot >= EQEmu::invslot::TRADE_BEGIN && serverSlot <= EQEmu::invbag::TRADE_BAGS_END) {
|
||||
RoF2Slot.Type = invtype::typeTrade;
|
||||
TempSlot = serverSlot - EQEmu::invslot::TRADE_BEGIN;
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) {
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -5922,9 +5922,9 @@ namespace RoF2
|
||||
*/
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::WORLD_BEGIN && serverSlot <= EQEmu::legacy::WORLD_END) {
|
||||
RoF2Slot.Type = invtype::InvTypeWorld;
|
||||
TempSlot = serverSlot - EQEmu::legacy::WORLD_BEGIN;
|
||||
else if (serverSlot >= EQEmu::invslot::WORLD_BEGIN && serverSlot <= EQEmu::invslot::WORLD_END) {
|
||||
RoF2Slot.Type = invtype::typeWorld;
|
||||
TempSlot = serverSlot - EQEmu::invslot::WORLD_BEGIN;
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
}
|
||||
|
||||
@@ -5943,16 +5943,16 @@ namespace RoF2
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // (< 52)
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) { // (< 52)
|
||||
RoF2Slot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
RoF2Slot.Slot = invslot::PossessionsPowerSource;
|
||||
if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE)
|
||||
RoF2Slot.Slot = invslot::slotPowerSource;
|
||||
|
||||
else if (serverSlot >= EQEmu::inventory::slotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::invslot::slotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoF2Slot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= EQEmu::inventory::slotAmmo) // Ammo and Personl Inventory
|
||||
else if (serverSlot >= EQEmu::invslot::slotAmmo) // Ammo and Personl Inventory
|
||||
RoF2Slot.Slot += 1;
|
||||
|
||||
/*else if (ServerSlot >= MainCursor) { // Cursor
|
||||
@@ -5963,10 +5963,10 @@ namespace RoF2
|
||||
}*/
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) {
|
||||
else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) {
|
||||
TempSlot = serverSlot - 1;
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::inventory::ContainerCount);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::invbag::SLOT_COUNT);
|
||||
}
|
||||
|
||||
Log(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);
|
||||
@@ -5976,7 +5976,7 @@ namespace RoF2
|
||||
|
||||
static inline uint32 ServerToRoF2CorpseSlot(uint32 serverCorpseSlot)
|
||||
{
|
||||
return (serverCorpseSlot - EQEmu::legacy::CORPSE_BEGIN + 1);
|
||||
return (serverCorpseSlot - EQEmu::invslot::CORPSE_BEGIN + 1);
|
||||
}
|
||||
|
||||
static inline uint32 RoF2ToServerSlot(structs::InventorySlot_Struct rof2Slot, ItemPacketType PacketType)
|
||||
@@ -5984,11 +5984,11 @@ namespace RoF2
|
||||
uint32 ServerSlot = INVALID_INDEX;
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (rof2Slot.Type == invtype::InvTypePossessions && rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||
if (rof2Slot.Slot == invslot::PossessionsPowerSource)
|
||||
TempSlot = EQEmu::inventory::slotPowerSource;
|
||||
if (rof2Slot.Type == invtype::typePossessions && rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||
if (rof2Slot.Slot == invslot::slotPowerSource)
|
||||
TempSlot = EQEmu::invslot::SLOT_POWER_SOURCE;
|
||||
|
||||
else if (rof2Slot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (rof2Slot.Slot >= invslot::slotCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rof2Slot.Slot - 3;
|
||||
|
||||
/*else if (RoF2Slot.MainSlot == slots::MainGeneral9 || RoF2Slot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF2 inventory/corpse slots
|
||||
@@ -6002,23 +6002,23 @@ namespace RoF2
|
||||
// For now, it's probably best to leave as-is and let this work itself out in the inventory rework.
|
||||
}*/
|
||||
|
||||
else if (rof2Slot.Slot >= invslot::PossessionsAmmo) // Ammo and Main Inventory
|
||||
else if (rof2Slot.Slot >= invslot::slotAmmo) // Ammo and Main Inventory
|
||||
TempSlot = rof2Slot.Slot - 1;
|
||||
|
||||
else // Worn Slots
|
||||
TempSlot = rof2Slot.Slot;
|
||||
|
||||
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||
if (rof2Slot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::invbag::SLOT_COUNT) + rof2Slot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == invtype::InvTypeBank) {
|
||||
TempSlot = EQEmu::legacy::BANK_BEGIN;
|
||||
else if (rof2Slot.Type == invtype::typeBank) {
|
||||
TempSlot = EQEmu::invslot::BANK_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||
if (rof2Slot.SubIndex >= EQEmu::invbag::SLOT_BEGIN)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rof2Slot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rof2Slot.Slot;
|
||||
@@ -6026,11 +6026,11 @@ namespace RoF2
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == invtype::InvTypeSharedBank) {
|
||||
TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
else if (rof2Slot.Type == invtype::typeSharedBank) {
|
||||
TempSlot = EQEmu::invslot::SHARED_BANK_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||
if (rof2Slot.SubIndex >= EQEmu::invbag::SLOT_BEGIN)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rof2Slot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rof2Slot.Slot;
|
||||
@@ -6038,11 +6038,11 @@ namespace RoF2
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == invtype::InvTypeTrade) {
|
||||
TempSlot = EQEmu::legacy::TRADE_BEGIN;
|
||||
else if (rof2Slot.Type == invtype::typeTrade) {
|
||||
TempSlot = EQEmu::invslot::TRADE_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||
if (rof2Slot.SubIndex >= EQEmu::invbag::SLOT_BEGIN)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rof2Slot.SubIndex + 1;
|
||||
// OLD CODE:
|
||||
//TempSlot += 100 + (RoF2Slot.MainSlot * EmuConstants::ITEM_CONTAINER_SIZE) + RoF2Slot.SubSlot;
|
||||
|
||||
@@ -6052,10 +6052,10 @@ namespace RoF2
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == invtype::InvTypeWorld) {
|
||||
TempSlot = EQEmu::legacy::WORLD_BEGIN;
|
||||
else if (rof2Slot.Type == invtype::typeWorld) {
|
||||
TempSlot = EQEmu::invslot::WORLD_BEGIN;
|
||||
|
||||
if (rof2Slot.Slot >= EQEmu::inventory::containerBegin)
|
||||
if (rof2Slot.Slot >= EQEmu::invbag::SLOT_BEGIN)
|
||||
TempSlot += rof2Slot.Slot;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
@@ -6070,12 +6070,12 @@ namespace RoF2
|
||||
ServerSlot = TempSlot;
|
||||
}*/
|
||||
|
||||
else if (rof2Slot.Type == invtype::InvTypeGuildTribute) {
|
||||
else if (rof2Slot.Type == invtype::typeGuildTribute) {
|
||||
ServerSlot = INVALID_INDEX;
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == invtype::InvTypeCorpse) {
|
||||
ServerSlot = rof2Slot.Slot + EQEmu::legacy::CORPSE_BEGIN;
|
||||
else if (rof2Slot.Type == invtype::typeCorpse) {
|
||||
ServerSlot = rof2Slot.Slot + EQEmu::invslot::CORPSE_BEGIN;
|
||||
}
|
||||
|
||||
Log(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);
|
||||
@@ -6089,10 +6089,10 @@ namespace RoF2
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
||||
if (rof2Slot.Slot == invslot::PossessionsPowerSource)
|
||||
TempSlot = EQEmu::inventory::slotPowerSource;
|
||||
if (rof2Slot.Slot == invslot::slotPowerSource)
|
||||
TempSlot = EQEmu::invslot::SLOT_POWER_SOURCE;
|
||||
|
||||
else if (rof2Slot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (rof2Slot.Slot >= invslot::slotCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rof2Slot.Slot - 3;
|
||||
|
||||
/*else if (RoF2Slot.MainSlot == slots::MainGeneral9 || RoF2Slot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF2 inventory slots
|
||||
@@ -6101,14 +6101,14 @@ namespace RoF2
|
||||
// Same as above
|
||||
}*/
|
||||
|
||||
else if (rof2Slot.Slot >= invslot::PossessionsAmmo) // Main Inventory and Ammo Slots
|
||||
else if (rof2Slot.Slot >= invslot::slotAmmo) // Main Inventory and Ammo Slots
|
||||
TempSlot = rof2Slot.Slot - 1;
|
||||
|
||||
else
|
||||
TempSlot = rof2Slot.Slot;
|
||||
|
||||
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||
if (rof2Slot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::invbag::SLOT_COUNT) + rof2Slot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
@@ -6120,12 +6120,12 @@ namespace RoF2
|
||||
|
||||
static inline uint32 RoF2ToServerCorpseSlot(uint32 rof2CorpseSlot)
|
||||
{
|
||||
return (rof2CorpseSlot + EQEmu::legacy::CORPSE_BEGIN - 1);
|
||||
return (rof2CorpseSlot + EQEmu::invslot::CORPSE_BEGIN - 1);
|
||||
}
|
||||
|
||||
static inline void ServerToRoF2SayLink(std::string& rof2SayLink, const std::string& serverSayLink)
|
||||
{
|
||||
if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
rof2SayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -6134,7 +6134,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::SayLinkBodySize) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) {
|
||||
rof2SayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -6157,7 +6157,7 @@ namespace RoF2
|
||||
|
||||
static inline void RoF2ToServerSayLink(std::string& serverSayLink, const std::string& rof2SayLink)
|
||||
{
|
||||
if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (rof2SayLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (rof2SayLink.find('\x12') == std::string::npos)) {
|
||||
serverSayLink = rof2SayLink;
|
||||
return;
|
||||
}
|
||||
@@ -6166,7 +6166,7 @@ namespace RoF2
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) {
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
|
||||
+136
-136
@@ -22,231 +22,231 @@
|
||||
#include "../string_util.h"
|
||||
|
||||
|
||||
size_t RoF2::invtype::GetInvTypeSize(int inv_type)
|
||||
int16 RoF2::invtype::GetInvTypeSize(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypePossessions:
|
||||
return invtype::InvTypePossessionsSize;
|
||||
case invtype::InvTypeBank:
|
||||
return invtype::InvTypeBankSize;
|
||||
case invtype::InvTypeSharedBank:
|
||||
return invtype::InvTypeSharedBankSize;
|
||||
case invtype::InvTypeTrade:
|
||||
return invtype::InvTypeTradeSize;
|
||||
case invtype::InvTypeWorld:
|
||||
return invtype::InvTypeWorldSize;
|
||||
case invtype::InvTypeLimbo:
|
||||
return invtype::InvTypeLimboSize;
|
||||
case invtype::InvTypeTribute:
|
||||
return invtype::InvTypeTributeSize;
|
||||
case invtype::InvTypeTrophyTribute:
|
||||
return invtype::InvTypeTrophyTributeSize;
|
||||
case invtype::InvTypeGuildTribute:
|
||||
return invtype::InvTypeGuildTributeSize;
|
||||
case invtype::InvTypeMerchant:
|
||||
return invtype::InvTypeMerchantSize;
|
||||
case invtype::InvTypeDeleted:
|
||||
return invtype::InvTypeDeletedSize;
|
||||
case invtype::InvTypeCorpse:
|
||||
return invtype::InvTypeCorpseSize;
|
||||
case invtype::InvTypeBazaar:
|
||||
return invtype::InvTypeBazaarSize;
|
||||
case invtype::InvTypeInspect:
|
||||
return invtype::InvTypeInspectSize;
|
||||
case invtype::InvTypeRealEstate:
|
||||
return invtype::InvTypeRealEstateSize;
|
||||
case invtype::InvTypeViewMODPC:
|
||||
return invtype::InvTypeViewMODPCSize;
|
||||
case invtype::InvTypeViewMODBank:
|
||||
return invtype::InvTypeViewMODBankSize;
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
return invtype::InvTypeViewMODSharedBankSize;
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
return invtype::InvTypeViewMODLimboSize;
|
||||
case invtype::InvTypeAltStorage:
|
||||
return invtype::InvTypeAltStorageSize;
|
||||
case invtype::InvTypeArchived:
|
||||
return invtype::InvTypeArchivedSize;
|
||||
case invtype::InvTypeMail:
|
||||
return invtype::InvTypeMailSize;
|
||||
case invtype::InvTypeGuildTrophyTribute:
|
||||
return invtype::InvTypeGuildTrophyTributeSize;
|
||||
case invtype::InvTypeKrono:
|
||||
return invtype::InvTypeKronoSize;
|
||||
case invtype::InvTypeOther:
|
||||
return invtype::InvTypeOtherSize;
|
||||
case invtype::typePossessions:
|
||||
return invtype::POSSESSIONS_SIZE;
|
||||
case invtype::typeBank:
|
||||
return invtype::BANK_SIZE;
|
||||
case invtype::typeSharedBank:
|
||||
return invtype::SHARED_BANK_SIZE;
|
||||
case invtype::typeTrade:
|
||||
return invtype::TRADE_SIZE;
|
||||
case invtype::typeWorld:
|
||||
return invtype::WORLD_SIZE;
|
||||
case invtype::typeLimbo:
|
||||
return invtype::LIMBO_SIZE;
|
||||
case invtype::typeTribute:
|
||||
return invtype::TRIBUTE_SIZE;
|
||||
case invtype::typeTrophyTribute:
|
||||
return invtype::TROPHY_TRIBUTE_SIZE;
|
||||
case invtype::typeGuildTribute:
|
||||
return invtype::GUILD_TRIBUTE_SIZE;
|
||||
case invtype::typeMerchant:
|
||||
return invtype::MERCHANT_SIZE;
|
||||
case invtype::typeDeleted:
|
||||
return invtype::DELETED_SIZE;
|
||||
case invtype::typeCorpse:
|
||||
return invtype::CORPSE_SIZE;
|
||||
case invtype::typeBazaar:
|
||||
return invtype::BAZAAR_SIZE;
|
||||
case invtype::typeInspect:
|
||||
return invtype::INSPECT_SIZE;
|
||||
case invtype::typeRealEstate:
|
||||
return invtype::REAL_ESTATE_SIZE;
|
||||
case invtype::typeViewMODPC:
|
||||
return invtype::VIEW_MOD_PC_SIZE;
|
||||
case invtype::typeViewMODBank:
|
||||
return invtype::VIEW_MOD_BANK_SIZE;
|
||||
case invtype::typeViewMODSharedBank:
|
||||
return invtype::VIEW_MOD_SHARED_BANK_SIZE;
|
||||
case invtype::typeViewMODLimbo:
|
||||
return invtype::VIEW_MOD_LIMBO_SIZE;
|
||||
case invtype::typeAltStorage:
|
||||
return invtype::ALT_STORAGE_SIZE;
|
||||
case invtype::typeArchived:
|
||||
return invtype::ARCHIVED_SIZE;
|
||||
case invtype::typeMail:
|
||||
return invtype::MAIL_SIZE;
|
||||
case invtype::typeGuildTrophyTribute:
|
||||
return invtype::GUILD_TROPHY_TRIBUTE_SIZE;
|
||||
case invtype::typeKrono:
|
||||
return invtype::KRONO_SIZE;
|
||||
case invtype::typeOther:
|
||||
return invtype::OTHER_SIZE;
|
||||
default:
|
||||
return 0;
|
||||
return INULL;
|
||||
}
|
||||
}
|
||||
|
||||
const char* RoF2::invtype::GetInvTypeName(int inv_type)
|
||||
const char* RoF2::invtype::GetInvTypeName(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypeInvalid:
|
||||
case invtype::TYPE_INVALID:
|
||||
return "Invalid Type";
|
||||
case invtype::InvTypePossessions:
|
||||
case invtype::typePossessions:
|
||||
return "Possessions";
|
||||
case invtype::InvTypeBank:
|
||||
case invtype::typeBank:
|
||||
return "Bank";
|
||||
case invtype::InvTypeSharedBank:
|
||||
case invtype::typeSharedBank:
|
||||
return "Shared Bank";
|
||||
case invtype::InvTypeTrade:
|
||||
case invtype::typeTrade:
|
||||
return "Trade";
|
||||
case invtype::InvTypeWorld:
|
||||
case invtype::typeWorld:
|
||||
return "World";
|
||||
case invtype::InvTypeLimbo:
|
||||
case invtype::typeLimbo:
|
||||
return "Limbo";
|
||||
case invtype::InvTypeTribute:
|
||||
case invtype::typeTribute:
|
||||
return "Tribute";
|
||||
case invtype::InvTypeTrophyTribute:
|
||||
case invtype::typeTrophyTribute:
|
||||
return "Trophy Tribute";
|
||||
case invtype::InvTypeGuildTribute:
|
||||
case invtype::typeGuildTribute:
|
||||
return "Guild Tribute";
|
||||
case invtype::InvTypeMerchant:
|
||||
case invtype::typeMerchant:
|
||||
return "Merchant";
|
||||
case invtype::InvTypeDeleted:
|
||||
case invtype::typeDeleted:
|
||||
return "Deleted";
|
||||
case invtype::InvTypeCorpse:
|
||||
case invtype::typeCorpse:
|
||||
return "Corpse";
|
||||
case invtype::InvTypeBazaar:
|
||||
case invtype::typeBazaar:
|
||||
return "Bazaar";
|
||||
case invtype::InvTypeInspect:
|
||||
case invtype::typeInspect:
|
||||
return "Inspect";
|
||||
case invtype::InvTypeRealEstate:
|
||||
case invtype::typeRealEstate:
|
||||
return "Real Estate";
|
||||
case invtype::InvTypeViewMODPC:
|
||||
case invtype::typeViewMODPC:
|
||||
return "View MOD PC";
|
||||
case invtype::InvTypeViewMODBank:
|
||||
case invtype::typeViewMODBank:
|
||||
return "View MOD Bank";
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
case invtype::typeViewMODSharedBank:
|
||||
return "View MOD Shared Bank";
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
case invtype::typeViewMODLimbo:
|
||||
return "View MOD Limbo";
|
||||
case invtype::InvTypeAltStorage:
|
||||
case invtype::typeAltStorage:
|
||||
return "Alt Storage";
|
||||
case invtype::InvTypeArchived:
|
||||
case invtype::typeArchived:
|
||||
return "Archived";
|
||||
case invtype::InvTypeMail:
|
||||
case invtype::typeMail:
|
||||
return "Mail";
|
||||
case invtype::InvTypeGuildTrophyTribute:
|
||||
case invtype::typeGuildTrophyTribute:
|
||||
return "Guild Trophy Tribute";
|
||||
case invtype::InvTypeKrono:
|
||||
case invtype::typeKrono:
|
||||
return "Krono";
|
||||
case invtype::InvTypeOther:
|
||||
case invtype::typeOther:
|
||||
return "Other";
|
||||
default:
|
||||
return "Unknown Type";
|
||||
}
|
||||
}
|
||||
|
||||
bool RoF2::invtype::IsInvTypePersistent(int inv_type)
|
||||
bool RoF2::invtype::IsInvTypePersistent(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypePossessions:
|
||||
case invtype::InvTypeBank:
|
||||
case invtype::InvTypeSharedBank:
|
||||
case invtype::InvTypeTrade:
|
||||
case invtype::InvTypeWorld:
|
||||
case invtype::InvTypeLimbo:
|
||||
case invtype::InvTypeTribute:
|
||||
case invtype::InvTypeTrophyTribute:
|
||||
case invtype::InvTypeGuildTribute:
|
||||
case invtype::typePossessions:
|
||||
case invtype::typeBank:
|
||||
case invtype::typeSharedBank:
|
||||
case invtype::typeTrade:
|
||||
case invtype::typeWorld:
|
||||
case invtype::typeLimbo:
|
||||
case invtype::typeTribute:
|
||||
case invtype::typeTrophyTribute:
|
||||
case invtype::typeGuildTribute:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
const char* RoF2::invslot::GetInvPossessionsSlotName(int inv_slot)
|
||||
const char* RoF2::invslot::GetInvPossessionsSlotName(int16 inv_slot)
|
||||
{
|
||||
switch (inv_slot) {
|
||||
case invslot::InvSlotInvalid:
|
||||
case invslot::SLOT_INVALID:
|
||||
return "Invalid Slot";
|
||||
case invslot::PossessionsCharm:
|
||||
case invslot::slotCharm:
|
||||
return "Charm";
|
||||
case invslot::PossessionsEar1:
|
||||
case invslot::slotEar1:
|
||||
return "Ear 1";
|
||||
case invslot::PossessionsHead:
|
||||
case invslot::slotHead:
|
||||
return "Head";
|
||||
case invslot::PossessionsFace:
|
||||
case invslot::slotFace:
|
||||
return "Face";
|
||||
case invslot::PossessionsEar2:
|
||||
case invslot::slotEar2:
|
||||
return "Ear 2";
|
||||
case invslot::PossessionsNeck:
|
||||
case invslot::slotNeck:
|
||||
return "Neck";
|
||||
case invslot::PossessionsShoulders:
|
||||
case invslot::slotShoulders:
|
||||
return "Shoulders";
|
||||
case invslot::PossessionsArms:
|
||||
case invslot::slotArms:
|
||||
return "Arms";
|
||||
case invslot::PossessionsBack:
|
||||
case invslot::slotBack:
|
||||
return "Back";
|
||||
case invslot::PossessionsWrist1:
|
||||
case invslot::slotWrist1:
|
||||
return "Wrist 1";
|
||||
case invslot::PossessionsWrist2:
|
||||
case invslot::slotWrist2:
|
||||
return "Wrist 2";
|
||||
case invslot::PossessionsRange:
|
||||
case invslot::slotRange:
|
||||
return "Range";
|
||||
case invslot::PossessionsHands:
|
||||
case invslot::slotHands:
|
||||
return "Hands";
|
||||
case invslot::PossessionsPrimary:
|
||||
case invslot::slotPrimary:
|
||||
return "Primary";
|
||||
case invslot::PossessionsSecondary:
|
||||
case invslot::slotSecondary:
|
||||
return "Secondary";
|
||||
case invslot::PossessionsFinger1:
|
||||
case invslot::slotFinger1:
|
||||
return "Finger 1";
|
||||
case invslot::PossessionsFinger2:
|
||||
case invslot::slotFinger2:
|
||||
return "Finger 2";
|
||||
case invslot::PossessionsChest:
|
||||
case invslot::slotChest:
|
||||
return "Chest";
|
||||
case invslot::PossessionsLegs:
|
||||
case invslot::slotLegs:
|
||||
return "Legs";
|
||||
case invslot::PossessionsFeet:
|
||||
case invslot::slotFeet:
|
||||
return "Feet";
|
||||
case invslot::PossessionsWaist:
|
||||
case invslot::slotWaist:
|
||||
return "Waist";
|
||||
case invslot::PossessionsPowerSource:
|
||||
case invslot::slotPowerSource:
|
||||
return "Power Source";
|
||||
case invslot::PossessionsAmmo:
|
||||
case invslot::slotAmmo:
|
||||
return "Ammo";
|
||||
case invslot::PossessionsGeneral1:
|
||||
case invslot::slotGeneral1:
|
||||
return "General 1";
|
||||
case invslot::PossessionsGeneral2:
|
||||
case invslot::slotGeneral2:
|
||||
return "General 2";
|
||||
case invslot::PossessionsGeneral3:
|
||||
case invslot::slotGeneral3:
|
||||
return "General 3";
|
||||
case invslot::PossessionsGeneral4:
|
||||
case invslot::slotGeneral4:
|
||||
return "General 4";
|
||||
case invslot::PossessionsGeneral5:
|
||||
case invslot::slotGeneral5:
|
||||
return "General 5";
|
||||
case invslot::PossessionsGeneral6:
|
||||
case invslot::slotGeneral6:
|
||||
return "General 6";
|
||||
case invslot::PossessionsGeneral7:
|
||||
case invslot::slotGeneral7:
|
||||
return "General 7";
|
||||
case invslot::PossessionsGeneral8:
|
||||
case invslot::slotGeneral8:
|
||||
return "General 8";
|
||||
case invslot::PossessionsGeneral9:
|
||||
case invslot::slotGeneral9:
|
||||
return "General 9";
|
||||
case invslot::PossessionsGeneral10:
|
||||
case invslot::slotGeneral10:
|
||||
return "General 10";
|
||||
case invslot::PossessionsCursor:
|
||||
case invslot::slotCursor:
|
||||
return "Cursor";
|
||||
default:
|
||||
return "Unknown Slot";
|
||||
}
|
||||
}
|
||||
|
||||
const char* RoF2::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||
const char* RoF2::invslot::GetInvSlotName(int16 inv_type, int16 inv_slot)
|
||||
{
|
||||
if (inv_type == invtype::InvTypePossessions)
|
||||
if (inv_type == invtype::typePossessions)
|
||||
return invslot::GetInvPossessionsSlotName(inv_slot);
|
||||
|
||||
size_t type_size = invtype::GetInvTypeSize(inv_type);
|
||||
int16 type_size = invtype::GetInvTypeSize(inv_type);
|
||||
|
||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||
if (!type_size || inv_slot == invslot::SLOT_INVALID)
|
||||
return "Invalid Slot";
|
||||
|
||||
if ((size_t)(inv_slot + 1) >= type_size)
|
||||
if ((inv_slot + 1) >= type_size)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -255,12 +255,12 @@ const char* RoF2::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* RoF2::invbag::GetInvBagIndexName(int bag_index)
|
||||
const char* RoF2::invbag::GetInvBagIndexName(int16 bag_index)
|
||||
{
|
||||
if (bag_index == invbag::InvBagInvalid)
|
||||
if (bag_index == invbag::SLOT_INVALID)
|
||||
return "Invalid Bag";
|
||||
|
||||
if ((size_t)bag_index >= invbag::ItemBagSize)
|
||||
if (bag_index >= invbag::SLOT_COUNT)
|
||||
return "Unknown Bag";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -269,12 +269,12 @@ const char* RoF2::invbag::GetInvBagIndexName(int bag_index)
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* RoF2::invaug::GetInvAugIndexName(int aug_index)
|
||||
const char* RoF2::invaug::GetInvAugIndexName(int16 aug_index)
|
||||
{
|
||||
if (aug_index == invaug::InvAugInvalid)
|
||||
if (aug_index == invaug::SOCKET_INVALID)
|
||||
return "Invalid Augment";
|
||||
|
||||
if ((size_t)aug_index >= invaug::ItemAugSize)
|
||||
if (aug_index >= invaug::SOCKET_COUNT)
|
||||
return "Unknown Augment";
|
||||
|
||||
static std::string ret_str;
|
||||
|
||||
+167
-177
@@ -27,116 +27,191 @@
|
||||
|
||||
namespace RoF2
|
||||
{
|
||||
enum : int { Invalid = -1, Null, Safety };
|
||||
const int16 IINVALID = -1;
|
||||
const int16 INULL = 0;
|
||||
|
||||
enum : bool { False = false, True = true };
|
||||
|
||||
// pre-declarations
|
||||
namespace inventory {
|
||||
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
const bool ConcatenateInvTypeLimbo = false;
|
||||
|
||||
const bool AllowOverLevelEquipment = true;
|
||||
|
||||
const bool AllowEmptyBagInBag = true;
|
||||
const bool AllowClickCastFromBag = true;
|
||||
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||
namespace enum_ {
|
||||
enum InventoryTypes : int16 {
|
||||
typePossessions = INULL,
|
||||
typeBank,
|
||||
typeSharedBank,
|
||||
typeTrade,
|
||||
typeWorld,
|
||||
typeLimbo,
|
||||
typeTribute,
|
||||
typeTrophyTribute,
|
||||
typeGuildTribute,
|
||||
typeMerchant,
|
||||
typeDeleted,
|
||||
typeCorpse,
|
||||
typeBazaar,
|
||||
typeInspect,
|
||||
typeRealEstate,
|
||||
typeViewMODPC,
|
||||
typeViewMODBank,
|
||||
typeViewMODSharedBank,
|
||||
typeViewMODLimbo,
|
||||
typeAltStorage,
|
||||
typeArchived,
|
||||
typeMail,
|
||||
typeGuildTrophyTribute,
|
||||
typeKrono,
|
||||
typeOther
|
||||
};
|
||||
|
||||
enum InventoryType : int {
|
||||
InvTypePossessions = InvTypeBegin,
|
||||
InvTypeBank,
|
||||
InvTypeSharedBank,
|
||||
InvTypeTrade,
|
||||
InvTypeWorld,
|
||||
InvTypeLimbo,
|
||||
InvTypeTribute,
|
||||
InvTypeTrophyTribute,
|
||||
InvTypeGuildTribute,
|
||||
InvTypeMerchant,
|
||||
InvTypeDeleted,
|
||||
InvTypeCorpse,
|
||||
InvTypeBazaar,
|
||||
InvTypeInspect,
|
||||
InvTypeRealEstate,
|
||||
InvTypeViewMODPC,
|
||||
InvTypeViewMODBank,
|
||||
InvTypeViewMODSharedBank,
|
||||
InvTypeViewMODLimbo,
|
||||
InvTypeAltStorage,
|
||||
InvTypeArchived,
|
||||
InvTypeMail,
|
||||
InvTypeGuildTrophyTribute,
|
||||
InvTypeKrono,
|
||||
InvTypeOther,
|
||||
InvTypeCount
|
||||
};
|
||||
} // namespace enum_
|
||||
using namespace enum_;
|
||||
|
||||
const int16 POSSESSIONS_SIZE = 34;
|
||||
const int16 BANK_SIZE = 24;
|
||||
const int16 SHARED_BANK_SIZE = 2;
|
||||
const int16 TRADE_SIZE = 8;
|
||||
const int16 WORLD_SIZE = 10;
|
||||
const int16 LIMBO_SIZE = 36;
|
||||
const int16 TRIBUTE_SIZE = 5;
|
||||
const int16 TROPHY_TRIBUTE_SIZE = 0;//unknown
|
||||
const int16 GUILD_TRIBUTE_SIZE = 2;//unverified
|
||||
const int16 MERCHANT_SIZE = 200;
|
||||
const int16 DELETED_SIZE = 0;//unknown - "Recovery Tab"
|
||||
const int16 CORPSE_SIZE = POSSESSIONS_SIZE;
|
||||
const int16 BAZAAR_SIZE = 200;
|
||||
const int16 INSPECT_SIZE = 23;
|
||||
const int16 REAL_ESTATE_SIZE = 0;//unknown
|
||||
const int16 VIEW_MOD_PC_SIZE = POSSESSIONS_SIZE;
|
||||
const int16 VIEW_MOD_BANK_SIZE = BANK_SIZE;
|
||||
const int16 VIEW_MOD_SHARED_BANK_SIZE = SHARED_BANK_SIZE;
|
||||
const int16 VIEW_MOD_LIMBO_SIZE = LIMBO_SIZE;
|
||||
const int16 ALT_STORAGE_SIZE = 0;//unknown - "Shroud Bank"
|
||||
const int16 ARCHIVED_SIZE = 0;//unknown
|
||||
const int16 MAIL_SIZE = 0;//unknown
|
||||
const int16 GUILD_TROPHY_TRIBUTE_SIZE = 0;//unknown
|
||||
const int16 KRONO_SIZE = 0;//unknown
|
||||
const int16 OTHER_SIZE = 0;//unknown
|
||||
|
||||
const int16 TRADE_NPC_SIZE = 4; // defined by implication
|
||||
|
||||
const int16 TYPE_INVALID = IINVALID;
|
||||
const int16 TYPE_BEGIN = typePossessions;
|
||||
const int16 TYPE_END = typeOther;
|
||||
const int16 TYPE_COUNT = (TYPE_END - TYPE_BEGIN) + 1;
|
||||
|
||||
int16 GetInvTypeSize(int16 inv_type);
|
||||
const char* GetInvTypeName(int16 inv_type);
|
||||
|
||||
bool IsInvTypePersistent(int16 inv_type);
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||
namespace enum_ {
|
||||
enum InventorySlots : int16 {
|
||||
slotCharm = INULL,
|
||||
slotEar1,
|
||||
slotHead,
|
||||
slotFace,
|
||||
slotEar2,
|
||||
slotNeck,
|
||||
slotShoulders,
|
||||
slotArms,
|
||||
slotBack,
|
||||
slotWrist1,
|
||||
slotWrist2,
|
||||
slotRange,
|
||||
slotHands,
|
||||
slotPrimary,
|
||||
slotSecondary,
|
||||
slotFinger1,
|
||||
slotFinger2,
|
||||
slotChest,
|
||||
slotLegs,
|
||||
slotFeet,
|
||||
slotWaist,
|
||||
slotPowerSource,
|
||||
slotAmmo,
|
||||
slotGeneral1,
|
||||
slotGeneral2,
|
||||
slotGeneral3,
|
||||
slotGeneral4,
|
||||
slotGeneral5,
|
||||
slotGeneral6,
|
||||
slotGeneral7,
|
||||
slotGeneral8,
|
||||
slotGeneral9,
|
||||
slotGeneral10,
|
||||
slotCursor
|
||||
};
|
||||
|
||||
enum PossessionsSlot : int {
|
||||
PossessionsCharm = InvSlotBegin,
|
||||
PossessionsEar1,
|
||||
PossessionsHead,
|
||||
PossessionsFace,
|
||||
PossessionsEar2,
|
||||
PossessionsNeck,
|
||||
PossessionsShoulders,
|
||||
PossessionsArms,
|
||||
PossessionsBack,
|
||||
PossessionsWrist1,
|
||||
PossessionsWrist2,
|
||||
PossessionsRange,
|
||||
PossessionsHands,
|
||||
PossessionsPrimary,
|
||||
PossessionsSecondary,
|
||||
PossessionsFinger1,
|
||||
PossessionsFinger2,
|
||||
PossessionsChest,
|
||||
PossessionsLegs,
|
||||
PossessionsFeet,
|
||||
PossessionsWaist,
|
||||
PossessionsPowerSource,
|
||||
PossessionsAmmo,
|
||||
PossessionsGeneral1,
|
||||
PossessionsGeneral2,
|
||||
PossessionsGeneral3,
|
||||
PossessionsGeneral4,
|
||||
PossessionsGeneral5,
|
||||
PossessionsGeneral6,
|
||||
PossessionsGeneral7,
|
||||
PossessionsGeneral8,
|
||||
PossessionsGeneral9,
|
||||
PossessionsGeneral10,
|
||||
PossessionsCursor,
|
||||
PossessionsCount
|
||||
};
|
||||
} // namespace enum_
|
||||
using namespace enum_;
|
||||
|
||||
const int EquipmentBegin = PossessionsCharm;
|
||||
const int EquipmentEnd = PossessionsAmmo;
|
||||
const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1);
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
|
||||
const int GeneralBegin = PossessionsGeneral1;
|
||||
const int GeneralEnd = PossessionsGeneral10;
|
||||
const int GeneralCount = (GeneralEnd - GeneralBegin + 1);
|
||||
const int16 POSSESSIONS_BEGIN = slotCharm;
|
||||
const int16 POSSESSIONS_END = slotCursor;
|
||||
const int16 POSSESSIONS_COUNT = (POSSESSIONS_END - POSSESSIONS_BEGIN) + 1;
|
||||
|
||||
const int16 EQUIPMENT_BEGIN = slotCharm;
|
||||
const int16 EQUIPMENT_END = slotAmmo;
|
||||
const int16 EQUIPMENT_COUNT = (EQUIPMENT_END - EQUIPMENT_BEGIN) + 1;
|
||||
|
||||
const int16 GENERAL_BEGIN = slotGeneral1;
|
||||
const int16 GENERAL_END = slotGeneral10;
|
||||
const int16 GENERAL_COUNT = (GENERAL_END - GENERAL_BEGIN) + 1;
|
||||
|
||||
const int16 BONUS_BEGIN = invslot::slotCharm;
|
||||
const int16 BONUS_STAT_END = invslot::slotPowerSource;
|
||||
const int16 BONUS_SKILL_END = invslot::slotAmmo;
|
||||
|
||||
const int16 CORPSE_BEGIN = invslot::slotGeneral1;
|
||||
const int16 CORPSE_END = invslot::slotGeneral1 + invslot::slotCursor;
|
||||
|
||||
const uint64 POSSESSIONS_BITMASK = 0x00000003FFFFFFFF; // based on 34-slot count (RoF+)
|
||||
const uint64 CORPSE_BITMASK = 0x01FFFFFFFF800000; // based on 34-slot count (RoF+)
|
||||
|
||||
const char* GetInvPossessionsSlotName(int16 inv_slot);
|
||||
const char* GetInvSlotName(int16 inv_type, int16 inv_slot);
|
||||
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
const int16 SLOT_END = 9; //254;
|
||||
const int16 SLOT_COUNT = 10; //255; // server Size will be 255..unsure what actual client is (test)
|
||||
|
||||
const char* GetInvBagIndexName(int16 bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||
const int16 SOCKET_INVALID = IINVALID;
|
||||
const int16 SOCKET_BEGIN = INULL;
|
||||
const int16 SOCKET_END = 5;
|
||||
const int16 SOCKET_COUNT = 6;
|
||||
|
||||
const char* GetInvAugIndexName(int16 aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
@@ -172,110 +247,21 @@ namespace RoF2
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
|
||||
const int16 POTION_BELT_SIZE = 5;
|
||||
|
||||
const int16 SKILL_ARRAY_SIZE = 100;
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
} /*constants*/
|
||||
const size_t CHARACTER_CREATION_LIMIT = 12;
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
} /*skills*/
|
||||
|
||||
|
||||
// declarations
|
||||
namespace inventory {
|
||||
const bool ConcatenateInvTypeLimbo = false;
|
||||
|
||||
const bool AllowOverLevelEquipment = true;
|
||||
|
||||
const bool AllowEmptyBagInBag = true;
|
||||
const bool AllowClickCastFromBag = true;
|
||||
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
||||
const size_t InvTypeBankSize = 24;
|
||||
const size_t InvTypeSharedBankSize = 2;
|
||||
const size_t InvTypeTradeSize = 8;
|
||||
const size_t InvTypeWorldSize = 10;
|
||||
const size_t InvTypeLimboSize = 36;
|
||||
const size_t InvTypeTributeSize = 5;
|
||||
const size_t InvTypeTrophyTributeSize = 0;//unknown
|
||||
const size_t InvTypeGuildTributeSize = 2;//unverified
|
||||
const size_t InvTypeMerchantSize = 200;
|
||||
const size_t InvTypeDeletedSize = 0;//unknown - "Recovery Tab"
|
||||
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
||||
const size_t InvTypeBazaarSize = 200;
|
||||
const size_t InvTypeInspectSize = invslot::EquipmentCount;
|
||||
const size_t InvTypeRealEstateSize = 0;//unknown
|
||||
const size_t InvTypeViewMODPCSize = InvTypePossessionsSize;
|
||||
const size_t InvTypeViewMODBankSize = InvTypeBankSize;
|
||||
const size_t InvTypeViewMODSharedBankSize = InvTypeSharedBankSize;
|
||||
const size_t InvTypeViewMODLimboSize = InvTypeLimboSize;
|
||||
const size_t InvTypeAltStorageSize = 0;//unknown - "Shroud Bank"
|
||||
const size_t InvTypeArchivedSize = 0;//unknown
|
||||
const size_t InvTypeMailSize = 0;//unknown
|
||||
const size_t InvTypeGuildTrophyTributeSize = 0;//unknown
|
||||
const size_t InvTypeKronoSize = 0;//unknown
|
||||
const size_t InvTypeOtherSize = 0;//unknown
|
||||
|
||||
extern size_t GetInvTypeSize(int inv_type);
|
||||
extern const char* GetInvTypeName(int inv_type);
|
||||
|
||||
extern bool IsInvTypePersistent(int inv_type);
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
extern const char* GetInvPossessionsSlotName(int inv_slot);
|
||||
extern const char* GetInvSlotName(int inv_type, int inv_slot);
|
||||
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
const size_t ItemBagSize = 255; // server Size will be 255..unsure what actual client is (test)
|
||||
|
||||
extern const char* GetInvBagIndexName(int bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
const size_t ItemAugSize = 6;
|
||||
|
||||
extern const char* GetInvAugIndexName(int aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||
const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize;
|
||||
|
||||
const size_t BandoliersSize = 20; // number of bandolier instances
|
||||
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
||||
|
||||
const size_t PotionBeltSize = 5;
|
||||
|
||||
const size_t SkillArraySize = 100;
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
const size_t CharacterCreationLimit = 12;
|
||||
|
||||
const size_t SayLinkBodySize = 56;
|
||||
const size_t SAY_LINK_BODY_SIZE = 56;
|
||||
|
||||
const int LongBuffs = 42;
|
||||
const int ShortBuffs = 20;
|
||||
@@ -288,11 +274,15 @@ namespace RoF2
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
const bool CoinHasWeight = false;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
const size_t LastUsableSkill = EQEmu::skills::Skill2HPiercing;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
@@ -957,13 +957,13 @@ struct BandolierItem_Struct_Old
|
||||
struct Bandolier_Struct
|
||||
{
|
||||
char Name[1]; // Variable Length
|
||||
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||
BandolierItem_Struct Items[profile::BANDOLIER_ITEM_COUNT];
|
||||
};
|
||||
|
||||
struct Bandolier_Struct_Old
|
||||
{
|
||||
char Name[32];
|
||||
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||
BandolierItem_Struct Items[profile::BANDOLIER_ITEM_COUNT];
|
||||
};
|
||||
|
||||
struct PotionBeltItem_Struct
|
||||
@@ -983,12 +983,12 @@ struct PotionBeltItem_Struct_Old
|
||||
|
||||
struct PotionBelt_Struct
|
||||
{
|
||||
PotionBeltItem_Struct Items[profile::PotionBeltSize];
|
||||
PotionBeltItem_Struct Items[profile::POTION_BELT_SIZE];
|
||||
};
|
||||
|
||||
struct PotionBelt_Struct_Old
|
||||
{
|
||||
PotionBeltItem_Struct_Old Items[profile::PotionBeltSize];
|
||||
PotionBeltItem_Struct_Old Items[profile::POTION_BELT_SIZE];
|
||||
};
|
||||
|
||||
struct GroupLeadershipAA_Struct {
|
||||
@@ -1198,7 +1198,7 @@ union
|
||||
/*12949*/ uint32 aapoints; // Unspent AA points - Seen 1
|
||||
/*12953*/ uint16 unknown_rof20; //
|
||||
/*12955*/ uint32 bandolier_count; // Seen 20
|
||||
/*12959*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [20] 740 bytes (Variable Name Sizes) - bandolier contents
|
||||
/*12959*/ Bandolier_Struct bandoliers[profile::BANDOLIERS_SIZE]; // [20] 740 bytes (Variable Name Sizes) - bandolier contents
|
||||
/*13699*/ uint32 potionbelt_count; // Seen 5
|
||||
/*13703*/ PotionBelt_Struct potionbelt; // [5] 45 bytes potion belt - (Variable Name Sizes)
|
||||
/*13748*/ int32 unknown_rof21; // Seen -1
|
||||
|
||||
+133
-133
@@ -22,227 +22,227 @@
|
||||
#include "../string_util.h"
|
||||
|
||||
|
||||
size_t RoF::invtype::GetInvTypeSize(int inv_type)
|
||||
int16 RoF::invtype::GetInvTypeSize(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypePossessions:
|
||||
return invtype::InvTypePossessionsSize;
|
||||
case invtype::InvTypeBank:
|
||||
return invtype::InvTypeBankSize;
|
||||
case invtype::InvTypeSharedBank:
|
||||
return invtype::InvTypeSharedBankSize;
|
||||
case invtype::InvTypeTrade:
|
||||
return invtype::InvTypeTradeSize;
|
||||
case invtype::InvTypeWorld:
|
||||
return invtype::InvTypeWorldSize;
|
||||
case invtype::InvTypeLimbo:
|
||||
return invtype::InvTypeLimboSize;
|
||||
case invtype::InvTypeTribute:
|
||||
return invtype::InvTypeTributeSize;
|
||||
case invtype::InvTypeTrophyTribute:
|
||||
return invtype::InvTypeTrophyTributeSize;
|
||||
case invtype::InvTypeGuildTribute:
|
||||
return invtype::InvTypeGuildTributeSize;
|
||||
case invtype::InvTypeMerchant:
|
||||
return invtype::InvTypeMerchantSize;
|
||||
case invtype::InvTypeDeleted:
|
||||
return invtype::InvTypeDeletedSize;
|
||||
case invtype::InvTypeCorpse:
|
||||
return invtype::InvTypeCorpseSize;
|
||||
case invtype::InvTypeBazaar:
|
||||
return invtype::InvTypeBazaarSize;
|
||||
case invtype::InvTypeInspect:
|
||||
return invtype::InvTypeInspectSize;
|
||||
case invtype::InvTypeRealEstate:
|
||||
return invtype::InvTypeRealEstateSize;
|
||||
case invtype::InvTypeViewMODPC:
|
||||
return invtype::InvTypeViewMODPCSize;
|
||||
case invtype::InvTypeViewMODBank:
|
||||
return invtype::InvTypeViewMODBankSize;
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
return invtype::InvTypeViewMODSharedBankSize;
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
return invtype::InvTypeViewMODLimboSize;
|
||||
case invtype::InvTypeAltStorage:
|
||||
return invtype::InvTypeAltStorageSize;
|
||||
case invtype::InvTypeArchived:
|
||||
return invtype::InvTypeArchivedSize;
|
||||
case invtype::InvTypeMail:
|
||||
return invtype::InvTypeMailSize;
|
||||
case invtype::InvTypeGuildTrophyTribute:
|
||||
return invtype::InvTypeGuildTrophyTributeSize;
|
||||
case invtype::InvTypeOther:
|
||||
return invtype::InvTypeOtherSize;
|
||||
case invtype::typePossessions:
|
||||
return invtype::POSSESSIONS_SIZE;
|
||||
case invtype::typeBank:
|
||||
return invtype::BANK_SIZE;
|
||||
case invtype::typeSharedBank:
|
||||
return invtype::SHARED_BANK_SIZE;
|
||||
case invtype::typeTrade:
|
||||
return invtype::TRADE_SIZE;
|
||||
case invtype::typeWorld:
|
||||
return invtype::WORLD_SIZE;
|
||||
case invtype::typeLimbo:
|
||||
return invtype::LIMBO_SIZE;
|
||||
case invtype::typeTribute:
|
||||
return invtype::TRIBUTE_SIZE;
|
||||
case invtype::typeTrophyTribute:
|
||||
return invtype::TROPHY_TRIBUTE_SIZE;
|
||||
case invtype::typeGuildTribute:
|
||||
return invtype::GUILD_TRIBUTE_SIZE;
|
||||
case invtype::typeMerchant:
|
||||
return invtype::MERCHANT_SIZE;
|
||||
case invtype::typeDeleted:
|
||||
return invtype::DELETED_SIZE;
|
||||
case invtype::typeCorpse:
|
||||
return invtype::CORPSE_SIZE;
|
||||
case invtype::typeBazaar:
|
||||
return invtype::BAZAAR_SIZE;
|
||||
case invtype::typeInspect:
|
||||
return invtype::INSPECT_SIZE;
|
||||
case invtype::typeRealEstate:
|
||||
return invtype::REAL_ESTATE_SIZE;
|
||||
case invtype::typeViewMODPC:
|
||||
return invtype::VIEW_MOD_PC_SIZE;
|
||||
case invtype::typeViewMODBank:
|
||||
return invtype::VIEW_MOD_BANK_SIZE;
|
||||
case invtype::typeViewMODSharedBank:
|
||||
return invtype::VIEW_MOD_SHARED_BANK_SIZE;
|
||||
case invtype::typeViewMODLimbo:
|
||||
return invtype::VIEW_MOD_LIMBO_SIZE;
|
||||
case invtype::typeAltStorage:
|
||||
return invtype::ALT_STORAGE_SIZE;
|
||||
case invtype::typeArchived:
|
||||
return invtype::ARCHIVED_SIZE;
|
||||
case invtype::typeMail:
|
||||
return invtype::MAIL_SIZE;
|
||||
case invtype::typeGuildTrophyTribute:
|
||||
return invtype::GUILD_TROPHY_TRIBUTE_SIZE;
|
||||
case invtype::typeOther:
|
||||
return invtype::OTHER_SIZE;
|
||||
default:
|
||||
return 0;
|
||||
return INULL;
|
||||
}
|
||||
}
|
||||
|
||||
const char* RoF::invtype::GetInvTypeName(int inv_type)
|
||||
const char* RoF::invtype::GetInvTypeName(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypeInvalid:
|
||||
case invtype::TYPE_INVALID:
|
||||
return "Invalid Type";
|
||||
case invtype::InvTypePossessions:
|
||||
case invtype::typePossessions:
|
||||
return "Possessions";
|
||||
case invtype::InvTypeBank:
|
||||
case invtype::typeBank:
|
||||
return "Bank";
|
||||
case invtype::InvTypeSharedBank:
|
||||
case invtype::typeSharedBank:
|
||||
return "Shared Bank";
|
||||
case invtype::InvTypeTrade:
|
||||
case invtype::typeTrade:
|
||||
return "Trade";
|
||||
case invtype::InvTypeWorld:
|
||||
case invtype::typeWorld:
|
||||
return "World";
|
||||
case invtype::InvTypeLimbo:
|
||||
case invtype::typeLimbo:
|
||||
return "Limbo";
|
||||
case invtype::InvTypeTribute:
|
||||
case invtype::typeTribute:
|
||||
return "Tribute";
|
||||
case invtype::InvTypeTrophyTribute:
|
||||
case invtype::typeTrophyTribute:
|
||||
return "Trophy Tribute";
|
||||
case invtype::InvTypeGuildTribute:
|
||||
case invtype::typeGuildTribute:
|
||||
return "Guild Tribute";
|
||||
case invtype::InvTypeMerchant:
|
||||
case invtype::typeMerchant:
|
||||
return "Merchant";
|
||||
case invtype::InvTypeDeleted:
|
||||
case invtype::typeDeleted:
|
||||
return "Deleted";
|
||||
case invtype::InvTypeCorpse:
|
||||
case invtype::typeCorpse:
|
||||
return "Corpse";
|
||||
case invtype::InvTypeBazaar:
|
||||
case invtype::typeBazaar:
|
||||
return "Bazaar";
|
||||
case invtype::InvTypeInspect:
|
||||
case invtype::typeInspect:
|
||||
return "Inspect";
|
||||
case invtype::InvTypeRealEstate:
|
||||
case invtype::typeRealEstate:
|
||||
return "Real Estate";
|
||||
case invtype::InvTypeViewMODPC:
|
||||
case invtype::typeViewMODPC:
|
||||
return "View MOD PC";
|
||||
case invtype::InvTypeViewMODBank:
|
||||
case invtype::typeViewMODBank:
|
||||
return "View MOD Bank";
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
case invtype::typeViewMODSharedBank:
|
||||
return "View MOD Shared Bank";
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
case invtype::typeViewMODLimbo:
|
||||
return "View MOD Limbo";
|
||||
case invtype::InvTypeAltStorage:
|
||||
case invtype::typeAltStorage:
|
||||
return "Alt Storage";
|
||||
case invtype::InvTypeArchived:
|
||||
case invtype::typeArchived:
|
||||
return "Archived";
|
||||
case invtype::InvTypeMail:
|
||||
case invtype::typeMail:
|
||||
return "Mail";
|
||||
case invtype::InvTypeGuildTrophyTribute:
|
||||
case invtype::typeGuildTrophyTribute:
|
||||
return "Guild Trophy Tribute";
|
||||
case invtype::InvTypeOther:
|
||||
case invtype::typeOther:
|
||||
return "Other";
|
||||
default:
|
||||
return "Unknown Type";
|
||||
}
|
||||
}
|
||||
|
||||
bool RoF::invtype::IsInvTypePersistent(int inv_type)
|
||||
bool RoF::invtype::IsInvTypePersistent(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypePossessions:
|
||||
case invtype::InvTypeBank:
|
||||
case invtype::InvTypeSharedBank:
|
||||
case invtype::InvTypeTrade:
|
||||
case invtype::InvTypeWorld:
|
||||
case invtype::InvTypeLimbo:
|
||||
case invtype::InvTypeTribute:
|
||||
case invtype::InvTypeTrophyTribute:
|
||||
case invtype::InvTypeGuildTribute:
|
||||
case invtype::typePossessions:
|
||||
case invtype::typeBank:
|
||||
case invtype::typeSharedBank:
|
||||
case invtype::typeTrade:
|
||||
case invtype::typeWorld:
|
||||
case invtype::typeLimbo:
|
||||
case invtype::typeTribute:
|
||||
case invtype::typeTrophyTribute:
|
||||
case invtype::typeGuildTribute:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
const char* RoF::invslot::GetInvPossessionsSlotName(int inv_slot)
|
||||
const char* RoF::invslot::GetInvPossessionsSlotName(int16 inv_slot)
|
||||
{
|
||||
switch (inv_slot) {
|
||||
case invslot::InvSlotInvalid:
|
||||
case invslot::SLOT_INVALID:
|
||||
return "Invalid Slot";
|
||||
case invslot::PossessionsCharm:
|
||||
case invslot::slotCharm:
|
||||
return "Charm";
|
||||
case invslot::PossessionsEar1:
|
||||
case invslot::slotEar1:
|
||||
return "Ear 1";
|
||||
case invslot::PossessionsHead:
|
||||
case invslot::slotHead:
|
||||
return "Head";
|
||||
case invslot::PossessionsFace:
|
||||
case invslot::slotFace:
|
||||
return "Face";
|
||||
case invslot::PossessionsEar2:
|
||||
case invslot::slotEar2:
|
||||
return "Ear 2";
|
||||
case invslot::PossessionsNeck:
|
||||
case invslot::slotNeck:
|
||||
return "Neck";
|
||||
case invslot::PossessionsShoulders:
|
||||
case invslot::slotShoulders:
|
||||
return "Shoulders";
|
||||
case invslot::PossessionsArms:
|
||||
case invslot::slotArms:
|
||||
return "Arms";
|
||||
case invslot::PossessionsBack:
|
||||
case invslot::slotBack:
|
||||
return "Back";
|
||||
case invslot::PossessionsWrist1:
|
||||
case invslot::slotWrist1:
|
||||
return "Wrist 1";
|
||||
case invslot::PossessionsWrist2:
|
||||
case invslot::slotWrist2:
|
||||
return "Wrist 2";
|
||||
case invslot::PossessionsRange:
|
||||
case invslot::slotRange:
|
||||
return "Range";
|
||||
case invslot::PossessionsHands:
|
||||
case invslot::slotHands:
|
||||
return "Hands";
|
||||
case invslot::PossessionsPrimary:
|
||||
case invslot::slotPrimary:
|
||||
return "Primary";
|
||||
case invslot::PossessionsSecondary:
|
||||
case invslot::slotSecondary:
|
||||
return "Secondary";
|
||||
case invslot::PossessionsFinger1:
|
||||
case invslot::slotFinger1:
|
||||
return "Finger 1";
|
||||
case invslot::PossessionsFinger2:
|
||||
case invslot::slotFinger2:
|
||||
return "Finger 2";
|
||||
case invslot::PossessionsChest:
|
||||
case invslot::slotChest:
|
||||
return "Chest";
|
||||
case invslot::PossessionsLegs:
|
||||
case invslot::slotLegs:
|
||||
return "Legs";
|
||||
case invslot::PossessionsFeet:
|
||||
case invslot::slotFeet:
|
||||
return "Feet";
|
||||
case invslot::PossessionsWaist:
|
||||
case invslot::slotWaist:
|
||||
return "Waist";
|
||||
case invslot::PossessionsPowerSource:
|
||||
case invslot::slotPowerSource:
|
||||
return "Power Source";
|
||||
case invslot::PossessionsAmmo:
|
||||
case invslot::slotAmmo:
|
||||
return "Ammo";
|
||||
case invslot::PossessionsGeneral1:
|
||||
case invslot::slotGeneral1:
|
||||
return "General 1";
|
||||
case invslot::PossessionsGeneral2:
|
||||
case invslot::slotGeneral2:
|
||||
return "General 2";
|
||||
case invslot::PossessionsGeneral3:
|
||||
case invslot::slotGeneral3:
|
||||
return "General 3";
|
||||
case invslot::PossessionsGeneral4:
|
||||
case invslot::slotGeneral4:
|
||||
return "General 4";
|
||||
case invslot::PossessionsGeneral5:
|
||||
case invslot::slotGeneral5:
|
||||
return "General 5";
|
||||
case invslot::PossessionsGeneral6:
|
||||
case invslot::slotGeneral6:
|
||||
return "General 6";
|
||||
case invslot::PossessionsGeneral7:
|
||||
case invslot::slotGeneral7:
|
||||
return "General 7";
|
||||
case invslot::PossessionsGeneral8:
|
||||
case invslot::slotGeneral8:
|
||||
return "General 8";
|
||||
case invslot::PossessionsGeneral9:
|
||||
case invslot::slotGeneral9:
|
||||
return "General 9";
|
||||
case invslot::PossessionsGeneral10:
|
||||
case invslot::slotGeneral10:
|
||||
return "General 10";
|
||||
case invslot::PossessionsCursor:
|
||||
case invslot::slotCursor:
|
||||
return "Cursor";
|
||||
default:
|
||||
return "Unknown Slot";
|
||||
}
|
||||
}
|
||||
|
||||
const char* RoF::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||
const char* RoF::invslot::GetInvSlotName(int16 inv_type, int16 inv_slot)
|
||||
{
|
||||
if (inv_type == invtype::InvTypePossessions)
|
||||
if (inv_type == invtype::typePossessions)
|
||||
return invslot::GetInvPossessionsSlotName(inv_slot);
|
||||
|
||||
size_t type_size = invtype::GetInvTypeSize(inv_type);
|
||||
int16 type_size = invtype::GetInvTypeSize(inv_type);
|
||||
|
||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||
if (!type_size || inv_slot == invslot::SLOT_INVALID)
|
||||
return "Invalid Slot";
|
||||
|
||||
if ((size_t)(inv_slot + 1) >= type_size)
|
||||
if ((inv_slot + 1) >= type_size)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -251,12 +251,12 @@ const char* RoF::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* RoF::invbag::GetInvBagIndexName(int bag_index)
|
||||
const char* RoF::invbag::GetInvBagIndexName(int16 bag_index)
|
||||
{
|
||||
if (bag_index == invbag::InvBagInvalid)
|
||||
if (bag_index == invbag::SLOT_INVALID)
|
||||
return "Invalid Bag";
|
||||
|
||||
if ((size_t)bag_index >= invbag::ItemBagSize)
|
||||
if (bag_index >= invbag::SLOT_COUNT)
|
||||
return "Unknown Bag";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -265,12 +265,12 @@ const char* RoF::invbag::GetInvBagIndexName(int bag_index)
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* RoF::invaug::GetInvAugIndexName(int aug_index)
|
||||
const char* RoF::invaug::GetInvAugIndexName(int16 aug_index)
|
||||
{
|
||||
if (aug_index == invaug::InvAugInvalid)
|
||||
if (aug_index == invaug::SOCKET_INVALID)
|
||||
return "Invalid Augment";
|
||||
|
||||
if ((size_t)aug_index >= invaug::ItemAugSize)
|
||||
if (aug_index >= invaug::SOCKET_COUNT)
|
||||
return "Unknown Augment";
|
||||
|
||||
static std::string ret_str;
|
||||
|
||||
+165
-175
@@ -27,115 +27,189 @@
|
||||
|
||||
namespace RoF
|
||||
{
|
||||
enum : int { Invalid = -1, Null, Safety };
|
||||
const int16 IINVALID = -1;
|
||||
const int16 INULL = 0;
|
||||
|
||||
enum : bool { False = false, True = true };
|
||||
|
||||
// pre-declarations
|
||||
namespace inventory {
|
||||
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
const bool ConcatenateInvTypeLimbo = false;
|
||||
|
||||
const bool AllowOverLevelEquipment = true;
|
||||
|
||||
const bool AllowEmptyBagInBag = true;
|
||||
const bool AllowClickCastFromBag = true;
|
||||
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||
namespace enum_ {
|
||||
enum InventoryTypes : int16 {
|
||||
typePossessions = INULL,
|
||||
typeBank,
|
||||
typeSharedBank,
|
||||
typeTrade,
|
||||
typeWorld,
|
||||
typeLimbo,
|
||||
typeTribute,
|
||||
typeTrophyTribute,
|
||||
typeGuildTribute,
|
||||
typeMerchant,
|
||||
typeDeleted,
|
||||
typeCorpse,
|
||||
typeBazaar,
|
||||
typeInspect,
|
||||
typeRealEstate,
|
||||
typeViewMODPC,
|
||||
typeViewMODBank,
|
||||
typeViewMODSharedBank,
|
||||
typeViewMODLimbo,
|
||||
typeAltStorage,
|
||||
typeArchived,
|
||||
typeMail,
|
||||
typeGuildTrophyTribute,
|
||||
typeOther
|
||||
};
|
||||
|
||||
enum InventoryType : int {
|
||||
InvTypePossessions = InvTypeBegin,
|
||||
InvTypeBank,
|
||||
InvTypeSharedBank,
|
||||
InvTypeTrade,
|
||||
InvTypeWorld,
|
||||
InvTypeLimbo,
|
||||
InvTypeTribute,
|
||||
InvTypeTrophyTribute,
|
||||
InvTypeGuildTribute,
|
||||
InvTypeMerchant,
|
||||
InvTypeDeleted,
|
||||
InvTypeCorpse,
|
||||
InvTypeBazaar,
|
||||
InvTypeInspect,
|
||||
InvTypeRealEstate,
|
||||
InvTypeViewMODPC,
|
||||
InvTypeViewMODBank,
|
||||
InvTypeViewMODSharedBank,
|
||||
InvTypeViewMODLimbo,
|
||||
InvTypeAltStorage,
|
||||
InvTypeArchived,
|
||||
InvTypeMail,
|
||||
InvTypeGuildTrophyTribute,
|
||||
InvTypeOther,
|
||||
InvTypeCount
|
||||
};
|
||||
} // namespace enum_
|
||||
using namespace enum_;
|
||||
|
||||
const int16 POSSESSIONS_SIZE = 34;
|
||||
const int16 BANK_SIZE = 24;
|
||||
const int16 SHARED_BANK_SIZE = 2;
|
||||
const int16 TRADE_SIZE = 8;
|
||||
const int16 WORLD_SIZE = 10;
|
||||
const int16 LIMBO_SIZE = 36;
|
||||
const int16 TRIBUTE_SIZE = 5;
|
||||
const int16 TROPHY_TRIBUTE_SIZE = 0;//unknown
|
||||
const int16 GUILD_TRIBUTE_SIZE = 2;//unverified
|
||||
const int16 MERCHANT_SIZE = 200;
|
||||
const int16 DELETED_SIZE = 0;//unknown - "Recovery Tab"
|
||||
const int16 CORPSE_SIZE = POSSESSIONS_SIZE;
|
||||
const int16 BAZAAR_SIZE = 200;
|
||||
const int16 INSPECT_SIZE = 23;
|
||||
const int16 REAL_ESTATE_SIZE = 0;//unknown
|
||||
const int16 VIEW_MOD_PC_SIZE = POSSESSIONS_SIZE;
|
||||
const int16 VIEW_MOD_BANK_SIZE = BANK_SIZE;
|
||||
const int16 VIEW_MOD_SHARED_BANK_SIZE = SHARED_BANK_SIZE;
|
||||
const int16 VIEW_MOD_LIMBO_SIZE = LIMBO_SIZE;
|
||||
const int16 ALT_STORAGE_SIZE = 0;//unknown - "Shroud Bank"
|
||||
const int16 ARCHIVED_SIZE = 0;//unknown
|
||||
const int16 MAIL_SIZE = 0;//unknown
|
||||
const int16 GUILD_TROPHY_TRIBUTE_SIZE = 0;//unknown
|
||||
const int16 OTHER_SIZE = 0;//unknown
|
||||
|
||||
const int16 TRADE_NPC_SIZE = 4; // defined by implication
|
||||
|
||||
const int16 TYPE_INVALID = IINVALID;
|
||||
const int16 TYPE_BEGIN = typePossessions;
|
||||
const int16 TYPE_END = typeOther;
|
||||
const int16 TYPE_COUNT = (TYPE_END - TYPE_BEGIN) + 1;
|
||||
|
||||
int16 GetInvTypeSize(int16 inv_type);
|
||||
const char* GetInvTypeName(int16 inv_type);
|
||||
|
||||
bool IsInvTypePersistent(int16 inv_type);
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||
namespace enum_ {
|
||||
enum InventorySlots : int16 {
|
||||
slotCharm = INULL,
|
||||
slotEar1,
|
||||
slotHead,
|
||||
slotFace,
|
||||
slotEar2,
|
||||
slotNeck,
|
||||
slotShoulders,
|
||||
slotArms,
|
||||
slotBack,
|
||||
slotWrist1,
|
||||
slotWrist2,
|
||||
slotRange,
|
||||
slotHands,
|
||||
slotPrimary,
|
||||
slotSecondary,
|
||||
slotFinger1,
|
||||
slotFinger2,
|
||||
slotChest,
|
||||
slotLegs,
|
||||
slotFeet,
|
||||
slotWaist,
|
||||
slotPowerSource,
|
||||
slotAmmo,
|
||||
slotGeneral1,
|
||||
slotGeneral2,
|
||||
slotGeneral3,
|
||||
slotGeneral4,
|
||||
slotGeneral5,
|
||||
slotGeneral6,
|
||||
slotGeneral7,
|
||||
slotGeneral8,
|
||||
slotGeneral9,
|
||||
slotGeneral10,
|
||||
slotCursor
|
||||
};
|
||||
|
||||
enum PossessionsSlot : int {
|
||||
PossessionsCharm = InvSlotBegin,
|
||||
PossessionsEar1,
|
||||
PossessionsHead,
|
||||
PossessionsFace,
|
||||
PossessionsEar2,
|
||||
PossessionsNeck,
|
||||
PossessionsShoulders,
|
||||
PossessionsArms,
|
||||
PossessionsBack,
|
||||
PossessionsWrist1,
|
||||
PossessionsWrist2,
|
||||
PossessionsRange,
|
||||
PossessionsHands,
|
||||
PossessionsPrimary,
|
||||
PossessionsSecondary,
|
||||
PossessionsFinger1,
|
||||
PossessionsFinger2,
|
||||
PossessionsChest,
|
||||
PossessionsLegs,
|
||||
PossessionsFeet,
|
||||
PossessionsWaist,
|
||||
PossessionsPowerSource,
|
||||
PossessionsAmmo,
|
||||
PossessionsGeneral1,
|
||||
PossessionsGeneral2,
|
||||
PossessionsGeneral3,
|
||||
PossessionsGeneral4,
|
||||
PossessionsGeneral5,
|
||||
PossessionsGeneral6,
|
||||
PossessionsGeneral7,
|
||||
PossessionsGeneral8,
|
||||
PossessionsGeneral9,
|
||||
PossessionsGeneral10,
|
||||
PossessionsCursor,
|
||||
PossessionsCount
|
||||
};
|
||||
} // namespace enum_
|
||||
using namespace enum_;
|
||||
|
||||
const int EquipmentBegin = PossessionsCharm;
|
||||
const int EquipmentEnd = PossessionsAmmo;
|
||||
const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1);
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
|
||||
const int GeneralBegin = PossessionsGeneral1;
|
||||
const int GeneralEnd = PossessionsGeneral10;
|
||||
const int GeneralCount = (GeneralEnd - GeneralBegin + 1);
|
||||
const int16 POSSESSIONS_BEGIN = slotCharm;
|
||||
const int16 POSSESSIONS_END = slotCursor;
|
||||
const int16 POSSESSIONS_COUNT = (POSSESSIONS_END - POSSESSIONS_BEGIN) + 1;
|
||||
|
||||
const int16 EQUIPMENT_BEGIN = slotCharm;
|
||||
const int16 EQUIPMENT_END = slotAmmo;
|
||||
const int16 EQUIPMENT_COUNT = (EQUIPMENT_END - EQUIPMENT_BEGIN + 1);
|
||||
|
||||
const int16 GENERAL_BEGIN = slotGeneral1;
|
||||
const int16 GENERAL_END = slotGeneral10;
|
||||
const int16 GENERAL_COUNT = (GENERAL_END - GENERAL_BEGIN + 1);
|
||||
|
||||
const int16 BONUS_BEGIN = invslot::slotCharm;
|
||||
const int16 BONUS_STAT_END = invslot::slotPowerSource;
|
||||
const int16 BONUS_SKILL_END = invslot::slotAmmo;
|
||||
|
||||
const int16 CORPSE_BEGIN = invslot::slotGeneral1;
|
||||
const int16 CORPSE_END = invslot::slotGeneral1 + invslot::slotCursor;
|
||||
|
||||
const uint64 POSSESSIONS_BITMASK = 0x00000003FFFFFFFF; // based on 34-slot count (RoF+)
|
||||
const uint64 CORPSE_BITMASK = 0x01FFFFFFFF800000; // based on 34-slot count (RoF+)
|
||||
|
||||
const char* GetInvPossessionsSlotName(int16 inv_slot);
|
||||
const char* GetInvSlotName(int16 inv_type, int16 inv_slot);
|
||||
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
const int16 SLOT_END = 9; //254;
|
||||
const int16 SLOT_COUNT = 10; //255; // server Size will be 255..unsure what actual client is (test)
|
||||
|
||||
const char* GetInvBagIndexName(int16 bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||
const int16 SOCKET_INVALID = IINVALID;
|
||||
const int16 SOCKET_BEGIN = INULL;
|
||||
const int16 SOCKET_END = 5;
|
||||
const int16 SOCKET_COUNT = 6;
|
||||
|
||||
const char* GetInvAugIndexName(int16 aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
@@ -164,109 +238,21 @@ namespace RoF
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
|
||||
const int16 POTION_BELT_SIZE = 5;
|
||||
|
||||
const int16 SKILL_ARRAY_SIZE = 100;
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
} /*constants*/
|
||||
const size_t CHARACTER_CREATION_LIMIT = 12;
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
} /*skills*/
|
||||
|
||||
|
||||
// declarations
|
||||
namespace inventory {
|
||||
const bool ConcatenateInvTypeLimbo = false;
|
||||
|
||||
const bool AllowOverLevelEquipment = true;
|
||||
|
||||
const bool AllowEmptyBagInBag = true;
|
||||
const bool AllowClickCastFromBag = true;
|
||||
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
||||
const size_t InvTypeBankSize = 24;
|
||||
const size_t InvTypeSharedBankSize = 2;
|
||||
const size_t InvTypeTradeSize = 8;
|
||||
const size_t InvTypeWorldSize = 10;
|
||||
const size_t InvTypeLimboSize = 36;
|
||||
const size_t InvTypeTributeSize = 5;
|
||||
const size_t InvTypeTrophyTributeSize = 0;//unknown
|
||||
const size_t InvTypeGuildTributeSize = 2;//unverified
|
||||
const size_t InvTypeMerchantSize = 200;
|
||||
const size_t InvTypeDeletedSize = 0;//unknown - "Recovery Tab"
|
||||
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
||||
const size_t InvTypeBazaarSize = 200;
|
||||
const size_t InvTypeInspectSize = invslot::EquipmentCount;
|
||||
const size_t InvTypeRealEstateSize = 0;//unknown
|
||||
const size_t InvTypeViewMODPCSize = InvTypePossessionsSize;
|
||||
const size_t InvTypeViewMODBankSize = InvTypeBankSize;
|
||||
const size_t InvTypeViewMODSharedBankSize = InvTypeSharedBankSize;
|
||||
const size_t InvTypeViewMODLimboSize = InvTypeLimboSize;
|
||||
const size_t InvTypeAltStorageSize = 0;//unknown - "Shroud Bank"
|
||||
const size_t InvTypeArchivedSize = 0;//unknown
|
||||
const size_t InvTypeMailSize = 0;//unknown
|
||||
const size_t InvTypeGuildTrophyTributeSize = 0;//unknown
|
||||
const size_t InvTypeOtherSize = 0;//unknown
|
||||
|
||||
extern size_t GetInvTypeSize(int inv_type);
|
||||
extern const char* GetInvTypeName(int inv_type);
|
||||
|
||||
extern bool IsInvTypePersistent(int inv_type);
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
extern const char* GetInvPossessionsSlotName(int inv_slot);
|
||||
extern const char* GetInvSlotName(int inv_type, int inv_slot);
|
||||
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
const size_t ItemBagSize = 255; // server Size will be 255..unsure what actual client is (test)
|
||||
|
||||
extern const char* GetInvBagIndexName(int bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
const size_t ItemAugSize = 6;
|
||||
|
||||
extern const char* GetInvAugIndexName(int aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||
const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize;
|
||||
|
||||
const size_t BandoliersSize = 20; // number of bandolier instances
|
||||
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
||||
|
||||
const size_t PotionBeltSize = 5;
|
||||
|
||||
const size_t SkillArraySize = 100;
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
const size_t CharacterCreationLimit = 12;
|
||||
|
||||
const size_t SayLinkBodySize = 55;
|
||||
const size_t SAY_LINK_BODY_SIZE = 55;
|
||||
|
||||
const int LongBuffs = 42;
|
||||
const int ShortBuffs = 20;
|
||||
@@ -279,11 +265,15 @@ namespace RoF
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
const bool CoinHasWeight = false;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
@@ -898,13 +898,13 @@ struct BandolierItem_Struct_Old
|
||||
struct Bandolier_Struct
|
||||
{
|
||||
char Name[1]; // Variable Length
|
||||
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||
BandolierItem_Struct Items[profile::BANDOLIER_ITEM_COUNT];
|
||||
};
|
||||
|
||||
struct Bandolier_Struct_Old
|
||||
{
|
||||
char Name[32];
|
||||
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||
BandolierItem_Struct Items[profile::BANDOLIER_ITEM_COUNT];
|
||||
};
|
||||
|
||||
struct PotionBeltItem_Struct
|
||||
@@ -924,12 +924,12 @@ struct PotionBeltItem_Struct_Old
|
||||
|
||||
struct PotionBelt_Struct
|
||||
{
|
||||
PotionBeltItem_Struct Items[profile::PotionBeltSize];
|
||||
PotionBeltItem_Struct Items[profile::POTION_BELT_SIZE];
|
||||
};
|
||||
|
||||
struct PotionBelt_Struct_Old
|
||||
{
|
||||
PotionBeltItem_Struct_Old Items[profile::PotionBeltSize];
|
||||
PotionBeltItem_Struct_Old Items[profile::POTION_BELT_SIZE];
|
||||
};
|
||||
|
||||
struct GroupLeadershipAA_Struct {
|
||||
@@ -1139,7 +1139,7 @@ union
|
||||
/*12949*/ uint32 aapoints; // Unspent AA points - Seen 1
|
||||
/*12953*/ uint16 unknown_rof20; //
|
||||
/*12955*/ uint32 bandolier_count; // Seen 20
|
||||
/*12959*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [20] 740 bytes (Variable Name Sizes) - bandolier contents
|
||||
/*12959*/ Bandolier_Struct bandoliers[profile::BANDOLIERS_SIZE]; // [20] 740 bytes (Variable Name Sizes) - bandolier contents
|
||||
/*13699*/ uint32 potionbelt_count; // Seen 5
|
||||
/*13703*/ PotionBelt_Struct potionbelt; // [5] 45 bytes potion belt - (Variable Name Sizes)
|
||||
/*13748*/ int32 unknown_rof21; // Seen -1
|
||||
|
||||
+36
-36
@@ -1524,18 +1524,18 @@ namespace SoD
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) {
|
||||
for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
OUT(bandoliers[r].Items[k].Icon);
|
||||
OUT_str(bandoliers[r].Items[k].Name);
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) {
|
||||
for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
eq->bandoliers[r].Items[k].Icon = 0;
|
||||
eq->bandoliers[r].Items[k].Name[0] = '\0';
|
||||
@@ -1545,13 +1545,13 @@ namespace SoD
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++r) {
|
||||
for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++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::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) {
|
||||
for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -1839,8 +1839,8 @@ namespace SoD
|
||||
eq->CharCount = emu->CharCount;
|
||||
eq->TotalChars = emu->TotalChars;
|
||||
|
||||
if (eq->TotalChars > constants::CharacterCreationLimit)
|
||||
eq->TotalChars = constants::CharacterCreationLimit;
|
||||
if (eq->TotalChars > constants::CHARACTER_CREATION_LIMIT)
|
||||
eq->TotalChars = constants::CHARACTER_CREATION_LIMIT;
|
||||
|
||||
FINISH_ENCODE();
|
||||
return;
|
||||
@@ -1852,7 +1852,7 @@ namespace SoD
|
||||
|
||||
size_t names_length = 0;
|
||||
size_t character_count = 0;
|
||||
for (; character_count < emu->CharCount && character_count < constants::CharacterCreationLimit; ++character_count) {
|
||||
for (; character_count < emu->CharCount && character_count < constants::CHARACTER_CREATION_LIMIT; ++character_count) {
|
||||
emu_cse = (CharacterSelectEntry_Struct *)emu_ptr;
|
||||
names_length += strlen(emu_cse->Name);
|
||||
emu_ptr += sizeof(CharacterSelectEntry_Struct);
|
||||
@@ -1868,8 +1868,8 @@ namespace SoD
|
||||
eq->CharCount = character_count;
|
||||
eq->TotalChars = emu->TotalChars;
|
||||
|
||||
if (eq->TotalChars > constants::CharacterCreationLimit)
|
||||
eq->TotalChars = constants::CharacterCreationLimit;
|
||||
if (eq->TotalChars > constants::CHARACTER_CREATION_LIMIT)
|
||||
eq->TotalChars = constants::CHARACTER_CREATION_LIMIT;
|
||||
|
||||
emu_ptr = __emu_buffer;
|
||||
emu_ptr += sizeof(CharacterSelect_Struct);
|
||||
@@ -3473,7 +3473,7 @@ namespace SoD
|
||||
ibs.nodrop = item->NoDrop;
|
||||
ibs.attune = item->Attuneable;
|
||||
ibs.size = item->Size;
|
||||
ibs.slots = SwapBits21and22(item->Slots);
|
||||
ibs.slots = SwapBits21And22(item->Slots);
|
||||
ibs.price = item->Price;
|
||||
ibs.icon = item->Icon;
|
||||
ibs.unknown1 = 1;
|
||||
@@ -3563,7 +3563,7 @@ namespace SoD
|
||||
isbs.augtype = item->AugType;
|
||||
isbs.augrestrict = item->AugRestrict;
|
||||
|
||||
for (int index = 0; index < invaug::ItemAugSize; ++index) {
|
||||
for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) {
|
||||
isbs.augslots[index].type = item->AugSlotType[index];
|
||||
isbs.augslots[index].visible = item->AugSlotVisible[index];
|
||||
isbs.augslots[index].unknown = item->AugSlotUnk2[index];
|
||||
@@ -3736,18 +3736,18 @@ namespace SoD
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||
for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
int SubSlotNumber = INVALID_INDEX;
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
if (slot_id_in >= EQEmu::invslot::GENERAL_BEGIN && slot_id_in <= EQEmu::invslot::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::invbag::SLOT_COUNT) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::invslot::BANK_BEGIN && slot_id_in <= EQEmu::invslot::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::invslot::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + index);
|
||||
else
|
||||
SubSlotNumber = slot_id_in;
|
||||
|
||||
@@ -3765,16 +3765,16 @@ namespace SoD
|
||||
{
|
||||
uint32 SoDSlot = 0;
|
||||
|
||||
if (serverSlot >= EQEmu::inventory::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (serverSlot >= EQEmu::invslot::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
SoDSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||
else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END)
|
||||
SoDSlot = serverSlot + 11;
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::BANK_BAGS_END)
|
||||
SoDSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END)
|
||||
SoDSlot = serverSlot + 1;
|
||||
else if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
SoDSlot = invslot::PossessionsPowerSource;
|
||||
else if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE)
|
||||
SoDSlot = invslot::slotPowerSource;
|
||||
else
|
||||
SoDSlot = serverSlot;
|
||||
return SoDSlot;
|
||||
@@ -3790,16 +3790,16 @@ namespace SoD
|
||||
{
|
||||
uint32 ServerSlot = 0;
|
||||
|
||||
if (sodSlot >= invslot::PossessionsAmmo && sodSlot <= invslot::CorpseEnd) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (sodSlot >= invslot::slotAmmo && sodSlot <= invslot::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
ServerSlot = sodSlot - 1;
|
||||
else if (sodSlot >= invbag::GeneralBagsBegin && sodSlot <= invbag::CursorBagEnd)
|
||||
else if (sodSlot >= invbag::GENERAL_BAGS_BEGIN && sodSlot <= invbag::CURSOR_BAG_END)
|
||||
ServerSlot = sodSlot - 11;
|
||||
else if (sodSlot >= invbag::BankBagsBegin && sodSlot <= invbag::BankBagsEnd)
|
||||
else if (sodSlot >= invbag::BANK_BAGS_BEGIN && sodSlot <= invbag::BANK_BAGS_END)
|
||||
ServerSlot = sodSlot - 1;
|
||||
else if (sodSlot >= invbag::SharedBankBagsBegin && sodSlot <= invbag::SharedBankBagsEnd)
|
||||
else if (sodSlot >= invbag::SHARED_BANK_BAGS_BEGIN && sodSlot <= invbag::SHARED_BANK_BAGS_END)
|
||||
ServerSlot = sodSlot - 1;
|
||||
else if (sodSlot == invslot::PossessionsPowerSource)
|
||||
ServerSlot = EQEmu::inventory::slotPowerSource;
|
||||
else if (sodSlot == invslot::slotPowerSource)
|
||||
ServerSlot = EQEmu::invslot::SLOT_POWER_SOURCE;
|
||||
else
|
||||
ServerSlot = sodSlot;
|
||||
return ServerSlot;
|
||||
@@ -3813,7 +3813,7 @@ namespace SoD
|
||||
|
||||
static inline void ServerToSoDSayLink(std::string& sodSayLink, const std::string& serverSayLink)
|
||||
{
|
||||
if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
sodSayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -3822,7 +3822,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::SayLinkBodySize) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) {
|
||||
sodSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -3853,7 +3853,7 @@ namespace SoD
|
||||
|
||||
static inline void SoDToServerSayLink(std::string& serverSayLink, const std::string& sodSayLink)
|
||||
{
|
||||
if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (sodSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (sodSayLink.find('\x12') == std::string::npos)) {
|
||||
serverSayLink = sodSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -3862,7 +3862,7 @@ namespace SoD
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) {
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
|
||||
+119
-119
@@ -22,198 +22,198 @@
|
||||
#include "../string_util.h"
|
||||
|
||||
|
||||
size_t SoD::invtype::GetInvTypeSize(int inv_type)
|
||||
int16 SoD::invtype::GetInvTypeSize(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypePossessions:
|
||||
return invtype::InvTypePossessionsSize;
|
||||
case invtype::InvTypeBank:
|
||||
return invtype::InvTypeBankSize;
|
||||
case invtype::InvTypeSharedBank:
|
||||
return invtype::InvTypeSharedBankSize;
|
||||
case invtype::InvTypeTrade:
|
||||
return invtype::InvTypeTradeSize;
|
||||
case invtype::InvTypeWorld:
|
||||
return invtype::InvTypeWorldSize;
|
||||
case invtype::InvTypeLimbo:
|
||||
return invtype::InvTypeLimboSize;
|
||||
case invtype::InvTypeTribute:
|
||||
return invtype::InvTypeTributeSize;
|
||||
case invtype::InvTypeGuildTribute:
|
||||
return invtype::InvTypeGuildTributeSize;
|
||||
case invtype::InvTypeMerchant:
|
||||
return invtype::InvTypeMerchantSize;
|
||||
case invtype::InvTypeCorpse:
|
||||
return invtype::InvTypeCorpseSize;
|
||||
case invtype::InvTypeBazaar:
|
||||
return invtype::InvTypeBazaarSize;
|
||||
case invtype::InvTypeInspect:
|
||||
return invtype::InvTypeInspectSize;
|
||||
case invtype::InvTypeViewMODPC:
|
||||
return invtype::InvTypeViewMODPCSize;
|
||||
case invtype::InvTypeViewMODBank:
|
||||
return invtype::InvTypeViewMODBankSize;
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
return invtype::InvTypeViewMODSharedBankSize;
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
return invtype::InvTypeViewMODLimboSize;
|
||||
case invtype::InvTypeAltStorage:
|
||||
return invtype::InvTypeAltStorageSize;
|
||||
case invtype::InvTypeArchived:
|
||||
return invtype::InvTypeArchivedSize;
|
||||
case invtype::InvTypeOther:
|
||||
return invtype::InvTypeOtherSize;
|
||||
case invtype::typePossessions:
|
||||
return invtype::POSSESSIONS_SIZE;
|
||||
case invtype::typeBank:
|
||||
return invtype::BANK_SIZE;
|
||||
case invtype::typeSharedBank:
|
||||
return invtype::SHARED_BANK_SIZE;
|
||||
case invtype::typeTrade:
|
||||
return invtype::TRADE_SIZE;
|
||||
case invtype::typeWorld:
|
||||
return invtype::WORLD_SIZE;
|
||||
case invtype::typeLimbo:
|
||||
return invtype::LIMBO_SIZE;
|
||||
case invtype::typeTribute:
|
||||
return invtype::TRIBUTE_SIZE;
|
||||
case invtype::typeGuildTribute:
|
||||
return invtype::GUILD_TRIBUTE_SIZE;
|
||||
case invtype::typeMerchant:
|
||||
return invtype::MERCHANT_SIZE;
|
||||
case invtype::typeCorpse:
|
||||
return invtype::CORPSE_SIZE;
|
||||
case invtype::typeBazaar:
|
||||
return invtype::BAZAAR_SIZE;
|
||||
case invtype::typeInspect:
|
||||
return invtype::INSPECT_SIZE;
|
||||
case invtype::typeViewMODPC:
|
||||
return invtype::VIEW_MOD_PC_SIZE;
|
||||
case invtype::typeViewMODBank:
|
||||
return invtype::VIEW_MOD_BANK_SIZE;
|
||||
case invtype::typeViewMODSharedBank:
|
||||
return invtype::VIEW_MOD_SHARED_BANK_SIZE;
|
||||
case invtype::typeViewMODLimbo:
|
||||
return invtype::VIEW_MOD_LIMBO_SIZE;
|
||||
case invtype::typeAltStorage:
|
||||
return invtype::ALT_STORAGE_SIZE;
|
||||
case invtype::typeArchived:
|
||||
return invtype::ARCHIVED_SIZE;
|
||||
case invtype::typeOther:
|
||||
return invtype::OTHER_SIZE;
|
||||
default:
|
||||
return 0;
|
||||
return INULL;
|
||||
}
|
||||
}
|
||||
|
||||
const char* SoD::invtype::GetInvTypeName(int inv_type)
|
||||
const char* SoD::invtype::GetInvTypeName(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypeInvalid:
|
||||
case invtype::TYPE_INVALID:
|
||||
return "Invalid Type";
|
||||
case invtype::InvTypePossessions:
|
||||
case invtype::typePossessions:
|
||||
return "Possessions";
|
||||
case invtype::InvTypeBank:
|
||||
case invtype::typeBank:
|
||||
return "Bank";
|
||||
case invtype::InvTypeSharedBank:
|
||||
case invtype::typeSharedBank:
|
||||
return "Shared Bank";
|
||||
case invtype::InvTypeTrade:
|
||||
case invtype::typeTrade:
|
||||
return "Trade";
|
||||
case invtype::InvTypeWorld:
|
||||
case invtype::typeWorld:
|
||||
return "World";
|
||||
case invtype::InvTypeLimbo:
|
||||
case invtype::typeLimbo:
|
||||
return "Limbo";
|
||||
case invtype::InvTypeTribute:
|
||||
case invtype::typeTribute:
|
||||
return "Tribute";
|
||||
case invtype::InvTypeGuildTribute:
|
||||
case invtype::typeGuildTribute:
|
||||
return "Guild Tribute";
|
||||
case invtype::InvTypeMerchant:
|
||||
case invtype::typeMerchant:
|
||||
return "Merchant";
|
||||
case invtype::InvTypeCorpse:
|
||||
case invtype::typeCorpse:
|
||||
return "Corpse";
|
||||
case invtype::InvTypeBazaar:
|
||||
case invtype::typeBazaar:
|
||||
return "Bazaar";
|
||||
case invtype::InvTypeInspect:
|
||||
case invtype::typeInspect:
|
||||
return "Inspect";
|
||||
case invtype::InvTypeViewMODPC:
|
||||
case invtype::typeViewMODPC:
|
||||
return "View MOD PC";
|
||||
case invtype::InvTypeViewMODBank:
|
||||
case invtype::typeViewMODBank:
|
||||
return "View MOD Bank";
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
case invtype::typeViewMODSharedBank:
|
||||
return "View MOD Shared Bank";
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
case invtype::typeViewMODLimbo:
|
||||
return "View MOD Limbo";
|
||||
case invtype::InvTypeAltStorage:
|
||||
case invtype::typeAltStorage:
|
||||
return "Alt Storage";
|
||||
case invtype::InvTypeArchived:
|
||||
case invtype::typeArchived:
|
||||
return "Archived";
|
||||
case invtype::InvTypeOther:
|
||||
case invtype::typeOther:
|
||||
return "Other";
|
||||
default:
|
||||
return "Unknown Type";
|
||||
}
|
||||
}
|
||||
|
||||
bool SoD::invtype::IsInvTypePersistent(int inv_type)
|
||||
bool SoD::invtype::IsInvTypePersistent(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypePossessions:
|
||||
case invtype::InvTypeBank:
|
||||
case invtype::InvTypeSharedBank:
|
||||
case invtype::InvTypeTrade:
|
||||
case invtype::InvTypeWorld:
|
||||
case invtype::InvTypeLimbo:
|
||||
case invtype::InvTypeTribute:
|
||||
case invtype::InvTypeGuildTribute:
|
||||
case invtype::typePossessions:
|
||||
case invtype::typeBank:
|
||||
case invtype::typeSharedBank:
|
||||
case invtype::typeTrade:
|
||||
case invtype::typeWorld:
|
||||
case invtype::typeLimbo:
|
||||
case invtype::typeTribute:
|
||||
case invtype::typeGuildTribute:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
const char* SoD::invslot::GetInvPossessionsSlotName(int inv_slot)
|
||||
const char* SoD::invslot::GetInvPossessionsSlotName(int16 inv_slot)
|
||||
{
|
||||
switch (inv_slot) {
|
||||
case invslot::InvSlotInvalid:
|
||||
case invslot::SLOT_INVALID:
|
||||
return "Invalid Slot";
|
||||
case invslot::PossessionsCharm:
|
||||
case invslot::slotCharm:
|
||||
return "Charm";
|
||||
case invslot::PossessionsEar1:
|
||||
case invslot::slotEar1:
|
||||
return "Ear 1";
|
||||
case invslot::PossessionsHead:
|
||||
case invslot::slotHead:
|
||||
return "Head";
|
||||
case invslot::PossessionsFace:
|
||||
case invslot::slotFace:
|
||||
return "Face";
|
||||
case invslot::PossessionsEar2:
|
||||
case invslot::slotEar2:
|
||||
return "Ear 2";
|
||||
case invslot::PossessionsNeck:
|
||||
case invslot::slotNeck:
|
||||
return "Neck";
|
||||
case invslot::PossessionsShoulders:
|
||||
case invslot::slotShoulders:
|
||||
return "Shoulders";
|
||||
case invslot::PossessionsArms:
|
||||
case invslot::slotArms:
|
||||
return "Arms";
|
||||
case invslot::PossessionsBack:
|
||||
case invslot::slotBack:
|
||||
return "Back";
|
||||
case invslot::PossessionsWrist1:
|
||||
case invslot::slotWrist1:
|
||||
return "Wrist 1";
|
||||
case invslot::PossessionsWrist2:
|
||||
case invslot::slotWrist2:
|
||||
return "Wrist 2";
|
||||
case invslot::PossessionsRange:
|
||||
case invslot::slotRange:
|
||||
return "Range";
|
||||
case invslot::PossessionsHands:
|
||||
case invslot::slotHands:
|
||||
return "Hands";
|
||||
case invslot::PossessionsPrimary:
|
||||
case invslot::slotPrimary:
|
||||
return "Primary";
|
||||
case invslot::PossessionsSecondary:
|
||||
case invslot::slotSecondary:
|
||||
return "Secondary";
|
||||
case invslot::PossessionsFinger1:
|
||||
case invslot::slotFinger1:
|
||||
return "Finger 1";
|
||||
case invslot::PossessionsFinger2:
|
||||
case invslot::slotFinger2:
|
||||
return "Finger 2";
|
||||
case invslot::PossessionsChest:
|
||||
case invslot::slotChest:
|
||||
return "Chest";
|
||||
case invslot::PossessionsLegs:
|
||||
case invslot::slotLegs:
|
||||
return "Legs";
|
||||
case invslot::PossessionsFeet:
|
||||
case invslot::slotFeet:
|
||||
return "Feet";
|
||||
case invslot::PossessionsWaist:
|
||||
case invslot::slotWaist:
|
||||
return "Waist";
|
||||
case invslot::PossessionsPowerSource:
|
||||
case invslot::slotPowerSource:
|
||||
return "Power Source";
|
||||
case invslot::PossessionsAmmo:
|
||||
case invslot::slotAmmo:
|
||||
return "Ammo";
|
||||
case invslot::PossessionsGeneral1:
|
||||
case invslot::slotGeneral1:
|
||||
return "General 1";
|
||||
case invslot::PossessionsGeneral2:
|
||||
case invslot::slotGeneral2:
|
||||
return "General 2";
|
||||
case invslot::PossessionsGeneral3:
|
||||
case invslot::slotGeneral3:
|
||||
return "General 3";
|
||||
case invslot::PossessionsGeneral4:
|
||||
case invslot::slotGeneral4:
|
||||
return "General 4";
|
||||
case invslot::PossessionsGeneral5:
|
||||
case invslot::slotGeneral5:
|
||||
return "General 5";
|
||||
case invslot::PossessionsGeneral6:
|
||||
case invslot::slotGeneral6:
|
||||
return "General 6";
|
||||
case invslot::PossessionsGeneral7:
|
||||
case invslot::slotGeneral7:
|
||||
return "General 7";
|
||||
case invslot::PossessionsGeneral8:
|
||||
case invslot::slotGeneral8:
|
||||
return "General 8";
|
||||
case invslot::PossessionsCursor:
|
||||
case invslot::slotCursor:
|
||||
return "Cursor";
|
||||
default:
|
||||
return "Unknown Slot";
|
||||
}
|
||||
}
|
||||
|
||||
const char* SoD::invslot::GetInvCorpseSlotName(int inv_slot)
|
||||
const char* SoD::invslot::GetInvCorpseSlotName(int16 inv_slot)
|
||||
{
|
||||
if (!invtype::GetInvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid)
|
||||
if (!invtype::GetInvTypeSize(invtype::typeCorpse) || inv_slot == invslot::SLOT_INVALID)
|
||||
return "Invalid Slot";
|
||||
|
||||
// needs work
|
||||
if ((size_t)(inv_slot + 1) < invslot::CorpseBegin || (size_t)(inv_slot + 1) >= invslot::CorpseEnd)
|
||||
if ((inv_slot + 1) < invslot::CORPSE_BEGIN || (inv_slot + 1) >= invslot::CORPSE_END)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -222,19 +222,19 @@ const char* SoD::invslot::GetInvCorpseSlotName(int inv_slot)
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* SoD::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||
const char* SoD::invslot::GetInvSlotName(int16 inv_type, int16 inv_slot)
|
||||
{
|
||||
if (inv_type == invtype::InvTypePossessions)
|
||||
if (inv_type == invtype::typePossessions)
|
||||
return invslot::GetInvPossessionsSlotName(inv_slot);
|
||||
else if (inv_type == invtype::InvTypeCorpse)
|
||||
else if (inv_type == invtype::typeCorpse)
|
||||
return invslot::GetInvCorpseSlotName(inv_slot);
|
||||
|
||||
size_t type_size = invtype::GetInvTypeSize(inv_type);
|
||||
int16 type_size = invtype::GetInvTypeSize(inv_type);
|
||||
|
||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||
if (!type_size || inv_slot == invslot::SLOT_INVALID)
|
||||
return "Invalid Slot";
|
||||
|
||||
if ((size_t)(inv_slot + 1) >= type_size)
|
||||
if ((inv_slot + 1) >= type_size)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -243,12 +243,12 @@ const char* SoD::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* SoD::invbag::GetInvBagIndexName(int bag_index)
|
||||
const char* SoD::invbag::GetInvBagIndexName(int16 bag_index)
|
||||
{
|
||||
if (bag_index == invbag::InvBagInvalid)
|
||||
if (bag_index == invbag::SLOT_INVALID)
|
||||
return "Invalid Bag";
|
||||
|
||||
if ((size_t)bag_index >= invbag::ItemBagSize)
|
||||
if (bag_index >= invbag::SLOT_COUNT)
|
||||
return "Unknown Bag";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -257,12 +257,12 @@ const char* SoD::invbag::GetInvBagIndexName(int bag_index)
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* SoD::invaug::GetInvAugIndexName(int aug_index)
|
||||
const char* SoD::invaug::GetInvAugIndexName(int16 aug_index)
|
||||
{
|
||||
if (aug_index == invaug::InvAugInvalid)
|
||||
if (aug_index == invaug::SOCKET_INVALID)
|
||||
return "Invalid Augment";
|
||||
|
||||
if ((size_t)aug_index >= invaug::ItemAugSize)
|
||||
if (aug_index >= invaug::SOCKET_COUNT)
|
||||
return "Unknown Augment";
|
||||
|
||||
static std::string ret_str;
|
||||
|
||||
+194
-206
@@ -27,108 +27,218 @@
|
||||
|
||||
namespace SoD
|
||||
{
|
||||
enum : int { Invalid = -1, Null, Safety };
|
||||
const int16 IINVALID = -1;
|
||||
const int16 INULL = 0;
|
||||
|
||||
enum : bool { False = false, True = true };
|
||||
|
||||
// pre-declarations
|
||||
namespace inventory {
|
||||
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
const bool ConcatenateInvTypeLimbo = true;
|
||||
|
||||
const bool AllowOverLevelEquipment = false;
|
||||
|
||||
const bool AllowEmptyBagInBag = false;
|
||||
const bool AllowClickCastFromBag = false;
|
||||
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||
namespace enum_ {
|
||||
enum InventoryTypes : int16 {
|
||||
typePossessions = INULL,
|
||||
typeBank,
|
||||
typeSharedBank,
|
||||
typeTrade,
|
||||
typeWorld,
|
||||
typeLimbo,
|
||||
typeTribute,
|
||||
typeGuildTribute,
|
||||
typeMerchant,
|
||||
typeCorpse,
|
||||
typeBazaar,
|
||||
typeInspect,
|
||||
typeViewMODPC,
|
||||
typeViewMODBank,
|
||||
typeViewMODSharedBank,
|
||||
typeViewMODLimbo,
|
||||
typeAltStorage,
|
||||
typeArchived,
|
||||
typeOther
|
||||
};
|
||||
|
||||
enum InventoryType : int {
|
||||
InvTypePossessions = InvTypeBegin,
|
||||
InvTypeBank,
|
||||
InvTypeSharedBank,
|
||||
InvTypeTrade,
|
||||
InvTypeWorld,
|
||||
InvTypeLimbo,
|
||||
InvTypeTribute,
|
||||
InvTypeGuildTribute,
|
||||
InvTypeMerchant,
|
||||
InvTypeCorpse,
|
||||
InvTypeBazaar,
|
||||
InvTypeInspect,
|
||||
InvTypeViewMODPC,
|
||||
InvTypeViewMODBank,
|
||||
InvTypeViewMODSharedBank,
|
||||
InvTypeViewMODLimbo,
|
||||
InvTypeAltStorage,
|
||||
InvTypeArchived,
|
||||
InvTypeOther,
|
||||
InvTypeCount
|
||||
};
|
||||
} // namespace enum_
|
||||
using namespace enum_;
|
||||
|
||||
const int16 POSSESSIONS_SIZE = 32;
|
||||
const int16 BANK_SIZE = 24;
|
||||
const int16 SHARED_BANK_SIZE = 2;
|
||||
const int16 TRADE_SIZE = 8;
|
||||
const int16 WORLD_SIZE = 10;
|
||||
const int16 LIMBO_SIZE = 36;
|
||||
const int16 TRIBUTE_SIZE = 5;
|
||||
const int16 GUILD_TRIBUTE_SIZE = 2;
|
||||
const int16 MERCHANT_SIZE = 80;
|
||||
const int16 CORPSE_SIZE = POSSESSIONS_SIZE;
|
||||
const int16 BAZAAR_SIZE = 80;
|
||||
const int16 INSPECT_SIZE = 23;
|
||||
const int16 VIEW_MOD_PC_SIZE = POSSESSIONS_SIZE;
|
||||
const int16 VIEW_MOD_BANK_SIZE = BANK_SIZE;
|
||||
const int16 VIEW_MOD_SHARED_BANK_SIZE = SHARED_BANK_SIZE;
|
||||
const int16 VIEW_MOD_LIMBO_SIZE = LIMBO_SIZE;
|
||||
const int16 ALT_STORAGE_SIZE = 0;//unknown - "Shroud Bank"
|
||||
const int16 ARCHIVED_SIZE = 0;//unknown
|
||||
const int16 OTHER_SIZE = 0;//unknown
|
||||
|
||||
const int16 TRADE_NPC_SIZE = 4; // defined by implication
|
||||
|
||||
const int16 TYPE_INVALID = IINVALID;
|
||||
const int16 TYPE_BEGIN = typePossessions;
|
||||
const int16 TYPE_END = typeOther;
|
||||
const int16 TYPE_COUNT = (TYPE_END - TYPE_BEGIN) + 1;
|
||||
|
||||
int16 GetInvTypeSize(int16 inv_type);
|
||||
const char* GetInvTypeName(int16 inv_type);
|
||||
|
||||
bool IsInvTypePersistent(int16 inv_type);
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||
namespace enum_ {
|
||||
enum InventorySlots : int16 {
|
||||
slotCharm = INULL,
|
||||
slotEar1,
|
||||
slotHead,
|
||||
slotFace,
|
||||
slotEar2,
|
||||
slotNeck,
|
||||
slotShoulders,
|
||||
slotArms,
|
||||
slotBack,
|
||||
slotWrist1,
|
||||
slotWrist2,
|
||||
slotRange,
|
||||
slotHands,
|
||||
slotPrimary,
|
||||
slotSecondary,
|
||||
slotFinger1,
|
||||
slotFinger2,
|
||||
slotChest,
|
||||
slotLegs,
|
||||
slotFeet,
|
||||
slotWaist,
|
||||
slotPowerSource,
|
||||
slotAmmo,
|
||||
slotGeneral1,
|
||||
slotGeneral2,
|
||||
slotGeneral3,
|
||||
slotGeneral4,
|
||||
slotGeneral5,
|
||||
slotGeneral6,
|
||||
slotGeneral7,
|
||||
slotGeneral8,
|
||||
slotCursor
|
||||
};
|
||||
|
||||
enum PossessionsSlot : int {
|
||||
PossessionsCharm = InvSlotBegin,
|
||||
PossessionsEar1,
|
||||
PossessionsHead,
|
||||
PossessionsFace,
|
||||
PossessionsEar2,
|
||||
PossessionsNeck,
|
||||
PossessionsShoulders,
|
||||
PossessionsArms,
|
||||
PossessionsBack,
|
||||
PossessionsWrist1,
|
||||
PossessionsWrist2,
|
||||
PossessionsRange,
|
||||
PossessionsHands,
|
||||
PossessionsPrimary,
|
||||
PossessionsSecondary,
|
||||
PossessionsFinger1,
|
||||
PossessionsFinger2,
|
||||
PossessionsChest,
|
||||
PossessionsLegs,
|
||||
PossessionsFeet,
|
||||
PossessionsWaist,
|
||||
PossessionsPowerSource,
|
||||
PossessionsAmmo,
|
||||
PossessionsGeneral1,
|
||||
PossessionsGeneral2,
|
||||
PossessionsGeneral3,
|
||||
PossessionsGeneral4,
|
||||
PossessionsGeneral5,
|
||||
PossessionsGeneral6,
|
||||
PossessionsGeneral7,
|
||||
PossessionsGeneral8,
|
||||
PossessionsCursor,
|
||||
PossessionsCount
|
||||
};
|
||||
} // namespace enum_
|
||||
using namespace enum_;
|
||||
|
||||
const int EquipmentBegin = PossessionsCharm;
|
||||
const int EquipmentEnd = PossessionsAmmo;
|
||||
const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1);
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
|
||||
const int GeneralBegin = PossessionsGeneral1;
|
||||
const int GeneralEnd = PossessionsGeneral8;
|
||||
const int GeneralCount = (GeneralEnd - GeneralBegin + 1);
|
||||
const int16 POSSESSIONS_BEGIN = slotCharm;
|
||||
const int16 POSSESSIONS_END = slotCursor;
|
||||
const int16 POSSESSIONS_COUNT = (POSSESSIONS_END - POSSESSIONS_BEGIN) + 1;
|
||||
|
||||
const int16 EQUIPMENT_BEGIN = slotCharm;
|
||||
const int16 EQUIPMENT_END = slotAmmo;
|
||||
const int16 EQUIPMENT_COUNT = (EQUIPMENT_END - EQUIPMENT_BEGIN + 1);
|
||||
|
||||
const int16 GENERAL_BEGIN = slotGeneral1;
|
||||
const int16 GENERAL_END = slotGeneral8;
|
||||
const int16 GENERAL_COUNT = (GENERAL_END - GENERAL_BEGIN + 1);
|
||||
|
||||
const int16 BONUS_BEGIN = invslot::slotCharm;
|
||||
const int16 BONUS_STAT_END = invslot::slotPowerSource;
|
||||
const int16 BONUS_SKILL_END = invslot::slotAmmo;
|
||||
|
||||
const int16 BANK_BEGIN = 2000;
|
||||
const int16 BANK_END = (BANK_BEGIN + invtype::BANK_SIZE) - 1;
|
||||
|
||||
const int16 SHARED_BANK_BEGIN = 2500;
|
||||
const int16 SHARED_BANK_END = (SHARED_BANK_BEGIN + invtype::SHARED_BANK_SIZE) - 1;
|
||||
|
||||
const int16 TRADE_BEGIN = 3000;
|
||||
const int16 TRADE_END = (TRADE_BEGIN + invtype::TRADE_SIZE) - 1;
|
||||
|
||||
const int16 TRADE_NPC_END = (TRADE_BEGIN + invtype::TRADE_NPC_SIZE) - 1; // defined by implication
|
||||
|
||||
const int16 WORLD_BEGIN = 4000;
|
||||
const int16 WORLD_END = (WORLD_BEGIN + invtype::WORLD_SIZE) - 1;
|
||||
|
||||
const int16 TRIBUTE_BEGIN = 400;
|
||||
const int16 TRIBUTE_END = (TRIBUTE_BEGIN + invtype::TRIBUTE_SIZE) - 1;
|
||||
|
||||
const int16 GUILD_TRIBUTE_BEGIN = 450;
|
||||
const int16 GUILD_TRIBUTE_END = (GUILD_TRIBUTE_BEGIN + invtype::GUILD_TRIBUTE_SIZE) - 1;
|
||||
|
||||
const int16 CORPSE_BEGIN = invslot::slotGeneral1;
|
||||
const int16 CORPSE_END = invslot::slotGeneral1 + invslot::slotCursor;
|
||||
|
||||
const uint64 POSSESSIONS_BITMASK = 0x000000027FFFFFFF; // based on 34-slot count (RoF+)
|
||||
const uint64 CORPSE_BITMASK = 0x01FFFFFE7F800000; // based on 34-slot count (RoF+)
|
||||
|
||||
const char* GetInvPossessionsSlotName(int16 inv_slot);
|
||||
const char* GetInvCorpseSlotName(int16 inv_slot);
|
||||
const char* GetInvSlotName(int16 inv_type, int16 inv_slot);
|
||||
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
const int16 SLOT_END = 9;
|
||||
const int16 SLOT_COUNT = 10;
|
||||
|
||||
const int16 GENERAL_BAGS_BEGIN = 262;
|
||||
const int16 GENERAL_BAGS_COUNT = invslot::GENERAL_COUNT * SLOT_COUNT;
|
||||
const int16 GENERAL_BAGS_END = (GENERAL_BAGS_BEGIN + GENERAL_BAGS_COUNT) - 1;
|
||||
|
||||
const int16 CURSOR_BAG_BEGIN = 342;
|
||||
const int16 CURSOR_BAG_COUNT = SLOT_COUNT;
|
||||
const int16 CURSOR_BAG_END = (CURSOR_BAG_BEGIN + CURSOR_BAG_COUNT) - 1;
|
||||
|
||||
const int16 BANK_BAGS_BEGIN = 2032;
|
||||
const int16 BANK_BAGS_COUNT = (invtype::BANK_SIZE * SLOT_COUNT);
|
||||
const int16 BANK_BAGS_END = (BANK_BAGS_BEGIN + BANK_BAGS_COUNT) - 1;
|
||||
|
||||
const int16 SHARED_BANK_BAGS_BEGIN = 2532;
|
||||
const int16 SHARED_BANK_BAGS_COUNT = invtype::SHARED_BANK_SIZE * SLOT_COUNT;
|
||||
const int16 SHARED_BANK_BAGS_END = (SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_COUNT) - 1;
|
||||
|
||||
const int16 TRADE_BAGS_BEGIN = 3031;
|
||||
const int16 TRADE_BAGS_COUNT = invtype::TRADE_SIZE * SLOT_COUNT;
|
||||
const int16 TRADE_BAGS_END = (TRADE_BAGS_BEGIN + TRADE_BAGS_COUNT) - 1;
|
||||
|
||||
const char* GetInvBagIndexName(int16 bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||
const int16 SOCKET_INVALID = IINVALID;
|
||||
const int16 SOCKET_BEGIN = INULL;
|
||||
const int16 SOCKET_END = 4;
|
||||
const int16 SOCKET_COUNT = 5;
|
||||
|
||||
const char* GetInvAugIndexName(int16 aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
@@ -153,147 +263,21 @@ namespace SoD
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
|
||||
const int16 POTION_BELT_SIZE = 5;
|
||||
|
||||
const int16 SKILL_ARRAY_SIZE = 100;
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
} /*constants*/
|
||||
const size_t CHARACTER_CREATION_LIMIT = 12;
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
} /*skills*/
|
||||
|
||||
|
||||
// declarations
|
||||
namespace inventory {
|
||||
const bool ConcatenateInvTypeLimbo = true;
|
||||
|
||||
const bool AllowOverLevelEquipment = false;
|
||||
|
||||
const bool AllowEmptyBagInBag = false;
|
||||
const bool AllowClickCastFromBag = false;
|
||||
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
||||
const size_t InvTypeBankSize = 24;
|
||||
const size_t InvTypeSharedBankSize = 2;
|
||||
const size_t InvTypeTradeSize = 8;
|
||||
const size_t InvTypeWorldSize = 10;
|
||||
const size_t InvTypeLimboSize = 36;
|
||||
const size_t InvTypeTributeSize = 5;
|
||||
const size_t InvTypeGuildTributeSize = 2;
|
||||
const size_t InvTypeMerchantSize = 80;
|
||||
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
||||
const size_t InvTypeBazaarSize = 80;
|
||||
const size_t InvTypeInspectSize = invslot::EquipmentCount;
|
||||
const size_t InvTypeViewMODPCSize = InvTypePossessionsSize;
|
||||
const size_t InvTypeViewMODBankSize = InvTypeBankSize;
|
||||
const size_t InvTypeViewMODSharedBankSize = InvTypeSharedBankSize;
|
||||
const size_t InvTypeViewMODLimboSize = InvTypeLimboSize;
|
||||
const size_t InvTypeAltStorageSize = 0;//unknown - "Shroud Bank"
|
||||
const size_t InvTypeArchivedSize = 0;//unknown
|
||||
const size_t InvTypeOtherSize = 0;//unknown
|
||||
|
||||
extern size_t GetInvTypeSize(int inv_type);
|
||||
extern const char* GetInvTypeName(int inv_type);
|
||||
|
||||
extern bool IsInvTypePersistent(int inv_type);
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
const int BankBegin = 2000;
|
||||
const int BankEnd = (BankBegin + invtype::InvTypeBankSize) - 1;
|
||||
|
||||
const int SharedBankBegin = 2500;
|
||||
const int SharedBankEnd = (SharedBankBegin + invtype::InvTypeSharedBankSize) - 1;
|
||||
|
||||
const int TradeBegin = 3000;
|
||||
const int TradeEnd = (TradeBegin + invtype::InvTypeTradeSize) - 1;
|
||||
const int TradeNPCEnd = 3003;
|
||||
|
||||
const int WorldBegin = 4000;
|
||||
const int WorldEnd = (WorldBegin + invtype::InvTypeWorldSize) - 1;
|
||||
|
||||
const int TributeBegin = 400;
|
||||
const int TributeEnd = (TributeBegin + invtype::InvTypeTributeSize) - 1;
|
||||
|
||||
const int GuildTributeBegin = 450;
|
||||
const int GuildTributeEnd = (GuildTributeBegin + invtype::InvTypeGuildTributeSize) - 1;
|
||||
|
||||
const int CorpseBegin = invslot::PossessionsGeneral1;
|
||||
const int CorpseEnd = invslot::PossessionsGeneral1 + invslot::PossessionsCursor;
|
||||
|
||||
extern const char* GetInvPossessionsSlotName(int inv_slot);
|
||||
extern const char* GetInvCorpseSlotName(int inv_slot);
|
||||
extern const char* GetInvSlotName(int inv_type, int inv_slot);
|
||||
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
const size_t ItemBagSize = 10;
|
||||
|
||||
const int GeneralBagsBegin = 262;
|
||||
const int GeneralBagsSize = invslot::GeneralCount * ItemBagSize;
|
||||
const int GeneralBagsEnd = (GeneralBagsBegin + GeneralBagsSize) - 1;
|
||||
|
||||
const int CursorBagBegin = 342;
|
||||
const int CursorBagSize = ItemBagSize;
|
||||
const int CursorBagEnd = (CursorBagBegin + CursorBagSize) - 1;
|
||||
|
||||
const int BankBagsBegin = 2032;
|
||||
const int BankBagsSize = (invtype::InvTypeBankSize * ItemBagSize);
|
||||
const int BankBagsEnd = (BankBagsBegin + BankBagsSize) - 1;
|
||||
|
||||
const int SharedBankBagsBegin = 2532;
|
||||
const int SharedBankBagsSize = invtype::InvTypeSharedBankSize * ItemBagSize;
|
||||
const int SharedBankBagsEnd = (SharedBankBagsBegin + SharedBankBagsSize) - 1;
|
||||
|
||||
const int TradeBagsBegin = 3031;
|
||||
const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize;
|
||||
const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1;
|
||||
|
||||
extern const char* GetInvBagIndexName(int bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
const size_t ItemAugSize = 5;
|
||||
|
||||
extern const char* GetInvAugIndexName(int aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||
const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize;
|
||||
|
||||
const size_t BandoliersSize = 20; // number of bandolier instances
|
||||
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
||||
|
||||
const size_t PotionBeltSize = 5;
|
||||
|
||||
const size_t SkillArraySize = 100;
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
const size_t CharacterCreationLimit = 12;
|
||||
|
||||
const size_t SayLinkBodySize = 50;
|
||||
const size_t SAY_LINK_BODY_SIZE = 50;
|
||||
|
||||
const int LongBuffs = 25;
|
||||
const int ShortBuffs = 15;
|
||||
@@ -306,11 +290,15 @@ namespace SoD
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
const bool CoinHasWeight = false;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
@@ -716,7 +716,7 @@ struct BandolierItem_Struct
|
||||
struct Bandolier_Struct
|
||||
{
|
||||
char Name[32];
|
||||
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||
BandolierItem_Struct Items[profile::BANDOLIER_ITEM_COUNT];
|
||||
};
|
||||
|
||||
//len = 72
|
||||
@@ -730,7 +730,7 @@ struct PotionBeltItem_Struct
|
||||
//len = 288
|
||||
struct PotionBelt_Struct
|
||||
{
|
||||
PotionBeltItem_Struct Items[profile::PotionBeltSize];
|
||||
PotionBeltItem_Struct Items[profile::POTION_BELT_SIZE];
|
||||
};
|
||||
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
@@ -937,7 +937,7 @@ struct PlayerProfile_Struct
|
||||
/*08288*/ uint32 aapoints_spent; // Number of spent AA points
|
||||
/*08292*/ uint32 aapoints; // Unspent AA points
|
||||
/*08296*/ uint8 unknown06160[4];
|
||||
/*08300*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [6400] bandolier contents
|
||||
/*08300*/ Bandolier_Struct bandoliers[profile::BANDOLIERS_SIZE]; // [6400] bandolier contents
|
||||
/*14700*/ PotionBelt_Struct potionbelt; // [360] potion belt 72 extra octets by adding 1 more belt slot
|
||||
/*15060*/ uint8 unknown12852[8];
|
||||
/*15068*/ uint32 available_slots;
|
||||
|
||||
+36
-36
@@ -1191,18 +1191,18 @@ namespace SoF
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) {
|
||||
for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
OUT(bandoliers[r].Items[k].Icon);
|
||||
OUT_str(bandoliers[r].Items[k].Name);
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) {
|
||||
for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
eq->bandoliers[r].Items[k].Icon = 0;
|
||||
eq->bandoliers[r].Items[k].Name[0] = '\0';
|
||||
@@ -1212,13 +1212,13 @@ namespace SoF
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++r) {
|
||||
for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++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::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) {
|
||||
for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -1506,8 +1506,8 @@ namespace SoF
|
||||
eq->CharCount = emu->CharCount;
|
||||
eq->TotalChars = emu->TotalChars;
|
||||
|
||||
if (eq->TotalChars > constants::CharacterCreationLimit)
|
||||
eq->TotalChars = constants::CharacterCreationLimit;
|
||||
if (eq->TotalChars > constants::CHARACTER_CREATION_LIMIT)
|
||||
eq->TotalChars = constants::CHARACTER_CREATION_LIMIT;
|
||||
|
||||
FINISH_ENCODE();
|
||||
return;
|
||||
@@ -1519,7 +1519,7 @@ namespace SoF
|
||||
|
||||
size_t names_length = 0;
|
||||
size_t character_count = 0;
|
||||
for (; character_count < emu->CharCount && character_count < constants::CharacterCreationLimit; ++character_count) {
|
||||
for (; character_count < emu->CharCount && character_count < constants::CHARACTER_CREATION_LIMIT; ++character_count) {
|
||||
emu_cse = (CharacterSelectEntry_Struct *)emu_ptr;
|
||||
names_length += strlen(emu_cse->Name);
|
||||
emu_ptr += sizeof(CharacterSelectEntry_Struct);
|
||||
@@ -1535,8 +1535,8 @@ namespace SoF
|
||||
eq->CharCount = character_count;
|
||||
eq->TotalChars = emu->TotalChars;
|
||||
|
||||
if (eq->TotalChars > constants::CharacterCreationLimit)
|
||||
eq->TotalChars = constants::CharacterCreationLimit;
|
||||
if (eq->TotalChars > constants::CHARACTER_CREATION_LIMIT)
|
||||
eq->TotalChars = constants::CHARACTER_CREATION_LIMIT;
|
||||
|
||||
emu_ptr = __emu_buffer;
|
||||
emu_ptr += sizeof(CharacterSelect_Struct);
|
||||
@@ -2867,7 +2867,7 @@ namespace SoF
|
||||
ibs.nodrop = item->NoDrop;
|
||||
ibs.attune = item->Attuneable;
|
||||
ibs.size = item->Size;
|
||||
ibs.slots = SwapBits21and22(item->Slots);
|
||||
ibs.slots = SwapBits21And22(item->Slots);
|
||||
ibs.price = item->Price;
|
||||
ibs.icon = item->Icon;
|
||||
ibs.unknown1 = 1;
|
||||
@@ -2957,7 +2957,7 @@ namespace SoF
|
||||
isbs.augtype = item->AugType;
|
||||
isbs.augrestrict = item->AugRestrict;
|
||||
|
||||
for (int index = 0; index < invaug::ItemAugSize; ++index) {
|
||||
for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) {
|
||||
isbs.augslots[index].type = item->AugSlotType[index];
|
||||
isbs.augslots[index].visible = item->AugSlotVisible[index];
|
||||
isbs.augslots[index].unknown = item->AugSlotUnk2[index];
|
||||
@@ -3129,18 +3129,18 @@ namespace SoF
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||
for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
int SubSlotNumber = INVALID_INDEX;
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
if (slot_id_in >= EQEmu::invslot::GENERAL_BEGIN && slot_id_in <= EQEmu::invslot::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::invbag::SLOT_COUNT) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::invslot::BANK_BEGIN && slot_id_in <= EQEmu::invslot::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::invslot::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + index);
|
||||
else
|
||||
SubSlotNumber = slot_id_in;
|
||||
|
||||
@@ -3158,16 +3158,16 @@ namespace SoF
|
||||
{
|
||||
uint32 SoFSlot = 0;
|
||||
|
||||
if (serverSlot >= EQEmu::inventory::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (serverSlot >= EQEmu::invslot::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||
else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END)
|
||||
SoFSlot = serverSlot + 11;
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::BANK_BAGS_END)
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END)
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
SoFSlot = invslot::PossessionsPowerSource;
|
||||
else if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE)
|
||||
SoFSlot = invslot::slotPowerSource;
|
||||
else
|
||||
SoFSlot = serverSlot;
|
||||
|
||||
@@ -3184,16 +3184,16 @@ namespace SoF
|
||||
{
|
||||
uint32 ServerSlot = 0;
|
||||
|
||||
if (sofSlot >= invslot::PossessionsAmmo && sofSlot <= invslot::CorpseEnd) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (sofSlot >= invslot::slotAmmo && sofSlot <= invslot::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
ServerSlot = sofSlot - 1;
|
||||
else if (sofSlot >= invbag::GeneralBagsBegin && sofSlot <= invbag::CursorBagEnd)
|
||||
else if (sofSlot >= invbag::GENERAL_BAGS_BEGIN && sofSlot <= invbag::CURSOR_BAG_END)
|
||||
ServerSlot = sofSlot - 11;
|
||||
else if (sofSlot >= invbag::BankBagsBegin && sofSlot <= invbag::BankBagsEnd)
|
||||
else if (sofSlot >= invbag::BANK_BAGS_BEGIN && sofSlot <= invbag::BANK_BAGS_END)
|
||||
ServerSlot = sofSlot - 1;
|
||||
else if (sofSlot >= invbag::SharedBankBagsBegin && sofSlot <= invbag::SharedBankBagsEnd)
|
||||
else if (sofSlot >= invbag::SHARED_BANK_BAGS_BEGIN && sofSlot <= invbag::SHARED_BANK_BAGS_END)
|
||||
ServerSlot = sofSlot - 1;
|
||||
else if (sofSlot == invslot::PossessionsPowerSource)
|
||||
ServerSlot = EQEmu::inventory::slotPowerSource;
|
||||
else if (sofSlot == invslot::slotPowerSource)
|
||||
ServerSlot = EQEmu::invslot::SLOT_POWER_SOURCE;
|
||||
else
|
||||
ServerSlot = sofSlot;
|
||||
|
||||
@@ -3208,7 +3208,7 @@ namespace SoF
|
||||
|
||||
static inline void ServerToSoFSayLink(std::string& sofSayLink, const std::string& serverSayLink)
|
||||
{
|
||||
if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
sofSayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -3217,7 +3217,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::SayLinkBodySize) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) {
|
||||
sofSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -3248,7 +3248,7 @@ namespace SoF
|
||||
|
||||
static inline void SoFToServerSayLink(std::string& serverSayLink, const std::string& sofSayLink)
|
||||
{
|
||||
if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (sofSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (sofSayLink.find('\x12') == std::string::npos)) {
|
||||
serverSayLink = sofSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -3257,7 +3257,7 @@ namespace SoF
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) {
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
|
||||
+119
-119
@@ -22,198 +22,198 @@
|
||||
#include "../string_util.h"
|
||||
|
||||
|
||||
size_t SoF::invtype::GetInvTypeSize(int inv_type)
|
||||
int16 SoF::invtype::GetInvTypeSize(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypePossessions:
|
||||
return invtype::InvTypePossessionsSize;
|
||||
case invtype::InvTypeBank:
|
||||
return invtype::InvTypeBankSize;
|
||||
case invtype::InvTypeSharedBank:
|
||||
return invtype::InvTypeSharedBankSize;
|
||||
case invtype::InvTypeTrade:
|
||||
return invtype::InvTypeTradeSize;
|
||||
case invtype::InvTypeWorld:
|
||||
return invtype::InvTypeWorldSize;
|
||||
case invtype::InvTypeLimbo:
|
||||
return invtype::InvTypeLimboSize;
|
||||
case invtype::InvTypeTribute:
|
||||
return invtype::InvTypeTributeSize;
|
||||
case invtype::InvTypeGuildTribute:
|
||||
return invtype::InvTypeGuildTributeSize;
|
||||
case invtype::InvTypeMerchant:
|
||||
return invtype::InvTypeMerchantSize;
|
||||
case invtype::InvTypeCorpse:
|
||||
return invtype::InvTypeCorpseSize;
|
||||
case invtype::InvTypeBazaar:
|
||||
return invtype::InvTypeBazaarSize;
|
||||
case invtype::InvTypeInspect:
|
||||
return invtype::InvTypeInspectSize;
|
||||
case invtype::InvTypeViewMODPC:
|
||||
return invtype::InvTypeViewMODPCSize;
|
||||
case invtype::InvTypeViewMODBank:
|
||||
return invtype::InvTypeViewMODBankSize;
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
return invtype::InvTypeViewMODSharedBankSize;
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
return invtype::InvTypeViewMODLimboSize;
|
||||
case invtype::InvTypeAltStorage:
|
||||
return invtype::InvTypeAltStorageSize;
|
||||
case invtype::InvTypeArchived:
|
||||
return invtype::InvTypeArchivedSize;
|
||||
case invtype::InvTypeOther:
|
||||
return invtype::InvTypeOtherSize;
|
||||
case invtype::typePossessions:
|
||||
return invtype::POSSESSIONS_SIZE;
|
||||
case invtype::typeBank:
|
||||
return invtype::BANK_SIZE;
|
||||
case invtype::typeSharedBank:
|
||||
return invtype::SHARED_BANK_SIZE;
|
||||
case invtype::typeTrade:
|
||||
return invtype::TRADE_SIZE;
|
||||
case invtype::typeWorld:
|
||||
return invtype::WORLD_SIZE;
|
||||
case invtype::typeLimbo:
|
||||
return invtype::LIMBO_SIZE;
|
||||
case invtype::typeTribute:
|
||||
return invtype::TRIBUTE_SIZE;
|
||||
case invtype::typeGuildTribute:
|
||||
return invtype::GUILD_TRIBUTE_SIZE;
|
||||
case invtype::typeMerchant:
|
||||
return invtype::MERCHANT_SIZE;
|
||||
case invtype::typeCorpse:
|
||||
return invtype::CORPSE_SIZE;
|
||||
case invtype::typeBazaar:
|
||||
return invtype::BAZAAR_SIZE;
|
||||
case invtype::typeInspect:
|
||||
return invtype::INSPECT_SIZE;
|
||||
case invtype::typeViewMODPC:
|
||||
return invtype::VIEW_MOD_PC_SIZE;
|
||||
case invtype::typeViewMODBank:
|
||||
return invtype::VIEW_MOD_BANK_SIZE;
|
||||
case invtype::typeViewMODSharedBank:
|
||||
return invtype::VIEW_MOD_SHARED_BANK_SIZE;
|
||||
case invtype::typeViewMODLimbo:
|
||||
return invtype::VIEW_MOD_LIMBO_SIZE;
|
||||
case invtype::typeAltStorage:
|
||||
return invtype::ALT_STORAGE_SIZE;
|
||||
case invtype::typeArchived:
|
||||
return invtype::ARCHIVED_SIZE;
|
||||
case invtype::typeOther:
|
||||
return invtype::OTHER_SIZE;
|
||||
default:
|
||||
return 0;
|
||||
return INULL;
|
||||
}
|
||||
}
|
||||
|
||||
const char* SoF::invtype::GetInvTypeName(int inv_type)
|
||||
const char* SoF::invtype::GetInvTypeName(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypeInvalid:
|
||||
case invtype::TYPE_INVALID:
|
||||
return "Invalid Type";
|
||||
case invtype::InvTypePossessions:
|
||||
case invtype::typePossessions:
|
||||
return "Possessions";
|
||||
case invtype::InvTypeBank:
|
||||
case invtype::typeBank:
|
||||
return "Bank";
|
||||
case invtype::InvTypeSharedBank:
|
||||
case invtype::typeSharedBank:
|
||||
return "Shared Bank";
|
||||
case invtype::InvTypeTrade:
|
||||
case invtype::typeTrade:
|
||||
return "Trade";
|
||||
case invtype::InvTypeWorld:
|
||||
case invtype::typeWorld:
|
||||
return "World";
|
||||
case invtype::InvTypeLimbo:
|
||||
case invtype::typeLimbo:
|
||||
return "Limbo";
|
||||
case invtype::InvTypeTribute:
|
||||
case invtype::typeTribute:
|
||||
return "Tribute";
|
||||
case invtype::InvTypeGuildTribute:
|
||||
case invtype::typeGuildTribute:
|
||||
return "Guild Tribute";
|
||||
case invtype::InvTypeMerchant:
|
||||
case invtype::typeMerchant:
|
||||
return "Merchant";
|
||||
case invtype::InvTypeCorpse:
|
||||
case invtype::typeCorpse:
|
||||
return "Corpse";
|
||||
case invtype::InvTypeBazaar:
|
||||
case invtype::typeBazaar:
|
||||
return "Bazaar";
|
||||
case invtype::InvTypeInspect:
|
||||
case invtype::typeInspect:
|
||||
return "Inspect";
|
||||
case invtype::InvTypeViewMODPC:
|
||||
case invtype::typeViewMODPC:
|
||||
return "View MOD PC";
|
||||
case invtype::InvTypeViewMODBank:
|
||||
case invtype::typeViewMODBank:
|
||||
return "View MOD Bank";
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
case invtype::typeViewMODSharedBank:
|
||||
return "View MOD Shared Bank";
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
case invtype::typeViewMODLimbo:
|
||||
return "View MOD Limbo";
|
||||
case invtype::InvTypeAltStorage:
|
||||
case invtype::typeAltStorage:
|
||||
return "Alt Storage";
|
||||
case invtype::InvTypeArchived:
|
||||
case invtype::typeArchived:
|
||||
return "Archived";
|
||||
case invtype::InvTypeOther:
|
||||
case invtype::typeOther:
|
||||
return "Other";
|
||||
default:
|
||||
return "Unknown Type";
|
||||
}
|
||||
}
|
||||
|
||||
bool SoF::invtype::IsInvTypePersistent(int inv_type)
|
||||
bool SoF::invtype::IsInvTypePersistent(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypePossessions:
|
||||
case invtype::InvTypeBank:
|
||||
case invtype::InvTypeSharedBank:
|
||||
case invtype::InvTypeTrade:
|
||||
case invtype::InvTypeWorld:
|
||||
case invtype::InvTypeLimbo:
|
||||
case invtype::InvTypeTribute:
|
||||
case invtype::InvTypeGuildTribute:
|
||||
case invtype::typePossessions:
|
||||
case invtype::typeBank:
|
||||
case invtype::typeSharedBank:
|
||||
case invtype::typeTrade:
|
||||
case invtype::typeWorld:
|
||||
case invtype::typeLimbo:
|
||||
case invtype::typeTribute:
|
||||
case invtype::typeGuildTribute:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
const char* SoF::invslot::GetInvPossessionsSlotName(int inv_slot)
|
||||
const char* SoF::invslot::GetInvPossessionsSlotName(int16 inv_slot)
|
||||
{
|
||||
switch (inv_slot) {
|
||||
case invslot::InvSlotInvalid:
|
||||
case invslot::SLOT_INVALID:
|
||||
return "Invalid Slot";
|
||||
case invslot::PossessionsCharm:
|
||||
case invslot::slotCharm:
|
||||
return "Charm";
|
||||
case invslot::PossessionsEar1:
|
||||
case invslot::slotEar1:
|
||||
return "Ear 1";
|
||||
case invslot::PossessionsHead:
|
||||
case invslot::slotHead:
|
||||
return "Head";
|
||||
case invslot::PossessionsFace:
|
||||
case invslot::slotFace:
|
||||
return "Face";
|
||||
case invslot::PossessionsEar2:
|
||||
case invslot::slotEar2:
|
||||
return "Ear 2";
|
||||
case invslot::PossessionsNeck:
|
||||
case invslot::slotNeck:
|
||||
return "Neck";
|
||||
case invslot::PossessionsShoulders:
|
||||
case invslot::slotShoulders:
|
||||
return "Shoulders";
|
||||
case invslot::PossessionsArms:
|
||||
case invslot::slotArms:
|
||||
return "Arms";
|
||||
case invslot::PossessionsBack:
|
||||
case invslot::slotBack:
|
||||
return "Back";
|
||||
case invslot::PossessionsWrist1:
|
||||
case invslot::slotWrist1:
|
||||
return "Wrist 1";
|
||||
case invslot::PossessionsWrist2:
|
||||
case invslot::slotWrist2:
|
||||
return "Wrist 2";
|
||||
case invslot::PossessionsRange:
|
||||
case invslot::slotRange:
|
||||
return "Range";
|
||||
case invslot::PossessionsHands:
|
||||
case invslot::slotHands:
|
||||
return "Hands";
|
||||
case invslot::PossessionsPrimary:
|
||||
case invslot::slotPrimary:
|
||||
return "Primary";
|
||||
case invslot::PossessionsSecondary:
|
||||
case invslot::slotSecondary:
|
||||
return "Secondary";
|
||||
case invslot::PossessionsFinger1:
|
||||
case invslot::slotFinger1:
|
||||
return "Finger 1";
|
||||
case invslot::PossessionsFinger2:
|
||||
case invslot::slotFinger2:
|
||||
return "Finger 2";
|
||||
case invslot::PossessionsChest:
|
||||
case invslot::slotChest:
|
||||
return "Chest";
|
||||
case invslot::PossessionsLegs:
|
||||
case invslot::slotLegs:
|
||||
return "Legs";
|
||||
case invslot::PossessionsFeet:
|
||||
case invslot::slotFeet:
|
||||
return "Feet";
|
||||
case invslot::PossessionsWaist:
|
||||
case invslot::slotWaist:
|
||||
return "Waist";
|
||||
case invslot::PossessionsPowerSource:
|
||||
case invslot::slotPowerSource:
|
||||
return "Power Source";
|
||||
case invslot::PossessionsAmmo:
|
||||
case invslot::slotAmmo:
|
||||
return "Ammo";
|
||||
case invslot::PossessionsGeneral1:
|
||||
case invslot::slotGeneral1:
|
||||
return "General 1";
|
||||
case invslot::PossessionsGeneral2:
|
||||
case invslot::slotGeneral2:
|
||||
return "General 2";
|
||||
case invslot::PossessionsGeneral3:
|
||||
case invslot::slotGeneral3:
|
||||
return "General 3";
|
||||
case invslot::PossessionsGeneral4:
|
||||
case invslot::slotGeneral4:
|
||||
return "General 4";
|
||||
case invslot::PossessionsGeneral5:
|
||||
case invslot::slotGeneral5:
|
||||
return "General 5";
|
||||
case invslot::PossessionsGeneral6:
|
||||
case invslot::slotGeneral6:
|
||||
return "General 6";
|
||||
case invslot::PossessionsGeneral7:
|
||||
case invslot::slotGeneral7:
|
||||
return "General 7";
|
||||
case invslot::PossessionsGeneral8:
|
||||
case invslot::slotGeneral8:
|
||||
return "General 8";
|
||||
case invslot::PossessionsCursor:
|
||||
case invslot::slotCursor:
|
||||
return "Cursor";
|
||||
default:
|
||||
return "Unknown Slot";
|
||||
}
|
||||
}
|
||||
|
||||
const char* SoF::invslot::GetInvCorpseSlotName(int inv_slot)
|
||||
const char* SoF::invslot::GetInvCorpseSlotName(int16 inv_slot)
|
||||
{
|
||||
if (!invtype::GetInvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid)
|
||||
if (!invtype::GetInvTypeSize(invtype::typeCorpse) || inv_slot == invslot::SLOT_INVALID)
|
||||
return "Invalid Slot";
|
||||
|
||||
// needs work
|
||||
if ((size_t)(inv_slot + 1) < invslot::CorpseBegin || (size_t)(inv_slot + 1) >= invslot::CorpseEnd)
|
||||
if ((inv_slot + 1) < invslot::CORPSE_BEGIN || (inv_slot + 1) >= invslot::CORPSE_END)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -222,19 +222,19 @@ const char* SoF::invslot::GetInvCorpseSlotName(int inv_slot)
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* SoF::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||
const char* SoF::invslot::GetInvSlotName(int16 inv_type, int16 inv_slot)
|
||||
{
|
||||
if (inv_type == invtype::InvTypePossessions)
|
||||
if (inv_type == invtype::typePossessions)
|
||||
return invslot::GetInvPossessionsSlotName(inv_slot);
|
||||
else if (inv_type == invtype::InvTypeCorpse)
|
||||
else if (inv_type == invtype::typeCorpse)
|
||||
return invslot::GetInvCorpseSlotName(inv_slot);
|
||||
|
||||
size_t type_size = invtype::GetInvTypeSize(inv_type);
|
||||
int16 type_size = invtype::GetInvTypeSize(inv_type);
|
||||
|
||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||
if (!type_size || inv_slot == invslot::SLOT_INVALID)
|
||||
return "Invalid Slot";
|
||||
|
||||
if ((size_t)(inv_slot + 1) >= type_size)
|
||||
if ((inv_slot + 1) >= type_size)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -243,12 +243,12 @@ const char* SoF::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* SoF::invbag::GetInvBagIndexName(int bag_index)
|
||||
const char* SoF::invbag::GetInvBagIndexName(int16 bag_index)
|
||||
{
|
||||
if (bag_index == invbag::InvBagInvalid)
|
||||
if (bag_index == invbag::SLOT_INVALID)
|
||||
return "Invalid Bag";
|
||||
|
||||
if ((size_t)bag_index >= invbag::ItemBagSize)
|
||||
if (bag_index >= invbag::SLOT_COUNT)
|
||||
return "Unknown Bag";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -257,12 +257,12 @@ const char* SoF::invbag::GetInvBagIndexName(int bag_index)
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* SoF::invaug::GetInvAugIndexName(int aug_index)
|
||||
const char* SoF::invaug::GetInvAugIndexName(int16 aug_index)
|
||||
{
|
||||
if (aug_index == invaug::InvAugInvalid)
|
||||
if (aug_index == invaug::SOCKET_INVALID)
|
||||
return "Invalid Augment";
|
||||
|
||||
if ((size_t)aug_index >= invaug::ItemAugSize)
|
||||
if (aug_index >= invaug::SOCKET_COUNT)
|
||||
return "Unknown Augment";
|
||||
|
||||
static std::string ret_str;
|
||||
|
||||
+194
-206
@@ -27,108 +27,218 @@
|
||||
|
||||
namespace SoF
|
||||
{
|
||||
enum : int { Invalid = -1, Null, Safety };
|
||||
const int16 IINVALID = -1;
|
||||
const int16 INULL = 0;
|
||||
|
||||
enum : bool { False = false, True = true };
|
||||
|
||||
// pre-declarations
|
||||
namespace inventory {
|
||||
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
const bool ConcatenateInvTypeLimbo = true;
|
||||
|
||||
const bool AllowOverLevelEquipment = false;
|
||||
|
||||
const bool AllowEmptyBagInBag = false;
|
||||
const bool AllowClickCastFromBag = false;
|
||||
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||
namespace enum_ {
|
||||
enum InventoryTypes : int16 {
|
||||
typePossessions = INULL,
|
||||
typeBank,
|
||||
typeSharedBank,
|
||||
typeTrade,
|
||||
typeWorld,
|
||||
typeLimbo,
|
||||
typeTribute,
|
||||
typeGuildTribute,
|
||||
typeMerchant,
|
||||
typeCorpse,
|
||||
typeBazaar,
|
||||
typeInspect,
|
||||
typeViewMODPC,
|
||||
typeViewMODBank,
|
||||
typeViewMODSharedBank,
|
||||
typeViewMODLimbo,
|
||||
typeAltStorage,
|
||||
typeArchived,
|
||||
typeOther
|
||||
};
|
||||
|
||||
enum InventoryType : int {
|
||||
InvTypePossessions = InvTypeBegin,
|
||||
InvTypeBank,
|
||||
InvTypeSharedBank,
|
||||
InvTypeTrade,
|
||||
InvTypeWorld,
|
||||
InvTypeLimbo,
|
||||
InvTypeTribute,
|
||||
InvTypeGuildTribute,
|
||||
InvTypeMerchant,
|
||||
InvTypeCorpse,
|
||||
InvTypeBazaar,
|
||||
InvTypeInspect,
|
||||
InvTypeViewMODPC,
|
||||
InvTypeViewMODBank,
|
||||
InvTypeViewMODSharedBank,
|
||||
InvTypeViewMODLimbo,
|
||||
InvTypeAltStorage,
|
||||
InvTypeArchived,
|
||||
InvTypeOther,
|
||||
InvTypeCount
|
||||
};
|
||||
} // namespace enum_
|
||||
using namespace enum_;
|
||||
|
||||
const int16 POSSESSIONS_SIZE = 32;
|
||||
const int16 BANK_SIZE = 24;
|
||||
const int16 SHARED_BANK_SIZE = 2;
|
||||
const int16 TRADE_SIZE = 8;
|
||||
const int16 WORLD_SIZE = 10;
|
||||
const int16 LIMBO_SIZE = 36;
|
||||
const int16 TRIBUTE_SIZE = 5;
|
||||
const int16 GUILD_TRIBUTE_SIZE = 2;
|
||||
const int16 MERCHANT_SIZE = 80;
|
||||
const int16 CORPSE_SIZE = POSSESSIONS_SIZE;
|
||||
const int16 BAZAAR_SIZE = 80;
|
||||
const int16 INSPECT_SIZE = 23;
|
||||
const int16 VIEW_MOD_PC_SIZE = POSSESSIONS_SIZE;
|
||||
const int16 VIEW_MOD_BANK_SIZE = BANK_SIZE;
|
||||
const int16 VIEW_MOD_SHARED_BANK_SIZE = SHARED_BANK_SIZE;
|
||||
const int16 VIEW_MOD_LIMBO_SIZE = LIMBO_SIZE;
|
||||
const int16 ALT_STORAGE_SIZE = 0;//unknown - "Shroud Bank"
|
||||
const int16 ARCHIVED_SIZE = 0;//unknown
|
||||
const int16 OTHER_SIZE = 0;//unknown
|
||||
|
||||
const int16 TRADE_NPC_SIZE = 4; // defined by implication
|
||||
|
||||
const int16 TYPE_INVALID = IINVALID;
|
||||
const int16 TYPE_BEGIN = typePossessions;
|
||||
const int16 TYPE_END = typeOther;
|
||||
const int16 TYPE_COUNT = (TYPE_END - TYPE_BEGIN) + 1;
|
||||
|
||||
int16 GetInvTypeSize(int16 inv_type);
|
||||
const char* GetInvTypeName(int16 inv_type);
|
||||
|
||||
bool IsInvTypePersistent(int16 inv_type);
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||
namespace enum_ {
|
||||
enum InventorySlots : int16 {
|
||||
slotCharm = INULL,
|
||||
slotEar1,
|
||||
slotHead,
|
||||
slotFace,
|
||||
slotEar2,
|
||||
slotNeck,
|
||||
slotShoulders,
|
||||
slotArms,
|
||||
slotBack,
|
||||
slotWrist1,
|
||||
slotWrist2,
|
||||
slotRange,
|
||||
slotHands,
|
||||
slotPrimary,
|
||||
slotSecondary,
|
||||
slotFinger1,
|
||||
slotFinger2,
|
||||
slotChest,
|
||||
slotLegs,
|
||||
slotFeet,
|
||||
slotWaist,
|
||||
slotPowerSource,
|
||||
slotAmmo,
|
||||
slotGeneral1,
|
||||
slotGeneral2,
|
||||
slotGeneral3,
|
||||
slotGeneral4,
|
||||
slotGeneral5,
|
||||
slotGeneral6,
|
||||
slotGeneral7,
|
||||
slotGeneral8,
|
||||
slotCursor
|
||||
};
|
||||
|
||||
enum PossessionsSlot : int {
|
||||
PossessionsCharm = InvSlotBegin,
|
||||
PossessionsEar1,
|
||||
PossessionsHead,
|
||||
PossessionsFace,
|
||||
PossessionsEar2,
|
||||
PossessionsNeck,
|
||||
PossessionsShoulders,
|
||||
PossessionsArms,
|
||||
PossessionsBack,
|
||||
PossessionsWrist1,
|
||||
PossessionsWrist2,
|
||||
PossessionsRange,
|
||||
PossessionsHands,
|
||||
PossessionsPrimary,
|
||||
PossessionsSecondary,
|
||||
PossessionsFinger1,
|
||||
PossessionsFinger2,
|
||||
PossessionsChest,
|
||||
PossessionsLegs,
|
||||
PossessionsFeet,
|
||||
PossessionsWaist,
|
||||
PossessionsPowerSource,
|
||||
PossessionsAmmo,
|
||||
PossessionsGeneral1,
|
||||
PossessionsGeneral2,
|
||||
PossessionsGeneral3,
|
||||
PossessionsGeneral4,
|
||||
PossessionsGeneral5,
|
||||
PossessionsGeneral6,
|
||||
PossessionsGeneral7,
|
||||
PossessionsGeneral8,
|
||||
PossessionsCursor,
|
||||
PossessionsCount
|
||||
};
|
||||
} // namespace enum_
|
||||
using namespace enum_;
|
||||
|
||||
const int EquipmentBegin = PossessionsCharm;
|
||||
const int EquipmentEnd = PossessionsAmmo;
|
||||
const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1);
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
|
||||
const int GeneralBegin = PossessionsGeneral1;
|
||||
const int GeneralEnd = PossessionsGeneral8;
|
||||
const int GeneralCount = (GeneralEnd - GeneralBegin + 1);
|
||||
const int16 POSSESSIONS_BEGIN = slotCharm;
|
||||
const int16 POSSESSIONS_END = slotCursor;
|
||||
const int16 POSSESSIONS_COUNT = (POSSESSIONS_END - POSSESSIONS_BEGIN) + 1;
|
||||
|
||||
const int16 EQUIPMENT_BEGIN = slotCharm;
|
||||
const int16 EQUIPMENT_END = slotAmmo;
|
||||
const int16 EQUIPMENT_COUNT = (EQUIPMENT_END - EQUIPMENT_BEGIN + 1);
|
||||
|
||||
const int16 GENERAL_BEGIN = slotGeneral1;
|
||||
const int16 GENERAL_END = slotGeneral8;
|
||||
const int16 GENERAL_COUNT = (GENERAL_END - GENERAL_BEGIN + 1);
|
||||
|
||||
const int16 BONUS_BEGIN = invslot::slotCharm;
|
||||
const int16 BONUS_STAT_END = invslot::slotPowerSource;
|
||||
const int16 BONUS_SKILL_END = invslot::slotAmmo;
|
||||
|
||||
const int16 BANK_BEGIN = 2000;
|
||||
const int16 BANK_END = (BANK_BEGIN + invtype::BANK_SIZE) - 1;
|
||||
|
||||
const int16 SHARED_BANK_BEGIN = 2500;
|
||||
const int16 SHARED_BANK_END = (SHARED_BANK_BEGIN + invtype::SHARED_BANK_SIZE) - 1;
|
||||
|
||||
const int16 TRADE_BEGIN = 3000;
|
||||
const int16 TRADE_END = (TRADE_BEGIN + invtype::TRADE_SIZE) - 1;
|
||||
|
||||
const int16 TRADE_NPC_END = (TRADE_BEGIN + invtype::TRADE_NPC_SIZE) - 1; // defined by implication
|
||||
|
||||
const int16 WORLD_BEGIN = 4000;
|
||||
const int16 WORLD_END = (WORLD_BEGIN + invtype::WORLD_SIZE) - 1;
|
||||
|
||||
const int16 TRIBUTE_BEGIN = 400;
|
||||
const int16 TRIBUTE_END = (TRIBUTE_BEGIN + invtype::TRIBUTE_SIZE) - 1;
|
||||
|
||||
const int16 GUILD_TRIBUTE_BEGIN = 450;
|
||||
const int16 GUILD_TRIBUTE_END = (GUILD_TRIBUTE_BEGIN + invtype::GUILD_TRIBUTE_SIZE) - 1;
|
||||
|
||||
const int16 CORPSE_BEGIN = invslot::slotGeneral1;
|
||||
const int16 CORPSE_END = invslot::slotGeneral1 + invslot::slotCursor;
|
||||
|
||||
const uint64 POSSESSIONS_BITMASK = 0x000000027FFFFFFF; // based on 34-slot count (RoF+)
|
||||
const uint64 CORPSE_BITMASK = 0x01FFFFFE7F800000; // based on 34-slot count (RoF+)
|
||||
|
||||
const char* GetInvPossessionsSlotName(int16 inv_slot);
|
||||
const char* GetInvCorpseSlotName(int16 inv_slot);
|
||||
const char* GetInvSlotName(int16 inv_type, int16 inv_slot);
|
||||
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
const int16 SLOT_END = 9;
|
||||
const int16 SLOT_COUNT = 10;
|
||||
|
||||
const int16 GENERAL_BAGS_BEGIN = 262;
|
||||
const int16 GENERAL_BAGS_COUNT = invslot::GENERAL_COUNT * SLOT_COUNT;
|
||||
const int16 GENERAL_BAGS_END = (GENERAL_BAGS_BEGIN + GENERAL_BAGS_COUNT) - 1;
|
||||
|
||||
const int16 CURSOR_BAG_BEGIN = 342;
|
||||
const int16 CURSOR_BAG_COUNT = SLOT_COUNT;
|
||||
const int16 CURSOR_BAG_END = (CURSOR_BAG_BEGIN + CURSOR_BAG_COUNT) - 1;
|
||||
|
||||
const int16 BANK_BAGS_BEGIN = 2032;
|
||||
const int16 BANK_BAGS_COUNT = (invtype::BANK_SIZE * SLOT_COUNT);
|
||||
const int16 BANK_BAGS_END = (BANK_BAGS_BEGIN + BANK_BAGS_COUNT) - 1;
|
||||
|
||||
const int16 SHARED_BANK_BAGS_BEGIN = 2532;
|
||||
const int16 SHARED_BANK_BAGS_COUNT = invtype::SHARED_BANK_SIZE * SLOT_COUNT;
|
||||
const int16 SHARED_BANK_BAGS_END = (SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_COUNT) - 1;
|
||||
|
||||
const int16 TRADE_BAGS_BEGIN = 3031;
|
||||
const int16 TRADE_BAGS_COUNT = invtype::TRADE_SIZE * SLOT_COUNT;
|
||||
const int16 TRADE_BAGS_END = (TRADE_BAGS_BEGIN + TRADE_BAGS_COUNT) - 1;
|
||||
|
||||
const char* GetInvBagIndexName(int16 bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||
const int16 SOCKET_INVALID = IINVALID;
|
||||
const int16 SOCKET_BEGIN = INULL;
|
||||
const int16 SOCKET_END = 4;
|
||||
const int16 SOCKET_COUNT = 5;
|
||||
|
||||
const char* GetInvAugIndexName(int16 aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
@@ -153,147 +263,21 @@ namespace SoF
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
|
||||
const int16 POTION_BELT_SIZE = 5;
|
||||
|
||||
const int16 SKILL_ARRAY_SIZE = 100;
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
} /*constants*/
|
||||
const size_t CHARACTER_CREATION_LIMIT = 12;
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
} /*skills*/
|
||||
|
||||
|
||||
// declarations
|
||||
namespace inventory {
|
||||
const bool ConcatenateInvTypeLimbo = true;
|
||||
|
||||
const bool AllowOverLevelEquipment = false;
|
||||
|
||||
const bool AllowEmptyBagInBag = false;
|
||||
const bool AllowClickCastFromBag = false;
|
||||
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
||||
const size_t InvTypeBankSize = 24;
|
||||
const size_t InvTypeSharedBankSize = 2;
|
||||
const size_t InvTypeTradeSize = 8;
|
||||
const size_t InvTypeWorldSize = 10;
|
||||
const size_t InvTypeLimboSize = 36;
|
||||
const size_t InvTypeTributeSize = 5;
|
||||
const size_t InvTypeGuildTributeSize = 2;
|
||||
const size_t InvTypeMerchantSize = 80;
|
||||
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
||||
const size_t InvTypeBazaarSize = 80;
|
||||
const size_t InvTypeInspectSize = invslot::EquipmentCount;
|
||||
const size_t InvTypeViewMODPCSize = InvTypePossessionsSize;
|
||||
const size_t InvTypeViewMODBankSize = InvTypeBankSize;
|
||||
const size_t InvTypeViewMODSharedBankSize = InvTypeSharedBankSize;
|
||||
const size_t InvTypeViewMODLimboSize = InvTypeLimboSize;
|
||||
const size_t InvTypeAltStorageSize = 0;//unknown - "Shroud Bank"
|
||||
const size_t InvTypeArchivedSize = 0;//unknown
|
||||
const size_t InvTypeOtherSize = 0;//unknown
|
||||
|
||||
extern size_t GetInvTypeSize(int inv_type);
|
||||
extern const char* GetInvTypeName(int inv_type);
|
||||
|
||||
extern bool IsInvTypePersistent(int inv_type);
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
const int BankBegin = 2000;
|
||||
const int BankEnd = (BankBegin + invtype::InvTypeBankSize) - 1;
|
||||
|
||||
const int SharedBankBegin = 2500;
|
||||
const int SharedBankEnd = (SharedBankBegin + invtype::InvTypeSharedBankSize) - 1;
|
||||
|
||||
const int TradeBegin = 3000;
|
||||
const int TradeEnd = (TradeBegin + invtype::InvTypeTradeSize) - 1;
|
||||
const int TradeNPCEnd = 3003;
|
||||
|
||||
const int WorldBegin = 4000;
|
||||
const int WorldEnd = (WorldBegin + invtype::InvTypeWorldSize) - 1;
|
||||
|
||||
const int TributeBegin = 400;
|
||||
const int TributeEnd = (TributeBegin + invtype::InvTypeTributeSize) - 1;
|
||||
|
||||
const int GuildTributeBegin = 450;
|
||||
const int GuildTributeEnd = (GuildTributeBegin + invtype::InvTypeGuildTributeSize) - 1;
|
||||
|
||||
const int CorpseBegin = PossessionsGeneral1;
|
||||
const int CorpseEnd = PossessionsGeneral1 + PossessionsCursor;
|
||||
|
||||
extern const char* GetInvPossessionsSlotName(int inv_slot);
|
||||
extern const char* GetInvCorpseSlotName(int inv_slot);
|
||||
extern const char* GetInvSlotName(int inv_type, int inv_slot);
|
||||
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
const size_t ItemBagSize = 10;
|
||||
|
||||
const int GeneralBagsBegin = 262;
|
||||
const int GeneralBagsSize = invslot::GeneralCount * ItemBagSize;
|
||||
const int GeneralBagsEnd = (GeneralBagsBegin + GeneralBagsSize) - 1;
|
||||
|
||||
const int CursorBagBegin = 342;
|
||||
const int CursorBagSize = ItemBagSize;
|
||||
const int CursorBagEnd = (CursorBagBegin + CursorBagSize) - 1;
|
||||
|
||||
const int BankBagsBegin = 2032;
|
||||
const int BankBagsSize = (invtype::InvTypeBankSize * ItemBagSize);
|
||||
const int BankBagsEnd = (BankBagsBegin + BankBagsSize) - 1;
|
||||
|
||||
const int SharedBankBagsBegin = 2532;
|
||||
const int SharedBankBagsSize = invtype::InvTypeSharedBankSize * ItemBagSize;
|
||||
const int SharedBankBagsEnd = (SharedBankBagsBegin + SharedBankBagsSize) - 1;
|
||||
|
||||
const int TradeBagsBegin = 3031;
|
||||
const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize;
|
||||
const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1;
|
||||
|
||||
extern const char* GetInvBagIndexName(int bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
const size_t ItemAugSize = 5;
|
||||
|
||||
extern const char* GetInvAugIndexName(int aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||
const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize;
|
||||
|
||||
const size_t BandoliersSize = 20; // number of bandolier instances
|
||||
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
||||
|
||||
const size_t PotionBeltSize = 5;
|
||||
|
||||
const size_t SkillArraySize = 100;
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
const size_t CharacterCreationLimit = 12;
|
||||
|
||||
const size_t SayLinkBodySize = 50;
|
||||
const size_t SAY_LINK_BODY_SIZE = 50;
|
||||
|
||||
const int LongBuffs = 25;
|
||||
const int ShortBuffs = 15;
|
||||
@@ -306,11 +290,15 @@ namespace SoF
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
const bool CoinHasWeight = true;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
@@ -717,7 +717,7 @@ struct BandolierItem_Struct
|
||||
struct Bandolier_Struct
|
||||
{
|
||||
char Name[32];
|
||||
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||
BandolierItem_Struct Items[profile::BANDOLIER_ITEM_COUNT];
|
||||
};
|
||||
|
||||
//len = 72
|
||||
@@ -731,7 +731,7 @@ struct PotionBeltItem_Struct
|
||||
//len = 288
|
||||
struct PotionBelt_Struct
|
||||
{
|
||||
PotionBeltItem_Struct Items[profile::PotionBeltSize];
|
||||
PotionBeltItem_Struct Items[profile::POTION_BELT_SIZE];
|
||||
};
|
||||
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
@@ -937,7 +937,7 @@ struct PlayerProfile_Struct //23576 Octets
|
||||
/*08288*/ uint32 aapoints_spent; // Number of spent AA points
|
||||
/*08292*/ uint32 aapoints; // Unspent AA points
|
||||
/*08296*/ uint8 unknown06160[4];
|
||||
/*08300*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [6400] bandolier contents
|
||||
/*08300*/ Bandolier_Struct bandoliers[profile::BANDOLIERS_SIZE]; // [6400] bandolier contents
|
||||
/*14700*/ PotionBelt_Struct potionbelt; // [360] potion belt 72 extra octets by adding 1 more belt slot
|
||||
/*15060*/ uint8 unknown12852[8];
|
||||
/*15068*/ uint32 available_slots;
|
||||
|
||||
+11
-11
@@ -1051,18 +1051,18 @@ namespace Titanium
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) {
|
||||
for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
OUT(bandoliers[r].Items[k].Icon);
|
||||
OUT_str(bandoliers[r].Items[k].Name);
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) {
|
||||
for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
eq->bandoliers[r].Items[k].Icon = 0;
|
||||
eq->bandoliers[r].Items[k].Name[0] = '\0';
|
||||
@@ -1072,13 +1072,13 @@ namespace Titanium
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++r) {
|
||||
for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++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::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) {
|
||||
for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -2446,7 +2446,7 @@ namespace Titanium
|
||||
ob << StringFormat("%.*s\"", depth, protection); // Quotes (and protection, if needed) around static data
|
||||
|
||||
// Sub data
|
||||
for (int index = EQEmu::inventory::containerBegin; index < invbag::ItemBagSize; ++index) {
|
||||
for (int index = EQEmu::invbag::SLOT_BEGIN; index <= invbag::SLOT_END; ++index) {
|
||||
ob << '|';
|
||||
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
@@ -2494,7 +2494,7 @@ namespace Titanium
|
||||
|
||||
static inline void ServerToTitaniumSayLink(std::string& titaniumSayLink, const std::string& serverSayLink)
|
||||
{
|
||||
if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
titaniumSayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -2503,7 +2503,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::SayLinkBodySize) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) {
|
||||
titaniumSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -2534,7 +2534,7 @@ namespace Titanium
|
||||
|
||||
static inline void TitaniumToServerSayLink(std::string& serverSayLink, const std::string& titaniumSayLink)
|
||||
{
|
||||
if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (titaniumSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (titaniumSayLink.find('\x12') == std::string::npos)) {
|
||||
serverSayLink = titaniumSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -2543,7 +2543,7 @@ namespace Titanium
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) {
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
|
||||
+118
-118
@@ -22,196 +22,196 @@
|
||||
#include "../string_util.h"
|
||||
|
||||
|
||||
size_t Titanium::invtype::GetInvTypeSize(int inv_type)
|
||||
int16 Titanium::invtype::GetInvTypeSize(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypePossessions:
|
||||
return invtype::InvTypePossessionsSize;
|
||||
case invtype::InvTypeBank:
|
||||
return invtype::InvTypeBankSize;
|
||||
case invtype::InvTypeSharedBank:
|
||||
return invtype::InvTypeSharedBankSize;
|
||||
case invtype::InvTypeTrade:
|
||||
return invtype::InvTypeTradeSize;
|
||||
case invtype::InvTypeWorld:
|
||||
return invtype::InvTypeWorldSize;
|
||||
case invtype::InvTypeLimbo:
|
||||
return invtype::InvTypeLimboSize;
|
||||
case invtype::InvTypeTribute:
|
||||
return invtype::InvTypeTributeSize;
|
||||
case invtype::InvTypeGuildTribute:
|
||||
return invtype::InvTypeGuildTributeSize;
|
||||
case invtype::InvTypeMerchant:
|
||||
return invtype::InvTypeMerchantSize;
|
||||
case invtype::InvTypeCorpse:
|
||||
return invtype::InvTypeCorpseSize;
|
||||
case invtype::InvTypeBazaar:
|
||||
return invtype::InvTypeBazaarSize;
|
||||
case invtype::InvTypeInspect:
|
||||
return invtype::InvTypeInspectSize;
|
||||
case invtype::InvTypeViewMODPC:
|
||||
return invtype::InvTypeViewMODPCSize;
|
||||
case invtype::InvTypeViewMODBank:
|
||||
return invtype::InvTypeViewMODBankSize;
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
return invtype::InvTypeViewMODSharedBankSize;
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
return invtype::InvTypeViewMODLimboSize;
|
||||
case invtype::InvTypeAltStorage:
|
||||
return invtype::InvTypeAltStorageSize;
|
||||
case invtype::InvTypeArchived:
|
||||
return invtype::InvTypeArchivedSize;
|
||||
case invtype::InvTypeOther:
|
||||
return invtype::InvTypeOtherSize;
|
||||
case invtype::typePossessions:
|
||||
return invtype::POSSESSIONS_SIZE;
|
||||
case invtype::typeBank:
|
||||
return invtype::BANK_SIZE;
|
||||
case invtype::typeSharedBank:
|
||||
return invtype::SHARED_BANK_SIZE;
|
||||
case invtype::typeTrade:
|
||||
return invtype::TRADE_SIZE;
|
||||
case invtype::typeWorld:
|
||||
return invtype::WORLD_SIZE;
|
||||
case invtype::typeLimbo:
|
||||
return invtype::LIMBO_SIZE;
|
||||
case invtype::typeTribute:
|
||||
return invtype::TRIBUTE_SIZE;
|
||||
case invtype::typeGuildTribute:
|
||||
return invtype::GUILD_TRIBUTE_SIZE;
|
||||
case invtype::typeMerchant:
|
||||
return invtype::MERCHANT_SIZE;
|
||||
case invtype::typeCorpse:
|
||||
return invtype::CORPSE_SIZE;
|
||||
case invtype::typeBazaar:
|
||||
return invtype::BAZAAR_SIZE;
|
||||
case invtype::typeInspect:
|
||||
return invtype::INSPECT_SIZE;
|
||||
case invtype::typeViewMODPC:
|
||||
return invtype::VIEW_MOD_PC_SIZE;
|
||||
case invtype::typeViewMODBank:
|
||||
return invtype::VIEW_MOD_BANK_SIZE;
|
||||
case invtype::typeViewMODSharedBank:
|
||||
return invtype::VIEW_MOD_SHARED_BANK_SIZE;
|
||||
case invtype::typeViewMODLimbo:
|
||||
return invtype::VIEW_MOD_LIMBO_SIZE;
|
||||
case invtype::typeAltStorage:
|
||||
return invtype::ALT_STORAGE_SIZE;
|
||||
case invtype::typeArchived:
|
||||
return invtype::ARCHIVED_SIZE;
|
||||
case invtype::typeOther:
|
||||
return invtype::OTHER_SIZE;
|
||||
default:
|
||||
return 0;
|
||||
return INULL;
|
||||
}
|
||||
}
|
||||
|
||||
const char* Titanium::invtype::GetInvTypeName(int inv_type)
|
||||
const char* Titanium::invtype::GetInvTypeName(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypeInvalid:
|
||||
case invtype::TYPE_INVALID:
|
||||
return "Invalid Type";
|
||||
case invtype::InvTypePossessions:
|
||||
case invtype::typePossessions:
|
||||
return "Possessions";
|
||||
case invtype::InvTypeBank:
|
||||
case invtype::typeBank:
|
||||
return "Bank";
|
||||
case invtype::InvTypeSharedBank:
|
||||
case invtype::typeSharedBank:
|
||||
return "Shared Bank";
|
||||
case invtype::InvTypeTrade:
|
||||
case invtype::typeTrade:
|
||||
return "Trade";
|
||||
case invtype::InvTypeWorld:
|
||||
case invtype::typeWorld:
|
||||
return "World";
|
||||
case invtype::InvTypeLimbo:
|
||||
case invtype::typeLimbo:
|
||||
return "Limbo";
|
||||
case invtype::InvTypeTribute:
|
||||
case invtype::typeTribute:
|
||||
return "Tribute";
|
||||
case invtype::InvTypeGuildTribute:
|
||||
case invtype::typeGuildTribute:
|
||||
return "Guild Tribute";
|
||||
case invtype::InvTypeMerchant:
|
||||
case invtype::typeMerchant:
|
||||
return "Merchant";
|
||||
case invtype::InvTypeCorpse:
|
||||
case invtype::typeCorpse:
|
||||
return "Corpse";
|
||||
case invtype::InvTypeBazaar:
|
||||
case invtype::typeBazaar:
|
||||
return "Bazaar";
|
||||
case invtype::InvTypeInspect:
|
||||
case invtype::typeInspect:
|
||||
return "Inspect";
|
||||
case invtype::InvTypeViewMODPC:
|
||||
case invtype::typeViewMODPC:
|
||||
return "View MOD PC";
|
||||
case invtype::InvTypeViewMODBank:
|
||||
case invtype::typeViewMODBank:
|
||||
return "View MOD Bank";
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
case invtype::typeViewMODSharedBank:
|
||||
return "View MOD Shared Bank";
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
case invtype::typeViewMODLimbo:
|
||||
return "View MOD Limbo";
|
||||
case invtype::InvTypeAltStorage:
|
||||
case invtype::typeAltStorage:
|
||||
return "Alt Storage";
|
||||
case invtype::InvTypeArchived:
|
||||
case invtype::typeArchived:
|
||||
return "Archived";
|
||||
case invtype::InvTypeOther:
|
||||
case invtype::typeOther:
|
||||
return "Other";
|
||||
default:
|
||||
return "Unknown Type";
|
||||
}
|
||||
}
|
||||
|
||||
bool Titanium::invtype::IsInvTypePersistent(int inv_type)
|
||||
bool Titanium::invtype::IsInvTypePersistent(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypePossessions:
|
||||
case invtype::InvTypeBank:
|
||||
case invtype::InvTypeSharedBank:
|
||||
case invtype::InvTypeTrade:
|
||||
case invtype::InvTypeWorld:
|
||||
case invtype::InvTypeLimbo:
|
||||
case invtype::InvTypeTribute:
|
||||
case invtype::InvTypeGuildTribute:
|
||||
case invtype::typePossessions:
|
||||
case invtype::typeBank:
|
||||
case invtype::typeSharedBank:
|
||||
case invtype::typeTrade:
|
||||
case invtype::typeWorld:
|
||||
case invtype::typeLimbo:
|
||||
case invtype::typeTribute:
|
||||
case invtype::typeGuildTribute:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
const char* Titanium::invslot::GetInvPossessionsSlotName(int inv_slot)
|
||||
const char* Titanium::invslot::GetInvPossessionsSlotName(int16 inv_slot)
|
||||
{
|
||||
switch (inv_slot) {
|
||||
case invslot::InvSlotInvalid:
|
||||
case invslot::SLOT_INVALID:
|
||||
return "Invalid Slot";
|
||||
case invslot::PossessionsCharm:
|
||||
case invslot::slotCharm:
|
||||
return "Charm";
|
||||
case invslot::PossessionsEar1:
|
||||
case invslot::slotEar1:
|
||||
return "Ear 1";
|
||||
case invslot::PossessionsHead:
|
||||
case invslot::slotHead:
|
||||
return "Head";
|
||||
case invslot::PossessionsFace:
|
||||
case invslot::slotFace:
|
||||
return "Face";
|
||||
case invslot::PossessionsEar2:
|
||||
case invslot::slotEar2:
|
||||
return "Ear 2";
|
||||
case invslot::PossessionsNeck:
|
||||
case invslot::slotNeck:
|
||||
return "Neck";
|
||||
case invslot::PossessionsShoulders:
|
||||
case invslot::slotShoulders:
|
||||
return "Shoulders";
|
||||
case invslot::PossessionsArms:
|
||||
case invslot::slotArms:
|
||||
return "Arms";
|
||||
case invslot::PossessionsBack:
|
||||
case invslot::slotBack:
|
||||
return "Back";
|
||||
case invslot::PossessionsWrist1:
|
||||
case invslot::slotWrist1:
|
||||
return "Wrist 1";
|
||||
case invslot::PossessionsWrist2:
|
||||
case invslot::slotWrist2:
|
||||
return "Wrist 2";
|
||||
case invslot::PossessionsRange:
|
||||
case invslot::slotRange:
|
||||
return "Range";
|
||||
case invslot::PossessionsHands:
|
||||
case invslot::slotHands:
|
||||
return "Hands";
|
||||
case invslot::PossessionsPrimary:
|
||||
case invslot::slotPrimary:
|
||||
return "Primary";
|
||||
case invslot::PossessionsSecondary:
|
||||
case invslot::slotSecondary:
|
||||
return "Secondary";
|
||||
case invslot::PossessionsFinger1:
|
||||
case invslot::slotFinger1:
|
||||
return "Finger 1";
|
||||
case invslot::PossessionsFinger2:
|
||||
case invslot::slotFinger2:
|
||||
return "Finger 2";
|
||||
case invslot::PossessionsChest:
|
||||
case invslot::slotChest:
|
||||
return "Chest";
|
||||
case invslot::PossessionsLegs:
|
||||
case invslot::slotLegs:
|
||||
return "Legs";
|
||||
case invslot::PossessionsFeet:
|
||||
case invslot::slotFeet:
|
||||
return "Feet";
|
||||
case invslot::PossessionsWaist:
|
||||
case invslot::slotWaist:
|
||||
return "Waist";
|
||||
case invslot::PossessionsAmmo:
|
||||
case invslot::slotAmmo:
|
||||
return "Ammo";
|
||||
case invslot::PossessionsGeneral1:
|
||||
case invslot::slotGeneral1:
|
||||
return "General 1";
|
||||
case invslot::PossessionsGeneral2:
|
||||
case invslot::slotGeneral2:
|
||||
return "General 2";
|
||||
case invslot::PossessionsGeneral3:
|
||||
case invslot::slotGeneral3:
|
||||
return "General 3";
|
||||
case invslot::PossessionsGeneral4:
|
||||
case invslot::slotGeneral4:
|
||||
return "General 4";
|
||||
case invslot::PossessionsGeneral5:
|
||||
case invslot::slotGeneral5:
|
||||
return "General 5";
|
||||
case invslot::PossessionsGeneral6:
|
||||
case invslot::slotGeneral6:
|
||||
return "General 6";
|
||||
case invslot::PossessionsGeneral7:
|
||||
case invslot::slotGeneral7:
|
||||
return "General 7";
|
||||
case invslot::PossessionsGeneral8:
|
||||
case invslot::slotGeneral8:
|
||||
return "General 8";
|
||||
case invslot::PossessionsCursor:
|
||||
case invslot::slotCursor:
|
||||
return "Cursor";
|
||||
default:
|
||||
return "Unknown Slot";
|
||||
}
|
||||
}
|
||||
|
||||
const char* Titanium::invslot::GetInvCorpseSlotName(int inv_slot)
|
||||
const char* Titanium::invslot::GetInvCorpseSlotName(int16 inv_slot)
|
||||
{
|
||||
if (!invtype::GetInvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid)
|
||||
if (!invtype::GetInvTypeSize(invtype::typeCorpse) || inv_slot == invslot::SLOT_INVALID)
|
||||
return "Invalid Slot";
|
||||
|
||||
// needs work
|
||||
if ((size_t)(inv_slot + 1) < invslot::CorpseBegin || (size_t)(inv_slot + 1) >= invslot::CorpseEnd)
|
||||
if ((inv_slot + 1) < invslot::CORPSE_BEGIN || (inv_slot + 1) >= invslot::CORPSE_END)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -220,19 +220,19 @@ const char* Titanium::invslot::GetInvCorpseSlotName(int inv_slot)
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* Titanium::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||
const char* Titanium::invslot::GetInvSlotName(int16 inv_type, int16 inv_slot)
|
||||
{
|
||||
if (inv_type == invtype::InvTypePossessions)
|
||||
if (inv_type == invtype::typePossessions)
|
||||
return invslot::GetInvPossessionsSlotName(inv_slot);
|
||||
else if (inv_type == invtype::InvTypeCorpse)
|
||||
else if (inv_type == invtype::typeCorpse)
|
||||
return invslot::GetInvCorpseSlotName(inv_slot);
|
||||
|
||||
size_t type_size = invtype::GetInvTypeSize(inv_type);
|
||||
int16 type_size = invtype::GetInvTypeSize(inv_type);
|
||||
|
||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||
if (!type_size || inv_slot == invslot::SLOT_INVALID)
|
||||
return "Invalid Slot";
|
||||
|
||||
if ((size_t)(inv_slot + 1) >= type_size)
|
||||
if ((inv_slot + 1) >= type_size)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -241,12 +241,12 @@ const char* Titanium::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* Titanium::invbag::GetInvBagIndexName(int bag_index)
|
||||
const char* Titanium::invbag::GetInvBagIndexName(int16 bag_index)
|
||||
{
|
||||
if (bag_index == invbag::InvBagInvalid)
|
||||
if (bag_index == invbag::SLOT_INVALID)
|
||||
return "Invalid Bag";
|
||||
|
||||
if ((size_t)bag_index >= invbag::ItemBagSize)
|
||||
if (bag_index >= invbag::SLOT_COUNT)
|
||||
return "Unknown Bag";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -255,12 +255,12 @@ const char* Titanium::invbag::GetInvBagIndexName(int bag_index)
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* Titanium::invaug::GetInvAugIndexName(int aug_index)
|
||||
const char* Titanium::invaug::GetInvAugIndexName(int16 aug_index)
|
||||
{
|
||||
if (aug_index == invaug::InvAugInvalid)
|
||||
if (aug_index == invaug::SOCKET_INVALID)
|
||||
return "Invalid Augment";
|
||||
|
||||
if ((size_t)aug_index >= invaug::ItemAugSize)
|
||||
if (aug_index >= invaug::SOCKET_COUNT)
|
||||
return "Unknown Augment";
|
||||
|
||||
static std::string ret_str;
|
||||
|
||||
+193
-205
@@ -27,107 +27,217 @@
|
||||
|
||||
namespace Titanium
|
||||
{
|
||||
enum : int { Invalid = -1, Null, Safety };
|
||||
const int16 IINVALID = -1;
|
||||
const int16 INULL = 0;
|
||||
|
||||
enum : bool { False = false, True = true };
|
||||
|
||||
// pre-declarations
|
||||
namespace inventory {
|
||||
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
const bool ConcatenateInvTypeLimbo = true;
|
||||
|
||||
const bool AllowOverLevelEquipment = false;
|
||||
|
||||
const bool AllowEmptyBagInBag = false;
|
||||
const bool AllowClickCastFromBag = false;
|
||||
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||
namespace enum_ {
|
||||
enum InventoryTypes : int16 {
|
||||
typePossessions = INULL,
|
||||
typeBank,
|
||||
typeSharedBank,
|
||||
typeTrade,
|
||||
typeWorld,
|
||||
typeLimbo,
|
||||
typeTribute,
|
||||
typeGuildTribute,
|
||||
typeMerchant,
|
||||
typeCorpse,
|
||||
typeBazaar,
|
||||
typeInspect,
|
||||
typeViewMODPC,
|
||||
typeViewMODBank,
|
||||
typeViewMODSharedBank,
|
||||
typeViewMODLimbo,
|
||||
typeAltStorage,
|
||||
typeArchived,
|
||||
typeOther
|
||||
};
|
||||
|
||||
enum InventoryType : int {
|
||||
InvTypePossessions = InvTypeBegin,
|
||||
InvTypeBank,
|
||||
InvTypeSharedBank,
|
||||
InvTypeTrade,
|
||||
InvTypeWorld,
|
||||
InvTypeLimbo,
|
||||
InvTypeTribute,
|
||||
InvTypeGuildTribute,
|
||||
InvTypeMerchant,
|
||||
InvTypeCorpse,
|
||||
InvTypeBazaar,
|
||||
InvTypeInspect,
|
||||
InvTypeViewMODPC,
|
||||
InvTypeViewMODBank,
|
||||
InvTypeViewMODSharedBank,
|
||||
InvTypeViewMODLimbo,
|
||||
InvTypeAltStorage,
|
||||
InvTypeArchived,
|
||||
InvTypeOther,
|
||||
InvTypeCount
|
||||
};
|
||||
} // namespace enum_
|
||||
using namespace enum_;
|
||||
|
||||
const int16 POSSESSIONS_SIZE = 31;
|
||||
const int16 BANK_SIZE = 16;
|
||||
const int16 SHARED_BANK_SIZE = 2;
|
||||
const int16 TRADE_SIZE = 8;
|
||||
const int16 WORLD_SIZE = 10;
|
||||
const int16 LIMBO_SIZE = 36;
|
||||
const int16 TRIBUTE_SIZE = 5;
|
||||
const int16 GUILD_TRIBUTE_SIZE = 2;
|
||||
const int16 MERCHANT_SIZE = 80;
|
||||
const int16 CORPSE_SIZE = POSSESSIONS_SIZE;
|
||||
const int16 BAZAAR_SIZE = 80;
|
||||
const int16 INSPECT_SIZE = 22;
|
||||
const int16 VIEW_MOD_PC_SIZE = POSSESSIONS_SIZE;
|
||||
const int16 VIEW_MOD_BANK_SIZE = BANK_SIZE;
|
||||
const int16 VIEW_MOD_SHARED_BANK_SIZE = SHARED_BANK_SIZE;
|
||||
const int16 VIEW_MOD_LIMBO_SIZE = LIMBO_SIZE;
|
||||
const int16 ALT_STORAGE_SIZE = 0;//unknown - "Shroud Bank"
|
||||
const int16 ARCHIVED_SIZE = 0;//unknown
|
||||
const int16 OTHER_SIZE = 0;//unknown
|
||||
|
||||
const int16 TRADE_NPC_SIZE = 4; // defined by implication
|
||||
|
||||
const int16 TYPE_INVALID = IINVALID;
|
||||
const int16 TYPE_BEGIN = typePossessions;
|
||||
const int16 TYPE_END = typeOther;
|
||||
const int16 TYPE_COUNT = (TYPE_END - TYPE_BEGIN) + 1;
|
||||
|
||||
int16 GetInvTypeSize(int16 inv_type);
|
||||
const char* GetInvTypeName(int16 inv_type);
|
||||
|
||||
bool IsInvTypePersistent(int16 inv_type);
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||
namespace enum_ {
|
||||
enum InventorySlots : int16 {
|
||||
slotCharm = INULL,
|
||||
slotEar1,
|
||||
slotHead,
|
||||
slotFace,
|
||||
slotEar2,
|
||||
slotNeck,
|
||||
slotShoulders,
|
||||
slotArms,
|
||||
slotBack,
|
||||
slotWrist1,
|
||||
slotWrist2,
|
||||
slotRange,
|
||||
slotHands,
|
||||
slotPrimary,
|
||||
slotSecondary,
|
||||
slotFinger1,
|
||||
slotFinger2,
|
||||
slotChest,
|
||||
slotLegs,
|
||||
slotFeet,
|
||||
slotWaist,
|
||||
slotAmmo,
|
||||
slotGeneral1,
|
||||
slotGeneral2,
|
||||
slotGeneral3,
|
||||
slotGeneral4,
|
||||
slotGeneral5,
|
||||
slotGeneral6,
|
||||
slotGeneral7,
|
||||
slotGeneral8,
|
||||
slotCursor
|
||||
};
|
||||
|
||||
enum PossessionsSlot : int {
|
||||
PossessionsCharm = InvSlotBegin,
|
||||
PossessionsEar1,
|
||||
PossessionsHead,
|
||||
PossessionsFace,
|
||||
PossessionsEar2,
|
||||
PossessionsNeck,
|
||||
PossessionsShoulders,
|
||||
PossessionsArms,
|
||||
PossessionsBack,
|
||||
PossessionsWrist1,
|
||||
PossessionsWrist2,
|
||||
PossessionsRange,
|
||||
PossessionsHands,
|
||||
PossessionsPrimary,
|
||||
PossessionsSecondary,
|
||||
PossessionsFinger1,
|
||||
PossessionsFinger2,
|
||||
PossessionsChest,
|
||||
PossessionsLegs,
|
||||
PossessionsFeet,
|
||||
PossessionsWaist,
|
||||
PossessionsAmmo,
|
||||
PossessionsGeneral1,
|
||||
PossessionsGeneral2,
|
||||
PossessionsGeneral3,
|
||||
PossessionsGeneral4,
|
||||
PossessionsGeneral5,
|
||||
PossessionsGeneral6,
|
||||
PossessionsGeneral7,
|
||||
PossessionsGeneral8,
|
||||
PossessionsCursor,
|
||||
PossessionsCount
|
||||
};
|
||||
} // namespace enum_
|
||||
using namespace enum_;
|
||||
|
||||
const int EquipmentBegin = PossessionsCharm;
|
||||
const int EquipmentEnd = PossessionsAmmo;
|
||||
const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1);
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
|
||||
const int GeneralBegin = PossessionsGeneral1;
|
||||
const int GeneralEnd = PossessionsGeneral8;
|
||||
const int GeneralCount = (GeneralEnd - GeneralBegin + 1);
|
||||
const int16 POSSESSIONS_BEGIN = slotCharm;
|
||||
const int16 POSSESSIONS_END = slotCursor;
|
||||
const int16 POSSESSIONS_COUNT = (POSSESSIONS_END - POSSESSIONS_BEGIN) + 1;
|
||||
|
||||
const int16 EQUIPMENT_BEGIN = slotCharm;
|
||||
const int16 EQUIPMENT_END = slotAmmo;
|
||||
const int16 EQUIPMENT_COUNT = (EQUIPMENT_END - EQUIPMENT_BEGIN + 1);
|
||||
|
||||
const int16 GENERAL_BEGIN = slotGeneral1;
|
||||
const int16 GENERAL_END = slotGeneral8;
|
||||
const int16 GENERAL_COUNT = (GENERAL_END - GENERAL_BEGIN + 1);
|
||||
|
||||
const int16 BONUS_BEGIN = invslot::slotCharm;
|
||||
const int16 BONUS_STAT_END = invslot::slotWaist;
|
||||
const int16 BONUS_SKILL_END = invslot::slotAmmo;
|
||||
|
||||
const int16 BANK_BEGIN = 2000;
|
||||
const int16 BANK_END = (BANK_BEGIN + invtype::BANK_SIZE) - 1;
|
||||
|
||||
const int16 SHARED_BANK_BEGIN = 2500;
|
||||
const int16 SHARED_BANK_END = (SHARED_BANK_BEGIN + invtype::SHARED_BANK_SIZE) - 1;
|
||||
|
||||
const int16 TRADE_BEGIN = 3000;
|
||||
const int16 TRADE_END = (TRADE_BEGIN + invtype::TRADE_SIZE) - 1;
|
||||
|
||||
const int16 TRADE_NPC_END = (TRADE_BEGIN + invtype::TRADE_NPC_SIZE) - 1; // defined by implication
|
||||
|
||||
const int16 WORLD_BEGIN = 4000;
|
||||
const int16 WORLD_END = (WORLD_BEGIN + invtype::WORLD_SIZE) - 1;
|
||||
|
||||
const int16 TRIBUTE_BEGIN = 400;
|
||||
const int16 TRIBUTE_END = (TRIBUTE_BEGIN + invtype::TRIBUTE_SIZE) - 1;
|
||||
|
||||
const int16 GUILD_TRIBUTE_BEGIN = 450;
|
||||
const int16 GUILD_TRIBUTE_END = (GUILD_TRIBUTE_BEGIN + invtype::GUILD_TRIBUTE_SIZE) - 1;
|
||||
|
||||
const int16 CORPSE_BEGIN = invslot::slotGeneral1;
|
||||
const int16 CORPSE_END = invslot::slotGeneral1 + invslot::slotCursor;
|
||||
|
||||
const uint64 POSSESSIONS_BITMASK = 0x000000027FDFFFFF; // based on 34-slot count (RoF+)
|
||||
const uint64 CORPSE_BITMASK = 0x017FFFFE7F800000; // based on 34-slot count (RoF+)
|
||||
|
||||
const char* GetInvPossessionsSlotName(int16 inv_slot);
|
||||
const char* GetInvCorpseSlotName(int16 inv_slot);
|
||||
const char* GetInvSlotName(int16 inv_type, int16 inv_slot);
|
||||
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
const int16 SLOT_END = 9;
|
||||
const int16 SLOT_COUNT = 10;
|
||||
|
||||
const int16 GENERAL_BAGS_BEGIN = 251;
|
||||
const int16 GENERAL_BAGS_COUNT = invslot::GENERAL_COUNT * SLOT_COUNT;
|
||||
const int16 GENERAL_BAGS_END = (GENERAL_BAGS_BEGIN + GENERAL_BAGS_COUNT) - 1;
|
||||
|
||||
const int16 CURSOR_BAG_BEGIN = 331;
|
||||
const int16 CURSOR_BAG_COUNT = SLOT_COUNT;
|
||||
const int16 CURSOR_BAG_END = (CURSOR_BAG_BEGIN + CURSOR_BAG_COUNT) - 1;
|
||||
|
||||
const int16 BANK_BAGS_BEGIN = 2031;
|
||||
const int16 BANK_BAGS_COUNT = (invtype::BANK_SIZE * SLOT_COUNT);
|
||||
const int16 BANK_BAGS_END = (BANK_BAGS_BEGIN + BANK_BAGS_COUNT) - 1;
|
||||
|
||||
const int16 SHARED_BANK_BAGS_BEGIN = 2531;
|
||||
const int16 SHARED_BANK_BAGS_COUNT = invtype::SHARED_BANK_SIZE * SLOT_COUNT;
|
||||
const int16 SHARED_BANK_BAGS_END = (SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_COUNT) - 1;
|
||||
|
||||
const int16 TRADE_BAGS_BEGIN = 3031;
|
||||
const int16 TRADE_BAGS_COUNT = invtype::TRADE_SIZE * SLOT_COUNT;
|
||||
const int16 TRADE_BAGS_END = (TRADE_BAGS_BEGIN + TRADE_BAGS_COUNT) - 1;
|
||||
|
||||
const char* GetInvBagIndexName(int16 bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||
const int16 SOCKET_INVALID = IINVALID;
|
||||
const int16 SOCKET_BEGIN = INULL;
|
||||
const int16 SOCKET_END = 4;
|
||||
const int16 SOCKET_COUNT = 5;
|
||||
|
||||
const char* GetInvAugIndexName(int16 aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
@@ -152,147 +262,21 @@ namespace Titanium
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
const int16 BANDOLIERS_SIZE = 4; // number of bandolier instances
|
||||
const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
|
||||
const int16 POTION_BELT_SIZE = 4;
|
||||
|
||||
const int16 SKILL_ARRAY_SIZE = 100;
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
} /*constants*/
|
||||
const size_t CHARACTER_CREATION_LIMIT = 8; // Hard-coded in client - DO NOT ALTER
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
} /*skills*/
|
||||
|
||||
|
||||
// declarations
|
||||
namespace inventory {
|
||||
const bool ConcatenateInvTypeLimbo = true;
|
||||
|
||||
const bool AllowOverLevelEquipment = false;
|
||||
|
||||
const bool AllowEmptyBagInBag = false;
|
||||
const bool AllowClickCastFromBag = false;
|
||||
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
||||
const size_t InvTypeBankSize = 16;
|
||||
const size_t InvTypeSharedBankSize = 2;
|
||||
const size_t InvTypeTradeSize = 8;
|
||||
const size_t InvTypeWorldSize = 10;
|
||||
const size_t InvTypeLimboSize = 36;
|
||||
const size_t InvTypeTributeSize = 5;
|
||||
const size_t InvTypeGuildTributeSize = 2;
|
||||
const size_t InvTypeMerchantSize = 80;
|
||||
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
||||
const size_t InvTypeBazaarSize = 80;
|
||||
const size_t InvTypeInspectSize = invslot::EquipmentCount;
|
||||
const size_t InvTypeViewMODPCSize = InvTypePossessionsSize;
|
||||
const size_t InvTypeViewMODBankSize = InvTypeBankSize;
|
||||
const size_t InvTypeViewMODSharedBankSize = InvTypeSharedBankSize;
|
||||
const size_t InvTypeViewMODLimboSize = InvTypeLimboSize;
|
||||
const size_t InvTypeAltStorageSize = 0;//unknown - "Shroud Bank"
|
||||
const size_t InvTypeArchivedSize = 0;//unknown
|
||||
const size_t InvTypeOtherSize = 0;//unknown
|
||||
|
||||
extern size_t GetInvTypeSize(int inv_type);
|
||||
extern const char* GetInvTypeName(int inv_type);
|
||||
|
||||
extern bool IsInvTypePersistent(int inv_type);
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
const int BankBegin = 2000;
|
||||
const int BankEnd = (BankBegin + invtype::InvTypeBankSize) - 1;
|
||||
|
||||
const int SharedBankBegin = 2500;
|
||||
const int SharedBankEnd = (SharedBankBegin + invtype::InvTypeSharedBankSize) - 1;
|
||||
|
||||
const int TradeBegin = 3000;
|
||||
const int TradeEnd = (TradeBegin + invtype::InvTypeTradeSize) - 1;
|
||||
const int TradeNPCEnd = 3003;
|
||||
|
||||
const int WorldBegin = 4000;
|
||||
const int WorldEnd = (WorldBegin + invtype::InvTypeWorldSize) - 1;
|
||||
|
||||
const int TributeBegin = 400;
|
||||
const int TributeEnd = (TributeBegin + invtype::InvTypeTributeSize) - 1;
|
||||
|
||||
const int GuildTributeBegin = 450;
|
||||
const int GuildTributeEnd = (GuildTributeBegin + invtype::InvTypeGuildTributeSize) - 1;
|
||||
|
||||
const int CorpseBegin = PossessionsGeneral1;
|
||||
const int CorpseEnd = PossessionsGeneral1 + PossessionsCursor;
|
||||
|
||||
extern const char* GetInvPossessionsSlotName(int inv_slot);
|
||||
extern const char* GetInvCorpseSlotName(int inv_slot);
|
||||
extern const char* GetInvSlotName(int inv_type, int inv_slot);
|
||||
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
const size_t ItemBagSize = 10;
|
||||
|
||||
const int GeneralBagsBegin = 251;
|
||||
const int GeneralBagsSize = invslot::GeneralCount * ItemBagSize;
|
||||
const int GeneralBagsEnd = (GeneralBagsBegin + GeneralBagsSize) - 1;
|
||||
|
||||
const int CursorBagBegin = 331;
|
||||
const int CursorBagSize = ItemBagSize;
|
||||
const int CursorBagEnd = (CursorBagBegin + CursorBagSize) - 1;
|
||||
|
||||
const int BankBagsBegin = 2031;
|
||||
const int BankBagsSize = (invtype::InvTypeBankSize * ItemBagSize);
|
||||
const int BankBagsEnd = (BankBagsBegin + BankBagsSize) - 1;
|
||||
|
||||
const int SharedBankBagsBegin = 2531;
|
||||
const int SharedBankBagsSize = invtype::InvTypeSharedBankSize * ItemBagSize;
|
||||
const int SharedBankBagsEnd = (SharedBankBagsBegin + SharedBankBagsSize) - 1;
|
||||
|
||||
const int TradeBagsBegin = 3031;
|
||||
const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize;
|
||||
const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1;
|
||||
|
||||
extern const char* GetInvBagIndexName(int bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
const size_t ItemAugSize = 5;
|
||||
|
||||
extern const char* GetInvAugIndexName(int aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||
const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize;
|
||||
|
||||
const size_t BandoliersSize = 4; // number of bandolier instances
|
||||
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
||||
|
||||
const size_t PotionBeltSize = 4;
|
||||
|
||||
const size_t SkillArraySize = 100;
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
const size_t CharacterCreationLimit = 8; // Hard-coded in client - DO NOT ALTER
|
||||
|
||||
const size_t SayLinkBodySize = 45;
|
||||
const size_t SAY_LINK_BODY_SIZE = 45;
|
||||
|
||||
const int LongBuffs = 25;
|
||||
const int ShortBuffs = 12;
|
||||
@@ -305,11 +289,15 @@ namespace Titanium
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
const bool CoinHasWeight = true;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
const size_t LastUsableSkill = EQEmu::skills::SkillFrenzy;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
@@ -655,7 +655,7 @@ struct BandolierItem_Struct
|
||||
struct Bandolier_Struct
|
||||
{
|
||||
char Name[32];
|
||||
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||
BandolierItem_Struct Items[profile::BANDOLIER_ITEM_COUNT];
|
||||
};
|
||||
|
||||
//len = 72
|
||||
@@ -669,7 +669,7 @@ struct PotionBeltItem_Struct
|
||||
//len = 288
|
||||
struct PotionBelt_Struct
|
||||
{
|
||||
PotionBeltItem_Struct Items[profile::PotionBeltSize];
|
||||
PotionBeltItem_Struct Items[profile::POTION_BELT_SIZE];
|
||||
};
|
||||
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
@@ -875,7 +875,7 @@ struct PlayerProfile_Struct
|
||||
/*06152*/ uint32 aapoints_spent; // Number of spent AA points
|
||||
/*06156*/ uint32 aapoints; // Unspent AA points
|
||||
/*06160*/ uint8 unknown06160[4];
|
||||
/*06164*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // bandolier contents
|
||||
/*06164*/ Bandolier_Struct bandoliers[profile::BANDOLIERS_SIZE]; // bandolier contents
|
||||
/*07444*/ uint8 unknown07444[5120];
|
||||
/*12564*/ PotionBelt_Struct potionbelt; // potion belt
|
||||
/*12852*/ uint8 unknown12852[8];
|
||||
|
||||
+36
-36
@@ -1770,18 +1770,18 @@ namespace UF
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) {
|
||||
for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
OUT(bandoliers[r].Items[k].Icon);
|
||||
OUT_str(bandoliers[r].Items[k].Name);
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) {
|
||||
for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
eq->bandoliers[r].Items[k].Icon = 0;
|
||||
eq->bandoliers[r].Items[k].Name[0] = '\0';
|
||||
@@ -1791,13 +1791,13 @@ namespace UF
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++r) {
|
||||
for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++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::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) {
|
||||
for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -2106,8 +2106,8 @@ namespace UF
|
||||
eq->CharCount = emu->CharCount;
|
||||
eq->TotalChars = emu->TotalChars;
|
||||
|
||||
if (eq->TotalChars > constants::CharacterCreationLimit)
|
||||
eq->TotalChars = constants::CharacterCreationLimit;
|
||||
if (eq->TotalChars > constants::CHARACTER_CREATION_LIMIT)
|
||||
eq->TotalChars = constants::CHARACTER_CREATION_LIMIT;
|
||||
|
||||
// Special Underfoot adjustment - field should really be 'AdditionalChars' or 'BonusChars'
|
||||
uint32 adjusted_total = eq->TotalChars - 8; // Yes, it rolls under for '< 8' - probably an int32 field
|
||||
@@ -2123,7 +2123,7 @@ namespace UF
|
||||
|
||||
size_t names_length = 0;
|
||||
size_t character_count = 0;
|
||||
for (; character_count < emu->CharCount && character_count < constants::CharacterCreationLimit; ++character_count) {
|
||||
for (; character_count < emu->CharCount && character_count < constants::CHARACTER_CREATION_LIMIT; ++character_count) {
|
||||
emu_cse = (CharacterSelectEntry_Struct *)emu_ptr;
|
||||
names_length += strlen(emu_cse->Name);
|
||||
emu_ptr += sizeof(CharacterSelectEntry_Struct);
|
||||
@@ -2139,8 +2139,8 @@ namespace UF
|
||||
eq->CharCount = character_count;
|
||||
eq->TotalChars = emu->TotalChars;
|
||||
|
||||
if (eq->TotalChars > constants::CharacterCreationLimit)
|
||||
eq->TotalChars = constants::CharacterCreationLimit;
|
||||
if (eq->TotalChars > constants::CHARACTER_CREATION_LIMIT)
|
||||
eq->TotalChars = constants::CHARACTER_CREATION_LIMIT;
|
||||
|
||||
// Special Underfoot adjustment - field should really be 'AdditionalChars' or 'BonusChars' in this client
|
||||
uint32 adjusted_total = eq->TotalChars - 8; // Yes, it rolls under for '< 8' - probably an int32 field
|
||||
@@ -3810,7 +3810,7 @@ namespace UF
|
||||
ibs.nodrop = item->NoDrop;
|
||||
ibs.attune = item->Attuneable;
|
||||
ibs.size = item->Size;
|
||||
ibs.slots = SwapBits21and22(item->Slots);
|
||||
ibs.slots = SwapBits21And22(item->Slots);
|
||||
ibs.price = item->Price;
|
||||
ibs.icon = item->Icon;
|
||||
ibs.unknown1 = 1;
|
||||
@@ -3900,7 +3900,7 @@ namespace UF
|
||||
isbs.augtype = item->AugType;
|
||||
isbs.augrestrict = item->AugRestrict;
|
||||
|
||||
for (int index = 0; index < invaug::ItemAugSize; ++index) {
|
||||
for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) {
|
||||
isbs.augslots[index].type = item->AugSlotType[index];
|
||||
isbs.augslots[index].visible = item->AugSlotVisible[index];
|
||||
isbs.augslots[index].unknown = item->AugSlotUnk2[index];
|
||||
@@ -4096,18 +4096,18 @@ namespace UF
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||
for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
int SubSlotNumber = INVALID_INDEX;
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
if (slot_id_in >= EQEmu::invslot::GENERAL_BEGIN && slot_id_in <= EQEmu::invslot::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::invbag::SLOT_COUNT) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::invslot::BANK_BEGIN && slot_id_in <= EQEmu::invslot::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::invslot::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + index);
|
||||
else
|
||||
SubSlotNumber = slot_id_in;
|
||||
|
||||
@@ -4125,16 +4125,16 @@ namespace UF
|
||||
{
|
||||
uint32 UnderfootSlot = 0;
|
||||
|
||||
if (serverSlot >= EQEmu::inventory::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (serverSlot >= EQEmu::invslot::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
UnderfootSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||
else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END)
|
||||
UnderfootSlot = serverSlot + 11;
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::BANK_BAGS_END)
|
||||
UnderfootSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END)
|
||||
UnderfootSlot = serverSlot + 1;
|
||||
else if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
UnderfootSlot = invslot::PossessionsPowerSource;
|
||||
else if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE)
|
||||
UnderfootSlot = invslot::slotPowerSource;
|
||||
else
|
||||
UnderfootSlot = serverSlot;
|
||||
|
||||
@@ -4151,16 +4151,16 @@ namespace UF
|
||||
{
|
||||
uint32 ServerSlot = 0;
|
||||
|
||||
if (ufSlot >= invslot::PossessionsAmmo && ufSlot <= invslot::CorpseEnd) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (ufSlot >= invslot::slotAmmo && ufSlot <= invslot::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
ServerSlot = ufSlot - 1;
|
||||
else if (ufSlot >= invbag::GeneralBagsBegin && ufSlot <= invbag::CursorBagEnd)
|
||||
else if (ufSlot >= invbag::GENERAL_BAGS_BEGIN && ufSlot <= invbag::CURSOR_BAG_END)
|
||||
ServerSlot = ufSlot - 11;
|
||||
else if (ufSlot >= invbag::BankBagsBegin && ufSlot <= invbag::BankBagsEnd)
|
||||
else if (ufSlot >= invbag::BANK_BAGS_BEGIN && ufSlot <= invbag::BANK_BAGS_END)
|
||||
ServerSlot = ufSlot - 1;
|
||||
else if (ufSlot >= invbag::SharedBankBagsBegin && ufSlot <= invbag::SharedBankBagsEnd)
|
||||
else if (ufSlot >= invbag::SHARED_BANK_BAGS_BEGIN && ufSlot <= invbag::SHARED_BANK_BAGS_END)
|
||||
ServerSlot = ufSlot - 1;
|
||||
else if (ufSlot == invslot::PossessionsPowerSource)
|
||||
ServerSlot = EQEmu::inventory::slotPowerSource;
|
||||
else if (ufSlot == invslot::slotPowerSource)
|
||||
ServerSlot = EQEmu::invslot::SLOT_POWER_SOURCE;
|
||||
else
|
||||
ServerSlot = ufSlot;
|
||||
|
||||
@@ -4175,7 +4175,7 @@ namespace UF
|
||||
|
||||
static inline void ServerToUFSayLink(std::string& ufSayLink, const std::string& serverSayLink)
|
||||
{
|
||||
if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
ufSayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -4184,7 +4184,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::SayLinkBodySize) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) {
|
||||
ufSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -4215,7 +4215,7 @@ namespace UF
|
||||
|
||||
static inline void UFToServerSayLink(std::string& serverSayLink, const std::string& ufSayLink)
|
||||
{
|
||||
if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (ufSayLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (ufSayLink.find('\x12') == std::string::npos)) {
|
||||
serverSayLink = ufSayLink;
|
||||
return;
|
||||
}
|
||||
@@ -4224,7 +4224,7 @@ namespace UF
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) {
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
|
||||
+119
-119
@@ -22,198 +22,198 @@
|
||||
#include "../string_util.h"
|
||||
|
||||
|
||||
size_t UF::invtype::GetInvTypeSize(int inv_type)
|
||||
int16 UF::invtype::GetInvTypeSize(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypePossessions:
|
||||
return invtype::InvTypePossessionsSize;
|
||||
case invtype::InvTypeBank:
|
||||
return invtype::InvTypeBankSize;
|
||||
case invtype::InvTypeSharedBank:
|
||||
return invtype::InvTypeSharedBankSize;
|
||||
case invtype::InvTypeTrade:
|
||||
return invtype::InvTypeTradeSize;
|
||||
case invtype::InvTypeWorld:
|
||||
return invtype::InvTypeWorldSize;
|
||||
case invtype::InvTypeLimbo:
|
||||
return invtype::InvTypeLimboSize;
|
||||
case invtype::InvTypeTribute:
|
||||
return invtype::InvTypeTributeSize;
|
||||
case invtype::InvTypeGuildTribute:
|
||||
return invtype::InvTypeGuildTributeSize;
|
||||
case invtype::InvTypeMerchant:
|
||||
return invtype::InvTypeMerchantSize;
|
||||
case invtype::InvTypeCorpse:
|
||||
return invtype::InvTypeCorpseSize;
|
||||
case invtype::InvTypeBazaar:
|
||||
return invtype::InvTypeBazaarSize;
|
||||
case invtype::InvTypeInspect:
|
||||
return invtype::InvTypeInspectSize;
|
||||
case invtype::InvTypeViewMODPC:
|
||||
return invtype::InvTypeViewMODPCSize;
|
||||
case invtype::InvTypeViewMODBank:
|
||||
return invtype::InvTypeViewMODBankSize;
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
return invtype::InvTypeViewMODSharedBankSize;
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
return invtype::InvTypeViewMODLimboSize;
|
||||
case invtype::InvTypeAltStorage:
|
||||
return invtype::InvTypeAltStorageSize;
|
||||
case invtype::InvTypeArchived:
|
||||
return invtype::InvTypeArchivedSize;
|
||||
case invtype::InvTypeOther:
|
||||
return invtype::InvTypeOtherSize;
|
||||
case invtype::typePossessions:
|
||||
return invtype::POSSESSIONS_SIZE;
|
||||
case invtype::typeBank:
|
||||
return invtype::BANK_SIZE;
|
||||
case invtype::typeSharedBank:
|
||||
return invtype::SHARED_BANK_SIZE;
|
||||
case invtype::typeTrade:
|
||||
return invtype::TRADE_SIZE;
|
||||
case invtype::typeWorld:
|
||||
return invtype::WORLD_SIZE;
|
||||
case invtype::typeLimbo:
|
||||
return invtype::LIMBO_SIZE;
|
||||
case invtype::typeTribute:
|
||||
return invtype::TRIBUTE_SIZE;
|
||||
case invtype::typeGuildTribute:
|
||||
return invtype::GUILD_TRIBUTE_SIZE;
|
||||
case invtype::typeMerchant:
|
||||
return invtype::MERCHANT_SIZE;
|
||||
case invtype::typeCorpse:
|
||||
return invtype::CORPSE_SIZE;
|
||||
case invtype::typeBazaar:
|
||||
return invtype::BAZAAR_SIZE;
|
||||
case invtype::typeInspect:
|
||||
return invtype::INSPECT_SIZE;
|
||||
case invtype::typeViewMODPC:
|
||||
return invtype::VIEW_MOD_PC_SIZE;
|
||||
case invtype::typeViewMODBank:
|
||||
return invtype::VIEW_MOD_BANK_SIZE;
|
||||
case invtype::typeViewMODSharedBank:
|
||||
return invtype::VIEW_MOD_SHARED_BANK_SIZE;
|
||||
case invtype::typeViewMODLimbo:
|
||||
return invtype::VIEW_MOD_LIMBO_SIZE;
|
||||
case invtype::typeAltStorage:
|
||||
return invtype::ALT_STORAGE_SIZE;
|
||||
case invtype::typeArchived:
|
||||
return invtype::ARCHIVED_SIZE;
|
||||
case invtype::typeOther:
|
||||
return invtype::OTHER_SIZE;
|
||||
default:
|
||||
return 0;
|
||||
return INULL;
|
||||
}
|
||||
}
|
||||
|
||||
const char* UF::invtype::GetInvTypeName(int inv_type)
|
||||
const char* UF::invtype::GetInvTypeName(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypeInvalid:
|
||||
case invtype::TYPE_INVALID:
|
||||
return "Invalid Type";
|
||||
case invtype::InvTypePossessions:
|
||||
case invtype::typePossessions:
|
||||
return "Possessions";
|
||||
case invtype::InvTypeBank:
|
||||
case invtype::typeBank:
|
||||
return "Bank";
|
||||
case invtype::InvTypeSharedBank:
|
||||
case invtype::typeSharedBank:
|
||||
return "Shared Bank";
|
||||
case invtype::InvTypeTrade:
|
||||
case invtype::typeTrade:
|
||||
return "Trade";
|
||||
case invtype::InvTypeWorld:
|
||||
case invtype::typeWorld:
|
||||
return "World";
|
||||
case invtype::InvTypeLimbo:
|
||||
case invtype::typeLimbo:
|
||||
return "Limbo";
|
||||
case invtype::InvTypeTribute:
|
||||
case invtype::typeTribute:
|
||||
return "Tribute";
|
||||
case invtype::InvTypeGuildTribute:
|
||||
case invtype::typeGuildTribute:
|
||||
return "Guild Tribute";
|
||||
case invtype::InvTypeMerchant:
|
||||
case invtype::typeMerchant:
|
||||
return "Merchant";
|
||||
case invtype::InvTypeCorpse:
|
||||
case invtype::typeCorpse:
|
||||
return "Corpse";
|
||||
case invtype::InvTypeBazaar:
|
||||
case invtype::typeBazaar:
|
||||
return "Bazaar";
|
||||
case invtype::InvTypeInspect:
|
||||
case invtype::typeInspect:
|
||||
return "Inspect";
|
||||
case invtype::InvTypeViewMODPC:
|
||||
case invtype::typeViewMODPC:
|
||||
return "View MOD PC";
|
||||
case invtype::InvTypeViewMODBank:
|
||||
case invtype::typeViewMODBank:
|
||||
return "View MOD Bank";
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
case invtype::typeViewMODSharedBank:
|
||||
return "View MOD Shared Bank";
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
case invtype::typeViewMODLimbo:
|
||||
return "View MOD Limbo";
|
||||
case invtype::InvTypeAltStorage:
|
||||
case invtype::typeAltStorage:
|
||||
return "Alt Storage";
|
||||
case invtype::InvTypeArchived:
|
||||
case invtype::typeArchived:
|
||||
return "Archived";
|
||||
case invtype::InvTypeOther:
|
||||
case invtype::typeOther:
|
||||
return "Other";
|
||||
default:
|
||||
return "Unknown Type";
|
||||
}
|
||||
}
|
||||
|
||||
bool UF::invtype::IsInvTypePersistent(int inv_type)
|
||||
bool UF::invtype::IsInvTypePersistent(int16 inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypePossessions:
|
||||
case invtype::InvTypeBank:
|
||||
case invtype::InvTypeSharedBank:
|
||||
case invtype::InvTypeTrade:
|
||||
case invtype::InvTypeWorld:
|
||||
case invtype::InvTypeLimbo:
|
||||
case invtype::InvTypeTribute:
|
||||
case invtype::InvTypeGuildTribute:
|
||||
case invtype::typePossessions:
|
||||
case invtype::typeBank:
|
||||
case invtype::typeSharedBank:
|
||||
case invtype::typeTrade:
|
||||
case invtype::typeWorld:
|
||||
case invtype::typeLimbo:
|
||||
case invtype::typeTribute:
|
||||
case invtype::typeGuildTribute:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
const char* UF::invslot::GetInvPossessionsSlotName(int inv_slot)
|
||||
const char* UF::invslot::GetInvPossessionsSlotName(int16 inv_slot)
|
||||
{
|
||||
switch (inv_slot) {
|
||||
case invslot::InvSlotInvalid:
|
||||
case invslot::SLOT_INVALID:
|
||||
return "Invalid Slot";
|
||||
case invslot::PossessionsCharm:
|
||||
case invslot::slotCharm:
|
||||
return "Charm";
|
||||
case invslot::PossessionsEar1:
|
||||
case invslot::slotEar1:
|
||||
return "Ear 1";
|
||||
case invslot::PossessionsHead:
|
||||
case invslot::slotHead:
|
||||
return "Head";
|
||||
case invslot::PossessionsFace:
|
||||
case invslot::slotFace:
|
||||
return "Face";
|
||||
case invslot::PossessionsEar2:
|
||||
case invslot::slotEar2:
|
||||
return "Ear 2";
|
||||
case invslot::PossessionsNeck:
|
||||
case invslot::slotNeck:
|
||||
return "Neck";
|
||||
case invslot::PossessionsShoulders:
|
||||
case invslot::slotShoulders:
|
||||
return "Shoulders";
|
||||
case invslot::PossessionsArms:
|
||||
case invslot::slotArms:
|
||||
return "Arms";
|
||||
case invslot::PossessionsBack:
|
||||
case invslot::slotBack:
|
||||
return "Back";
|
||||
case invslot::PossessionsWrist1:
|
||||
case invslot::slotWrist1:
|
||||
return "Wrist 1";
|
||||
case invslot::PossessionsWrist2:
|
||||
case invslot::slotWrist2:
|
||||
return "Wrist 2";
|
||||
case invslot::PossessionsRange:
|
||||
case invslot::slotRange:
|
||||
return "Range";
|
||||
case invslot::PossessionsHands:
|
||||
case invslot::slotHands:
|
||||
return "Hands";
|
||||
case invslot::PossessionsPrimary:
|
||||
case invslot::slotPrimary:
|
||||
return "Primary";
|
||||
case invslot::PossessionsSecondary:
|
||||
case invslot::slotSecondary:
|
||||
return "Secondary";
|
||||
case invslot::PossessionsFinger1:
|
||||
case invslot::slotFinger1:
|
||||
return "Finger 1";
|
||||
case invslot::PossessionsFinger2:
|
||||
case invslot::slotFinger2:
|
||||
return "Finger 2";
|
||||
case invslot::PossessionsChest:
|
||||
case invslot::slotChest:
|
||||
return "Chest";
|
||||
case invslot::PossessionsLegs:
|
||||
case invslot::slotLegs:
|
||||
return "Legs";
|
||||
case invslot::PossessionsFeet:
|
||||
case invslot::slotFeet:
|
||||
return "Feet";
|
||||
case invslot::PossessionsWaist:
|
||||
case invslot::slotWaist:
|
||||
return "Waist";
|
||||
case invslot::PossessionsPowerSource:
|
||||
case invslot::slotPowerSource:
|
||||
return "Power Source";
|
||||
case invslot::PossessionsAmmo:
|
||||
case invslot::slotAmmo:
|
||||
return "Ammo";
|
||||
case invslot::PossessionsGeneral1:
|
||||
case invslot::slotGeneral1:
|
||||
return "General 1";
|
||||
case invslot::PossessionsGeneral2:
|
||||
case invslot::slotGeneral2:
|
||||
return "General 2";
|
||||
case invslot::PossessionsGeneral3:
|
||||
case invslot::slotGeneral3:
|
||||
return "General 3";
|
||||
case invslot::PossessionsGeneral4:
|
||||
case invslot::slotGeneral4:
|
||||
return "General 4";
|
||||
case invslot::PossessionsGeneral5:
|
||||
case invslot::slotGeneral5:
|
||||
return "General 5";
|
||||
case invslot::PossessionsGeneral6:
|
||||
case invslot::slotGeneral6:
|
||||
return "General 6";
|
||||
case invslot::PossessionsGeneral7:
|
||||
case invslot::slotGeneral7:
|
||||
return "General 7";
|
||||
case invslot::PossessionsGeneral8:
|
||||
case invslot::slotGeneral8:
|
||||
return "General 8";
|
||||
case invslot::PossessionsCursor:
|
||||
case invslot::slotCursor:
|
||||
return "Cursor";
|
||||
default:
|
||||
return "Unknown Slot";
|
||||
}
|
||||
}
|
||||
|
||||
const char* UF::invslot::GetInvCorpseSlotName(int inv_slot)
|
||||
const char* UF::invslot::GetInvCorpseSlotName(int16 inv_slot)
|
||||
{
|
||||
if (!invtype::GetInvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid)
|
||||
if (!invtype::GetInvTypeSize(invtype::typeCorpse) || inv_slot == invslot::SLOT_INVALID)
|
||||
return "Invalid Slot";
|
||||
|
||||
// needs work
|
||||
if ((size_t)(inv_slot + 1) < invslot::CorpseBegin || (size_t)(inv_slot + 1) >= invslot::CorpseEnd)
|
||||
if ((inv_slot + 1) < invslot::CORPSE_BEGIN || (inv_slot + 1) >= invslot::CORPSE_END)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -222,19 +222,19 @@ const char* UF::invslot::GetInvCorpseSlotName(int inv_slot)
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* UF::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||
const char* UF::invslot::GetInvSlotName(int16 inv_type, int16 inv_slot)
|
||||
{
|
||||
if (inv_type == invtype::InvTypePossessions)
|
||||
if (inv_type == invtype::typePossessions)
|
||||
return invslot::GetInvPossessionsSlotName(inv_slot);
|
||||
else if (inv_type == invtype::InvTypeCorpse)
|
||||
else if (inv_type == invtype::typeCorpse)
|
||||
return invslot::GetInvCorpseSlotName(inv_slot);
|
||||
|
||||
size_t type_size = invtype::GetInvTypeSize(inv_type);
|
||||
int16 type_size = invtype::GetInvTypeSize(inv_type);
|
||||
|
||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||
if (!type_size || inv_slot == invslot::SLOT_INVALID)
|
||||
return "Invalid Slot";
|
||||
|
||||
if ((size_t)(inv_slot + 1) >= type_size)
|
||||
if ((inv_slot + 1) >= type_size)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -243,12 +243,12 @@ const char* UF::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* UF::invbag::GetInvBagIndexName(int bag_index)
|
||||
const char* UF::invbag::GetInvBagIndexName(int16 bag_index)
|
||||
{
|
||||
if (bag_index == invbag::InvBagInvalid)
|
||||
if (bag_index == invbag::SLOT_INVALID)
|
||||
return "Invalid Bag";
|
||||
|
||||
if ((size_t)bag_index >= invbag::ItemBagSize)
|
||||
if (bag_index >= invbag::SLOT_COUNT)
|
||||
return "Unknown Bag";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -257,12 +257,12 @@ const char* UF::invbag::GetInvBagIndexName(int bag_index)
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* UF::invaug::GetInvAugIndexName(int aug_index)
|
||||
const char* UF::invaug::GetInvAugIndexName(int16 aug_index)
|
||||
{
|
||||
if (aug_index == invaug::InvAugInvalid)
|
||||
if (aug_index == invaug::SOCKET_INVALID)
|
||||
return "Invalid Augment";
|
||||
|
||||
if ((size_t)aug_index >= invaug::ItemAugSize)
|
||||
if (aug_index >= invaug::SOCKET_COUNT)
|
||||
return "Unknown Augment";
|
||||
|
||||
static std::string ret_str;
|
||||
|
||||
+194
-206
@@ -27,109 +27,219 @@
|
||||
|
||||
namespace UF
|
||||
{
|
||||
enum : int { Invalid = -1, Null, Safety };
|
||||
const int16 IINVALID = -1;
|
||||
const int16 INULL = 0;
|
||||
|
||||
enum : bool { False = false, True = true };
|
||||
|
||||
// pre-declarations
|
||||
namespace inventory {
|
||||
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
const bool ConcatenateInvTypeLimbo = true;
|
||||
|
||||
const bool AllowOverLevelEquipment = true;
|
||||
|
||||
const bool AllowEmptyBagInBag = false;
|
||||
const bool AllowClickCastFromBag = false;
|
||||
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||
namespace enum_ {
|
||||
enum InventoryTypes : int16 {
|
||||
typePossessions = INULL,
|
||||
typeBank,
|
||||
typeSharedBank,
|
||||
typeTrade,
|
||||
typeWorld,
|
||||
typeLimbo,
|
||||
typeTribute,
|
||||
typeGuildTribute,
|
||||
typeMerchant,
|
||||
typeCorpse,
|
||||
typeBazaar,
|
||||
typeInspect,
|
||||
typeViewMODPC,
|
||||
typeViewMODBank,
|
||||
typeViewMODSharedBank,
|
||||
typeViewMODLimbo,
|
||||
typeAltStorage,
|
||||
typeArchived,
|
||||
typeOther
|
||||
};
|
||||
|
||||
enum InventoryType : int {
|
||||
InvTypePossessions = InvTypeBegin,
|
||||
InvTypeBank,
|
||||
InvTypeSharedBank,
|
||||
InvTypeTrade,
|
||||
InvTypeWorld,
|
||||
InvTypeLimbo,
|
||||
InvTypeTribute,
|
||||
InvTypeGuildTribute,
|
||||
InvTypeMerchant,
|
||||
InvTypeCorpse,
|
||||
InvTypeBazaar,
|
||||
InvTypeInspect,
|
||||
InvTypeViewMODPC,
|
||||
InvTypeViewMODBank,
|
||||
InvTypeViewMODSharedBank,
|
||||
InvTypeViewMODLimbo,
|
||||
InvTypeAltStorage,
|
||||
InvTypeArchived,
|
||||
InvTypeOther,
|
||||
InvTypeCount
|
||||
};
|
||||
} // namespace enum_
|
||||
using namespace enum_;
|
||||
|
||||
const int16 POSSESSIONS_SIZE = 32;
|
||||
const int16 BANK_SIZE = 24;
|
||||
const int16 SHARED_BANK_SIZE = 2;
|
||||
const int16 TRADE_SIZE = 8;
|
||||
const int16 WORLD_SIZE = 10;
|
||||
const int16 LIMBO_SIZE = 36;
|
||||
const int16 TRIBUTE_SIZE = 5;
|
||||
const int16 GUILD_TRIBUTE_SIZE = 2;
|
||||
const int16 MERCHANT_SIZE = 80;
|
||||
const int16 CORPSE_SIZE = POSSESSIONS_SIZE;
|
||||
const int16 BAZAAR_SIZE = 80;
|
||||
const int16 INSPECT_SIZE = 23;
|
||||
const int16 VIEW_MOD_PC_SIZE = POSSESSIONS_SIZE;
|
||||
const int16 VIEW_MOD_BANK_SIZE = BANK_SIZE;
|
||||
const int16 VIEW_MOD_SHARED_BANK_SIZE = SHARED_BANK_SIZE;
|
||||
const int16 VIEW_MOD_LIMBO_SIZE = LIMBO_SIZE;
|
||||
const int16 ALT_STORAGE_SIZE = 0;//unknown - "Shroud Bank"
|
||||
const int16 ARCHIVED_SIZE = 0;//unknown
|
||||
const int16 OTHER_SIZE = 0;//unknown
|
||||
|
||||
const int16 TRADE_NPC_SIZE = 4; // defined by implication
|
||||
|
||||
const int16 TYPE_INVALID = IINVALID;
|
||||
const int16 TYPE_BEGIN = typePossessions;
|
||||
const int16 TYPE_END = typeOther;
|
||||
const int16 TYPE_COUNT = (TYPE_END - TYPE_BEGIN) + 1;
|
||||
|
||||
int16 GetInvTypeSize(int16 inv_type);
|
||||
const char* GetInvTypeName(int16 inv_type);
|
||||
|
||||
bool IsInvTypePersistent(int16 inv_type);
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||
namespace enum_ {
|
||||
enum InventorySlots : int16 {
|
||||
slotCharm = INULL,
|
||||
slotEar1,
|
||||
slotHead,
|
||||
slotFace,
|
||||
slotEar2,
|
||||
slotNeck,
|
||||
slotShoulders,
|
||||
slotArms,
|
||||
slotBack,
|
||||
slotWrist1,
|
||||
slotWrist2,
|
||||
slotRange,
|
||||
slotHands,
|
||||
slotPrimary,
|
||||
slotSecondary,
|
||||
slotFinger1,
|
||||
slotFinger2,
|
||||
slotChest,
|
||||
slotLegs,
|
||||
slotFeet,
|
||||
slotWaist,
|
||||
slotPowerSource,
|
||||
slotAmmo,
|
||||
slotGeneral1,
|
||||
slotGeneral2,
|
||||
slotGeneral3,
|
||||
slotGeneral4,
|
||||
slotGeneral5,
|
||||
slotGeneral6,
|
||||
slotGeneral7,
|
||||
slotGeneral8,
|
||||
slotCursor
|
||||
};
|
||||
|
||||
enum PossessionsSlot : int {
|
||||
PossessionsCharm = InvSlotBegin,
|
||||
PossessionsEar1,
|
||||
PossessionsHead,
|
||||
PossessionsFace,
|
||||
PossessionsEar2,
|
||||
PossessionsNeck,
|
||||
PossessionsShoulders,
|
||||
PossessionsArms,
|
||||
PossessionsBack,
|
||||
PossessionsWrist1,
|
||||
PossessionsWrist2,
|
||||
PossessionsRange,
|
||||
PossessionsHands,
|
||||
PossessionsPrimary,
|
||||
PossessionsSecondary,
|
||||
PossessionsFinger1,
|
||||
PossessionsFinger2,
|
||||
PossessionsChest,
|
||||
PossessionsLegs,
|
||||
PossessionsFeet,
|
||||
PossessionsWaist,
|
||||
PossessionsPowerSource,
|
||||
PossessionsAmmo,
|
||||
PossessionsGeneral1,
|
||||
PossessionsGeneral2,
|
||||
PossessionsGeneral3,
|
||||
PossessionsGeneral4,
|
||||
PossessionsGeneral5,
|
||||
PossessionsGeneral6,
|
||||
PossessionsGeneral7,
|
||||
PossessionsGeneral8,
|
||||
PossessionsCursor,
|
||||
PossessionsCount
|
||||
};
|
||||
} // namespace enum_
|
||||
using namespace enum_;
|
||||
|
||||
const int EquipmentBegin = PossessionsCharm;
|
||||
const int EquipmentEnd = PossessionsAmmo;
|
||||
const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1);
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
|
||||
const int GeneralBegin = PossessionsGeneral1;
|
||||
const int GeneralEnd = PossessionsGeneral8;
|
||||
const int GeneralCount = (GeneralEnd - GeneralBegin + 1);
|
||||
const int16 POSSESSIONS_BEGIN = slotCharm;
|
||||
const int16 POSSESSIONS_END = slotCursor;
|
||||
const int16 POSSESSIONS_COUNT = (POSSESSIONS_END - POSSESSIONS_BEGIN) + 1;
|
||||
|
||||
const int16 EQUIPMENT_BEGIN = slotCharm;
|
||||
const int16 EQUIPMENT_END = slotAmmo;
|
||||
const int16 EQUIPMENT_COUNT = (EQUIPMENT_END - EQUIPMENT_BEGIN + 1);
|
||||
|
||||
const int16 GENERAL_BEGIN = slotGeneral1;
|
||||
const int16 GENERAL_END = slotGeneral8;
|
||||
const int16 GENERAL_COUNT = (GENERAL_END - GENERAL_BEGIN + 1);
|
||||
|
||||
const int16 BONUS_BEGIN = invslot::slotCharm;
|
||||
const int16 BONUS_STAT_END = invslot::slotPowerSource;
|
||||
const int16 BONUS_SKILL_END = invslot::slotAmmo;
|
||||
|
||||
const int16 BANK_BEGIN = 2000;
|
||||
const int16 BANK_END = (BANK_BEGIN + invtype::BANK_SIZE) - 1;
|
||||
|
||||
const int16 SHARED_BANK_BEGIN = 2500;
|
||||
const int16 SHARED_BANK_END = (SHARED_BANK_BEGIN + invtype::SHARED_BANK_SIZE) - 1;
|
||||
|
||||
const int16 TRADE_BEGIN = 3000;
|
||||
const int16 TRADE_END = (TRADE_BEGIN + invtype::TRADE_SIZE) - 1;
|
||||
|
||||
const int16 TRADE_NPC_END = (TRADE_BEGIN + invtype::TRADE_NPC_SIZE) - 1; // defined by implication
|
||||
|
||||
const int16 WORLD_BEGIN = 4000;
|
||||
const int16 WORLD_END = (WORLD_BEGIN + invtype::WORLD_SIZE) - 1;
|
||||
|
||||
const int16 TRIBUTE_BEGIN = 400;
|
||||
const int16 TRIBUTE_END = (TRIBUTE_BEGIN + invtype::TRIBUTE_SIZE) - 1;
|
||||
|
||||
const int16 GUILD_TRIBUTE_BEGIN = 450;
|
||||
const int16 GUILD_TRIBUTE_END = (GUILD_TRIBUTE_BEGIN + invtype::GUILD_TRIBUTE_SIZE) - 1;
|
||||
|
||||
const int16 CORPSE_BEGIN = invslot::slotGeneral1;
|
||||
const int16 CORPSE_END = invslot::slotGeneral1 + invslot::slotCursor;
|
||||
|
||||
const uint64 POSSESSIONS_BITMASK = 0x000000027FFFFFFF; // based on 34-slot count (RoF+)
|
||||
const uint64 CORPSE_BITMASK = 0x01FFFFFE7F800000; // based on 34-slot count (RoF+)
|
||||
|
||||
const char* GetInvPossessionsSlotName(int16 inv_slot);
|
||||
const char* GetInvCorpseSlotName(int16 inv_slot);
|
||||
const char* GetInvSlotName(int16 inv_type, int16 inv_slot);
|
||||
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||
const int16 SLOT_INVALID = IINVALID;
|
||||
const int16 SLOT_BEGIN = INULL;
|
||||
const int16 SLOT_END = 9;
|
||||
const int16 SLOT_COUNT = 10;
|
||||
|
||||
const int16 GENERAL_BAGS_BEGIN = 262;
|
||||
const int16 GENERAL_BAGS_COUNT = invslot::GENERAL_COUNT * SLOT_COUNT;
|
||||
const int16 GENERAL_BAGS_END = (GENERAL_BAGS_BEGIN + GENERAL_BAGS_COUNT) - 1;
|
||||
|
||||
const int16 CURSOR_BAG_BEGIN = 342;
|
||||
const int16 CURSOR_BAG_COUNT = SLOT_COUNT;
|
||||
const int16 CURSOR_BAG_END = (CURSOR_BAG_BEGIN + CURSOR_BAG_COUNT) - 1;
|
||||
|
||||
const int16 BANK_BAGS_BEGIN = 2032;
|
||||
const int16 BANK_BAGS_COUNT = (invtype::BANK_SIZE * SLOT_COUNT);
|
||||
const int16 BANK_BAGS_END = (BANK_BAGS_BEGIN + BANK_BAGS_COUNT) - 1;
|
||||
|
||||
const int16 SHARED_BANK_BAGS_BEGIN = 2532;
|
||||
const int16 SHARED_BANK_BAGS_COUNT = invtype::SHARED_BANK_SIZE * SLOT_COUNT;
|
||||
const int16 SHARED_BANK_BAGS_END = (SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_COUNT) - 1;
|
||||
|
||||
const int16 TRADE_BAGS_BEGIN = 3031;
|
||||
const int16 TRADE_BAGS_COUNT = invtype::TRADE_SIZE * SLOT_COUNT;
|
||||
const int16 TRADE_BAGS_END = (TRADE_BAGS_BEGIN + TRADE_BAGS_COUNT) - 1;
|
||||
|
||||
const char* GetInvBagIndexName(int16 bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||
const int16 SOCKET_INVALID = IINVALID;
|
||||
const int16 SOCKET_BEGIN = INULL;
|
||||
const int16 SOCKET_END = 4;
|
||||
const int16 SOCKET_COUNT = 5;
|
||||
|
||||
const char* GetInvAugIndexName(int16 aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
@@ -154,147 +264,21 @@ namespace UF
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
|
||||
const int16 POTION_BELT_SIZE = 5;
|
||||
|
||||
const int16 SKILL_ARRAY_SIZE = 100;
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
} /*constants*/
|
||||
const size_t CHARACTER_CREATION_LIMIT = 12;
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
} /*skills*/
|
||||
|
||||
|
||||
// declarations
|
||||
namespace inventory {
|
||||
const bool ConcatenateInvTypeLimbo = true;
|
||||
|
||||
const bool AllowOverLevelEquipment = true;
|
||||
|
||||
const bool AllowEmptyBagInBag = false;
|
||||
const bool AllowClickCastFromBag = false;
|
||||
|
||||
} /*inventory*/
|
||||
|
||||
namespace invtype {
|
||||
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
||||
const size_t InvTypeBankSize = 24;
|
||||
const size_t InvTypeSharedBankSize = 2;
|
||||
const size_t InvTypeTradeSize = 8;
|
||||
const size_t InvTypeWorldSize = 10;
|
||||
const size_t InvTypeLimboSize = 36;
|
||||
const size_t InvTypeTributeSize = 5;
|
||||
const size_t InvTypeGuildTributeSize = 2;
|
||||
const size_t InvTypeMerchantSize = 80;
|
||||
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
||||
const size_t InvTypeBazaarSize = 80;
|
||||
const size_t InvTypeInspectSize = invslot::EquipmentCount;
|
||||
const size_t InvTypeViewMODPCSize = InvTypePossessionsSize;
|
||||
const size_t InvTypeViewMODBankSize = InvTypeBankSize;
|
||||
const size_t InvTypeViewMODSharedBankSize = InvTypeSharedBankSize;
|
||||
const size_t InvTypeViewMODLimboSize = InvTypeLimboSize;
|
||||
const size_t InvTypeAltStorageSize = 0;//unknown - "Shroud Bank"
|
||||
const size_t InvTypeArchivedSize = 0;//unknown
|
||||
const size_t InvTypeOtherSize = 0;//unknown
|
||||
|
||||
extern size_t GetInvTypeSize(int inv_type);
|
||||
extern const char* GetInvTypeName(int inv_type);
|
||||
|
||||
extern bool IsInvTypePersistent(int inv_type);
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
const int BankBegin = 2000;
|
||||
const int BankEnd = (BankBegin + invtype::InvTypeBankSize) - 1;
|
||||
|
||||
const int SharedBankBegin = 2500;
|
||||
const int SharedBankEnd = (SharedBankBegin + invtype::InvTypeSharedBankSize) - 1;
|
||||
|
||||
const int TradeBegin = 3000;
|
||||
const int TradeEnd = (TradeBegin + invtype::InvTypeTradeSize) - 1;
|
||||
const int TradeNPCEnd = 3003;
|
||||
|
||||
const int WorldBegin = 4000;
|
||||
const int WorldEnd = (WorldBegin + invtype::InvTypeWorldSize) - 1;
|
||||
|
||||
const int TributeBegin = 400;
|
||||
const int TributeEnd = (TributeBegin + invtype::InvTypeTributeSize) - 1;
|
||||
|
||||
const int GuildTributeBegin = 450;
|
||||
const int GuildTributeEnd = (GuildTributeBegin + invtype::InvTypeGuildTributeSize) - 1;
|
||||
|
||||
const int CorpseBegin = invslot::PossessionsGeneral1;
|
||||
const int CorpseEnd = invslot::PossessionsGeneral1 + invslot::PossessionsCursor;
|
||||
|
||||
extern const char* GetInvPossessionsSlotName(int inv_slot);
|
||||
extern const char* GetInvCorpseSlotName(int inv_slot);
|
||||
extern const char* GetInvSlotName(int inv_type, int inv_slot);
|
||||
|
||||
} /*invslot*/
|
||||
|
||||
namespace invbag {
|
||||
const size_t ItemBagSize = 10;
|
||||
|
||||
const int GeneralBagsBegin = 262;
|
||||
const int GeneralBagsSize = invslot::GeneralCount * ItemBagSize;
|
||||
const int GeneralBagsEnd = (GeneralBagsBegin + GeneralBagsSize) - 1;
|
||||
|
||||
const int CursorBagBegin = 342;
|
||||
const int CursorBagSize = ItemBagSize;
|
||||
const int CursorBagEnd = (CursorBagBegin + CursorBagSize) - 1;
|
||||
|
||||
const int BankBagsBegin = 2032;
|
||||
const int BankBagsSize = (invtype::InvTypeBankSize * ItemBagSize);
|
||||
const int BankBagsEnd = (BankBagsBegin + BankBagsSize) - 1;
|
||||
|
||||
const int SharedBankBagsBegin = 2532;
|
||||
const int SharedBankBagsSize = invtype::InvTypeSharedBankSize * ItemBagSize;
|
||||
const int SharedBankBagsEnd = (SharedBankBagsBegin + SharedBankBagsSize) - 1;
|
||||
|
||||
const int TradeBagsBegin = 3031;
|
||||
const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize;
|
||||
const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1;
|
||||
|
||||
extern const char* GetInvBagIndexName(int bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
const size_t ItemAugSize = 5;
|
||||
|
||||
extern const char* GetInvAugIndexName(int aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||
const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize;
|
||||
|
||||
const size_t BandoliersSize = 20; // number of bandolier instances
|
||||
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
||||
|
||||
const size_t PotionBeltSize = 5;
|
||||
|
||||
const size_t SkillArraySize = 100;
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
const size_t CharacterCreationLimit = 12;
|
||||
|
||||
const size_t SayLinkBodySize = 50;
|
||||
const size_t SAY_LINK_BODY_SIZE = 50;
|
||||
|
||||
const int LongBuffs = 30;
|
||||
const int ShortBuffs = 20;
|
||||
@@ -307,11 +291,15 @@ namespace UF
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
const bool CoinHasWeight = false;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
@@ -746,7 +746,7 @@ struct BandolierItem_Struct
|
||||
struct Bandolier_Struct
|
||||
{
|
||||
char Name[32];
|
||||
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||
BandolierItem_Struct Items[profile::BANDOLIER_ITEM_COUNT];
|
||||
};
|
||||
|
||||
//len = 72
|
||||
@@ -760,7 +760,7 @@ struct PotionBeltItem_Struct
|
||||
//len = 288
|
||||
struct PotionBelt_Struct
|
||||
{
|
||||
PotionBeltItem_Struct Items[profile::PotionBeltSize];
|
||||
PotionBeltItem_Struct Items[profile::POTION_BELT_SIZE];
|
||||
};
|
||||
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
@@ -969,7 +969,7 @@ struct PlayerProfile_Struct
|
||||
/*11236*/ uint32 aapoints_spent; // Number of spent AA points
|
||||
/*11240*/ uint32 aapoints; // Unspent AA points
|
||||
/*11244*/ uint8 unknown11244[4];
|
||||
/*11248*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [6400] bandolier contents
|
||||
/*11248*/ Bandolier_Struct bandoliers[profile::BANDOLIERS_SIZE]; // [6400] bandolier contents
|
||||
/*17648*/ PotionBelt_Struct potionbelt; // [360] potion belt 72 extra octets by adding 1 more belt slot
|
||||
/*18008*/ uint8 unknown18008[8];
|
||||
/*18016*/ uint32 available_slots;
|
||||
|
||||
Reference in New Issue
Block a user