mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 00:46:46 +00:00
Renamed and moved SkillUseTypes enumeration to EQEmu::skills::SkillType; eq_dictionary work
This commit is contained in:
+37
-37
@@ -2346,12 +2346,12 @@ namespace RoF
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
outapp->WriteUInt32(consts::BANDOLIERS_SIZE);
|
||||
outapp->WriteUInt32(profile::BandoliersSize);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (uint32 r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (uint32 r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) {
|
||||
outapp->WriteString(emu->bandoliers[r].Name);
|
||||
for (uint32 j = 0; j < consts::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 j = 0; j < profile::BandolierItemCount; ++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) {
|
||||
@@ -2364,19 +2364,19 @@ namespace RoF
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (uint32 r = EQEmu::legacy::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (uint32 r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) {
|
||||
outapp->WriteString("");
|
||||
for (uint32 j = 0; j < consts::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 j = 0; j < profile::BandolierItemCount; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString("");
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteSInt32(-1);
|
||||
}
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(consts::POTION_BELT_ITEM_COUNT);
|
||||
outapp->WriteUInt32(profile::PotionBeltSize);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (uint32 r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (uint32 r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++r) {
|
||||
outapp->WriteString(emu->potionbelt.Items[r].Name);
|
||||
outapp->WriteUInt32(emu->potionbelt.Items[r].ID);
|
||||
if (emu->potionbelt.Items[r].Icon) {
|
||||
@@ -2388,7 +2388,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 < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (uint32 r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) {
|
||||
outapp->WriteString("");
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteSInt32(-1);
|
||||
@@ -3002,7 +3002,7 @@ namespace RoF
|
||||
|
||||
size_t names_length = 0;
|
||||
size_t character_count = 0;
|
||||
for (; character_count < emu->CharCount && character_count < consts::CHARACTER_CREATION_LIMIT; ++character_count) {
|
||||
for (; character_count < emu->CharCount && character_count < constants::SayLinkBodySize; ++character_count) {
|
||||
emu_cse = (CharacterSelectEntry_Struct *)emu_ptr;
|
||||
names_length += strlen(emu_cse->Name);
|
||||
emu_ptr += sizeof(CharacterSelectEntry_Struct);
|
||||
@@ -5214,7 +5214,7 @@ namespace RoF
|
||||
|
||||
structs::InventorySlot_Struct slot_id = ServerToRoFSlot(slot_id_in);
|
||||
|
||||
hdr.slot_type = (inst->GetMerchantSlot() ? inventory::TypeMerchant : slot_id.Type);
|
||||
hdr.slot_type = (inst->GetMerchantSlot() ? invtype::InvTypeMerchant : 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);
|
||||
@@ -5402,7 +5402,7 @@ namespace RoF
|
||||
isbs.augdistiller = 65535;
|
||||
isbs.augrestrict = item->AugRestrict;
|
||||
|
||||
for (int index = 0; index < consts::ITEM_COMMON_SIZE; ++index) {
|
||||
for (int index = 0; index < invaug::ItemAugSize; ++index) {
|
||||
isbs.augslots[index].type = item->AugSlotType[index];
|
||||
isbs.augslots[index].visible = item->AugSlotVisible[index];
|
||||
isbs.augslots[index].unknown = item->AugSlotUnk2[index];
|
||||
@@ -5650,11 +5650,11 @@ namespace RoF
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // Main Inventory and Cursor
|
||||
RoFSlot.Type = inventory::TypePossessions;
|
||||
RoFSlot.Type = invtype::InvTypePossessions;
|
||||
RoFSlot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
RoFSlot.Slot = inventory::SlotPowerSource;
|
||||
RoFSlot.Slot = invslot::PossessionsPowerSource;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoFSlot.Slot += 3;
|
||||
@@ -5669,22 +5669,22 @@ namespace RoF
|
||||
}*/
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
RoFSlot.Type = inventory::TypePossessions;
|
||||
RoFSlot.Type = invtype::InvTypePossessions;
|
||||
TempSlot = serverSlot - 1;
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
|
||||
if (RoFSlot.Slot >= inventory::SlotGeneral9) // (> 30)
|
||||
RoFSlot.Slot = inventory::SlotCursor;
|
||||
if (RoFSlot.Slot >= invslot::PossessionsGeneral9) // (> 30)
|
||||
RoFSlot.Slot = invslot::PossessionsCursor;
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::TRIBUTE_BEGIN && serverSlot <= EQEmu::legacy::TRIBUTE_END) { // Tribute
|
||||
RoFSlot.Type = inventory::TypeTribute;
|
||||
RoFSlot.Type = invtype::InvTypeTribute;
|
||||
RoFSlot.Slot = serverSlot - EQEmu::legacy::TRIBUTE_BEGIN;
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END) {
|
||||
RoFSlot.Type = inventory::TypeBank;
|
||||
RoFSlot.Type = invtype::InvTypeBank;
|
||||
TempSlot = serverSlot - EQEmu::legacy::BANK_BEGIN;
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
@@ -5695,7 +5695,7 @@ namespace RoF
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END) {
|
||||
RoFSlot.Type = inventory::TypeSharedBank;
|
||||
RoFSlot.Type = invtype::InvTypeSharedBank;
|
||||
TempSlot = serverSlot - EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
@@ -5706,7 +5706,7 @@ namespace RoF
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::TRADE_BEGIN && serverSlot <= EQEmu::legacy::TRADE_BAGS_END) {
|
||||
RoFSlot.Type = inventory::TypeTrade;
|
||||
RoFSlot.Type = invtype::InvTypeTrade;
|
||||
TempSlot = serverSlot - EQEmu::legacy::TRADE_BEGIN;
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
@@ -5730,7 +5730,7 @@ namespace RoF
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::WORLD_BEGIN && serverSlot <= EQEmu::legacy::WORLD_END) {
|
||||
RoFSlot.Type = inventory::TypeWorld;
|
||||
RoFSlot.Type = invtype::InvTypeWorld;
|
||||
TempSlot = serverSlot - EQEmu::legacy::WORLD_BEGIN;
|
||||
RoFSlot.Slot = TempSlot;
|
||||
}
|
||||
@@ -5754,7 +5754,7 @@ namespace RoF
|
||||
RoFSlot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
RoFSlot.Slot = inventory::SlotPowerSource;
|
||||
RoFSlot.Slot = invslot::PossessionsPowerSource;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoFSlot.Slot += 3;
|
||||
@@ -5791,11 +5791,11 @@ namespace RoF
|
||||
uint32 ServerSlot = INVALID_INDEX;
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (rofSlot.Type == inventory::TypePossessions && rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||
if (rofSlot.Slot == inventory::SlotPowerSource)
|
||||
if (rofSlot.Type == invtype::InvTypePossessions && rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||
if (rofSlot.Slot == invslot::PossessionsPowerSource)
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
|
||||
else if (rofSlot.Slot >= inventory::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (rofSlot.Slot >= invslot::PossessionsCursor) // 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
|
||||
@@ -5809,7 +5809,7 @@ 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 >= inventory::SlotAmmo) // Ammo and Main Inventory
|
||||
else if (rofSlot.Slot >= invslot::PossessionsAmmo) // Ammo and Main Inventory
|
||||
TempSlot = rofSlot.Slot - 1;
|
||||
|
||||
else // Worn Slots
|
||||
@@ -5821,7 +5821,7 @@ namespace RoF
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rofSlot.Type == inventory::TypeBank) {
|
||||
else if (rofSlot.Type == invtype::InvTypeBank) {
|
||||
TempSlot = EQEmu::legacy::BANK_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
@@ -5833,7 +5833,7 @@ namespace RoF
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rofSlot.Type == inventory::TypeSharedBank) {
|
||||
else if (rofSlot.Type == invtype::InvTypeSharedBank) {
|
||||
TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
@@ -5845,7 +5845,7 @@ namespace RoF
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rofSlot.Type == inventory::TypeTrade) {
|
||||
else if (rofSlot.Type == invtype::InvTypeTrade) {
|
||||
TempSlot = EQEmu::legacy::TRADE_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
@@ -5859,7 +5859,7 @@ namespace RoF
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rofSlot.Type == inventory::TypeWorld) {
|
||||
else if (rofSlot.Type == invtype::InvTypeWorld) {
|
||||
TempSlot = EQEmu::legacy::WORLD_BEGIN;
|
||||
|
||||
if (rofSlot.Slot >= SUB_INDEX_BEGIN)
|
||||
@@ -5877,7 +5877,7 @@ namespace RoF
|
||||
ServerSlot = TempSlot;
|
||||
}*/
|
||||
|
||||
else if (rofSlot.Type == inventory::TypeGuildTribute) {
|
||||
else if (rofSlot.Type == invtype::InvTypeGuildTribute) {
|
||||
ServerSlot = INVALID_INDEX;
|
||||
}
|
||||
|
||||
@@ -5892,10 +5892,10 @@ namespace RoF
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
||||
if (rofSlot.Slot == inventory::SlotPowerSource)
|
||||
if (rofSlot.Slot == invslot::PossessionsPowerSource)
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
|
||||
else if (rofSlot.Slot >= inventory::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (rofSlot.Slot >= invslot::PossessionsCursor) // 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
|
||||
@@ -5904,7 +5904,7 @@ namespace RoF
|
||||
// Same as above
|
||||
}*/
|
||||
|
||||
else if (rofSlot.Slot >= inventory::SlotAmmo) // Main Inventory and Ammo Slots
|
||||
else if (rofSlot.Slot >= invslot::PossessionsAmmo) // Main Inventory and Ammo Slots
|
||||
TempSlot = rofSlot.Slot - 1;
|
||||
|
||||
else
|
||||
@@ -5928,7 +5928,7 @@ namespace RoF
|
||||
|
||||
static inline void ServerToRoFTextLink(std::string& rofTextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
rofTextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -5967,7 +5967,7 @@ namespace RoF
|
||||
|
||||
static inline void RoFToServerTextLink(std::string& serverTextLink, const std::string& rofTextLink)
|
||||
{
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (rofTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (rofTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = rofTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -5976,7 +5976,7 @@ namespace RoF
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= consts::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
|
||||
+39
-39
@@ -2429,12 +2429,12 @@ namespace RoF2
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
outapp->WriteUInt32(consts::BANDOLIERS_SIZE);
|
||||
outapp->WriteUInt32(profile::BandoliersSize);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (uint32 r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (uint32 r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) {
|
||||
outapp->WriteString(emu->bandoliers[r].Name);
|
||||
for (uint32 j = 0; j < consts::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 j = 0; j < profile::BandolierItemCount; ++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) {
|
||||
@@ -2447,19 +2447,19 @@ namespace RoF2
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (uint32 r = EQEmu::legacy::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (uint32 r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) {
|
||||
outapp->WriteString("");
|
||||
for (uint32 j = 0; j < consts::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 j = 0; j < profile::BandolierItemCount; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString("");
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteSInt32(-1);
|
||||
}
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(consts::POTION_BELT_ITEM_COUNT);
|
||||
outapp->WriteUInt32(profile::PotionBeltSize);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (uint32 r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (uint32 r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++r) {
|
||||
outapp->WriteString(emu->potionbelt.Items[r].Name);
|
||||
outapp->WriteUInt32(emu->potionbelt.Items[r].ID);
|
||||
if (emu->potionbelt.Items[r].Icon) {
|
||||
@@ -2471,7 +2471,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 < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (uint32 r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) {
|
||||
outapp->WriteString("");
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteSInt32(-1);
|
||||
@@ -3095,7 +3095,7 @@ namespace RoF2
|
||||
|
||||
size_t names_length = 0;
|
||||
size_t character_count = 0;
|
||||
for (; character_count < emu->CharCount && character_count < consts::CHARACTER_CREATION_LIMIT; ++character_count) {
|
||||
for (; character_count < emu->CharCount && character_count < constants::CharacterCreationLimit; ++character_count) {
|
||||
emu_cse = (CharacterSelectEntry_Struct *)emu_ptr;
|
||||
names_length += strlen(emu_cse->Name);
|
||||
emu_ptr += sizeof(CharacterSelectEntry_Struct);
|
||||
@@ -5489,7 +5489,7 @@ namespace RoF2
|
||||
|
||||
structs::InventorySlot_Struct slot_id = ServerToRoF2Slot(slot_id_in, packet_type);
|
||||
|
||||
hdr.slot_type = (inst->GetMerchantSlot() ? inventory::TypeMerchant : slot_id.Type);
|
||||
hdr.slot_type = (inst->GetMerchantSlot() ? invtype::InvTypeMerchant : 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);
|
||||
@@ -5677,7 +5677,7 @@ namespace RoF2
|
||||
isbs.augrestrict2 = -1;
|
||||
isbs.augrestrict = item->AugRestrict;
|
||||
|
||||
for (int index = 0; index < consts::ITEM_COMMON_SIZE; ++index) {
|
||||
for (int index = 0; index < invaug::ItemAugSize; ++index) {
|
||||
isbs.augslots[index].type = item->AugSlotType[index];
|
||||
isbs.augslots[index].visible = item->AugSlotVisible[index];
|
||||
isbs.augslots[index].unknown = item->AugSlotUnk2[index];
|
||||
@@ -5937,17 +5937,17 @@ namespace RoF2
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // Main Inventory and Cursor
|
||||
if (PacketType == ItemPacketLoot)
|
||||
{
|
||||
RoF2Slot.Type = inventory::TypeCorpse;
|
||||
RoF2Slot.Type = invtype::InvTypeCorpse;
|
||||
RoF2Slot.Slot = serverSlot - EQEmu::legacy::CORPSE_BEGIN;
|
||||
}
|
||||
else
|
||||
{
|
||||
RoF2Slot.Type = inventory::TypePossessions;
|
||||
RoF2Slot.Type = invtype::InvTypePossessions;
|
||||
RoF2Slot.Slot = serverSlot;
|
||||
}
|
||||
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
RoF2Slot.Slot = inventory::SlotPowerSource;
|
||||
RoF2Slot.Slot = invslot::PossessionsPowerSource;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory
|
||||
RoF2Slot.Slot += 3;
|
||||
@@ -5962,22 +5962,22 @@ namespace RoF2
|
||||
}*/
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
RoF2Slot.Type = inventory::TypePossessions;
|
||||
RoF2Slot.Type = invtype::InvTypePossessions;
|
||||
TempSlot = serverSlot - 1;
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
|
||||
if (RoF2Slot.Slot >= inventory::SlotGeneral9) // (> 30)
|
||||
RoF2Slot.Slot = inventory::SlotCursor;
|
||||
if (RoF2Slot.Slot >= invslot::PossessionsGeneral9) // (> 30)
|
||||
RoF2Slot.Slot = invslot::PossessionsCursor;
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::TRIBUTE_BEGIN && serverSlot <= EQEmu::legacy::TRIBUTE_END) { // Tribute
|
||||
RoF2Slot.Type = inventory::TypeTribute;
|
||||
RoF2Slot.Type = invtype::InvTypeTribute;
|
||||
RoF2Slot.Slot = serverSlot - EQEmu::legacy::TRIBUTE_BEGIN;
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END) {
|
||||
RoF2Slot.Type = inventory::TypeBank;
|
||||
RoF2Slot.Type = invtype::InvTypeBank;
|
||||
TempSlot = serverSlot - EQEmu::legacy::BANK_BEGIN;
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
@@ -5988,7 +5988,7 @@ namespace RoF2
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END) {
|
||||
RoF2Slot.Type = inventory::TypeSharedBank;
|
||||
RoF2Slot.Type = invtype::InvTypeSharedBank;
|
||||
TempSlot = serverSlot - EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
@@ -5999,7 +5999,7 @@ namespace RoF2
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::TRADE_BEGIN && serverSlot <= EQEmu::legacy::TRADE_BAGS_END) {
|
||||
RoF2Slot.Type = inventory::TypeTrade;
|
||||
RoF2Slot.Type = invtype::InvTypeTrade;
|
||||
TempSlot = serverSlot - EQEmu::legacy::TRADE_BEGIN;
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
@@ -6023,7 +6023,7 @@ namespace RoF2
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::WORLD_BEGIN && serverSlot <= EQEmu::legacy::WORLD_END) {
|
||||
RoF2Slot.Type = inventory::TypeWorld;
|
||||
RoF2Slot.Type = invtype::InvTypeWorld;
|
||||
TempSlot = serverSlot - EQEmu::legacy::WORLD_BEGIN;
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
}
|
||||
@@ -6047,7 +6047,7 @@ namespace RoF2
|
||||
RoF2Slot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
RoF2Slot.Slot = inventory::SlotPowerSource;
|
||||
RoF2Slot.Slot = invslot::PossessionsPowerSource;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoF2Slot.Slot += 3;
|
||||
@@ -6084,11 +6084,11 @@ namespace RoF2
|
||||
uint32 ServerSlot = INVALID_INDEX;
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (rof2Slot.Type == inventory::TypePossessions && rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||
if (rof2Slot.Slot == inventory::SlotPowerSource)
|
||||
if (rof2Slot.Type == invtype::InvTypePossessions && rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||
if (rof2Slot.Slot == invslot::PossessionsPowerSource)
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
|
||||
else if (rof2Slot.Slot >= inventory::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (rof2Slot.Slot >= invslot::PossessionsCursor) // 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
|
||||
@@ -6102,7 +6102,7 @@ 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 >= inventory::SlotAmmo) // Ammo and Main Inventory
|
||||
else if (rof2Slot.Slot >= invslot::PossessionsAmmo) // Ammo and Main Inventory
|
||||
TempSlot = rof2Slot.Slot - 1;
|
||||
|
||||
else // Worn Slots
|
||||
@@ -6114,7 +6114,7 @@ namespace RoF2
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == inventory::TypeBank) {
|
||||
else if (rof2Slot.Type == invtype::InvTypeBank) {
|
||||
TempSlot = EQEmu::legacy::BANK_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
@@ -6126,7 +6126,7 @@ namespace RoF2
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == inventory::TypeSharedBank) {
|
||||
else if (rof2Slot.Type == invtype::InvTypeSharedBank) {
|
||||
TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
@@ -6138,7 +6138,7 @@ namespace RoF2
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == inventory::TypeTrade) {
|
||||
else if (rof2Slot.Type == invtype::InvTypeTrade) {
|
||||
TempSlot = EQEmu::legacy::TRADE_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
@@ -6152,7 +6152,7 @@ namespace RoF2
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == inventory::TypeWorld) {
|
||||
else if (rof2Slot.Type == invtype::InvTypeWorld) {
|
||||
TempSlot = EQEmu::legacy::WORLD_BEGIN;
|
||||
|
||||
if (rof2Slot.Slot >= SUB_INDEX_BEGIN)
|
||||
@@ -6170,11 +6170,11 @@ namespace RoF2
|
||||
ServerSlot = TempSlot;
|
||||
}*/
|
||||
|
||||
else if (rof2Slot.Type == inventory::TypeGuildTribute) {
|
||||
else if (rof2Slot.Type == invtype::InvTypeGuildTribute) {
|
||||
ServerSlot = INVALID_INDEX;
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == inventory::TypeCorpse) {
|
||||
else if (rof2Slot.Type == invtype::InvTypeCorpse) {
|
||||
ServerSlot = rof2Slot.Slot + EQEmu::legacy::CORPSE_BEGIN;
|
||||
}
|
||||
|
||||
@@ -6189,10 +6189,10 @@ namespace RoF2
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
||||
if (rof2Slot.Slot == inventory::SlotPowerSource)
|
||||
if (rof2Slot.Slot == invslot::PossessionsPowerSource)
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
|
||||
else if (rof2Slot.Slot >= inventory::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (rof2Slot.Slot >= invslot::PossessionsCursor) // 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
|
||||
@@ -6201,7 +6201,7 @@ namespace RoF2
|
||||
// Same as above
|
||||
}*/
|
||||
|
||||
else if (rof2Slot.Slot >= inventory::SlotAmmo) // Main Inventory and Ammo Slots
|
||||
else if (rof2Slot.Slot >= invslot::PossessionsAmmo) // Main Inventory and Ammo Slots
|
||||
TempSlot = rof2Slot.Slot - 1;
|
||||
|
||||
else
|
||||
@@ -6225,7 +6225,7 @@ namespace RoF2
|
||||
|
||||
static inline void ServerToRoF2TextLink(std::string& rof2TextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
rof2TextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -6257,7 +6257,7 @@ namespace RoF2
|
||||
|
||||
static inline void RoF2ToServerTextLink(std::string& serverTextLink, const std::string& rof2TextLink)
|
||||
{
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (rof2TextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (rof2TextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = rof2TextLink;
|
||||
return;
|
||||
}
|
||||
@@ -6266,7 +6266,7 @@ namespace RoF2
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= consts::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
|
||||
@@ -16,3 +16,251 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "rof2_limits.h"
|
||||
|
||||
#include "../string_util.h"
|
||||
|
||||
|
||||
size_t RoF2::invtype::InvTypeSize(int 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;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
const char* RoF2::invtype::InvTypeName(int inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypeInvalid:
|
||||
return "Invalid Type";
|
||||
case invtype::InvTypePossessions:
|
||||
return "Possessions";
|
||||
case invtype::InvTypeBank:
|
||||
return "Bank";
|
||||
case invtype::InvTypeSharedBank:
|
||||
return "Shared Bank";
|
||||
case invtype::InvTypeTrade:
|
||||
return "Trade";
|
||||
case invtype::InvTypeWorld:
|
||||
return "World";
|
||||
case invtype::InvTypeLimbo:
|
||||
return "Limbo";
|
||||
case invtype::InvTypeTribute:
|
||||
return "Tribute";
|
||||
case invtype::InvTypeTrophyTribute:
|
||||
return "Trophy Tribute";
|
||||
case invtype::InvTypeGuildTribute:
|
||||
return "Guild Tribute";
|
||||
case invtype::InvTypeMerchant:
|
||||
return "Merchant";
|
||||
case invtype::InvTypeDeleted:
|
||||
return "Deleted";
|
||||
case invtype::InvTypeCorpse:
|
||||
return "Corpse";
|
||||
case invtype::InvTypeBazaar:
|
||||
return "Bazaar";
|
||||
case invtype::InvTypeInspect:
|
||||
return "Inspect";
|
||||
case invtype::InvTypeRealEstate:
|
||||
return "Real Estate";
|
||||
case invtype::InvTypeViewMODPC:
|
||||
return "View MOD PC";
|
||||
case invtype::InvTypeViewMODBank:
|
||||
return "View MOD Bank";
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
return "View MOD Shared Bank";
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
return "View MOD Limbo";
|
||||
case invtype::InvTypeAltStorage:
|
||||
return "Alt Storage";
|
||||
case invtype::InvTypeArchived:
|
||||
return "Archived";
|
||||
case invtype::InvTypeMail:
|
||||
return "Mail";
|
||||
case invtype::InvTypeGuildTrophyTribute:
|
||||
return "Guild Trophy Tribute";
|
||||
case invtype::InvTypeKrono:
|
||||
return "Krono";
|
||||
case invtype::InvTypeOther:
|
||||
return "Other";
|
||||
default:
|
||||
return "Unknown Type";
|
||||
}
|
||||
}
|
||||
|
||||
const char* RoF2::invslot::InvPossessionsSlotName(int inv_slot)
|
||||
{
|
||||
switch (inv_slot) {
|
||||
case invslot::InvSlotInvalid:
|
||||
return "Invalid Slot";
|
||||
case invslot::PossessionsCharm:
|
||||
return "Charm";
|
||||
case invslot::PossessionsEar1:
|
||||
return "Ear 1";
|
||||
case invslot::PossessionsHead:
|
||||
return "Head";
|
||||
case invslot::PossessionsFace:
|
||||
return "Face";
|
||||
case invslot::PossessionsEar2:
|
||||
return "Ear 2";
|
||||
case invslot::PossessionsNeck:
|
||||
return "Neck";
|
||||
case invslot::PossessionsShoulders:
|
||||
return "Shoulders";
|
||||
case invslot::PossessionsArms:
|
||||
return "Arms";
|
||||
case invslot::PossessionsBack:
|
||||
return "Back";
|
||||
case invslot::PossessionsWrist1:
|
||||
return "Wrist 1";
|
||||
case invslot::PossessionsWrist2:
|
||||
return "Wrist 2";
|
||||
case invslot::PossessionsRange:
|
||||
return "Range";
|
||||
case invslot::PossessionsHands:
|
||||
return "Hands";
|
||||
case invslot::PossessionsPrimary:
|
||||
return "Primary";
|
||||
case invslot::PossessionsSecondary:
|
||||
return "Secondary";
|
||||
case invslot::PossessionsFinger1:
|
||||
return "Finger 1";
|
||||
case invslot::PossessionsFinger2:
|
||||
return "Finger 2";
|
||||
case invslot::PossessionsChest:
|
||||
return "Chest";
|
||||
case invslot::PossessionsLegs:
|
||||
return "Legs";
|
||||
case invslot::PossessionsFeet:
|
||||
return "Feet";
|
||||
case invslot::PossessionsWaist:
|
||||
return "Waist";
|
||||
case invslot::PossessionsPowerSource:
|
||||
return "Power Source";
|
||||
case invslot::PossessionsAmmo:
|
||||
return "Ammo";
|
||||
case invslot::PossessionsGeneral1:
|
||||
return "General 1";
|
||||
case invslot::PossessionsGeneral2:
|
||||
return "General 2";
|
||||
case invslot::PossessionsGeneral3:
|
||||
return "General 3";
|
||||
case invslot::PossessionsGeneral4:
|
||||
return "General 4";
|
||||
case invslot::PossessionsGeneral5:
|
||||
return "General 5";
|
||||
case invslot::PossessionsGeneral6:
|
||||
return "General 6";
|
||||
case invslot::PossessionsGeneral7:
|
||||
return "General 7";
|
||||
case invslot::PossessionsGeneral8:
|
||||
return "General 8";
|
||||
case invslot::PossessionsGeneral9:
|
||||
return "General 9";
|
||||
case invslot::PossessionsGeneral10:
|
||||
return "General 10";
|
||||
case invslot::PossessionsCursor:
|
||||
return "Cursor";
|
||||
default:
|
||||
return "Unknown Slot";
|
||||
}
|
||||
}
|
||||
|
||||
const char* RoF2::invslot::InvSlotName(int inv_type, int inv_slot)
|
||||
{
|
||||
if (inv_type == invtype::InvTypePossessions)
|
||||
return invslot::InvPossessionsSlotName(inv_slot);
|
||||
|
||||
size_t type_size = invtype::InvTypeSize(inv_type);
|
||||
|
||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||
return "Invalid Slot";
|
||||
|
||||
if ((size_t)(inv_slot + 1) >= type_size)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Slot %i", (inv_slot + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* RoF2::invbag::InvBagIndexName(int bag_index)
|
||||
{
|
||||
if (bag_index == invbag::InvBagInvalid)
|
||||
return "Invalid Bag";
|
||||
|
||||
if ((size_t)bag_index >= invbag::ItemBagSize)
|
||||
return "Unknown Bag";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Bag %i", (bag_index + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* RoF2::invaug::InvAugIndexName(int aug_index)
|
||||
{
|
||||
if (aug_index == invaug::InvAugInvalid)
|
||||
return "Invalid Augment";
|
||||
|
||||
if ((size_t)aug_index >= invaug::ItemAugSize)
|
||||
return "Unknown Augment";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Augment %i", (aug_index + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
+239
-153
@@ -17,183 +17,269 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef COMMON_ROF2_CONSTANTS_H
|
||||
#define COMMON_ROF2_CONSTANTS_H
|
||||
#ifndef COMMON_ROF2_LIMITS_H
|
||||
#define COMMON_ROF2_LIMITS_H
|
||||
|
||||
#include "../types.h"
|
||||
#include "../client_version.h"
|
||||
#include "../skills.h"
|
||||
|
||||
|
||||
namespace RoF2
|
||||
{
|
||||
namespace inventory {
|
||||
typedef enum : int16 {
|
||||
TypePossessions = 0,
|
||||
TypeBank,
|
||||
TypeSharedBank,
|
||||
TypeTrade,
|
||||
TypeWorld,
|
||||
TypeLimbo,
|
||||
TypeTribute,
|
||||
TypeTrophyTribute,
|
||||
TypeGuildTribute,
|
||||
TypeMerchant,
|
||||
TypeDeleted,
|
||||
TypeCorpse,
|
||||
TypeBazaar,
|
||||
TypeInspect,
|
||||
TypeRealEstate,
|
||||
TypeViewMODPC,
|
||||
TypeViewMODBank,
|
||||
TypeViewMODSharedBank,
|
||||
TypeViewMODLimbo,
|
||||
TypeAltStorage,
|
||||
TypeArchived,
|
||||
TypeMail,
|
||||
TypeGuildTrophyTribute,
|
||||
TypeKrono,
|
||||
TypeOther,
|
||||
TypeCount
|
||||
} InventoryTypes;
|
||||
enum : int { Invalid = -1, Null, Safety };
|
||||
|
||||
typedef enum : int16 {
|
||||
SlotCharm = 0,
|
||||
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,
|
||||
SlotCount,
|
||||
SlotEquipmentBegin = SlotCharm,
|
||||
SlotEquipmentEnd = SlotAmmo,
|
||||
SlotEquipmentCount = (SlotEquipmentEnd - SlotEquipmentBegin + 1),
|
||||
SlotGeneralBegin = SlotGeneral1,
|
||||
SlotGeneralEnd = SlotGeneral10,
|
||||
SlotGeneralCount = (SlotGeneralEnd - SlotGeneralBegin + 1)
|
||||
} PossessionsSlots;
|
||||
}
|
||||
enum : bool { False = false, True = true };
|
||||
|
||||
namespace consts {
|
||||
static const size_t CHARACTER_CREATION_LIMIT = 12;
|
||||
// pre-declarations
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
static const uint16 TYPE_POSSESSIONS_SIZE = inventory::SlotCount;
|
||||
static const uint16 TYPE_BANK_SIZE = 24;
|
||||
static const uint16 TYPE_SHARED_BANK_SIZE = 2;
|
||||
static const uint16 TYPE_TRADE_SIZE = 8;
|
||||
static const uint16 TYPE_WORLD_SIZE = 10;
|
||||
static const uint16 TYPE_LIMBO_SIZE = 36;
|
||||
static const uint16 TYPE_TRIBUTE_SIZE = 0; //?
|
||||
static const uint16 TYPE_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_GUILD_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_MERCHANT_SIZE = 0;
|
||||
static const uint16 TYPE_DELETED_SIZE = 0;
|
||||
static const uint16 TYPE_CORPSE_SIZE = inventory::SlotCount;
|
||||
static const uint16 TYPE_BAZAAR_SIZE = 200;
|
||||
static const uint16 TYPE_INSPECT_SIZE = inventory::SlotEquipmentCount;
|
||||
static const uint16 TYPE_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 TYPE_VIEW_MOD_PC_SIZE = TYPE_POSSESSIONS_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_BANK_SIZE = TYPE_BANK_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_SHARED_BANK_SIZE = TYPE_SHARED_BANK_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_LIMBO_SIZE = TYPE_LIMBO_SIZE;
|
||||
static const uint16 TYPE_ALT_STORAGE_SIZE = 0;
|
||||
static const uint16 TYPE_ARCHIVED_SIZE = 0;
|
||||
static const uint16 TYPE_MAIL_SIZE = 0;
|
||||
static const uint16 TYPE_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_KRONO_SIZE = NOT_USED;
|
||||
static const uint16 TYPE_OTHER_SIZE = 0;
|
||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||
|
||||
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
|
||||
// (bag slots and main slots beyond Possessions are assigned for compatibility with current server coding)
|
||||
static const int16 EQUIPMENT_BEGIN = inventory::SlotCharm;
|
||||
static const int16 EQUIPMENT_END = inventory::SlotAmmo;
|
||||
static const uint16 EQUIPMENT_SIZE = inventory::SlotEquipmentCount;
|
||||
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
|
||||
};
|
||||
|
||||
static const int16 GENERAL_BEGIN = inventory::SlotGeneral1;
|
||||
static const int16 GENERAL_END = inventory::SlotGeneral10;
|
||||
static const uint16 GENERAL_SIZE = inventory::SlotGeneralCount;
|
||||
static const int16 GENERAL_BAGS_BEGIN = 251;
|
||||
static const int16 GENERAL_BAGS_END_OFFSET = 99;
|
||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
||||
} /*invtype*/
|
||||
|
||||
static const int16 CURSOR = inventory::SlotCursor;
|
||||
static const int16 CURSOR_BAG_BEGIN = 351;
|
||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
static const int16 BANK_BEGIN = 2000;
|
||||
static const int16 BANK_END = 2023;
|
||||
static const int16 BANK_BAGS_BEGIN = 2031;
|
||||
static const int16 BANK_BAGS_END_OFFSET = 239;
|
||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||
|
||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
||||
static const int16 SHARED_BANK_END = 2501;
|
||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2531;
|
||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
||||
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
|
||||
};
|
||||
|
||||
static const int16 TRADE_BEGIN = 3000;
|
||||
static const int16 TRADE_END = 3007;
|
||||
static const int16 TRADE_NPC_END = 3003;
|
||||
static const int16 TRADE_BAGS_BEGIN = 3031;
|
||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
||||
const int EquipmentBegin = PossessionsCharm;
|
||||
const int EquipmentEnd = PossessionsAmmo;
|
||||
const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1);
|
||||
|
||||
static const int16 WORLD_BEGIN = 4000;
|
||||
static const int16 WORLD_END = 4009;
|
||||
const int GeneralBegin = PossessionsGeneral1;
|
||||
const int GeneralEnd = PossessionsGeneral10;
|
||||
const int GeneralCount = (GeneralEnd - GeneralBegin + 1);
|
||||
|
||||
static const int16 TRIBUTE_BEGIN = 400;
|
||||
static const int16 TRIBUTE_END = 404;
|
||||
} /*invslot*/
|
||||
|
||||
static const int16 CORPSE_BEGIN = inventory::SlotGeneral1;
|
||||
static const int16 CORPSE_END = inventory::SlotGeneral1 + inventory::SlotCursor;
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
static const uint16 ITEM_COMMON_SIZE = 6;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = 255; // 255; (server max will be 255..unsure what actual client is - test)
|
||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||
|
||||
static const size_t BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
static const size_t BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
} /*invbag*/
|
||||
|
||||
static const size_t POTION_BELT_ITEM_COUNT = 5;
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
static const size_t TEXT_LINK_BODY_LENGTH = 56;
|
||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||
|
||||
static const size_t PLAYER_PROFILE_SKILL_MAX = Skill2HPiercing;
|
||||
}
|
||||
} /*invaug*/
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = true;
|
||||
static const bool ALLOWS_CLICK_CAST_FROM_BAG = true;
|
||||
static const bool COIN_HAS_WEIGHT = false;
|
||||
}
|
||||
namespace item {
|
||||
inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
//enum Unknown : int { // looks like item class..but, RoF has it too - nothing in UF-
|
||||
// Unknown1 = 0,
|
||||
// Unknown2 = 1,
|
||||
// Unknown3 = 2,
|
||||
// Unknown4 = 5 // krono?
|
||||
//};
|
||||
|
||||
enum ItemPacketType : int {
|
||||
ItemPacketMerchant = 100,
|
||||
ItemPacketTradeView = 101,
|
||||
ItemPacketLoot = 102,
|
||||
ItemPacketTrade = 103,
|
||||
ItemPacketCharInventory = 105,
|
||||
ItemPacketLimbo = 106,
|
||||
ItemPacketWorldContainer = 107,
|
||||
ItemPacketTributeItem = 108,
|
||||
ItemPacketGuildTribute = 109,
|
||||
ItemPacket10 = 110,
|
||||
ItemPacket11 = 111,
|
||||
ItemPacket12 = 112,
|
||||
ItemPacketRecovery = 113,
|
||||
ItemPacket14 = 115
|
||||
};
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||
|
||||
} /*skills*/
|
||||
|
||||
|
||||
// declarations
|
||||
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 = 0;//unknown
|
||||
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
|
||||
|
||||
const size_t NPCTradeSize = 4;
|
||||
|
||||
extern size_t InvTypeSize(int inv_type);
|
||||
extern const char* InvTypeName(int inv_type);
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
extern const char* InvPossessionsSlotName(int inv_slot);
|
||||
extern const char* InvSlotName(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* InvBagIndexName(int bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
const size_t ItemAugSize = 6;
|
||||
|
||||
extern const char* InvAugIndexName(int aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||
|
||||
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;
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
const bool ConcatenateInvTypeLimbo = false;
|
||||
|
||||
const bool AllowOverLevelEquipment = true;
|
||||
|
||||
const bool AllowEmptyBagInBag = true;
|
||||
const bool AllowClickCastFromBag = true;
|
||||
|
||||
const bool CoinHasWeight = false;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
const size_t LastUsableSkill = EQEmu::skills::Skill2HPiercing;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
}; /*RoF2*/
|
||||
|
||||
#endif /*COMMON_ROF2_CONSTANTS_H*/
|
||||
#endif /*COMMON_ROF2_LIMITS_H*/
|
||||
|
||||
@@ -948,13 +948,13 @@ struct BandolierItem_Struct_Old
|
||||
struct Bandolier_Struct
|
||||
{
|
||||
char Name[1]; // Variable Length
|
||||
BandolierItem_Struct Items[consts::BANDOLIER_ITEM_COUNT];
|
||||
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||
};
|
||||
|
||||
struct Bandolier_Struct_Old
|
||||
{
|
||||
char Name[32];
|
||||
BandolierItem_Struct Items[consts::BANDOLIER_ITEM_COUNT];
|
||||
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||
};
|
||||
|
||||
struct PotionBeltItem_Struct
|
||||
@@ -974,12 +974,12 @@ struct PotionBeltItem_Struct_Old
|
||||
|
||||
struct PotionBelt_Struct
|
||||
{
|
||||
PotionBeltItem_Struct Items[consts::POTION_BELT_ITEM_COUNT];
|
||||
PotionBeltItem_Struct Items[profile::PotionBeltSize];
|
||||
};
|
||||
|
||||
struct PotionBelt_Struct_Old
|
||||
{
|
||||
PotionBeltItem_Struct_Old Items[consts::POTION_BELT_ITEM_COUNT];
|
||||
PotionBeltItem_Struct_Old Items[profile::PotionBeltSize];
|
||||
};
|
||||
|
||||
struct GroupLeadershipAA_Struct {
|
||||
@@ -1189,7 +1189,7 @@ union
|
||||
/*12949*/ uint32 aapoints; // Unspent AA points - Seen 1
|
||||
/*12953*/ uint16 unknown_rof20; //
|
||||
/*12955*/ uint32 bandolier_count; // Seen 20
|
||||
/*12959*/ Bandolier_Struct bandoliers[consts::BANDOLIERS_SIZE]; // [20] 740 bytes (Variable Name Sizes) - bandolier contents
|
||||
/*12959*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [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
|
||||
|
||||
@@ -16,3 +16,247 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "rof_limits.h"
|
||||
|
||||
#include "../string_util.h"
|
||||
|
||||
|
||||
size_t RoF::invtype::InvTypeSize(int 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;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
const char* RoF::invtype::InvTypeName(int inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypeInvalid:
|
||||
return "Invalid Type";
|
||||
case invtype::InvTypePossessions:
|
||||
return "Possessions";
|
||||
case invtype::InvTypeBank:
|
||||
return "Bank";
|
||||
case invtype::InvTypeSharedBank:
|
||||
return "Shared Bank";
|
||||
case invtype::InvTypeTrade:
|
||||
return "Trade";
|
||||
case invtype::InvTypeWorld:
|
||||
return "World";
|
||||
case invtype::InvTypeLimbo:
|
||||
return "Limbo";
|
||||
case invtype::InvTypeTribute:
|
||||
return "Tribute";
|
||||
case invtype::InvTypeTrophyTribute:
|
||||
return "Trophy Tribute";
|
||||
case invtype::InvTypeGuildTribute:
|
||||
return "Guild Tribute";
|
||||
case invtype::InvTypeMerchant:
|
||||
return "Merchant";
|
||||
case invtype::InvTypeDeleted:
|
||||
return "Deleted";
|
||||
case invtype::InvTypeCorpse:
|
||||
return "Corpse";
|
||||
case invtype::InvTypeBazaar:
|
||||
return "Bazaar";
|
||||
case invtype::InvTypeInspect:
|
||||
return "Inspect";
|
||||
case invtype::InvTypeRealEstate:
|
||||
return "Real Estate";
|
||||
case invtype::InvTypeViewMODPC:
|
||||
return "View MOD PC";
|
||||
case invtype::InvTypeViewMODBank:
|
||||
return "View MOD Bank";
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
return "View MOD Shared Bank";
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
return "View MOD Limbo";
|
||||
case invtype::InvTypeAltStorage:
|
||||
return "Alt Storage";
|
||||
case invtype::InvTypeArchived:
|
||||
return "Archived";
|
||||
case invtype::InvTypeMail:
|
||||
return "Mail";
|
||||
case invtype::InvTypeGuildTrophyTribute:
|
||||
return "Guild Trophy Tribute";
|
||||
case invtype::InvTypeOther:
|
||||
return "Other";
|
||||
default:
|
||||
return "Unknown Type";
|
||||
}
|
||||
}
|
||||
|
||||
const char* RoF::invslot::InvPossessionsSlotName(int inv_slot)
|
||||
{
|
||||
switch (inv_slot) {
|
||||
case invslot::InvSlotInvalid:
|
||||
return "Invalid Slot";
|
||||
case invslot::PossessionsCharm:
|
||||
return "Charm";
|
||||
case invslot::PossessionsEar1:
|
||||
return "Ear 1";
|
||||
case invslot::PossessionsHead:
|
||||
return "Head";
|
||||
case invslot::PossessionsFace:
|
||||
return "Face";
|
||||
case invslot::PossessionsEar2:
|
||||
return "Ear 2";
|
||||
case invslot::PossessionsNeck:
|
||||
return "Neck";
|
||||
case invslot::PossessionsShoulders:
|
||||
return "Shoulders";
|
||||
case invslot::PossessionsArms:
|
||||
return "Arms";
|
||||
case invslot::PossessionsBack:
|
||||
return "Back";
|
||||
case invslot::PossessionsWrist1:
|
||||
return "Wrist 1";
|
||||
case invslot::PossessionsWrist2:
|
||||
return "Wrist 2";
|
||||
case invslot::PossessionsRange:
|
||||
return "Range";
|
||||
case invslot::PossessionsHands:
|
||||
return "Hands";
|
||||
case invslot::PossessionsPrimary:
|
||||
return "Primary";
|
||||
case invslot::PossessionsSecondary:
|
||||
return "Secondary";
|
||||
case invslot::PossessionsFinger1:
|
||||
return "Finger 1";
|
||||
case invslot::PossessionsFinger2:
|
||||
return "Finger 2";
|
||||
case invslot::PossessionsChest:
|
||||
return "Chest";
|
||||
case invslot::PossessionsLegs:
|
||||
return "Legs";
|
||||
case invslot::PossessionsFeet:
|
||||
return "Feet";
|
||||
case invslot::PossessionsWaist:
|
||||
return "Waist";
|
||||
case invslot::PossessionsPowerSource:
|
||||
return "Power Source";
|
||||
case invslot::PossessionsAmmo:
|
||||
return "Ammo";
|
||||
case invslot::PossessionsGeneral1:
|
||||
return "General 1";
|
||||
case invslot::PossessionsGeneral2:
|
||||
return "General 2";
|
||||
case invslot::PossessionsGeneral3:
|
||||
return "General 3";
|
||||
case invslot::PossessionsGeneral4:
|
||||
return "General 4";
|
||||
case invslot::PossessionsGeneral5:
|
||||
return "General 5";
|
||||
case invslot::PossessionsGeneral6:
|
||||
return "General 6";
|
||||
case invslot::PossessionsGeneral7:
|
||||
return "General 7";
|
||||
case invslot::PossessionsGeneral8:
|
||||
return "General 8";
|
||||
case invslot::PossessionsGeneral9:
|
||||
return "General 9";
|
||||
case invslot::PossessionsGeneral10:
|
||||
return "General 10";
|
||||
case invslot::PossessionsCursor:
|
||||
return "Cursor";
|
||||
default:
|
||||
return "Unknown Slot";
|
||||
}
|
||||
}
|
||||
|
||||
const char* RoF::invslot::InvSlotName(int inv_type, int inv_slot)
|
||||
{
|
||||
if (inv_type == invtype::InvTypePossessions)
|
||||
return invslot::InvPossessionsSlotName(inv_slot);
|
||||
|
||||
size_t type_size = invtype::InvTypeSize(inv_type);
|
||||
|
||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||
return "Invalid Slot";
|
||||
|
||||
if ((size_t)(inv_slot + 1) >= type_size)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Slot %i", (inv_slot + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* RoF::invbag::InvBagIndexName(int bag_index)
|
||||
{
|
||||
if (bag_index == invbag::InvBagInvalid)
|
||||
return "Invalid Bag";
|
||||
|
||||
if ((size_t)bag_index >= invbag::ItemBagSize)
|
||||
return "Unknown Bag";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Bag %i", (bag_index + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* RoF::invaug::InvAugIndexName(int aug_index)
|
||||
{
|
||||
if (aug_index == invaug::InvAugInvalid)
|
||||
return "Invalid Augment";
|
||||
|
||||
if ((size_t)aug_index >= invaug::ItemAugSize)
|
||||
return "Unknown Augment";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Augment %i", (aug_index + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
+230
-152
@@ -17,182 +17,260 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef COMMON_ROF_CONSTANTS_H
|
||||
#define COMMON_ROF_CONSTANTS_H
|
||||
#ifndef COMMON_ROF_LIMITS_H
|
||||
#define COMMON_ROF_LIMITS_H
|
||||
|
||||
#include "../types.h"
|
||||
#include "../client_version.h"
|
||||
#include "../skills.h"
|
||||
|
||||
|
||||
namespace RoF
|
||||
{
|
||||
namespace inventory {
|
||||
typedef enum : int16 {
|
||||
TypePossessions = 0,
|
||||
TypeBank,
|
||||
TypeSharedBank,
|
||||
TypeTrade,
|
||||
TypeWorld,
|
||||
TypeLimbo,
|
||||
TypeTribute,
|
||||
TypeTrophyTribute,
|
||||
TypeGuildTribute,
|
||||
TypeMerchant,
|
||||
TypeDeleted,
|
||||
TypeCorpse,
|
||||
TypeBazaar,
|
||||
TypeInspect,
|
||||
TypeRealEstate,
|
||||
TypeViewMODPC,
|
||||
TypeViewMODBank,
|
||||
TypeViewMODSharedBank,
|
||||
TypeViewMODLimbo,
|
||||
TypeAltStorage,
|
||||
TypeArchived,
|
||||
TypeMail,
|
||||
TypeGuildTrophyTribute,
|
||||
TypeOther,
|
||||
TypeCount
|
||||
} InventoryTypes;
|
||||
enum : int { Invalid = -1, Null, Safety };
|
||||
|
||||
typedef enum : int16 {
|
||||
SlotCharm = 0,
|
||||
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,
|
||||
SlotCount,
|
||||
SlotEquipmentBegin = SlotCharm,
|
||||
SlotEquipmentEnd = SlotAmmo,
|
||||
SlotEquipmentCount = (SlotEquipmentEnd - SlotEquipmentBegin + 1),
|
||||
SlotGeneralBegin = SlotGeneral1,
|
||||
SlotGeneralEnd = SlotGeneral10,
|
||||
SlotGeneralCount = (SlotGeneralEnd - SlotGeneralBegin + 1)
|
||||
} PossessionsSlots;
|
||||
}
|
||||
enum : bool { False = false, True = true };
|
||||
|
||||
namespace consts {
|
||||
static const size_t CHARACTER_CREATION_LIMIT = 12;
|
||||
// pre-declarations
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
static const uint16 TYPE_POSSESSIONS_SIZE = inventory::SlotCount;
|
||||
static const uint16 TYPE_BANK_SIZE = 24;
|
||||
static const uint16 TYPE_SHARED_BANK_SIZE = 2;
|
||||
static const uint16 TYPE_TRADE_SIZE = 8;
|
||||
static const uint16 TYPE_WORLD_SIZE = 10;
|
||||
static const uint16 TYPE_LIMBO_SIZE = 36;
|
||||
static const uint16 TYPE_TRIBUTE_SIZE = 0; //?
|
||||
static const uint16 TYPE_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_GUILD_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_MERCHANT_SIZE = 0;
|
||||
static const uint16 TYPE_DELETED_SIZE = 0;
|
||||
static const uint16 TYPE_CORPSE_SIZE = inventory::SlotCount;
|
||||
static const uint16 TYPE_BAZAAR_SIZE = 200;
|
||||
static const uint16 TYPE_INSPECT_SIZE = inventory::SlotEquipmentCount;
|
||||
static const uint16 TYPE_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 TYPE_VIEW_MOD_PC_SIZE = TYPE_POSSESSIONS_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_BANK_SIZE = TYPE_BANK_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_SHARED_BANK_SIZE = TYPE_SHARED_BANK_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_LIMBO_SIZE = TYPE_LIMBO_SIZE;
|
||||
static const uint16 TYPE_ALT_STORAGE_SIZE = 0;
|
||||
static const uint16 TYPE_ARCHIVED_SIZE = 0;
|
||||
static const uint16 TYPE_MAIL_SIZE = 0;
|
||||
static const uint16 TYPE_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_KRONO_SIZE = NOT_USED;
|
||||
static const uint16 TYPE_OTHER_SIZE = 0;
|
||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||
|
||||
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
|
||||
// (bag slots and main slots beyond Possessions are assigned for compatibility with current server coding)
|
||||
static const int16 EQUIPMENT_BEGIN = inventory::SlotCharm;
|
||||
static const int16 EQUIPMENT_END = inventory::SlotAmmo;
|
||||
static const uint16 EQUIPMENT_SIZE = inventory::SlotEquipmentCount;
|
||||
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
|
||||
};
|
||||
|
||||
static const int16 GENERAL_BEGIN = inventory::SlotGeneral1;
|
||||
static const int16 GENERAL_END = inventory::SlotGeneral10;
|
||||
static const uint16 GENERAL_SIZE = inventory::SlotGeneralCount;
|
||||
static const int16 GENERAL_BAGS_BEGIN = 251;
|
||||
static const int16 GENERAL_BAGS_END_OFFSET = 99;
|
||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
||||
} /*invtype*/
|
||||
|
||||
static const int16 CURSOR = inventory::SlotCursor;
|
||||
static const int16 CURSOR_BAG_BEGIN = 351;
|
||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
static const int16 BANK_BEGIN = 2000;
|
||||
static const int16 BANK_END = 2023;
|
||||
static const int16 BANK_BAGS_BEGIN = 2031;
|
||||
static const int16 BANK_BAGS_END_OFFSET = 239;
|
||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||
|
||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
||||
static const int16 SHARED_BANK_END = 2501;
|
||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2531;
|
||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
||||
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
|
||||
};
|
||||
|
||||
static const int16 TRADE_BEGIN = 3000;
|
||||
static const int16 TRADE_END = 3007;
|
||||
static const int16 TRADE_NPC_END = 3003;
|
||||
static const int16 TRADE_BAGS_BEGIN = 3031;
|
||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
||||
const int EquipmentBegin = PossessionsCharm;
|
||||
const int EquipmentEnd = PossessionsAmmo;
|
||||
const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1);
|
||||
|
||||
static const int16 WORLD_BEGIN = 4000;
|
||||
static const int16 WORLD_END = 4009;
|
||||
const int GeneralBegin = PossessionsGeneral1;
|
||||
const int GeneralEnd = PossessionsGeneral10;
|
||||
const int GeneralCount = (GeneralEnd - GeneralBegin + 1);
|
||||
|
||||
static const int16 TRIBUTE_BEGIN = 400;
|
||||
static const int16 TRIBUTE_END = 404;
|
||||
} /*invslot*/
|
||||
|
||||
static const int16 CORPSE_BEGIN = inventory::SlotGeneral1;
|
||||
static const int16 CORPSE_END = inventory::SlotGeneral1 + inventory::SlotCursor;
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
static const uint16 ITEM_COMMON_SIZE = 6;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = 255; // 255; (server max will be 255..unsure what actual client is - test)
|
||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||
|
||||
static const size_t BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
static const size_t BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
} /*invbag*/
|
||||
|
||||
static const size_t POTION_BELT_ITEM_COUNT = 5;
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
static const size_t TEXT_LINK_BODY_LENGTH = 55;
|
||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||
|
||||
static const size_t PLAYER_PROFILE_SKILL_MAX = SkillTripleAttack;
|
||||
}
|
||||
} /*invaug*/
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = true;
|
||||
static const bool ALLOWS_CLICK_CAST_FROM_BAG = true;
|
||||
static const bool COIN_HAS_WEIGHT = false;
|
||||
}
|
||||
namespace item {
|
||||
inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
enum ItemPacketType : int {
|
||||
ItemPacketMerchant = 100,
|
||||
ItemPacketTradeView = 101,
|
||||
ItemPacketLoot = 102,
|
||||
ItemPacketTrade = 103,
|
||||
ItemPacketCharInventory = 105,
|
||||
ItemPacketLimbo = 106,
|
||||
ItemPacketWorldContainer = 107,
|
||||
ItemPacketTributeItem = 108,
|
||||
ItemPacketGuildTribute = 109,
|
||||
ItemPacket10 = 110,
|
||||
ItemPacket11 = 111,
|
||||
ItemPacket12 = 112,
|
||||
ItemPacketRecovery = 113,
|
||||
ItemPacket14 = 115
|
||||
};
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||
|
||||
} /*skills*/
|
||||
|
||||
|
||||
// declarations
|
||||
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 = 0;//unknown
|
||||
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
|
||||
|
||||
const size_t NPCTradeSize = 4;
|
||||
|
||||
extern size_t InvTypeSize(int inv_type);
|
||||
extern const char* InvTypeName(int inv_type);
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
namespace invslot {
|
||||
extern const char* InvPossessionsSlotName(int inv_slot);
|
||||
extern const char* InvSlotName(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* InvBagIndexName(int bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
const size_t ItemAugSize = 6;
|
||||
|
||||
extern const char* InvAugIndexName(int aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||
|
||||
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;
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
const bool ConcatenateInvTypeLimbo = false;
|
||||
|
||||
const bool AllowOverLevelEquipment = true;
|
||||
|
||||
const bool AllowEmptyBagInBag = true;
|
||||
const bool AllowClickCastFromBag = true;
|
||||
|
||||
const bool CoinHasWeight = false;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
}; /*RoF*/
|
||||
|
||||
#endif /*COMMON_ROF_CONSTANTS_H*/
|
||||
#endif /*COMMON_ROF_LIMITS_H*/
|
||||
|
||||
@@ -931,13 +931,13 @@ struct BandolierItem_Struct_Old
|
||||
struct Bandolier_Struct
|
||||
{
|
||||
char Name[1]; // Variable Length
|
||||
BandolierItem_Struct Items[consts::BANDOLIER_ITEM_COUNT];
|
||||
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||
};
|
||||
|
||||
struct Bandolier_Struct_Old
|
||||
{
|
||||
char Name[32];
|
||||
BandolierItem_Struct Items[consts::BANDOLIER_ITEM_COUNT];
|
||||
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||
};
|
||||
|
||||
struct PotionBeltItem_Struct
|
||||
@@ -957,12 +957,12 @@ struct PotionBeltItem_Struct_Old
|
||||
|
||||
struct PotionBelt_Struct
|
||||
{
|
||||
PotionBeltItem_Struct Items[consts::POTION_BELT_ITEM_COUNT];
|
||||
PotionBeltItem_Struct Items[profile::PotionBeltSize];
|
||||
};
|
||||
|
||||
struct PotionBelt_Struct_Old
|
||||
{
|
||||
PotionBeltItem_Struct_Old Items[consts::POTION_BELT_ITEM_COUNT];
|
||||
PotionBeltItem_Struct_Old Items[profile::PotionBeltSize];
|
||||
};
|
||||
|
||||
struct GroupLeadershipAA_Struct {
|
||||
@@ -1172,7 +1172,7 @@ union
|
||||
/*12949*/ uint32 aapoints; // Unspent AA points - Seen 1
|
||||
/*12953*/ uint16 unknown_rof20; //
|
||||
/*12955*/ uint32 bandolier_count; // Seen 20
|
||||
/*12959*/ Bandolier_Struct bandoliers[consts::BANDOLIERS_SIZE]; // [20] 740 bytes (Variable Name Sizes) - bandolier contents
|
||||
/*12959*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [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
|
||||
|
||||
+21
-21
@@ -1623,18 +1623,18 @@ namespace SoD
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++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 < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++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';
|
||||
@@ -1644,13 +1644,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 < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++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 < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -1938,8 +1938,8 @@ namespace SoD
|
||||
eq->CharCount = emu->CharCount;
|
||||
eq->TotalChars = emu->TotalChars;
|
||||
|
||||
if (eq->TotalChars > consts::CHARACTER_CREATION_LIMIT)
|
||||
eq->TotalChars = consts::CHARACTER_CREATION_LIMIT;
|
||||
if (eq->TotalChars > constants::CharacterCreationLimit)
|
||||
eq->TotalChars = constants::CharacterCreationLimit;
|
||||
|
||||
FINISH_ENCODE();
|
||||
return;
|
||||
@@ -1951,7 +1951,7 @@ namespace SoD
|
||||
|
||||
size_t names_length = 0;
|
||||
size_t character_count = 0;
|
||||
for (; character_count < emu->CharCount && character_count < consts::CHARACTER_CREATION_LIMIT; ++character_count) {
|
||||
for (; character_count < emu->CharCount && character_count < constants::CharacterCreationLimit; ++character_count) {
|
||||
emu_cse = (CharacterSelectEntry_Struct *)emu_ptr;
|
||||
names_length += strlen(emu_cse->Name);
|
||||
emu_ptr += sizeof(CharacterSelectEntry_Struct);
|
||||
@@ -1967,8 +1967,8 @@ namespace SoD
|
||||
eq->CharCount = character_count;
|
||||
eq->TotalChars = emu->TotalChars;
|
||||
|
||||
if (eq->TotalChars > consts::CHARACTER_CREATION_LIMIT)
|
||||
eq->TotalChars = consts::CHARACTER_CREATION_LIMIT;
|
||||
if (eq->TotalChars > constants::CharacterCreationLimit)
|
||||
eq->TotalChars = constants::CharacterCreationLimit;
|
||||
|
||||
emu_ptr = __emu_buffer;
|
||||
emu_ptr += sizeof(CharacterSelect_Struct);
|
||||
@@ -3706,7 +3706,7 @@ namespace SoD
|
||||
isbs.augtype = item->AugType;
|
||||
isbs.augrestrict = item->AugRestrict;
|
||||
|
||||
for (int index = 0; index < consts::ITEM_COMMON_SIZE; ++index) {
|
||||
for (int index = 0; index < invaug::ItemAugSize; ++index) {
|
||||
isbs.augslots[index].type = item->AugSlotType[index];
|
||||
isbs.augslots[index].visible = item->AugSlotVisible[index];
|
||||
isbs.augslots[index].unknown = item->AugSlotUnk2[index];
|
||||
@@ -3917,7 +3917,7 @@ namespace SoD
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
SoDSlot = serverSlot + 1;
|
||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
SoDSlot = inventory::SlotPowerSource;
|
||||
SoDSlot = invslot::PossessionsPowerSource;
|
||||
else
|
||||
SoDSlot = serverSlot;
|
||||
return SoDSlot;
|
||||
@@ -3933,15 +3933,15 @@ namespace SoD
|
||||
{
|
||||
uint32 ServerSlot = 0;
|
||||
|
||||
if (sodSlot >= inventory::SlotAmmo && sodSlot <= consts::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (sodSlot >= invslot::PossessionsAmmo && sodSlot <= invslot::CorpseEnd) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
ServerSlot = sodSlot - 1;
|
||||
else if (sodSlot >= consts::GENERAL_BAGS_BEGIN && sodSlot <= consts::CURSOR_BAG_END)
|
||||
else if (sodSlot >= invbag::GeneralBagsBegin && sodSlot <= invbag::CursorBagEnd)
|
||||
ServerSlot = sodSlot - 11;
|
||||
else if (sodSlot >= consts::BANK_BAGS_BEGIN && sodSlot <= consts::BANK_BAGS_END)
|
||||
else if (sodSlot >= invbag::BankBagsBegin && sodSlot <= invbag::BankBagsEnd)
|
||||
ServerSlot = sodSlot - 1;
|
||||
else if (sodSlot >= consts::SHARED_BANK_BAGS_BEGIN && sodSlot <= consts::SHARED_BANK_BAGS_END)
|
||||
else if (sodSlot >= invbag::SharedBankBagsBegin && sodSlot <= invbag::SharedBankBagsEnd)
|
||||
ServerSlot = sodSlot - 1;
|
||||
else if (sodSlot == inventory::SlotPowerSource)
|
||||
else if (sodSlot == invslot::PossessionsPowerSource)
|
||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
||||
else
|
||||
ServerSlot = sodSlot;
|
||||
@@ -3956,7 +3956,7 @@ namespace SoD
|
||||
|
||||
static inline void ServerToSoDTextLink(std::string& sodTextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
sodTextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -3996,7 +3996,7 @@ namespace SoD
|
||||
|
||||
static inline void SoDToServerTextLink(std::string& serverTextLink, const std::string& sodTextLink)
|
||||
{
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (sodTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (sodTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = sodTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -4005,7 +4005,7 @@ namespace SoD
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= consts::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
|
||||
@@ -16,3 +16,240 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "sod_limits.h"
|
||||
|
||||
#include "../string_util.h"
|
||||
|
||||
|
||||
size_t SoD::invtype::InvTypeSize(int 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;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
const char* SoD::invtype::InvTypeName(int inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypeInvalid:
|
||||
return "Invalid Type";
|
||||
case invtype::InvTypePossessions:
|
||||
return "Possessions";
|
||||
case invtype::InvTypeBank:
|
||||
return "Bank";
|
||||
case invtype::InvTypeSharedBank:
|
||||
return "Shared Bank";
|
||||
case invtype::InvTypeTrade:
|
||||
return "Trade";
|
||||
case invtype::InvTypeWorld:
|
||||
return "World";
|
||||
case invtype::InvTypeLimbo:
|
||||
return "Limbo";
|
||||
case invtype::InvTypeTribute:
|
||||
return "Tribute";
|
||||
case invtype::InvTypeGuildTribute:
|
||||
return "Guild Tribute";
|
||||
case invtype::InvTypeMerchant:
|
||||
return "Merchant";
|
||||
case invtype::InvTypeCorpse:
|
||||
return "Corpse";
|
||||
case invtype::InvTypeBazaar:
|
||||
return "Bazaar";
|
||||
case invtype::InvTypeInspect:
|
||||
return "Inspect";
|
||||
case invtype::InvTypeViewMODPC:
|
||||
return "View MOD PC";
|
||||
case invtype::InvTypeViewMODBank:
|
||||
return "View MOD Bank";
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
return "View MOD Shared Bank";
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
return "View MOD Limbo";
|
||||
case invtype::InvTypeAltStorage:
|
||||
return "Alt Storage";
|
||||
case invtype::InvTypeArchived:
|
||||
return "Archived";
|
||||
case invtype::InvTypeOther:
|
||||
return "Other";
|
||||
default:
|
||||
return "Unknown Type";
|
||||
}
|
||||
}
|
||||
|
||||
const char* SoD::invslot::InvPossessionsSlotName(int inv_slot)
|
||||
{
|
||||
switch (inv_slot) {
|
||||
case invslot::InvSlotInvalid:
|
||||
return "Invalid Slot";
|
||||
case invslot::PossessionsCharm:
|
||||
return "Charm";
|
||||
case invslot::PossessionsEar1:
|
||||
return "Ear 1";
|
||||
case invslot::PossessionsHead:
|
||||
return "Head";
|
||||
case invslot::PossessionsFace:
|
||||
return "Face";
|
||||
case invslot::PossessionsEar2:
|
||||
return "Ear 2";
|
||||
case invslot::PossessionsNeck:
|
||||
return "Neck";
|
||||
case invslot::PossessionsShoulders:
|
||||
return "Shoulders";
|
||||
case invslot::PossessionsArms:
|
||||
return "Arms";
|
||||
case invslot::PossessionsBack:
|
||||
return "Back";
|
||||
case invslot::PossessionsWrist1:
|
||||
return "Wrist 1";
|
||||
case invslot::PossessionsWrist2:
|
||||
return "Wrist 2";
|
||||
case invslot::PossessionsRange:
|
||||
return "Range";
|
||||
case invslot::PossessionsHands:
|
||||
return "Hands";
|
||||
case invslot::PossessionsPrimary:
|
||||
return "Primary";
|
||||
case invslot::PossessionsSecondary:
|
||||
return "Secondary";
|
||||
case invslot::PossessionsFinger1:
|
||||
return "Finger 1";
|
||||
case invslot::PossessionsFinger2:
|
||||
return "Finger 2";
|
||||
case invslot::PossessionsChest:
|
||||
return "Chest";
|
||||
case invslot::PossessionsLegs:
|
||||
return "Legs";
|
||||
case invslot::PossessionsFeet:
|
||||
return "Feet";
|
||||
case invslot::PossessionsWaist:
|
||||
return "Waist";
|
||||
case invslot::PossessionsPowerSource:
|
||||
return "Power Source";
|
||||
case invslot::PossessionsAmmo:
|
||||
return "Ammo";
|
||||
case invslot::PossessionsGeneral1:
|
||||
return "General 1";
|
||||
case invslot::PossessionsGeneral2:
|
||||
return "General 2";
|
||||
case invslot::PossessionsGeneral3:
|
||||
return "General 3";
|
||||
case invslot::PossessionsGeneral4:
|
||||
return "General 4";
|
||||
case invslot::PossessionsGeneral5:
|
||||
return "General 5";
|
||||
case invslot::PossessionsGeneral6:
|
||||
return "General 6";
|
||||
case invslot::PossessionsGeneral7:
|
||||
return "General 7";
|
||||
case invslot::PossessionsGeneral8:
|
||||
return "General 8";
|
||||
case invslot::PossessionsCursor:
|
||||
return "Cursor";
|
||||
default:
|
||||
return "Unknown Slot";
|
||||
}
|
||||
}
|
||||
|
||||
const char* SoD::invslot::InvCorpseSlotName(int inv_slot)
|
||||
{
|
||||
if (!invtype::InvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid)
|
||||
return "Invalid Slot";
|
||||
|
||||
// needs work
|
||||
if ((size_t)(inv_slot + 1) < invslot::CorpseBegin || (size_t)(inv_slot + 1) >= invslot::CorpseEnd)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Slot %i", (inv_slot + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* SoD::invslot::InvSlotName(int inv_type, int inv_slot)
|
||||
{
|
||||
if (inv_type == invtype::InvTypePossessions)
|
||||
return invslot::InvPossessionsSlotName(inv_slot);
|
||||
else if (inv_type == invtype::InvTypeCorpse)
|
||||
return invslot::InvCorpseSlotName(inv_slot);
|
||||
|
||||
size_t type_size = invtype::InvTypeSize(inv_type);
|
||||
|
||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||
return "Invalid Slot";
|
||||
|
||||
if ((size_t)(inv_slot + 1) >= type_size)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Slot %i", (inv_slot + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* SoD::invbag::InvBagIndexName(int bag_index)
|
||||
{
|
||||
if (bag_index == invbag::InvBagInvalid)
|
||||
return "Invalid Bag";
|
||||
|
||||
if ((size_t)bag_index >= invbag::ItemBagSize)
|
||||
return "Unknown Bag";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Bag %i", (bag_index + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* SoD::invaug::InvAugIndexName(int aug_index)
|
||||
{
|
||||
if (aug_index == invaug::InvAugInvalid)
|
||||
return "Invalid Augment";
|
||||
|
||||
if ((size_t)aug_index >= invaug::ItemAugSize)
|
||||
return "Unknown Augment";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Augment %i", (aug_index + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
+254
-148
@@ -17,178 +17,284 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef COMMON_SOD_CONSTANTS_H
|
||||
#define COMMON_SOD_CONSTANTS_H
|
||||
#ifndef COMMON_SOD_LIMITS_H
|
||||
#define COMMON_SOD_LIMITS_H
|
||||
|
||||
#include "../types.h"
|
||||
#include "../client_version.h"
|
||||
#include "../skills.h"
|
||||
|
||||
|
||||
namespace SoD
|
||||
{
|
||||
namespace inventory {
|
||||
typedef enum : int16 {
|
||||
TypePossessions = 0,
|
||||
TypeBank,
|
||||
TypeSharedBank,
|
||||
TypeTrade,
|
||||
TypeWorld,
|
||||
TypeLimbo,
|
||||
TypeTribute,
|
||||
TypeTrophyTribute,
|
||||
TypeGuildTribute,
|
||||
TypeMerchant,
|
||||
TypeDeleted,
|
||||
TypeCorpse,
|
||||
TypeBazaar,
|
||||
TypeInspect,
|
||||
TypeRealEstate,
|
||||
TypeViewMODPC,
|
||||
TypeViewMODBank,
|
||||
TypeViewMODSharedBank,
|
||||
TypeViewMODLimbo,
|
||||
TypeAltStorage,
|
||||
TypeArchived,
|
||||
TypeMail,
|
||||
TypeGuildTrophyTribute,
|
||||
TypeOther,
|
||||
TypeCount
|
||||
} InventoryTypes;
|
||||
enum : int { Invalid = -1, Null, Safety };
|
||||
|
||||
typedef enum : int16 {
|
||||
SlotCharm = 0,
|
||||
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,
|
||||
SlotCount,
|
||||
SlotEquipmentBegin = SlotCharm,
|
||||
SlotEquipmentEnd = SlotAmmo,
|
||||
SlotEquipmentCount = (SlotEquipmentEnd - SlotEquipmentBegin + 1),
|
||||
SlotGeneralBegin = SlotGeneral1,
|
||||
SlotGeneralEnd = SlotGeneral8,
|
||||
SlotGeneralCount = (SlotGeneralEnd - SlotGeneralBegin + 1)
|
||||
} PossessionsSlots;
|
||||
}
|
||||
enum : bool { False = false, True = true };
|
||||
|
||||
namespace consts {
|
||||
static const size_t CHARACTER_CREATION_LIMIT = 12;
|
||||
// pre-declarations
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
static const uint16 TYPE_POSSESSIONS_SIZE = inventory::SlotCount;
|
||||
static const uint16 TYPE_BANK_SIZE = 24;
|
||||
static const uint16 TYPE_SHARED_BANK_SIZE = 2;
|
||||
static const uint16 TYPE_TRADE_SIZE = 8;
|
||||
static const uint16 TYPE_WORLD_SIZE = 10;
|
||||
static const uint16 TYPE_LIMBO_SIZE = 36;
|
||||
static const uint16 TYPE_TRIBUTE_SIZE = 0; //?
|
||||
static const uint16 TYPE_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_GUILD_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_MERCHANT_SIZE = 0;
|
||||
static const uint16 TYPE_DELETED_SIZE = 0;
|
||||
static const uint16 TYPE_CORPSE_SIZE = inventory::SlotCount;
|
||||
static const uint16 TYPE_BAZAAR_SIZE = 80;
|
||||
static const uint16 TYPE_INSPECT_SIZE = inventory::SlotEquipmentCount;
|
||||
static const uint16 TYPE_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 TYPE_VIEW_MOD_PC_SIZE = TYPE_POSSESSIONS_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_BANK_SIZE = TYPE_BANK_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_SHARED_BANK_SIZE = TYPE_SHARED_BANK_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_LIMBO_SIZE = TYPE_LIMBO_SIZE;
|
||||
static const uint16 TYPE_ALT_STORAGE_SIZE = 0;
|
||||
static const uint16 TYPE_ARCHIVED_SIZE = 0;
|
||||
static const uint16 TYPE_MAIL_SIZE = 0;
|
||||
static const uint16 TYPE_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_KRONO_SIZE = NOT_USED;
|
||||
static const uint16 TYPE_OTHER_SIZE = 0;
|
||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||
|
||||
static const int16 EQUIPMENT_BEGIN = inventory::SlotCharm;
|
||||
static const int16 EQUIPMENT_END = inventory::SlotAmmo;
|
||||
static const uint16 EQUIPMENT_SIZE = inventory::SlotEquipmentCount;
|
||||
enum InventoryType : int {
|
||||
InvTypePossessions = InvTypeBegin,
|
||||
InvTypeBank,
|
||||
InvTypeSharedBank,
|
||||
InvTypeTrade,
|
||||
InvTypeWorld,
|
||||
InvTypeLimbo,
|
||||
InvTypeTribute,
|
||||
InvTypeGuildTribute,
|
||||
InvTypeMerchant,
|
||||
InvTypeCorpse,
|
||||
InvTypeBazaar,
|
||||
InvTypeInspect,
|
||||
InvTypeViewMODPC,
|
||||
InvTypeViewMODBank,
|
||||
InvTypeViewMODSharedBank,
|
||||
InvTypeViewMODLimbo,
|
||||
InvTypeAltStorage,
|
||||
InvTypeArchived,
|
||||
InvTypeOther,
|
||||
InvTypeCount
|
||||
};
|
||||
|
||||
static const int16 GENERAL_BEGIN = inventory::SlotGeneral1;
|
||||
static const int16 GENERAL_END = inventory::SlotGeneral8;
|
||||
static const uint16 GENERAL_SIZE = inventory::SlotGeneralCount;
|
||||
static const int16 GENERAL_BAGS_BEGIN = 262;
|
||||
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
||||
} /*invtype*/
|
||||
|
||||
static const int16 CURSOR = inventory::SlotCursor;
|
||||
static const int16 CURSOR_BAG_BEGIN = 342;
|
||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
static const int16 BANK_BEGIN = 2000;
|
||||
static const int16 BANK_END = 2023;
|
||||
static const int16 BANK_BAGS_BEGIN = 2032;
|
||||
static const int16 BANK_BAGS_END_OFFSET = 239;
|
||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||
|
||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
||||
static const int16 SHARED_BANK_END = 2501;
|
||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2532;
|
||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
||||
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
|
||||
};
|
||||
|
||||
static const int16 TRADE_BEGIN = 3000;
|
||||
static const int16 TRADE_END = 3007;
|
||||
static const int16 TRADE_NPC_END = 3003;
|
||||
static const int16 TRADE_BAGS_BEGIN = 3031;
|
||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
||||
const int EquipmentBegin = PossessionsCharm;
|
||||
const int EquipmentEnd = PossessionsAmmo;
|
||||
const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1);
|
||||
|
||||
static const int16 WORLD_BEGIN = 4000;
|
||||
static const int16 WORLD_END = 4009;
|
||||
const int GeneralBegin = PossessionsGeneral1;
|
||||
const int GeneralEnd = PossessionsGeneral8;
|
||||
const int GeneralCount = (GeneralEnd - GeneralBegin + 1);
|
||||
|
||||
static const int16 TRIBUTE_BEGIN = 400;
|
||||
static const int16 TRIBUTE_END = 404;
|
||||
} /*invslot*/
|
||||
|
||||
static const int16 CORPSE_BEGIN = inventory::SlotGeneral1;
|
||||
static const int16 CORPSE_END = inventory::SlotGeneral1 + inventory::SlotCursor;
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
static const uint16 ITEM_COMMON_SIZE = 5;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = 10;
|
||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||
|
||||
static const size_t BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
static const size_t BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
} /*invbag*/
|
||||
|
||||
static const size_t POTION_BELT_ITEM_COUNT = 5;
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
static const size_t TEXT_LINK_BODY_LENGTH = 50;
|
||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||
|
||||
static const size_t PLAYER_PROFILE_SKILL_MAX = SkillTripleAttack;
|
||||
}
|
||||
} /*invaug*/
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = false;
|
||||
static const bool ALLOWS_CLICK_CAST_FROM_BAG = false;
|
||||
static const bool COIN_HAS_WEIGHT = false;
|
||||
}
|
||||
namespace item {
|
||||
inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
enum ItemPacketType : int {
|
||||
ItemPacketMerchant = 100,
|
||||
ItemPacketTradeView = 101,
|
||||
ItemPacketLoot = 102,
|
||||
ItemPacketTrade = 103,
|
||||
ItemPacketCharInventory = 105,
|
||||
ItemPacketLimbo = 106,
|
||||
ItemPacketWorldContainer = 107,
|
||||
ItemPacketTributeItem = 108,
|
||||
ItemPacketGuildTribute = 109,
|
||||
ItemPacketCharmUpdate = 110
|
||||
};
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::SoD; }
|
||||
|
||||
} /*skills*/
|
||||
|
||||
|
||||
// declarations
|
||||
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 = 0;//unknown
|
||||
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
|
||||
|
||||
const size_t NPCTradeSize = 4;
|
||||
|
||||
extern size_t InvTypeSize(int inv_type);
|
||||
extern const char* InvTypeName(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 = 404;
|
||||
|
||||
const int CorpseBegin = invslot::PossessionsGeneral1;
|
||||
const int CorpseEnd = invslot::PossessionsGeneral1 + invslot::PossessionsCursor;
|
||||
|
||||
extern const char* InvPossessionsSlotName(int inv_slot);
|
||||
extern const char* InvCorpseSlotName(int inv_slot);
|
||||
extern const char* InvSlotName(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* InvBagIndexName(int bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
const size_t ItemAugSize = 5;
|
||||
|
||||
extern const char* InvAugIndexName(int aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||
|
||||
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;
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
const bool ConcatenateInvTypeLimbo = true;
|
||||
|
||||
const bool AllowOverLevelEquipment = false;
|
||||
|
||||
const bool AllowEmptyBagInBag = false;
|
||||
const bool AllowClickCastFromBag = false;
|
||||
|
||||
const bool CoinHasWeight = false;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
}; /*SoD*/
|
||||
|
||||
#endif /*COMMON_SOD_CONSTANTS_H*/
|
||||
#endif /*COMMON_SOD_LIMITS_H*/
|
||||
|
||||
@@ -726,7 +726,7 @@ struct BandolierItem_Struct
|
||||
struct Bandolier_Struct
|
||||
{
|
||||
char Name[32];
|
||||
BandolierItem_Struct Items[consts::BANDOLIER_ITEM_COUNT];
|
||||
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||
};
|
||||
|
||||
//len = 72
|
||||
@@ -740,7 +740,7 @@ struct PotionBeltItem_Struct
|
||||
//len = 288
|
||||
struct PotionBelt_Struct
|
||||
{
|
||||
PotionBeltItem_Struct Items[consts::POTION_BELT_ITEM_COUNT];
|
||||
PotionBeltItem_Struct Items[profile::PotionBeltSize];
|
||||
};
|
||||
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
@@ -960,7 +960,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[consts::BANDOLIERS_SIZE]; // [6400] bandolier contents
|
||||
/*08300*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [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;
|
||||
|
||||
+21
-21
@@ -1279,18 +1279,18 @@ namespace SoF
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++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 < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++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';
|
||||
@@ -1300,13 +1300,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 < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++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 < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -1594,8 +1594,8 @@ namespace SoF
|
||||
eq->CharCount = emu->CharCount;
|
||||
eq->TotalChars = emu->TotalChars;
|
||||
|
||||
if (eq->TotalChars > consts::CHARACTER_CREATION_LIMIT)
|
||||
eq->TotalChars = consts::CHARACTER_CREATION_LIMIT;
|
||||
if (eq->TotalChars > constants::CharacterCreationLimit)
|
||||
eq->TotalChars = constants::CharacterCreationLimit;
|
||||
|
||||
FINISH_ENCODE();
|
||||
return;
|
||||
@@ -1607,7 +1607,7 @@ namespace SoF
|
||||
|
||||
size_t names_length = 0;
|
||||
size_t character_count = 0;
|
||||
for (; character_count < emu->CharCount && character_count < consts::CHARACTER_CREATION_LIMIT; ++character_count) {
|
||||
for (; character_count < emu->CharCount && character_count < constants::CharacterCreationLimit; ++character_count) {
|
||||
emu_cse = (CharacterSelectEntry_Struct *)emu_ptr;
|
||||
names_length += strlen(emu_cse->Name);
|
||||
emu_ptr += sizeof(CharacterSelectEntry_Struct);
|
||||
@@ -1623,8 +1623,8 @@ namespace SoF
|
||||
eq->CharCount = character_count;
|
||||
eq->TotalChars = emu->TotalChars;
|
||||
|
||||
if (eq->TotalChars > consts::CHARACTER_CREATION_LIMIT)
|
||||
eq->TotalChars = consts::CHARACTER_CREATION_LIMIT;
|
||||
if (eq->TotalChars > constants::CharacterCreationLimit)
|
||||
eq->TotalChars = constants::CharacterCreationLimit;
|
||||
|
||||
emu_ptr = __emu_buffer;
|
||||
emu_ptr += sizeof(CharacterSelect_Struct);
|
||||
@@ -3027,7 +3027,7 @@ namespace SoF
|
||||
isbs.augtype = item->AugType;
|
||||
isbs.augrestrict = item->AugRestrict;
|
||||
|
||||
for (int index = 0; index < consts::ITEM_COMMON_SIZE; ++index) {
|
||||
for (int index = 0; index < invaug::ItemAugSize; ++index) {
|
||||
isbs.augslots[index].type = item->AugSlotType[index];
|
||||
isbs.augslots[index].visible = item->AugSlotVisible[index];
|
||||
isbs.augslots[index].unknown = item->AugSlotUnk2[index];
|
||||
@@ -3237,7 +3237,7 @@ namespace SoF
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
SoFSlot = inventory::SlotPowerSource;
|
||||
SoFSlot = invslot::PossessionsPowerSource;
|
||||
else
|
||||
SoFSlot = serverSlot;
|
||||
|
||||
@@ -3254,15 +3254,15 @@ namespace SoF
|
||||
{
|
||||
uint32 ServerSlot = 0;
|
||||
|
||||
if (sofSlot >= inventory::SlotAmmo && sofSlot <= consts::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (sofSlot >= invslot::PossessionsAmmo && sofSlot <= invslot::CorpseEnd) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
ServerSlot = sofSlot - 1;
|
||||
else if (sofSlot >= consts::GENERAL_BAGS_BEGIN && sofSlot <= consts::CURSOR_BAG_END)
|
||||
else if (sofSlot >= invbag::GeneralBagsBegin && sofSlot <= invbag::CursorBagEnd)
|
||||
ServerSlot = sofSlot - 11;
|
||||
else if (sofSlot >= consts::BANK_BAGS_BEGIN && sofSlot <= consts::BANK_BAGS_END)
|
||||
else if (sofSlot >= invbag::BankBagsBegin && sofSlot <= invbag::BankBagsEnd)
|
||||
ServerSlot = sofSlot - 1;
|
||||
else if (sofSlot >= consts::SHARED_BANK_BAGS_BEGIN && sofSlot <= consts::SHARED_BANK_BAGS_END)
|
||||
else if (sofSlot >= invbag::SharedBankBagsBegin && sofSlot <= invbag::SharedBankBagsEnd)
|
||||
ServerSlot = sofSlot - 1;
|
||||
else if (sofSlot == inventory::SlotPowerSource)
|
||||
else if (sofSlot == invslot::PossessionsPowerSource)
|
||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
||||
else
|
||||
ServerSlot = sofSlot;
|
||||
@@ -3278,7 +3278,7 @@ namespace SoF
|
||||
|
||||
static inline void ServerToSoFTextLink(std::string& sofTextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
sofTextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -3318,7 +3318,7 @@ namespace SoF
|
||||
|
||||
static inline void SoFToServerTextLink(std::string& serverTextLink, const std::string& sofTextLink)
|
||||
{
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (sofTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (sofTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = sofTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -3327,7 +3327,7 @@ namespace SoF
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= consts::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
|
||||
@@ -16,3 +16,240 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "sof_limits.h"
|
||||
|
||||
#include "../string_util.h"
|
||||
|
||||
|
||||
size_t SoF::invtype::InvTypeSize(int 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;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
const char* SoF::invtype::InvTypeName(int inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypeInvalid:
|
||||
return "Invalid Type";
|
||||
case invtype::InvTypePossessions:
|
||||
return "Possessions";
|
||||
case invtype::InvTypeBank:
|
||||
return "Bank";
|
||||
case invtype::InvTypeSharedBank:
|
||||
return "Shared Bank";
|
||||
case invtype::InvTypeTrade:
|
||||
return "Trade";
|
||||
case invtype::InvTypeWorld:
|
||||
return "World";
|
||||
case invtype::InvTypeLimbo:
|
||||
return "Limbo";
|
||||
case invtype::InvTypeTribute:
|
||||
return "Tribute";
|
||||
case invtype::InvTypeGuildTribute:
|
||||
return "Guild Tribute";
|
||||
case invtype::InvTypeMerchant:
|
||||
return "Merchant";
|
||||
case invtype::InvTypeCorpse:
|
||||
return "Corpse";
|
||||
case invtype::InvTypeBazaar:
|
||||
return "Bazaar";
|
||||
case invtype::InvTypeInspect:
|
||||
return "Inspect";
|
||||
case invtype::InvTypeViewMODPC:
|
||||
return "View MOD PC";
|
||||
case invtype::InvTypeViewMODBank:
|
||||
return "View MOD Bank";
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
return "View MOD Shared Bank";
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
return "View MOD Limbo";
|
||||
case invtype::InvTypeAltStorage:
|
||||
return "Alt Storage";
|
||||
case invtype::InvTypeArchived:
|
||||
return "Archived";
|
||||
case invtype::InvTypeOther:
|
||||
return "Other";
|
||||
default:
|
||||
return "Unknown Type";
|
||||
}
|
||||
}
|
||||
|
||||
const char* SoF::invslot::InvPossessionsSlotName(int inv_slot)
|
||||
{
|
||||
switch (inv_slot) {
|
||||
case invslot::InvSlotInvalid:
|
||||
return "Invalid Slot";
|
||||
case invslot::PossessionsCharm:
|
||||
return "Charm";
|
||||
case invslot::PossessionsEar1:
|
||||
return "Ear 1";
|
||||
case invslot::PossessionsHead:
|
||||
return "Head";
|
||||
case invslot::PossessionsFace:
|
||||
return "Face";
|
||||
case invslot::PossessionsEar2:
|
||||
return "Ear 2";
|
||||
case invslot::PossessionsNeck:
|
||||
return "Neck";
|
||||
case invslot::PossessionsShoulders:
|
||||
return "Shoulders";
|
||||
case invslot::PossessionsArms:
|
||||
return "Arms";
|
||||
case invslot::PossessionsBack:
|
||||
return "Back";
|
||||
case invslot::PossessionsWrist1:
|
||||
return "Wrist 1";
|
||||
case invslot::PossessionsWrist2:
|
||||
return "Wrist 2";
|
||||
case invslot::PossessionsRange:
|
||||
return "Range";
|
||||
case invslot::PossessionsHands:
|
||||
return "Hands";
|
||||
case invslot::PossessionsPrimary:
|
||||
return "Primary";
|
||||
case invslot::PossessionsSecondary:
|
||||
return "Secondary";
|
||||
case invslot::PossessionsFinger1:
|
||||
return "Finger 1";
|
||||
case invslot::PossessionsFinger2:
|
||||
return "Finger 2";
|
||||
case invslot::PossessionsChest:
|
||||
return "Chest";
|
||||
case invslot::PossessionsLegs:
|
||||
return "Legs";
|
||||
case invslot::PossessionsFeet:
|
||||
return "Feet";
|
||||
case invslot::PossessionsWaist:
|
||||
return "Waist";
|
||||
case invslot::PossessionsPowerSource:
|
||||
return "Power Source";
|
||||
case invslot::PossessionsAmmo:
|
||||
return "Ammo";
|
||||
case invslot::PossessionsGeneral1:
|
||||
return "General 1";
|
||||
case invslot::PossessionsGeneral2:
|
||||
return "General 2";
|
||||
case invslot::PossessionsGeneral3:
|
||||
return "General 3";
|
||||
case invslot::PossessionsGeneral4:
|
||||
return "General 4";
|
||||
case invslot::PossessionsGeneral5:
|
||||
return "General 5";
|
||||
case invslot::PossessionsGeneral6:
|
||||
return "General 6";
|
||||
case invslot::PossessionsGeneral7:
|
||||
return "General 7";
|
||||
case invslot::PossessionsGeneral8:
|
||||
return "General 8";
|
||||
case invslot::PossessionsCursor:
|
||||
return "Cursor";
|
||||
default:
|
||||
return "Unknown Slot";
|
||||
}
|
||||
}
|
||||
|
||||
const char* SoF::invslot::InvCorpseSlotName(int inv_slot)
|
||||
{
|
||||
if (!invtype::InvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid)
|
||||
return "Invalid Slot";
|
||||
|
||||
// needs work
|
||||
if ((size_t)(inv_slot + 1) < invslot::CorpseBegin || (size_t)(inv_slot + 1) >= invslot::CorpseEnd)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Slot %i", (inv_slot + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* SoF::invslot::InvSlotName(int inv_type, int inv_slot)
|
||||
{
|
||||
if (inv_type == invtype::InvTypePossessions)
|
||||
return invslot::InvPossessionsSlotName(inv_slot);
|
||||
else if (inv_type == invtype::InvTypeCorpse)
|
||||
return invslot::InvCorpseSlotName(inv_slot);
|
||||
|
||||
size_t type_size = invtype::InvTypeSize(inv_type);
|
||||
|
||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||
return "Invalid Slot";
|
||||
|
||||
if ((size_t)(inv_slot + 1) >= type_size)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Slot %i", (inv_slot + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* SoF::invbag::InvBagIndexName(int bag_index)
|
||||
{
|
||||
if (bag_index == invbag::InvBagInvalid)
|
||||
return "Invalid Bag";
|
||||
|
||||
if ((size_t)bag_index >= invbag::ItemBagSize)
|
||||
return "Unknown Bag";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Bag %i", (bag_index + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* SoF::invaug::InvAugIndexName(int aug_index)
|
||||
{
|
||||
if (aug_index == invaug::InvAugInvalid)
|
||||
return "Invalid Augment";
|
||||
|
||||
if ((size_t)aug_index >= invaug::ItemAugSize)
|
||||
return "Unknown Augment";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Augment %i", (aug_index + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
+254
-148
@@ -17,178 +17,284 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef COMMON_SOF_CONSTANTS_H
|
||||
#define COMMON_SOF_CONSTANTS_H
|
||||
#ifndef COMMON_SOF_LIMITS_H
|
||||
#define COMMON_SOF_LIMITS_H
|
||||
|
||||
#include "../types.h"
|
||||
#include "../client_version.h"
|
||||
#include "../skills.h"
|
||||
|
||||
|
||||
namespace SoF
|
||||
{
|
||||
namespace inventory {
|
||||
typedef enum : int16 {
|
||||
TypePossessions = 0,
|
||||
TypeBank,
|
||||
TypeSharedBank,
|
||||
TypeTrade,
|
||||
TypeWorld,
|
||||
TypeLimbo,
|
||||
TypeTribute,
|
||||
TypeTrophyTribute,
|
||||
TypeGuildTribute,
|
||||
TypeMerchant,
|
||||
TypeDeleted,
|
||||
TypeCorpse,
|
||||
TypeBazaar,
|
||||
TypeInspect,
|
||||
TypeRealEstate,
|
||||
TypeViewMODPC,
|
||||
TypeViewMODBank,
|
||||
TypeViewMODSharedBank,
|
||||
TypeViewMODLimbo,
|
||||
TypeAltStorage,
|
||||
TypeArchived,
|
||||
TypeMail,
|
||||
TypeGuildTrophyTribute,
|
||||
TypeOther,
|
||||
TypeCount
|
||||
} InventoryTypes;
|
||||
enum : int { Invalid = -1, Null, Safety };
|
||||
|
||||
typedef enum : int16 {
|
||||
SlotCharm = 0,
|
||||
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,
|
||||
SlotCount,
|
||||
SlotEquipmentBegin = SlotCharm,
|
||||
SlotEquipmentEnd = SlotAmmo,
|
||||
SlotEquipmentCount = (SlotEquipmentEnd - SlotEquipmentBegin + 1),
|
||||
SlotGeneralBegin = SlotGeneral1,
|
||||
SlotGeneralEnd = SlotGeneral8,
|
||||
SlotGeneralCount = (SlotGeneralEnd - SlotGeneralBegin + 1)
|
||||
} PossessionsSlots;
|
||||
}
|
||||
enum : bool { False = false, True = true };
|
||||
|
||||
namespace consts {
|
||||
static const size_t CHARACTER_CREATION_LIMIT = 12;
|
||||
// pre-declarations
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
static const uint16 TYPE_POSSESSIONS_SIZE = inventory::SlotCount;
|
||||
static const uint16 TYPE_BANK_SIZE = 24;
|
||||
static const uint16 TYPE_SHARED_BANK_SIZE = 2;
|
||||
static const uint16 TYPE_TRADE_SIZE = 8;
|
||||
static const uint16 TYPE_WORLD_SIZE = 10;
|
||||
static const uint16 TYPE_LIMBO_SIZE = 36;
|
||||
static const uint16 TYPE_TRIBUTE_SIZE = 0; //?
|
||||
static const uint16 TYPE_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_GUILD_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_MERCHANT_SIZE = 0;
|
||||
static const uint16 TYPE_DELETED_SIZE = 0;
|
||||
static const uint16 TYPE_CORPSE_SIZE = inventory::SlotCount;
|
||||
static const uint16 TYPE_BAZAAR_SIZE = 80;
|
||||
static const uint16 TYPE_INSPECT_SIZE = inventory::SlotEquipmentCount;
|
||||
static const uint16 TYPE_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 TYPE_VIEW_MOD_PC_SIZE = TYPE_POSSESSIONS_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_BANK_SIZE = TYPE_BANK_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_SHARED_BANK_SIZE = TYPE_SHARED_BANK_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_LIMBO_SIZE = TYPE_LIMBO_SIZE;
|
||||
static const uint16 TYPE_ALT_STORAGE_SIZE = 0;
|
||||
static const uint16 TYPE_ARCHIVED_SIZE = 0;
|
||||
static const uint16 TYPE_MAIL_SIZE = 0;
|
||||
static const uint16 TYPE_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_KRONO_SIZE = NOT_USED;
|
||||
static const uint16 TYPE_OTHER_SIZE = 0;
|
||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||
|
||||
static const int16 EQUIPMENT_BEGIN = inventory::SlotCharm;
|
||||
static const int16 EQUIPMENT_END = inventory::SlotAmmo;
|
||||
static const uint16 EQUIPMENT_SIZE = inventory::SlotEquipmentCount;
|
||||
enum InventoryType : int {
|
||||
InvTypePossessions = InvTypeBegin,
|
||||
InvTypeBank,
|
||||
InvTypeSharedBank,
|
||||
InvTypeTrade,
|
||||
InvTypeWorld,
|
||||
InvTypeLimbo,
|
||||
InvTypeTribute,
|
||||
InvTypeGuildTribute,
|
||||
InvTypeMerchant,
|
||||
InvTypeCorpse,
|
||||
InvTypeBazaar,
|
||||
InvTypeInspect,
|
||||
InvTypeViewMODPC,
|
||||
InvTypeViewMODBank,
|
||||
InvTypeViewMODSharedBank,
|
||||
InvTypeViewMODLimbo,
|
||||
InvTypeAltStorage,
|
||||
InvTypeArchived,
|
||||
InvTypeOther,
|
||||
InvTypeCount
|
||||
};
|
||||
|
||||
static const int16 GENERAL_BEGIN = inventory::SlotGeneral1;
|
||||
static const int16 GENERAL_END = inventory::SlotGeneral8;
|
||||
static const uint16 GENERAL_SIZE = inventory::SlotGeneralCount;
|
||||
static const int16 GENERAL_BAGS_BEGIN = 262;
|
||||
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
||||
} /*invtype*/
|
||||
|
||||
static const int16 CURSOR = inventory::SlotCursor;
|
||||
static const int16 CURSOR_BAG_BEGIN = 342;
|
||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
static const int16 BANK_BEGIN = 2000;
|
||||
static const int16 BANK_END = 2023;
|
||||
static const int16 BANK_BAGS_BEGIN = 2032;
|
||||
static const int16 BANK_BAGS_END_OFFSET = 239;
|
||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||
|
||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
||||
static const int16 SHARED_BANK_END = 2501;
|
||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2532;
|
||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
||||
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
|
||||
};
|
||||
|
||||
static const int16 TRADE_BEGIN = 3000;
|
||||
static const int16 TRADE_END = 3007;
|
||||
static const int16 TRADE_NPC_END = 3003;
|
||||
static const int16 TRADE_BAGS_BEGIN = 3031;
|
||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
||||
const int EquipmentBegin = PossessionsCharm;
|
||||
const int EquipmentEnd = PossessionsAmmo;
|
||||
const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1);
|
||||
|
||||
static const int16 WORLD_BEGIN = 4000;
|
||||
static const int16 WORLD_END = 4009;
|
||||
const int GeneralBegin = PossessionsGeneral1;
|
||||
const int GeneralEnd = PossessionsGeneral8;
|
||||
const int GeneralCount = (GeneralEnd - GeneralBegin + 1);
|
||||
|
||||
static const int16 TRIBUTE_BEGIN = 400;
|
||||
static const int16 TRIBUTE_END = 404;
|
||||
} /*invslot*/
|
||||
|
||||
static const int16 CORPSE_BEGIN = inventory::SlotGeneral1;
|
||||
static const int16 CORPSE_END = inventory::SlotGeneral1 + inventory::SlotCursor;
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
static const uint16 ITEM_COMMON_SIZE = 5;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = 10;
|
||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||
|
||||
static const size_t BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
static const size_t BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
} /*invbag*/
|
||||
|
||||
static const size_t POTION_BELT_ITEM_COUNT = 5;
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
static const size_t TEXT_LINK_BODY_LENGTH = 50;
|
||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||
|
||||
static const size_t PLAYER_PROFILE_SKILL_MAX = SkillTripleAttack;
|
||||
}
|
||||
} /*invaug*/
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = false;
|
||||
static const bool ALLOWS_CLICK_CAST_FROM_BAG = false;
|
||||
static const bool COIN_HAS_WEIGHT = true;
|
||||
}
|
||||
namespace item {
|
||||
inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
enum ItemPacketType : int {
|
||||
ItemPacketMerchant = 100,
|
||||
ItemPacketTradeView = 101,
|
||||
ItemPacketLoot = 102,
|
||||
ItemPacketTrade = 103,
|
||||
ItemPacketCharInventory = 105,
|
||||
ItemPacketLimbo = 106,
|
||||
ItemPacketWorldContainer = 107,
|
||||
ItemPacketTributeItem = 108,
|
||||
ItemPacketGuildTribute = 109,
|
||||
ItemPacketCharmUpdate = 110
|
||||
};
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::SoF; }
|
||||
|
||||
} /*skills*/
|
||||
|
||||
|
||||
// declarations
|
||||
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 = 0;//unknown
|
||||
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
|
||||
|
||||
const size_t NPCTradeSize = 4;
|
||||
|
||||
extern size_t InvTypeSize(int inv_type);
|
||||
extern const char* InvTypeName(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 = 404;
|
||||
|
||||
const int CorpseBegin = PossessionsGeneral1;
|
||||
const int CorpseEnd = PossessionsGeneral1 + PossessionsCursor;
|
||||
|
||||
extern const char* InvPossessionsSlotName(int inv_slot);
|
||||
extern const char* InvCorpseSlotName(int inv_slot);
|
||||
extern const char* InvSlotName(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* InvBagIndexName(int bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
const size_t ItemAugSize = 5;
|
||||
|
||||
extern const char* InvAugIndexName(int aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||
|
||||
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;
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
const bool ConcatenateInvTypeLimbo = true;
|
||||
|
||||
const bool AllowOverLevelEquipment = false;
|
||||
|
||||
const bool AllowEmptyBagInBag = false;
|
||||
const bool AllowClickCastFromBag = false;
|
||||
|
||||
const bool CoinHasWeight = true;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
}; /*SoF*/
|
||||
|
||||
#endif /*COMMON_SOF_CONSTANTS_H*/
|
||||
#endif /*COMMON_SOF_LIMITS_H*/
|
||||
|
||||
@@ -705,7 +705,7 @@ struct BandolierItem_Struct
|
||||
struct Bandolier_Struct
|
||||
{
|
||||
char Name[32];
|
||||
BandolierItem_Struct Items[consts::BANDOLIER_ITEM_COUNT];
|
||||
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||
};
|
||||
|
||||
//len = 72
|
||||
@@ -719,7 +719,7 @@ struct PotionBeltItem_Struct
|
||||
//len = 288
|
||||
struct PotionBelt_Struct
|
||||
{
|
||||
PotionBeltItem_Struct Items[consts::POTION_BELT_ITEM_COUNT];
|
||||
PotionBeltItem_Struct Items[profile::PotionBeltSize];
|
||||
};
|
||||
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
@@ -938,7 +938,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[consts::BANDOLIERS_SIZE]; // [6400] bandolier contents
|
||||
/*08300*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [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;
|
||||
|
||||
+10
-10
@@ -966,18 +966,18 @@ namespace Titanium
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++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 < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++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';
|
||||
@@ -987,13 +987,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 < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++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 < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -2325,7 +2325,7 @@ namespace Titanium
|
||||
ob << StringFormat("%.*s\"", depth, protection); // Quotes (and protection, if needed) around static data
|
||||
|
||||
// Sub data
|
||||
for (int index = SUB_INDEX_BEGIN; index < consts::ITEM_CONTAINER_SIZE; ++index) {
|
||||
for (int index = SUB_INDEX_BEGIN; index < invbag::ItemBagSize; ++index) {
|
||||
ob << '|';
|
||||
|
||||
ItemInst* sub = inst->GetItem(index);
|
||||
@@ -2373,7 +2373,7 @@ namespace Titanium
|
||||
|
||||
static inline void ServerToTitaniumTextLink(std::string& titaniumTextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
titaniumTextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -2413,7 +2413,7 @@ namespace Titanium
|
||||
|
||||
static inline void TitaniumToServerTextLink(std::string& serverTextLink, const std::string& titaniumTextLink)
|
||||
{
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (titaniumTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (titaniumTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = titaniumTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -2422,7 +2422,7 @@ namespace Titanium
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= consts::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
|
||||
@@ -16,3 +16,238 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "titanium_limits.h"
|
||||
|
||||
#include "../string_util.h"
|
||||
|
||||
|
||||
size_t Titanium::invtype::InvTypeSize(int 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;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
const char* Titanium::invtype::InvTypeName(int inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypeInvalid:
|
||||
return "Invalid Type";
|
||||
case invtype::InvTypePossessions:
|
||||
return "Possessions";
|
||||
case invtype::InvTypeBank:
|
||||
return "Bank";
|
||||
case invtype::InvTypeSharedBank:
|
||||
return "Shared Bank";
|
||||
case invtype::InvTypeTrade:
|
||||
return "Trade";
|
||||
case invtype::InvTypeWorld:
|
||||
return "World";
|
||||
case invtype::InvTypeLimbo:
|
||||
return "Limbo";
|
||||
case invtype::InvTypeTribute:
|
||||
return "Tribute";
|
||||
case invtype::InvTypeGuildTribute:
|
||||
return "Guild Tribute";
|
||||
case invtype::InvTypeMerchant:
|
||||
return "Merchant";
|
||||
case invtype::InvTypeCorpse:
|
||||
return "Corpse";
|
||||
case invtype::InvTypeBazaar:
|
||||
return "Bazaar";
|
||||
case invtype::InvTypeInspect:
|
||||
return "Inspect";
|
||||
case invtype::InvTypeViewMODPC:
|
||||
return "View MOD PC";
|
||||
case invtype::InvTypeViewMODBank:
|
||||
return "View MOD Bank";
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
return "View MOD Shared Bank";
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
return "View MOD Limbo";
|
||||
case invtype::InvTypeAltStorage:
|
||||
return "Alt Storage";
|
||||
case invtype::InvTypeArchived:
|
||||
return "Archived";
|
||||
case invtype::InvTypeOther:
|
||||
return "Other";
|
||||
default:
|
||||
return "Unknown Type";
|
||||
}
|
||||
}
|
||||
|
||||
const char* Titanium::invslot::InvPossessionsSlotName(int inv_slot)
|
||||
{
|
||||
switch (inv_slot) {
|
||||
case invslot::InvSlotInvalid:
|
||||
return "Invalid Slot";
|
||||
case invslot::PossessionsCharm:
|
||||
return "Charm";
|
||||
case invslot::PossessionsEar1:
|
||||
return "Ear 1";
|
||||
case invslot::PossessionsHead:
|
||||
return "Head";
|
||||
case invslot::PossessionsFace:
|
||||
return "Face";
|
||||
case invslot::PossessionsEar2:
|
||||
return "Ear 2";
|
||||
case invslot::PossessionsNeck:
|
||||
return "Neck";
|
||||
case invslot::PossessionsShoulders:
|
||||
return "Shoulders";
|
||||
case invslot::PossessionsArms:
|
||||
return "Arms";
|
||||
case invslot::PossessionsBack:
|
||||
return "Back";
|
||||
case invslot::PossessionsWrist1:
|
||||
return "Wrist 1";
|
||||
case invslot::PossessionsWrist2:
|
||||
return "Wrist 2";
|
||||
case invslot::PossessionsRange:
|
||||
return "Range";
|
||||
case invslot::PossessionsHands:
|
||||
return "Hands";
|
||||
case invslot::PossessionsPrimary:
|
||||
return "Primary";
|
||||
case invslot::PossessionsSecondary:
|
||||
return "Secondary";
|
||||
case invslot::PossessionsFinger1:
|
||||
return "Finger 1";
|
||||
case invslot::PossessionsFinger2:
|
||||
return "Finger 2";
|
||||
case invslot::PossessionsChest:
|
||||
return "Chest";
|
||||
case invslot::PossessionsLegs:
|
||||
return "Legs";
|
||||
case invslot::PossessionsFeet:
|
||||
return "Feet";
|
||||
case invslot::PossessionsWaist:
|
||||
return "Waist";
|
||||
case invslot::PossessionsAmmo:
|
||||
return "Ammo";
|
||||
case invslot::PossessionsGeneral1:
|
||||
return "General 1";
|
||||
case invslot::PossessionsGeneral2:
|
||||
return "General 2";
|
||||
case invslot::PossessionsGeneral3:
|
||||
return "General 3";
|
||||
case invslot::PossessionsGeneral4:
|
||||
return "General 4";
|
||||
case invslot::PossessionsGeneral5:
|
||||
return "General 5";
|
||||
case invslot::PossessionsGeneral6:
|
||||
return "General 6";
|
||||
case invslot::PossessionsGeneral7:
|
||||
return "General 7";
|
||||
case invslot::PossessionsGeneral8:
|
||||
return "General 8";
|
||||
case invslot::PossessionsCursor:
|
||||
return "Cursor";
|
||||
default:
|
||||
return "Unknown Slot";
|
||||
}
|
||||
}
|
||||
|
||||
const char* Titanium::invslot::InvCorpseSlotName(int inv_slot)
|
||||
{
|
||||
if (!invtype::InvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid)
|
||||
return "Invalid Slot";
|
||||
|
||||
// needs work
|
||||
if ((size_t)(inv_slot + 1) < invslot::CorpseBegin || (size_t)(inv_slot + 1) >= invslot::CorpseEnd)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Slot %i", (inv_slot + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* Titanium::invslot::InvSlotName(int inv_type, int inv_slot)
|
||||
{
|
||||
if (inv_type == invtype::InvTypePossessions)
|
||||
return invslot::InvPossessionsSlotName(inv_slot);
|
||||
else if (inv_type == invtype::InvTypeCorpse)
|
||||
return invslot::InvCorpseSlotName(inv_slot);
|
||||
|
||||
size_t type_size = invtype::InvTypeSize(inv_type);
|
||||
|
||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||
return "Invalid Slot";
|
||||
|
||||
if ((size_t)(inv_slot + 1) >= type_size)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Slot %i", (inv_slot + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* Titanium::invbag::InvBagIndexName(int bag_index)
|
||||
{
|
||||
if (bag_index == invbag::InvBagInvalid)
|
||||
return "Invalid Bag";
|
||||
|
||||
if ((size_t)bag_index >= invbag::ItemBagSize)
|
||||
return "Unknown Bag";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Bag %i", (bag_index + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* Titanium::invaug::InvAugIndexName(int aug_index)
|
||||
{
|
||||
if (aug_index == invaug::InvAugInvalid)
|
||||
return "Invalid Augment";
|
||||
|
||||
if ((size_t)aug_index >= invaug::ItemAugSize)
|
||||
return "Unknown Augment";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Augment %i", (aug_index + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
+253
-147
@@ -17,177 +17,283 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef COMMON_TITANIUM_CONSTANTS_H
|
||||
#define COMMON_TITANIUM_CONSTANTS_H
|
||||
#ifndef COMMON_TITANIUM_LIMITS_H
|
||||
#define COMMON_TITANIUM_LIMITS_H
|
||||
|
||||
#include "../types.h"
|
||||
#include "../client_version.h"
|
||||
#include "../skills.h"
|
||||
|
||||
|
||||
namespace Titanium
|
||||
{
|
||||
namespace inventory {
|
||||
typedef enum : int16 {
|
||||
TypePossessions = 0,
|
||||
TypeBank,
|
||||
TypeSharedBank,
|
||||
TypeTrade,
|
||||
TypeWorld,
|
||||
TypeLimbo,
|
||||
TypeTribute,
|
||||
TypeTrophyTribute,
|
||||
TypeGuildTribute,
|
||||
TypeMerchant,
|
||||
TypeDeleted,
|
||||
TypeCorpse,
|
||||
TypeBazaar,
|
||||
TypeInspect,
|
||||
TypeRealEstate,
|
||||
TypeViewMODPC,
|
||||
TypeViewMODBank,
|
||||
TypeViewMODSharedBank,
|
||||
TypeViewMODLimbo,
|
||||
TypeAltStorage,
|
||||
TypeArchived,
|
||||
TypeMail,
|
||||
TypeGuildTrophyTribute,
|
||||
TypeOther,
|
||||
TypeCount
|
||||
} InventoryTypes;
|
||||
enum : int { Invalid = -1, Null, Safety };
|
||||
|
||||
typedef enum : int16 {
|
||||
SlotCharm = 0,
|
||||
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,
|
||||
SlotCount,
|
||||
SlotEquipmentBegin = SlotCharm,
|
||||
SlotEquipmentEnd = SlotAmmo,
|
||||
SlotEquipmentCount = (SlotEquipmentEnd - SlotEquipmentBegin + 1),
|
||||
SlotGeneralBegin = SlotGeneral1,
|
||||
SlotGeneralEnd = SlotGeneral8,
|
||||
SlotGeneralCount = (SlotGeneralEnd - SlotGeneralBegin + 1)
|
||||
} PossessionsSlots;
|
||||
}
|
||||
enum : bool { False = false, True = true };
|
||||
|
||||
// pre-declarations
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
namespace consts {
|
||||
static const size_t CHARACTER_CREATION_LIMIT = 8; // Hard-coded in client - DO NOT ALTER
|
||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||
|
||||
static const uint16 TYPE_POSSESSIONS_SIZE = inventory::SlotCount;
|
||||
static const uint16 TYPE_BANK_SIZE = 16;
|
||||
static const uint16 TYPE_SHARED_BANK_SIZE = 2;
|
||||
static const uint16 TYPE_TRADE_SIZE = 8;
|
||||
static const uint16 TYPE_WORLD_SIZE = 10;
|
||||
static const uint16 TYPE_LIMBO_SIZE = 36;
|
||||
static const uint16 TYPE_TRIBUTE_SIZE = 0; //?
|
||||
static const uint16 TYPE_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_GUILD_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_MERCHANT_SIZE = 0;
|
||||
static const uint16 TYPE_DELETED_SIZE = 0;
|
||||
static const uint16 TYPE_CORPSE_SIZE = inventory::SlotCount;
|
||||
static const uint16 TYPE_BAZAAR_SIZE = 80;
|
||||
static const uint16 TYPE_INSPECT_SIZE = inventory::SlotEquipmentCount;
|
||||
static const uint16 TYPE_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 TYPE_VIEW_MOD_PC_SIZE = TYPE_POSSESSIONS_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_BANK_SIZE = TYPE_BANK_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_SHARED_BANK_SIZE = TYPE_SHARED_BANK_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_LIMBO_SIZE = TYPE_LIMBO_SIZE;
|
||||
static const uint16 TYPE_ALT_STORAGE_SIZE = 0;
|
||||
static const uint16 TYPE_ARCHIVED_SIZE = 0;
|
||||
static const uint16 TYPE_MAIL_SIZE = 0;
|
||||
static const uint16 TYPE_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_KRONO_SIZE = NOT_USED;
|
||||
static const uint16 TYPE_OTHER_SIZE = 0;
|
||||
enum InventoryType : int {
|
||||
InvTypePossessions = InvTypeBegin,
|
||||
InvTypeBank,
|
||||
InvTypeSharedBank,
|
||||
InvTypeTrade,
|
||||
InvTypeWorld,
|
||||
InvTypeLimbo,
|
||||
InvTypeTribute,
|
||||
InvTypeGuildTribute,
|
||||
InvTypeMerchant,
|
||||
InvTypeCorpse,
|
||||
InvTypeBazaar,
|
||||
InvTypeInspect,
|
||||
InvTypeViewMODPC,
|
||||
InvTypeViewMODBank,
|
||||
InvTypeViewMODSharedBank,
|
||||
InvTypeViewMODLimbo,
|
||||
InvTypeAltStorage,
|
||||
InvTypeArchived,
|
||||
InvTypeOther,
|
||||
InvTypeCount
|
||||
};
|
||||
|
||||
static const int16 EQUIPMENT_BEGIN = inventory::SlotCharm;
|
||||
static const int16 EQUIPMENT_END = inventory::SlotAmmo;
|
||||
static const uint16 EQUIPMENT_SIZE = inventory::SlotEquipmentCount;
|
||||
} /*invtype*/
|
||||
|
||||
static const int16 GENERAL_BEGIN = inventory::SlotGeneral1;
|
||||
static const int16 GENERAL_END = inventory::SlotGeneral8;
|
||||
static const uint16 GENERAL_SIZE = inventory::SlotGeneralCount;
|
||||
static const int16 GENERAL_BAGS_BEGIN = 251;
|
||||
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
static const int16 CURSOR = inventory::SlotCursor;
|
||||
static const int16 CURSOR_BAG_BEGIN = 331;
|
||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||
|
||||
static const int16 BANK_BEGIN = 2000;
|
||||
static const int16 BANK_END = 2015;
|
||||
static const int16 BANK_BAGS_BEGIN = 2031;
|
||||
static const int16 BANK_BAGS_END_OFFSET = 159;
|
||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
||||
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
|
||||
};
|
||||
|
||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
||||
static const int16 SHARED_BANK_END = 2501;
|
||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2531;
|
||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
||||
const int EquipmentBegin = PossessionsCharm;
|
||||
const int EquipmentEnd = PossessionsAmmo;
|
||||
const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1);
|
||||
|
||||
static const int16 TRADE_BEGIN = 3000;
|
||||
static const int16 TRADE_END = 3007;
|
||||
static const int16 TRADE_NPC_END = 3003;
|
||||
static const int16 TRADE_BAGS_BEGIN = 3031;
|
||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
||||
const int GeneralBegin = PossessionsGeneral1;
|
||||
const int GeneralEnd = PossessionsGeneral8;
|
||||
const int GeneralCount = (GeneralEnd - GeneralBegin + 1);
|
||||
|
||||
static const int16 WORLD_BEGIN = 4000;
|
||||
static const int16 WORLD_END = 4009;
|
||||
} /*invslot*/
|
||||
|
||||
static const int16 TRIBUTE_BEGIN = 400;
|
||||
static const int16 TRIBUTE_END = 404;
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
static const int16 CORPSE_BEGIN = inventory::SlotGeneral1;
|
||||
static const int16 CORPSE_END = inventory::SlotGeneral1 + inventory::SlotCursor;
|
||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||
|
||||
static const uint16 ITEM_COMMON_SIZE = 5;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = 10;
|
||||
} /*invbag*/
|
||||
|
||||
static const size_t BANDOLIERS_SIZE = 4; // number of bandolier instances
|
||||
static const size_t BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
static const size_t POTION_BELT_ITEM_COUNT = 4;
|
||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||
|
||||
static const size_t TEXT_LINK_BODY_LENGTH = 45;
|
||||
} /*invaug*/
|
||||
|
||||
static const size_t PLAYER_PROFILE_SKILL_MAX = SkillFrenzy;
|
||||
}
|
||||
namespace item {
|
||||
inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = false;
|
||||
static const bool ALLOWS_CLICK_CAST_FROM_BAG = false;
|
||||
static const bool COIN_HAS_WEIGHT = true;
|
||||
}
|
||||
enum ItemPacketType : int {
|
||||
ItemPacketMerchant = 100,
|
||||
ItemPacketTradeView = 101,
|
||||
ItemPacketLoot = 102,
|
||||
ItemPacketTrade = 103,
|
||||
ItemPacketCharInventory = 105,
|
||||
ItemPacketLimbo = 106,
|
||||
ItemPacketWorldContainer = 107,
|
||||
ItemPacketTributeItem = 108,
|
||||
ItemPacketGuildTribute = 109,
|
||||
ItemPacketCharmUpdate = 110
|
||||
};
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
} /*profile*/
|
||||
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::Titanium; }
|
||||
|
||||
} /*skills*/
|
||||
|
||||
|
||||
// declarations
|
||||
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 = 0;//unknown
|
||||
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
|
||||
|
||||
const size_t NPCTradeSize = 4;
|
||||
|
||||
extern size_t InvTypeSize(int inv_type);
|
||||
extern const char* InvTypeName(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 = 404;
|
||||
|
||||
const int CorpseBegin = PossessionsGeneral1;
|
||||
const int CorpseEnd = PossessionsGeneral1 + PossessionsCursor;
|
||||
|
||||
extern const char* InvPossessionsSlotName(int inv_slot);
|
||||
extern const char* InvCorpseSlotName(int inv_slot);
|
||||
extern const char* InvSlotName(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* InvBagIndexName(int bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
const size_t ItemAugSize = 5;
|
||||
|
||||
extern const char* InvAugIndexName(int aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||
|
||||
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;
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
const bool ConcatenateInvTypeLimbo = true;
|
||||
|
||||
const bool AllowOverLevelEquipment = false;
|
||||
|
||||
const bool AllowEmptyBagInBag = false;
|
||||
const bool AllowClickCastFromBag = false;
|
||||
|
||||
const bool CoinHasWeight = true;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
const size_t LastUsableSkill = EQEmu::skills::SkillFrenzy;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
}; /*Titanium*/
|
||||
|
||||
#endif /*COMMON_TITANIUM_CONSTANTS_H*/
|
||||
#endif /*COMMON_TITANIUM_LIMITS_H*/
|
||||
|
||||
@@ -633,7 +633,7 @@ struct BandolierItem_Struct
|
||||
struct Bandolier_Struct
|
||||
{
|
||||
char Name[32];
|
||||
BandolierItem_Struct Items[consts::BANDOLIER_ITEM_COUNT];
|
||||
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||
};
|
||||
|
||||
//len = 72
|
||||
@@ -647,7 +647,7 @@ struct PotionBeltItem_Struct
|
||||
//len = 288
|
||||
struct PotionBelt_Struct
|
||||
{
|
||||
PotionBeltItem_Struct Items[consts::POTION_BELT_ITEM_COUNT];
|
||||
PotionBeltItem_Struct Items[profile::PotionBeltSize];
|
||||
};
|
||||
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
@@ -851,7 +851,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[consts::BANDOLIERS_SIZE]; // bandolier contents
|
||||
/*06164*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // bandolier contents
|
||||
/*07444*/ uint8 unknown07444[5120];
|
||||
/*12564*/ PotionBelt_Struct potionbelt; // potion belt
|
||||
/*12852*/ uint8 unknown12852[8];
|
||||
|
||||
+21
-21
@@ -1891,18 +1891,18 @@ namespace UF
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++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 < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
for (uint32 k = 0; k < profile::BandolierItemCount; ++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';
|
||||
@@ -1912,13 +1912,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 < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++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 < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -2227,8 +2227,8 @@ namespace UF
|
||||
eq->CharCount = emu->CharCount;
|
||||
eq->TotalChars = emu->TotalChars;
|
||||
|
||||
if (eq->TotalChars > consts::CHARACTER_CREATION_LIMIT)
|
||||
eq->TotalChars = consts::CHARACTER_CREATION_LIMIT;
|
||||
if (eq->TotalChars > constants::CharacterCreationLimit)
|
||||
eq->TotalChars = constants::CharacterCreationLimit;
|
||||
|
||||
// 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
|
||||
@@ -2244,7 +2244,7 @@ namespace UF
|
||||
|
||||
size_t names_length = 0;
|
||||
size_t character_count = 0;
|
||||
for (; character_count < emu->CharCount && character_count < consts::CHARACTER_CREATION_LIMIT; ++character_count) {
|
||||
for (; character_count < emu->CharCount && character_count < constants::CharacterCreationLimit; ++character_count) {
|
||||
emu_cse = (CharacterSelectEntry_Struct *)emu_ptr;
|
||||
names_length += strlen(emu_cse->Name);
|
||||
emu_ptr += sizeof(CharacterSelectEntry_Struct);
|
||||
@@ -2260,8 +2260,8 @@ namespace UF
|
||||
eq->CharCount = character_count;
|
||||
eq->TotalChars = emu->TotalChars;
|
||||
|
||||
if (eq->TotalChars > consts::CHARACTER_CREATION_LIMIT)
|
||||
eq->TotalChars = consts::CHARACTER_CREATION_LIMIT;
|
||||
if (eq->TotalChars > constants::CharacterCreationLimit)
|
||||
eq->TotalChars = constants::CharacterCreationLimit;
|
||||
|
||||
// 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
|
||||
@@ -4020,7 +4020,7 @@ namespace UF
|
||||
isbs.augtype = item->AugType;
|
||||
isbs.augrestrict = item->AugRestrict;
|
||||
|
||||
for (int index = 0; index < consts::ITEM_COMMON_SIZE; ++index) {
|
||||
for (int index = 0; index < invaug::ItemAugSize; ++index) {
|
||||
isbs.augslots[index].type = item->AugSlotType[index];
|
||||
isbs.augslots[index].visible = item->AugSlotVisible[index];
|
||||
isbs.augslots[index].unknown = item->AugSlotUnk2[index];
|
||||
@@ -4254,7 +4254,7 @@ namespace UF
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
UnderfootSlot = serverSlot + 1;
|
||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
UnderfootSlot = inventory::SlotPowerSource;
|
||||
UnderfootSlot = invslot::PossessionsPowerSource;
|
||||
else
|
||||
UnderfootSlot = serverSlot;
|
||||
|
||||
@@ -4271,15 +4271,15 @@ namespace UF
|
||||
{
|
||||
uint32 ServerSlot = 0;
|
||||
|
||||
if (ufSlot >= inventory::SlotAmmo && ufSlot <= consts::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (ufSlot >= invslot::PossessionsAmmo && ufSlot <= invslot::CorpseEnd) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
ServerSlot = ufSlot - 1;
|
||||
else if (ufSlot >= consts::GENERAL_BAGS_BEGIN && ufSlot <= consts::CURSOR_BAG_END)
|
||||
else if (ufSlot >= invbag::GeneralBagsBegin && ufSlot <= invbag::CursorBagEnd)
|
||||
ServerSlot = ufSlot - 11;
|
||||
else if (ufSlot >= consts::BANK_BAGS_BEGIN && ufSlot <= consts::BANK_BAGS_END)
|
||||
else if (ufSlot >= invbag::BankBagsBegin && ufSlot <= invbag::BankBagsEnd)
|
||||
ServerSlot = ufSlot - 1;
|
||||
else if (ufSlot >= consts::SHARED_BANK_BAGS_BEGIN && ufSlot <= consts::SHARED_BANK_BAGS_END)
|
||||
else if (ufSlot >= invbag::SharedBankBagsBegin && ufSlot <= invbag::SharedBankBagsEnd)
|
||||
ServerSlot = ufSlot - 1;
|
||||
else if (ufSlot == inventory::SlotPowerSource)
|
||||
else if (ufSlot == invslot::PossessionsPowerSource)
|
||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
||||
else
|
||||
ServerSlot = ufSlot;
|
||||
@@ -4295,7 +4295,7 @@ namespace UF
|
||||
|
||||
static inline void ServerToUFTextLink(std::string& ufTextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
ufTextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -4335,7 +4335,7 @@ namespace UF
|
||||
|
||||
static inline void UFToServerTextLink(std::string& serverTextLink, const std::string& ufTextLink)
|
||||
{
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (ufTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (ufTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = ufTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -4344,7 +4344,7 @@ namespace UF
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= consts::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
|
||||
@@ -16,3 +16,240 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "uf_limits.h"
|
||||
|
||||
#include "../string_util.h"
|
||||
|
||||
|
||||
size_t UF::invtype::InvTypeSize(int 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;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
const char* UF::invtype::InvTypeName(int inv_type)
|
||||
{
|
||||
switch (inv_type) {
|
||||
case invtype::InvTypeInvalid:
|
||||
return "Invalid Type";
|
||||
case invtype::InvTypePossessions:
|
||||
return "Possessions";
|
||||
case invtype::InvTypeBank:
|
||||
return "Bank";
|
||||
case invtype::InvTypeSharedBank:
|
||||
return "Shared Bank";
|
||||
case invtype::InvTypeTrade:
|
||||
return "Trade";
|
||||
case invtype::InvTypeWorld:
|
||||
return "World";
|
||||
case invtype::InvTypeLimbo:
|
||||
return "Limbo";
|
||||
case invtype::InvTypeTribute:
|
||||
return "Tribute";
|
||||
case invtype::InvTypeGuildTribute:
|
||||
return "Guild Tribute";
|
||||
case invtype::InvTypeMerchant:
|
||||
return "Merchant";
|
||||
case invtype::InvTypeCorpse:
|
||||
return "Corpse";
|
||||
case invtype::InvTypeBazaar:
|
||||
return "Bazaar";
|
||||
case invtype::InvTypeInspect:
|
||||
return "Inspect";
|
||||
case invtype::InvTypeViewMODPC:
|
||||
return "View MOD PC";
|
||||
case invtype::InvTypeViewMODBank:
|
||||
return "View MOD Bank";
|
||||
case invtype::InvTypeViewMODSharedBank:
|
||||
return "View MOD Shared Bank";
|
||||
case invtype::InvTypeViewMODLimbo:
|
||||
return "View MOD Limbo";
|
||||
case invtype::InvTypeAltStorage:
|
||||
return "Alt Storage";
|
||||
case invtype::InvTypeArchived:
|
||||
return "Archived";
|
||||
case invtype::InvTypeOther:
|
||||
return "Other";
|
||||
default:
|
||||
return "Unknown Type";
|
||||
}
|
||||
}
|
||||
|
||||
const char* UF::invslot::InvPossessionsSlotName(int inv_slot)
|
||||
{
|
||||
switch (inv_slot) {
|
||||
case invslot::InvSlotInvalid:
|
||||
return "Invalid Slot";
|
||||
case invslot::PossessionsCharm:
|
||||
return "Charm";
|
||||
case invslot::PossessionsEar1:
|
||||
return "Ear 1";
|
||||
case invslot::PossessionsHead:
|
||||
return "Head";
|
||||
case invslot::PossessionsFace:
|
||||
return "Face";
|
||||
case invslot::PossessionsEar2:
|
||||
return "Ear 2";
|
||||
case invslot::PossessionsNeck:
|
||||
return "Neck";
|
||||
case invslot::PossessionsShoulders:
|
||||
return "Shoulders";
|
||||
case invslot::PossessionsArms:
|
||||
return "Arms";
|
||||
case invslot::PossessionsBack:
|
||||
return "Back";
|
||||
case invslot::PossessionsWrist1:
|
||||
return "Wrist 1";
|
||||
case invslot::PossessionsWrist2:
|
||||
return "Wrist 2";
|
||||
case invslot::PossessionsRange:
|
||||
return "Range";
|
||||
case invslot::PossessionsHands:
|
||||
return "Hands";
|
||||
case invslot::PossessionsPrimary:
|
||||
return "Primary";
|
||||
case invslot::PossessionsSecondary:
|
||||
return "Secondary";
|
||||
case invslot::PossessionsFinger1:
|
||||
return "Finger 1";
|
||||
case invslot::PossessionsFinger2:
|
||||
return "Finger 2";
|
||||
case invslot::PossessionsChest:
|
||||
return "Chest";
|
||||
case invslot::PossessionsLegs:
|
||||
return "Legs";
|
||||
case invslot::PossessionsFeet:
|
||||
return "Feet";
|
||||
case invslot::PossessionsWaist:
|
||||
return "Waist";
|
||||
case invslot::PossessionsPowerSource:
|
||||
return "Power Source";
|
||||
case invslot::PossessionsAmmo:
|
||||
return "Ammo";
|
||||
case invslot::PossessionsGeneral1:
|
||||
return "General 1";
|
||||
case invslot::PossessionsGeneral2:
|
||||
return "General 2";
|
||||
case invslot::PossessionsGeneral3:
|
||||
return "General 3";
|
||||
case invslot::PossessionsGeneral4:
|
||||
return "General 4";
|
||||
case invslot::PossessionsGeneral5:
|
||||
return "General 5";
|
||||
case invslot::PossessionsGeneral6:
|
||||
return "General 6";
|
||||
case invslot::PossessionsGeneral7:
|
||||
return "General 7";
|
||||
case invslot::PossessionsGeneral8:
|
||||
return "General 8";
|
||||
case invslot::PossessionsCursor:
|
||||
return "Cursor";
|
||||
default:
|
||||
return "Unknown Slot";
|
||||
}
|
||||
}
|
||||
|
||||
const char* UF::invslot::InvCorpseSlotName(int inv_slot)
|
||||
{
|
||||
if (!invtype::InvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid)
|
||||
return "Invalid Slot";
|
||||
|
||||
// needs work
|
||||
if ((size_t)(inv_slot + 1) < invslot::CorpseBegin || (size_t)(inv_slot + 1) >= invslot::CorpseEnd)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Slot %i", (inv_slot + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* UF::invslot::InvSlotName(int inv_type, int inv_slot)
|
||||
{
|
||||
if (inv_type == invtype::InvTypePossessions)
|
||||
return invslot::InvPossessionsSlotName(inv_slot);
|
||||
else if (inv_type == invtype::InvTypeCorpse)
|
||||
return invslot::InvCorpseSlotName(inv_slot);
|
||||
|
||||
size_t type_size = invtype::InvTypeSize(inv_type);
|
||||
|
||||
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||
return "Invalid Slot";
|
||||
|
||||
if ((size_t)(inv_slot + 1) >= type_size)
|
||||
return "Unknown Slot";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Slot %i", (inv_slot + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* UF::invbag::InvBagIndexName(int bag_index)
|
||||
{
|
||||
if (bag_index == invbag::InvBagInvalid)
|
||||
return "Invalid Bag";
|
||||
|
||||
if ((size_t)bag_index >= invbag::ItemBagSize)
|
||||
return "Unknown Bag";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Bag %i", (bag_index + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
const char* UF::invaug::InvAugIndexName(int aug_index)
|
||||
{
|
||||
if (aug_index == invaug::InvAugInvalid)
|
||||
return "Invalid Augment";
|
||||
|
||||
if ((size_t)aug_index >= invaug::ItemAugSize)
|
||||
return "Unknown Augment";
|
||||
|
||||
static std::string ret_str;
|
||||
ret_str = StringFormat("Augment %i", (aug_index + 1));
|
||||
|
||||
return ret_str.c_str();
|
||||
}
|
||||
|
||||
+255
-148
@@ -17,178 +17,285 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef COMMON_UF_CONSTANTS_H
|
||||
#define COMMON_UF_CONSTANTS_H
|
||||
#ifndef COMMON_UF_LIMITS_H
|
||||
#define COMMON_UF_LIMITS_H
|
||||
|
||||
#include "../types.h"
|
||||
#include "../client_version.h"
|
||||
#include "../skills.h"
|
||||
|
||||
|
||||
namespace UF
|
||||
{
|
||||
namespace inventory {
|
||||
typedef enum : int16 {
|
||||
TypePossessions = 0,
|
||||
TypeBank,
|
||||
TypeSharedBank,
|
||||
TypeTrade,
|
||||
TypeWorld,
|
||||
TypeLimbo,
|
||||
TypeTribute,
|
||||
TypeTrophyTribute,
|
||||
TypeGuildTribute,
|
||||
TypeMerchant,
|
||||
TypeDeleted,
|
||||
TypeCorpse,
|
||||
TypeBazaar,
|
||||
TypeInspect,
|
||||
TypeRealEstate,
|
||||
TypeViewMODPC,
|
||||
TypeViewMODBank,
|
||||
TypeViewMODSharedBank,
|
||||
TypeViewMODLimbo,
|
||||
TypeAltStorage,
|
||||
TypeArchived,
|
||||
TypeMail,
|
||||
TypeGuildTrophyTribute,
|
||||
TypeOther,
|
||||
TypeCount
|
||||
} InventoryTypes;
|
||||
enum : int { Invalid = -1, Null, Safety };
|
||||
|
||||
typedef enum : int16 {
|
||||
SlotCharm = 0,
|
||||
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,
|
||||
SlotCount,
|
||||
SlotEquipmentBegin = SlotCharm,
|
||||
SlotEquipmentEnd = SlotAmmo,
|
||||
SlotEquipmentCount = (SlotEquipmentEnd - SlotEquipmentBegin + 1),
|
||||
SlotGeneralBegin = SlotGeneral1,
|
||||
SlotGeneralEnd = SlotGeneral8,
|
||||
SlotGeneralCount = (SlotGeneralEnd - SlotGeneralBegin + 1)
|
||||
} PossessionsSlots;
|
||||
}
|
||||
enum : bool { False = false, True = true };
|
||||
|
||||
namespace consts {
|
||||
static const size_t CHARACTER_CREATION_LIMIT = 12;
|
||||
// pre-declarations
|
||||
namespace invtype {
|
||||
inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
static const uint16 TYPE_POSSESSIONS_SIZE = inventory::SlotCount;
|
||||
static const uint16 TYPE_BANK_SIZE = 24;
|
||||
static const uint16 TYPE_SHARED_BANK_SIZE = 2;
|
||||
static const uint16 TYPE_TRADE_SIZE = 8;
|
||||
static const uint16 TYPE_WORLD_SIZE = 10;
|
||||
static const uint16 TYPE_LIMBO_SIZE = 36;
|
||||
static const uint16 TYPE_TRIBUTE_SIZE = 0; //?
|
||||
static const uint16 TYPE_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_GUILD_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_MERCHANT_SIZE = 0;
|
||||
static const uint16 TYPE_DELETED_SIZE = 0;
|
||||
static const uint16 TYPE_CORPSE_SIZE = inventory::SlotCount;
|
||||
static const uint16 TYPE_BAZAAR_SIZE = 80;
|
||||
static const uint16 TYPE_INSPECT_SIZE = inventory::SlotEquipmentCount;
|
||||
static const uint16 TYPE_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 TYPE_VIEW_MOD_PC_SIZE = TYPE_POSSESSIONS_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_BANK_SIZE = TYPE_BANK_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_SHARED_BANK_SIZE = TYPE_SHARED_BANK_SIZE;
|
||||
static const uint16 TYPE_VIEW_MOD_LIMBO_SIZE = TYPE_LIMBO_SIZE;
|
||||
static const uint16 TYPE_ALT_STORAGE_SIZE = 0;
|
||||
static const uint16 TYPE_ARCHIVED_SIZE = 0;
|
||||
static const uint16 TYPE_MAIL_SIZE = 0;
|
||||
static const uint16 TYPE_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
||||
static const uint16 TYPE_KRONO_SIZE = NOT_USED;
|
||||
static const uint16 TYPE_OTHER_SIZE = 0;
|
||||
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||
|
||||
static const int16 EQUIPMENT_BEGIN = inventory::SlotCharm;
|
||||
static const int16 EQUIPMENT_END = inventory::SlotAmmo;
|
||||
static const uint16 EQUIPMENT_SIZE = inventory::SlotEquipmentCount;
|
||||
enum InventoryType : int {
|
||||
InvTypePossessions = InvTypeBegin,
|
||||
InvTypeBank,
|
||||
InvTypeSharedBank,
|
||||
InvTypeTrade,
|
||||
InvTypeWorld,
|
||||
InvTypeLimbo,
|
||||
InvTypeTribute,
|
||||
InvTypeGuildTribute,
|
||||
InvTypeMerchant,
|
||||
InvTypeCorpse,
|
||||
InvTypeBazaar,
|
||||
InvTypeInspect,
|
||||
InvTypeViewMODPC,
|
||||
InvTypeViewMODBank,
|
||||
InvTypeViewMODSharedBank,
|
||||
InvTypeViewMODLimbo,
|
||||
InvTypeAltStorage,
|
||||
InvTypeArchived,
|
||||
InvTypeOther,
|
||||
InvTypeCount
|
||||
};
|
||||
|
||||
} /*invtype*/
|
||||
|
||||
static const int16 GENERAL_BEGIN = inventory::SlotGeneral1;
|
||||
static const int16 GENERAL_END = inventory::SlotGeneral8;
|
||||
static const uint16 GENERAL_SIZE = inventory::SlotGeneralCount;
|
||||
static const int16 GENERAL_BAGS_BEGIN = 262;
|
||||
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
||||
namespace invslot {
|
||||
inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
static const int16 CURSOR = inventory::SlotCursor;
|
||||
static const int16 CURSOR_BAG_BEGIN = 342;
|
||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
||||
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||
|
||||
static const int16 BANK_BEGIN = 2000;
|
||||
static const int16 BANK_END = 2023;
|
||||
static const int16 BANK_BAGS_BEGIN = 2032;
|
||||
static const int16 BANK_BAGS_END_OFFSET = 239;
|
||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
||||
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
|
||||
};
|
||||
|
||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
||||
static const int16 SHARED_BANK_END = 2501;
|
||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2532;
|
||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
||||
const int EquipmentBegin = PossessionsCharm;
|
||||
const int EquipmentEnd = PossessionsAmmo;
|
||||
const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1);
|
||||
|
||||
static const int16 TRADE_BEGIN = 3000;
|
||||
static const int16 TRADE_END = 3007;
|
||||
static const int16 TRADE_NPC_END = 3003;
|
||||
static const int16 TRADE_BAGS_BEGIN = 3031;
|
||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
||||
const int GeneralBegin = PossessionsGeneral1;
|
||||
const int GeneralEnd = PossessionsGeneral8;
|
||||
const int GeneralCount = (GeneralEnd - GeneralBegin + 1);
|
||||
|
||||
} /*invslot*/
|
||||
|
||||
static const int16 WORLD_BEGIN = 4000;
|
||||
static const int16 WORLD_END = 4009;
|
||||
namespace invbag {
|
||||
inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
static const int16 TRIBUTE_BEGIN = 400;
|
||||
static const int16 TRIBUTE_END = 404;
|
||||
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
static const int16 CORPSE_BEGIN = inventory::SlotGeneral1;
|
||||
static const int16 CORPSE_END = inventory::SlotGeneral1 + inventory::SlotCursor;
|
||||
namespace invaug {
|
||||
inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
static const uint16 ITEM_COMMON_SIZE = 5;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = 10;
|
||||
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
static const size_t BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
static const size_t BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
namespace item {
|
||||
inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
static const size_t POTION_BELT_ITEM_COUNT = 5;
|
||||
enum ItemPacketType : int {
|
||||
ItemPacketMerchant = 100,
|
||||
ItemPacketTradeView = 101,
|
||||
ItemPacketLoot = 102,
|
||||
ItemPacketTrade = 103,
|
||||
ItemPacketCharInventory = 105,
|
||||
ItemPacketLimbo = 106,
|
||||
ItemPacketWorldContainer = 107,
|
||||
ItemPacketTributeItem = 108,
|
||||
ItemPacketGuildTribute = 109,
|
||||
ItemPacketCharmUpdate = 110,
|
||||
ItemPacket11 = 111
|
||||
};
|
||||
|
||||
} /*item*/
|
||||
|
||||
static const size_t TEXT_LINK_BODY_LENGTH = 50;
|
||||
namespace profile {
|
||||
inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
} /*profile*/
|
||||
|
||||
static const size_t PLAYER_PROFILE_SKILL_MAX = SkillTripleAttack;
|
||||
}
|
||||
namespace constants {
|
||||
inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace limits {
|
||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = false;
|
||||
static const bool ALLOWS_CLICK_CAST_FROM_BAG = false;
|
||||
static const bool COIN_HAS_WEIGHT = false;
|
||||
}
|
||||
namespace behavior {
|
||||
inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::UF; }
|
||||
|
||||
} /*skills*/
|
||||
|
||||
|
||||
// declarations
|
||||
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 = 0;//unknown
|
||||
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
|
||||
|
||||
const size_t NPCTradeSize = 4;
|
||||
|
||||
extern size_t InvTypeSize(int inv_type);
|
||||
extern const char* InvTypeName(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 = 404;
|
||||
|
||||
const int CorpseBegin = invslot::PossessionsGeneral1;
|
||||
const int CorpseEnd = invslot::PossessionsGeneral1 + invslot::PossessionsCursor;
|
||||
|
||||
extern const char* InvPossessionsSlotName(int inv_slot);
|
||||
extern const char* InvCorpseSlotName(int inv_slot);
|
||||
extern const char* InvSlotName(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* InvBagIndexName(int bag_index);
|
||||
|
||||
} /*invbag*/
|
||||
|
||||
namespace invaug {
|
||||
const size_t ItemAugSize = 5;
|
||||
|
||||
extern const char* InvAugIndexName(int aug_index);
|
||||
|
||||
} /*invaug*/
|
||||
|
||||
namespace item {
|
||||
|
||||
} /*item*/
|
||||
|
||||
namespace profile {
|
||||
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||
|
||||
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;
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace behavior {
|
||||
const bool ConcatenateInvTypeLimbo = true;
|
||||
|
||||
const bool AllowOverLevelEquipment = true;
|
||||
|
||||
const bool AllowEmptyBagInBag = false;
|
||||
const bool AllowClickCastFromBag = false;
|
||||
|
||||
const bool CoinHasWeight = false;
|
||||
|
||||
} /*behavior*/
|
||||
|
||||
namespace skills {
|
||||
const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack;
|
||||
|
||||
} /*skills*/
|
||||
|
||||
}; /*UF*/
|
||||
|
||||
#endif /*COMMON_UF_CONSTANTS_H*/
|
||||
#endif /*COMMON_UF_LIMITS_H*/
|
||||
|
||||
@@ -773,7 +773,7 @@ struct BandolierItem_Struct
|
||||
struct Bandolier_Struct
|
||||
{
|
||||
char Name[32];
|
||||
BandolierItem_Struct Items[consts::BANDOLIER_ITEM_COUNT];
|
||||
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||
};
|
||||
|
||||
//len = 72
|
||||
@@ -787,7 +787,7 @@ struct PotionBeltItem_Struct
|
||||
//len = 288
|
||||
struct PotionBelt_Struct
|
||||
{
|
||||
PotionBeltItem_Struct Items[consts::POTION_BELT_ITEM_COUNT];
|
||||
PotionBeltItem_Struct Items[profile::PotionBeltSize];
|
||||
};
|
||||
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
@@ -1010,7 +1010,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[consts::BANDOLIERS_SIZE]; // [6400] bandolier contents
|
||||
/*11248*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [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