mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Added class EQEmu::InventorySlot
This commit is contained in:
@@ -35,7 +35,7 @@ SET(common_sources
|
||||
faction.cpp
|
||||
guild_base.cpp
|
||||
guilds.cpp
|
||||
# inventory_slot.cpp
|
||||
inventory_slot.cpp
|
||||
ipc_mutex.cpp
|
||||
item_data.cpp
|
||||
item_instance.cpp
|
||||
@@ -156,7 +156,7 @@ SET(common_headers
|
||||
global_define.h
|
||||
guild_base.h
|
||||
guilds.h
|
||||
# inventory_slot.h
|
||||
inventory_slot.h
|
||||
ipc_mutex.h
|
||||
item_data.h
|
||||
item_fieldlist.h
|
||||
|
||||
+1
-1
@@ -709,7 +709,7 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inven
|
||||
auto results = QueryDatabase(invquery);
|
||||
}
|
||||
|
||||
if (i == EQEmu::legacy::SlotCursor) {
|
||||
if (i == EQEmu::inventory::slotCursor) {
|
||||
i = EQEmu::legacy::GENERAL_BAGS_BEGIN;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace Convert {
|
||||
/*002*/ uint32 HP;
|
||||
/*006*/ uint32 Mana;
|
||||
/*010*/ Convert::SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||
/*510*/ uint32 Items[EQEmu::textures::TextureCount];
|
||||
/*510*/ uint32 Items[EQEmu::textures::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[EQEmu::textures::TextureCount]; // Item texture/material of worn/held items
|
||||
/*0312*/ uint32 item_material[EQEmu::textures::materialCount]; // Item texture/material of worn/held items
|
||||
/*0348*/ uint8 unknown0348[44];
|
||||
/*0392*/ Convert::Color_Struct item_tint[EQEmu::textures::TextureCount];
|
||||
/*0392*/ Convert::Color_Struct item_tint[EQEmu::textures::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
|
||||
@@ -1403,7 +1403,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
||||
if (rquery != ""){ results = QueryDatabase(rquery); }
|
||||
/* Run Material Color Convert */
|
||||
first_entry = 0; rquery = "";
|
||||
for (i = 0; i < EQEmu::textures::TextureCount; i++){
|
||||
for (i = EQEmu::textures::textureBegin; i < EQEmu::textures::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);
|
||||
|
||||
@@ -35,6 +35,79 @@ namespace EQEmu
|
||||
//using namespace RoF2::invbag;
|
||||
//using namespace RoF2::invaug;
|
||||
|
||||
enum : int16 { typeInvalid = -1, slotInvalid = -1, containerInvalid = -1, socketInvalid = -1 }; // temporary
|
||||
enum : int16 { typeBegin = 0, slotBegin = 0, containerBegin = 0, socketBegin = 0 }; // temporary
|
||||
|
||||
enum PossessionsSlots : int16 { // temporary
|
||||
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,
|
||||
slotAmmo = 21,
|
||||
slotGeneral1,
|
||||
slotGeneral2,
|
||||
slotGeneral3,
|
||||
slotGeneral4, // 25
|
||||
slotGeneral5,
|
||||
slotGeneral6,
|
||||
slotGeneral7,
|
||||
slotGeneral8,
|
||||
slotCursor, // 30
|
||||
slotCount
|
||||
};
|
||||
|
||||
enum InventoryTypes : int16 { // temporary
|
||||
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
|
||||
};
|
||||
|
||||
static int16 SlotCount(int16 type_index) { return 0; } // temporary
|
||||
|
||||
const int16 ContainerCount = 10; // temporary
|
||||
const int16 SocketCount = 6; // temporary
|
||||
|
||||
} /*inventory*/
|
||||
|
||||
namespace constants {
|
||||
@@ -44,6 +117,7 @@ namespace EQEmu
|
||||
const size_t SayLinkBodySize = RoF2::constants::SayLinkBodySize;
|
||||
|
||||
} /*constants*/
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
@@ -68,3 +142,9 @@ namespace EQEmu
|
||||
} /*EQEmu*/
|
||||
|
||||
#endif /*COMMON_EMU_CONSTANTS_H*/
|
||||
|
||||
/* hack list to prevent circular references
|
||||
|
||||
eq_limits.h:EQEmu::inventory::LookupEntry::InventoryTypeSize[n];
|
||||
|
||||
*/
|
||||
|
||||
+14
-89
@@ -61,8 +61,6 @@ namespace EQEmu
|
||||
SLOT_GENERAL_6 = 27,
|
||||
SLOT_GENERAL_7 = 28,
|
||||
SLOT_GENERAL_8 = 29,
|
||||
//SLOT_GENERAL_9 = not supported
|
||||
//SLOT_GENERAL_10 = not supported
|
||||
SLOT_CURSOR = 30,
|
||||
SLOT_CURSOR_END = (int16)0xFFFE, // I hope no one is using this...
|
||||
SLOT_TRADESKILL = 1000,
|
||||
@@ -96,75 +94,8 @@ namespace EQEmu
|
||||
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
|
||||
};
|
||||
|
||||
// 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_POSSESSIONS_SIZE = 31;
|
||||
static const uint16 TYPE_BANK_SIZE = 24;
|
||||
static const uint16 TYPE_SHARED_BANK_SIZE = 2;
|
||||
static const uint16 TYPE_TRADE_SIZE = 8;
|
||||
@@ -175,14 +106,14 @@ namespace EQEmu
|
||||
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_CORPSE_SIZE = 31; // 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_VIEW_MOD_PC_SIZE = 0;
|
||||
static const uint16 TYPE_VIEW_MOD_BANK_SIZE = 0;
|
||||
static const uint16 TYPE_VIEW_MOD_SHARED_BANK_SIZE = 0;
|
||||
static const uint16 TYPE_VIEW_MOD_LIMBO_SIZE = 0;
|
||||
static const uint16 TYPE_ALT_STORAGE_SIZE = 0;
|
||||
static const uint16 TYPE_ARCHIVED_SIZE = 0;
|
||||
static const uint16 TYPE_MAIL_SIZE = 0;
|
||||
@@ -192,12 +123,12 @@ namespace EQEmu
|
||||
|
||||
// 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 int16 EQUIPMENT_BEGIN = 0;
|
||||
static const int16 EQUIPMENT_END = 21;
|
||||
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 int16 GENERAL_BEGIN = 22;
|
||||
static const int16 GENERAL_END = 29;
|
||||
static const uint16 GENERAL_SIZE = 8;
|
||||
static const int16 GENERAL_BAGS_BEGIN = 251;
|
||||
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
||||
@@ -235,21 +166,15 @@ namespace EQEmu
|
||||
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
|
||||
|
||||
// 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
|
||||
static const size_t BANDOLIERS_SIZE = 20; // number of bandolier instances
|
||||
static const size_t BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
||||
|
||||
// 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 POTION_BELT_ITEM_COUNT = 5;
|
||||
|
||||
static const size_t TEXT_LINK_BODY_LENGTH = 56;//RoF2::consts::TEXT_LINK_BODY_LENGTH;
|
||||
static const size_t TEXT_LINK_BODY_LENGTH = 56;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -516,14 +516,6 @@ static const uint8 SkillDamageTypes[EQEmu::skills::HIGHEST_SKILL + 1] = // chang
|
||||
*/
|
||||
|
||||
#define INVALID_INDEX -1
|
||||
#define NO_ITEM 0
|
||||
|
||||
// yes..these are redundant... but, they help to identify and define what is actually being performed
|
||||
// plus, since they're pre-op's, they don't affect the actual binary size
|
||||
#define TYPE_BEGIN 0
|
||||
#define SLOT_BEGIN 0
|
||||
#define SUB_INDEX_BEGIN 0
|
||||
#define AUG_INDEX_BEGIN 0
|
||||
|
||||
static const uint32 MAX_SPELL_DB_ID_VAL = 65535;
|
||||
|
||||
|
||||
+20
-20
@@ -85,7 +85,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
Titanium::invtype::InvTypeViewMODPCSize, Titanium::invtype::InvTypeViewMODBankSize, Titanium::invtype::InvTypeViewMODSharedBankSize, Titanium::invtype::InvTypeViewMODLimboSize, Titanium::invtype::InvTypeAltStorageSize,
|
||||
Titanium::invtype::InvTypeArchivedSize, Titanium::Null, Titanium::Null, Titanium::Null, Titanium::invtype::InvTypeOtherSize,
|
||||
|
||||
Titanium::Null, /*0x000000027FDFFFFF,*/ EQEmu::legacy::ITEM_CONTAINER_SIZE, /*Titanium::invbag::ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*Titanium::invaug::ItemAugSize,*/
|
||||
Titanium::Null, /*0x000000027FDFFFFF,*/ EQEmu::inventory::ContainerCount, /*Titanium::invbag::ItemBagSize,*/ EQEmu::inventory::SocketCount, /*Titanium::invaug::ItemAugSize,*/
|
||||
|
||||
Titanium::inventory::AllowEmptyBagInBag, Titanium::inventory::AllowClickCastFromBag, Titanium::inventory::ConcatenateInvTypeLimbo, Titanium::inventory::AllowOverLevelEquipment
|
||||
},
|
||||
@@ -96,7 +96,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
SoF::invtype::InvTypeViewMODPCSize, SoF::invtype::InvTypeViewMODBankSize, SoF::invtype::InvTypeViewMODSharedBankSize, SoF::invtype::InvTypeViewMODLimboSize, SoF::invtype::InvTypeAltStorageSize,
|
||||
SoF::invtype::InvTypeArchivedSize, SoF::Null, SoF::Null, SoF::Null, SoF::invtype::InvTypeOtherSize,
|
||||
|
||||
SoF::Null, /*0x000000027FFFFFFF,*/ EQEmu::legacy::ITEM_CONTAINER_SIZE, /*SoF::invbag::ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*SoF::invaug::ItemAugSize,*/
|
||||
SoF::Null, /*0x000000027FFFFFFF,*/ EQEmu::inventory::ContainerCount, /*SoF::invbag::ItemBagSize,*/ EQEmu::inventory::SocketCount, /*SoF::invaug::ItemAugSize,*/
|
||||
|
||||
SoF::inventory::AllowEmptyBagInBag, SoF::inventory::AllowClickCastFromBag, SoF::inventory::ConcatenateInvTypeLimbo, SoF::inventory::AllowOverLevelEquipment
|
||||
},
|
||||
@@ -107,7 +107,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
SoD::invtype::InvTypeViewMODPCSize, SoD::invtype::InvTypeViewMODBankSize, SoD::invtype::InvTypeViewMODSharedBankSize, SoD::invtype::InvTypeViewMODLimboSize, SoD::invtype::InvTypeAltStorageSize,
|
||||
SoD::invtype::InvTypeArchivedSize, SoD::Null, SoD::Null, SoD::Null, SoD::invtype::InvTypeOtherSize,
|
||||
|
||||
SoD::Null, /*0x000000027FFFFFFF,*/ EQEmu::legacy::ITEM_CONTAINER_SIZE, /*SoD::invbag::ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*SoD::invaug::ItemAugSize,*/
|
||||
SoD::Null, /*0x000000027FFFFFFF,*/ EQEmu::inventory::ContainerCount, /*SoD::invbag::ItemBagSize,*/ EQEmu::inventory::SocketCount, /*SoD::invaug::ItemAugSize,*/
|
||||
|
||||
SoD::inventory::AllowEmptyBagInBag, SoD::inventory::AllowClickCastFromBag, SoD::inventory::ConcatenateInvTypeLimbo, SoD::inventory::AllowOverLevelEquipment
|
||||
},
|
||||
@@ -118,7 +118,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
UF::invtype::InvTypeViewMODPCSize, UF::invtype::InvTypeViewMODBankSize, UF::invtype::InvTypeViewMODSharedBankSize, UF::invtype::InvTypeViewMODLimboSize, UF::invtype::InvTypeAltStorageSize,
|
||||
UF::invtype::InvTypeArchivedSize, UF::Null, UF::Null, UF::Null, UF::invtype::InvTypeOtherSize,
|
||||
|
||||
UF::Null, /*0x000000027FFFFFFF,*/ EQEmu::legacy::ITEM_CONTAINER_SIZE, /*UF::invbag::ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*UF::invaug::ItemAugSize,*/
|
||||
UF::Null, /*0x000000027FFFFFFF,*/ EQEmu::inventory::ContainerCount, /*UF::invbag::ItemBagSize,*/ EQEmu::inventory::SocketCount, /*UF::invaug::ItemAugSize,*/
|
||||
|
||||
UF::inventory::AllowEmptyBagInBag, UF::inventory::AllowClickCastFromBag, UF::inventory::ConcatenateInvTypeLimbo, UF::inventory::AllowOverLevelEquipment
|
||||
},
|
||||
@@ -129,7 +129,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
RoF::invtype::InvTypeViewMODPCSize, RoF::invtype::InvTypeViewMODBankSize, RoF::invtype::InvTypeViewMODSharedBankSize, RoF::invtype::InvTypeViewMODLimboSize, RoF::invtype::InvTypeAltStorageSize,
|
||||
RoF::invtype::InvTypeArchivedSize, RoF::invtype::InvTypeMailSize, RoF::invtype::InvTypeGuildTrophyTributeSize, RoF::Null, RoF::invtype::InvTypeOtherSize,
|
||||
|
||||
RoF::Null, /*0x00000003FFFFFFFF,*/ EQEmu::legacy::ITEM_CONTAINER_SIZE, /*RoF::invbag::ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*RoF::invaug::ItemAugSize,*/
|
||||
RoF::Null, /*0x00000003FFFFFFFF,*/ EQEmu::inventory::ContainerCount, /*RoF::invbag::ItemBagSize,*/ EQEmu::inventory::SocketCount, /*RoF::invaug::ItemAugSize,*/
|
||||
|
||||
RoF::False, /*RoF::inventory::AllowEmptyBagInBag,*/ RoF::inventory::AllowClickCastFromBag, RoF::inventory::ConcatenateInvTypeLimbo, RoF::inventory::AllowOverLevelEquipment
|
||||
},
|
||||
@@ -140,7 +140,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
RoF2::invtype::InvTypeViewMODPCSize, RoF2::invtype::InvTypeViewMODBankSize, RoF2::invtype::InvTypeViewMODSharedBankSize, RoF2::invtype::InvTypeViewMODLimboSize, RoF2::invtype::InvTypeAltStorageSize,
|
||||
RoF2::invtype::InvTypeArchivedSize, RoF2::invtype::InvTypeMailSize, RoF2::invtype::InvTypeGuildTrophyTributeSize, RoF2::invtype::InvTypeKronoSize, RoF2::invtype::InvTypeOtherSize,
|
||||
|
||||
RoF2::Null, /*0x00000003FFFFFFFF,*/ EQEmu::legacy::ITEM_CONTAINER_SIZE, /*RoF2::invbag::ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*RoF2::invaug::ItemAugSize,*/
|
||||
RoF2::Null, /*0x00000003FFFFFFFF,*/ EQEmu::inventory::ContainerCount, /*RoF2::invbag::ItemBagSize,*/ EQEmu::inventory::SocketCount, /*RoF2::invaug::ItemAugSize,*/
|
||||
|
||||
RoF2::False, /*RoF2::inventory::AllowEmptyBagInBag,*/ RoF2::inventory::AllowClickCastFromBag, RoF2::inventory::ConcatenateInvTypeLimbo, RoF2::inventory::AllowOverLevelEquipment
|
||||
},
|
||||
@@ -151,7 +151,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::Null,
|
||||
EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::Null,
|
||||
|
||||
EntityLimits::NPC::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*ItemAugSize,*/
|
||||
EntityLimits::NPC::Null, EQEmu::inventory::ContainerCount, /*ItemBagSize,*/ EQEmu::inventory::SocketCount, /*ItemAugSize,*/
|
||||
|
||||
EntityLimits::NPC::False, EntityLimits::NPC::False, EntityLimits::NPC::False, EntityLimits::NPC::False
|
||||
},
|
||||
@@ -162,7 +162,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null,
|
||||
EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null,
|
||||
|
||||
EntityLimits::NPCMerchant::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*ItemAugSize,*/
|
||||
EntityLimits::NPCMerchant::Null, EQEmu::inventory::ContainerCount, /*ItemBagSize,*/ EQEmu::inventory::SocketCount, /*ItemAugSize,*/
|
||||
|
||||
EntityLimits::NPCMerchant::False, EntityLimits::NPCMerchant::False, EntityLimits::NPCMerchant::False, EntityLimits::NPCMerchant::False
|
||||
},
|
||||
@@ -173,7 +173,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::Null,
|
||||
EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::Null,
|
||||
|
||||
EntityLimits::Merc::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*ItemAugSize,*/
|
||||
EntityLimits::Merc::Null, EQEmu::inventory::ContainerCount, /*ItemBagSize,*/ EQEmu::inventory::SocketCount, /*ItemAugSize,*/
|
||||
|
||||
EntityLimits::Merc::False, EntityLimits::Merc::False, EntityLimits::Merc::False, EntityLimits::Merc::False
|
||||
},
|
||||
@@ -184,7 +184,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::Null,
|
||||
EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::Null,
|
||||
|
||||
EntityLimits::Bot::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*ItemAugSize,*/
|
||||
EntityLimits::Bot::Null, EQEmu::inventory::ContainerCount, /*ItemBagSize,*/ EQEmu::inventory::SocketCount, /*ItemAugSize,*/
|
||||
|
||||
EntityLimits::Bot::False, EntityLimits::Bot::False, EntityLimits::Bot::False, EntityLimits::Bot::False
|
||||
},
|
||||
@@ -195,7 +195,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null,
|
||||
EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null,
|
||||
|
||||
EntityLimits::ClientPet::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*ItemAugSize,*/
|
||||
EntityLimits::ClientPet::Null, EQEmu::inventory::ContainerCount, /*ItemBagSize,*/ EQEmu::inventory::SocketCount, /*ItemAugSize,*/
|
||||
|
||||
EntityLimits::ClientPet::False, EntityLimits::ClientPet::False, EntityLimits::ClientPet::False, EntityLimits::ClientPet::False
|
||||
},
|
||||
@@ -206,7 +206,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null,
|
||||
EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null,
|
||||
|
||||
EntityLimits::NPCPet::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*ItemAugSize,*/
|
||||
EntityLimits::NPCPet::Null, EQEmu::inventory::ContainerCount, /*ItemBagSize,*/ EQEmu::inventory::SocketCount, /*ItemAugSize,*/
|
||||
|
||||
EntityLimits::NPCPet::False, EntityLimits::NPCPet::False, EntityLimits::NPCPet::False, EntityLimits::NPCPet::False
|
||||
},
|
||||
@@ -217,7 +217,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::Null,
|
||||
EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::Null,
|
||||
|
||||
EntityLimits::MercPet::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*ItemAugSize,*/
|
||||
EntityLimits::MercPet::Null, EQEmu::inventory::ContainerCount, /*ItemBagSize,*/ EQEmu::inventory::SocketCount, /*ItemAugSize,*/
|
||||
|
||||
EntityLimits::MercPet::False, EntityLimits::MercPet::False, EntityLimits::MercPet::False, EntityLimits::MercPet::False
|
||||
},
|
||||
@@ -228,7 +228,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::Null,
|
||||
EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::Null,
|
||||
|
||||
EntityLimits::BotPet::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*ItemAugSize,*/
|
||||
EntityLimits::BotPet::Null, EQEmu::inventory::ContainerCount, /*ItemBagSize,*/ EQEmu::inventory::SocketCount, /*ItemAugSize,*/
|
||||
|
||||
EntityLimits::BotPet::False, EntityLimits::BotPet::False, EntityLimits::BotPet::False, EntityLimits::BotPet::False
|
||||
},
|
||||
@@ -239,7 +239,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
Titanium::invtype::InvTypeViewMODPCSize, Titanium::invtype::InvTypeViewMODBankSize, Titanium::invtype::InvTypeViewMODSharedBankSize, Titanium::invtype::InvTypeViewMODLimboSize, Titanium::Null,
|
||||
Titanium::Null, Titanium::Null, Titanium::Null, Titanium::Null, Titanium::Null,
|
||||
|
||||
Titanium::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*Titanium::Null,*/ Titanium::Null,
|
||||
Titanium::Null, EQEmu::inventory::ContainerCount, /*Titanium::Null,*/ Titanium::Null,
|
||||
|
||||
Titanium::False, Titanium::False, Titanium::False, Titanium::False
|
||||
},
|
||||
@@ -250,7 +250,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
SoF::invtype::InvTypeViewMODPCSize, SoF::invtype::InvTypeViewMODBankSize, SoF::invtype::InvTypeViewMODSharedBankSize, SoF::invtype::InvTypeViewMODLimboSize, SoF::Null,
|
||||
SoF::Null, SoF::Null, SoF::Null, SoF::Null, SoF::Null,
|
||||
|
||||
SoF::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*SoF::Null,*/ SoF::Null,
|
||||
SoF::Null, EQEmu::inventory::ContainerCount, /*SoF::Null,*/ SoF::Null,
|
||||
|
||||
SoF::False, SoF::False, SoF::False, SoF::False
|
||||
},
|
||||
@@ -261,7 +261,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
SoD::invtype::InvTypeViewMODPCSize, SoD::invtype::InvTypeViewMODBankSize, SoD::invtype::InvTypeViewMODSharedBankSize, SoD::invtype::InvTypeViewMODLimboSize, SoD::Null,
|
||||
SoD::Null, SoD::Null, SoD::Null, SoD::Null, SoD::Null,
|
||||
|
||||
SoD::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*SoD::Null,*/ SoD::Null,
|
||||
SoD::Null, EQEmu::inventory::ContainerCount, /*SoD::Null,*/ SoD::Null,
|
||||
|
||||
SoD::False, SoD::False, SoD::False, SoD::False
|
||||
},
|
||||
@@ -272,7 +272,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
UF::invtype::InvTypeViewMODPCSize, UF::invtype::InvTypeViewMODBankSize, UF::invtype::InvTypeViewMODSharedBankSize, UF::invtype::InvTypeViewMODLimboSize, UF::Null,
|
||||
UF::Null, UF::Null, UF::Null, UF::Null, UF::Null,
|
||||
|
||||
UF::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*UF::Null,*/ UF::Null,
|
||||
UF::Null, EQEmu::inventory::ContainerCount, /*UF::Null,*/ UF::Null,
|
||||
|
||||
UF::False, UF::False, UF::False, UF::False
|
||||
},
|
||||
@@ -283,7 +283,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
RoF::invtype::InvTypeViewMODPCSize, RoF::invtype::InvTypeViewMODBankSize, RoF::invtype::InvTypeViewMODSharedBankSize, RoF::invtype::InvTypeViewMODLimboSize, RoF::Null,
|
||||
RoF::Null, RoF::Null, RoF::Null, RoF::Null, RoF::Null,
|
||||
|
||||
RoF::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*RoF::Null,*/ RoF::Null,
|
||||
RoF::Null, EQEmu::inventory::ContainerCount, /*RoF::Null,*/ RoF::Null,
|
||||
|
||||
RoF::False, RoF::False, RoF::False, RoF::False
|
||||
},
|
||||
@@ -294,7 +294,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi
|
||||
RoF2::invtype::InvTypeViewMODPCSize, RoF2::invtype::InvTypeViewMODBankSize, RoF2::invtype::InvTypeViewMODSharedBankSize, RoF2::invtype::InvTypeViewMODLimboSize, RoF2::Null,
|
||||
RoF2::Null, RoF2::Null, RoF2::Null, RoF2::Null, RoF2::Null,
|
||||
|
||||
RoF2::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*RoF2::Null,*/ RoF2::Null,
|
||||
RoF2::Null, EQEmu::inventory::ContainerCount, /*RoF2::Null,*/ RoF2::Null,
|
||||
|
||||
RoF2::False, RoF2::False, RoF2::False, RoF2::False
|
||||
}
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ namespace EQEmu
|
||||
namespace inventory {
|
||||
class LookupEntry {
|
||||
public:
|
||||
size_t InventoryTypeSize[legacy::TypeCount];
|
||||
size_t InventoryTypeSize[25]; // should reflect EQEmu::inventory::typeCount referenced in emu_constants.h
|
||||
|
||||
uint64 PossessionsBitmask;
|
||||
size_t ItemBagSize;
|
||||
|
||||
@@ -127,7 +127,7 @@ struct LDoNTrapTemplate
|
||||
|
||||
// All clients translate the character select information to some degree
|
||||
|
||||
struct CharSelectEquip : EQEmu::Texture_Struct, EQEmu::Tint_Struct {};
|
||||
struct CharSelectEquip : EQEmu::textures::Texture_Struct, EQEmu::textures::Tint_Struct {};
|
||||
|
||||
// RoF2-based hybrid struct
|
||||
struct CharacterSelectEntry_Struct
|
||||
@@ -142,7 +142,7 @@ struct CharacterSelectEntry_Struct
|
||||
uint16 Instance;
|
||||
uint8 Gender;
|
||||
uint8 Face;
|
||||
CharSelectEquip Equip[EQEmu::textures::TextureCount];
|
||||
CharSelectEquip Equip[EQEmu::textures::materialCount];
|
||||
uint8 Unknown15; // Seen FF
|
||||
uint8 Unknown19; // Seen FF
|
||||
uint32 DrakkinTattoo;
|
||||
@@ -834,7 +834,7 @@ struct SuspendedMinion_Struct
|
||||
/*002*/ uint32 HP;
|
||||
/*006*/ uint32 Mana;
|
||||
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||
/*510*/ EQEmu::TextureShortProfile Items;
|
||||
/*510*/ EQEmu::TextureMaterialProfile Items;
|
||||
/*546*/ char Name[64];
|
||||
/*610*/
|
||||
};
|
||||
@@ -942,7 +942,7 @@ struct PlayerProfile_Struct
|
||||
/*0304*/ uint8 ability_time_minutes;
|
||||
/*0305*/ uint8 ability_time_hours; //place holder
|
||||
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
|
||||
/*0312*/ EQEmu::TextureShortProfile item_material; // Item texture/material of worn/held items
|
||||
/*0312*/ EQEmu::TextureMaterialProfile item_material; // Item texture/material of worn/held items
|
||||
/*0348*/ uint8 unknown0348[44];
|
||||
/*0392*/ EQEmu::TintProfile item_tint;
|
||||
/*0428*/ AA_Array aa_array[MAX_PP_AA_ARRAY];
|
||||
@@ -1179,7 +1179,7 @@ struct WearChange_Struct{
|
||||
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
||||
/*014*/ uint32 hero_forge_model; // New to VoA
|
||||
/*018*/ uint32 unknown18; // New to RoF
|
||||
/*022*/ EQEmu::Tint_Struct color;
|
||||
/*022*/ EQEmu::textures::Tint_Struct color;
|
||||
/*026*/ uint8 wear_slot_id;
|
||||
/*027*/
|
||||
};
|
||||
|
||||
+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 */
|
||||
EQEmu::TextureShortProfile pet_items; /* Not Used */
|
||||
EQEmu::TextureMaterialProfile pet_items; /* Not Used */
|
||||
char merc_name[64]; /* Used */
|
||||
|
||||
uint32 aa_effects; /* Used */
|
||||
|
||||
@@ -0,0 +1,397 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "inventory_slot.h"
|
||||
#include "textures.h"
|
||||
#include "string_util.h"
|
||||
|
||||
|
||||
int8 EQEmu::inventory::ConvertEquipmentIndexToTextureIndex(int16 slot_index)
|
||||
{
|
||||
switch (slot_index) {
|
||||
case slotHead:
|
||||
return textures::armorHead;
|
||||
case slotChest:
|
||||
return textures::armorChest;
|
||||
case slotArms:
|
||||
return textures::armorArms;
|
||||
case slotWrist1:
|
||||
return textures::armorWrist;
|
||||
case slotHands:
|
||||
return textures::armorHands;
|
||||
case slotLegs:
|
||||
return textures::armorLegs;
|
||||
case slotFeet:
|
||||
return textures::armorFeet;
|
||||
case slotPrimary:
|
||||
return textures::weaponPrimary;
|
||||
case slotSecondary:
|
||||
return textures::weaponSecondary;
|
||||
default:
|
||||
return textures::textureInvalid;
|
||||
}
|
||||
}
|
||||
|
||||
int8 EQEmu::inventory::ConvertEquipmentSlotToTextureIndex(const InventorySlot& inventory_slot)
|
||||
{
|
||||
if ((!inventory_slot.Typeless() && !inventory_slot.IsTypeIndex(typePossessions)) || !inventory_slot.IsContainerIndex(containerInvalid) || !inventory_slot.IsSocketIndex(socketInvalid))
|
||||
return textures::textureInvalid;
|
||||
|
||||
return ConvertEquipmentIndexToTextureIndex(inventory_slot.SlotIndex());
|
||||
}
|
||||
|
||||
int16 EQEmu::inventory::ConvertTextureIndexToEquipmentIndex(int8 texture_index)
|
||||
{
|
||||
switch (texture_index) {
|
||||
case textures::armorHead:
|
||||
return slotHead;
|
||||
case textures::armorChest:
|
||||
return slotChest;
|
||||
case textures::armorArms:
|
||||
return slotArms;
|
||||
case textures::armorWrist:
|
||||
return slotWrist1;
|
||||
case textures::armorHands:
|
||||
return slotHands;
|
||||
case textures::armorLegs:
|
||||
return slotLegs;
|
||||
case textures::armorFeet:
|
||||
return slotFeet;
|
||||
case textures::weaponPrimary:
|
||||
return slotPrimary;
|
||||
case textures::weaponSecondary:
|
||||
return slotSecondary;
|
||||
default:
|
||||
return slotInvalid;
|
||||
}
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsValidSlot() const
|
||||
{
|
||||
if (_typeless)
|
||||
return false;
|
||||
|
||||
int16 slot_count = inventory::SlotCount(_type_index);
|
||||
if (!slot_count || _slot_index < inventory::slotBegin || _slot_index >= slot_count)
|
||||
return false;
|
||||
|
||||
if (_container_index < inventory::containerInvalid || _container_index >= inventory::ContainerCount)
|
||||
return false;
|
||||
|
||||
if (_socket_index < inventory::socketInvalid || _socket_index >= inventory::SocketCount)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsDeleteSlot() const
|
||||
{
|
||||
if (_typeless)
|
||||
return (_slot_index == inventory::slotInvalid && _container_index == inventory::containerInvalid && _socket_index == inventory::socketInvalid);
|
||||
else
|
||||
return (_type_index == inventory::typeInvalid && _slot_index == inventory::slotInvalid && _container_index == inventory::containerInvalid && _socket_index == inventory::socketInvalid);
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsEquipmentIndex(int16 slot_index)
|
||||
{
|
||||
/*if (slot_index < inventory::EquipmentBegin || slot_index > inventory::EquipmentEnd)
|
||||
return false;*/
|
||||
if ((slot_index < legacy::EQUIPMENT_BEGIN || slot_index > legacy::EQUIPMENT_END) && slot_index != legacy::SLOT_POWER_SOURCE)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsGeneralIndex(int16 slot_index)
|
||||
{
|
||||
/*if (slot_index < inventory::GeneralBegin || slot_index > inventory::GeneralEnd)
|
||||
return false;*/
|
||||
if (slot_index < legacy::GENERAL_BEGIN || slot_index > legacy::GENERAL_END)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsCursorIndex(int16 slot_index)
|
||||
{
|
||||
/*if (slot_index != inventory::slotCursor)
|
||||
return false;*/
|
||||
if (slot_index != legacy::SLOT_CURSOR)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsWeaponIndex(int16 slot_index)
|
||||
{
|
||||
/*if ((slot_index != inventory::slotRange) && (slot_index != inventory::slotPrimary) && (slot_index != inventory::slotSecondary))
|
||||
return false;*/
|
||||
if ((slot_index != legacy::SLOT_RANGE) && (slot_index != legacy::SLOT_PRIMARY) && (slot_index != legacy::SLOT_SECONDARY))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsTextureIndex(int16 slot_index)
|
||||
{
|
||||
switch (slot_index) {
|
||||
case inventory::slotHead:
|
||||
case inventory::slotChest:
|
||||
case inventory::slotArms:
|
||||
case inventory::slotWrist1:
|
||||
case inventory::slotHands:
|
||||
case inventory::slotLegs:
|
||||
case inventory::slotFeet:
|
||||
case inventory::slotPrimary:
|
||||
case inventory::slotSecondary:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsTintableIndex(int16 slot_index)
|
||||
{
|
||||
switch (slot_index) {
|
||||
case inventory::slotHead:
|
||||
case inventory::slotChest:
|
||||
case inventory::slotArms:
|
||||
case inventory::slotWrist1:
|
||||
case inventory::slotHands:
|
||||
case inventory::slotLegs:
|
||||
case inventory::slotFeet:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsEquipmentSlot() const
|
||||
{
|
||||
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||
return false;
|
||||
|
||||
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||
return false;
|
||||
|
||||
return IsEquipmentIndex(_slot_index);
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsGeneralSlot() const
|
||||
{
|
||||
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||
return false;
|
||||
|
||||
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||
return false;
|
||||
|
||||
return IsGeneralIndex(_socket_index);
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsCursorSlot() const
|
||||
{
|
||||
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||
return false;
|
||||
|
||||
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||
return false;
|
||||
|
||||
return IsCursorIndex(_slot_index);
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsWeaponSlot() const
|
||||
{
|
||||
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||
return false;
|
||||
|
||||
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||
return false;
|
||||
|
||||
return IsWeaponIndex(_slot_index);
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsTextureSlot() const
|
||||
{
|
||||
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||
return false;
|
||||
|
||||
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||
return false;
|
||||
|
||||
return IsTextureIndex(_slot_index);
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsTintableSlot() const
|
||||
{
|
||||
if (!_typeless && (_type_index != inventory::typePossessions))
|
||||
return false;
|
||||
|
||||
if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||
return false;
|
||||
|
||||
return IsTintableIndex(_slot_index);
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsSlot() const
|
||||
{
|
||||
if (!_typeless && (_type_index == inventory::typeInvalid))
|
||||
return false;
|
||||
if (_slot_index == inventory::slotInvalid)
|
||||
return false;
|
||||
if (_container_index != inventory::containerInvalid)
|
||||
return false;
|
||||
if (_socket_index != inventory::socketInvalid)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsSlotSocket() const
|
||||
{
|
||||
if (!_typeless && (_type_index == inventory::typeInvalid))
|
||||
return false;
|
||||
if (_slot_index == inventory::slotInvalid)
|
||||
return false;
|
||||
if (_container_index != inventory::containerInvalid)
|
||||
return false;
|
||||
if (_socket_index == inventory::socketInvalid)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsContainer() const
|
||||
{
|
||||
if (!_typeless && (_type_index == inventory::typeInvalid))
|
||||
return false;
|
||||
if (_slot_index == inventory::slotInvalid)
|
||||
return false;
|
||||
if (_container_index == inventory::containerInvalid)
|
||||
return false;
|
||||
if (_socket_index != inventory::socketInvalid)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::IsContainerSocket() const
|
||||
{
|
||||
if (!_typeless && (_type_index == inventory::typeInvalid))
|
||||
return false;
|
||||
if (_slot_index == inventory::slotInvalid)
|
||||
return false;
|
||||
if (_container_index == inventory::containerInvalid)
|
||||
return false;
|
||||
if (_socket_index == inventory::socketInvalid)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
EQEmu::InventorySlot EQEmu::InventorySlot::ToTopOwner() const
|
||||
{
|
||||
return InventorySlot(_type_index, _slot_index);
|
||||
}
|
||||
|
||||
EQEmu::InventorySlot EQEmu::InventorySlot::ToOwner() const
|
||||
{
|
||||
if (IsSlot() || IsSlotSocket() || IsContainer())
|
||||
return InventorySlot(_type_index, _slot_index);
|
||||
|
||||
if (IsContainerSocket())
|
||||
return InventorySlot(_type_index, _slot_index, _container_index);
|
||||
|
||||
return InventorySlot();
|
||||
}
|
||||
|
||||
const std::string EQEmu::InventorySlot::ToString() const
|
||||
{
|
||||
return StringFormat("(%i%s, %i, %i, %i)", _type_index, (_typeless ? " [typeless]" : ""), _slot_index, _container_index, _socket_index);
|
||||
}
|
||||
|
||||
const std::string EQEmu::InventorySlot::ToName() const
|
||||
{
|
||||
return StringFormat("InventorySlot - _type_index: %i%s, _slot_index: %i, _container_index: %i, _socket_index: %i", _type_index, (_typeless ? " [typeless]" : ""), _slot_index, _container_index, _socket_index);
|
||||
}
|
||||
|
||||
void EQEmu::InventorySlot::SetInvalidSlot()
|
||||
{
|
||||
_type_index = inventory::typeInvalid;
|
||||
_slot_index = inventory::slotInvalid;
|
||||
_container_index = inventory::containerInvalid;
|
||||
_socket_index = inventory::socketInvalid;
|
||||
}
|
||||
|
||||
//bool EQEmu::InventorySlot::IsBonusIndex(int16 slot_index)
|
||||
//{
|
||||
// if ((slot_index >= inventory::EquipmentBegin) && (slot_index <= inventory::EquipmentEnd) && (slot_index != inventory::slotAmmo))
|
||||
// return true;
|
||||
//
|
||||
// return false;
|
||||
//}
|
||||
|
||||
//bool EQEmu::InventorySlot::IsBonusSlot() const
|
||||
//{
|
||||
// if ((_type_index != inventory::typePossessions) || (_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid))
|
||||
// return false;
|
||||
//
|
||||
// return IsBonusIndex(_slot_index);
|
||||
//}
|
||||
|
||||
bool inventory_slot_typeless_lessthan(const EQEmu::InventorySlot& lhs, const EQEmu::InventorySlot& rhs)
|
||||
{
|
||||
if (lhs.SlotIndex() < rhs.SlotIndex())
|
||||
return true;
|
||||
|
||||
if ((lhs.SlotIndex() == rhs.SlotIndex()) && (lhs.ContainerIndex() < rhs.ContainerIndex()))
|
||||
return true;
|
||||
|
||||
if ((lhs.SlotIndex() == rhs.SlotIndex()) && (lhs.ContainerIndex() == rhs.ContainerIndex()) && (lhs.SocketIndex() < rhs.SocketIndex()))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EQEmu::InventorySlot::operator<(const InventorySlot& rhs) const
|
||||
{
|
||||
if (Typeless() || rhs.Typeless())
|
||||
return inventory_slot_typeless_lessthan(*this, rhs);
|
||||
|
||||
if (TypeIndex() < rhs.TypeIndex())
|
||||
return true;
|
||||
|
||||
if ((TypeIndex() == rhs.TypeIndex()) && (SlotIndex() < rhs.SlotIndex()))
|
||||
return true;
|
||||
|
||||
if ((TypeIndex() == rhs.TypeIndex()) && (SlotIndex() == rhs.SlotIndex()) && (ContainerIndex() < rhs.ContainerIndex()))
|
||||
return true;
|
||||
|
||||
if ((TypeIndex() == rhs.TypeIndex()) && (SlotIndex() == rhs.SlotIndex()) && (ContainerIndex() == rhs.ContainerIndex()) && (SocketIndex() < rhs.SocketIndex()))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EQEmu::operator==(const InventorySlot& lhs, const InventorySlot& rhs)
|
||||
{
|
||||
if (lhs.Typeless() || rhs.Typeless())
|
||||
return ((lhs.SlotIndex() == rhs.SlotIndex()) && (lhs.ContainerIndex() == rhs.ContainerIndex()) && (lhs.SocketIndex() == rhs.SocketIndex()));
|
||||
|
||||
return ((lhs.TypeIndex() == rhs.TypeIndex()) && (lhs.SlotIndex() == rhs.SlotIndex()) && (lhs.ContainerIndex() == rhs.ContainerIndex()) && (lhs.SocketIndex() == rhs.SocketIndex()));
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef COMMON_INVENTORY_SLOT
|
||||
#define COMMON_INVENTORY_SLOT
|
||||
|
||||
#include "emu_constants.h"
|
||||
|
||||
|
||||
namespace EQEmu
|
||||
{
|
||||
class InventorySlot;
|
||||
|
||||
namespace inventory {
|
||||
int8 ConvertEquipmentIndexToTextureIndex(int16 slot_index);
|
||||
int8 ConvertEquipmentSlotToTextureIndex(const InventorySlot& inventory_slot);
|
||||
int16 ConvertTextureIndexToEquipmentIndex(int8 texture_index);
|
||||
}
|
||||
|
||||
class InventorySlot {
|
||||
public:
|
||||
InventorySlot() : _type_index(inventory::typeInvalid), _slot_index(inventory::slotInvalid), _container_index(inventory::containerInvalid), _socket_index(inventory::socketInvalid), _typeless(false) { }
|
||||
InventorySlot(int16 type_index) : _type_index(type_index), _slot_index(inventory::slotInvalid), _container_index(inventory::containerInvalid), _socket_index(inventory::socketInvalid), _typeless(false) { }
|
||||
InventorySlot(int16 type_index, int16 parent_index) : _type_index(type_index), _slot_index(parent_index), _container_index(inventory::containerInvalid), _socket_index(inventory::socketInvalid), _typeless(false) { }
|
||||
InventorySlot(int16 type_index, int16 parent_index, int16 bag_index) : _type_index(type_index), _slot_index(parent_index), _container_index(bag_index), _socket_index(inventory::socketInvalid), _typeless(false) { }
|
||||
InventorySlot(int16 type_index, int16 parent_index, int16 bag_index, int16 aug_index) : _type_index(type_index), _slot_index(parent_index), _container_index(bag_index), _socket_index(aug_index), _typeless(false) { }
|
||||
InventorySlot(const InventorySlot& r) : _type_index(r._type_index), _slot_index(r._slot_index), _container_index(r._container_index), _socket_index(r._socket_index), _typeless(r._typeless) { }
|
||||
InventorySlot(int16 type_index, const InventorySlot& r) : _type_index(type_index), _slot_index(r._slot_index), _container_index(r._container_index), _socket_index(r._socket_index), _typeless(false) { }
|
||||
|
||||
inline int16 TypeIndex() const { return _type_index; }
|
||||
inline int16 SlotIndex() const { return _slot_index; }
|
||||
inline int16 ContainerIndex() const { return _container_index; }
|
||||
inline int16 SocketIndex() const { return _socket_index; }
|
||||
|
||||
bool Typeless() const { return _typeless; }
|
||||
|
||||
bool IsValidSlot() const;
|
||||
bool IsDeleteSlot() const;
|
||||
|
||||
static bool IsEquipmentIndex(int16 slot_index);
|
||||
static bool IsGeneralIndex(int16 slot_index);
|
||||
static bool IsCursorIndex(int16 slot_index);
|
||||
static bool IsWeaponIndex(int16 slot_index);
|
||||
static bool IsTextureIndex(int16 slot_index);
|
||||
static bool IsTintableIndex(int16 slot_index);
|
||||
|
||||
bool IsEquipmentSlot() const;
|
||||
bool IsGeneralSlot() const;
|
||||
bool IsCursorSlot() const;
|
||||
bool IsWeaponSlot() const;
|
||||
bool IsTextureSlot() const;
|
||||
bool IsTintableSlot() const;
|
||||
|
||||
bool IsSlot() const;
|
||||
bool IsSlotSocket() const;
|
||||
bool IsContainer() const;
|
||||
bool IsContainerSocket() const;
|
||||
|
||||
InventorySlot ToTopOwner() const;
|
||||
InventorySlot ToOwner() const;
|
||||
|
||||
const std::string ToString() const;
|
||||
const std::string ToName() const;
|
||||
|
||||
bool IsTypeIndex(int16 type_index) const { return (_type_index == type_index); }
|
||||
bool IsSlotIndex(int16 slot_index) const { return (_slot_index == slot_index); }
|
||||
bool IsContainerIndex(int16 container_index) const { return (_container_index == container_index); }
|
||||
bool IsSocketIndex(int16 socket_index) const { return (_socket_index == socket_index); }
|
||||
|
||||
void SetType(int16 type_index) { _type_index = type_index; }
|
||||
void SetSlot(int16 slot_index) { _slot_index = slot_index; }
|
||||
void SetContainer(int16 container_index) { _container_index = container_index; }
|
||||
void SetSocket(int16 socket_index) { _socket_index = socket_index; }
|
||||
|
||||
void SetInvalidSlot();
|
||||
|
||||
void SetTypeInvalid() { _type_index = inventory::typeInvalid; }
|
||||
void SetSlotInvalid() { _slot_index = inventory::slotInvalid; }
|
||||
void SetContainerInvalid() { _container_index = inventory::containerInvalid; }
|
||||
void SetSocketInvalid() { _socket_index = inventory::socketInvalid; }
|
||||
|
||||
void SetTypeBegin() { _type_index = inventory::typeBegin; }
|
||||
void SetSlotBegin() { _slot_index = inventory::slotBegin; }
|
||||
void SetContainerBegin() { _container_index = inventory::containerBegin; }
|
||||
void SetSocketBegin() { _socket_index = inventory::socketBegin; }
|
||||
|
||||
void IncrementType() { ++_type_index; }
|
||||
void IncrementSlot() { ++_slot_index; }
|
||||
void IncrementContainer() { ++_container_index; }
|
||||
void IncrementSocket() { ++_socket_index; }
|
||||
|
||||
void SetTypeless() { _typeless = true; }
|
||||
void ClearTypeless() { _typeless = false; }
|
||||
|
||||
// these two methods should really check for all bonus-valid slots..currently checks for equipment only (rework needed)
|
||||
//static bool IsBonusIndex(int16 slot_index);
|
||||
//bool IsBonusSlot() const;
|
||||
|
||||
bool operator<(const InventorySlot& rhs) const;
|
||||
|
||||
private:
|
||||
int16 _type_index;
|
||||
//int16 _unknown2; // not implemented
|
||||
int16 _slot_index;
|
||||
int16 _container_index;
|
||||
int16 _socket_index;
|
||||
//int16 _unknown1; // not implemented
|
||||
|
||||
bool _typeless;
|
||||
};
|
||||
|
||||
bool operator==(const InventorySlot& lhs, const InventorySlot& rhs);
|
||||
bool operator!=(const InventorySlot& lhs, const InventorySlot& rhs) { return (!(lhs == rhs)); }
|
||||
|
||||
} /*EQEmu*/
|
||||
|
||||
#endif /*COMMON_INVENTORY_SLOT*/
|
||||
+3
-3
@@ -464,9 +464,9 @@ namespace EQEmu
|
||||
int32 FactionAmt4; // Faction Amt 4
|
||||
char CharmFile[32]; // ?
|
||||
uint32 AugType;
|
||||
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
|
||||
uint8 AugSlotType[inventory::SocketCount]; // RoF: Augment Slot 1-6 Type
|
||||
uint8 AugSlotVisible[inventory::SocketCount]; // RoF: Augment Slot 1-6 Visible
|
||||
uint8 AugSlotUnk2[inventory::SocketCount]; // RoF: Augment Slot 1-6 Unknown Most likely Powersource related
|
||||
uint32 LDoNTheme;
|
||||
uint32 LDoNPrice;
|
||||
uint32 LDoNSold;
|
||||
|
||||
+153
-153
@@ -158,7 +158,7 @@ EQEmu::ItemInstance* Inventory::GetItem(int16 slot_id) const
|
||||
EQEmu::ItemInstance* result = nullptr;
|
||||
|
||||
// Cursor
|
||||
if (slot_id == EQEmu::legacy::SlotCursor) {
|
||||
if (slot_id == EQEmu::inventory::slotCursor) {
|
||||
// Cursor slot
|
||||
result = m_cursor.peek_front();
|
||||
}
|
||||
@@ -180,7 +180,7 @@ EQEmu::ItemInstance* Inventory::GetItem(int16 slot_id) const
|
||||
result = _GetItem(m_inv, slot_id);
|
||||
}
|
||||
else if ((slot_id >= EQEmu::legacy::EQUIPMENT_BEGIN && slot_id <= EQEmu::legacy::EQUIPMENT_END) ||
|
||||
(slot_id >= EQEmu::legacy::TRIBUTE_BEGIN && slot_id <= EQEmu::legacy::TRIBUTE_END) || (slot_id == EQEmu::legacy::SlotPowerSource)) {
|
||||
(slot_id >= EQEmu::legacy::TRIBUTE_BEGIN && slot_id <= EQEmu::legacy::TRIBUTE_END) || (slot_id == EQEmu::inventory::slotPowerSource)) {
|
||||
// Equippable slots (on body)
|
||||
result = _GetItem(m_worn, slot_id);
|
||||
}
|
||||
@@ -250,7 +250,7 @@ int16 Inventory::PutItem(int16 slot_id, const EQEmu::ItemInstance& inst)
|
||||
int16 Inventory::PushCursor(const EQEmu::ItemInstance& inst)
|
||||
{
|
||||
m_cursor.push(inst.Clone());
|
||||
return EQEmu::legacy::SlotCursor;
|
||||
return EQEmu::inventory::slotCursor;
|
||||
}
|
||||
|
||||
EQEmu::ItemInstance* Inventory::GetCursorItem()
|
||||
@@ -316,7 +316,7 @@ bool Inventory::CheckNoDrop(int16 slot_id) {
|
||||
if (!inst) return false;
|
||||
if (!inst->GetItem()->NoDrop) return true;
|
||||
if (inst->GetItem()->ItemClass == 1) {
|
||||
for (uint8 i = SUB_INDEX_BEGIN; i < EQEmu::legacy::ITEM_CONTAINER_SIZE; i++) {
|
||||
for (uint8 i = EQEmu::inventory::containerBegin; i < EQEmu::inventory::ContainerCount; i++) {
|
||||
EQEmu::ItemInstance* bagitem = GetItem(Inventory::CalcSlotId(slot_id, i));
|
||||
if (bagitem && !bagitem->GetItem()->NoDrop)
|
||||
return true;
|
||||
@@ -331,10 +331,10 @@ EQEmu::ItemInstance* Inventory::PopItem(int16 slot_id)
|
||||
{
|
||||
EQEmu::ItemInstance* p = nullptr;
|
||||
|
||||
if (slot_id == EQEmu::legacy::SlotCursor) {
|
||||
if (slot_id == EQEmu::inventory::slotCursor) {
|
||||
p = m_cursor.pop();
|
||||
}
|
||||
else if ((slot_id >= EQEmu::legacy::EQUIPMENT_BEGIN && slot_id <= EQEmu::legacy::EQUIPMENT_END) || (slot_id == EQEmu::legacy::SlotPowerSource)) {
|
||||
else if ((slot_id >= EQEmu::legacy::EQUIPMENT_BEGIN && slot_id <= EQEmu::legacy::EQUIPMENT_END) || (slot_id == EQEmu::inventory::slotPowerSource)) {
|
||||
p = m_worn[slot_id];
|
||||
m_worn.erase(slot_id);
|
||||
}
|
||||
@@ -390,9 +390,9 @@ bool Inventory::HasSpaceForItem(const EQEmu::ItemData *ItemToTry, int16 Quantity
|
||||
}
|
||||
if (InvItem && InvItem->IsClassBag()) {
|
||||
|
||||
int16 BaseSlotID = Inventory::CalcSlotId(i, SUB_INDEX_BEGIN);
|
||||
int16 BaseSlotID = Inventory::CalcSlotId(i, EQEmu::inventory::containerBegin);
|
||||
uint8 BagSize = InvItem->GetItem()->BagSlots;
|
||||
for (uint8 BagSlot = SUB_INDEX_BEGIN; BagSlot < BagSize; BagSlot++) {
|
||||
for (uint8 BagSlot = EQEmu::inventory::containerBegin; BagSlot < BagSize; BagSlot++) {
|
||||
|
||||
InvItem = GetItem(BaseSlotID + BagSlot);
|
||||
|
||||
@@ -434,11 +434,11 @@ bool Inventory::HasSpaceForItem(const EQEmu::ItemData *ItemToTry, int16 Quantity
|
||||
}
|
||||
else if (InvItem->IsClassBag() && CanItemFitInContainer(ItemToTry, InvItem->GetItem())) {
|
||||
|
||||
int16 BaseSlotID = Inventory::CalcSlotId(i, SUB_INDEX_BEGIN);
|
||||
int16 BaseSlotID = Inventory::CalcSlotId(i, EQEmu::inventory::containerBegin);
|
||||
|
||||
uint8 BagSize = InvItem->GetItem()->BagSlots;
|
||||
|
||||
for (uint8 BagSlot = SUB_INDEX_BEGIN; BagSlot<BagSize; BagSlot++) {
|
||||
for (uint8 BagSlot = EQEmu::inventory::containerBegin; BagSlot<BagSize; BagSlot++) {
|
||||
|
||||
InvItem = GetItem(BaseSlotID + BagSlot);
|
||||
|
||||
@@ -633,11 +633,11 @@ int16 Inventory::FindFreeSlot(bool for_bag, bool try_cursor, uint8 min_size, boo
|
||||
continue;
|
||||
}
|
||||
|
||||
int16 base_slot_id = Inventory::CalcSlotId(i, SUB_INDEX_BEGIN);
|
||||
int16 base_slot_id = Inventory::CalcSlotId(i, EQEmu::inventory::containerBegin);
|
||||
|
||||
uint8 slots = inst->GetItem()->BagSlots;
|
||||
uint8 j;
|
||||
for (j = SUB_INDEX_BEGIN; j<slots; j++) {
|
||||
for (j = EQEmu::inventory::containerBegin; j<slots; j++) {
|
||||
if (!GetItem(base_slot_id + j)) {
|
||||
// Found available slot within bag
|
||||
return (base_slot_id + j);
|
||||
@@ -650,7 +650,7 @@ int16 Inventory::FindFreeSlot(bool for_bag, bool try_cursor, uint8 min_size, boo
|
||||
if (try_cursor) {
|
||||
// Always room on cursor (it's a queue)
|
||||
// (we may wish to cap this in the future)
|
||||
return EQEmu::legacy::SlotCursor;
|
||||
return EQEmu::inventory::slotCursor;
|
||||
}
|
||||
|
||||
// No available slots
|
||||
@@ -674,7 +674,7 @@ int16 Inventory::FindFreeSlotForTradeItem(const EQEmu::ItemInstance* inst) {
|
||||
return free_slot;
|
||||
}
|
||||
|
||||
return EQEmu::legacy::SlotCursor; // return cursor since bags do not stack and will not fit inside other bags..yet...)
|
||||
return EQEmu::inventory::slotCursor; // return cursor since bags do not stack and will not fit inside other bags..yet...)
|
||||
}
|
||||
|
||||
// step 2: find partial room for stackables
|
||||
@@ -696,7 +696,7 @@ int16 Inventory::FindFreeSlotForTradeItem(const EQEmu::ItemInstance* inst) {
|
||||
continue;
|
||||
|
||||
if (main_inst->IsClassBag()) { // if item-specific containers already have bad items, we won't fix it here...
|
||||
for (uint8 free_bag_slot = SUB_INDEX_BEGIN; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot < EQEmu::legacy::ITEM_CONTAINER_SIZE); ++free_bag_slot) {
|
||||
for (uint8 free_bag_slot = EQEmu::inventory::containerBegin; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot < EQEmu::inventory::ContainerCount); ++free_bag_slot) {
|
||||
const EQEmu::ItemInstance* sub_inst = main_inst->GetItem(free_bag_slot);
|
||||
|
||||
if (!sub_inst)
|
||||
@@ -717,7 +717,7 @@ int16 Inventory::FindFreeSlotForTradeItem(const EQEmu::ItemInstance* inst) {
|
||||
if (!main_inst || (main_inst->GetItem()->BagType != EQEmu::item::BagTypeQuiver) || !main_inst->IsClassBag())
|
||||
continue;
|
||||
|
||||
for (uint8 free_bag_slot = SUB_INDEX_BEGIN; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot < EQEmu::legacy::ITEM_CONTAINER_SIZE); ++free_bag_slot) {
|
||||
for (uint8 free_bag_slot = EQEmu::inventory::containerBegin; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot < EQEmu::inventory::ContainerCount); ++free_bag_slot) {
|
||||
if (!main_inst->GetItem(free_bag_slot))
|
||||
return Inventory::CalcSlotId(free_slot, free_bag_slot);
|
||||
}
|
||||
@@ -732,7 +732,7 @@ int16 Inventory::FindFreeSlotForTradeItem(const EQEmu::ItemInstance* inst) {
|
||||
if (!main_inst || (main_inst->GetItem()->BagType != EQEmu::item::BagTypeBandolier) || !main_inst->IsClassBag())
|
||||
continue;
|
||||
|
||||
for (uint8 free_bag_slot = SUB_INDEX_BEGIN; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot < EQEmu::legacy::ITEM_CONTAINER_SIZE); ++free_bag_slot) {
|
||||
for (uint8 free_bag_slot = EQEmu::inventory::containerBegin; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot < EQEmu::inventory::ContainerCount); ++free_bag_slot) {
|
||||
if (!main_inst->GetItem(free_bag_slot))
|
||||
return Inventory::CalcSlotId(free_slot, free_bag_slot);
|
||||
}
|
||||
@@ -754,7 +754,7 @@ int16 Inventory::FindFreeSlotForTradeItem(const EQEmu::ItemInstance* inst) {
|
||||
if ((main_inst->GetItem()->BagSize < inst->GetItem()->Size) || (main_inst->GetItem()->BagType == EQEmu::item::BagTypeBandolier) || (main_inst->GetItem()->BagType == EQEmu::item::BagTypeQuiver))
|
||||
continue;
|
||||
|
||||
for (uint8 free_bag_slot = SUB_INDEX_BEGIN; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot < EQEmu::legacy::ITEM_CONTAINER_SIZE); ++free_bag_slot) {
|
||||
for (uint8 free_bag_slot = EQEmu::inventory::containerBegin; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot < EQEmu::inventory::ContainerCount); ++free_bag_slot) {
|
||||
if (!main_inst->GetItem(free_bag_slot))
|
||||
return Inventory::CalcSlotId(free_slot, free_bag_slot);
|
||||
}
|
||||
@@ -762,7 +762,7 @@ int16 Inventory::FindFreeSlotForTradeItem(const EQEmu::ItemInstance* inst) {
|
||||
}
|
||||
|
||||
//return INVALID_INDEX; // everything else pushes to the cursor
|
||||
return EQEmu::legacy::SlotCursor;
|
||||
return EQEmu::inventory::slotCursor;
|
||||
}
|
||||
|
||||
// Opposite of below: Get parent bag slot_id from a slot inside of bag
|
||||
@@ -775,19 +775,19 @@ int16 Inventory::CalcSlotId(int16 slot_id) {
|
||||
//else if (slot_id >= 3100 && slot_id <= 3179) should be {3031..3110}..where did this range come from!!? (verified db save range)
|
||||
|
||||
if (slot_id >= EQEmu::legacy::GENERAL_BAGS_BEGIN && slot_id <= EQEmu::legacy::GENERAL_BAGS_END) {
|
||||
parent_slot_id = EQEmu::legacy::GENERAL_BEGIN + (slot_id - EQEmu::legacy::GENERAL_BAGS_BEGIN) / EQEmu::legacy::ITEM_CONTAINER_SIZE;
|
||||
parent_slot_id = EQEmu::legacy::GENERAL_BEGIN + (slot_id - EQEmu::legacy::GENERAL_BAGS_BEGIN) / EQEmu::inventory::ContainerCount;
|
||||
}
|
||||
else if (slot_id >= EQEmu::legacy::CURSOR_BAG_BEGIN && slot_id <= EQEmu::legacy::CURSOR_BAG_END) {
|
||||
parent_slot_id = EQEmu::legacy::SlotCursor;
|
||||
parent_slot_id = EQEmu::inventory::slotCursor;
|
||||
}
|
||||
else if (slot_id >= EQEmu::legacy::BANK_BAGS_BEGIN && slot_id <= EQEmu::legacy::BANK_BAGS_END) {
|
||||
parent_slot_id = EQEmu::legacy::BANK_BEGIN + (slot_id - EQEmu::legacy::BANK_BAGS_BEGIN) / EQEmu::legacy::ITEM_CONTAINER_SIZE;
|
||||
parent_slot_id = EQEmu::legacy::BANK_BEGIN + (slot_id - EQEmu::legacy::BANK_BAGS_BEGIN) / EQEmu::inventory::ContainerCount;
|
||||
}
|
||||
else if (slot_id >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && slot_id <= EQEmu::legacy::SHARED_BANK_BAGS_END) {
|
||||
parent_slot_id = EQEmu::legacy::SHARED_BANK_BEGIN + (slot_id - EQEmu::legacy::SHARED_BANK_BAGS_BEGIN) / EQEmu::legacy::ITEM_CONTAINER_SIZE;
|
||||
parent_slot_id = EQEmu::legacy::SHARED_BANK_BEGIN + (slot_id - EQEmu::legacy::SHARED_BANK_BAGS_BEGIN) / EQEmu::inventory::ContainerCount;
|
||||
}
|
||||
else if (slot_id >= EQEmu::legacy::TRADE_BAGS_BEGIN && slot_id <= EQEmu::legacy::TRADE_BAGS_END) {
|
||||
parent_slot_id = EQEmu::legacy::TRADE_BEGIN + (slot_id - EQEmu::legacy::TRADE_BAGS_BEGIN) / EQEmu::legacy::ITEM_CONTAINER_SIZE;
|
||||
parent_slot_id = EQEmu::legacy::TRADE_BEGIN + (slot_id - EQEmu::legacy::TRADE_BAGS_BEGIN) / EQEmu::inventory::ContainerCount;
|
||||
}
|
||||
|
||||
return parent_slot_id;
|
||||
@@ -800,20 +800,20 @@ int16 Inventory::CalcSlotId(int16 bagslot_id, uint8 bagidx) {
|
||||
|
||||
int16 slot_id = INVALID_INDEX;
|
||||
|
||||
if (bagslot_id == EQEmu::legacy::SlotCursor || bagslot_id == 8000) {
|
||||
if (bagslot_id == EQEmu::inventory::slotCursor || bagslot_id == 8000) {
|
||||
slot_id = EQEmu::legacy::CURSOR_BAG_BEGIN + bagidx;
|
||||
}
|
||||
else if (bagslot_id >= EQEmu::legacy::GENERAL_BEGIN && bagslot_id <= EQEmu::legacy::GENERAL_END) {
|
||||
slot_id = EQEmu::legacy::GENERAL_BAGS_BEGIN + (bagslot_id - EQEmu::legacy::GENERAL_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE + bagidx;
|
||||
slot_id = EQEmu::legacy::GENERAL_BAGS_BEGIN + (bagslot_id - EQEmu::legacy::GENERAL_BEGIN) * EQEmu::inventory::ContainerCount + bagidx;
|
||||
}
|
||||
else if (bagslot_id >= EQEmu::legacy::BANK_BEGIN && bagslot_id <= EQEmu::legacy::BANK_END) {
|
||||
slot_id = EQEmu::legacy::BANK_BAGS_BEGIN + (bagslot_id - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE + bagidx;
|
||||
slot_id = EQEmu::legacy::BANK_BAGS_BEGIN + (bagslot_id - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount + bagidx;
|
||||
}
|
||||
else if (bagslot_id >= EQEmu::legacy::SHARED_BANK_BEGIN && bagslot_id <= EQEmu::legacy::SHARED_BANK_END) {
|
||||
slot_id = EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + (bagslot_id - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE + bagidx;
|
||||
slot_id = EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + (bagslot_id - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount + bagidx;
|
||||
}
|
||||
else if (bagslot_id >= EQEmu::legacy::TRADE_BEGIN && bagslot_id <= EQEmu::legacy::TRADE_END) {
|
||||
slot_id = EQEmu::legacy::TRADE_BAGS_BEGIN + (bagslot_id - EQEmu::legacy::TRADE_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE + bagidx;
|
||||
slot_id = EQEmu::legacy::TRADE_BAGS_BEGIN + (bagslot_id - EQEmu::legacy::TRADE_BEGIN) * EQEmu::inventory::ContainerCount + bagidx;
|
||||
}
|
||||
|
||||
return slot_id;
|
||||
@@ -827,19 +827,19 @@ uint8 Inventory::CalcBagIdx(int16 slot_id) {
|
||||
// index = (slot_id - EmuConstants::BANK_BEGIN) % EmuConstants::ITEM_CONTAINER_SIZE;
|
||||
|
||||
if (slot_id >= EQEmu::legacy::GENERAL_BAGS_BEGIN && slot_id <= EQEmu::legacy::GENERAL_BAGS_END) {
|
||||
index = (slot_id - EQEmu::legacy::GENERAL_BAGS_BEGIN) % EQEmu::legacy::ITEM_CONTAINER_SIZE;
|
||||
index = (slot_id - EQEmu::legacy::GENERAL_BAGS_BEGIN) % EQEmu::inventory::ContainerCount;
|
||||
}
|
||||
else if (slot_id >= EQEmu::legacy::CURSOR_BAG_BEGIN && slot_id <= EQEmu::legacy::CURSOR_BAG_END) {
|
||||
index = (slot_id - EQEmu::legacy::CURSOR_BAG_BEGIN); // % EQEmu::legacy::ITEM_CONTAINER_SIZE; - not needed since range is 10 slots
|
||||
}
|
||||
else if (slot_id >= EQEmu::legacy::BANK_BAGS_BEGIN && slot_id <= EQEmu::legacy::BANK_BAGS_END) {
|
||||
index = (slot_id - EQEmu::legacy::BANK_BAGS_BEGIN) % EQEmu::legacy::ITEM_CONTAINER_SIZE;
|
||||
index = (slot_id - EQEmu::legacy::BANK_BAGS_BEGIN) % EQEmu::inventory::ContainerCount;
|
||||
}
|
||||
else if (slot_id >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && slot_id <= EQEmu::legacy::SHARED_BANK_BAGS_END) {
|
||||
index = (slot_id - EQEmu::legacy::SHARED_BANK_BAGS_BEGIN) % EQEmu::legacy::ITEM_CONTAINER_SIZE;
|
||||
index = (slot_id - EQEmu::legacy::SHARED_BANK_BAGS_BEGIN) % EQEmu::inventory::ContainerCount;
|
||||
}
|
||||
else if (slot_id >= EQEmu::legacy::TRADE_BAGS_BEGIN && slot_id <= EQEmu::legacy::TRADE_BAGS_END) {
|
||||
index = (slot_id - EQEmu::legacy::TRADE_BAGS_BEGIN) % EQEmu::legacy::ITEM_CONTAINER_SIZE;
|
||||
index = (slot_id - EQEmu::legacy::TRADE_BAGS_BEGIN) % EQEmu::inventory::ContainerCount;
|
||||
}
|
||||
else if (slot_id >= EQEmu::legacy::WORLD_BEGIN && slot_id <= EQEmu::legacy::WORLD_END) {
|
||||
index = (slot_id - EQEmu::legacy::WORLD_BEGIN); // % EQEmu::legacy::ITEM_CONTAINER_SIZE; - not needed since range is 10 slots
|
||||
@@ -852,24 +852,24 @@ int16 Inventory::CalcSlotFromMaterial(uint8 material)
|
||||
{
|
||||
switch (material)
|
||||
{
|
||||
case EQEmu::textures::TextureHead:
|
||||
return EQEmu::legacy::SlotHead;
|
||||
case EQEmu::textures::TextureChest:
|
||||
return EQEmu::legacy::SlotChest;
|
||||
case EQEmu::textures::TextureArms:
|
||||
return EQEmu::legacy::SlotArms;
|
||||
case EQEmu::textures::TextureWrist:
|
||||
return EQEmu::legacy::SlotWrist1; // there's 2 bracers, only one bracer material
|
||||
case EQEmu::textures::TextureHands:
|
||||
return EQEmu::legacy::SlotHands;
|
||||
case EQEmu::textures::TextureLegs:
|
||||
return EQEmu::legacy::SlotLegs;
|
||||
case EQEmu::textures::TextureFeet:
|
||||
return EQEmu::legacy::SlotFeet;
|
||||
case EQEmu::textures::TexturePrimary:
|
||||
return EQEmu::legacy::SlotPrimary;
|
||||
case EQEmu::textures::TextureSecondary:
|
||||
return EQEmu::legacy::SlotSecondary;
|
||||
case EQEmu::textures::armorHead:
|
||||
return EQEmu::inventory::slotHead;
|
||||
case EQEmu::textures::armorChest:
|
||||
return EQEmu::inventory::slotChest;
|
||||
case EQEmu::textures::armorArms:
|
||||
return EQEmu::inventory::slotArms;
|
||||
case EQEmu::textures::armorWrist:
|
||||
return EQEmu::inventory::slotWrist1; // there's 2 bracers, only one bracer material
|
||||
case EQEmu::textures::armorHands:
|
||||
return EQEmu::inventory::slotHands;
|
||||
case EQEmu::textures::armorLegs:
|
||||
return EQEmu::inventory::slotLegs;
|
||||
case EQEmu::textures::armorFeet:
|
||||
return EQEmu::inventory::slotFeet;
|
||||
case EQEmu::textures::weaponPrimary:
|
||||
return EQEmu::inventory::slotPrimary;
|
||||
case EQEmu::textures::weaponSecondary:
|
||||
return EQEmu::inventory::slotSecondary;
|
||||
default:
|
||||
return INVALID_INDEX;
|
||||
}
|
||||
@@ -879,27 +879,27 @@ uint8 Inventory::CalcMaterialFromSlot(int16 equipslot)
|
||||
{
|
||||
switch (equipslot)
|
||||
{
|
||||
case EQEmu::legacy::SlotHead:
|
||||
return EQEmu::textures::TextureHead;
|
||||
case EQEmu::legacy::SlotChest:
|
||||
return EQEmu::textures::TextureChest;
|
||||
case EQEmu::legacy::SlotArms:
|
||||
return EQEmu::textures::TextureArms;
|
||||
case EQEmu::legacy::SlotWrist1:
|
||||
case EQEmu::inventory::slotHead:
|
||||
return EQEmu::textures::armorHead;
|
||||
case EQEmu::inventory::slotChest:
|
||||
return EQEmu::textures::armorChest;
|
||||
case EQEmu::inventory::slotArms:
|
||||
return EQEmu::textures::armorArms;
|
||||
case EQEmu::inventory::slotWrist1:
|
||||
//case SLOT_BRACER02: // non-live behavior
|
||||
return EQEmu::textures::TextureWrist;
|
||||
case EQEmu::legacy::SlotHands:
|
||||
return EQEmu::textures::TextureHands;
|
||||
case EQEmu::legacy::SlotLegs:
|
||||
return EQEmu::textures::TextureLegs;
|
||||
case EQEmu::legacy::SlotFeet:
|
||||
return EQEmu::textures::TextureFeet;
|
||||
case EQEmu::legacy::SlotPrimary:
|
||||
return EQEmu::textures::TexturePrimary;
|
||||
case EQEmu::legacy::SlotSecondary:
|
||||
return EQEmu::textures::TextureSecondary;
|
||||
return EQEmu::textures::armorWrist;
|
||||
case EQEmu::inventory::slotHands:
|
||||
return EQEmu::textures::armorHands;
|
||||
case EQEmu::inventory::slotLegs:
|
||||
return EQEmu::textures::armorLegs;
|
||||
case EQEmu::inventory::slotFeet:
|
||||
return EQEmu::textures::armorFeet;
|
||||
case EQEmu::inventory::slotPrimary:
|
||||
return EQEmu::textures::weaponPrimary;
|
||||
case EQEmu::inventory::slotSecondary:
|
||||
return EQEmu::textures::weaponSecondary;
|
||||
default:
|
||||
return EQEmu::textures::TextureInvalid;
|
||||
return EQEmu::textures::materialInvalid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -923,7 +923,7 @@ bool Inventory::CanItemFitInContainer(const EQEmu::ItemData *ItemToTry, const EQ
|
||||
bool Inventory::SupportsClickCasting(int16 slot_id)
|
||||
{
|
||||
// there are a few non-potion items that identify as ItemTypePotion..so, we still need to ubiquitously include the equipment range
|
||||
if ((uint16)slot_id <= EQEmu::legacy::GENERAL_END || slot_id == EQEmu::legacy::SlotPowerSource)
|
||||
if ((uint16)slot_id <= EQEmu::legacy::GENERAL_END || slot_id == EQEmu::inventory::slotPowerSource)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -938,7 +938,7 @@ bool Inventory::SupportsClickCasting(int16 slot_id)
|
||||
|
||||
bool Inventory::SupportsPotionBeltCasting(int16 slot_id)
|
||||
{
|
||||
if ((uint16)slot_id <= EQEmu::legacy::GENERAL_END || slot_id == EQEmu::legacy::SlotPowerSource || (slot_id >= EQEmu::legacy::GENERAL_BAGS_BEGIN && slot_id <= EQEmu::legacy::GENERAL_BAGS_END))
|
||||
if ((uint16)slot_id <= EQEmu::legacy::GENERAL_END || slot_id == EQEmu::inventory::slotPowerSource || (slot_id >= EQEmu::legacy::GENERAL_BAGS_BEGIN && slot_id <= EQEmu::legacy::GENERAL_BAGS_END))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -947,7 +947,7 @@ bool Inventory::SupportsPotionBeltCasting(int16 slot_id)
|
||||
// Test whether a given slot can support a container item
|
||||
bool Inventory::SupportsContainers(int16 slot_id)
|
||||
{
|
||||
if ((slot_id == EQEmu::legacy::SlotCursor) ||
|
||||
if ((slot_id == EQEmu::inventory::slotCursor) ||
|
||||
(slot_id >= EQEmu::legacy::GENERAL_BEGIN && slot_id <= EQEmu::legacy::GENERAL_END) ||
|
||||
(slot_id >= EQEmu::legacy::BANK_BEGIN && slot_id <= EQEmu::legacy::BANK_END) ||
|
||||
(slot_id >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id <= EQEmu::legacy::SHARED_BANK_END) ||
|
||||
@@ -989,7 +989,7 @@ int Inventory::GetSlotByItemInst(EQEmu::ItemInstance *inst) {
|
||||
}
|
||||
|
||||
if (m_cursor.peek_front() == inst) {
|
||||
return EQEmu::legacy::SlotCursor;
|
||||
return EQEmu::inventory::slotCursor;
|
||||
}
|
||||
|
||||
return INVALID_INDEX;
|
||||
@@ -1000,8 +1000,8 @@ uint8 Inventory::FindBrightestLightType()
|
||||
uint8 brightest_light_type = 0;
|
||||
|
||||
for (auto iter = m_worn.begin(); iter != m_worn.end(); ++iter) {
|
||||
if ((iter->first < EQEmu::legacy::EQUIPMENT_BEGIN || iter->first > EQEmu::legacy::EQUIPMENT_END) && iter->first != EQEmu::legacy::SlotPowerSource) { continue; }
|
||||
if (iter->first == EQEmu::legacy::SlotAmmo) { continue; }
|
||||
if ((iter->first < EQEmu::legacy::EQUIPMENT_BEGIN || iter->first > EQEmu::legacy::EQUIPMENT_END) && iter->first != EQEmu::inventory::slotPowerSource) { continue; }
|
||||
if (iter->first == EQEmu::inventory::slotAmmo) { continue; }
|
||||
|
||||
auto inst = iter->second;
|
||||
if (inst == nullptr) { continue; }
|
||||
@@ -1145,13 +1145,13 @@ int16 Inventory::_PutItem(int16 slot_id, EQEmu::ItemInstance* inst)
|
||||
int16 result = INVALID_INDEX;
|
||||
int16 parentSlot = INVALID_INDEX;
|
||||
|
||||
if (slot_id == EQEmu::legacy::SlotCursor) {
|
||||
if (slot_id == EQEmu::inventory::slotCursor) {
|
||||
// Replace current item on cursor, if exists
|
||||
m_cursor.pop(); // no memory delete, clients of this function know what they are doing
|
||||
m_cursor.push_front(inst);
|
||||
result = slot_id;
|
||||
}
|
||||
else if ((slot_id >= EQEmu::legacy::EQUIPMENT_BEGIN && slot_id <= EQEmu::legacy::EQUIPMENT_END) || (slot_id == EQEmu::legacy::SlotPowerSource)) {
|
||||
else if ((slot_id >= EQEmu::legacy::EQUIPMENT_BEGIN && slot_id <= EQEmu::legacy::EQUIPMENT_END) || (slot_id == EQEmu::inventory::slotPowerSource)) {
|
||||
m_worn[slot_id] = inst;
|
||||
result = slot_id;
|
||||
}
|
||||
@@ -1209,7 +1209,7 @@ int16 Inventory::_HasItem(std::map<int16, EQEmu::ItemInstance*>& bucket, uint32
|
||||
return iter->first;
|
||||
}
|
||||
|
||||
for (int index = AUG_INDEX_BEGIN; index < EQEmu::legacy::ITEM_COMMON_SIZE; ++index) {
|
||||
for (int index = EQEmu::inventory::socketBegin; index < EQEmu::inventory::SocketCount; ++index) {
|
||||
if (inst->GetAugmentItemID(index) == item_id && quantity <= 1)
|
||||
return EQEmu::legacy::SLOT_AUGMENT;
|
||||
}
|
||||
@@ -1226,7 +1226,7 @@ int16 Inventory::_HasItem(std::map<int16, EQEmu::ItemInstance*>& bucket, uint32
|
||||
return Inventory::CalcSlotId(iter->first, bag_iter->first);
|
||||
}
|
||||
|
||||
for (int index = AUG_INDEX_BEGIN; index < EQEmu::legacy::ITEM_COMMON_SIZE; ++index) {
|
||||
for (int index = EQEmu::inventory::socketBegin; index < EQEmu::inventory::SocketCount; ++index) {
|
||||
if (bag_inst->GetAugmentItemID(index) == item_id && quantity <= 1)
|
||||
return EQEmu::legacy::SLOT_AUGMENT;
|
||||
}
|
||||
@@ -1254,10 +1254,10 @@ int16 Inventory::_HasItem(ItemInstQueue& iqueue, uint32 item_id, uint8 quantity)
|
||||
if (inst->GetID() == item_id) {
|
||||
quantity_found += (inst->GetCharges() <= 0) ? 1 : inst->GetCharges();
|
||||
if (quantity_found >= quantity)
|
||||
return EQEmu::legacy::SlotCursor;
|
||||
return EQEmu::inventory::slotCursor;
|
||||
}
|
||||
|
||||
for (int index = AUG_INDEX_BEGIN; index < EQEmu::legacy::ITEM_COMMON_SIZE; ++index) {
|
||||
for (int index = EQEmu::inventory::socketBegin; index < EQEmu::inventory::SocketCount; ++index) {
|
||||
if (inst->GetAugmentItemID(index) == item_id && quantity <= 1)
|
||||
return EQEmu::legacy::SLOT_AUGMENT;
|
||||
}
|
||||
@@ -1271,10 +1271,10 @@ int16 Inventory::_HasItem(ItemInstQueue& iqueue, uint32 item_id, uint8 quantity)
|
||||
if (bag_inst->GetID() == item_id) {
|
||||
quantity_found += (bag_inst->GetCharges() <= 0) ? 1 : bag_inst->GetCharges();
|
||||
if (quantity_found >= quantity)
|
||||
return Inventory::CalcSlotId(EQEmu::legacy::SlotCursor, bag_iter->first);
|
||||
return Inventory::CalcSlotId(EQEmu::inventory::slotCursor, bag_iter->first);
|
||||
}
|
||||
|
||||
for (int index = AUG_INDEX_BEGIN; index < EQEmu::legacy::ITEM_COMMON_SIZE; ++index) {
|
||||
for (int index = EQEmu::inventory::socketBegin; index < EQEmu::inventory::SocketCount; ++index) {
|
||||
if (bag_inst->GetAugmentItemID(index) == item_id && quantity <= 1)
|
||||
return EQEmu::legacy::SLOT_AUGMENT;
|
||||
}
|
||||
@@ -1331,7 +1331,7 @@ int16 Inventory::_HasItemByUse(ItemInstQueue& iqueue, uint8 use, uint8 quantity)
|
||||
if (inst->IsClassCommon() && inst->GetItem()->ItemType == use) {
|
||||
quantity_found += (inst->GetCharges() <= 0) ? 1 : inst->GetCharges();
|
||||
if (quantity_found >= quantity)
|
||||
return EQEmu::legacy::SlotCursor;
|
||||
return EQEmu::inventory::slotCursor;
|
||||
}
|
||||
|
||||
if (!inst->IsClassBag()) { continue; }
|
||||
@@ -1343,7 +1343,7 @@ int16 Inventory::_HasItemByUse(ItemInstQueue& iqueue, uint8 use, uint8 quantity)
|
||||
if (bag_inst->IsClassCommon() && bag_inst->GetItem()->ItemType == use) {
|
||||
quantity_found += (bag_inst->GetCharges() <= 0) ? 1 : bag_inst->GetCharges();
|
||||
if (quantity_found >= quantity)
|
||||
return Inventory::CalcSlotId(EQEmu::legacy::SlotCursor, bag_iter->first);
|
||||
return Inventory::CalcSlotId(EQEmu::inventory::slotCursor, bag_iter->first);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1363,7 +1363,7 @@ int16 Inventory::_HasItemByLoreGroup(std::map<int16, EQEmu::ItemInstance*>& buck
|
||||
if (inst->GetItem()->LoreGroup == loregroup)
|
||||
return iter->first;
|
||||
|
||||
for (int index = AUG_INDEX_BEGIN; index < EQEmu::legacy::ITEM_COMMON_SIZE; ++index) {
|
||||
for (int index = EQEmu::inventory::socketBegin; index < EQEmu::inventory::SocketCount; ++index) {
|
||||
auto aug_inst = inst->GetAugment(index);
|
||||
if (aug_inst == nullptr) { continue; }
|
||||
|
||||
@@ -1380,7 +1380,7 @@ int16 Inventory::_HasItemByLoreGroup(std::map<int16, EQEmu::ItemInstance*>& buck
|
||||
if (bag_inst->IsClassCommon() && bag_inst->GetItem()->LoreGroup == loregroup)
|
||||
return Inventory::CalcSlotId(iter->first, bag_iter->first);
|
||||
|
||||
for (int index = AUG_INDEX_BEGIN; index < EQEmu::legacy::ITEM_COMMON_SIZE; ++index) {
|
||||
for (int index = EQEmu::inventory::socketBegin; index < EQEmu::inventory::SocketCount; ++index) {
|
||||
auto aug_inst = bag_inst->GetAugment(index);
|
||||
if (aug_inst == nullptr) { continue; }
|
||||
|
||||
@@ -1401,9 +1401,9 @@ int16 Inventory::_HasItemByLoreGroup(ItemInstQueue& iqueue, uint32 loregroup)
|
||||
if (inst == nullptr) { continue; }
|
||||
|
||||
if (inst->GetItem()->LoreGroup == loregroup)
|
||||
return EQEmu::legacy::SlotCursor;
|
||||
return EQEmu::inventory::slotCursor;
|
||||
|
||||
for (int index = AUG_INDEX_BEGIN; index < EQEmu::legacy::ITEM_COMMON_SIZE; ++index) {
|
||||
for (int index = EQEmu::inventory::socketBegin; index < EQEmu::inventory::SocketCount; ++index) {
|
||||
auto aug_inst = inst->GetAugment(index);
|
||||
if (aug_inst == nullptr) { continue; }
|
||||
|
||||
@@ -1418,9 +1418,9 @@ int16 Inventory::_HasItemByLoreGroup(ItemInstQueue& iqueue, uint32 loregroup)
|
||||
if (bag_inst == nullptr) { continue; }
|
||||
|
||||
if (bag_inst->IsClassCommon() && bag_inst->GetItem()->LoreGroup == loregroup)
|
||||
return Inventory::CalcSlotId(EQEmu::legacy::SlotCursor, bag_iter->first);
|
||||
return Inventory::CalcSlotId(EQEmu::inventory::slotCursor, bag_iter->first);
|
||||
|
||||
for (int index = AUG_INDEX_BEGIN; index < EQEmu::legacy::ITEM_COMMON_SIZE; ++index) {
|
||||
for (int index = EQEmu::inventory::socketBegin; index < EQEmu::inventory::SocketCount; ++index) {
|
||||
auto aug_inst = bag_inst->GetAugment(index);
|
||||
if (aug_inst == nullptr) { continue; }
|
||||
|
||||
@@ -1657,7 +1657,7 @@ bool EQEmu::ItemInstance::IsEquipable(int16 slot_id) const
|
||||
|
||||
// another "shouldn't do" fix..will be fixed in future updates (requires code and database work)
|
||||
int16 use_slot = INVALID_INDEX;
|
||||
if (slot_id == EQEmu::legacy::SlotPowerSource) { use_slot = EQEmu::legacy::SlotGeneral1; }
|
||||
if (slot_id == EQEmu::inventory::slotPowerSource) { use_slot = EQEmu::inventory::slotGeneral1; }
|
||||
if ((uint16)slot_id <= EQEmu::legacy::EQUIPMENT_END) { use_slot = slot_id; }
|
||||
|
||||
if (use_slot != INVALID_INDEX) {
|
||||
@@ -1673,8 +1673,8 @@ bool EQEmu::ItemInstance::IsAugmentable() const
|
||||
if (!m_item)
|
||||
return false;
|
||||
|
||||
for (int index = 0; index < EQEmu::legacy::ITEM_COMMON_SIZE; ++index) {
|
||||
if (m_item->AugSlotType[index] != NO_ITEM)
|
||||
for (int index = EQEmu::inventory::socketBegin; index < EQEmu::inventory::SocketCount; ++index) {
|
||||
if (m_item->AugSlotType[index] != 0)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1688,7 +1688,7 @@ bool EQEmu::ItemInstance::AvailableWearSlot(uint32 aug_wear_slots) const {
|
||||
return false;
|
||||
|
||||
int index = EQEmu::legacy::EQUIPMENT_BEGIN;
|
||||
for (; index <= EQEmu::legacy::SlotGeneral1; ++index) { // MainGeneral1 should be EQEmu::legacy::EQUIPMENT_END
|
||||
for (; index <= EQEmu::inventory::slotGeneral1; ++index) { // MainGeneral1 should be EQEmu::legacy::EQUIPMENT_END
|
||||
if (m_item->Slots & (1 << index)) {
|
||||
if (aug_wear_slots & (1 << index))
|
||||
break;
|
||||
@@ -1703,14 +1703,14 @@ int8 EQEmu::ItemInstance::AvailableAugmentSlot(int32 augtype) const
|
||||
if (!m_item || !m_item->IsClassCommon())
|
||||
return INVALID_INDEX;
|
||||
|
||||
int index = AUG_INDEX_BEGIN;
|
||||
for (; index < EQEmu::legacy::ITEM_COMMON_SIZE; ++index) {
|
||||
int index = EQEmu::inventory::socketBegin;
|
||||
for (; index < EQEmu::inventory::SocketCount; ++index) {
|
||||
if (GetItem(index)) { continue; }
|
||||
if (augtype == -1 || (m_item->AugSlotType[index] && ((1 << (m_item->AugSlotType[index] - 1)) & augtype)))
|
||||
break;
|
||||
}
|
||||
|
||||
return (index < EQEmu::legacy::ITEM_COMMON_SIZE) ? index : INVALID_INDEX;
|
||||
return (index < EQEmu::inventory::SocketCount) ? index : INVALID_INDEX;
|
||||
}
|
||||
|
||||
bool EQEmu::ItemInstance::IsAugmentSlotAvailable(int32 augtype, uint8 slot) const
|
||||
@@ -1741,7 +1741,7 @@ uint32 EQEmu::ItemInstance::GetItemID(uint8 slot) const
|
||||
if (item)
|
||||
return item->GetID();
|
||||
|
||||
return NO_ITEM;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void EQEmu::ItemInstance::PutItem(uint8 index, const ItemInstance& inst)
|
||||
@@ -1853,7 +1853,7 @@ uint8 EQEmu::ItemInstance::FirstOpenSlot() const
|
||||
return INVALID_INDEX;
|
||||
|
||||
uint8 slots = m_item->BagSlots, i;
|
||||
for (i = SUB_INDEX_BEGIN; i < slots; i++) {
|
||||
for (i = EQEmu::inventory::containerBegin; i < slots; i++) {
|
||||
if (!GetItem(i))
|
||||
break;
|
||||
}
|
||||
@@ -1870,7 +1870,7 @@ uint8 EQEmu::ItemInstance::GetTotalItemCount() const
|
||||
|
||||
if (m_item && !m_item->IsClassBag()) { return item_count; }
|
||||
|
||||
for (int index = SUB_INDEX_BEGIN; index < m_item->BagSlots; ++index) { if (GetItem(index)) { ++item_count; } }
|
||||
for (int index = EQEmu::inventory::containerBegin; index < m_item->BagSlots; ++index) { if (GetItem(index)) { ++item_count; } }
|
||||
|
||||
return item_count;
|
||||
}
|
||||
@@ -1880,7 +1880,7 @@ bool EQEmu::ItemInstance::IsNoneEmptyContainer()
|
||||
if (!m_item || !m_item->IsClassBag())
|
||||
return false;
|
||||
|
||||
for (int index = SUB_INDEX_BEGIN; index < m_item->BagSlots; ++index) {
|
||||
for (int index = EQEmu::inventory::containerBegin; index < m_item->BagSlots; ++index) {
|
||||
if (GetItem(index))
|
||||
return true;
|
||||
}
|
||||
@@ -1902,7 +1902,7 @@ EQEmu::ItemInstance* EQEmu::ItemInstance::GetOrnamentationAug(int32 ornamentatio
|
||||
if (!m_item || !m_item->IsClassCommon()) { return nullptr; }
|
||||
if (ornamentationAugtype == 0) { return nullptr; }
|
||||
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++)
|
||||
{
|
||||
if (GetAugment(i) && m_item->AugSlotType[i] == ornamentationAugtype)
|
||||
{
|
||||
@@ -2020,7 +2020,7 @@ bool EQEmu::ItemInstance::CanTransform(const EQEmu::ItemData *ItemToTry, const E
|
||||
uint32 EQEmu::ItemInstance::GetAugmentItemID(uint8 slot) const
|
||||
{
|
||||
if (!m_item || !m_item->IsClassCommon())
|
||||
return NO_ITEM;
|
||||
return 0;
|
||||
|
||||
return GetItemID(slot);
|
||||
}
|
||||
@@ -2036,7 +2036,7 @@ void EQEmu::ItemInstance::PutAugment(uint8 slot, const ItemInstance& augment)
|
||||
|
||||
void EQEmu::ItemInstance::PutAugment(SharedDatabase *db, uint8 slot, uint32 item_id)
|
||||
{
|
||||
if (item_id == NO_ITEM) { return; }
|
||||
if (item_id == 0) { return; }
|
||||
if (db == nullptr) { return; /* TODO: add log message for nullptr */ }
|
||||
|
||||
const ItemInstance* aug = db->CreateItem(item_id);
|
||||
@@ -2069,7 +2069,7 @@ bool EQEmu::ItemInstance::IsAugmented()
|
||||
if (!m_item || !m_item->IsClassCommon())
|
||||
return false;
|
||||
|
||||
for (int index = AUG_INDEX_BEGIN; index < EQEmu::legacy::ITEM_COMMON_SIZE; ++index) {
|
||||
for (int index = EQEmu::inventory::socketBegin; index < EQEmu::inventory::SocketCount; ++index) {
|
||||
if (GetAugmentItemID(index))
|
||||
return true;
|
||||
}
|
||||
@@ -2197,8 +2197,8 @@ bool EQEmu::ItemInstance::IsSlotAllowed(int16 slot_id) const {
|
||||
if (!m_item) { return false; }
|
||||
else if (Inventory::SupportsContainers(slot_id)) { return true; }
|
||||
else if (m_item->Slots & (1 << slot_id)) { return true; }
|
||||
else if (slot_id == EQEmu::legacy::SlotPowerSource && (m_item->Slots & (1 << 22))) { return true; } // got lazy... <watch>
|
||||
else if (slot_id != EQEmu::legacy::SlotPowerSource && slot_id > EQEmu::legacy::EQUIPMENT_END) { return true; }
|
||||
else if (slot_id == EQEmu::inventory::slotPowerSource && (m_item->Slots & (1 << 22))) { return true; } // got lazy... <watch>
|
||||
else if (slot_id != EQEmu::inventory::slotPowerSource && slot_id > EQEmu::legacy::EQUIPMENT_END) { return true; }
|
||||
else { return false; }
|
||||
}
|
||||
|
||||
@@ -2350,7 +2350,7 @@ int EQEmu::ItemInstance::GetItemArmorClass(bool augments) const
|
||||
if (item) {
|
||||
ac = item->AC;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
ac += GetAugment(i)->GetItemArmorClass();
|
||||
}
|
||||
@@ -2392,7 +2392,7 @@ int EQEmu::ItemInstance::GetItemElementalDamage(int &magic, int &fire, int &cold
|
||||
}
|
||||
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
GetAugment(i)->GetItemElementalDamage(magic, fire, cold, poison, disease, chromatic, prismatic, physical, corruption);
|
||||
}
|
||||
@@ -2409,7 +2409,7 @@ int EQEmu::ItemInstance::GetItemElementalFlag(bool augments) const
|
||||
return flag;
|
||||
|
||||
if (augments) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i) {
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i) {
|
||||
if (GetAugment(i))
|
||||
flag = GetAugment(i)->GetItemElementalFlag();
|
||||
if (flag)
|
||||
@@ -2430,7 +2430,7 @@ int EQEmu::ItemInstance::GetItemElementalDamage(bool augments) const
|
||||
return damage;
|
||||
|
||||
if (augments) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i) {
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i) {
|
||||
if (GetAugment(i))
|
||||
damage = GetAugment(i)->GetItemElementalDamage();
|
||||
if (damage)
|
||||
@@ -2449,7 +2449,7 @@ int EQEmu::ItemInstance::GetItemRecommendedLevel(bool augments) const
|
||||
level = item->RecLevel;
|
||||
|
||||
if (augments) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i) {
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i) {
|
||||
int temp = 0;
|
||||
if (GetAugment(i)) {
|
||||
temp = GetAugment(i)->GetItemRecommendedLevel();
|
||||
@@ -2471,7 +2471,7 @@ int EQEmu::ItemInstance::GetItemRequiredLevel(bool augments) const
|
||||
level = item->ReqLevel;
|
||||
|
||||
if (augments) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i) {
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i) {
|
||||
int temp = 0;
|
||||
if (GetAugment(i)) {
|
||||
temp = GetAugment(i)->GetItemRequiredLevel();
|
||||
@@ -2493,7 +2493,7 @@ int EQEmu::ItemInstance::GetItemWeaponDamage(bool augments) const
|
||||
damage = item->Damage;
|
||||
|
||||
if (augments) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
damage += GetAugment(i)->GetItemWeaponDamage();
|
||||
}
|
||||
@@ -2509,7 +2509,7 @@ int EQEmu::ItemInstance::GetItemBackstabDamage(bool augments) const
|
||||
damage = item->BackstabDmg;
|
||||
|
||||
if (augments) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
damage += GetAugment(i)->GetItemBackstabDamage();
|
||||
}
|
||||
@@ -2527,7 +2527,7 @@ int EQEmu::ItemInstance::GetItemBaneDamageBody(bool augments) const
|
||||
return body;
|
||||
|
||||
if (augments) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i)) {
|
||||
body = GetAugment(i)->GetItemBaneDamageBody();
|
||||
if (body)
|
||||
@@ -2548,7 +2548,7 @@ int EQEmu::ItemInstance::GetItemBaneDamageRace(bool augments) const
|
||||
return race;
|
||||
|
||||
if (augments) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i)) {
|
||||
race = GetAugment(i)->GetItemBaneDamageRace();
|
||||
if (race)
|
||||
@@ -2568,7 +2568,7 @@ int EQEmu::ItemInstance::GetItemBaneDamageBody(bodyType against, bool augments)
|
||||
damage += item->BaneDmgAmt;
|
||||
|
||||
if (augments) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
damage += GetAugment(i)->GetItemBaneDamageBody(against);
|
||||
}
|
||||
@@ -2585,7 +2585,7 @@ int EQEmu::ItemInstance::GetItemBaneDamageRace(uint16 against, bool augments) co
|
||||
damage += item->BaneDmgRaceAmt;
|
||||
|
||||
if (augments) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
damage += GetAugment(i)->GetItemBaneDamageRace(against);
|
||||
}
|
||||
@@ -2601,7 +2601,7 @@ int EQEmu::ItemInstance::GetItemMagical(bool augments) const
|
||||
return 1;
|
||||
|
||||
if (augments) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i) && GetAugment(i)->GetItemMagical())
|
||||
return 1;
|
||||
}
|
||||
@@ -2616,7 +2616,7 @@ int EQEmu::ItemInstance::GetItemHP(bool augments) const
|
||||
if (item) {
|
||||
hp = item->HP;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
hp += GetAugment(i)->GetItemHP();
|
||||
}
|
||||
@@ -2630,7 +2630,7 @@ int EQEmu::ItemInstance::GetItemMana(bool augments) const
|
||||
if (item) {
|
||||
mana = item->Mana;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
mana += GetAugment(i)->GetItemMana();
|
||||
}
|
||||
@@ -2644,7 +2644,7 @@ int EQEmu::ItemInstance::GetItemEndur(bool augments) const
|
||||
if (item) {
|
||||
endur = item->Endur;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
endur += GetAugment(i)->GetItemEndur();
|
||||
}
|
||||
@@ -2658,7 +2658,7 @@ int EQEmu::ItemInstance::GetItemAttack(bool augments) const
|
||||
if (item) {
|
||||
atk = item->Attack;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
atk += GetAugment(i)->GetItemAttack();
|
||||
}
|
||||
@@ -2672,7 +2672,7 @@ int EQEmu::ItemInstance::GetItemStr(bool augments) const
|
||||
if (item) {
|
||||
str = item->AStr;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
str += GetAugment(i)->GetItemStr();
|
||||
}
|
||||
@@ -2686,7 +2686,7 @@ int EQEmu::ItemInstance::GetItemSta(bool augments) const
|
||||
if (item) {
|
||||
sta = item->ASta;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
sta += GetAugment(i)->GetItemSta();
|
||||
}
|
||||
@@ -2700,7 +2700,7 @@ int EQEmu::ItemInstance::GetItemDex(bool augments) const
|
||||
if (item) {
|
||||
total = item->ADex;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemDex();
|
||||
}
|
||||
@@ -2714,7 +2714,7 @@ int EQEmu::ItemInstance::GetItemAgi(bool augments) const
|
||||
if (item) {
|
||||
total = item->AAgi;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemAgi();
|
||||
}
|
||||
@@ -2728,7 +2728,7 @@ int EQEmu::ItemInstance::GetItemInt(bool augments) const
|
||||
if (item) {
|
||||
total = item->AInt;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemInt();
|
||||
}
|
||||
@@ -2742,7 +2742,7 @@ int EQEmu::ItemInstance::GetItemWis(bool augments) const
|
||||
if (item) {
|
||||
total = item->AWis;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemWis();
|
||||
}
|
||||
@@ -2756,7 +2756,7 @@ int EQEmu::ItemInstance::GetItemCha(bool augments) const
|
||||
if (item) {
|
||||
total = item->ACha;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemCha();
|
||||
}
|
||||
@@ -2770,7 +2770,7 @@ int EQEmu::ItemInstance::GetItemMR(bool augments) const
|
||||
if (item) {
|
||||
total = item->MR;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemMR();
|
||||
}
|
||||
@@ -2784,7 +2784,7 @@ int EQEmu::ItemInstance::GetItemFR(bool augments) const
|
||||
if (item) {
|
||||
total = item->FR;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemFR();
|
||||
}
|
||||
@@ -2798,7 +2798,7 @@ int EQEmu::ItemInstance::GetItemCR(bool augments) const
|
||||
if (item) {
|
||||
total = item->CR;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemCR();
|
||||
}
|
||||
@@ -2812,7 +2812,7 @@ int EQEmu::ItemInstance::GetItemPR(bool augments) const
|
||||
if (item) {
|
||||
total = item->PR;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemPR();
|
||||
}
|
||||
@@ -2826,7 +2826,7 @@ int EQEmu::ItemInstance::GetItemDR(bool augments) const
|
||||
if (item) {
|
||||
total = item->DR;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemDR();
|
||||
}
|
||||
@@ -2840,7 +2840,7 @@ int EQEmu::ItemInstance::GetItemCorrup(bool augments) const
|
||||
if (item) {
|
||||
total = item->SVCorruption;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemCorrup();
|
||||
}
|
||||
@@ -2854,7 +2854,7 @@ int EQEmu::ItemInstance::GetItemHeroicStr(bool augments) const
|
||||
if (item) {
|
||||
total = item->HeroicStr;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemHeroicStr();
|
||||
}
|
||||
@@ -2868,7 +2868,7 @@ int EQEmu::ItemInstance::GetItemHeroicSta(bool augments) const
|
||||
if (item) {
|
||||
total = item->HeroicSta;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemHeroicSta();
|
||||
}
|
||||
@@ -2882,7 +2882,7 @@ int EQEmu::ItemInstance::GetItemHeroicDex(bool augments) const
|
||||
if (item) {
|
||||
total = item->HeroicDex;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemHeroicDex();
|
||||
}
|
||||
@@ -2896,7 +2896,7 @@ int EQEmu::ItemInstance::GetItemHeroicAgi(bool augments) const
|
||||
if (item) {
|
||||
total = item->HeroicAgi;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemHeroicAgi();
|
||||
}
|
||||
@@ -2910,7 +2910,7 @@ int EQEmu::ItemInstance::GetItemHeroicInt(bool augments) const
|
||||
if (item) {
|
||||
total = item->HeroicInt;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemHeroicInt();
|
||||
}
|
||||
@@ -2924,7 +2924,7 @@ int EQEmu::ItemInstance::GetItemHeroicWis(bool augments) const
|
||||
if (item) {
|
||||
total = item->HeroicWis;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemHeroicWis();
|
||||
}
|
||||
@@ -2938,7 +2938,7 @@ int EQEmu::ItemInstance::GetItemHeroicCha(bool augments) const
|
||||
if (item) {
|
||||
total = item->HeroicCha;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemHeroicCha();
|
||||
}
|
||||
@@ -2952,7 +2952,7 @@ int EQEmu::ItemInstance::GetItemHeroicMR(bool augments) const
|
||||
if (item) {
|
||||
total = item->HeroicMR;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemHeroicMR();
|
||||
}
|
||||
@@ -2966,7 +2966,7 @@ int EQEmu::ItemInstance::GetItemHeroicFR(bool augments) const
|
||||
if (item) {
|
||||
total = item->HeroicFR;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemHeroicFR();
|
||||
}
|
||||
@@ -2980,7 +2980,7 @@ int EQEmu::ItemInstance::GetItemHeroicCR(bool augments) const
|
||||
if (item) {
|
||||
total = item->HeroicCR;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemHeroicCR();
|
||||
}
|
||||
@@ -2994,7 +2994,7 @@ int EQEmu::ItemInstance::GetItemHeroicPR(bool augments) const
|
||||
if (item) {
|
||||
total = item->HeroicPR;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemHeroicPR();
|
||||
}
|
||||
@@ -3008,7 +3008,7 @@ int EQEmu::ItemInstance::GetItemHeroicDR(bool augments) const
|
||||
if (item) {
|
||||
total = item->HeroicDR;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemHeroicDR();
|
||||
}
|
||||
@@ -3022,7 +3022,7 @@ int EQEmu::ItemInstance::GetItemHeroicCorrup(bool augments) const
|
||||
if (item) {
|
||||
total = item->HeroicSVCorrup;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i))
|
||||
total += GetAugment(i)->GetItemHeroicCorrup();
|
||||
}
|
||||
@@ -3036,7 +3036,7 @@ int EQEmu::ItemInstance::GetItemHaste(bool augments) const
|
||||
if (item) {
|
||||
total = item->Haste;
|
||||
if (augments)
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; ++i)
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; ++i)
|
||||
if (GetAugment(i)) {
|
||||
int temp = GetAugment(i)->GetItemHaste();
|
||||
if (temp > total)
|
||||
|
||||
@@ -313,7 +313,7 @@ namespace EQEmu
|
||||
bool AvailableWearSlot(uint32 aug_wear_slots) const;
|
||||
int8 AvailableAugmentSlot(int32 augtype) const;
|
||||
bool IsAugmentSlotAvailable(int32 augtype, uint8 slot) const;
|
||||
inline int32 GetAugmentType() const { return ((m_item) ? m_item->AugType : NO_ITEM); }
|
||||
inline int32 GetAugmentType() const { return ((m_item) ? m_item->AugType : 0); }
|
||||
|
||||
inline bool IsExpendable() const { return ((m_item) ? ((m_item->Click.Type == EQEmu::item::ItemEffectExpendable) || (m_item->ItemType == EQEmu::item::ItemTypePotion)) : false); }
|
||||
|
||||
@@ -353,8 +353,8 @@ namespace EQEmu
|
||||
bool IsAmmo() const;
|
||||
|
||||
// Accessors
|
||||
const uint32 GetID() const { return ((m_item) ? m_item->ID : NO_ITEM); }
|
||||
const uint32 GetItemScriptID() const { return ((m_item) ? m_item->ScriptFileID : NO_ITEM); }
|
||||
const uint32 GetID() const { return ((m_item) ? m_item->ID : 0); }
|
||||
const uint32 GetItemScriptID() const { return ((m_item) ? m_item->ScriptFileID : 0); }
|
||||
const ItemData* GetItem() const;
|
||||
const ItemData* GetUnscaledItem() const;
|
||||
|
||||
|
||||
+52
-53
@@ -2079,7 +2079,7 @@ namespace RoF
|
||||
|
||||
outapp->WriteUInt32(22); // Equipment count
|
||||
|
||||
for (int r = EQEmu::textures::TextureBegin; r < EQEmu::textures::TextureCount; r++)
|
||||
for (int r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->item_material.Slot[r].Material);
|
||||
outapp->WriteUInt32(0);
|
||||
@@ -2099,9 +2099,9 @@ namespace RoF
|
||||
outapp->WriteUInt32(0);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::TextureCount); // Equipment2 count
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Equipment2 count
|
||||
|
||||
for (int r = EQEmu::textures::TextureBegin; r < EQEmu::textures::TextureCount; r++)
|
||||
for (int r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++)
|
||||
{
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteUInt32(0);
|
||||
@@ -2110,7 +2110,7 @@ namespace RoF
|
||||
outapp->WriteUInt32(0);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::TextureCount); // Tint Count
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Tint Count
|
||||
|
||||
for (int r = 0; r < 7; r++)
|
||||
{
|
||||
@@ -2120,7 +2120,7 @@ namespace RoF
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteUInt32(0);
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::TextureCount); // Tint2 Count
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Tint2 Count
|
||||
|
||||
for (int r = 0; r < 7; r++)
|
||||
{
|
||||
@@ -3059,12 +3059,12 @@ namespace RoF
|
||||
eq_cse->Gender = emu_cse->Gender;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::TextureCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::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;
|
||||
eq_cse->Equip[equip_index].HeroForgeModel = emu_cse->Equip[equip_index].HeroForgeModel;
|
||||
eq_cse->Equip[equip_index].Material2 = emu_cse->Equip[equip_index].Material2;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||
eq_cse->Equip[equip_index].HeroForgeModel = emu_cse->Equip[equip_index].HeroicModel;
|
||||
eq_cse->Equip[equip_index].Material2 = emu_cse->Equip[equip_index].Unknown2;
|
||||
eq_cse->Equip[equip_index].Color = emu_cse->Equip[equip_index].Color;
|
||||
}
|
||||
|
||||
@@ -4096,7 +4096,7 @@ namespace RoF
|
||||
|
||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||
{
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; ++k)
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; ++k)
|
||||
{
|
||||
{
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
|
||||
@@ -4105,15 +4105,15 @@ namespace RoF
|
||||
|
||||
structs::Texture_Struct *Equipment = (structs::Texture_Struct *)Buffer;
|
||||
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; k++) {
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
Equipment[k].Material = emu->equipment.Slot[k].Material;
|
||||
Equipment[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteMaterial;
|
||||
Equipment[k].HeroForgeModel = emu->equipment.Slot[k].HeroForgeModel;
|
||||
Equipment[k].Material2 = emu->equipment.Slot[k].Material2;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||
Equipment[k].HeroForgeModel = emu->equipment.Slot[k].HeroicModel;
|
||||
Equipment[k].Material2 = emu->equipment.Slot[k].Unknown2;
|
||||
}
|
||||
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::TextureCount);
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4829,10 +4829,9 @@ namespace RoF
|
||||
|
||||
IN(item_id);
|
||||
int r;
|
||||
for (r = 0; r < EQEmu::legacy::ITEM_COMMON_SIZE; r++) {
|
||||
for (r = EQEmu::inventory::socketBegin; r < EQEmu::inventory::SocketCount; r++) {
|
||||
IN(augments[r]);
|
||||
}
|
||||
// Max Augs is now 6, but no code to support that many yet
|
||||
IN(link_hash);
|
||||
IN(icon);
|
||||
|
||||
@@ -5622,18 +5621,18 @@ namespace RoF
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
for (uint32 index = SUB_INDEX_BEGIN; index < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++index) {
|
||||
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
int SubSlotNumber = INVALID_INDEX;
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + index + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
else
|
||||
SubSlotNumber = slot_id_in;
|
||||
|
||||
@@ -5659,17 +5658,17 @@ namespace RoF
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // Main Inventory and Cursor
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // Main Inventory and Cursor
|
||||
RoFSlot.Type = invtype::InvTypePossessions;
|
||||
RoFSlot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
RoFSlot.Slot = invslot::PossessionsPowerSource;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::inventory::slotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoFSlot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // (> 20)
|
||||
else if (serverSlot >= EQEmu::inventory::slotAmmo) // (> 20)
|
||||
RoFSlot.Slot += 1;
|
||||
}
|
||||
|
||||
@@ -5681,8 +5680,8 @@ namespace RoF
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
RoFSlot.Type = invtype::InvTypePossessions;
|
||||
TempSlot = serverSlot - 1;
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::inventory::ContainerCount);
|
||||
|
||||
if (RoFSlot.Slot >= invslot::PossessionsGeneral9) // (> 30)
|
||||
RoFSlot.Slot = invslot::PossessionsCursor;
|
||||
@@ -5699,8 +5698,8 @@ namespace RoF
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5710,8 +5709,8 @@ namespace RoF
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5721,8 +5720,8 @@ namespace RoF
|
||||
RoFSlot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) {
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -5760,16 +5759,16 @@ namespace RoF
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // (< 52)
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // (< 52)
|
||||
RoFSlot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
RoFSlot.Slot = invslot::PossessionsPowerSource;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::inventory::slotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoFSlot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // Ammo and Personl Inventory
|
||||
else if (serverSlot >= EQEmu::inventory::slotAmmo) // Ammo and Personl Inventory
|
||||
RoFSlot.Slot += 1;
|
||||
|
||||
/*else if (ServerSlot >= MainCursor) { // Cursor
|
||||
@@ -5782,8 +5781,8 @@ namespace RoF
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) {
|
||||
TempSlot = serverSlot - 1;
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2;
|
||||
RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::inventory::ContainerCount);
|
||||
}
|
||||
|
||||
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);
|
||||
@@ -5803,7 +5802,7 @@ namespace RoF
|
||||
|
||||
if (rofSlot.Type == invtype::InvTypePossessions && rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||
if (rofSlot.Slot == invslot::PossessionsPowerSource)
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
TempSlot = EQEmu::inventory::slotPowerSource;
|
||||
|
||||
else if (rofSlot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rofSlot.Slot - 3;
|
||||
@@ -5825,8 +5824,8 @@ namespace RoF
|
||||
else // Worn Slots
|
||||
TempSlot = rofSlot.Slot;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
@@ -5834,8 +5833,8 @@ namespace RoF
|
||||
else if (rofSlot.Type == invtype::InvTypeBank) {
|
||||
TempSlot = EQEmu::legacy::BANK_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rofSlot.Slot;
|
||||
@@ -5846,8 +5845,8 @@ namespace RoF
|
||||
else if (rofSlot.Type == invtype::InvTypeSharedBank) {
|
||||
TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rofSlot.Slot;
|
||||
@@ -5858,10 +5857,10 @@ namespace RoF
|
||||
else if (rofSlot.Type == invtype::InvTypeTrade) {
|
||||
TempSlot = EQEmu::legacy::TRADE_BEGIN;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rofSlot.Slot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||
// OLD CODE:
|
||||
//TempSlot += 100 + (RoFSlot.MainSlot * EQEmu::legacy::ITEM_CONTAINER_SIZE) + RoFSlot.SubSlot;
|
||||
//TempSlot += 100 + (RoFSlot.MainSlot * EQEmu::inventory::ContainerCount) + RoFSlot.SubSlot;
|
||||
|
||||
else
|
||||
TempSlot += rofSlot.Slot;
|
||||
@@ -5872,7 +5871,7 @@ namespace RoF
|
||||
else if (rofSlot.Type == invtype::InvTypeWorld) {
|
||||
TempSlot = EQEmu::legacy::WORLD_BEGIN;
|
||||
|
||||
if (rofSlot.Slot >= SUB_INDEX_BEGIN)
|
||||
if (rofSlot.Slot >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += rofSlot.Slot;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
@@ -5903,7 +5902,7 @@ namespace RoF
|
||||
|
||||
if (rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
||||
if (rofSlot.Slot == invslot::PossessionsPowerSource)
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
TempSlot = EQEmu::inventory::slotPowerSource;
|
||||
|
||||
else if (rofSlot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rofSlot.Slot - 3;
|
||||
@@ -5920,8 +5919,8 @@ namespace RoF
|
||||
else
|
||||
TempSlot = rofSlot.Slot;
|
||||
|
||||
if (rofSlot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rofSlot.SubIndex + 1;
|
||||
if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
+51
-51
@@ -2164,7 +2164,7 @@ namespace RoF2
|
||||
|
||||
outapp->WriteUInt32(22); // Equipment count
|
||||
|
||||
for (int r = EQEmu::textures::TextureBegin; r < EQEmu::textures::TextureCount; r++)
|
||||
for (int r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++)
|
||||
{
|
||||
outapp->WriteUInt32(emu->item_material.Slot[r].Material);
|
||||
outapp->WriteUInt32(0);
|
||||
@@ -2184,9 +2184,9 @@ namespace RoF2
|
||||
outapp->WriteUInt32(0);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::TextureCount); // Equipment2 count
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Equipment2 count
|
||||
|
||||
for (int r = EQEmu::textures::TextureBegin; r < EQEmu::textures::TextureCount; r++)
|
||||
for (int r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++)
|
||||
{
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteUInt32(0);
|
||||
@@ -2195,7 +2195,7 @@ namespace RoF2
|
||||
outapp->WriteUInt32(0);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::TextureCount); // Tint Count
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Tint Count
|
||||
|
||||
for (int r = 0; r < 7; r++)
|
||||
{
|
||||
@@ -2205,7 +2205,7 @@ namespace RoF2
|
||||
outapp->WriteUInt32(0);
|
||||
outapp->WriteUInt32(0);
|
||||
|
||||
outapp->WriteUInt32(EQEmu::textures::TextureCount); // Tint2 Count
|
||||
outapp->WriteUInt32(EQEmu::textures::materialCount); // Tint2 Count
|
||||
|
||||
for (int r = 0; r < 7; r++)
|
||||
{
|
||||
@@ -3154,12 +3154,12 @@ namespace RoF2
|
||||
eq_cse->Gender = emu_cse->Gender;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::TextureCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::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;
|
||||
eq_cse->Equip[equip_index].HeroForgeModel = emu_cse->Equip[equip_index].HeroForgeModel;
|
||||
eq_cse->Equip[equip_index].Material2 = emu_cse->Equip[equip_index].Material2;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||
eq_cse->Equip[equip_index].HeroForgeModel = emu_cse->Equip[equip_index].HeroicModel;
|
||||
eq_cse->Equip[equip_index].Material2 = emu_cse->Equip[equip_index].Unknown2;
|
||||
eq_cse->Equip[equip_index].Color = emu_cse->Equip[equip_index].Color;
|
||||
}
|
||||
|
||||
@@ -4321,7 +4321,7 @@ namespace RoF2
|
||||
|
||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||
{
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; ++k)
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; ++k)
|
||||
{
|
||||
{
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
|
||||
@@ -4330,15 +4330,15 @@ namespace RoF2
|
||||
|
||||
structs::Texture_Struct *Equipment = (structs::Texture_Struct *)Buffer;
|
||||
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; k++) {
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
Equipment[k].Material = emu->equipment.Slot[k].Material;
|
||||
Equipment[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteMaterial;
|
||||
Equipment[k].HeroForgeModel = emu->equipment.Slot[k].HeroForgeModel;
|
||||
Equipment[k].Material2 = emu->equipment.Slot[k].Material2;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||
Equipment[k].HeroForgeModel = emu->equipment.Slot[k].HeroicModel;
|
||||
Equipment[k].Material2 = emu->equipment.Slot[k].Unknown2;
|
||||
}
|
||||
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::TextureCount);
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5066,7 +5066,7 @@ namespace RoF2
|
||||
|
||||
IN(item_id);
|
||||
int r;
|
||||
for (r = 0; r < EQEmu::legacy::ITEM_COMMON_SIZE; r++) {
|
||||
for (r = EQEmu::inventory::socketBegin; r < EQEmu::inventory::SocketCount; r++) {
|
||||
IN(augments[r]);
|
||||
}
|
||||
IN(link_hash);
|
||||
@@ -5922,18 +5922,18 @@ namespace RoF2
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
for (uint32 index = SUB_INDEX_BEGIN; index < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++index) {
|
||||
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
int SubSlotNumber = INVALID_INDEX;
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + index + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
else
|
||||
SubSlotNumber = slot_id_in;
|
||||
|
||||
@@ -5959,7 +5959,7 @@ namespace RoF2
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // Main Inventory and Cursor
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // Main Inventory and Cursor
|
||||
if (PacketType == ItemPacketLoot)
|
||||
{
|
||||
RoF2Slot.Type = invtype::InvTypeCorpse;
|
||||
@@ -5971,13 +5971,13 @@ namespace RoF2
|
||||
RoF2Slot.Slot = serverSlot;
|
||||
}
|
||||
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
RoF2Slot.Slot = invslot::PossessionsPowerSource;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::inventory::slotCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory
|
||||
RoF2Slot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // (> 20)
|
||||
else if (serverSlot >= EQEmu::inventory::slotAmmo) // (> 20)
|
||||
RoF2Slot.Slot += 1;
|
||||
}
|
||||
|
||||
@@ -5989,8 +5989,8 @@ namespace RoF2
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341)
|
||||
RoF2Slot.Type = invtype::InvTypePossessions;
|
||||
TempSlot = serverSlot - 1;
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::inventory::ContainerCount);
|
||||
|
||||
if (RoF2Slot.Slot >= invslot::PossessionsGeneral9) // (> 30)
|
||||
RoF2Slot.Slot = invslot::PossessionsCursor;
|
||||
@@ -6007,8 +6007,8 @@ namespace RoF2
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6018,8 +6018,8 @@ namespace RoF2
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) { // (> 30)
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6029,8 +6029,8 @@ namespace RoF2
|
||||
RoF2Slot.Slot = TempSlot;
|
||||
|
||||
if (TempSlot > 30) {
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::inventory::ContainerCount);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6068,16 +6068,16 @@ namespace RoF2
|
||||
|
||||
uint32 TempSlot = 0;
|
||||
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::legacy::SlotPowerSource) { // (< 52)
|
||||
if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // (< 52)
|
||||
RoF2Slot.Slot = serverSlot;
|
||||
|
||||
if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
RoF2Slot.Slot = invslot::PossessionsPowerSource;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotCursor) // Cursor and Extended Corpse Inventory
|
||||
else if (serverSlot >= EQEmu::inventory::slotCursor) // Cursor and Extended Corpse Inventory
|
||||
RoF2Slot.Slot += 3;
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::SlotAmmo) // Ammo and Personl Inventory
|
||||
else if (serverSlot >= EQEmu::inventory::slotAmmo) // Ammo and Personl Inventory
|
||||
RoF2Slot.Slot += 1;
|
||||
|
||||
/*else if (ServerSlot >= MainCursor) { // Cursor
|
||||
@@ -6090,8 +6090,8 @@ namespace RoF2
|
||||
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) {
|
||||
TempSlot = serverSlot - 1;
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::legacy::ITEM_CONTAINER_SIZE) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::legacy::ITEM_CONTAINER_SIZE);
|
||||
RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2;
|
||||
RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::inventory::ContainerCount);
|
||||
}
|
||||
|
||||
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);
|
||||
@@ -6111,7 +6111,7 @@ namespace RoF2
|
||||
|
||||
if (rof2Slot.Type == invtype::InvTypePossessions && rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51)
|
||||
if (rof2Slot.Slot == invslot::PossessionsPowerSource)
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
TempSlot = EQEmu::inventory::slotPowerSource;
|
||||
|
||||
else if (rof2Slot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rof2Slot.Slot - 3;
|
||||
@@ -6133,8 +6133,8 @@ namespace RoF2
|
||||
else // Worn Slots
|
||||
TempSlot = rof2Slot.Slot;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
@@ -6142,8 +6142,8 @@ namespace RoF2
|
||||
else if (rof2Slot.Type == invtype::InvTypeBank) {
|
||||
TempSlot = EQEmu::legacy::BANK_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rof2Slot.Slot;
|
||||
@@ -6154,8 +6154,8 @@ namespace RoF2
|
||||
else if (rof2Slot.Type == invtype::InvTypeSharedBank) {
|
||||
TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||
|
||||
else
|
||||
TempSlot += rof2Slot.Slot;
|
||||
@@ -6166,8 +6166,8 @@ namespace RoF2
|
||||
else if (rof2Slot.Type == invtype::InvTypeTrade) {
|
||||
TempSlot = EQEmu::legacy::TRADE_BEGIN;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += ((rof2Slot.Slot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||
// OLD CODE:
|
||||
//TempSlot += 100 + (RoF2Slot.MainSlot * EmuConstants::ITEM_CONTAINER_SIZE) + RoF2Slot.SubSlot;
|
||||
|
||||
@@ -6180,7 +6180,7 @@ namespace RoF2
|
||||
else if (rof2Slot.Type == invtype::InvTypeWorld) {
|
||||
TempSlot = EQEmu::legacy::WORLD_BEGIN;
|
||||
|
||||
if (rof2Slot.Slot >= SUB_INDEX_BEGIN)
|
||||
if (rof2Slot.Slot >= EQEmu::inventory::containerBegin)
|
||||
TempSlot += rof2Slot.Slot;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
@@ -6215,7 +6215,7 @@ namespace RoF2
|
||||
|
||||
if (rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33)
|
||||
if (rof2Slot.Slot == invslot::PossessionsPowerSource)
|
||||
TempSlot = EQEmu::legacy::SlotPowerSource;
|
||||
TempSlot = EQEmu::inventory::slotPowerSource;
|
||||
|
||||
else if (rof2Slot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory
|
||||
TempSlot = rof2Slot.Slot - 3;
|
||||
@@ -6232,8 +6232,8 @@ namespace RoF2
|
||||
else
|
||||
TempSlot = rof2Slot.Slot;
|
||||
|
||||
if (rof2Slot.SubIndex >= SUB_INDEX_BEGIN) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + rof2Slot.SubIndex + 1;
|
||||
if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots
|
||||
TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1;
|
||||
|
||||
ServerSlot = TempSlot;
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ struct TintProfile
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1082,7 +1082,7 @@ union
|
||||
/*00184*/ Texture_Struct equipment[22]; // Total Slots
|
||||
};
|
||||
/*00624*/ uint32 equip2_count; // Seen 9
|
||||
/*00628*/ Texture_Struct equipment2[EQEmu::textures::TextureCount]; // Appears to be Visible slots, but all 0s
|
||||
/*00628*/ Texture_Struct equipment2[EQEmu::textures::materialCount]; // Appears to be Visible slots, but all 0s
|
||||
/*00808*/ uint32 tint_count; // Seen 9
|
||||
/*00812*/ TintProfile item_tint; // RR GG BB 00
|
||||
/*00848*/ uint32 tint_count2; // Seen 9
|
||||
|
||||
@@ -190,7 +190,7 @@ struct TintProfile
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
+15
-15
@@ -1558,7 +1558,7 @@ namespace SoD
|
||||
OUT(hairstyle);
|
||||
OUT(beard);
|
||||
// OUT(unknown00178[10]);
|
||||
for (r = EQEmu::textures::TextureBegin; r < EQEmu::textures::TextureCount; r++) {
|
||||
for (r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++) {
|
||||
eq->equipment.Slot[r].Material = emu->item_material.Slot[r].Material;
|
||||
eq->equipment.Slot[r].Unknown1 = 0;
|
||||
eq->equipment.Slot[r].EliteMaterial = 0;
|
||||
@@ -1998,10 +1998,10 @@ namespace SoD
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::TextureCount; equip_index++) {
|
||||
for (int equip_index = EQEmu::textures::textureBegin; equip_index < EQEmu::textures::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;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||
eq_cse->Equip[equip_index].Color = emu_cse->Equip[equip_index].Color;
|
||||
}
|
||||
|
||||
@@ -2568,7 +2568,7 @@ namespace SoD
|
||||
float SpawnSize = emu->size;
|
||||
if (!((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522)))
|
||||
{
|
||||
PacketSize -= (sizeof(structs::Texture_Struct) * EQEmu::textures::TextureCount);
|
||||
PacketSize -= (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
|
||||
if (emu->size == 0)
|
||||
{
|
||||
@@ -2765,7 +2765,7 @@ namespace SoD
|
||||
|
||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||
{
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; ++k)
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; ++k)
|
||||
{
|
||||
{
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
|
||||
@@ -2792,13 +2792,13 @@ namespace SoD
|
||||
{
|
||||
structs::Texture_Struct *Equipment = (structs::Texture_Struct *)Buffer;
|
||||
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; k++) {
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
Equipment[k].Material = emu->equipment.Slot[k].Material;
|
||||
Equipment[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteMaterial;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||
}
|
||||
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::TextureCount);
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
}
|
||||
if (strlen(emu->title))
|
||||
{
|
||||
@@ -3869,18 +3869,18 @@ namespace SoD
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
for (uint32 index = SUB_INDEX_BEGIN; index < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++index) {
|
||||
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
int SubSlotNumber = INVALID_INDEX;
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + index + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
else
|
||||
SubSlotNumber = slot_id_in;
|
||||
|
||||
@@ -3898,7 +3898,7 @@ namespace SoD
|
||||
{
|
||||
uint32 SoDSlot = 0;
|
||||
|
||||
if (serverSlot >= EQEmu::legacy::SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (serverSlot >= EQEmu::inventory::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
SoDSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||
SoDSlot = serverSlot + 11;
|
||||
@@ -3906,7 +3906,7 @@ namespace SoD
|
||||
SoDSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
SoDSlot = serverSlot + 1;
|
||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
else if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
SoDSlot = invslot::PossessionsPowerSource;
|
||||
else
|
||||
SoDSlot = serverSlot;
|
||||
@@ -3932,7 +3932,7 @@ namespace SoD
|
||||
else if (sodSlot >= invbag::SharedBankBagsBegin && sodSlot <= invbag::SharedBankBagsEnd)
|
||||
ServerSlot = sodSlot - 1;
|
||||
else if (sodSlot == invslot::PossessionsPowerSource)
|
||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
||||
ServerSlot = EQEmu::inventory::slotPowerSource;
|
||||
else
|
||||
ServerSlot = sodSlot;
|
||||
return ServerSlot;
|
||||
|
||||
@@ -149,7 +149,7 @@ struct TintProfile
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -178,7 +178,7 @@ struct TextureProfile
|
||||
Texture_Struct Primary;
|
||||
Texture_Struct Secondary;
|
||||
};
|
||||
Texture_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Texture_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
|
||||
TextureProfile();
|
||||
@@ -195,7 +195,7 @@ struct CharacterSelectEntry_Struct
|
||||
/*0000*/ uint8 Beard; //
|
||||
/*0001*/ uint8 HairColor; //
|
||||
/*0000*/ uint8 Face; //
|
||||
/*0000*/ CharSelectEquip Equip[EQEmu::textures::TextureCount];
|
||||
/*0000*/ CharSelectEquip Equip[EQEmu::textures::materialCount];
|
||||
/*0000*/ uint32 PrimaryIDFile; //
|
||||
/*0000*/ uint32 SecondaryIDFile; //
|
||||
/*0000*/ uint8 Unknown15; // 0xff
|
||||
|
||||
+13
-13
@@ -1230,7 +1230,7 @@ namespace SoF
|
||||
OUT(hairstyle);
|
||||
OUT(beard);
|
||||
// OUT(unknown00178[10]);
|
||||
for (r = EQEmu::textures::TextureBegin; r < EQEmu::textures::TextureCount; r++) {
|
||||
for (r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++) {
|
||||
eq->equipment.Slot[r].Material = emu->item_material.Slot[r].Material;
|
||||
eq->equipment.Slot[r].Unknown1 = 0;
|
||||
eq->equipment.Slot[r].EliteMaterial = 0;
|
||||
@@ -1670,10 +1670,10 @@ namespace SoF
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::TextureCount; equip_index++) {
|
||||
for (int equip_index = EQEmu::textures::textureBegin; equip_index < EQEmu::textures::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;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||
eq_cse->Equip[equip_index].Color = emu_cse->Equip[equip_index].Color;
|
||||
}
|
||||
|
||||
@@ -2101,10 +2101,10 @@ namespace SoF
|
||||
eq->deity = emu->deity;
|
||||
eq->drakkin_heritage = emu->drakkin_heritage;
|
||||
eq->gender = emu->gender;
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; k++) {
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
eq->equipment.Slot[k].Material = emu->equipment.Slot[k].Material;
|
||||
eq->equipment.Slot[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||
eq->equipment.Slot[k].EliteMaterial = emu->equipment.Slot[k].EliteMaterial;
|
||||
eq->equipment.Slot[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||
eq->equipment_tint.Slot[k].Color = emu->equipment_tint.Slot[k].Color;
|
||||
}
|
||||
eq->StandState = emu->StandState;
|
||||
@@ -2167,7 +2167,7 @@ namespace SoF
|
||||
strcpy(eq->name, emu->name);
|
||||
eq->petOwnerId = emu->petOwnerId;
|
||||
eq->pvp = 0; // 0 = non-pvp colored name, 1 = red pvp name
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; k++) {
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
eq->equipment_tint.Slot[k].Color = emu->equipment_tint.Slot[k].Color;
|
||||
}
|
||||
eq->anon = emu->anon;
|
||||
@@ -3237,18 +3237,18 @@ namespace SoF
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
for (uint32 index = SUB_INDEX_BEGIN; index < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++index) {
|
||||
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
int SubSlotNumber = INVALID_INDEX;
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + index + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
else
|
||||
SubSlotNumber = slot_id_in;
|
||||
|
||||
@@ -3266,7 +3266,7 @@ namespace SoF
|
||||
{
|
||||
uint32 SoFSlot = 0;
|
||||
|
||||
if (serverSlot >= EQEmu::legacy::SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (serverSlot >= EQEmu::inventory::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||
SoFSlot = serverSlot + 11;
|
||||
@@ -3274,7 +3274,7 @@ namespace SoF
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
SoFSlot = serverSlot + 1;
|
||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
else if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
SoFSlot = invslot::PossessionsPowerSource;
|
||||
else
|
||||
SoFSlot = serverSlot;
|
||||
@@ -3301,7 +3301,7 @@ namespace SoF
|
||||
else if (sofSlot >= invbag::SharedBankBagsBegin && sofSlot <= invbag::SharedBankBagsEnd)
|
||||
ServerSlot = sofSlot - 1;
|
||||
else if (sofSlot == invslot::PossessionsPowerSource)
|
||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
||||
ServerSlot = EQEmu::inventory::slotPowerSource;
|
||||
else
|
||||
ServerSlot = sofSlot;
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ struct TintProfile
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -178,7 +178,7 @@ struct TextureProfile
|
||||
Texture_Struct Primary;
|
||||
Texture_Struct Secondary;
|
||||
};
|
||||
Texture_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Texture_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
|
||||
TextureProfile();
|
||||
@@ -195,7 +195,7 @@ struct CharacterSelectEntry_Struct
|
||||
/*0000*/ uint8 Beard; //
|
||||
/*0001*/ uint8 HairColor; //
|
||||
/*0000*/ uint8 Face; //
|
||||
/*0000*/ CharSelectEquip Equip[EQEmu::textures::TextureCount];
|
||||
/*0000*/ CharSelectEquip Equip[EQEmu::textures::materialCount];
|
||||
/*0000*/ uint32 PrimaryIDFile; //
|
||||
/*0000*/ uint32 SecondaryIDFile; //
|
||||
/*0000*/ uint8 Unknown15; // 0xff
|
||||
|
||||
@@ -981,7 +981,7 @@ namespace Titanium
|
||||
OUT(hairstyle);
|
||||
OUT(beard);
|
||||
// OUT(unknown00178[10]);
|
||||
for (r = EQEmu::textures::TextureBegin; r < EQEmu::textures::TextureCount; r++) {
|
||||
for (r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++) {
|
||||
OUT(item_material.Slot[r].Material);
|
||||
OUT(item_tint.Slot[r].Color);
|
||||
}
|
||||
@@ -1301,14 +1301,14 @@ namespace Titanium
|
||||
if (eq->Race[char_index] > 473)
|
||||
eq->Race[char_index] = 1;
|
||||
|
||||
for (int index = 0; index < EQEmu::textures::TextureCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::textures::materialCount; ++index) {
|
||||
eq->CS_Colors[char_index].Slot[index].Color = emu_cse->Equip[index].Color;
|
||||
}
|
||||
|
||||
eq->BeardColor[char_index] = emu_cse->BeardColor;
|
||||
eq->HairStyle[char_index] = emu_cse->HairStyle;
|
||||
|
||||
for (int index = 0; index < EQEmu::textures::TextureCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::textures::materialCount; ++index) {
|
||||
eq->Equip[char_index].Slot[index].Material = emu_cse->Equip[index].Material;
|
||||
}
|
||||
|
||||
@@ -1338,14 +1338,14 @@ namespace Titanium
|
||||
for (; char_index < 10; ++char_index) {
|
||||
eq->Race[char_index] = 0;
|
||||
|
||||
for (int index = 0; index < EQEmu::textures::TextureCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::textures::materialCount; ++index) {
|
||||
eq->CS_Colors[char_index].Slot[index].Color = 0;
|
||||
}
|
||||
|
||||
eq->BeardColor[char_index] = 0;
|
||||
eq->HairStyle[char_index] = 0;
|
||||
|
||||
for (int index = 0; index < EQEmu::textures::TextureCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::textures::materialCount; ++index) {
|
||||
eq->Equip[char_index].Slot[index].Material = 0;
|
||||
}
|
||||
|
||||
@@ -1677,7 +1677,7 @@ namespace Titanium
|
||||
eq->petOwnerId = emu->petOwnerId;
|
||||
eq->guildrank = emu->guildrank;
|
||||
// eq->unknown0194[3] = emu->unknown0194[3];
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; k++) {
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
eq->equipment.Slot[k].Material = emu->equipment.Slot[k].Material;
|
||||
eq->equipment_tint.Slot[k].Color = emu->equipment_tint.Slot[k].Color;
|
||||
}
|
||||
@@ -2437,7 +2437,7 @@ namespace Titanium
|
||||
ob << StringFormat("%.*s\"", depth, protection); // Quotes (and protection, if needed) around static data
|
||||
|
||||
// Sub data
|
||||
for (int index = SUB_INDEX_BEGIN; index < invbag::ItemBagSize; ++index) {
|
||||
for (int index = EQEmu::inventory::containerBegin; index < invbag::ItemBagSize; ++index) {
|
||||
ob << '|';
|
||||
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
|
||||
@@ -144,7 +144,7 @@ struct TintProfile {
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -167,7 +167,7 @@ struct TextureProfile
|
||||
Texture_Struct Primary;
|
||||
Texture_Struct Secondary;
|
||||
};
|
||||
Texture_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Texture_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
|
||||
TextureProfile();
|
||||
|
||||
+15
-15
@@ -1817,7 +1817,7 @@ namespace UF
|
||||
OUT(hairstyle);
|
||||
OUT(beard);
|
||||
// OUT(unknown00178[10]);
|
||||
for (r = EQEmu::textures::TextureBegin; r < EQEmu::textures::TextureCount; r++) {
|
||||
for (r = EQEmu::textures::textureBegin; r < EQEmu::textures::materialCount; r++) {
|
||||
eq->equipment.Slot[r].Material = emu->item_material.Slot[r].Material;
|
||||
eq->equipment.Slot[r].Unknown1 = 0;
|
||||
eq->equipment.Slot[r].EliteMaterial = 0;
|
||||
@@ -2301,10 +2301,10 @@ namespace UF
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::TextureCount; equip_index++) {
|
||||
for (int equip_index = EQEmu::textures::textureBegin; equip_index < EQEmu::textures::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;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteModel;
|
||||
eq_cse->Equip[equip_index].Color = emu_cse->Equip[equip_index].Color;
|
||||
}
|
||||
|
||||
@@ -2869,7 +2869,7 @@ namespace UF
|
||||
float SpawnSize = emu->size;
|
||||
if (!((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522)))
|
||||
{
|
||||
PacketSize -= (sizeof(structs::Texture_Struct) * EQEmu::textures::TextureCount);
|
||||
PacketSize -= (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
|
||||
if (emu->size == 0)
|
||||
{
|
||||
@@ -3068,7 +3068,7 @@ namespace UF
|
||||
|
||||
if ((emu->NPC == 0) || (emu->race <= 12) || (emu->race == 128) || (emu->race == 130) || (emu->race == 330) || (emu->race == 522))
|
||||
{
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; ++k)
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; ++k)
|
||||
{
|
||||
{
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
|
||||
@@ -3104,17 +3104,17 @@ namespace UF
|
||||
{
|
||||
structs::Texture_Struct *Equipment = (structs::Texture_Struct *)Buffer;
|
||||
|
||||
for (k = EQEmu::textures::TextureBegin; k < EQEmu::textures::TextureCount; k++) {
|
||||
for (k = EQEmu::textures::textureBegin; k < EQEmu::textures::materialCount; k++) {
|
||||
if (emu->equipment.Slot[k].Material > 99999) {
|
||||
Equipment[k].Material = 63;
|
||||
} else {
|
||||
Equipment[k].Material = emu->equipment.Slot[k].Material;
|
||||
}
|
||||
Equipment[k].Unknown1 = emu->equipment.Slot[k].Unknown1;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteMaterial;
|
||||
Equipment[k].EliteMaterial = emu->equipment.Slot[k].EliteModel;
|
||||
}
|
||||
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::TextureCount);
|
||||
Buffer += (sizeof(structs::Texture_Struct) * EQEmu::textures::materialCount);
|
||||
}
|
||||
if (strlen(emu->title))
|
||||
{
|
||||
@@ -4224,18 +4224,18 @@ namespace UF
|
||||
|
||||
ob.write((const char*)&subitem_count, sizeof(uint32));
|
||||
|
||||
for (uint32 index = SUB_INDEX_BEGIN; index < EQEmu::legacy::ITEM_CONTAINER_SIZE; ++index) {
|
||||
for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) {
|
||||
EQEmu::ItemInstance* sub = inst->GetItem(index);
|
||||
if (!sub)
|
||||
continue;
|
||||
|
||||
int SubSlotNumber = INVALID_INDEX;
|
||||
if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END)
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + index + 1);
|
||||
SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1);
|
||||
else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index);
|
||||
else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END)
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::legacy::ITEM_CONTAINER_SIZE) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index);
|
||||
else
|
||||
SubSlotNumber = slot_id_in;
|
||||
|
||||
@@ -4253,7 +4253,7 @@ namespace UF
|
||||
{
|
||||
uint32 UnderfootSlot = 0;
|
||||
|
||||
if (serverSlot >= EQEmu::legacy::SlotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
if (serverSlot >= EQEmu::inventory::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots
|
||||
UnderfootSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END)
|
||||
UnderfootSlot = serverSlot + 11;
|
||||
@@ -4261,7 +4261,7 @@ namespace UF
|
||||
UnderfootSlot = serverSlot + 1;
|
||||
else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END)
|
||||
UnderfootSlot = serverSlot + 1;
|
||||
else if (serverSlot == EQEmu::legacy::SlotPowerSource)
|
||||
else if (serverSlot == EQEmu::inventory::slotPowerSource)
|
||||
UnderfootSlot = invslot::PossessionsPowerSource;
|
||||
else
|
||||
UnderfootSlot = serverSlot;
|
||||
@@ -4288,7 +4288,7 @@ namespace UF
|
||||
else if (ufSlot >= invbag::SharedBankBagsBegin && ufSlot <= invbag::SharedBankBagsEnd)
|
||||
ServerSlot = ufSlot - 1;
|
||||
else if (ufSlot == invslot::PossessionsPowerSource)
|
||||
ServerSlot = EQEmu::legacy::SlotPowerSource;
|
||||
ServerSlot = EQEmu::inventory::slotPowerSource;
|
||||
else
|
||||
ServerSlot = ufSlot;
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ struct TintProfile
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Tint_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -178,7 +178,7 @@ struct TextureProfile
|
||||
Texture_Struct Primary;
|
||||
Texture_Struct Secondary;
|
||||
};
|
||||
Texture_Struct Slot[EQEmu::textures::TextureCount];
|
||||
Texture_Struct Slot[EQEmu::textures::materialCount];
|
||||
};
|
||||
|
||||
TextureProfile();
|
||||
@@ -195,7 +195,7 @@ struct CharacterSelectEntry_Struct
|
||||
/*0000*/ uint8 Beard; //
|
||||
/*0001*/ uint8 HairColor; //
|
||||
/*0000*/ uint8 Face; //
|
||||
/*0000*/ CharSelectEquip Equip[EQEmu::textures::TextureCount];
|
||||
/*0000*/ CharSelectEquip Equip[EQEmu::textures::materialCount];
|
||||
/*0000*/ uint32 PrimaryIDFile; //
|
||||
/*0000*/ uint32 SecondaryIDFile; //
|
||||
/*0000*/ uint8 Unknown15; // 0xff
|
||||
|
||||
+17
-17
@@ -105,7 +105,7 @@ bool SharedDatabase::SaveCursor(uint32 char_id, std::list<EQEmu::ItemInstance*>:
|
||||
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, EQEmu::legacy::SlotCursor,
|
||||
char_id, EQEmu::inventory::slotCursor,
|
||||
EQEmu::legacy::CURSOR_BAG_BEGIN, EQEmu::legacy::CURSOR_BAG_END);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
@@ -117,7 +117,7 @@ bool SharedDatabase::SaveCursor(uint32 char_id, std::list<EQEmu::ItemInstance*>:
|
||||
for(auto it = start; it != end; ++it, i++) {
|
||||
if (i > 8999) { break; } // shouldn't be anything in the queue that indexes this high
|
||||
EQEmu::ItemInstance *inst = *it;
|
||||
int16 use_slot = (i == 8000) ? EQEmu::legacy::SlotCursor : i;
|
||||
int16 use_slot = (i == 8000) ? EQEmu::inventory::slotCursor : i;
|
||||
if (!SaveInventory(char_id, inst, use_slot)) {
|
||||
return false;
|
||||
}
|
||||
@@ -192,9 +192,9 @@ bool SharedDatabase::SaveInventory(uint32 char_id, const EQEmu::ItemInstance* in
|
||||
bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id) {
|
||||
// need to check 'inst' argument for valid pointer
|
||||
|
||||
uint32 augslot[EQEmu::legacy::ITEM_COMMON_SIZE] = { 0, 0, 0, 0, 0, 0 };
|
||||
uint32 augslot[EQEmu::inventory::SocketCount] = { 0, 0, 0, 0, 0, 0 };
|
||||
if (inst->IsClassCommon()) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) {
|
||||
EQEmu::ItemInstance *auginst = inst->GetItem(i);
|
||||
augslot[i] = (auginst && auginst->GetItem()) ? auginst->GetItem()->ID : 0;
|
||||
}
|
||||
@@ -224,7 +224,7 @@ bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const EQEmu::ItemInstan
|
||||
if (inst->IsClassBag() && 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::legacy::ITEM_CONTAINER_SIZE; idx++) {
|
||||
for (uint8 idx = EQEmu::inventory::containerBegin; idx < inst->GetItem()->BagSlots && idx < EQEmu::inventory::ContainerCount; idx++) {
|
||||
const EQEmu::ItemInstance* baginst = inst->GetItem(idx);
|
||||
SaveInventory(char_id, baginst, Inventory::CalcSlotId(slot_id, idx));
|
||||
}
|
||||
@@ -239,9 +239,9 @@ bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const EQEmu::ItemInstan
|
||||
bool SharedDatabase::UpdateSharedBankSlot(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id) {
|
||||
// need to check 'inst' argument for valid pointer
|
||||
|
||||
uint32 augslot[EQEmu::legacy::ITEM_COMMON_SIZE] = { 0, 0, 0, 0, 0, 0 };
|
||||
uint32 augslot[EQEmu::inventory::SocketCount] = { 0, 0, 0, 0, 0, 0 };
|
||||
if (inst->IsClassCommon()) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) {
|
||||
EQEmu::ItemInstance *auginst = inst->GetItem(i);
|
||||
augslot[i] = (auginst && auginst->GetItem()) ? auginst->GetItem()->ID : 0;
|
||||
}
|
||||
@@ -270,7 +270,7 @@ bool SharedDatabase::UpdateSharedBankSlot(uint32 char_id, const EQEmu::ItemInsta
|
||||
if (inst->IsClassBag() && 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::legacy::ITEM_CONTAINER_SIZE; idx++) {
|
||||
for (uint8 idx = EQEmu::inventory::containerBegin; idx < inst->GetItem()->BagSlots && idx < EQEmu::inventory::ContainerCount; idx++) {
|
||||
const EQEmu::ItemInstance* baginst = inst->GetItem(idx);
|
||||
SaveInventory(char_id, baginst, Inventory::CalcSlotId(slot_id, idx));
|
||||
}
|
||||
@@ -296,7 +296,7 @@ bool SharedDatabase::DeleteInventorySlot(uint32 char_id, int16 slot_id) {
|
||||
if (!Inventory::SupportsContainers(slot_id))
|
||||
return true;
|
||||
|
||||
int16 base_slot_id = Inventory::CalcSlotId(slot_id, SUB_INDEX_BEGIN);
|
||||
int16 base_slot_id = Inventory::CalcSlotId(slot_id, EQEmu::inventory::containerBegin);
|
||||
query = StringFormat("DELETE FROM inventory WHERE charid = %i AND slotid >= %i AND slotid < %i",
|
||||
char_id, base_slot_id, (base_slot_id+10));
|
||||
results = QueryDatabase(query);
|
||||
@@ -322,7 +322,7 @@ bool SharedDatabase::DeleteSharedBankSlot(uint32 char_id, int16 slot_id) {
|
||||
if (!Inventory::SupportsContainers(slot_id))
|
||||
return true;
|
||||
|
||||
int16 base_slot_id = Inventory::CalcSlotId(slot_id, SUB_INDEX_BEGIN);
|
||||
int16 base_slot_id = Inventory::CalcSlotId(slot_id, EQEmu::inventory::containerBegin);
|
||||
query = StringFormat("DELETE FROM sharedbank WHERE acctid = %i "
|
||||
"AND slotid >= %i AND slotid < %i",
|
||||
account_id, base_slot_id, (base_slot_id+10));
|
||||
@@ -428,7 +428,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::legacy::ITEM_COMMON_SIZE];
|
||||
uint32 aug[EQEmu::inventory::SocketCount];
|
||||
aug[0] = (uint32)atoi(row[3]);
|
||||
aug[1] = (uint32)atoi(row[4]);
|
||||
aug[2] = (uint32)atoi(row[5]);
|
||||
@@ -449,7 +449,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory *inv, bool is_charid)
|
||||
|
||||
EQEmu::ItemInstance *inst = CreateBaseItem(item, charges);
|
||||
if (inst && item->IsClassCommon()) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) {
|
||||
if (aug[i])
|
||||
inst->PutAugment(this, i, aug[i]);
|
||||
}
|
||||
@@ -524,7 +524,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
||||
uint16 charges = atoi(row[2]);
|
||||
uint32 color = atoul(row[3]);
|
||||
|
||||
uint32 aug[EQEmu::legacy::ITEM_COMMON_SIZE];
|
||||
uint32 aug[EQEmu::inventory::SocketCount];
|
||||
|
||||
aug[0] = (uint32)atoul(row[4]);
|
||||
aug[1] = (uint32)atoul(row[5]);
|
||||
@@ -587,7 +587,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
||||
|
||||
if (instnodrop ||
|
||||
(((slot_id >= EQEmu::legacy::EQUIPMENT_BEGIN && slot_id <= EQEmu::legacy::EQUIPMENT_END) ||
|
||||
slot_id == EQEmu::legacy::SlotPowerSource) &&
|
||||
slot_id == EQEmu::inventory::slotPowerSource) &&
|
||||
inst->GetItem()->Attuneable))
|
||||
inst->SetAttuned(true);
|
||||
|
||||
@@ -609,7 +609,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory *inv)
|
||||
}
|
||||
|
||||
if (item->IsClassCommon()) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) {
|
||||
if (aug[i])
|
||||
inst->PutAugment(this, i, aug[i]);
|
||||
}
|
||||
@@ -666,7 +666,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char *name, Inventory *inv)
|
||||
int8 charges = atoi(row[2]);
|
||||
uint32 color = atoul(row[3]);
|
||||
|
||||
uint32 aug[EQEmu::legacy::ITEM_COMMON_SIZE];
|
||||
uint32 aug[EQEmu::inventory::SocketCount];
|
||||
aug[0] = (uint32)atoi(row[4]);
|
||||
aug[1] = (uint32)atoi(row[5]);
|
||||
aug[2] = (uint32)atoi(row[6]);
|
||||
@@ -727,7 +727,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char *name, Inventory *inv)
|
||||
inst->SetCharges(charges);
|
||||
|
||||
if (item->IsClassCommon()) {
|
||||
for (int i = AUG_INDEX_BEGIN; i < EQEmu::legacy::ITEM_COMMON_SIZE; i++) {
|
||||
for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) {
|
||||
if (aug[i])
|
||||
inst->PutAugment(this, i, aug[i]);
|
||||
}
|
||||
|
||||
@@ -18,82 +18,3 @@
|
||||
*/
|
||||
|
||||
#include "textures.h"
|
||||
//#include "inventory_slot.h"
|
||||
|
||||
#include <string.h> // temp
|
||||
|
||||
|
||||
//int EQEmu::textures::ConvertEquipmentSlotToTextureSlot(int equipment_slot)
|
||||
//{
|
||||
// switch (equipment_slot) {
|
||||
// case inventory::PossessionsHead:
|
||||
// return textures::TextureHead;
|
||||
// case inventory::PossessionsChest:
|
||||
// return textures::TextureChest;
|
||||
// case inventory::PossessionsArms:
|
||||
// return textures::TextureArms;
|
||||
// case inventory::PossessionsWrist1:
|
||||
// return textures::TextureWrist;
|
||||
// case inventory::PossessionsHands:
|
||||
// return textures::TextureHands;
|
||||
// case inventory::PossessionsLegs:
|
||||
// return textures::TextureLegs;
|
||||
// case inventory::PossessionsFeet:
|
||||
// return textures::TextureFeet;
|
||||
// case inventory::PossessionsPrimary:
|
||||
// return textures::TexturePrimary;
|
||||
// case inventory::PossessionsSecondary:
|
||||
// return textures::TextureSecondary;
|
||||
// default:
|
||||
// return textures::TextureInvalid;
|
||||
// }
|
||||
//}
|
||||
|
||||
//int EQEmu::textures::ConvertEquipmentSlotToTextureSlot(const InventorySlot &equipment_slot)
|
||||
//{
|
||||
// if (equipment_slot.Type() != inventory::InvTypePossessions || equipment_slot.Bag() != inventory::InvBagInvalid || equipment_slot.Aug() != inventory::InvAugInvalid)
|
||||
// return textures::TextureInvalid;
|
||||
//
|
||||
// return ConvertEquipmentSlotToTextureSlot(equipment_slot.Slot());
|
||||
//}
|
||||
|
||||
//EQEmu::InventorySlot EQEmu::textures::ConvertTextureSlotToEquipmentSlot(int texture_slot)
|
||||
//{
|
||||
// switch (texture_slot) {
|
||||
// case textures::TextureHead:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsHead);
|
||||
// case textures::TextureChest:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsChest);
|
||||
// case textures::TextureArms:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsArms);
|
||||
// case textures::TextureWrist:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsWrist1);
|
||||
// case textures::TextureHands:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsHands);
|
||||
// case textures::TextureLegs:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsLegs);
|
||||
// case textures::TextureFeet:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsFeet);
|
||||
// case textures::TexturePrimary:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsPrimary);
|
||||
// case textures::TextureSecondary:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsSecondary);
|
||||
// default:
|
||||
// return EQEmu::InventorySlot();
|
||||
// }
|
||||
//}
|
||||
|
||||
EQEmu::TextureProfile::TextureProfile()
|
||||
{
|
||||
memset(&Slot, 0, (sizeof(Texture_Struct) * textures::TextureCount));
|
||||
}
|
||||
|
||||
EQEmu::TextureShortProfile::TextureShortProfile()
|
||||
{
|
||||
memset(&Slot, 0, (sizeof(uint32) * textures::TextureCount));
|
||||
}
|
||||
|
||||
EQEmu::TintProfile::TintProfile()
|
||||
{
|
||||
memset(&Slot, 0, (sizeof(uint32) * textures::TextureCount));
|
||||
}
|
||||
|
||||
+97
-84
@@ -25,116 +25,129 @@
|
||||
|
||||
namespace EQEmu
|
||||
{
|
||||
//class InventorySlot;
|
||||
|
||||
namespace textures {
|
||||
//enum : int { TextureInvalid = -1, TextureBegin };
|
||||
enum : uint8 { TextureInvalid = 255, TextureBegin = 0 };
|
||||
enum : int8 { textureInvalid = -1, textureBegin };
|
||||
|
||||
//enum TextureSlot : int {
|
||||
enum TextureSlot : uint8 {
|
||||
TextureHead = TextureBegin,
|
||||
TextureChest,
|
||||
TextureArms,
|
||||
TextureWrist,
|
||||
TextureHands,
|
||||
TextureLegs,
|
||||
TextureFeet,
|
||||
TexturePrimary,
|
||||
TextureSecondary,
|
||||
TextureCount
|
||||
enum TextureSlot : int8 {
|
||||
armorHead = textureBegin,
|
||||
armorChest,
|
||||
armorArms,
|
||||
armorWrist,
|
||||
armorHands,
|
||||
armorLegs,
|
||||
armorFeet,
|
||||
weaponPrimary,
|
||||
weaponSecondary,
|
||||
materialCount,
|
||||
materialInvalid = textureInvalid
|
||||
};
|
||||
|
||||
const int LastTexture = TextureSecondary;
|
||||
const int LastTintableTexture = TextureFeet;
|
||||
enum TintSlot : int8 {
|
||||
tintHead = textureBegin,
|
||||
tintChest,
|
||||
tintArms,
|
||||
tintWrist,
|
||||
tintHands,
|
||||
tintLegs,
|
||||
tintFeet,
|
||||
tintCount,
|
||||
tintInvalid = textureInvalid
|
||||
};
|
||||
|
||||
//extern int ConvertEquipmentSlotToTextureSlot(int equipment_slot);
|
||||
//extern int ConvertEquipmentSlotToTextureSlot(const InventorySlot &equipment_slot);
|
||||
//extern InventorySlot ConvertTextureSlotToEquipmentSlot(int texture_slot);
|
||||
const int8 LastTexture = weaponSecondary;
|
||||
const int8 LastTintableTexture = tintFeet;
|
||||
|
||||
struct Texture_Struct {
|
||||
union {
|
||||
struct {
|
||||
struct {
|
||||
struct {
|
||||
uint32 _material;
|
||||
} _1_field;
|
||||
|
||||
uint32 _unknown1;
|
||||
uint32 _elite_model;
|
||||
} _3_fields;
|
||||
|
||||
uint32 _heroic_model;
|
||||
uint32 _unknown2;
|
||||
} _5_fields;
|
||||
|
||||
uint32 Material;
|
||||
uint32 Unknown1;
|
||||
uint32 EliteModel;
|
||||
uint32 HeroicModel;
|
||||
uint32 Unknown2; // same as material?
|
||||
};
|
||||
};
|
||||
|
||||
struct TextureMaterial_Struct {
|
||||
uint32 Material;
|
||||
};
|
||||
|
||||
struct Tint_Struct {
|
||||
union {
|
||||
struct {
|
||||
uint8 Blue;
|
||||
uint8 Green;
|
||||
uint8 Red;
|
||||
uint8 UseTint; // if there's a tint, this is FF
|
||||
};
|
||||
uint32 Color;
|
||||
};
|
||||
};
|
||||
|
||||
} /*textures*/
|
||||
|
||||
struct Texture_Struct {
|
||||
uint32 Material;
|
||||
uint32 Unknown1;
|
||||
uint32 EliteMaterial;
|
||||
uint32 HeroForgeModel;
|
||||
uint32 Material2; // Same as material?
|
||||
};
|
||||
|
||||
struct TextureProfile {
|
||||
union {
|
||||
struct {
|
||||
Texture_Struct Head;
|
||||
Texture_Struct Chest;
|
||||
Texture_Struct Arms;
|
||||
Texture_Struct Wrist;
|
||||
Texture_Struct Hands;
|
||||
Texture_Struct Legs;
|
||||
Texture_Struct Feet;
|
||||
Texture_Struct Primary;
|
||||
Texture_Struct Secondary;
|
||||
textures::Texture_Struct Head;
|
||||
textures::Texture_Struct Chest;
|
||||
textures::Texture_Struct Arms;
|
||||
textures::Texture_Struct Wrist;
|
||||
textures::Texture_Struct Hands;
|
||||
textures::Texture_Struct Legs;
|
||||
textures::Texture_Struct Feet;
|
||||
textures::Texture_Struct Primary;
|
||||
textures::Texture_Struct Secondary;
|
||||
};
|
||||
Texture_Struct Slot[textures::TextureCount];
|
||||
textures::Texture_Struct Slot[textures::materialCount];
|
||||
};
|
||||
|
||||
TextureProfile();
|
||||
};
|
||||
|
||||
struct TextureShort_Struct {
|
||||
uint32 Material;
|
||||
};
|
||||
|
||||
struct TextureShortProfile {
|
||||
struct TextureMaterialProfile {
|
||||
union {
|
||||
struct {
|
||||
TextureShort_Struct Head;
|
||||
TextureShort_Struct Chest;
|
||||
TextureShort_Struct Arms;
|
||||
TextureShort_Struct Wrist;
|
||||
TextureShort_Struct Hands;
|
||||
TextureShort_Struct Legs;
|
||||
TextureShort_Struct Feet;
|
||||
TextureShort_Struct Primary;
|
||||
TextureShort_Struct Secondary;
|
||||
textures::TextureMaterial_Struct Head;
|
||||
textures::TextureMaterial_Struct Chest;
|
||||
textures::TextureMaterial_Struct Arms;
|
||||
textures::TextureMaterial_Struct Wrist;
|
||||
textures::TextureMaterial_Struct Hands;
|
||||
textures::TextureMaterial_Struct Legs;
|
||||
textures::TextureMaterial_Struct Feet;
|
||||
textures::TextureMaterial_Struct Primary;
|
||||
textures::TextureMaterial_Struct Secondary;
|
||||
};
|
||||
TextureShort_Struct Slot[textures::TextureCount];
|
||||
textures::TextureMaterial_Struct Slot[textures::materialCount];
|
||||
};
|
||||
|
||||
TextureShortProfile();
|
||||
};
|
||||
|
||||
struct Tint_Struct {
|
||||
union {
|
||||
struct {
|
||||
uint8 Blue;
|
||||
uint8 Green;
|
||||
uint8 Red;
|
||||
uint8 UseTint; // if there's a tint this is FF
|
||||
};
|
||||
uint32 Color;
|
||||
};
|
||||
|
||||
//Tint_Struct();
|
||||
};
|
||||
|
||||
struct TintProfile {
|
||||
union {
|
||||
struct {
|
||||
Tint_Struct Head;
|
||||
Tint_Struct Chest;
|
||||
Tint_Struct Arms;
|
||||
Tint_Struct Wrist;
|
||||
Tint_Struct Hands;
|
||||
Tint_Struct Legs;
|
||||
Tint_Struct Feet;
|
||||
Tint_Struct Primary;
|
||||
Tint_Struct Secondary;
|
||||
textures::Tint_Struct Head;
|
||||
textures::Tint_Struct Chest;
|
||||
textures::Tint_Struct Arms;
|
||||
textures::Tint_Struct Wrist;
|
||||
textures::Tint_Struct Hands;
|
||||
textures::Tint_Struct Legs;
|
||||
textures::Tint_Struct Feet;
|
||||
textures::Tint_Struct Primary;
|
||||
textures::Tint_Struct Secondary;
|
||||
};
|
||||
Tint_Struct Slot[textures::TextureCount];
|
||||
textures::Tint_Struct Slot[textures::materialCount]; // materialCount is correct..but, {[weaponPrimary],[weaponSecondary]} are not tintable...
|
||||
};
|
||||
|
||||
TintProfile();
|
||||
};
|
||||
|
||||
} /*EQEmu*/
|
||||
|
||||
Reference in New Issue
Block a user