mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-05 11:26:35 +00:00
Delinked current inventory slot enumeration and constants from EQEmu::constants and global definition
This commit is contained in:
+7
-7
@@ -708,7 +708,7 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inven
|
||||
|
||||
/* Insert starting inventory... */
|
||||
std::string invquery;
|
||||
for (int16 i = EQEmu::constants::EQUIPMENT_BEGIN; i <= EQEmu::constants::BANK_BAGS_END;) {
|
||||
for (int16 i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::BANK_BAGS_END;) {
|
||||
const ItemInst* newinv = inv->GetItem(i);
|
||||
if (newinv) {
|
||||
invquery = StringFormat("INSERT INTO `inventory` (charid, slotid, itemid, charges, color) VALUES (%u, %i, %u, %i, %u)",
|
||||
@@ -717,16 +717,16 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inven
|
||||
auto results = QueryDatabase(invquery);
|
||||
}
|
||||
|
||||
if (i == SlotCursor) {
|
||||
i = EQEmu::constants::GENERAL_BAGS_BEGIN;
|
||||
if (i == EQEmu::legacy::SlotCursor) {
|
||||
i = EQEmu::legacy::GENERAL_BAGS_BEGIN;
|
||||
continue;
|
||||
}
|
||||
else if (i == EQEmu::constants::CURSOR_BAG_END) {
|
||||
i = EQEmu::constants::BANK_BEGIN;
|
||||
else if (i == EQEmu::legacy::CURSOR_BAG_END) {
|
||||
i = EQEmu::legacy::BANK_BEGIN;
|
||||
continue;
|
||||
}
|
||||
else if (i == EQEmu::constants::BANK_END) {
|
||||
i = EQEmu::constants::BANK_BAGS_BEGIN;
|
||||
else if (i == EQEmu::legacy::BANK_END) {
|
||||
i = EQEmu::legacy::BANK_BAGS_BEGIN;
|
||||
continue;
|
||||
}
|
||||
i++;
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace Convert {
|
||||
/*002*/ uint32 HP;
|
||||
/*006*/ uint32 Mana;
|
||||
/*010*/ Convert::SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||
/*510*/ uint32 Items[MaterialCount];
|
||||
/*510*/ uint32 Items[EQEmu::legacy::MaterialCount];
|
||||
/*546*/ char Name[64];
|
||||
/*610*/
|
||||
};
|
||||
@@ -227,9 +227,9 @@ namespace Convert {
|
||||
/*0304*/ uint8 ability_time_minutes;
|
||||
/*0305*/ uint8 ability_time_hours; //place holder
|
||||
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
|
||||
/*0312*/ uint32 item_material[MaterialCount]; // Item texture/material of worn/held items
|
||||
/*0312*/ uint32 item_material[EQEmu::legacy::MaterialCount]; // Item texture/material of worn/held items
|
||||
/*0348*/ uint8 unknown0348[44];
|
||||
/*0392*/ Convert::Color_Struct item_tint[MaterialCount];
|
||||
/*0392*/ Convert::Color_Struct item_tint[EQEmu::legacy::MaterialCount];
|
||||
/*0428*/ Convert::AA_Array aa_array[MAX_PP_AA_ARRAY];
|
||||
/*2348*/ float unknown2384; //seen ~128, ~47
|
||||
/*2352*/ char servername[32]; // length probably not right
|
||||
@@ -330,7 +330,7 @@ namespace Convert {
|
||||
/*7212*/ uint32 tribute_points;
|
||||
/*7216*/ uint32 unknown7252;
|
||||
/*7220*/ uint32 tribute_active; //1=active
|
||||
/*7224*/ Convert::Tribute_Struct tributes[EQEmu::constants::TRIBUTE_SIZE];
|
||||
/*7224*/ Convert::Tribute_Struct tributes[EQEmu::legacy::TRIBUTE_SIZE];
|
||||
/*7264*/ Convert::Disciplines_Struct disciplines;
|
||||
/*7664*/ uint32 recastTimers[MAX_RECAST_TYPES]; // Timers (GMT of last use)
|
||||
/*7744*/ char unknown7780[160];
|
||||
@@ -1416,7 +1416,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
||||
if (rquery != ""){ results = QueryDatabase(rquery); }
|
||||
/* Run Material Color Convert */
|
||||
first_entry = 0; rquery = "";
|
||||
for (i = 0; i < MaterialCount; i++){
|
||||
for (i = 0; i < EQEmu::legacy::MaterialCount; i++){
|
||||
if (pp->item_tint[i].color > 0){
|
||||
if (first_entry != 1){
|
||||
rquery = StringFormat("REPLACE INTO `character_material` (id, slot, blue, green, red, use_tint, color) VALUES (%u, %u, %u, %u, %u, %u, %u)", character_id, i, pp->item_tint[i].rgb.blue, pp->item_tint[i].rgb.green, pp->item_tint[i].rgb.red, pp->item_tint[i].rgb.use_tint, pp->item_tint[i].color);
|
||||
@@ -1428,7 +1428,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
||||
if (rquery != ""){ results = QueryDatabase(rquery); }
|
||||
/* Run Tribute Convert */
|
||||
first_entry = 0; rquery = "";
|
||||
for (i = 0; i < EQEmu::constants::TRIBUTE_SIZE; i++){
|
||||
for (i = 0; i < EQEmu::legacy::TRIBUTE_SIZE; i++){
|
||||
if (pp->tributes[i].tribute > 0 && pp->tributes[i].tribute != 4294967295){
|
||||
if (first_entry != 1){
|
||||
rquery = StringFormat("REPLACE INTO `character_tribute` (id, tier, tribute) VALUES (%u, %u, %u)", character_id, pp->tributes[i].tier, pp->tributes[i].tribute);
|
||||
|
||||
+111
-111
@@ -24,56 +24,56 @@
|
||||
uint16 EQEmu::constants::InventoryTypeSize(int16 type_index)
|
||||
{
|
||||
switch (type_index) {
|
||||
case TypePossessions:
|
||||
return TYPE_POSSESSIONS_SIZE;
|
||||
case TypeBank:
|
||||
return TYPE_BANK_SIZE;
|
||||
case TypeSharedBank:
|
||||
return TYPE_SHARED_BANK_SIZE;
|
||||
case TypeTrade:
|
||||
return TYPE_TRADE_SIZE;
|
||||
case TypeWorld:
|
||||
return TYPE_WORLD_SIZE;
|
||||
case TypeLimbo:
|
||||
return TYPE_LIMBO_SIZE;
|
||||
case TypeTribute:
|
||||
return TYPE_TRIBUTE_SIZE;
|
||||
case TypeTrophyTribute:
|
||||
return TYPE_TROPHY_TRIBUTE_SIZE;
|
||||
case TypeGuildTribute:
|
||||
return TYPE_GUILD_TRIBUTE_SIZE;
|
||||
case TypeMerchant:
|
||||
return TYPE_MERCHANT_SIZE;
|
||||
case TypeDeleted:
|
||||
return TYPE_DELETED_SIZE;
|
||||
case TypeCorpse:
|
||||
return TYPE_CORPSE_SIZE;
|
||||
case TypeBazaar:
|
||||
return TYPE_BAZAAR_SIZE;
|
||||
case TypeInspect:
|
||||
return TYPE_INSPECT_SIZE;
|
||||
case TypeRealEstate:
|
||||
return TYPE_REAL_ESTATE_SIZE;
|
||||
case TypeViewMODPC:
|
||||
return TYPE_VIEW_MOD_PC_SIZE;
|
||||
case TypeViewMODBank:
|
||||
return TYPE_VIEW_MOD_BANK_SIZE;
|
||||
case TypeViewMODSharedBank:
|
||||
return TYPE_VIEW_MOD_SHARED_BANK_SIZE;
|
||||
case TypeViewMODLimbo:
|
||||
return TYPE_VIEW_MOD_LIMBO_SIZE;
|
||||
case TypeAltStorage:
|
||||
return TYPE_ALT_STORAGE_SIZE;
|
||||
case TypeArchived:
|
||||
return TYPE_ARCHIVED_SIZE;
|
||||
case TypeMail:
|
||||
return TYPE_MAIL_SIZE;
|
||||
case TypeGuildTrophyTribute:
|
||||
return TYPE_GUILD_TROPHY_TRIBUTE_SIZE;
|
||||
case TypeKrono:
|
||||
return TYPE_KRONO_SIZE;
|
||||
case TypeOther:
|
||||
return TYPE_OTHER_SIZE;
|
||||
case legacy::TypePossessions:
|
||||
return legacy::TYPE_POSSESSIONS_SIZE;
|
||||
case legacy::TypeBank:
|
||||
return legacy::TYPE_BANK_SIZE;
|
||||
case legacy::TypeSharedBank:
|
||||
return legacy::TYPE_SHARED_BANK_SIZE;
|
||||
case legacy::TypeTrade:
|
||||
return legacy::TYPE_TRADE_SIZE;
|
||||
case legacy::TypeWorld:
|
||||
return legacy::TYPE_WORLD_SIZE;
|
||||
case legacy::TypeLimbo:
|
||||
return legacy::TYPE_LIMBO_SIZE;
|
||||
case legacy::TypeTribute:
|
||||
return legacy::TYPE_TRIBUTE_SIZE;
|
||||
case legacy::TypeTrophyTribute:
|
||||
return legacy::TYPE_TROPHY_TRIBUTE_SIZE;
|
||||
case legacy::TypeGuildTribute:
|
||||
return legacy::TYPE_GUILD_TRIBUTE_SIZE;
|
||||
case legacy::TypeMerchant:
|
||||
return legacy::TYPE_MERCHANT_SIZE;
|
||||
case legacy::TypeDeleted:
|
||||
return legacy::TYPE_DELETED_SIZE;
|
||||
case legacy::TypeCorpse:
|
||||
return legacy::TYPE_CORPSE_SIZE;
|
||||
case legacy::TypeBazaar:
|
||||
return legacy::TYPE_BAZAAR_SIZE;
|
||||
case legacy::TypeInspect:
|
||||
return legacy::TYPE_INSPECT_SIZE;
|
||||
case legacy::TypeRealEstate:
|
||||
return legacy::TYPE_REAL_ESTATE_SIZE;
|
||||
case legacy::TypeViewMODPC:
|
||||
return legacy::TYPE_VIEW_MOD_PC_SIZE;
|
||||
case legacy::TypeViewMODBank:
|
||||
return legacy::TYPE_VIEW_MOD_BANK_SIZE;
|
||||
case legacy::TypeViewMODSharedBank:
|
||||
return legacy::TYPE_VIEW_MOD_SHARED_BANK_SIZE;
|
||||
case legacy::TypeViewMODLimbo:
|
||||
return legacy::TYPE_VIEW_MOD_LIMBO_SIZE;
|
||||
case legacy::TypeAltStorage:
|
||||
return legacy::TYPE_ALT_STORAGE_SIZE;
|
||||
case legacy::TypeArchived:
|
||||
return legacy::TYPE_ARCHIVED_SIZE;
|
||||
case legacy::TypeMail:
|
||||
return legacy::TYPE_MAIL_SIZE;
|
||||
case legacy::TypeGuildTrophyTribute:
|
||||
return legacy::TYPE_GUILD_TROPHY_TRIBUTE_SIZE;
|
||||
case legacy::TypeKrono:
|
||||
return legacy::TYPE_KRONO_SIZE;
|
||||
case legacy::TypeOther:
|
||||
return legacy::TYPE_OTHER_SIZE;
|
||||
default:
|
||||
return NOT_USED;
|
||||
}
|
||||
@@ -94,55 +94,55 @@ const char* EQEmu::constants::InventoryTypeName(int16 type_index)
|
||||
switch (type_index) {
|
||||
case INVALID_INDEX:
|
||||
return "Invalid Type";
|
||||
case TypePossessions:
|
||||
case legacy::TypePossessions:
|
||||
return "Possessions";
|
||||
case TypeBank:
|
||||
case legacy::TypeBank:
|
||||
return "Bank";
|
||||
case TypeSharedBank:
|
||||
case legacy::TypeSharedBank:
|
||||
return "SharedBank";
|
||||
case TypeTrade:
|
||||
case legacy::TypeTrade:
|
||||
return "Trade";
|
||||
case TypeWorld:
|
||||
case legacy::TypeWorld:
|
||||
return "World";
|
||||
case TypeLimbo:
|
||||
case legacy::TypeLimbo:
|
||||
return "Limbo";
|
||||
case TypeTribute:
|
||||
case legacy::TypeTribute:
|
||||
return "Tribute";
|
||||
case TypeTrophyTribute:
|
||||
case legacy::TypeTrophyTribute:
|
||||
return "TrophyTribute";
|
||||
case TypeGuildTribute:
|
||||
case legacy::TypeGuildTribute:
|
||||
return "GuildTribute";
|
||||
case TypeMerchant:
|
||||
case legacy::TypeMerchant:
|
||||
return "Merchant";
|
||||
case TypeDeleted:
|
||||
case legacy::TypeDeleted:
|
||||
return "Deleted";
|
||||
case TypeCorpse:
|
||||
case legacy::TypeCorpse:
|
||||
return "Corpse";
|
||||
case TypeBazaar:
|
||||
case legacy::TypeBazaar:
|
||||
return "Bazaar";
|
||||
case TypeInspect:
|
||||
case legacy::TypeInspect:
|
||||
return "Inspect";
|
||||
case TypeRealEstate:
|
||||
case legacy::TypeRealEstate:
|
||||
return "RealEstate";
|
||||
case TypeViewMODPC:
|
||||
case legacy::TypeViewMODPC:
|
||||
return "ViewMODPC";
|
||||
case TypeViewMODBank:
|
||||
case legacy::TypeViewMODBank:
|
||||
return "ViewMODBank";
|
||||
case TypeViewMODSharedBank:
|
||||
case legacy::TypeViewMODSharedBank:
|
||||
return "ViewMODSharedBank";
|
||||
case TypeViewMODLimbo:
|
||||
case legacy::TypeViewMODLimbo:
|
||||
return "ViewMODLimbo";
|
||||
case TypeAltStorage:
|
||||
case legacy::TypeAltStorage:
|
||||
return "AltStorage";
|
||||
case TypeArchived:
|
||||
case legacy::TypeArchived:
|
||||
return "Archived";
|
||||
case TypeMail:
|
||||
case legacy::TypeMail:
|
||||
return "Mail";
|
||||
case TypeGuildTrophyTribute:
|
||||
case legacy::TypeGuildTrophyTribute:
|
||||
return "GuildTrophyTribute";
|
||||
case TypeKrono:
|
||||
case legacy::TypeKrono:
|
||||
return "Krono";
|
||||
case TypeOther:
|
||||
case legacy::TypeOther:
|
||||
return "Other";
|
||||
default:
|
||||
return "Unknown Type";
|
||||
@@ -154,75 +154,75 @@ const char* EQEmu::constants::InventorySlotName(int16 slot_index)
|
||||
switch (slot_index) {
|
||||
case INVALID_INDEX:
|
||||
return "Invalid Slot";
|
||||
case SlotCharm:
|
||||
case legacy::SlotCharm:
|
||||
return "Charm";
|
||||
case SlotEar1:
|
||||
case legacy::SlotEar1:
|
||||
return "Ear1";
|
||||
case SlotHead:
|
||||
case legacy::SlotHead:
|
||||
return "Head";
|
||||
case SlotFace:
|
||||
case legacy::SlotFace:
|
||||
return "Face";
|
||||
case SlotEar2:
|
||||
case legacy::SlotEar2:
|
||||
return "Ear2";
|
||||
case SlotNeck:
|
||||
case legacy::SlotNeck:
|
||||
return "Neck";
|
||||
case SlotShoulders:
|
||||
case legacy::SlotShoulders:
|
||||
return "Shoulders";
|
||||
case SlotArms:
|
||||
case legacy::SlotArms:
|
||||
return "Arms";
|
||||
case SlotBack:
|
||||
case legacy::SlotBack:
|
||||
return "Back";
|
||||
case SlotWrist1:
|
||||
case legacy::SlotWrist1:
|
||||
return "Wrist1";
|
||||
case SlotWrist2:
|
||||
case legacy::SlotWrist2:
|
||||
return "Wrist2";
|
||||
case SlotRange:
|
||||
case legacy::SlotRange:
|
||||
return "Range";
|
||||
case SlotHands:
|
||||
case legacy::SlotHands:
|
||||
return "Hands";
|
||||
case SlotPrimary:
|
||||
case legacy::SlotPrimary:
|
||||
return "Primary";
|
||||
case SlotSecondary:
|
||||
case legacy::SlotSecondary:
|
||||
return "Secondary";
|
||||
case SlotFinger1:
|
||||
case legacy::SlotFinger1:
|
||||
return "Finger1";
|
||||
case SlotFinger2:
|
||||
case legacy::SlotFinger2:
|
||||
return "Finger2";
|
||||
case SlotChest:
|
||||
case legacy::SlotChest:
|
||||
return "Chest";
|
||||
case SlotLegs:
|
||||
case legacy::SlotLegs:
|
||||
return "Legs";
|
||||
case SlotFeet:
|
||||
case legacy::SlotFeet:
|
||||
return "Feet";
|
||||
case SlotWaist:
|
||||
case legacy::SlotWaist:
|
||||
return "Waist";
|
||||
case SlotPowerSource:
|
||||
case legacy::SlotPowerSource:
|
||||
return "PowerSource";
|
||||
case SlotAmmo:
|
||||
case legacy::SlotAmmo:
|
||||
return "Ammo";
|
||||
case SlotGeneral1:
|
||||
case legacy::SlotGeneral1:
|
||||
return "General1";
|
||||
case SlotGeneral2:
|
||||
case legacy::SlotGeneral2:
|
||||
return "General2";
|
||||
case SlotGeneral3:
|
||||
case legacy::SlotGeneral3:
|
||||
return "General3";
|
||||
case SlotGeneral4:
|
||||
case legacy::SlotGeneral4:
|
||||
return "General4";
|
||||
case SlotGeneral5:
|
||||
case legacy::SlotGeneral5:
|
||||
return "General5";
|
||||
case SlotGeneral6:
|
||||
case legacy::SlotGeneral6:
|
||||
return "General6";
|
||||
case SlotGeneral7:
|
||||
case legacy::SlotGeneral7:
|
||||
return "General7";
|
||||
case SlotGeneral8:
|
||||
case legacy::SlotGeneral8:
|
||||
return "General8";
|
||||
/*
|
||||
case SlotGeneral9:
|
||||
case legacy::SlotGeneral9:
|
||||
return "General9";
|
||||
case SlotGeneral10:
|
||||
case legacy::SlotGeneral10:
|
||||
return "General10";
|
||||
*/
|
||||
case SlotCursor:
|
||||
case legacy::SlotCursor:
|
||||
return "Cursor";
|
||||
default:
|
||||
return "Unknown Slot";
|
||||
@@ -234,7 +234,7 @@ const char* EQEmu::constants::InventorySubName(int16 sub_index)
|
||||
if (sub_index == INVALID_INDEX)
|
||||
return "Invalid Sub";
|
||||
|
||||
if ((uint16)sub_index >= ITEM_CONTAINER_SIZE)
|
||||
if ((uint16)sub_index >= legacy::ITEM_CONTAINER_SIZE)
|
||||
return "Unknown Sub";
|
||||
|
||||
static std::string ret_str;
|
||||
@@ -248,7 +248,7 @@ const char* EQEmu::constants::InventoryAugName(int16 aug_index)
|
||||
if (aug_index == INVALID_INDEX)
|
||||
return "Invalid Aug";
|
||||
|
||||
if ((uint16)aug_index >= ITEM_COMMON_SIZE)
|
||||
if ((uint16)aug_index >= legacy::ITEM_COMMON_SIZE)
|
||||
return "Unknown Aug";
|
||||
|
||||
static std::string ret_str;
|
||||
|
||||
@@ -55,99 +55,6 @@ namespace EQEmu
|
||||
extern const char* InventorySlotName(int16 slot_index);
|
||||
extern const char* InventorySubName(int16 sub_index);
|
||||
extern const char* InventoryAugName(int16 aug_index);
|
||||
|
||||
// these are currently hard-coded for existing inventory system..do not use in place of special client version handlers until ready
|
||||
static const uint16 TYPE_POSSESSIONS_SIZE = 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 = 5; // (need client values)
|
||||
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 = SlotCount; // no bitmask use..limits to size of client corpse window (see EQLimits::InventoryMapSize(MapCorpse, <EQClientVersion))
|
||||
static const uint16 TYPE_BAZAAR_SIZE = 80;
|
||||
static const uint16 TYPE_INSPECT_SIZE = 22;
|
||||
static const uint16 TYPE_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 TYPE_VIEW_MOD_PC_SIZE = NOT_USED;
|
||||
static const uint16 TYPE_VIEW_MOD_BANK_SIZE = NOT_USED;
|
||||
static const uint16 TYPE_VIEW_MOD_SHARED_BANK_SIZE = NOT_USED;
|
||||
static const uint16 TYPE_VIEW_MOD_LIMBO_SIZE = NOT_USED;
|
||||
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 = 0;
|
||||
static const uint16 TYPE_OTHER_SIZE = 0;
|
||||
|
||||
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
|
||||
// (these are mainly to assign specific values to constants used in conversions and to identify per-client ranges/offsets)
|
||||
static const int16 EQUIPMENT_BEGIN = SlotCharm;
|
||||
static const int16 EQUIPMENT_END = SlotAmmo;
|
||||
static const uint16 EQUIPMENT_SIZE = 22; // does not account for 'Power Source' - used mainly for npc equipment arrays
|
||||
|
||||
static const int16 GENERAL_BEGIN = SlotGeneral1;
|
||||
static const int16 GENERAL_END = SlotGeneral8;
|
||||
static const uint16 GENERAL_SIZE = 8;
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
static const int16 WORLD_BEGIN = 4000;
|
||||
static const int16 WORLD_END = 4009;
|
||||
static const int16 WORLD_SIZE = TYPE_WORLD_SIZE;
|
||||
|
||||
static const int16 TRIBUTE_BEGIN = 400;
|
||||
static const int16 TRIBUTE_END = 404;
|
||||
static const int16 TRIBUTE_SIZE = TYPE_TRIBUTE_SIZE;
|
||||
|
||||
static const int16 CORPSE_BEGIN = 22;
|
||||
//static const int16 CORPSE_END = RoF::consts::CORPSE_END; // not ready for use
|
||||
|
||||
static const int16 MATERIAL_BEGIN = MaterialHead;
|
||||
static const int16 MATERIAL_END = MaterialSecondary;
|
||||
static const int16 MATERIAL_TINT_END = MaterialFeet;
|
||||
static const int16 MATERIAL_SIZE = MaterialCount;
|
||||
|
||||
// items
|
||||
// common and container sizes will not increase until the new 'location' struct is implemented
|
||||
static const uint16 ITEM_COMMON_SIZE = RoF::consts::ITEM_COMMON_SIZE;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = Titanium::consts::ITEM_CONTAINER_SIZE;
|
||||
|
||||
// BANDOLIERS_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
|
||||
static const size_t BANDOLIERS_SIZE = RoF2::consts::BANDOLIERS_SIZE; // number of bandolier instances
|
||||
static const size_t BANDOLIER_ITEM_COUNT = RoF2::consts::BANDOLIER_ITEM_COUNT; // number of equipment slots in bandolier instance
|
||||
|
||||
// POTION_BELT_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
|
||||
static const size_t POTION_BELT_ITEM_COUNT = RoF2::consts::POTION_BELT_ITEM_COUNT;
|
||||
|
||||
static const size_t TEXT_LINK_BODY_LENGTH = RoF2::consts::TEXT_LINK_BODY_LENGTH;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+174
-9
@@ -66,42 +66,207 @@ namespace EQEmu
|
||||
SLOT_TRADESKILL = 1000,
|
||||
SLOT_AUGMENT = 1001,
|
||||
SLOT_INVALID = (int16)0xFFFF,
|
||||
|
||||
SLOT_POSSESSIONS_BEGIN = 0,
|
||||
SLOT_POSSESSIONS_END = 30,
|
||||
|
||||
SLOT_EQUIPMENT_BEGIN = 0,
|
||||
SLOT_EQUIPMENT_END = 21,
|
||||
|
||||
SLOT_PERSONAL_BEGIN = 22,
|
||||
SLOT_PERSONAL_END = 29,
|
||||
SLOT_PERSONAL_BAGS_BEGIN = 251,
|
||||
SLOT_PERSONAL_BAGS_END = 330,
|
||||
|
||||
SLOT_CURSOR_BAG_BEGIN = 331,
|
||||
SLOT_CURSOR_BAG_END = 340,
|
||||
|
||||
SLOT_TRIBUTE_BEGIN = 400,
|
||||
SLOT_TRIBUTE_END = 404,
|
||||
|
||||
SLOT_BANK_BEGIN = 2000,
|
||||
SLOT_BANK_END = 2023,
|
||||
SLOT_BANK_BAGS_BEGIN = 2031,
|
||||
SLOT_BANK_BAGS_END = 2270,
|
||||
|
||||
SLOT_SHARED_BANK_BEGIN = 2500,
|
||||
SLOT_SHARED_BANK_END = 2501,
|
||||
SLOT_SHARED_BANK_BAGS_BEGIN = 2531,
|
||||
SLOT_SHARED_BANK_BAGS_END = 2550,
|
||||
|
||||
SLOT_TRADE_BEGIN = 3000,
|
||||
SLOT_TRADE_END = 3007,
|
||||
SLOT_TRADE_BAGS_BEGIN = 3031,
|
||||
SLOT_TRADE_BAGS_END = 3110,
|
||||
|
||||
SLOT_WORLD_BEGIN = 4000,
|
||||
SLOT_WORLD_END = 4009
|
||||
};
|
||||
|
||||
enum InventoryTypes : int16 {
|
||||
TypePossessions = 0,
|
||||
TypeBank,
|
||||
TypeSharedBank,
|
||||
TypeTrade,
|
||||
TypeWorld,
|
||||
TypeLimbo, // 5
|
||||
TypeTribute,
|
||||
TypeTrophyTribute,
|
||||
TypeGuildTribute,
|
||||
TypeMerchant,
|
||||
TypeDeleted, // 10
|
||||
TypeCorpse,
|
||||
TypeBazaar,
|
||||
TypeInspect,
|
||||
TypeRealEstate,
|
||||
TypeViewMODPC, // 15
|
||||
TypeViewMODBank,
|
||||
TypeViewMODSharedBank,
|
||||
TypeViewMODLimbo,
|
||||
TypeAltStorage,
|
||||
TypeArchived, // 20
|
||||
TypeMail,
|
||||
TypeGuildTrophyTribute,
|
||||
TypeKrono,
|
||||
TypeOther,
|
||||
TypeCount
|
||||
};
|
||||
|
||||
enum PossessionsSlots : int16 {
|
||||
SlotCharm = 0,
|
||||
SlotEar1,
|
||||
SlotHead,
|
||||
SlotFace,
|
||||
SlotEar2,
|
||||
SlotNeck, // 5
|
||||
SlotShoulders,
|
||||
SlotArms,
|
||||
SlotBack,
|
||||
SlotWrist1,
|
||||
SlotWrist2, // 10
|
||||
SlotRange,
|
||||
SlotHands,
|
||||
SlotPrimary,
|
||||
SlotSecondary,
|
||||
SlotFinger1, // 15
|
||||
SlotFinger2,
|
||||
SlotChest,
|
||||
SlotLegs,
|
||||
SlotFeet,
|
||||
SlotWaist, // 20
|
||||
SlotPowerSource = 9999, // temp
|
||||
SlotAmmo = 21, // temp
|
||||
SlotGeneral1,
|
||||
SlotGeneral2,
|
||||
SlotGeneral3,
|
||||
SlotGeneral4, // 25
|
||||
SlotGeneral5,
|
||||
SlotGeneral6,
|
||||
SlotGeneral7,
|
||||
SlotGeneral8,
|
||||
//SlotGeneral9,
|
||||
//SlotGeneral10,
|
||||
SlotCursor, // 30
|
||||
SlotCount
|
||||
};
|
||||
|
||||
enum MaterialSlots : uint8 {
|
||||
MaterialHead = 0,
|
||||
MaterialChest,
|
||||
MaterialArms,
|
||||
MaterialWrist,
|
||||
MaterialHands,
|
||||
MaterialLegs, // 5
|
||||
MaterialFeet,
|
||||
MaterialPrimary,
|
||||
MaterialSecondary,
|
||||
MaterialCount,
|
||||
MaterialInvalid = 255
|
||||
};
|
||||
|
||||
// these are currently hard-coded for existing inventory system..do not use in place of special client version handlers until ready
|
||||
static const uint16 TYPE_POSSESSIONS_SIZE = 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 = 5; // (need client values)
|
||||
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 = SlotCount; // no bitmask use..limits to size of client corpse window (see EQLimits::InventoryMapSize(MapCorpse, <EQClientVersion))
|
||||
static const uint16 TYPE_BAZAAR_SIZE = 80;
|
||||
static const uint16 TYPE_INSPECT_SIZE = 22;
|
||||
static const uint16 TYPE_REAL_ESTATE_SIZE = 0;
|
||||
static const uint16 TYPE_VIEW_MOD_PC_SIZE = 0;//NOT_USED;
|
||||
static const uint16 TYPE_VIEW_MOD_BANK_SIZE = 0;//NOT_USED;
|
||||
static const uint16 TYPE_VIEW_MOD_SHARED_BANK_SIZE = 0;//NOT_USED;
|
||||
static const uint16 TYPE_VIEW_MOD_LIMBO_SIZE = 0;//NOT_USED;
|
||||
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 = 0;
|
||||
static const uint16 TYPE_OTHER_SIZE = 0;
|
||||
|
||||
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
|
||||
// (these are mainly to assign specific values to constants used in conversions and to identify per-client ranges/offsets)
|
||||
static const int16 EQUIPMENT_BEGIN = SlotCharm;
|
||||
static const int16 EQUIPMENT_END = SlotAmmo;
|
||||
static const uint16 EQUIPMENT_SIZE = 22; // does not account for 'Power Source' - used mainly for npc equipment arrays
|
||||
|
||||
static const int16 GENERAL_BEGIN = SlotGeneral1;
|
||||
static const int16 GENERAL_END = SlotGeneral8;
|
||||
static const uint16 GENERAL_SIZE = 8;
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
static const int16 WORLD_BEGIN = 4000;
|
||||
static const int16 WORLD_END = 4009;
|
||||
static const int16 WORLD_SIZE = TYPE_WORLD_SIZE;
|
||||
|
||||
static const int16 TRIBUTE_BEGIN = 400;
|
||||
static const int16 TRIBUTE_END = 404;
|
||||
static const int16 TRIBUTE_SIZE = TYPE_TRIBUTE_SIZE;
|
||||
|
||||
static const int16 CORPSE_BEGIN = 22;
|
||||
//static const int16 CORPSE_END = RoF::consts::CORPSE_END; // not ready for use
|
||||
|
||||
static const int16 MATERIAL_BEGIN = MaterialHead;
|
||||
static const int16 MATERIAL_END = MaterialSecondary;
|
||||
static const int16 MATERIAL_TINT_END = MaterialFeet;
|
||||
static const int16 MATERIAL_SIZE = MaterialCount;
|
||||
|
||||
// items
|
||||
// common and container sizes will not increase until the new 'location' struct is implemented
|
||||
static const uint16 ITEM_COMMON_SIZE = 6;//RoF::consts::ITEM_COMMON_SIZE;
|
||||
static const uint16 ITEM_CONTAINER_SIZE = 10;//Titanium::consts::ITEM_CONTAINER_SIZE;
|
||||
|
||||
// BANDOLIERS_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
|
||||
static const size_t BANDOLIERS_SIZE = 20;//RoF2::consts::BANDOLIERS_SIZE; // number of bandolier instances
|
||||
static const size_t BANDOLIER_ITEM_COUNT = 4;//RoF2::consts::BANDOLIER_ITEM_COUNT; // number of equipment slots in bandolier instance
|
||||
|
||||
// POTION_BELT_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
|
||||
static const size_t POTION_BELT_ITEM_COUNT = 5;//RoF2::consts::POTION_BELT_ITEM_COUNT;
|
||||
|
||||
static const size_t TEXT_LINK_BODY_LENGTH = 56;//RoF2::consts::TEXT_LINK_BODY_LENGTH;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -801,25 +801,6 @@ static const uint8 SkillDamageTypes[HIGHEST_SKILL + 1] = // change to _SkillServ
|
||||
/*2HPiercing*/ 36 // Needs research (set for 1HPiercing value - similar to slash/blunt)
|
||||
};
|
||||
|
||||
/*
|
||||
** Material use slots
|
||||
**
|
||||
*/
|
||||
enum MaterialSlots : uint8
|
||||
{
|
||||
MaterialHead = 0,
|
||||
MaterialChest,
|
||||
MaterialArms,
|
||||
MaterialWrist,
|
||||
MaterialHands,
|
||||
MaterialLegs, // 5
|
||||
MaterialFeet,
|
||||
MaterialPrimary,
|
||||
MaterialSecondary,
|
||||
MaterialCount,
|
||||
MaterialInvalid = 255
|
||||
};
|
||||
|
||||
/*
|
||||
// Used for worn NPC inventory tracking. NPCs don't use
|
||||
// augments, so only the basic slots need to be kept track of.
|
||||
@@ -854,75 +835,6 @@ enum MaterialSlots : uint8
|
||||
**
|
||||
*/
|
||||
|
||||
enum InventoryTypes : int16
|
||||
{
|
||||
TypePossessions = 0,
|
||||
TypeBank,
|
||||
TypeSharedBank,
|
||||
TypeTrade,
|
||||
TypeWorld,
|
||||
TypeLimbo, // 5
|
||||
TypeTribute,
|
||||
TypeTrophyTribute,
|
||||
TypeGuildTribute,
|
||||
TypeMerchant,
|
||||
TypeDeleted, // 10
|
||||
TypeCorpse,
|
||||
TypeBazaar,
|
||||
TypeInspect,
|
||||
TypeRealEstate,
|
||||
TypeViewMODPC, // 15
|
||||
TypeViewMODBank,
|
||||
TypeViewMODSharedBank,
|
||||
TypeViewMODLimbo,
|
||||
TypeAltStorage,
|
||||
TypeArchived, // 20
|
||||
TypeMail,
|
||||
TypeGuildTrophyTribute,
|
||||
TypeKrono,
|
||||
TypeOther,
|
||||
TypeCount
|
||||
};
|
||||
|
||||
enum PossessionsSlots : int16
|
||||
{
|
||||
SlotCharm = 0,
|
||||
SlotEar1,
|
||||
SlotHead,
|
||||
SlotFace,
|
||||
SlotEar2,
|
||||
SlotNeck, // 5
|
||||
SlotShoulders,
|
||||
SlotArms,
|
||||
SlotBack,
|
||||
SlotWrist1,
|
||||
SlotWrist2, // 10
|
||||
SlotRange,
|
||||
SlotHands,
|
||||
SlotPrimary,
|
||||
SlotSecondary,
|
||||
SlotFinger1, // 15
|
||||
SlotFinger2,
|
||||
SlotChest,
|
||||
SlotLegs,
|
||||
SlotFeet,
|
||||
SlotWaist, // 20
|
||||
SlotPowerSource = 9999, // temp
|
||||
SlotAmmo = 21, // temp
|
||||
SlotGeneral1,
|
||||
SlotGeneral2,
|
||||
SlotGeneral3,
|
||||
SlotGeneral4, // 25
|
||||
SlotGeneral5,
|
||||
SlotGeneral6,
|
||||
SlotGeneral7,
|
||||
SlotGeneral8,
|
||||
//SlotGeneral9,
|
||||
//SlotGeneral10,
|
||||
SlotCursor, // 30
|
||||
SlotCount
|
||||
};
|
||||
|
||||
#define INVALID_INDEX -1
|
||||
#define NOT_USED 0
|
||||
#define NO_ITEM 0
|
||||
|
||||
+114
-114
@@ -56,34 +56,34 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
//
|
||||
// when setting NPC-based values, try to adhere to an constants::<property> or NOT_USED value to avoid unnecessary issues
|
||||
|
||||
static const uint16 local[TypeCount][versions::InventoryVersionCount] = {
|
||||
static const uint16 local[legacy::TypeCount][versions::InventoryVersionCount] = {
|
||||
// server and database are sync'd to current TypePossessions's client as set in 'using namespace RoF::slots;' and
|
||||
// 'constants::TYPE_POSSESSIONS_SIZE' - use/update EquipmentBitmask(), GeneralBitmask() and CursorBitmask()
|
||||
// for partial range validation checks and 'constants::TYPE_POSSESSIONS_SIZE' for full range iterations
|
||||
{ // local[TypePossessions]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ constants::TYPE_POSSESSIONS_SIZE,
|
||||
/*Titanium*/ constants::TYPE_POSSESSIONS_SIZE,
|
||||
/*SoF*/ constants::TYPE_POSSESSIONS_SIZE,
|
||||
/*SoD*/ constants::TYPE_POSSESSIONS_SIZE,
|
||||
/*Underfoot*/ constants::TYPE_POSSESSIONS_SIZE,
|
||||
/*RoF*/ constants::TYPE_POSSESSIONS_SIZE,
|
||||
/*RoF2*/ constants::TYPE_POSSESSIONS_SIZE,
|
||||
/*62*/ legacy::TYPE_POSSESSIONS_SIZE,
|
||||
/*Titanium*/ legacy::TYPE_POSSESSIONS_SIZE,
|
||||
/*SoF*/ legacy::TYPE_POSSESSIONS_SIZE,
|
||||
/*SoD*/ legacy::TYPE_POSSESSIONS_SIZE,
|
||||
/*Underfoot*/ legacy::TYPE_POSSESSIONS_SIZE,
|
||||
/*RoF*/ legacy::TYPE_POSSESSIONS_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_POSSESSIONS_SIZE,
|
||||
|
||||
/*NPC*/ constants::TYPE_POSSESSIONS_SIZE,
|
||||
/*Merc*/ constants::TYPE_POSSESSIONS_SIZE,
|
||||
/*Bot*/ constants::TYPE_POSSESSIONS_SIZE,
|
||||
/*Pet*/ constants::TYPE_POSSESSIONS_SIZE
|
||||
/*NPC*/ legacy::TYPE_POSSESSIONS_SIZE,
|
||||
/*Merc*/ legacy::TYPE_POSSESSIONS_SIZE,
|
||||
/*Bot*/ legacy::TYPE_POSSESSIONS_SIZE,
|
||||
/*Pet*/ legacy::TYPE_POSSESSIONS_SIZE
|
||||
},
|
||||
{ // local[TypeBank]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ NOT_USED,
|
||||
/*Titanium*/ Titanium::consts::TYPE_BANK_SIZE,
|
||||
/*SoF*/ constants::TYPE_BANK_SIZE,
|
||||
/*SoD*/ constants::TYPE_BANK_SIZE,
|
||||
/*Underfoot*/ constants::TYPE_BANK_SIZE,
|
||||
/*RoF*/ constants::TYPE_BANK_SIZE,
|
||||
/*RoF2*/ constants::TYPE_BANK_SIZE,
|
||||
/*SoF*/ legacy::TYPE_BANK_SIZE,
|
||||
/*SoD*/ legacy::TYPE_BANK_SIZE,
|
||||
/*Underfoot*/ legacy::TYPE_BANK_SIZE,
|
||||
/*RoF*/ legacy::TYPE_BANK_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_BANK_SIZE,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
@@ -92,13 +92,13 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
},
|
||||
{ // local[TypeSharedBank]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ constants::TYPE_SHARED_BANK_SIZE,
|
||||
/*Titanium*/ constants::TYPE_SHARED_BANK_SIZE,
|
||||
/*SoF*/ constants::TYPE_SHARED_BANK_SIZE,
|
||||
/*SoD*/ constants::TYPE_SHARED_BANK_SIZE,
|
||||
/*Underfoot*/ constants::TYPE_SHARED_BANK_SIZE,
|
||||
/*RoF*/ constants::TYPE_SHARED_BANK_SIZE,
|
||||
/*RoF2*/ constants::TYPE_SHARED_BANK_SIZE,
|
||||
/*62*/ legacy::TYPE_SHARED_BANK_SIZE,
|
||||
/*Titanium*/ legacy::TYPE_SHARED_BANK_SIZE,
|
||||
/*SoF*/ legacy::TYPE_SHARED_BANK_SIZE,
|
||||
/*SoD*/ legacy::TYPE_SHARED_BANK_SIZE,
|
||||
/*Underfoot*/ legacy::TYPE_SHARED_BANK_SIZE,
|
||||
/*RoF*/ legacy::TYPE_SHARED_BANK_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_SHARED_BANK_SIZE,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
@@ -107,28 +107,28 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
},
|
||||
{ // local[TypeTrade]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ constants::TYPE_TRADE_SIZE,
|
||||
/*Titanium*/ constants::TYPE_TRADE_SIZE,
|
||||
/*SoF*/ constants::TYPE_TRADE_SIZE,
|
||||
/*SoD*/ constants::TYPE_TRADE_SIZE,
|
||||
/*Underfoot*/ constants::TYPE_TRADE_SIZE,
|
||||
/*RoF*/ constants::TYPE_TRADE_SIZE,
|
||||
/*RoF2*/ constants::TYPE_TRADE_SIZE,
|
||||
/*62*/ legacy::TYPE_TRADE_SIZE,
|
||||
/*Titanium*/ legacy::TYPE_TRADE_SIZE,
|
||||
/*SoF*/ legacy::TYPE_TRADE_SIZE,
|
||||
/*SoD*/ legacy::TYPE_TRADE_SIZE,
|
||||
/*Underfoot*/ legacy::TYPE_TRADE_SIZE,
|
||||
/*RoF*/ legacy::TYPE_TRADE_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_TRADE_SIZE,
|
||||
|
||||
/*NPC*/ 4,
|
||||
/*Merc*/ 4,
|
||||
/*Bot*/ constants::TYPE_TRADE_SIZE, // client thinks this is another client
|
||||
/*Bot*/ legacy::TYPE_TRADE_SIZE, // client thinks this is another client
|
||||
/*Pet*/ 4
|
||||
},
|
||||
{ // local[TypeWorld]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ constants::TYPE_WORLD_SIZE,
|
||||
/*Titanium*/ constants::TYPE_WORLD_SIZE,
|
||||
/*SoF*/ constants::TYPE_WORLD_SIZE,
|
||||
/*SoD*/ constants::TYPE_WORLD_SIZE,
|
||||
/*Underfoot*/ constants::TYPE_WORLD_SIZE,
|
||||
/*RoF*/ constants::TYPE_WORLD_SIZE,
|
||||
/*RoF2*/ constants::TYPE_WORLD_SIZE,
|
||||
/*62*/ legacy::TYPE_WORLD_SIZE,
|
||||
/*Titanium*/ legacy::TYPE_WORLD_SIZE,
|
||||
/*SoF*/ legacy::TYPE_WORLD_SIZE,
|
||||
/*SoD*/ legacy::TYPE_WORLD_SIZE,
|
||||
/*Underfoot*/ legacy::TYPE_WORLD_SIZE,
|
||||
/*RoF*/ legacy::TYPE_WORLD_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_WORLD_SIZE,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
@@ -137,13 +137,13 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
},
|
||||
{ // local[TypeLimbo]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ constants::TYPE_LIMBO_SIZE,
|
||||
/*Titanium*/ constants::TYPE_LIMBO_SIZE,
|
||||
/*SoF*/ constants::TYPE_LIMBO_SIZE,
|
||||
/*SoD*/ constants::TYPE_LIMBO_SIZE,
|
||||
/*Underfoot*/ constants::TYPE_LIMBO_SIZE,
|
||||
/*RoF*/ constants::TYPE_LIMBO_SIZE,
|
||||
/*RoF2*/ constants::TYPE_LIMBO_SIZE,
|
||||
/*62*/ legacy::TYPE_LIMBO_SIZE,
|
||||
/*Titanium*/ legacy::TYPE_LIMBO_SIZE,
|
||||
/*SoF*/ legacy::TYPE_LIMBO_SIZE,
|
||||
/*SoD*/ legacy::TYPE_LIMBO_SIZE,
|
||||
/*Underfoot*/ legacy::TYPE_LIMBO_SIZE,
|
||||
/*RoF*/ legacy::TYPE_LIMBO_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_LIMBO_SIZE,
|
||||
|
||||
/*NPC*/ NOT_USED,
|
||||
/*Merc*/ NOT_USED,
|
||||
@@ -152,13 +152,13 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
},
|
||||
{ // local[TypeTribute]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ constants::TYPE_TRIBUTE_SIZE,
|
||||
/*Titanium*/ constants::TYPE_TRIBUTE_SIZE,
|
||||
/*SoF*/ constants::TYPE_TRIBUTE_SIZE,
|
||||
/*SoD*/ constants::TYPE_TRIBUTE_SIZE,
|
||||
/*Underfoot*/ constants::TYPE_TRIBUTE_SIZE,
|
||||
/*RoF*/ constants::TYPE_TRIBUTE_SIZE,
|
||||
/*RoF2*/ constants::TYPE_TRIBUTE_SIZE,
|
||||
/*62*/ legacy::TYPE_TRIBUTE_SIZE,
|
||||
/*Titanium*/ legacy::TYPE_TRIBUTE_SIZE,
|
||||
/*SoF*/ legacy::TYPE_TRIBUTE_SIZE,
|
||||
/*SoD*/ legacy::TYPE_TRIBUTE_SIZE,
|
||||
/*Underfoot*/ legacy::TYPE_TRIBUTE_SIZE,
|
||||
/*RoF*/ legacy::TYPE_TRIBUTE_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_TRIBUTE_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -172,8 +172,8 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ constants::TYPE_TROPHY_TRIBUTE_SIZE,
|
||||
/*RoF2*/ constants::TYPE_TROPHY_TRIBUTE_SIZE,
|
||||
/*RoF*/ legacy::TYPE_TROPHY_TRIBUTE_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_TROPHY_TRIBUTE_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -187,8 +187,8 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ constants::TYPE_GUILD_TRIBUTE_SIZE,
|
||||
/*RoF2*/ constants::TYPE_GUILD_TRIBUTE_SIZE,
|
||||
/*RoF*/ legacy::TYPE_GUILD_TRIBUTE_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_GUILD_TRIBUTE_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -202,8 +202,8 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ constants::TYPE_MERCHANT_SIZE,
|
||||
/*RoF2*/ constants::TYPE_MERCHANT_SIZE,
|
||||
/*RoF*/ legacy::TYPE_MERCHANT_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_MERCHANT_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -217,8 +217,8 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ constants::TYPE_DELETED_SIZE,
|
||||
/*RoF2*/ constants::TYPE_DELETED_SIZE,
|
||||
/*RoF*/ legacy::TYPE_DELETED_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_DELETED_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -242,15 +242,15 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
},
|
||||
{ // local[TypeBazaar]
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ constants::TYPE_BAZAAR_SIZE,
|
||||
/*Titanium*/ constants::TYPE_BAZAAR_SIZE,
|
||||
/*SoF*/ constants::TYPE_BAZAAR_SIZE,
|
||||
/*SoD*/ constants::TYPE_BAZAAR_SIZE,
|
||||
/*Underfoot*/ constants::TYPE_BAZAAR_SIZE,
|
||||
/*RoF*/ constants::TYPE_BAZAAR_SIZE,
|
||||
/*RoF2*/ constants::TYPE_BAZAAR_SIZE,
|
||||
/*62*/ legacy::TYPE_BAZAAR_SIZE,
|
||||
/*Titanium*/ legacy::TYPE_BAZAAR_SIZE,
|
||||
/*SoF*/ legacy::TYPE_BAZAAR_SIZE,
|
||||
/*SoD*/ legacy::TYPE_BAZAAR_SIZE,
|
||||
/*Underfoot*/ legacy::TYPE_BAZAAR_SIZE,
|
||||
/*RoF*/ legacy::TYPE_BAZAAR_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_BAZAAR_SIZE,
|
||||
|
||||
/*NPC*/ 0, // this may need to be 'constants::TYPE_BAZAAR_SIZE' if offline client traders respawn as an npc
|
||||
/*NPC*/ 0, // this may need to be 'legacy::TYPE_BAZAAR_SIZE' if offline client traders respawn as an npc
|
||||
/*Merc*/ 0,
|
||||
/*Bot*/ 0,
|
||||
/*Pet*/ 0
|
||||
@@ -277,8 +277,8 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ constants::TYPE_REAL_ESTATE_SIZE,
|
||||
/*RoF2*/ constants::TYPE_REAL_ESTATE_SIZE,
|
||||
/*RoF*/ legacy::TYPE_REAL_ESTATE_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_REAL_ESTATE_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -292,8 +292,8 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ constants::TYPE_VIEW_MOD_PC_SIZE,
|
||||
/*RoF2*/ constants::TYPE_VIEW_MOD_PC_SIZE,
|
||||
/*RoF*/ legacy::TYPE_VIEW_MOD_PC_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_VIEW_MOD_PC_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -307,8 +307,8 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ constants::TYPE_VIEW_MOD_BANK_SIZE,
|
||||
/*RoF2*/ constants::TYPE_VIEW_MOD_BANK_SIZE,
|
||||
/*RoF*/ legacy::TYPE_VIEW_MOD_BANK_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_VIEW_MOD_BANK_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -322,8 +322,8 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ constants::TYPE_VIEW_MOD_SHARED_BANK_SIZE,
|
||||
/*RoF2*/ constants::TYPE_VIEW_MOD_SHARED_BANK_SIZE,
|
||||
/*RoF*/ legacy::TYPE_VIEW_MOD_SHARED_BANK_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_VIEW_MOD_SHARED_BANK_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -337,8 +337,8 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ constants::TYPE_VIEW_MOD_LIMBO_SIZE,
|
||||
/*RoF2*/ constants::TYPE_VIEW_MOD_LIMBO_SIZE,
|
||||
/*RoF*/ legacy::TYPE_VIEW_MOD_LIMBO_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_VIEW_MOD_LIMBO_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -352,8 +352,8 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ constants::TYPE_ALT_STORAGE_SIZE,
|
||||
/*RoF2*/ constants::TYPE_ALT_STORAGE_SIZE,
|
||||
/*RoF*/ legacy::TYPE_ALT_STORAGE_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_ALT_STORAGE_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -367,8 +367,8 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ constants::TYPE_ARCHIVED_SIZE,
|
||||
/*RoF2*/ constants::TYPE_ARCHIVED_SIZE,
|
||||
/*RoF*/ legacy::TYPE_ARCHIVED_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_ARCHIVED_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -382,8 +382,8 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ constants::TYPE_MAIL_SIZE,
|
||||
/*RoF2*/ constants::TYPE_MAIL_SIZE,
|
||||
/*RoF*/ legacy::TYPE_MAIL_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_MAIL_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -397,8 +397,8 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ constants::TYPE_GUILD_TROPHY_TRIBUTE_SIZE,
|
||||
/*RoF2*/ constants::TYPE_GUILD_TROPHY_TRIBUTE_SIZE,
|
||||
/*RoF*/ legacy::TYPE_GUILD_TROPHY_TRIBUTE_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_GUILD_TROPHY_TRIBUTE_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -412,8 +412,8 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
/*SoF*/ NOT_USED,
|
||||
/*SoD*/ NOT_USED,
|
||||
/*Underfoot*/ NOT_USED,
|
||||
/*RoF*/ constants::TYPE_KRONO_SIZE,
|
||||
/*RoF2*/ constants::TYPE_KRONO_SIZE,
|
||||
/*RoF*/ legacy::TYPE_KRONO_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_KRONO_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -427,8 +427,8 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
/*SoF*/ 0,
|
||||
/*SoD*/ 0,
|
||||
/*Underfoot*/ 0,
|
||||
/*RoF*/ constants::TYPE_OTHER_SIZE,
|
||||
/*RoF2*/ constants::TYPE_OTHER_SIZE,
|
||||
/*RoF*/ legacy::TYPE_OTHER_SIZE,
|
||||
/*RoF2*/ legacy::TYPE_OTHER_SIZE,
|
||||
|
||||
/*NPC*/ 0,
|
||||
/*Merc*/ 0,
|
||||
@@ -437,7 +437,7 @@ uint16 EQEmu::limits::InventoryTypeSize(versions::InventoryVersion inventory_ver
|
||||
}
|
||||
};
|
||||
|
||||
if ((uint16)inv_type < TypeCount)
|
||||
if ((uint16)inv_type < legacy::TypeCount)
|
||||
return local[inv_type][static_cast<size_t>(versions::ValidateInventoryVersion(inventory_version))];
|
||||
|
||||
return NOT_USED;
|
||||
@@ -584,18 +584,18 @@ uint16 EQEmu::limits::ItemCommonSize(versions::InventoryVersion inventory_versio
|
||||
{
|
||||
static const uint16 local[versions::InventoryVersionCount] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ constants::ITEM_COMMON_SIZE,
|
||||
/*Titanium*/ constants::ITEM_COMMON_SIZE,
|
||||
/*SoF*/ constants::ITEM_COMMON_SIZE,
|
||||
/*SoD*/ constants::ITEM_COMMON_SIZE,
|
||||
/*Underfoot*/ constants::ITEM_COMMON_SIZE,
|
||||
/*RoF*/ constants::ITEM_COMMON_SIZE,
|
||||
/*RoF2*/ constants::ITEM_COMMON_SIZE,
|
||||
/*62*/ legacy::ITEM_COMMON_SIZE,
|
||||
/*Titanium*/ legacy::ITEM_COMMON_SIZE,
|
||||
/*SoF*/ legacy::ITEM_COMMON_SIZE,
|
||||
/*SoD*/ legacy::ITEM_COMMON_SIZE,
|
||||
/*Underfoot*/ legacy::ITEM_COMMON_SIZE,
|
||||
/*RoF*/ legacy::ITEM_COMMON_SIZE,
|
||||
/*RoF2*/ legacy::ITEM_COMMON_SIZE,
|
||||
|
||||
/*NPC*/ constants::ITEM_COMMON_SIZE,
|
||||
/*Merc*/ constants::ITEM_COMMON_SIZE,
|
||||
/*Bot*/ constants::ITEM_COMMON_SIZE,
|
||||
/*Pet*/ constants::ITEM_COMMON_SIZE
|
||||
/*NPC*/ legacy::ITEM_COMMON_SIZE,
|
||||
/*Merc*/ legacy::ITEM_COMMON_SIZE,
|
||||
/*Bot*/ legacy::ITEM_COMMON_SIZE,
|
||||
/*Pet*/ legacy::ITEM_COMMON_SIZE
|
||||
};
|
||||
|
||||
return local[static_cast<size_t>(versions::ValidateInventoryVersion(inventory_version))];
|
||||
@@ -605,18 +605,18 @@ uint16 EQEmu::limits::ItemContainerSize(versions::InventoryVersion inventory_ver
|
||||
{
|
||||
static const uint16 local[versions::InventoryVersionCount] = {
|
||||
/*Unknown*/ NOT_USED,
|
||||
/*62*/ constants::ITEM_CONTAINER_SIZE,
|
||||
/*Titanium*/ constants::ITEM_CONTAINER_SIZE,
|
||||
/*SoF*/ constants::ITEM_CONTAINER_SIZE,
|
||||
/*SoD*/ constants::ITEM_CONTAINER_SIZE,
|
||||
/*Underfoot*/ constants::ITEM_CONTAINER_SIZE,
|
||||
/*RoF*/ constants::ITEM_CONTAINER_SIZE,
|
||||
/*RoF2*/ constants::ITEM_CONTAINER_SIZE,
|
||||
/*62*/ legacy::ITEM_CONTAINER_SIZE,
|
||||
/*Titanium*/ legacy::ITEM_CONTAINER_SIZE,
|
||||
/*SoF*/ legacy::ITEM_CONTAINER_SIZE,
|
||||
/*SoD*/ legacy::ITEM_CONTAINER_SIZE,
|
||||
/*Underfoot*/ legacy::ITEM_CONTAINER_SIZE,
|
||||
/*RoF*/ legacy::ITEM_CONTAINER_SIZE,
|
||||
/*RoF2*/ legacy::ITEM_CONTAINER_SIZE,
|
||||
|
||||
/*NPC*/ constants::ITEM_CONTAINER_SIZE,
|
||||
/*Merc*/ constants::ITEM_CONTAINER_SIZE,
|
||||
/*Bot*/ constants::ITEM_CONTAINER_SIZE,
|
||||
/*Pet*/ constants::ITEM_CONTAINER_SIZE
|
||||
/*NPC*/ legacy::ITEM_CONTAINER_SIZE,
|
||||
/*Merc*/ legacy::ITEM_CONTAINER_SIZE,
|
||||
/*Bot*/ legacy::ITEM_CONTAINER_SIZE,
|
||||
/*Pet*/ legacy::ITEM_CONTAINER_SIZE
|
||||
};
|
||||
|
||||
return local[static_cast<size_t>(versions::ValidateInventoryVersion(inventory_version))];
|
||||
|
||||
+13
-13
@@ -293,7 +293,7 @@ struct Spawn_Struct {
|
||||
/*0000*/ EquipStruct equip_primary; // Equipment: Main visual
|
||||
/*0000*/ EquipStruct equip_secondary; // Equipment: Off visual
|
||||
} equip;
|
||||
/*0000*/ EquipStruct equipment[MaterialCount];
|
||||
/*0000*/ EquipStruct equipment[EQEmu::legacy::MaterialCount];
|
||||
};
|
||||
/*0233*/ float runspeed; // Speed when running
|
||||
/*0036*/ uint8 afk; // 0=no, 1=afk
|
||||
@@ -339,7 +339,7 @@ union
|
||||
/*0376*/ Color_Struct color_primary; // Color of primary item
|
||||
/*0380*/ Color_Struct color_secondary; // Color of secondary item
|
||||
} equipment_colors;
|
||||
/*0348*/ Color_Struct colors[MaterialCount]; // Array elements correspond to struct equipment_colors above
|
||||
/*0348*/ Color_Struct colors[EQEmu::legacy::MaterialCount]; // Array elements correspond to struct equipment_colors above
|
||||
};
|
||||
/*0384*/ uint8 lfg; // 0=off, 1=lfg on
|
||||
/*0385*/
|
||||
@@ -776,7 +776,7 @@ struct BandolierItem_Struct
|
||||
struct Bandolier_Struct
|
||||
{
|
||||
char Name[32];
|
||||
BandolierItem_Struct Items[EQEmu::constants::BANDOLIER_ITEM_COUNT];
|
||||
BandolierItem_Struct Items[EQEmu::legacy::BANDOLIER_ITEM_COUNT];
|
||||
};
|
||||
|
||||
//len = 72
|
||||
@@ -790,7 +790,7 @@ struct PotionBeltItem_Struct
|
||||
//len = 288
|
||||
struct PotionBelt_Struct
|
||||
{
|
||||
PotionBeltItem_Struct Items[EQEmu::constants::POTION_BELT_ITEM_COUNT];
|
||||
PotionBeltItem_Struct Items[EQEmu::legacy::POTION_BELT_ITEM_COUNT];
|
||||
};
|
||||
|
||||
struct MovePotionToBelt_Struct
|
||||
@@ -881,7 +881,7 @@ struct SuspendedMinion_Struct
|
||||
/*002*/ uint32 HP;
|
||||
/*006*/ uint32 Mana;
|
||||
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||
/*510*/ uint32 Items[MaterialCount];
|
||||
/*510*/ uint32 Items[EQEmu::legacy::MaterialCount];
|
||||
/*546*/ char Name[64];
|
||||
/*610*/
|
||||
};
|
||||
@@ -989,9 +989,9 @@ struct PlayerProfile_Struct
|
||||
/*0304*/ uint8 ability_time_minutes;
|
||||
/*0305*/ uint8 ability_time_hours; //place holder
|
||||
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
|
||||
/*0312*/ uint32 item_material[MaterialCount]; // Item texture/material of worn/held items
|
||||
/*0312*/ uint32 item_material[EQEmu::legacy::MaterialCount]; // Item texture/material of worn/held items
|
||||
/*0348*/ uint8 unknown0348[44];
|
||||
/*0392*/ Color_Struct item_tint[MaterialCount];
|
||||
/*0392*/ Color_Struct item_tint[EQEmu::legacy::MaterialCount];
|
||||
/*0428*/ AA_Array aa_array[MAX_PP_AA_ARRAY];
|
||||
/*2348*/ float unknown2384; //seen ~128, ~47
|
||||
/*2352*/ char servername[32]; // length probably not right
|
||||
@@ -1092,7 +1092,7 @@ struct PlayerProfile_Struct
|
||||
/*7212*/ uint32 tribute_points;
|
||||
/*7216*/ uint32 unknown7252;
|
||||
/*7220*/ uint32 tribute_active; //1=active
|
||||
/*7224*/ Tribute_Struct tributes[EQEmu::constants::TRIBUTE_SIZE];
|
||||
/*7224*/ Tribute_Struct tributes[EQEmu::legacy::TRIBUTE_SIZE];
|
||||
/*7264*/ Disciplines_Struct disciplines;
|
||||
/*7664*/ uint32 recastTimers[MAX_RECAST_TYPES]; // Timers (GMT of last use)
|
||||
/*7744*/ char unknown7780[160];
|
||||
@@ -1119,7 +1119,7 @@ struct PlayerProfile_Struct
|
||||
/*12800*/ uint32 expAA;
|
||||
/*12804*/ uint32 aapoints; //avaliable, unspent
|
||||
/*12808*/ uint8 unknown12844[36];
|
||||
/*12844*/ Bandolier_Struct bandoliers[EQEmu::constants::BANDOLIERS_SIZE];
|
||||
/*12844*/ Bandolier_Struct bandoliers[EQEmu::legacy::BANDOLIERS_SIZE];
|
||||
/*14124*/ uint8 unknown14160[4506];
|
||||
/*18630*/ SuspendedMinion_Struct SuspendedMinion; // No longer in use
|
||||
/*19240*/ uint32 timeentitledonaccount;
|
||||
@@ -2124,7 +2124,7 @@ struct Illusion_Struct { //size: 256 - SoF
|
||||
/*092*/ uint32 drakkin_heritage; //
|
||||
/*096*/ uint32 drakkin_tattoo; //
|
||||
/*100*/ uint32 drakkin_details; //
|
||||
/*104*/ uint32 armor_tint[MaterialCount]; //
|
||||
/*104*/ uint32 armor_tint[EQEmu::legacy::MaterialCount]; //
|
||||
/*140*/ uint8 eyecolor1; // Field Not Identified in any Illusion Struct
|
||||
/*141*/ uint8 eyecolor2; // Field Not Identified in any Illusion Struct
|
||||
/*142*/ uint8 unknown138[114]; //
|
||||
@@ -3411,7 +3411,7 @@ struct DyeStruct
|
||||
struct Color_Struct secondary; // or this
|
||||
}
|
||||
dyes;
|
||||
struct Color_Struct dye[MaterialCount];
|
||||
struct Color_Struct dye[EQEmu::legacy::MaterialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -3472,8 +3472,8 @@ struct SelectTributeReply_Struct {
|
||||
|
||||
struct TributeInfo_Struct {
|
||||
uint32 active; //0 == inactive, 1 == active
|
||||
uint32 tributes[EQEmu::constants::TRIBUTE_SIZE]; //-1 == NONE
|
||||
uint32 tiers[EQEmu::constants::TRIBUTE_SIZE]; //all 00's
|
||||
uint32 tributes[EQEmu::legacy::TRIBUTE_SIZE]; //-1 == NONE
|
||||
uint32 tiers[EQEmu::legacy::TRIBUTE_SIZE]; //all 00's
|
||||
uint32 tribute_master_id;
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ struct ExtendedProfile_Struct {
|
||||
uint16 old_pet_hp; /* Not Used */
|
||||
uint16 old_pet_mana; /* Not Used */
|
||||
SpellBuff_Struct pet_buffs[BUFF_COUNT]; /* Not Used */
|
||||
uint32 pet_items[MaterialCount]; /* Not Used */
|
||||
uint32 pet_items[EQEmu::legacy::MaterialCount]; /* Not Used */
|
||||
char merc_name[64]; /* Used */
|
||||
|
||||
uint32 aa_effects; /* Used */
|
||||
|
||||
+196
-196
File diff suppressed because it is too large
Load Diff
@@ -183,9 +183,9 @@ struct Item_Struct {
|
||||
int32 FactionAmt4; // Faction Amt 4
|
||||
char CharmFile[32]; // ?
|
||||
uint32 AugType;
|
||||
uint8 AugSlotType[EQEmu::constants::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Type
|
||||
uint8 AugSlotVisible[EQEmu::constants::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Visible
|
||||
uint8 AugSlotUnk2[EQEmu::constants::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Unknown Most likely Powersource related
|
||||
uint8 AugSlotType[EQEmu::legacy::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Type
|
||||
uint8 AugSlotVisible[EQEmu::legacy::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Visible
|
||||
uint8 AugSlotUnk2[EQEmu::legacy::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Unknown Most likely Powersource related
|
||||
uint32 LDoNTheme;
|
||||
uint32 LDoNPrice;
|
||||
uint32 LDoNSold;
|
||||
|
||||
+63
-63
@@ -2342,7 +2342,7 @@ namespace RoF
|
||||
outapp->WriteUInt32(consts::BANDOLIERS_SIZE);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (uint32 r = 0; r < EQEmu::constants::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (uint32 r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
outapp->WriteString(emu->bandoliers[r].Name);
|
||||
for (uint32 j = 0; j < consts::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString(emu->bandoliers[r].Items[j].Name);
|
||||
@@ -2357,7 +2357,7 @@ namespace RoF
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (uint32 r = EQEmu::constants::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (uint32 r = EQEmu::legacy::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
outapp->WriteString("");
|
||||
for (uint32 j = 0; j < consts::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString("");
|
||||
@@ -2369,7 +2369,7 @@ namespace RoF
|
||||
outapp->WriteUInt32(consts::POTION_BELT_ITEM_COUNT);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (uint32 r = 0; r < EQEmu::constants::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (uint32 r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
outapp->WriteString(emu->potionbelt.Items[r].Name);
|
||||
outapp->WriteUInt32(emu->potionbelt.Items[r].ID);
|
||||
if (emu->potionbelt.Items[r].Icon) {
|
||||
@@ -2381,7 +2381,7 @@ namespace RoF
|
||||
}
|
||||
}
|
||||
// Nullify potion belt where server and client indexes diverge, with a client bias
|
||||
for (uint32 r = EQEmu::constants::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (uint32 r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
outapp->WriteString("");
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteSInt32(-1);
|
||||
@@ -2502,9 +2502,9 @@ namespace RoF
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
outapp->WriteUInt32(EQEmu::constants::TRIBUTE_SIZE);
|
||||
outapp->WriteUInt32(EQEmu::legacy::TRIBUTE_SIZE);
|
||||
|
||||
for (uint32 r = 0; r < EQEmu::constants::TRIBUTE_SIZE; r++)
|
||||
for (uint32 r = 0; r < EQEmu::legacy::TRIBUTE_SIZE; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->tributes[r].tribute);
|
||||
outapp->WriteUInt32(emu->tributes[r].tier);
|
||||
@@ -3037,7 +3037,7 @@ namespace RoF
|
||||
eq_cse->Gender = emu_cse->Gender;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < MaterialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
@@ -4101,13 +4101,13 @@ namespace RoF
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
@@ -4810,7 +4810,7 @@ namespace RoF
|
||||
|
||||
IN(item_id);
|
||||
int r;
|
||||
for (r = 0; r < EQEmu::constants::ITEM_COMMON_SIZE; r++) {
|
||||
for (r = 0; r < EQEmu::legacy::ITEM_COMMON_SIZE; r++) {
|
||||
IN(augments[r]);
|
||||
}
|
||||
// Max Augs is now 6, but no code to support that many yet
|
||||
@@ -5678,7 +5678,7 @@ namespace RoF
|
||||
|
||||
uint32 SubLengths[10];
|
||||
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::constants::ITEM_CONTAINER_SIZE; ++x) {
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++x) {
|
||||
|
||||
SubSerializations[x] = nullptr;
|
||||
|
||||
@@ -5690,15 +5690,15 @@ namespace RoF
|
||||
|
||||
iqbs.subitem_count++;
|
||||
|
||||
if (slot_id_in >= EQEmu::constants::GENERAL_BEGIN && slot_id_in <= EQEmu::constants::GENERAL_END) // (< 30) - no cursor?
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END) // (< 30) - no cursor?
|
||||
//SubSlotNumber = (((slot_id_in + 3) * 10) + x + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::constants::BANK_BEGIN && slot_id_in <= EQEmu::constants::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2000) * 10) + 2030 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::constants::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::constants::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2500) * 10) + 2530 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::SHARED_BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::SHARED_BANK_BAGS_BEGIN + x);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + x);
|
||||
else
|
||||
SubSlotNumber = slot_id_in; // ???????
|
||||
|
||||
@@ -5713,7 +5713,7 @@ namespace RoF
|
||||
|
||||
ss.write((const char*)&iqbs, sizeof(RoF::structs::ItemQuaternaryBodyStruct));
|
||||
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::constants::ITEM_CONTAINER_SIZE; ++x) {
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++x) {
|
||||
|
||||
if (SubSerializations[x]) {
|
||||
|
||||
@@ -5745,17 +5745,17 @@ namespace RoF
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == SlotPowerSource) { // Main Inventory and Cursor
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // Main Inventory and Cursor
|
||||
RoFSlot.Type = inventory::TypePossessions;
|
||||
RoFSlot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == SlotPowerSource)
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
RoFSlot.Slot = inventory::SlotPowerSource;
|
||||
|
||||
else if (serverSlot >= SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoFSlot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= SlotAmmo) // (> 20)
|
||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // (> 20)
|
||||
RoFSlot.Slot += 1;
|
||||
}
|
||||
|
||||
@@ -5764,51 +5764,51 @@ namespace RoF
|
||||
RoFSlot.MainSlot = ServerSlot - 31;
|
||||
}*/
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::constants::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
RoFSlot.Type = inventory::TypePossessions;
|
||||
TempSlot = serverSlot - 1;
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
|
||||
if (RoFSlot.Slot >= inventory::SlotGeneral9) // (> 30)
|
||||
RoFSlot.Slot = inventory::SlotCursor;
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::TRIBUTE_BEGIN && serverSlot <= EQEmu::constants::TRIBUTE_END) { // Tribute
|
||||
else if (serverSlot >= EQEmu::legacy::TRIBUTE_BEGIN && serverSlot <= EQEmu::legacy::TRIBUTE_END) { // Tribute
|
||||
RoFSlot.Type = inventory::TypeTribute;
|
||||
RoFSlot.Slot = serverSlot - EQEmu::constants::TRIBUTE_BEGIN;
|
||||
RoFSlot.Slot = serverSlot - EQEmu::legacy::TRIBUTE_BEGIN;
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::BANK_BEGIN && serverSlot <= EQEmu::constants::BANK_BAGS_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END) {
|
||||
RoFSlot.Type = inventory::TypeBank;
|
||||
TempSlot = serverSlot - EQEmu::constants::BANK_BEGIN;
|
||||
TempSlot = serverSlot - EQEmu::legacy::BANK_BEGIN;
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::SHARED_BANK_BEGIN && serverSlot <= EQEmu::constants::SHARED_BANK_BAGS_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END) {
|
||||
RoFSlot.Type = inventory::TypeSharedBank;
|
||||
TempSlot = serverSlot - EQEmu::constants::SHARED_BANK_BEGIN;
|
||||
TempSlot = serverSlot - EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::TRADE_BEGIN && serverSlot <= EQEmu::constants::TRADE_BAGS_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::TRADE_BEGIN && serverSlot <= EQEmu::legacy::TRADE_BAGS_END) {
|
||||
RoFSlot.Type = inventory::TypeTrade;
|
||||
TempSlot = serverSlot - EQEmu::constants::TRADE_BEGIN;
|
||||
TempSlot = serverSlot - EQEmu::legacy::TRADE_BEGIN;
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) {
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -5825,9 +5825,9 @@ namespace RoF
|
||||
*/
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::WORLD_BEGIN && serverSlot <= EQEmu::constants::WORLD_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::WORLD_BEGIN && serverSlot <= EQEmu::legacy::WORLD_END) {
|
||||
RoFSlot.Type = inventory::TypeWorld;
|
||||
TempSlot = serverSlot - EQEmu::constants::WORLD_BEGIN;
|
||||
TempSlot = serverSlot - EQEmu::legacy::WORLD_BEGIN;
|
||||
RoFSlot.Slot = TempSlot;
|
||||
}
|
||||
|
||||
@@ -5846,16 +5846,16 @@ namespace RoF
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == SlotPowerSource) { // (< 52)
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // (< 52)
|
||||
RoFSlot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == SlotPowerSource)
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
RoFSlot.Slot = inventory::SlotPowerSource;
|
||||
|
||||
else if (serverSlot >= SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoFSlot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= SlotAmmo) // Ammo and Personl Inventory
|
||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // Ammo and Personl Inventory
|
||||
RoFSlot.Slot += 1;
|
||||
|
||||
/*else if (ServerSlot >= MainCursor) { // Cursor
|
||||
@@ -5866,10 +5866,10 @@ namespace RoF
|
||||
}*/
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::constants::CURSOR_BAG_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) {
|
||||
TempSlot = serverSlot - 1;
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
}
|
||||
|
||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF Slots: Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoFSlot.Slot, RoFSlot.SubIndex, RoFSlot.AugIndex, RoFSlot.Unknown01);
|
||||
@@ -5889,7 +5889,7 @@ namespace RoF
|
||||
|
||||
if (rofSlot.Type == inventory::TypePossessions && rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||
if (rofSlot.Slot == inventory::SlotPowerSource)
|
||||
TempSlot = SlotPowerSource;
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
|
||||
else if (rofSlot.Slot >= inventory::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rofSlot.Slot - 3;
|
||||
@@ -5912,16 +5912,16 @@ namespace RoF
|
||||
TempSlot = rofSlot.Slot;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rofSlot.Type == inventory::TypeBank) {
|
||||
TempSlot = EQEmu::constants::BANK_BEGIN;
|
||||
TempSlot = EQEmu::legacy::BANK_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rofSlot.Slot;
|
||||
@@ -5930,10 +5930,10 @@ namespace RoF
|
||||
}
|
||||
|
||||
else if (rofSlot.Type == inventory::TypeSharedBank) {
|
||||
TempSlot = EQEmu::constants::SHARED_BANK_BEGIN;
|
||||
TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rofSlot.Slot;
|
||||
@@ -5942,12 +5942,12 @@ namespace RoF
|
||||
}
|
||||
|
||||
else if (rofSlot.Type == inventory::TypeTrade) {
|
||||
TempSlot = EQEmu::constants::TRADE_BEGIN;
|
||||
TempSlot = EQEmu::legacy::TRADE_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
// OLD CODE:
|
||||
//TempSlot += 100 + (RoFSlot.MainSlot * EQEmu::constants::ITEM_CONTAINER_SIZE) + RoFSlot.SubSlot;
|
||||
//TempSlot += 100 + (RoFSlot.MainSlot * EQEmu::legacy::ITEM_CONTAINER_SIZE) + RoFSlot.SubSlot;
|
||||
|
||||
else
|
||||
TempSlot += rofSlot.Slot;
|
||||
@@ -5956,7 +5956,7 @@ namespace RoF
|
||||
}
|
||||
|
||||
else if (rofSlot.Type == inventory::TypeWorld) {
|
||||
TempSlot = EQEmu::constants::WORLD_BEGIN;
|
||||
TempSlot = EQEmu::legacy::WORLD_BEGIN;
|
||||
|
||||
if (rofSlot.Slot >= SUB_INDEX_BEGIN)
|
||||
TempSlot += rofSlot.Slot;
|
||||
@@ -5989,7 +5989,7 @@ namespace RoF
|
||||
|
||||
if (rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
||||
if (rofSlot.Slot == inventory::SlotPowerSource)
|
||||
TempSlot = SlotPowerSource;
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
|
||||
else if (rofSlot.Slot >= inventory::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rofSlot.Slot - 3;
|
||||
@@ -6007,7 +6007,7 @@ namespace RoF
|
||||
TempSlot = rofSlot.Slot;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
@@ -6024,7 +6024,7 @@ namespace RoF
|
||||
|
||||
static inline void ServerToRoFTextLink(std::string& rofTextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::constants::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
rofTextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -6033,7 +6033,7 @@ namespace RoF
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
rofTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -6063,7 +6063,7 @@ namespace RoF
|
||||
|
||||
static inline void RoFToServerTextLink(std::string& serverTextLink, const std::string& rofTextLink)
|
||||
{
|
||||
if ((EQEmu::constants::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (rofTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (rofTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = rofTextLink;
|
||||
return;
|
||||
}
|
||||
|
||||
+66
-66
@@ -2421,7 +2421,7 @@ namespace RoF2
|
||||
outapp->WriteUInt32(consts::BANDOLIERS_SIZE);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (uint32 r = 0; r < EQEmu::constants::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (uint32 r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
outapp->WriteString(emu->bandoliers[r].Name);
|
||||
for (uint32 j = 0; j < consts::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString(emu->bandoliers[r].Items[j].Name);
|
||||
@@ -2436,7 +2436,7 @@ namespace RoF2
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (uint32 r = EQEmu::constants::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (uint32 r = EQEmu::legacy::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
outapp->WriteString("");
|
||||
for (uint32 j = 0; j < consts::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true
|
||||
outapp->WriteString("");
|
||||
@@ -2448,7 +2448,7 @@ namespace RoF2
|
||||
outapp->WriteUInt32(consts::POTION_BELT_ITEM_COUNT);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (uint32 r = 0; r < EQEmu::constants::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (uint32 r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
outapp->WriteString(emu->potionbelt.Items[r].Name);
|
||||
outapp->WriteUInt32(emu->potionbelt.Items[r].ID);
|
||||
if (emu->potionbelt.Items[r].Icon) {
|
||||
@@ -2460,7 +2460,7 @@ namespace RoF2
|
||||
}
|
||||
}
|
||||
// Nullify potion belt where server and client indexes diverge, with a client bias
|
||||
for (uint32 r = EQEmu::constants::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (uint32 r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
outapp->WriteString("");
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteSInt32(-1);
|
||||
@@ -2577,9 +2577,9 @@ namespace RoF2
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
outapp->WriteUInt32(EQEmu::constants::TRIBUTE_SIZE);
|
||||
outapp->WriteUInt32(EQEmu::legacy::TRIBUTE_SIZE);
|
||||
|
||||
for (uint32 r = 0; r < EQEmu::constants::TRIBUTE_SIZE; r++)
|
||||
for (uint32 r = 0; r < EQEmu::legacy::TRIBUTE_SIZE; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->tributes[r].tribute);
|
||||
outapp->WriteUInt32(emu->tributes[r].tier);
|
||||
@@ -3126,7 +3126,7 @@ namespace RoF2
|
||||
eq_cse->Gender = emu_cse->Gender;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < MaterialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
@@ -4320,13 +4320,13 @@ namespace RoF2
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
@@ -5028,7 +5028,7 @@ namespace RoF2
|
||||
|
||||
IN(item_id);
|
||||
int r;
|
||||
for (r = 0; r < EQEmu::constants::ITEM_COMMON_SIZE; r++) {
|
||||
for (r = 0; r < EQEmu::legacy::ITEM_COMMON_SIZE; r++) {
|
||||
IN(augments[r]);
|
||||
}
|
||||
IN(link_hash);
|
||||
@@ -5961,7 +5961,7 @@ namespace RoF2
|
||||
|
||||
uint32 SubLengths[10];
|
||||
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::constants::ITEM_CONTAINER_SIZE; ++x) {
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++x) {
|
||||
|
||||
SubSerializations[x] = nullptr;
|
||||
|
||||
@@ -5973,15 +5973,15 @@ namespace RoF2
|
||||
|
||||
iqbs.subitem_count++;
|
||||
|
||||
if (slot_id_in >= EQEmu::constants::GENERAL_BEGIN && slot_id_in <= EQEmu::constants::GENERAL_END) // (< 30) - no cursor?
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END) // (< 30) - no cursor?
|
||||
//SubSlotNumber = (((slot_id_in + 3) * 10) + x + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::constants::BANK_BEGIN && slot_id_in <= EQEmu::constants::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2000) * 10) + 2030 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::constants::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::constants::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2500) * 10) + 2530 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::SHARED_BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::SHARED_BANK_BAGS_BEGIN + x);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + x);
|
||||
else
|
||||
SubSlotNumber = slot_id_in; // ???????
|
||||
|
||||
@@ -5996,7 +5996,7 @@ namespace RoF2
|
||||
|
||||
ss.write((const char*)&iqbs, sizeof(RoF2::structs::ItemQuaternaryBodyStruct));
|
||||
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::constants::ITEM_CONTAINER_SIZE; ++x) {
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++x) {
|
||||
|
||||
if (SubSerializations[x]) {
|
||||
|
||||
@@ -6028,11 +6028,11 @@ namespace RoF2
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == SlotPowerSource) { // Main Inventory and Cursor
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // Main Inventory and Cursor
|
||||
if (PacketType == ItemPacketLoot)
|
||||
{
|
||||
RoF2Slot.Type = inventory::TypeCorpse;
|
||||
RoF2Slot.Slot = serverSlot - EQEmu::constants::CORPSE_BEGIN;
|
||||
RoF2Slot.Slot = serverSlot - EQEmu::legacy::CORPSE_BEGIN;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6040,13 +6040,13 @@ namespace RoF2
|
||||
RoF2Slot.Slot = serverSlot;
|
||||
}
|
||||
|
||||
if (serverSlot == SlotPowerSource)
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
RoF2Slot.Slot = inventory::SlotPowerSource;
|
||||
|
||||
else if (serverSlot >= SlotCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory
|
||||
RoF2Slot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= SlotAmmo) // (> 20)
|
||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // (> 20)
|
||||
RoF2Slot.Slot += 1;
|
||||
}
|
||||
|
||||
@@ -6055,51 +6055,51 @@ namespace RoF2
|
||||
RoF2Slot.MainSlot = ServerSlot - 31;
|
||||
}*/
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::constants::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
RoF2Slot.Type = inventory::TypePossessions;
|
||||
TempSlot = serverSlot - 1;
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
|
||||
if (RoF2Slot.Slot >= inventory::SlotGeneral9) // (> 30)
|
||||
RoF2Slot.Slot = inventory::SlotCursor;
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::TRIBUTE_BEGIN && serverSlot <= EQEmu::constants::TRIBUTE_END) { // Tribute
|
||||
else if (serverSlot >= EQEmu::legacy::TRIBUTE_BEGIN && serverSlot <= EQEmu::legacy::TRIBUTE_END) { // Tribute
|
||||
RoF2Slot.Type = inventory::TypeTribute;
|
||||
RoF2Slot.Slot = serverSlot - EQEmu::constants::TRIBUTE_BEGIN;
|
||||
RoF2Slot.Slot = serverSlot - EQEmu::legacy::TRIBUTE_BEGIN;
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::BANK_BEGIN && serverSlot <= EQEmu::constants::BANK_BAGS_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END) {
|
||||
RoF2Slot.Type = inventory::TypeBank;
|
||||
TempSlot = serverSlot - EQEmu::constants::BANK_BEGIN;
|
||||
TempSlot = serverSlot - EQEmu::legacy::BANK_BEGIN;
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::SHARED_BANK_BEGIN && serverSlot <= EQEmu::constants::SHARED_BANK_BAGS_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END) {
|
||||
RoF2Slot.Type = inventory::TypeSharedBank;
|
||||
TempSlot = serverSlot - EQEmu::constants::SHARED_BANK_BEGIN;
|
||||
TempSlot = serverSlot - EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::TRADE_BEGIN && serverSlot <= EQEmu::constants::TRADE_BAGS_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::TRADE_BEGIN && serverSlot <= EQEmu::legacy::TRADE_BAGS_END) {
|
||||
RoF2Slot.Type = inventory::TypeTrade;
|
||||
TempSlot = serverSlot - EQEmu::constants::TRADE_BEGIN;
|
||||
TempSlot = serverSlot - EQEmu::legacy::TRADE_BEGIN;
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) {
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6116,9 +6116,9 @@ namespace RoF2
|
||||
*/
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::WORLD_BEGIN && serverSlot <= EQEmu::constants::WORLD_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::WORLD_BEGIN && serverSlot <= EQEmu::legacy::WORLD_END) {
|
||||
RoF2Slot.Type = inventory::TypeWorld;
|
||||
TempSlot = serverSlot - EQEmu::constants::WORLD_BEGIN;
|
||||
TempSlot = serverSlot - EQEmu::legacy::WORLD_BEGIN;
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
}
|
||||
|
||||
@@ -6137,16 +6137,16 @@ namespace RoF2
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == SlotPowerSource) { // (< 52)
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // (< 52)
|
||||
RoF2Slot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == SlotPowerSource)
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
RoF2Slot.Slot = inventory::SlotPowerSource;
|
||||
|
||||
else if (serverSlot >= SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoF2Slot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= SlotAmmo) // Ammo and Personl Inventory
|
||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // Ammo and Personl Inventory
|
||||
RoF2Slot.Slot += 1;
|
||||
|
||||
/*else if (ServerSlot >= MainCursor) { // Cursor
|
||||
@@ -6157,10 +6157,10 @@ namespace RoF2
|
||||
}*/
|
||||
}
|
||||
|
||||
else if (serverSlot >= EQEmu::constants::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::constants::CURSOR_BAG_END) {
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) {
|
||||
TempSlot = serverSlot - 1;
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::constants::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::constants::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
}
|
||||
|
||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF2 Slots: Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, RoF2Slot.Unknown01);
|
||||
@@ -6170,7 +6170,7 @@ namespace RoF2
|
||||
|
||||
static inline uint32 ServerToRoF2CorpseSlot(uint32 serverCorpseSlot)
|
||||
{
|
||||
return (serverCorpseSlot - EQEmu::constants::CORPSE_BEGIN + 1);
|
||||
return (serverCorpseSlot - EQEmu::legacy::CORPSE_BEGIN + 1);
|
||||
}
|
||||
|
||||
static inline uint32 RoF2ToServerSlot(structs::InventorySlot_Struct rof2Slot, ItemPacketType PacketType)
|
||||
@@ -6180,7 +6180,7 @@ namespace RoF2
|
||||
|
||||
if (rof2Slot.Type == inventory::TypePossessions && rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||
if (rof2Slot.Slot == inventory::SlotPowerSource)
|
||||
TempSlot = SlotPowerSource;
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
|
||||
else if (rof2Slot.Slot >= inventory::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rof2Slot.Slot - 3;
|
||||
@@ -6203,16 +6203,16 @@ namespace RoF2
|
||||
TempSlot = rof2Slot.Slot;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == inventory::TypeBank) {
|
||||
TempSlot = EQEmu::constants::BANK_BEGIN;
|
||||
TempSlot = EQEmu::legacy::BANK_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rof2Slot.Slot;
|
||||
@@ -6221,10 +6221,10 @@ namespace RoF2
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == inventory::TypeSharedBank) {
|
||||
TempSlot = EQEmu::constants::SHARED_BANK_BEGIN;
|
||||
TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rof2Slot.Slot;
|
||||
@@ -6233,10 +6233,10 @@ namespace RoF2
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == inventory::TypeTrade) {
|
||||
TempSlot = EQEmu::constants::TRADE_BEGIN;
|
||||
TempSlot = EQEmu::legacy::TRADE_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
// OLD CODE:
|
||||
//TempSlot += 100 + (RoF2Slot.MainSlot * EmuConstants::ITEM_CONTAINER_SIZE) + RoF2Slot.SubSlot;
|
||||
|
||||
@@ -6247,7 +6247,7 @@ namespace RoF2
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == inventory::TypeWorld) {
|
||||
TempSlot = EQEmu::constants::WORLD_BEGIN;
|
||||
TempSlot = EQEmu::legacy::WORLD_BEGIN;
|
||||
|
||||
if (rof2Slot.Slot >= SUB_INDEX_BEGIN)
|
||||
TempSlot += rof2Slot.Slot;
|
||||
@@ -6269,7 +6269,7 @@ namespace RoF2
|
||||
}
|
||||
|
||||
else if (rof2Slot.Type == inventory::TypeCorpse) {
|
||||
ServerSlot = rof2Slot.Slot + EQEmu::constants::CORPSE_BEGIN;
|
||||
ServerSlot = rof2Slot.Slot + EQEmu::legacy::CORPSE_BEGIN;
|
||||
}
|
||||
|
||||
Log.Out(Logs::General, Logs::Netcode, "[ERROR] Convert RoF2 Slots: Type %i, Unk2 %i, Main %i, Sub %i, Aug %i, Unk1 %i to Server Slot %i", rof2Slot.Type, rof2Slot.Unknown02, rof2Slot.Slot, rof2Slot.SubIndex, rof2Slot.AugIndex, rof2Slot.Unknown01, ServerSlot);
|
||||
@@ -6284,7 +6284,7 @@ namespace RoF2
|
||||
|
||||
if (rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
||||
if (rof2Slot.Slot == inventory::SlotPowerSource)
|
||||
TempSlot = SlotPowerSource;
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
|
||||
else if (rof2Slot.Slot >= inventory::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rof2Slot.Slot - 3;
|
||||
@@ -6302,7 +6302,7 @@ namespace RoF2
|
||||
TempSlot = rof2Slot.Slot;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
@@ -6314,12 +6314,12 @@ namespace RoF2
|
||||
|
||||
static inline uint32 RoF2ToServerCorpseSlot(uint32 rof2CorpseSlot)
|
||||
{
|
||||
return (rof2CorpseSlot + EQEmu::constants::CORPSE_BEGIN - 1);
|
||||
return (rof2CorpseSlot + EQEmu::legacy::CORPSE_BEGIN - 1);
|
||||
}
|
||||
|
||||
static inline void ServerToRoF2TextLink(std::string& rof2TextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::constants::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
rof2TextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -6328,7 +6328,7 @@ namespace RoF2
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
rof2TextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -6351,7 +6351,7 @@ namespace RoF2
|
||||
|
||||
static inline void RoF2ToServerTextLink(std::string& serverTextLink, const std::string& rof2TextLink)
|
||||
{
|
||||
if ((EQEmu::constants::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (rof2TextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (rof2TextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = rof2TextLink;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1084,11 +1084,11 @@ union
|
||||
/*00184*/ EquipStruct equipment[22]; // Total Slots
|
||||
};
|
||||
/*00624*/ uint32 equip2_count; // Seen 9
|
||||
/*00628*/ EquipStruct equipment2[MaterialCount]; // Appears to be Visible slots, but all 0s
|
||||
/*00628*/ EquipStruct equipment2[EQEmu::legacy::MaterialCount]; // Appears to be Visible slots, but all 0s
|
||||
/*00808*/ uint32 tint_count; // Seen 9
|
||||
/*00812*/ Color_Struct item_tint[MaterialCount]; // RR GG BB 00
|
||||
/*00812*/ Color_Struct item_tint[EQEmu::legacy::MaterialCount]; // RR GG BB 00
|
||||
/*00848*/ uint32 tint_count2; // Seen 9
|
||||
/*00852*/ Color_Struct item_tint2[MaterialCount]; // RR GG BB 00
|
||||
/*00852*/ Color_Struct item_tint2[EQEmu::legacy::MaterialCount]; // RR GG BB 00
|
||||
/*00888*/ uint8 haircolor; // Player hair color
|
||||
/*00889*/ uint8 beardcolor; // Player beard color
|
||||
/*00890*/ uint32 unknown_rof5; //
|
||||
|
||||
+23
-23
@@ -1614,7 +1614,7 @@ namespace SoD
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::constants::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
@@ -1623,7 +1623,7 @@ namespace SoD
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::constants::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
@@ -1635,13 +1635,13 @@ namespace SoD
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::constants::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// Nullify potion belt where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::constants::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -1981,7 +1981,7 @@ namespace SoD
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < MaterialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
@@ -2779,11 +2779,11 @@ namespace SoD
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
}
|
||||
@@ -3934,7 +3934,7 @@ namespace SoD
|
||||
|
||||
uint32 SubLengths[10];
|
||||
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::constants::ITEM_CONTAINER_SIZE; ++x) {
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++x) {
|
||||
|
||||
SubSerializations[x] = nullptr;
|
||||
|
||||
@@ -3946,15 +3946,15 @@ namespace SoD
|
||||
|
||||
iqbs.subitem_count++;
|
||||
|
||||
if (slot_id_in >= EQEmu::constants::GENERAL_BEGIN && slot_id_in <= EQEmu::constants::GENERAL_END) // (< 30) - no cursor?
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END) // (< 30) - no cursor?
|
||||
//SubSlotNumber = (((slot_id_in + 3) * 10) + x + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::constants::BANK_BEGIN && slot_id_in <= EQEmu::constants::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2000) * 10) + 2030 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::constants::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::constants::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2500) * 10) + 2530 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::SHARED_BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::SHARED_BANK_BAGS_BEGIN + x);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + x);
|
||||
else
|
||||
SubSlotNumber = slot_id_in; // ???????
|
||||
|
||||
@@ -3993,15 +3993,15 @@ namespace SoD
|
||||
{
|
||||
uint32 SoDSlot = 0;
|
||||
|
||||
if (serverSlot >= SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (serverSlot >= EQEmu::legacy::SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
SoDSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::constants::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::constants::CURSOR_BAG_END)
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||
SoDSlot = serverSlot + 11;
|
||||
else if (serverSlot >= EQEmu::constants::BANK_BAGS_BEGIN && serverSlot <= EQEmu::constants::BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END)
|
||||
SoDSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::constants::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::constants::SHARED_BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
SoDSlot = serverSlot + 1;
|
||||
else if (serverSlot == SlotPowerSource)
|
||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
SoDSlot = inventory::SlotPowerSource;
|
||||
else
|
||||
SoDSlot = serverSlot;
|
||||
@@ -4027,7 +4027,7 @@ namespace SoD
|
||||
else if (sodSlot >= consts::SHARED_BANK_BAGS_BEGIN && sodSlot <= consts::SHARED_BANK_BAGS_END)
|
||||
ServerSlot = sodSlot - 1;
|
||||
else if (sodSlot == inventory::SlotPowerSource)
|
||||
ServerSlot = SlotPowerSource;
|
||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
||||
else
|
||||
ServerSlot = sodSlot;
|
||||
return ServerSlot;
|
||||
@@ -4041,7 +4041,7 @@ namespace SoD
|
||||
|
||||
static inline void ServerToSoDTextLink(std::string& sodTextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::constants::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
sodTextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -4050,7 +4050,7 @@ namespace SoD
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
sodTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -4081,7 +4081,7 @@ namespace SoD
|
||||
|
||||
static inline void SoDToServerTextLink(std::string& serverTextLink, const std::string& sodTextLink)
|
||||
{
|
||||
if ((EQEmu::constants::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (sodTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (sodTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = sodTextLink;
|
||||
return;
|
||||
}
|
||||
|
||||
+21
-21
@@ -1271,7 +1271,7 @@ namespace SoF
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::constants::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
@@ -1280,7 +1280,7 @@ namespace SoF
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::constants::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
@@ -1292,13 +1292,13 @@ namespace SoF
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::constants::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// Nullify potion belt where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::constants::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -1638,7 +1638,7 @@ namespace SoF
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < MaterialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
@@ -3256,7 +3256,7 @@ namespace SoF
|
||||
|
||||
uint32 SubLengths[10];
|
||||
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::constants::ITEM_CONTAINER_SIZE; ++x) {
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++x) {
|
||||
|
||||
SubSerializations[x] = nullptr;
|
||||
const ItemInst* subitem = ((const ItemInst*)inst)->GetItem(x);
|
||||
@@ -3267,15 +3267,15 @@ namespace SoF
|
||||
|
||||
iqbs.subitem_count++;
|
||||
|
||||
if (slot_id_in >= EQEmu::constants::GENERAL_BEGIN && slot_id_in <= EQEmu::constants::GENERAL_END) // (< 30) - no cursor?
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END) // (< 30) - no cursor?
|
||||
//SubSlotNumber = (((slot_id_in + 3) * 10) + x + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::constants::BANK_BEGIN && slot_id_in <= EQEmu::constants::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2000) * 10) + 2030 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::constants::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::constants::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2500) * 10) + 2530 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::SHARED_BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::SHARED_BANK_BAGS_BEGIN + x);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + x);
|
||||
else
|
||||
SubSlotNumber = slot_id_in; // ???????
|
||||
|
||||
@@ -3312,15 +3312,15 @@ namespace SoF
|
||||
{
|
||||
uint32 SoFSlot = 0;
|
||||
|
||||
if (serverSlot >= SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (serverSlot >= EQEmu::legacy::SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::constants::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::constants::CURSOR_BAG_END)
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||
SoFSlot = serverSlot + 11;
|
||||
else if (serverSlot >= EQEmu::constants::BANK_BAGS_BEGIN && serverSlot <= EQEmu::constants::BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END)
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::constants::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::constants::SHARED_BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot == SlotPowerSource)
|
||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
SoFSlot = inventory::SlotPowerSource;
|
||||
else
|
||||
SoFSlot = serverSlot;
|
||||
@@ -3347,7 +3347,7 @@ namespace SoF
|
||||
else if (sofSlot >= consts::SHARED_BANK_BAGS_BEGIN && sofSlot <= consts::SHARED_BANK_BAGS_END)
|
||||
ServerSlot = sofSlot - 1;
|
||||
else if (sofSlot == inventory::SlotPowerSource)
|
||||
ServerSlot = SlotPowerSource;
|
||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
||||
else
|
||||
ServerSlot = sofSlot;
|
||||
|
||||
@@ -3362,7 +3362,7 @@ namespace SoF
|
||||
|
||||
static inline void ServerToSoFTextLink(std::string& sofTextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::constants::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
sofTextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -3371,7 +3371,7 @@ namespace SoF
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
sofTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -3402,7 +3402,7 @@ namespace SoF
|
||||
|
||||
static inline void SoFToServerTextLink(std::string& serverTextLink, const std::string& sofTextLink)
|
||||
{
|
||||
if ((EQEmu::constants::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (sofTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (sofTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = sofTextLink;
|
||||
return;
|
||||
}
|
||||
|
||||
+11
-11
@@ -943,7 +943,7 @@ namespace Titanium
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::constants::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
@@ -952,7 +952,7 @@ namespace Titanium
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::constants::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
@@ -964,13 +964,13 @@ namespace Titanium
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::constants::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// Nullify potion belt where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::constants::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -1199,14 +1199,14 @@ namespace Titanium
|
||||
if (eq->Race[char_index] > 473)
|
||||
eq->Race[char_index] = 1;
|
||||
|
||||
for (int index = 0; index < MaterialCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::legacy::MaterialCount; ++index) {
|
||||
eq->CS_Colors[char_index][index].Color = emu_cse->Equip[index].Color.Color;
|
||||
}
|
||||
|
||||
eq->BeardColor[char_index] = emu_cse->BeardColor;
|
||||
eq->HairStyle[char_index] = emu_cse->HairStyle;
|
||||
|
||||
for (int index = 0; index < MaterialCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::legacy::MaterialCount; ++index) {
|
||||
eq->Equip[char_index][index] = emu_cse->Equip[index].Material;
|
||||
}
|
||||
|
||||
@@ -1236,14 +1236,14 @@ namespace Titanium
|
||||
for (; char_index < 10; ++char_index) {
|
||||
eq->Race[char_index] = 0;
|
||||
|
||||
for (int index = 0; index < MaterialCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::legacy::MaterialCount; ++index) {
|
||||
eq->CS_Colors[char_index][index].Color = 0;
|
||||
}
|
||||
|
||||
eq->BeardColor[char_index] = 0;
|
||||
eq->HairStyle[char_index] = 0;
|
||||
|
||||
for (int index = 0; index < MaterialCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::legacy::MaterialCount; ++index) {
|
||||
eq->Equip[char_index][index] = 0;
|
||||
}
|
||||
|
||||
@@ -2198,7 +2198,7 @@ namespace Titanium
|
||||
|
||||
static inline void ServerToTitaniumTextLink(std::string& titaniumTextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::constants::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
titaniumTextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -2207,7 +2207,7 @@ namespace Titanium
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
titaniumTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -2238,7 +2238,7 @@ namespace Titanium
|
||||
|
||||
static inline void TitaniumToServerTextLink(std::string& serverTextLink, const std::string& titaniumTextLink)
|
||||
{
|
||||
if ((EQEmu::constants::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (titaniumTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (titaniumTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = titaniumTextLink;
|
||||
return;
|
||||
}
|
||||
|
||||
+25
-25
@@ -1878,7 +1878,7 @@ namespace UF
|
||||
// OUT(unknown06160[4]);
|
||||
|
||||
// Copy bandoliers where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::constants::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
OUT_str(bandoliers[r].Name);
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
OUT(bandoliers[r].Items[k].ID);
|
||||
@@ -1887,7 +1887,7 @@ namespace UF
|
||||
}
|
||||
}
|
||||
// Nullify bandoliers where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::constants::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < consts::BANDOLIERS_SIZE; ++r) {
|
||||
eq->bandoliers[r].Name[0] = '\0';
|
||||
for (uint32 k = 0; k < consts::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true
|
||||
eq->bandoliers[r].Items[k].ID = 0;
|
||||
@@ -1899,13 +1899,13 @@ namespace UF
|
||||
// OUT(unknown07444[5120]);
|
||||
|
||||
// Copy potion belt where server and client indexes converge
|
||||
for (r = 0; r < EQEmu::constants::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
OUT(potionbelt.Items[r].ID);
|
||||
OUT(potionbelt.Items[r].Icon);
|
||||
OUT_str(potionbelt.Items[r].Name);
|
||||
}
|
||||
// Nullify potion belt where server and client indexes diverge, with a client bias
|
||||
for (r = EQEmu::constants::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < consts::POTION_BELT_ITEM_COUNT; ++r) {
|
||||
eq->potionbelt.Items[r].ID = 0;
|
||||
eq->potionbelt.Items[r].Icon = 0;
|
||||
eq->potionbelt.Items[r].Name[0] = '\0';
|
||||
@@ -2274,7 +2274,7 @@ namespace UF
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < MaterialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
@@ -3053,19 +3053,19 @@ namespace UF
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
if (emu->equipment[MaterialPrimary].Material > 99999) {
|
||||
if (emu->equipment[EQEmu::legacy::MaterialPrimary].Material > 99999) {
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 63);
|
||||
} else {
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialPrimary].Material);
|
||||
}
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
if (emu->equipment[MaterialSecondary].Material > 99999) {
|
||||
if (emu->equipment[EQEmu::legacy::MaterialSecondary].Material > 99999) {
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 63);
|
||||
} else {
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialSecondary].Material);
|
||||
}
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
@@ -4263,7 +4263,7 @@ namespace UF
|
||||
|
||||
uint32 SubLengths[10];
|
||||
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::constants::ITEM_CONTAINER_SIZE; ++x) {
|
||||
for (int x = SUB_INDEX_BEGIN; x < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++x) {
|
||||
|
||||
SubSerializations[x] = nullptr;
|
||||
|
||||
@@ -4275,15 +4275,15 @@ namespace UF
|
||||
|
||||
iqbs.subitem_count++;
|
||||
|
||||
if (slot_id_in >= EQEmu::constants::GENERAL_BEGIN && slot_id_in <= EQEmu::constants::GENERAL_END) // (< 30) - no cursor?
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END) // (< 30) - no cursor?
|
||||
//SubSlotNumber = (((slot_id_in + 3) * 10) + x + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::constants::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::constants::BANK_BEGIN && slot_id_in <= EQEmu::constants::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + x + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2000) * 10) + 2030 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::constants::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::constants::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + x);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
//SubSlotNumber = (((slot_id_in - 2500) * 10) + 2530 + x + 1);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::constants::SHARED_BANK_BEGIN) * EQEmu::constants::ITEM_CONTAINER_SIZE) + EQEmu::constants::SHARED_BANK_BAGS_BEGIN + x);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + x);
|
||||
else
|
||||
SubSlotNumber = slot_id_in; // ???????
|
||||
|
||||
@@ -4322,15 +4322,15 @@ namespace UF
|
||||
{
|
||||
uint32 UnderfootSlot = 0;
|
||||
|
||||
if (serverSlot >= SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (serverSlot >= EQEmu::legacy::SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
UnderfootSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::constants::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::constants::CURSOR_BAG_END)
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||
UnderfootSlot = serverSlot + 11;
|
||||
else if (serverSlot >= EQEmu::constants::BANK_BAGS_BEGIN && serverSlot <= EQEmu::constants::BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::legacy::BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END)
|
||||
UnderfootSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::constants::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::constants::SHARED_BANK_BAGS_END)
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
UnderfootSlot = serverSlot + 1;
|
||||
else if (serverSlot == SlotPowerSource)
|
||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
UnderfootSlot = inventory::SlotPowerSource;
|
||||
else
|
||||
UnderfootSlot = serverSlot;
|
||||
@@ -4357,7 +4357,7 @@ namespace UF
|
||||
else if (ufSlot >= consts::SHARED_BANK_BAGS_BEGIN && ufSlot <= consts::SHARED_BANK_BAGS_END)
|
||||
ServerSlot = ufSlot - 1;
|
||||
else if (ufSlot == inventory::SlotPowerSource)
|
||||
ServerSlot = SlotPowerSource;
|
||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
||||
else
|
||||
ServerSlot = ufSlot;
|
||||
|
||||
@@ -4372,7 +4372,7 @@ namespace UF
|
||||
|
||||
static inline void ServerToUFTextLink(std::string& ufTextLink, const std::string& serverTextLink)
|
||||
{
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::constants::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((consts::TEXT_LINK_BODY_LENGTH == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
ufTextLink = serverTextLink;
|
||||
return;
|
||||
}
|
||||
@@ -4381,7 +4381,7 @@ namespace UF
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::TEXT_LINK_BODY_LENGTH) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
ufTextLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
@@ -4412,7 +4412,7 @@ namespace UF
|
||||
|
||||
static inline void UFToServerTextLink(std::string& serverTextLink, const std::string& ufTextLink)
|
||||
{
|
||||
if ((EQEmu::constants::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (ufTextLink.find('\x12') == std::string::npos)) {
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == consts::TEXT_LINK_BODY_LENGTH) || (ufTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = ufTextLink;
|
||||
return;
|
||||
}
|
||||
|
||||
+3
-3
@@ -39,7 +39,7 @@ std::string EQEmu::saylink::SayLinkEngine::GenerateLink()
|
||||
generate_body();
|
||||
generate_text();
|
||||
|
||||
if ((m_LinkBody.length() == EQEmu::constants::TEXT_LINK_BODY_LENGTH) && (m_LinkText.length() > 0)) {
|
||||
if ((m_LinkBody.length() == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) && (m_LinkText.length() > 0)) {
|
||||
m_Link.push_back(0x12);
|
||||
m_Link.append(m_LinkBody);
|
||||
m_Link.append(m_LinkText);
|
||||
@@ -231,7 +231,7 @@ void EQEmu::saylink::SayLinkEngine::generate_text()
|
||||
bool EQEmu::saylink::DegenerateLinkBody(SayLinkBody_Struct& say_link_body_struct, const std::string& say_link_body)
|
||||
{
|
||||
memset(&say_link_body_struct, 0, sizeof(say_link_body_struct));
|
||||
if (say_link_body.length() != EQEmu::constants::TEXT_LINK_BODY_LENGTH)
|
||||
if (say_link_body.length() != EQEmu::legacy::TEXT_LINK_BODY_LENGTH)
|
||||
return false;
|
||||
|
||||
say_link_body_struct.unknown_1 = (uint8)strtol(say_link_body.substr(0, 1).c_str(), nullptr, 16);
|
||||
@@ -270,7 +270,7 @@ bool EQEmu::saylink::GenerateLinkBody(std::string& say_link_body, const SayLinkB
|
||||
(0xFFFFFFFF & say_link_body_struct.hash)
|
||||
);
|
||||
|
||||
if (say_link_body.length() != EQEmu::constants::TEXT_LINK_BODY_LENGTH)
|
||||
if (say_link_body.length() != EQEmu::legacy::TEXT_LINK_BODY_LENGTH)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
+19
-19
@@ -104,8 +104,8 @@ bool SharedDatabase::SaveCursor(uint32 char_id, std::list<ItemInst*>::const_iter
|
||||
std::string query = StringFormat("DELETE FROM inventory WHERE charid = %i "
|
||||
"AND ((slotid >= 8000 AND slotid <= 8999) "
|
||||
"OR slotid = %i OR (slotid >= %i AND slotid <= %i) )",
|
||||
char_id, SlotCursor,
|
||||
EQEmu::constants::CURSOR_BAG_BEGIN, EQEmu::constants::CURSOR_BAG_END);
|
||||
char_id, EQEmu::legacy::SlotCursor,
|
||||
EQEmu::legacy::CURSOR_BAG_BEGIN, EQEmu::legacy::CURSOR_BAG_END);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
std::cout << "Clearing cursor failed: " << results.ErrorMessage() << std::endl;
|
||||
@@ -116,7 +116,7 @@ bool SharedDatabase::SaveCursor(uint32 char_id, std::list<ItemInst*>::const_iter
|
||||
for(auto it = start; it != end; ++it, i++) {
|
||||
if (i > 8999) { break; } // shouldn't be anything in the queue that indexes this high
|
||||
ItemInst *inst = *it;
|
||||
int16 use_slot = (i == 8000) ? SlotCursor : i;
|
||||
int16 use_slot = (i == 8000) ? EQEmu::legacy::SlotCursor : i;
|
||||
if (!SaveInventory(char_id, inst, use_slot)) {
|
||||
return false;
|
||||
}
|
||||
@@ -161,10 +161,10 @@ bool SharedDatabase::VerifyInventory(uint32 account_id, int16 slot_id, const Ite
|
||||
bool SharedDatabase::SaveInventory(uint32 char_id, const ItemInst* inst, int16 slot_id) {
|
||||
|
||||
//never save tribute slots:
|
||||
if (slot_id >= EQEmu::constants::TRIBUTE_BEGIN && slot_id <= EQEmu::constants::TRIBUTE_END)
|
||||
if (slot_id >= EQEmu::legacy::TRIBUTE_BEGIN && slot_id <= EQEmu::legacy::TRIBUTE_END)
|
||||
return true;
|
||||
|
||||
if (slot_id >= EQEmu::constants::SHARED_BANK_BEGIN && slot_id <= EQEmu::constants::SHARED_BANK_BAGS_END) {
|
||||
if (slot_id >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id <= EQEmu::legacy::SHARED_BANK_BAGS_END) {
|
||||
// Shared bank inventory
|
||||
if (!inst) {
|
||||
return DeleteSharedBankSlot(char_id, slot_id);
|
||||
@@ -191,9 +191,9 @@ bool SharedDatabase::SaveInventory(uint32 char_id, const ItemInst* inst, int16 s
|
||||
bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const ItemInst* inst, int16 slot_id) {
|
||||
// need to check 'inst' argument for valid pointer
|
||||
|
||||
uint32 augslot[EQEmu::constants::ITEM_COMMON_SIZE] = { NO_ITEM, NO_ITEM, NO_ITEM, NO_ITEM, NO_ITEM, NO_ITEM };
|
||||
uint32 augslot[EQEmu::legacy::ITEM_COMMON_SIZE] = { NO_ITEM, NO_ITEM, NO_ITEM, NO_ITEM, NO_ITEM, NO_ITEM };
|
||||
if (inst->IsType(ItemClassCommon)) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::constants::ITEM_COMMON_SIZE; i++) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
||||
ItemInst *auginst = inst->GetItem(i);
|
||||
augslot[i] = (auginst && auginst->GetItem()) ? auginst->GetItem()->ID : NO_ITEM;
|
||||
}
|
||||
@@ -223,7 +223,7 @@ bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const ItemInst* inst, i
|
||||
if (inst->IsType(ItemClassContainer) && Inventory::SupportsContainers(slot_id))
|
||||
// Limiting to bag slot count will get rid of 'hidden' duplicated items and 'Invalid Slot ID'
|
||||
// messages through attrition (and the modded code in SaveInventory)
|
||||
for (uint8 idx = SUB_INDEX_BEGIN; idx < inst->GetItem()->BagSlots && idx < EQEmu::constants::ITEM_CONTAINER_SIZE; idx++) {
|
||||
for (uint8 idx = SUB_INDEX_BEGIN; idx < inst->GetItem()->BagSlots && idx < EQEmu::legacy::ITEM_CONTAINER_SIZE; idx++) {
|
||||
const ItemInst* baginst = inst->GetItem(idx);
|
||||
SaveInventory(char_id, baginst, Inventory::CalcSlotId(slot_id, idx));
|
||||
}
|
||||
@@ -238,9 +238,9 @@ bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const ItemInst* inst, i
|
||||
bool SharedDatabase::UpdateSharedBankSlot(uint32 char_id, const ItemInst* inst, int16 slot_id) {
|
||||
// need to check 'inst' argument for valid pointer
|
||||
|
||||
uint32 augslot[EQEmu::constants::ITEM_COMMON_SIZE] = { NO_ITEM, NO_ITEM, NO_ITEM, NO_ITEM, NO_ITEM, NO_ITEM };
|
||||
uint32 augslot[EQEmu::legacy::ITEM_COMMON_SIZE] = { NO_ITEM, NO_ITEM, NO_ITEM, NO_ITEM, NO_ITEM, NO_ITEM };
|
||||
if (inst->IsType(ItemClassCommon)) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::constants::ITEM_COMMON_SIZE; i++) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
||||
ItemInst *auginst = inst->GetItem(i);
|
||||
augslot[i] = (auginst && auginst->GetItem()) ? auginst->GetItem()->ID : NO_ITEM;
|
||||
}
|
||||
@@ -269,7 +269,7 @@ bool SharedDatabase::UpdateSharedBankSlot(uint32 char_id, const ItemInst* inst,
|
||||
if (inst->IsType(ItemClassContainer) && Inventory::SupportsContainers(slot_id)) {
|
||||
// Limiting to bag slot count will get rid of 'hidden' duplicated items and 'Invalid Slot ID'
|
||||
// messages through attrition (and the modded code in SaveInventory)
|
||||
for (uint8 idx = SUB_INDEX_BEGIN; idx < inst->GetItem()->BagSlots && idx < EQEmu::constants::ITEM_CONTAINER_SIZE; idx++) {
|
||||
for (uint8 idx = SUB_INDEX_BEGIN; idx < inst->GetItem()->BagSlots && idx < EQEmu::legacy::ITEM_CONTAINER_SIZE; idx++) {
|
||||
const ItemInst* baginst = inst->GetItem(idx);
|
||||
SaveInventory(char_id, baginst, Inventory::CalcSlotId(slot_id, idx));
|
||||
}
|
||||
@@ -427,7 +427,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory *inv, bool is_charid)
|
||||
uint32 item_id = (uint32)atoi(row[1]);
|
||||
int8 charges = (int8)atoi(row[2]);
|
||||
|
||||
uint32 aug[EQEmu::constants::ITEM_COMMON_SIZE];
|
||||
uint32 aug[EQEmu::legacy::ITEM_COMMON_SIZE];
|
||||
aug[0] = (uint32)atoi(row[3]);
|
||||
aug[1] = (uint32)atoi(row[4]);
|
||||
aug[2] = (uint32)atoi(row[5]);
|
||||
@@ -448,7 +448,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory *inv, bool is_charid)
|
||||
|
||||
ItemInst *inst = CreateBaseItem(item, charges);
|
||||
if (inst && item->ItemClass == ItemClassCommon) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::constants::ITEM_COMMON_SIZE; i++) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
||||
if (aug[i])
|
||||
inst->PutAugment(this, i, aug[i]);
|
||||
}
|
||||
@@ -522,7 +522,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
||||
uint16 charges = atoi(row[2]);
|
||||
uint32 color = atoul(row[3]);
|
||||
|
||||
uint32 aug[EQEmu::constants::ITEM_COMMON_SIZE];
|
||||
uint32 aug[EQEmu::legacy::ITEM_COMMON_SIZE];
|
||||
|
||||
aug[0] = (uint32)atoul(row[4]);
|
||||
aug[1] = (uint32)atoul(row[5]);
|
||||
@@ -584,8 +584,8 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
||||
inst->SetOrnamentHeroModel(ornament_hero_model);
|
||||
|
||||
if (instnodrop ||
|
||||
(((slot_id >= EQEmu::constants::EQUIPMENT_BEGIN && slot_id <= EQEmu::constants::EQUIPMENT_END) ||
|
||||
slot_id == SlotPowerSource) &&
|
||||
(((slot_id >= EQEmu::legacy::EQUIPMENT_BEGIN && slot_id <= EQEmu::legacy::EQUIPMENT_END) ||
|
||||
slot_id == EQEmu::legacy::SlotPowerSource) &&
|
||||
inst->GetItem()->Attuneable))
|
||||
inst->SetAttuned(true);
|
||||
|
||||
@@ -608,7 +608,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
||||
}
|
||||
|
||||
if (item->ItemClass == ItemClassCommon) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::constants::ITEM_COMMON_SIZE; i++) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
||||
if (aug[i])
|
||||
inst->PutAugment(this, i, aug[i]);
|
||||
}
|
||||
@@ -665,7 +665,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char *name, Inventory *inv)
|
||||
int8 charges = atoi(row[2]);
|
||||
uint32 color = atoul(row[3]);
|
||||
|
||||
uint32 aug[EQEmu::constants::ITEM_COMMON_SIZE];
|
||||
uint32 aug[EQEmu::legacy::ITEM_COMMON_SIZE];
|
||||
aug[0] = (uint32)atoi(row[4]);
|
||||
aug[1] = (uint32)atoi(row[5]);
|
||||
aug[2] = (uint32)atoi(row[6]);
|
||||
@@ -726,7 +726,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char *name, Inventory *inv)
|
||||
inst->SetCharges(charges);
|
||||
|
||||
if (item->ItemClass == ItemClassCommon) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::constants::ITEM_COMMON_SIZE; i++) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
||||
if (aug[i])
|
||||
inst->PutAugment(this, i, aug[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user