diff --git a/common/emu_limits.cpp b/common/emu_limits.cpp index 64d038a54..a9e74898d 100644 --- a/common/emu_limits.cpp +++ b/common/emu_limits.cpp @@ -1,4 +1,4 @@ -/* EQEMu: Everquest Server Emulator +/* EQEMu: Everquest Server Emulator Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net) @@ -10,7 +10,7 @@ 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. + 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 diff --git a/common/emu_limits.h b/common/emu_limits.h index e5b66faeb..5c72315a0 100644 --- a/common/emu_limits.h +++ b/common/emu_limits.h @@ -1,4 +1,4 @@ -/* EQEMu: Everquest Server Emulator +/* EQEMu: Everquest Server Emulator Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net) @@ -10,7 +10,7 @@ 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. + 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 @@ -31,25 +31,37 @@ namespace EntityLimits enum : int { Invalid = -1, Null, Safety }; enum : bool { False = false, True = true }; - } + + const size_t InvTypeTradeSize = 4; + + } /*npc*/ namespace merc { enum : int { Invalid = -1, Null, Safety }; enum : bool { False = false, True = true }; - } + + const size_t InvTypeTradeSize = 4; + + } /*merc*/ namespace bot { enum : int { Invalid = -1, Null, Safety }; enum : bool { False = false, True = true }; - } + + const size_t InvTypeTradeSize = 8; + + } /*bot*/ namespace pet { enum : int { Invalid = -1, Null, Safety }; enum : bool { False = false, True = true }; - } + + const size_t InvTypeTradeSize = 4; + + } /*pet*/ }; /*EntityLimits*/ diff --git a/common/eq_constants.h b/common/eq_constants.h index e23089ce6..0fe5ccf48 100644 --- a/common/eq_constants.h +++ b/common/eq_constants.h @@ -516,7 +516,6 @@ static const uint8 SkillDamageTypes[EQEmu::skills::HIGHEST_SKILL + 1] = // chang */ #define INVALID_INDEX -1 -#define NOT_USED 0 #define NO_ITEM 0 // yes..these are redundant... but, they help to identify and define what is actually being performed diff --git a/common/eq_limits.cpp b/common/eq_limits.cpp index 2c40a98b9..f9bee1c71 100644 --- a/common/eq_limits.cpp +++ b/common/eq_limits.cpp @@ -1,4 +1,4 @@ -/* EQEMu: Everquest Server Emulator +/* EQEMu: Everquest Server Emulator Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net) @@ -10,7 +10,7 @@ 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. + 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 @@ -21,7 +21,7 @@ #include "emu_limits.h" -size_t EQEmu::constants::CharacterCreationLimit(versions::ClientVersion client_version) +size_t EQEmu::constants::GetCharacterCreationLimit(versions::ClientVersion client_version) { static const size_t local[versions::ClientVersionCount] = { ClientUnknown::Null, @@ -37,22 +37,22 @@ size_t EQEmu::constants::CharacterCreationLimit(versions::ClientVersion client_v return local[static_cast(versions::ValidateClientVersion(client_version))]; } -uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_version, int16 inv_type) +size_t EQEmu::inventory::GetInventoryTypeSize(versions::InventoryVersion inventory_version, int inv_type) { - static const uint16 local[legacy::TypeCount][versions::InventoryVersionCount] = { + static const size_t local[legacy::TypeCount][versions::InventoryVersionCount] = { { // local[TypePossessions] ClientUnknown::Null, Client62::Null, - legacy::TYPE_POSSESSIONS_SIZE, - legacy::TYPE_POSSESSIONS_SIZE, - legacy::TYPE_POSSESSIONS_SIZE, - legacy::TYPE_POSSESSIONS_SIZE, - legacy::TYPE_POSSESSIONS_SIZE, - legacy::TYPE_POSSESSIONS_SIZE, - legacy::TYPE_POSSESSIONS_SIZE, - legacy::TYPE_POSSESSIONS_SIZE, - legacy::TYPE_POSSESSIONS_SIZE, - legacy::TYPE_POSSESSIONS_SIZE, + legacy::TYPE_POSSESSIONS_SIZE, //Titanium::invtype::InvTypePossessionsSize, + legacy::TYPE_POSSESSIONS_SIZE, //SoF::invtype::InvTypePossessionsSize, + legacy::TYPE_POSSESSIONS_SIZE, //SoD::invtype::InvTypePossessionsSize, + legacy::TYPE_POSSESSIONS_SIZE, //UF::invtype::InvTypePossessionsSize, + legacy::TYPE_POSSESSIONS_SIZE, //RoF::invtype::InvTypePossessionsSize, + legacy::TYPE_POSSESSIONS_SIZE, //RoF2::invtype::InvTypePossessionsSize, + legacy::TYPE_POSSESSIONS_SIZE, //InvTypePossessionsSize, + legacy::TYPE_POSSESSIONS_SIZE, //InvTypePossessionsSize, + legacy::TYPE_POSSESSIONS_SIZE, //InvTypePossessionsSize, + legacy::TYPE_POSSESSIONS_SIZE, //InvTypePossessionsSize, Titanium::Null, SoF::Null, SoD::Null, @@ -64,11 +64,11 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ ClientUnknown::Null, Client62::Null, Titanium::invtype::InvTypeBankSize, - legacy::TYPE_BANK_SIZE, - legacy::TYPE_BANK_SIZE, - legacy::TYPE_BANK_SIZE, - legacy::TYPE_BANK_SIZE, - legacy::TYPE_BANK_SIZE, + SoF::invtype::InvTypeBankSize, + SoD::invtype::InvTypeBankSize, + UF::invtype::InvTypeBankSize, + RoF::invtype::InvTypeBankSize, + RoF2::invtype::InvTypeBankSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, @@ -83,12 +83,12 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ { // local[TypeSharedBank] ClientUnknown::Null, Client62::Null, - legacy::TYPE_SHARED_BANK_SIZE, - legacy::TYPE_SHARED_BANK_SIZE, - legacy::TYPE_SHARED_BANK_SIZE, - legacy::TYPE_SHARED_BANK_SIZE, - legacy::TYPE_SHARED_BANK_SIZE, - legacy::TYPE_SHARED_BANK_SIZE, + Titanium::invtype::InvTypeSharedBankSize, + SoF::invtype::InvTypeSharedBankSize, + SoD::invtype::InvTypeSharedBankSize, + UF::invtype::InvTypeSharedBankSize, + RoF::invtype::InvTypeSharedBankSize, + RoF2::invtype::InvTypeSharedBankSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, @@ -103,32 +103,32 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ { // local[TypeTrade] ClientUnknown::Null, Client62::Null, - legacy::TYPE_TRADE_SIZE, - legacy::TYPE_TRADE_SIZE, - legacy::TYPE_TRADE_SIZE, - legacy::TYPE_TRADE_SIZE, - legacy::TYPE_TRADE_SIZE, - legacy::TYPE_TRADE_SIZE, - 4, - 4, - legacy::TYPE_TRADE_SIZE, // client thinks this is another client - 4, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - RoF::Null, - RoF2::Null + Titanium::invtype::InvTypeTradeSize, + SoF::invtype::InvTypeTradeSize, + SoD::invtype::InvTypeTradeSize, + UF::invtype::InvTypeTradeSize, + RoF::invtype::InvTypeTradeSize, + RoF2::invtype::InvTypeTradeSize, + EntityLimits::npc::InvTypeTradeSize, + EntityLimits::merc::InvTypeTradeSize, + EntityLimits::bot::InvTypeTradeSize, // client thinks this is another client + EntityLimits::pet::InvTypeTradeSize, + Titanium::invtype::InvTypeTradeSize, + SoF::invtype::InvTypeTradeSize, + SoD::invtype::InvTypeTradeSize, + UF::invtype::InvTypeTradeSize, + RoF::invtype::InvTypeTradeSize, + RoF2::invtype::InvTypeTradeSize }, { // local[TypeWorld] ClientUnknown::Null, Client62::Null, - legacy::TYPE_WORLD_SIZE, - legacy::TYPE_WORLD_SIZE, - legacy::TYPE_WORLD_SIZE, - legacy::TYPE_WORLD_SIZE, - legacy::TYPE_WORLD_SIZE, - legacy::TYPE_WORLD_SIZE, + Titanium::invtype::InvTypeWorldSize, + SoF::invtype::InvTypeWorldSize, + SoD::invtype::InvTypeWorldSize, + UF::invtype::InvTypeWorldSize, + RoF::invtype::InvTypeWorldSize, + RoF2::invtype::InvTypeWorldSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, @@ -143,12 +143,12 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ { // local[TypeLimbo] ClientUnknown::Null, Client62::Null, - legacy::TYPE_LIMBO_SIZE, - legacy::TYPE_LIMBO_SIZE, - legacy::TYPE_LIMBO_SIZE, - legacy::TYPE_LIMBO_SIZE, - legacy::TYPE_LIMBO_SIZE, - legacy::TYPE_LIMBO_SIZE, + Titanium::invtype::InvTypeLimboSize, + SoF::invtype::InvTypeLimboSize, + SoD::invtype::InvTypeLimboSize, + UF::invtype::InvTypeLimboSize, + RoF::invtype::InvTypeLimboSize, + RoF2::invtype::InvTypeLimboSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, @@ -163,12 +163,12 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ { // local[TypeTribute] ClientUnknown::Null, Client62::Null, - legacy::TYPE_TRIBUTE_SIZE, - legacy::TYPE_TRIBUTE_SIZE, - legacy::TYPE_TRIBUTE_SIZE, - legacy::TYPE_TRIBUTE_SIZE, - legacy::TYPE_TRIBUTE_SIZE, - legacy::TYPE_TRIBUTE_SIZE, + Titanium::invtype::InvTypeTributeSize, + SoF::invtype::InvTypeTributeSize, + SoD::invtype::InvTypeTributeSize, + UF::invtype::InvTypeTributeSize, + RoF::invtype::InvTypeTributeSize, + RoF2::invtype::InvTypeTributeSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, @@ -187,8 +187,8 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ SoF::Null, SoD::Null, UF::Null, - legacy::TYPE_TROPHY_TRIBUTE_SIZE, - legacy::TYPE_TROPHY_TRIBUTE_SIZE, + RoF::Null, //RoF::invtype::InvTypeTrophyTributeSize, + RoF2::Null, //RoF2::invtype::InvTypeTrophyTributeSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, @@ -203,12 +203,12 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ { // local[TypeGuildTribute] ClientUnknown::Null, Client62::Null, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - legacy::TYPE_GUILD_TRIBUTE_SIZE, - legacy::TYPE_GUILD_TRIBUTE_SIZE, + Titanium::Null, //Titanium::invtype::InvTypeGuildTributeSize, + SoF::Null, //SoF::invtype::InvTypeGuildTributeSize, + SoD::Null, //SoD::invtype::InvTypeGuildTributeSize, + UF::Null, //UF::invtype::InvTypeGuildTributeSize, + RoF::Null, //RoF::invtype::InvTypeGuildTributeSize, + RoF2::Null, //RoF2::invtype::InvTypeGuildTributeSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, @@ -223,22 +223,22 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ { // local[TypeMerchant] ClientUnknown::Null, Client62::Null, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - legacy::TYPE_MERCHANT_SIZE, - legacy::TYPE_MERCHANT_SIZE, + Titanium::invtype::InvTypeMerchantSize, + SoF::invtype::InvTypeMerchantSize, + SoD::invtype::InvTypeMerchantSize, + UF::invtype::InvTypeMerchantSize, + RoF::invtype::InvTypeMerchantSize, + RoF2::invtype::InvTypeMerchantSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, EntityLimits::pet::Null, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - RoF::Null, - RoF2::Null + Titanium::invtype::InvTypeMerchantSize, + SoF::invtype::InvTypeMerchantSize, + SoD::invtype::InvTypeMerchantSize, + UF::invtype::InvTypeMerchantSize, + RoF::invtype::InvTypeMerchantSize, + RoF2::invtype::InvTypeMerchantSize }, { // local[TypeDeleted] ClientUnknown::Null, @@ -247,8 +247,8 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ SoF::Null, SoD::Null, UF::Null, - legacy::TYPE_DELETED_SIZE, - legacy::TYPE_DELETED_SIZE, + RoF::Null, //RoF::invtype::InvTypeDeletedSize, + RoF2::Null, //RoF2::invtype::InvTypeDeletedSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, @@ -269,10 +269,10 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ UF::invtype::InvTypeCorpseSize, RoF::invtype::InvTypeCorpseSize, RoF2::invtype::InvTypeCorpseSize, - EntityLimits::npc::Null, - EntityLimits::merc::Null, - EntityLimits::bot::Null, - EntityLimits::pet::Null, + EntityLimits::npc::Null, //InvTypeCorpseSize, + EntityLimits::merc::Null, //InvTypeCorpseSize, + EntityLimits::bot::Null, //InvTypeCorpseSize, + EntityLimits::pet::Null, //InvTypeCorpseSize, Titanium::Null, SoF::Null, SoD::Null, @@ -283,22 +283,22 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ { // local[TypeBazaar] ClientUnknown::Null, Client62::Null, - legacy::TYPE_BAZAAR_SIZE, - legacy::TYPE_BAZAAR_SIZE, - legacy::TYPE_BAZAAR_SIZE, - legacy::TYPE_BAZAAR_SIZE, - legacy::TYPE_BAZAAR_SIZE, - legacy::TYPE_BAZAAR_SIZE, + legacy::TYPE_BAZAAR_SIZE, //Titanium::invtype::InvTypeBazaarSize, + legacy::TYPE_BAZAAR_SIZE, //SoF::invtype::InvTypeBazaarSize, + legacy::TYPE_BAZAAR_SIZE, //SoD::invtype::InvTypeBazaarSize, + legacy::TYPE_BAZAAR_SIZE, //UF::invtype::InvTypeBazaarSize, + legacy::TYPE_BAZAAR_SIZE, //RoF::invtype::InvTypeBazaarSize, + legacy::TYPE_BAZAAR_SIZE, //RoF2::invtype::InvTypeBazaarSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, EntityLimits::pet::Null, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - RoF::Null, - RoF2::Null + Titanium::Null, //Titanium::invtype::InvTypeBazaarSize, + SoF::Null, //SoF::invtype::InvTypeBazaarSize, + SoD::Null, //SoD::invtype::InvTypeBazaarSize, + UF::Null, //UF::invtype::InvTypeBazaarSize, + RoF::Null, //RoF::invtype::InvTypeBazaarSize, + RoF2::Null //RoF2::invtype::InvTypeBazaarSize, }, { // local[TypeInspect] ClientUnknown::Null, @@ -313,12 +313,12 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ EntityLimits::merc::Null, EntityLimits::bot::Null, EntityLimits::pet::Null, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - RoF::Null, - RoF2::Null + Titanium::invtype::InvTypeInspectSize, + SoF::invtype::InvTypeInspectSize, + SoD::invtype::InvTypeInspectSize, + UF::invtype::InvTypeInspectSize, + RoF::invtype::InvTypeInspectSize, + RoF2::invtype::InvTypeInspectSize }, { // local[TypeRealEstate] ClientUnknown::Null, @@ -327,8 +327,8 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ SoF::Null, SoD::Null, UF::Null, - legacy::TYPE_REAL_ESTATE_SIZE, - legacy::TYPE_REAL_ESTATE_SIZE, + RoF::Null, //RoF::invtype::InvTypeRealEstateSize, + RoF2::Null, //RoF2::invtype::InvTypeRealEstateSize EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, @@ -343,92 +343,92 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ { // local[TypeViewMODPC] ClientUnknown::Null, Client62::Null, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - legacy::TYPE_VIEW_MOD_PC_SIZE, - legacy::TYPE_VIEW_MOD_PC_SIZE, + Titanium::invtype::InvTypeViewMODPCSize, + SoF::invtype::InvTypeViewMODPCSize, + SoD::invtype::InvTypeViewMODPCSize, + UF::invtype::InvTypeViewMODPCSize, + RoF::invtype::InvTypeViewMODPCSize, + RoF2::invtype::InvTypeViewMODPCSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, EntityLimits::pet::Null, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - RoF::Null, - RoF2::Null + Titanium::invtype::InvTypeViewMODPCSize, + SoF::invtype::InvTypeViewMODPCSize, + SoD::invtype::InvTypeViewMODPCSize, + UF::invtype::InvTypeViewMODPCSize, + RoF::invtype::InvTypeViewMODPCSize, + RoF2::invtype::InvTypeViewMODPCSize }, { // local[TypeViewMODBank] ClientUnknown::Null, Client62::Null, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - legacy::TYPE_VIEW_MOD_BANK_SIZE, - legacy::TYPE_VIEW_MOD_BANK_SIZE, + Titanium::invtype::InvTypeViewMODBankSize, + SoF::invtype::InvTypeViewMODBankSize, + SoD::invtype::InvTypeViewMODBankSize, + UF::invtype::InvTypeViewMODBankSize, + RoF::invtype::InvTypeViewMODBankSize, + RoF2::invtype::InvTypeViewMODBankSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, EntityLimits::pet::Null, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - RoF::Null, - RoF2::Null + Titanium::invtype::InvTypeViewMODBankSize, + SoF::invtype::InvTypeViewMODBankSize, + SoD::invtype::InvTypeViewMODBankSize, + UF::invtype::InvTypeViewMODBankSize, + RoF::invtype::InvTypeViewMODBankSize, + RoF2::invtype::InvTypeViewMODBankSize }, { // local[TypeViewMODSharedBank] ClientUnknown::Null, Client62::Null, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - legacy::TYPE_VIEW_MOD_SHARED_BANK_SIZE, - legacy::TYPE_VIEW_MOD_SHARED_BANK_SIZE, + Titanium::invtype::InvTypeViewMODSharedBankSize, + SoF::invtype::InvTypeViewMODSharedBankSize, + SoD::invtype::InvTypeViewMODSharedBankSize, + UF::invtype::InvTypeViewMODSharedBankSize, + RoF::invtype::InvTypeViewMODSharedBankSize, + RoF2::invtype::InvTypeViewMODSharedBankSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, EntityLimits::pet::Null, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - RoF::Null, - RoF2::Null + Titanium::invtype::InvTypeViewMODSharedBankSize, + SoF::invtype::InvTypeViewMODSharedBankSize, + SoD::invtype::InvTypeViewMODSharedBankSize, + UF::invtype::InvTypeViewMODSharedBankSize, + RoF::invtype::InvTypeViewMODSharedBankSize, + RoF2::invtype::InvTypeViewMODSharedBankSize }, { // local[TypeViewMODLimbo] ClientUnknown::Null, Client62::Null, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - legacy::TYPE_VIEW_MOD_LIMBO_SIZE, - legacy::TYPE_VIEW_MOD_LIMBO_SIZE, + Titanium::invtype::InvTypeViewMODLimboSize, + SoF::invtype::InvTypeViewMODLimboSize, + SoD::invtype::InvTypeViewMODLimboSize, + UF::invtype::InvTypeViewMODLimboSize, + RoF::invtype::InvTypeViewMODLimboSize, + RoF2::invtype::InvTypeViewMODLimboSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, EntityLimits::pet::Null, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - RoF::Null, - RoF2::Null + Titanium::invtype::InvTypeViewMODLimboSize, + SoF::invtype::InvTypeViewMODLimboSize, + SoD::invtype::InvTypeViewMODLimboSize, + UF::invtype::InvTypeViewMODLimboSize, + RoF::invtype::InvTypeViewMODLimboSize, + RoF2::invtype::InvTypeViewMODLimboSize }, { // local[TypeAltStorage] ClientUnknown::Null, Client62::Null, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - legacy::TYPE_ALT_STORAGE_SIZE, - legacy::TYPE_ALT_STORAGE_SIZE, + Titanium::invtype::InvTypeAltStorageSize, + SoF::invtype::InvTypeAltStorageSize, + SoD::invtype::InvTypeAltStorageSize, + UF::invtype::InvTypeAltStorageSize, + RoF::invtype::InvTypeAltStorageSize, + RoF2::invtype::InvTypeAltStorageSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, @@ -443,12 +443,12 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ { // local[TypeArchived] ClientUnknown::Null, Client62::Null, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - legacy::TYPE_ARCHIVED_SIZE, - legacy::TYPE_ARCHIVED_SIZE, + Titanium::invtype::InvTypeArchivedSize, + SoF::invtype::InvTypeArchivedSize, + SoD::invtype::InvTypeArchivedSize, + UF::invtype::InvTypeArchivedSize, + RoF::invtype::InvTypeArchivedSize, + RoF2::invtype::InvTypeArchivedSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, @@ -467,8 +467,8 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ SoF::Null, SoD::Null, UF::Null, - legacy::TYPE_MAIL_SIZE, - legacy::TYPE_MAIL_SIZE, + RoF::invtype::InvTypeMailSize, + RoF2::invtype::InvTypeMailSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, @@ -487,8 +487,8 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ SoF::Null, SoD::Null, UF::Null, - legacy::TYPE_GUILD_TROPHY_TRIBUTE_SIZE, - legacy::TYPE_GUILD_TROPHY_TRIBUTE_SIZE, + RoF::invtype::InvTypeGuildTrophyTributeSize, + RoF2::invtype::InvTypeGuildTrophyTributeSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, @@ -507,8 +507,8 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ SoF::Null, SoD::Null, UF::Null, - legacy::TYPE_KRONO_SIZE, - legacy::TYPE_KRONO_SIZE, + RoF::Null, + RoF2::invtype::InvTypeKronoSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, @@ -523,12 +523,12 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ { // local[TypeOther] ClientUnknown::Null, Client62::Null, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - legacy::TYPE_OTHER_SIZE, - legacy::TYPE_OTHER_SIZE, + Titanium::invtype::InvTypeOtherSize, + SoF::invtype::InvTypeOtherSize, + SoD::invtype::InvTypeOtherSize, + UF::invtype::InvTypeOtherSize, + RoF::invtype::InvTypeOtherSize, + RoF2::invtype::InvTypeOtherSize, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, @@ -542,23 +542,23 @@ uint16 EQEmu::inventory::InventoryTypeSize(versions::InventoryVersion inventory_ } }; - if ((uint16)inv_type < legacy::TypeCount) - return local[inv_type][static_cast(versions::ValidateInventoryVersion(inventory_version))]; + if (inv_type < 0 || inv_type >= legacy::TypeCount) + return 0; - return NOT_USED; + return local[inv_type][static_cast(versions::ValidateInventoryVersion(inventory_version))]; } -uint64 EQEmu::inventory::PossessionsBitmask(versions::InventoryVersion inventory_version) +uint64 EQEmu::inventory::GetPossessionsBitmask(versions::InventoryVersion inventory_version) { static const uint64 local[versions::InventoryVersionCount] = { ClientUnknown::Null, Client62::Null, - 0x000000027FDFFFFF, - 0x000000027FFFFFFF, - 0x000000027FFFFFFF, - 0x000000027FFFFFFF, - 0x00000003FFFFFFFF, - 0x00000003FFFFFFFF, + Titanium::Null, //0x000000027FDFFFFF, + SoF::Null, //0x000000027FFFFFFF, + SoD::Null, //0x000000027FFFFFFF, + UF::Null, //0x000000027FFFFFFF, + RoF::Null, //0x00000003FFFFFFFF, + RoF2::Null, //0x00000003FFFFFFFF, EntityLimits::npc::Null, EntityLimits::merc::Null, EntityLimits::bot::Null, @@ -571,48 +571,20 @@ uint64 EQEmu::inventory::PossessionsBitmask(versions::InventoryVersion inventory RoF2::Null }; - return NOT_USED; - //return local[static_cast(versions::ValidateInventoryVersion(inventory_version))]; + return local[static_cast(versions::ValidateInventoryVersion(inventory_version))]; } -bool EQEmu::inventory::AllowEmptyBagInBag(versions::InventoryVersion inventory_version) +bool EQEmu::inventory::GetAllowEmptyBagInBag(versions::InventoryVersion inventory_version) { static const bool local[versions::InventoryVersionCount] = { ClientUnknown::False, Client62::False, - Titanium::behavior::AllowEmptyBagInBag, - SoF::behavior::AllowEmptyBagInBag, - SoD::behavior::AllowEmptyBagInBag, - UF::behavior::AllowEmptyBagInBag, - RoF::behavior::AllowEmptyBagInBag, - RoF2::behavior::AllowEmptyBagInBag, - EntityLimits::npc::False, - EntityLimits::merc::False, - EntityLimits::bot::False, - EntityLimits::pet::False, - Titanium::False, - SoF::False, - SoD::False, - UF::False, - RoF::False, - RoF2::False - }; - - return false; - //return local[static_cast(versions::ValidateInventoryVersion(inventory_version))]; -} - -bool EQEmu::inventory::AllowClickCastFromBag(versions::InventoryVersion inventory_version) -{ - static const bool local[versions::InventoryVersionCount] = { - ClientUnknown::False, - Client62::False, - Titanium::behavior::AllowClickCastFromBag, - SoF::behavior::AllowClickCastFromBag, - SoD::behavior::AllowClickCastFromBag, - UF::behavior::AllowClickCastFromBag, - RoF::behavior::AllowClickCastFromBag, - RoF2::behavior::AllowClickCastFromBag, + Titanium::inventory::AllowEmptyBagInBag, + SoF::inventory::AllowEmptyBagInBag, + SoD::inventory::AllowEmptyBagInBag, + UF::inventory::AllowEmptyBagInBag, + RoF::False, //RoF::inventory::AllowEmptyBagInBag, + RoF2::False, //RoF2::inventory::AllowEmptyBagInBag, EntityLimits::npc::False, EntityLimits::merc::False, EntityLimits::bot::False, @@ -628,21 +600,99 @@ bool EQEmu::inventory::AllowClickCastFromBag(versions::InventoryVersion inventor return local[static_cast(versions::ValidateInventoryVersion(inventory_version))]; } -uint16 EQEmu::inventory::ItemAugSize(versions::InventoryVersion inventory_version) +bool EQEmu::inventory::GetAllowClickCastFromBag(versions::InventoryVersion inventory_version) { - static const uint16 local[versions::InventoryVersionCount] = { + static const bool local[versions::InventoryVersionCount] = { + ClientUnknown::False, + Client62::False, + Titanium::inventory::AllowClickCastFromBag, + SoF::inventory::AllowClickCastFromBag, + SoD::inventory::AllowClickCastFromBag, + UF::inventory::AllowClickCastFromBag, + RoF::inventory::AllowClickCastFromBag, + RoF2::inventory::AllowClickCastFromBag, + EntityLimits::npc::False, + EntityLimits::merc::False, + EntityLimits::bot::False, + EntityLimits::pet::False, + Titanium::False, + SoF::False, + SoD::False, + UF::False, + RoF::False, + RoF2::False + }; + + return local[static_cast(versions::ValidateInventoryVersion(inventory_version))]; +} + +bool EQEmu::inventory::GetConcatenateInvTypeLimbo(versions::InventoryVersion inventory_version) +{ + static const bool local[versions::InventoryVersionCount] = { + ClientUnknown::False, + Client62::False, + Titanium::inventory::ConcatenateInvTypeLimbo, + SoF::inventory::ConcatenateInvTypeLimbo, + SoD::inventory::ConcatenateInvTypeLimbo, + UF::inventory::ConcatenateInvTypeLimbo, + RoF::inventory::ConcatenateInvTypeLimbo, + RoF2::inventory::ConcatenateInvTypeLimbo, + EntityLimits::npc::False, + EntityLimits::merc::False, + EntityLimits::bot::False, + EntityLimits::pet::False, + Titanium::False, + SoF::False, + SoD::False, + UF::False, + RoF::False, + RoF2::False + }; + + return local[static_cast(versions::ValidateInventoryVersion(inventory_version))]; +} + +bool EQEmu::inventory::GetAllowOverLevelEquipment(versions::InventoryVersion inventory_version) +{ + static const bool local[versions::InventoryVersionCount] = { + ClientUnknown::False, + Client62::False, + Titanium::inventory::AllowOverLevelEquipment, + SoF::inventory::AllowOverLevelEquipment, + SoD::inventory::AllowOverLevelEquipment, + UF::inventory::AllowOverLevelEquipment, + RoF::inventory::AllowOverLevelEquipment, + RoF2::inventory::AllowOverLevelEquipment, + EntityLimits::npc::False, + EntityLimits::merc::False, + EntityLimits::bot::False, + EntityLimits::pet::False, + Titanium::False, + SoF::False, + SoD::False, + UF::False, + RoF::False, + RoF2::False + }; + + return local[static_cast(versions::ValidateInventoryVersion(inventory_version))]; +} + +size_t EQEmu::inventory::GetItemAugSize(versions::InventoryVersion inventory_version) +{ + static const size_t local[versions::InventoryVersionCount] = { ClientUnknown::Null, Client62::Null, - legacy::ITEM_COMMON_SIZE, - legacy::ITEM_COMMON_SIZE, - legacy::ITEM_COMMON_SIZE, - legacy::ITEM_COMMON_SIZE, - legacy::ITEM_COMMON_SIZE, - legacy::ITEM_COMMON_SIZE, - legacy::ITEM_COMMON_SIZE, - legacy::ITEM_COMMON_SIZE, - legacy::ITEM_COMMON_SIZE, - legacy::ITEM_COMMON_SIZE, + legacy::ITEM_COMMON_SIZE, //Titanium::invaug::ItemAugSize, + legacy::ITEM_COMMON_SIZE, //SoF::invaug::ItemAugSize, + legacy::ITEM_COMMON_SIZE, //SoD::invaug::ItemAugSize, + legacy::ITEM_COMMON_SIZE, //UF::invaug::ItemAugSize, + legacy::ITEM_COMMON_SIZE, //RoF::invaug::ItemAugSize, + legacy::ITEM_COMMON_SIZE, //RoF2::invaug::ItemAugSize, + legacy::ITEM_COMMON_SIZE, //ItemAugSize, + legacy::ITEM_COMMON_SIZE, //ItemAugSize, + legacy::ITEM_COMMON_SIZE, //ItemAugSize, + legacy::ITEM_COMMON_SIZE, //ItemAugSize, Titanium::Null, SoF::Null, SoD::Null, @@ -654,33 +704,33 @@ uint16 EQEmu::inventory::ItemAugSize(versions::InventoryVersion inventory_versio return local[static_cast(versions::ValidateInventoryVersion(inventory_version))]; } -uint16 EQEmu::inventory::ItemBagSize(versions::InventoryVersion inventory_version) +size_t EQEmu::inventory::GetItemBagSize(versions::InventoryVersion inventory_version) { - static const uint16 local[versions::InventoryVersionCount] = { + static const size_t local[versions::InventoryVersionCount] = { ClientUnknown::Null, Client62::Null, - legacy::ITEM_CONTAINER_SIZE, - legacy::ITEM_CONTAINER_SIZE, - legacy::ITEM_CONTAINER_SIZE, - legacy::ITEM_CONTAINER_SIZE, - legacy::ITEM_CONTAINER_SIZE, - legacy::ITEM_CONTAINER_SIZE, - legacy::ITEM_CONTAINER_SIZE, - legacy::ITEM_CONTAINER_SIZE, - legacy::ITEM_CONTAINER_SIZE, - legacy::ITEM_CONTAINER_SIZE, - Titanium::Null, - SoF::Null, - SoD::Null, - UF::Null, - RoF::Null, - RoF2::Null + legacy::ITEM_CONTAINER_SIZE, //Titanium::invbag::ItemBagSize, + legacy::ITEM_CONTAINER_SIZE, //SoF::invbag::ItemBagSize, + legacy::ITEM_CONTAINER_SIZE, //SoD::invbag::ItemBagSize, + legacy::ITEM_CONTAINER_SIZE, //UF::invbag::ItemBagSize, + legacy::ITEM_CONTAINER_SIZE, //RoF::invbag::ItemBagSize, + legacy::ITEM_CONTAINER_SIZE, //RoF2::invbag::ItemBagSize, + legacy::ITEM_CONTAINER_SIZE, //ItemBagSize, + legacy::ITEM_CONTAINER_SIZE, //ItemBagSize, + legacy::ITEM_CONTAINER_SIZE, //ItemBagSize, + legacy::ITEM_CONTAINER_SIZE, //ItemBagSize, + legacy::ITEM_CONTAINER_SIZE, //Titanium::Null, + legacy::ITEM_CONTAINER_SIZE, //SoF::Null, + legacy::ITEM_CONTAINER_SIZE, //SoD::Null, + legacy::ITEM_CONTAINER_SIZE, //UF::Null, + legacy::ITEM_CONTAINER_SIZE, //RoF::Null, + legacy::ITEM_CONTAINER_SIZE, //RoF2::Null }; return local[static_cast(versions::ValidateInventoryVersion(inventory_version))]; } -bool EQEmu::profile::CoinHasWeight(versions::InventoryVersion inventory_version) +bool EQEmu::behavior::GetCoinHasWeight(versions::InventoryVersion inventory_version) { static const bool local[versions::InventoryVersionCount] = { ClientUnknown::True, @@ -691,10 +741,10 @@ bool EQEmu::profile::CoinHasWeight(versions::InventoryVersion inventory_version) UF::behavior::CoinHasWeight, RoF::behavior::CoinHasWeight, RoF::behavior::CoinHasWeight, - EntityLimits::npc::True, - EntityLimits::merc::True, - EntityLimits::bot::True, - EntityLimits::pet::True, + EntityLimits::npc::True, //CoinHasWeight, + EntityLimits::merc::True, //CoinHasWeight, + EntityLimits::bot::True, //CoinHasWeight, + EntityLimits::pet::True, //CoinHasWeight, Titanium::False, SoF::False, SoD::False, diff --git a/common/eq_limits.h b/common/eq_limits.h index a1168d348..d843474ec 100644 --- a/common/eq_limits.h +++ b/common/eq_limits.h @@ -1,4 +1,4 @@ -/* EQEMu: Everquest Server Emulator +/* EQEMu: Everquest Server Emulator Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net) @@ -10,7 +10,7 @@ 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. + 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 @@ -34,30 +34,30 @@ namespace EQEmu { namespace constants { - extern size_t CharacterCreationLimit(versions::ClientVersion client_version); + extern size_t GetCharacterCreationLimit(versions::ClientVersion client_version); } /*constants*/ namespace inventory { - extern uint16 InventoryTypeSize(versions::InventoryVersion inventory_version, int16 inv_type); - extern uint64 PossessionsBitmask(versions::InventoryVersion inventory_version); + extern size_t GetInventoryTypeSize(versions::InventoryVersion inventory_version, int inv_type); + extern uint64 GetPossessionsBitmask(versions::InventoryVersion inventory_version); - extern bool AllowEmptyBagInBag(versions::InventoryVersion inventory_version); - extern bool AllowClickCastFromBag(versions::InventoryVersion inventory_version); + extern bool GetAllowEmptyBagInBag(versions::InventoryVersion inventory_version); + extern bool GetAllowClickCastFromBag(versions::InventoryVersion inventory_version); - extern uint16 ItemAugSize(versions::InventoryVersion inventory_version); - extern uint16 ItemBagSize(versions::InventoryVersion inventory_version); + extern bool GetConcatenateInvTypeLimbo(versions::InventoryVersion inventory_version); - extern bool ConcatenateInvTypeLimbo(versions::InventoryVersion inventory_version); + extern bool GetAllowOverLevelEquipment(versions::InventoryVersion inventory_version); - extern bool AllowOverLevelEquipment(versions::InventoryVersion inventory_version); + extern size_t GetItemAugSize(versions::InventoryVersion inventory_version); + extern size_t GetItemBagSize(versions::InventoryVersion inventory_version); } /*inventory*/ - namespace profile { - extern bool CoinHasWeight(versions::InventoryVersion inventory_version); + namespace behavior { + extern bool GetCoinHasWeight(versions::InventoryVersion inventory_version); - } /*profile*/ + } /*behavior*/ } /*EQEmu*/ diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index c4fce9d8c..e94264b34 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -1542,7 +1542,7 @@ enum ItemPacketType // ItemPacketTributeItem = /*108*/ 0x6C, // ItemPacketGuildTribute = /*109*/ 0x6D, // missing from EQEmu // ItemPacket10 = /*110*/ 0x6E, -// ItemPacket11 = /*111*/ 0x6F, // UF+ (equipment slots only) (RoF+ checks '(WORD*)slot + 4 != -1' [(WORD*)]slot + 2 would be bag index - if used) (guess) +// ItemPacket11 = /*111*/ 0x6F, // UF+ (equipment slots only) (RoF+ checks '(WORD*)slot + 4 != -1' [(WORD*)]slot + 2 would be bag index - if used) (guess) (appearance (over-level) items?) // ItemPacket12 = /*112*/ 0x70, // RoF+ (causes stat update) (could be TrophyTribute and GuildTrophyTribute together - two case methodology - is it checking for GuildID?) // ItemPacketMerchantRecovery = /*113*/ 0x71, // ItemPacket14 = /*115*/ 0x73, (real estate/moving crate?) diff --git a/common/item.cpp b/common/item.cpp index 6e40ac6bc..7437c9339 100644 --- a/common/item.cpp +++ b/common/item.cpp @@ -929,7 +929,7 @@ bool Inventory::SupportsClickCasting(int16 slot_id) } else if (slot_id >= EQEmu::legacy::GENERAL_BAGS_BEGIN && slot_id <= EQEmu::legacy::GENERAL_BAGS_END) { - if (EQEmu::inventory::AllowClickCastFromBag(m_inventory_version)) + if (EQEmu::inventory::GetAllowClickCastFromBag(m_inventory_version)) return true; } diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index 2c185e1d1..edad92dfb 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -5641,11 +5641,11 @@ namespace RoF { structs::InventorySlot_Struct RoFSlot; RoFSlot.Type = INVALID_INDEX; - RoFSlot.Unknown02 = NOT_USED; + RoFSlot.Unknown02 = 0; RoFSlot.Slot = INVALID_INDEX; RoFSlot.SubIndex = INVALID_INDEX; RoFSlot.AugIndex = INVALID_INDEX; - RoFSlot.Unknown01 = NOT_USED; + RoFSlot.Unknown01 = 0; uint32 TempSlot = 0; @@ -5746,7 +5746,7 @@ namespace RoF RoFSlot.Slot = INVALID_INDEX; RoFSlot.SubIndex = INVALID_INDEX; RoFSlot.AugIndex = INVALID_INDEX; - RoFSlot.Unknown01 = NOT_USED; + RoFSlot.Unknown01 = 0; uint32 TempSlot = 0; diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index c44caba92..75329b8bb 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -5926,11 +5926,11 @@ namespace RoF2 { structs::InventorySlot_Struct RoF2Slot; RoF2Slot.Type = INVALID_INDEX; - RoF2Slot.Unknown02 = NOT_USED; + RoF2Slot.Unknown02 = 0; RoF2Slot.Slot = INVALID_INDEX; RoF2Slot.SubIndex = INVALID_INDEX; RoF2Slot.AugIndex = INVALID_INDEX; - RoF2Slot.Unknown01 = NOT_USED; + RoF2Slot.Unknown01 = 0; uint32 TempSlot = 0; @@ -6039,7 +6039,7 @@ namespace RoF2 RoF2Slot.Slot = INVALID_INDEX; RoF2Slot.SubIndex = INVALID_INDEX; RoF2Slot.AugIndex = INVALID_INDEX; - RoF2Slot.Unknown01 = NOT_USED; + RoF2Slot.Unknown01 = 0; uint32 TempSlot = 0; diff --git a/common/patches/rof2_limits.cpp b/common/patches/rof2_limits.cpp index 05ece56ca..c515e2512 100644 --- a/common/patches/rof2_limits.cpp +++ b/common/patches/rof2_limits.cpp @@ -10,7 +10,7 @@ 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. + 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 @@ -22,7 +22,7 @@ #include "../string_util.h" -size_t RoF2::invtype::InvTypeSize(int inv_type) +size_t RoF2::invtype::GetInvTypeSize(int inv_type) { switch (inv_type) { case invtype::InvTypePossessions: @@ -80,7 +80,7 @@ size_t RoF2::invtype::InvTypeSize(int inv_type) } } -const char* RoF2::invtype::InvTypeName(int inv_type) +const char* RoF2::invtype::GetInvTypeName(int inv_type) { switch (inv_type) { case invtype::InvTypeInvalid: @@ -140,7 +140,7 @@ const char* RoF2::invtype::InvTypeName(int inv_type) } } -const char* RoF2::invslot::InvPossessionsSlotName(int inv_slot) +const char* RoF2::invslot::GetInvPossessionsSlotName(int inv_slot) { switch (inv_slot) { case invslot::InvSlotInvalid: @@ -218,12 +218,12 @@ const char* RoF2::invslot::InvPossessionsSlotName(int inv_slot) } } -const char* RoF2::invslot::InvSlotName(int inv_type, int inv_slot) +const char* RoF2::invslot::GetInvSlotName(int inv_type, int inv_slot) { if (inv_type == invtype::InvTypePossessions) - return invslot::InvPossessionsSlotName(inv_slot); + return invslot::GetInvPossessionsSlotName(inv_slot); - size_t type_size = invtype::InvTypeSize(inv_type); + size_t type_size = invtype::GetInvTypeSize(inv_type); if (!type_size || inv_slot == invslot::InvSlotInvalid) return "Invalid Slot"; @@ -237,7 +237,7 @@ const char* RoF2::invslot::InvSlotName(int inv_type, int inv_slot) return ret_str.c_str(); } -const char* RoF2::invbag::InvBagIndexName(int bag_index) +const char* RoF2::invbag::GetInvBagIndexName(int bag_index) { if (bag_index == invbag::InvBagInvalid) return "Invalid Bag"; @@ -251,7 +251,7 @@ const char* RoF2::invbag::InvBagIndexName(int bag_index) return ret_str.c_str(); } -const char* RoF2::invaug::InvAugIndexName(int aug_index) +const char* RoF2::invaug::GetInvAugIndexName(int aug_index) { if (aug_index == invaug::InvAugInvalid) return "Invalid Augment"; diff --git a/common/patches/rof2_limits.h b/common/patches/rof2_limits.h index 79218f67f..2320c1393 100644 --- a/common/patches/rof2_limits.h +++ b/common/patches/rof2_limits.h @@ -10,7 +10,7 @@ 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. + 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 @@ -32,8 +32,13 @@ namespace RoF2 enum : bool { False = false, True = true }; // pre-declarations + namespace inventory { + inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::RoF2; } + + } /*inventory*/ + namespace invtype { - inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::RoF2; } + inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::RoF2; } enum : int { InvTypeInvalid = -1, InvTypeBegin }; @@ -69,7 +74,7 @@ namespace RoF2 } /*invtype*/ namespace invslot { - inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::RoF2; } + inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::RoF2; } enum : int { InvSlotInvalid = -1, InvSlotBegin }; @@ -122,21 +127,21 @@ namespace RoF2 } /*invslot*/ namespace invbag { - inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::RoF2; } + inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::RoF2; } enum : int { InvBagInvalid = -1, InvBagBegin }; } /*invbag*/ namespace invaug { - inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::RoF2; } + inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::RoF2; } enum : int { InvAugInvalid = -1, InvAugBegin }; } /*invaug*/ namespace item { - inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::RoF2; } + inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::RoF2; } //enum Unknown : int { // looks like item class..but, RoF has it too - nothing in UF- // Unknown1 = 0, @@ -165,27 +170,37 @@ namespace RoF2 } /*item*/ namespace profile { - inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::RoF2; } + inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::RoF2; } } /*profile*/ namespace constants { - inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::RoF2; } + inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::RoF2; } } /*constants*/ namespace behavior { - inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::RoF2; } + inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::RoF2; } } /*behavior*/ namespace skills { - inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::RoF2; } + inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF2; } } /*skills*/ // declarations + namespace inventory { + const bool ConcatenateInvTypeLimbo = false; + + const bool AllowOverLevelEquipment = true; + + const bool AllowEmptyBagInBag = true; + const bool AllowClickCastFromBag = true; + + } /*inventory*/ + namespace invtype { const size_t InvTypePossessionsSize = invslot::PossessionsCount; const size_t InvTypeBankSize = 24; @@ -215,28 +230,28 @@ namespace RoF2 const size_t NPCTradeSize = 4; - extern size_t InvTypeSize(int inv_type); - extern const char* InvTypeName(int inv_type); + extern size_t GetInvTypeSize(int inv_type); + extern const char* GetInvTypeName(int inv_type); } /*invtype*/ namespace invslot { - extern const char* InvPossessionsSlotName(int inv_slot); - extern const char* InvSlotName(int inv_type, int inv_slot); + extern const char* GetInvPossessionsSlotName(int inv_slot); + extern const char* GetInvSlotName(int inv_type, int inv_slot); } /*invslot*/ namespace invbag { const size_t ItemBagSize = 255; // server Size will be 255..unsure what actual client is (test) - extern const char* InvBagIndexName(int bag_index); + extern const char* GetInvBagIndexName(int bag_index); } /*invbag*/ namespace invaug { const size_t ItemAugSize = 6; - extern const char* InvAugIndexName(int aug_index); + extern const char* GetInvAugIndexName(int aug_index); } /*invaug*/ @@ -264,13 +279,6 @@ namespace RoF2 } /*constants*/ namespace behavior { - const bool ConcatenateInvTypeLimbo = false; - - const bool AllowOverLevelEquipment = true; - - const bool AllowEmptyBagInBag = true; - const bool AllowClickCastFromBag = true; - const bool CoinHasWeight = false; } /*behavior*/ diff --git a/common/patches/rof_limits.cpp b/common/patches/rof_limits.cpp index 94ed6039f..48639d52c 100644 --- a/common/patches/rof_limits.cpp +++ b/common/patches/rof_limits.cpp @@ -10,7 +10,7 @@ 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. + 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 @@ -22,7 +22,7 @@ #include "../string_util.h" -size_t RoF::invtype::InvTypeSize(int inv_type) +size_t RoF::invtype::GetInvTypeSize(int inv_type) { switch (inv_type) { case invtype::InvTypePossessions: @@ -78,7 +78,7 @@ size_t RoF::invtype::InvTypeSize(int inv_type) } } -const char* RoF::invtype::InvTypeName(int inv_type) +const char* RoF::invtype::GetInvTypeName(int inv_type) { switch (inv_type) { case invtype::InvTypeInvalid: @@ -136,7 +136,7 @@ const char* RoF::invtype::InvTypeName(int inv_type) } } -const char* RoF::invslot::InvPossessionsSlotName(int inv_slot) +const char* RoF::invslot::GetInvPossessionsSlotName(int inv_slot) { switch (inv_slot) { case invslot::InvSlotInvalid: @@ -214,12 +214,12 @@ const char* RoF::invslot::InvPossessionsSlotName(int inv_slot) } } -const char* RoF::invslot::InvSlotName(int inv_type, int inv_slot) +const char* RoF::invslot::GetInvSlotName(int inv_type, int inv_slot) { if (inv_type == invtype::InvTypePossessions) - return invslot::InvPossessionsSlotName(inv_slot); + return invslot::GetInvPossessionsSlotName(inv_slot); - size_t type_size = invtype::InvTypeSize(inv_type); + size_t type_size = invtype::GetInvTypeSize(inv_type); if (!type_size || inv_slot == invslot::InvSlotInvalid) return "Invalid Slot"; @@ -233,7 +233,7 @@ const char* RoF::invslot::InvSlotName(int inv_type, int inv_slot) return ret_str.c_str(); } -const char* RoF::invbag::InvBagIndexName(int bag_index) +const char* RoF::invbag::GetInvBagIndexName(int bag_index) { if (bag_index == invbag::InvBagInvalid) return "Invalid Bag"; @@ -247,7 +247,7 @@ const char* RoF::invbag::InvBagIndexName(int bag_index) return ret_str.c_str(); } -const char* RoF::invaug::InvAugIndexName(int aug_index) +const char* RoF::invaug::GetInvAugIndexName(int aug_index) { if (aug_index == invaug::InvAugInvalid) return "Invalid Augment"; diff --git a/common/patches/rof_limits.h b/common/patches/rof_limits.h index 5275bfaad..94e55a47a 100644 --- a/common/patches/rof_limits.h +++ b/common/patches/rof_limits.h @@ -10,7 +10,7 @@ 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. + 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 @@ -32,8 +32,13 @@ namespace RoF enum : bool { False = false, True = true }; // pre-declarations + namespace inventory { + inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::RoF; } + + } /*inventory*/ + namespace invtype { - inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::RoF; } + inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::RoF; } enum : int { InvTypeInvalid = -1, InvTypeBegin }; @@ -68,7 +73,7 @@ namespace RoF } /*invtype*/ namespace invslot { - inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::RoF; } + inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::RoF; } enum : int { InvSlotInvalid = -1, InvSlotBegin }; @@ -121,21 +126,21 @@ namespace RoF } /*invslot*/ namespace invbag { - inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::RoF; } + inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::RoF; } enum : int { InvBagInvalid = -1, InvBagBegin }; } /*invbag*/ namespace invaug { - inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::RoF; } + inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::RoF; } enum : int { InvAugInvalid = -1, InvAugBegin }; } /*invaug*/ namespace item { - inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::RoF; } + inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::RoF; } enum ItemPacketType : int { ItemPacketMerchant = 100, @@ -157,27 +162,37 @@ namespace RoF } /*item*/ namespace profile { - inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::RoF; } + inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::RoF; } } /*profile*/ namespace constants { - inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::RoF; } + inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::RoF; } } /*constants*/ namespace behavior { - inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::RoF; } + inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::RoF; } } /*behavior*/ namespace skills { - inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::RoF; } + inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF; } } /*skills*/ // declarations + namespace inventory { + const bool ConcatenateInvTypeLimbo = false; + + const bool AllowOverLevelEquipment = true; + + const bool AllowEmptyBagInBag = true; + const bool AllowClickCastFromBag = true; + + } /*inventory*/ + namespace invtype { const size_t InvTypePossessionsSize = invslot::PossessionsCount; const size_t InvTypeBankSize = 24; @@ -206,28 +221,28 @@ namespace RoF const size_t NPCTradeSize = 4; - extern size_t InvTypeSize(int inv_type); - extern const char* InvTypeName(int inv_type); + extern size_t GetInvTypeSize(int inv_type); + extern const char* GetInvTypeName(int inv_type); } /*invtype*/ namespace invslot { - extern const char* InvPossessionsSlotName(int inv_slot); - extern const char* InvSlotName(int inv_type, int inv_slot); + extern const char* GetInvPossessionsSlotName(int inv_slot); + extern const char* GetInvSlotName(int inv_type, int inv_slot); } /*invslot*/ namespace invbag { const size_t ItemBagSize = 255; // server Size will be 255..unsure what actual client is (test) - extern const char* InvBagIndexName(int bag_index); + extern const char* GetInvBagIndexName(int bag_index); } /*invbag*/ namespace invaug { const size_t ItemAugSize = 6; - extern const char* InvAugIndexName(int aug_index); + extern const char* GetInvAugIndexName(int aug_index); } /*invaug*/ @@ -255,13 +270,6 @@ namespace RoF } /*constants*/ namespace behavior { - const bool ConcatenateInvTypeLimbo = false; - - const bool AllowOverLevelEquipment = true; - - const bool AllowEmptyBagInBag = true; - const bool AllowClickCastFromBag = true; - const bool CoinHasWeight = false; } /*behavior*/ diff --git a/common/patches/sod_limits.cpp b/common/patches/sod_limits.cpp index de1abba02..7991801e3 100644 --- a/common/patches/sod_limits.cpp +++ b/common/patches/sod_limits.cpp @@ -10,7 +10,7 @@ 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. + 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 @@ -22,7 +22,7 @@ #include "../string_util.h" -size_t SoD::invtype::InvTypeSize(int inv_type) +size_t SoD::invtype::GetInvTypeSize(int inv_type) { switch (inv_type) { case invtype::InvTypePossessions: @@ -68,7 +68,7 @@ size_t SoD::invtype::InvTypeSize(int inv_type) } } -const char* SoD::invtype::InvTypeName(int inv_type) +const char* SoD::invtype::GetInvTypeName(int inv_type) { switch (inv_type) { case invtype::InvTypeInvalid: @@ -116,7 +116,7 @@ const char* SoD::invtype::InvTypeName(int inv_type) } } -const char* SoD::invslot::InvPossessionsSlotName(int inv_slot) +const char* SoD::invslot::GetInvPossessionsSlotName(int inv_slot) { switch (inv_slot) { case invslot::InvSlotInvalid: @@ -190,9 +190,9 @@ const char* SoD::invslot::InvPossessionsSlotName(int inv_slot) } } -const char* SoD::invslot::InvCorpseSlotName(int inv_slot) +const char* SoD::invslot::GetInvCorpseSlotName(int inv_slot) { - if (!invtype::InvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid) + if (!invtype::GetInvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid) return "Invalid Slot"; // needs work @@ -205,14 +205,14 @@ const char* SoD::invslot::InvCorpseSlotName(int inv_slot) return ret_str.c_str(); } -const char* SoD::invslot::InvSlotName(int inv_type, int inv_slot) +const char* SoD::invslot::GetInvSlotName(int inv_type, int inv_slot) { if (inv_type == invtype::InvTypePossessions) - return invslot::InvPossessionsSlotName(inv_slot); + return invslot::GetInvPossessionsSlotName(inv_slot); else if (inv_type == invtype::InvTypeCorpse) - return invslot::InvCorpseSlotName(inv_slot); + return invslot::GetInvCorpseSlotName(inv_slot); - size_t type_size = invtype::InvTypeSize(inv_type); + size_t type_size = invtype::GetInvTypeSize(inv_type); if (!type_size || inv_slot == invslot::InvSlotInvalid) return "Invalid Slot"; @@ -226,7 +226,7 @@ const char* SoD::invslot::InvSlotName(int inv_type, int inv_slot) return ret_str.c_str(); } -const char* SoD::invbag::InvBagIndexName(int bag_index) +const char* SoD::invbag::GetInvBagIndexName(int bag_index) { if (bag_index == invbag::InvBagInvalid) return "Invalid Bag"; @@ -240,7 +240,7 @@ const char* SoD::invbag::InvBagIndexName(int bag_index) return ret_str.c_str(); } -const char* SoD::invaug::InvAugIndexName(int aug_index) +const char* SoD::invaug::GetInvAugIndexName(int aug_index) { if (aug_index == invaug::InvAugInvalid) return "Invalid Augment"; diff --git a/common/patches/sod_limits.h b/common/patches/sod_limits.h index e50790793..48d56cfab 100644 --- a/common/patches/sod_limits.h +++ b/common/patches/sod_limits.h @@ -10,7 +10,7 @@ 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. + 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 @@ -32,8 +32,13 @@ namespace SoD enum : bool { False = false, True = true }; // pre-declarations + namespace inventory { + inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::SoD; } + + } /*inventory*/ + namespace invtype { - inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::SoD; } + inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::SoD; } enum : int { InvTypeInvalid = -1, InvTypeBegin }; @@ -63,7 +68,7 @@ namespace SoD } /*invtype*/ namespace invslot { - inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::SoD; } + inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::SoD; } enum : int { InvSlotInvalid = -1, InvSlotBegin }; @@ -114,21 +119,21 @@ namespace SoD } /*invslot*/ namespace invbag { - inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::SoD; } + inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::SoD; } enum : int { InvBagInvalid = -1, InvBagBegin }; } /*invbag*/ namespace invaug { - inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::SoD; } + inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::SoD; } enum : int { InvAugInvalid = -1, InvAugBegin }; } /*invaug*/ namespace item { - inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::SoD; } + inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::SoD; } enum ItemPacketType : int { ItemPacketMerchant = 100, @@ -146,27 +151,37 @@ namespace SoD } /*item*/ namespace profile { - inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::SoD; } + inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::SoD; } } /*profile*/ namespace constants { - inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::SoD; } + inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::SoD; } } /*constants*/ namespace behavior { - inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::SoD; } + inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::SoD; } } /*behavior*/ namespace skills { - inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::SoD; } + inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoD; } } /*skills*/ // declarations + namespace inventory { + const bool ConcatenateInvTypeLimbo = true; + + const bool AllowOverLevelEquipment = false; + + const bool AllowEmptyBagInBag = false; + const bool AllowClickCastFromBag = false; + + } /*inventory*/ + namespace invtype { const size_t InvTypePossessionsSize = invslot::PossessionsCount; const size_t InvTypeBankSize = 24; @@ -190,8 +205,8 @@ namespace SoD const size_t NPCTradeSize = 4; - extern size_t InvTypeSize(int inv_type); - extern const char* InvTypeName(int inv_type); + extern size_t GetInvTypeSize(int inv_type); + extern const char* GetInvTypeName(int inv_type); } /*invtype*/ @@ -218,9 +233,9 @@ namespace SoD const int CorpseBegin = invslot::PossessionsGeneral1; const int CorpseEnd = invslot::PossessionsGeneral1 + invslot::PossessionsCursor; - extern const char* InvPossessionsSlotName(int inv_slot); - extern const char* InvCorpseSlotName(int inv_slot); - extern const char* InvSlotName(int inv_type, int inv_slot); + extern const char* GetInvPossessionsSlotName(int inv_slot); + extern const char* GetInvCorpseSlotName(int inv_slot); + extern const char* GetInvSlotName(int inv_type, int inv_slot); } /*invslot*/ @@ -247,14 +262,14 @@ namespace SoD const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize; const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1; - extern const char* InvBagIndexName(int bag_index); + extern const char* GetInvBagIndexName(int bag_index); } /*invbag*/ namespace invaug { const size_t ItemAugSize = 5; - extern const char* InvAugIndexName(int aug_index); + extern const char* GetInvAugIndexName(int aug_index); } /*invaug*/ @@ -282,13 +297,6 @@ namespace SoD } /*constants*/ namespace behavior { - const bool ConcatenateInvTypeLimbo = true; - - const bool AllowOverLevelEquipment = false; - - const bool AllowEmptyBagInBag = false; - const bool AllowClickCastFromBag = false; - const bool CoinHasWeight = false; } /*behavior*/ diff --git a/common/patches/sof_limits.cpp b/common/patches/sof_limits.cpp index 2e81eef1d..7b7cc408b 100644 --- a/common/patches/sof_limits.cpp +++ b/common/patches/sof_limits.cpp @@ -10,7 +10,7 @@ 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. + 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 @@ -22,7 +22,7 @@ #include "../string_util.h" -size_t SoF::invtype::InvTypeSize(int inv_type) +size_t SoF::invtype::GetInvTypeSize(int inv_type) { switch (inv_type) { case invtype::InvTypePossessions: @@ -68,7 +68,7 @@ size_t SoF::invtype::InvTypeSize(int inv_type) } } -const char* SoF::invtype::InvTypeName(int inv_type) +const char* SoF::invtype::GetInvTypeName(int inv_type) { switch (inv_type) { case invtype::InvTypeInvalid: @@ -116,7 +116,7 @@ const char* SoF::invtype::InvTypeName(int inv_type) } } -const char* SoF::invslot::InvPossessionsSlotName(int inv_slot) +const char* SoF::invslot::GetInvPossessionsSlotName(int inv_slot) { switch (inv_slot) { case invslot::InvSlotInvalid: @@ -190,9 +190,9 @@ const char* SoF::invslot::InvPossessionsSlotName(int inv_slot) } } -const char* SoF::invslot::InvCorpseSlotName(int inv_slot) +const char* SoF::invslot::GetInvCorpseSlotName(int inv_slot) { - if (!invtype::InvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid) + if (!invtype::GetInvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid) return "Invalid Slot"; // needs work @@ -205,14 +205,14 @@ const char* SoF::invslot::InvCorpseSlotName(int inv_slot) return ret_str.c_str(); } -const char* SoF::invslot::InvSlotName(int inv_type, int inv_slot) +const char* SoF::invslot::GetInvSlotName(int inv_type, int inv_slot) { if (inv_type == invtype::InvTypePossessions) - return invslot::InvPossessionsSlotName(inv_slot); + return invslot::GetInvPossessionsSlotName(inv_slot); else if (inv_type == invtype::InvTypeCorpse) - return invslot::InvCorpseSlotName(inv_slot); + return invslot::GetInvCorpseSlotName(inv_slot); - size_t type_size = invtype::InvTypeSize(inv_type); + size_t type_size = invtype::GetInvTypeSize(inv_type); if (!type_size || inv_slot == invslot::InvSlotInvalid) return "Invalid Slot"; @@ -226,7 +226,7 @@ const char* SoF::invslot::InvSlotName(int inv_type, int inv_slot) return ret_str.c_str(); } -const char* SoF::invbag::InvBagIndexName(int bag_index) +const char* SoF::invbag::GetInvBagIndexName(int bag_index) { if (bag_index == invbag::InvBagInvalid) return "Invalid Bag"; @@ -240,7 +240,7 @@ const char* SoF::invbag::InvBagIndexName(int bag_index) return ret_str.c_str(); } -const char* SoF::invaug::InvAugIndexName(int aug_index) +const char* SoF::invaug::GetInvAugIndexName(int aug_index) { if (aug_index == invaug::InvAugInvalid) return "Invalid Augment"; diff --git a/common/patches/sof_limits.h b/common/patches/sof_limits.h index 5243b289b..42033b2f6 100644 --- a/common/patches/sof_limits.h +++ b/common/patches/sof_limits.h @@ -10,7 +10,7 @@ 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. + 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 @@ -32,8 +32,13 @@ namespace SoF enum : bool { False = false, True = true }; // pre-declarations + namespace inventory { + inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::SoF; } + + } /*inventory*/ + namespace invtype { - inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::SoF; } + inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::SoF; } enum : int { InvTypeInvalid = -1, InvTypeBegin }; @@ -63,7 +68,7 @@ namespace SoF } /*invtype*/ namespace invslot { - inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::SoF; } + inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::SoF; } enum : int { InvSlotInvalid = -1, InvSlotBegin }; @@ -114,21 +119,21 @@ namespace SoF } /*invslot*/ namespace invbag { - inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::SoF; } + inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::SoF; } enum : int { InvBagInvalid = -1, InvBagBegin }; } /*invbag*/ namespace invaug { - inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::SoF; } + inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::SoF; } enum : int { InvAugInvalid = -1, InvAugBegin }; } /*invaug*/ namespace item { - inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::SoF; } + inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::SoF; } enum ItemPacketType : int { ItemPacketMerchant = 100, @@ -146,27 +151,37 @@ namespace SoF } /*item*/ namespace profile { - inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::SoF; } + inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::SoF; } } /*profile*/ namespace constants { - inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::SoF; } + inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::SoF; } } /*constants*/ namespace behavior { - inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::SoF; } + inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::SoF; } } /*behavior*/ namespace skills { - inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::SoF; } + inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoF; } } /*skills*/ // declarations + namespace inventory { + const bool ConcatenateInvTypeLimbo = true; + + const bool AllowOverLevelEquipment = false; + + const bool AllowEmptyBagInBag = false; + const bool AllowClickCastFromBag = false; + + } /*inventory*/ + namespace invtype { const size_t InvTypePossessionsSize = invslot::PossessionsCount; const size_t InvTypeBankSize = 24; @@ -190,8 +205,8 @@ namespace SoF const size_t NPCTradeSize = 4; - extern size_t InvTypeSize(int inv_type); - extern const char* InvTypeName(int inv_type); + extern size_t GetInvTypeSize(int inv_type); + extern const char* GetInvTypeName(int inv_type); } /*invtype*/ @@ -218,9 +233,9 @@ namespace SoF const int CorpseBegin = PossessionsGeneral1; const int CorpseEnd = PossessionsGeneral1 + PossessionsCursor; - extern const char* InvPossessionsSlotName(int inv_slot); - extern const char* InvCorpseSlotName(int inv_slot); - extern const char* InvSlotName(int inv_type, int inv_slot); + extern const char* GetInvPossessionsSlotName(int inv_slot); + extern const char* GetInvCorpseSlotName(int inv_slot); + extern const char* GetInvSlotName(int inv_type, int inv_slot); } /*invslot*/ @@ -247,14 +262,14 @@ namespace SoF const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize; const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1; - extern const char* InvBagIndexName(int bag_index); + extern const char* GetInvBagIndexName(int bag_index); } /*invbag*/ namespace invaug { const size_t ItemAugSize = 5; - extern const char* InvAugIndexName(int aug_index); + extern const char* GetInvAugIndexName(int aug_index); } /*invaug*/ @@ -282,13 +297,6 @@ namespace SoF } /*constants*/ namespace behavior { - const bool ConcatenateInvTypeLimbo = true; - - const bool AllowOverLevelEquipment = false; - - const bool AllowEmptyBagInBag = false; - const bool AllowClickCastFromBag = false; - const bool CoinHasWeight = true; } /*behavior*/ diff --git a/common/patches/titanium_limits.cpp b/common/patches/titanium_limits.cpp index 2d5faac6b..fba7db270 100644 --- a/common/patches/titanium_limits.cpp +++ b/common/patches/titanium_limits.cpp @@ -10,7 +10,7 @@ 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. + 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 @@ -22,7 +22,7 @@ #include "../string_util.h" -size_t Titanium::invtype::InvTypeSize(int inv_type) +size_t Titanium::invtype::GetInvTypeSize(int inv_type) { switch (inv_type) { case invtype::InvTypePossessions: @@ -68,7 +68,7 @@ size_t Titanium::invtype::InvTypeSize(int inv_type) } } -const char* Titanium::invtype::InvTypeName(int inv_type) +const char* Titanium::invtype::GetInvTypeName(int inv_type) { switch (inv_type) { case invtype::InvTypeInvalid: @@ -116,7 +116,7 @@ const char* Titanium::invtype::InvTypeName(int inv_type) } } -const char* Titanium::invslot::InvPossessionsSlotName(int inv_slot) +const char* Titanium::invslot::GetInvPossessionsSlotName(int inv_slot) { switch (inv_slot) { case invslot::InvSlotInvalid: @@ -188,9 +188,9 @@ const char* Titanium::invslot::InvPossessionsSlotName(int inv_slot) } } -const char* Titanium::invslot::InvCorpseSlotName(int inv_slot) +const char* Titanium::invslot::GetInvCorpseSlotName(int inv_slot) { - if (!invtype::InvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid) + if (!invtype::GetInvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid) return "Invalid Slot"; // needs work @@ -203,14 +203,14 @@ const char* Titanium::invslot::InvCorpseSlotName(int inv_slot) return ret_str.c_str(); } -const char* Titanium::invslot::InvSlotName(int inv_type, int inv_slot) +const char* Titanium::invslot::GetInvSlotName(int inv_type, int inv_slot) { if (inv_type == invtype::InvTypePossessions) - return invslot::InvPossessionsSlotName(inv_slot); + return invslot::GetInvPossessionsSlotName(inv_slot); else if (inv_type == invtype::InvTypeCorpse) - return invslot::InvCorpseSlotName(inv_slot); + return invslot::GetInvCorpseSlotName(inv_slot); - size_t type_size = invtype::InvTypeSize(inv_type); + size_t type_size = invtype::GetInvTypeSize(inv_type); if (!type_size || inv_slot == invslot::InvSlotInvalid) return "Invalid Slot"; @@ -224,7 +224,7 @@ const char* Titanium::invslot::InvSlotName(int inv_type, int inv_slot) return ret_str.c_str(); } -const char* Titanium::invbag::InvBagIndexName(int bag_index) +const char* Titanium::invbag::GetInvBagIndexName(int bag_index) { if (bag_index == invbag::InvBagInvalid) return "Invalid Bag"; @@ -238,7 +238,7 @@ const char* Titanium::invbag::InvBagIndexName(int bag_index) return ret_str.c_str(); } -const char* Titanium::invaug::InvAugIndexName(int aug_index) +const char* Titanium::invaug::GetInvAugIndexName(int aug_index) { if (aug_index == invaug::InvAugInvalid) return "Invalid Augment"; diff --git a/common/patches/titanium_limits.h b/common/patches/titanium_limits.h index 0d4620997..51651ea38 100644 --- a/common/patches/titanium_limits.h +++ b/common/patches/titanium_limits.h @@ -10,7 +10,7 @@ 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. + 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 @@ -32,8 +32,13 @@ namespace Titanium enum : bool { False = false, True = true }; // pre-declarations + namespace inventory { + inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::Titanium; } + + } /*inventory*/ + namespace invtype { - inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::Titanium; } + inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::Titanium; } enum : int { InvTypeInvalid = -1, InvTypeBegin }; @@ -63,7 +68,7 @@ namespace Titanium } /*invtype*/ namespace invslot { - inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::Titanium; } + inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::Titanium; } enum : int { InvSlotInvalid = -1, InvSlotBegin }; @@ -113,21 +118,21 @@ namespace Titanium } /*invslot*/ namespace invbag { - inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::Titanium; } + inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::Titanium; } enum : int { InvBagInvalid = -1, InvBagBegin }; } /*invbag*/ namespace invaug { - inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::Titanium; } + inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::Titanium; } enum : int { InvAugInvalid = -1, InvAugBegin }; } /*invaug*/ namespace item { - inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::Titanium; } + inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::Titanium; } enum ItemPacketType : int { ItemPacketMerchant = 100, @@ -145,27 +150,37 @@ namespace Titanium } /*item*/ namespace profile { - inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::Titanium; } + inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::Titanium; } } /*profile*/ namespace constants { - inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::Titanium; } + inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::Titanium; } } /*constants*/ namespace behavior { - inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::Titanium; } + inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::Titanium; } } /*behavior*/ namespace skills { - inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::Titanium; } + inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::Titanium; } } /*skills*/ // declarations + namespace inventory { + const bool ConcatenateInvTypeLimbo = true; + + const bool AllowOverLevelEquipment = false; + + const bool AllowEmptyBagInBag = false; + const bool AllowClickCastFromBag = false; + + } /*inventory*/ + namespace invtype { const size_t InvTypePossessionsSize = invslot::PossessionsCount; const size_t InvTypeBankSize = 16; @@ -189,8 +204,8 @@ namespace Titanium const size_t NPCTradeSize = 4; - extern size_t InvTypeSize(int inv_type); - extern const char* InvTypeName(int inv_type); + extern size_t GetInvTypeSize(int inv_type); + extern const char* GetInvTypeName(int inv_type); } /*invtype*/ @@ -217,9 +232,9 @@ namespace Titanium const int CorpseBegin = PossessionsGeneral1; const int CorpseEnd = PossessionsGeneral1 + PossessionsCursor; - extern const char* InvPossessionsSlotName(int inv_slot); - extern const char* InvCorpseSlotName(int inv_slot); - extern const char* InvSlotName(int inv_type, int inv_slot); + extern const char* GetInvPossessionsSlotName(int inv_slot); + extern const char* GetInvCorpseSlotName(int inv_slot); + extern const char* GetInvSlotName(int inv_type, int inv_slot); } /*invslot*/ @@ -246,14 +261,14 @@ namespace Titanium const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize; const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1; - extern const char* InvBagIndexName(int bag_index); + extern const char* GetInvBagIndexName(int bag_index); } /*invbag*/ namespace invaug { const size_t ItemAugSize = 5; - extern const char* InvAugIndexName(int aug_index); + extern const char* GetInvAugIndexName(int aug_index); } /*invaug*/ @@ -281,13 +296,6 @@ namespace Titanium } /*constants*/ namespace behavior { - const bool ConcatenateInvTypeLimbo = true; - - const bool AllowOverLevelEquipment = false; - - const bool AllowEmptyBagInBag = false; - const bool AllowClickCastFromBag = false; - const bool CoinHasWeight = true; } /*behavior*/ diff --git a/common/patches/uf_limits.cpp b/common/patches/uf_limits.cpp index 8e72b8b03..28a1d7c3f 100644 --- a/common/patches/uf_limits.cpp +++ b/common/patches/uf_limits.cpp @@ -10,7 +10,7 @@ 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. + 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 @@ -22,7 +22,7 @@ #include "../string_util.h" -size_t UF::invtype::InvTypeSize(int inv_type) +size_t UF::invtype::GetInvTypeSize(int inv_type) { switch (inv_type) { case invtype::InvTypePossessions: @@ -68,7 +68,7 @@ size_t UF::invtype::InvTypeSize(int inv_type) } } -const char* UF::invtype::InvTypeName(int inv_type) +const char* UF::invtype::GetInvTypeName(int inv_type) { switch (inv_type) { case invtype::InvTypeInvalid: @@ -116,7 +116,7 @@ const char* UF::invtype::InvTypeName(int inv_type) } } -const char* UF::invslot::InvPossessionsSlotName(int inv_slot) +const char* UF::invslot::GetInvPossessionsSlotName(int inv_slot) { switch (inv_slot) { case invslot::InvSlotInvalid: @@ -190,9 +190,9 @@ const char* UF::invslot::InvPossessionsSlotName(int inv_slot) } } -const char* UF::invslot::InvCorpseSlotName(int inv_slot) +const char* UF::invslot::GetInvCorpseSlotName(int inv_slot) { - if (!invtype::InvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid) + if (!invtype::GetInvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid) return "Invalid Slot"; // needs work @@ -205,14 +205,14 @@ const char* UF::invslot::InvCorpseSlotName(int inv_slot) return ret_str.c_str(); } -const char* UF::invslot::InvSlotName(int inv_type, int inv_slot) +const char* UF::invslot::GetInvSlotName(int inv_type, int inv_slot) { if (inv_type == invtype::InvTypePossessions) - return invslot::InvPossessionsSlotName(inv_slot); + return invslot::GetInvPossessionsSlotName(inv_slot); else if (inv_type == invtype::InvTypeCorpse) - return invslot::InvCorpseSlotName(inv_slot); + return invslot::GetInvCorpseSlotName(inv_slot); - size_t type_size = invtype::InvTypeSize(inv_type); + size_t type_size = invtype::GetInvTypeSize(inv_type); if (!type_size || inv_slot == invslot::InvSlotInvalid) return "Invalid Slot"; @@ -226,7 +226,7 @@ const char* UF::invslot::InvSlotName(int inv_type, int inv_slot) return ret_str.c_str(); } -const char* UF::invbag::InvBagIndexName(int bag_index) +const char* UF::invbag::GetInvBagIndexName(int bag_index) { if (bag_index == invbag::InvBagInvalid) return "Invalid Bag"; @@ -240,7 +240,7 @@ const char* UF::invbag::InvBagIndexName(int bag_index) return ret_str.c_str(); } -const char* UF::invaug::InvAugIndexName(int aug_index) +const char* UF::invaug::GetInvAugIndexName(int aug_index) { if (aug_index == invaug::InvAugInvalid) return "Invalid Augment"; diff --git a/common/patches/uf_limits.h b/common/patches/uf_limits.h index 7f1ec33a8..b71937fa6 100644 --- a/common/patches/uf_limits.h +++ b/common/patches/uf_limits.h @@ -10,7 +10,7 @@ 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. + 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 @@ -32,8 +32,13 @@ namespace UF enum : bool { False = false, True = true }; // pre-declarations + namespace inventory { + inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::UF; } + + } /*inventory*/ + namespace invtype { - inline EQEmu::versions::ClientVersion InvTypeRef() { return EQEmu::versions::ClientVersion::UF; } + inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::UF; } enum : int { InvTypeInvalid = -1, InvTypeBegin }; @@ -63,7 +68,7 @@ namespace UF } /*invtype*/ namespace invslot { - inline EQEmu::versions::ClientVersion InvSlotRef() { return EQEmu::versions::ClientVersion::UF; } + inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::UF; } enum : int { InvSlotInvalid = -1, InvSlotBegin }; @@ -114,21 +119,21 @@ namespace UF } /*invslot*/ namespace invbag { - inline EQEmu::versions::ClientVersion InvBagRef() { return EQEmu::versions::ClientVersion::UF; } + inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::UF; } enum : int { InvBagInvalid = -1, InvBagBegin }; } /*invbag*/ namespace invaug { - inline EQEmu::versions::ClientVersion InvAugRef() { return EQEmu::versions::ClientVersion::UF; } + inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::UF; } enum : int { InvAugInvalid = -1, InvAugBegin }; } /*invaug*/ namespace item { - inline EQEmu::versions::ClientVersion ItemRef() { return EQEmu::versions::ClientVersion::UF; } + inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::UF; } enum ItemPacketType : int { ItemPacketMerchant = 100, @@ -147,27 +152,37 @@ namespace UF } /*item*/ namespace profile { - inline EQEmu::versions::ClientVersion ProfileRef() { return EQEmu::versions::ClientVersion::UF; } + inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::UF; } } /*profile*/ namespace constants { - inline EQEmu::versions::ClientVersion ConstantsRef() { return EQEmu::versions::ClientVersion::UF; } + inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::UF; } } /*constants*/ namespace behavior { - inline EQEmu::versions::ClientVersion BehaviorRef() { return EQEmu::versions::ClientVersion::UF; } + inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::UF; } } /*behavior*/ namespace skills { - inline EQEmu::versions::ClientVersion SkillsRef() { return EQEmu::versions::ClientVersion::UF; } + inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::UF; } } /*skills*/ // declarations + namespace inventory { + const bool ConcatenateInvTypeLimbo = true; + + const bool AllowOverLevelEquipment = true; + + const bool AllowEmptyBagInBag = false; + const bool AllowClickCastFromBag = false; + + } /*inventory*/ + namespace invtype { const size_t InvTypePossessionsSize = invslot::PossessionsCount; const size_t InvTypeBankSize = 24; @@ -191,8 +206,8 @@ namespace UF const size_t NPCTradeSize = 4; - extern size_t InvTypeSize(int inv_type); - extern const char* InvTypeName(int inv_type); + extern size_t GetInvTypeSize(int inv_type); + extern const char* GetInvTypeName(int inv_type); } /*invtype*/ @@ -219,9 +234,9 @@ namespace UF const int CorpseBegin = invslot::PossessionsGeneral1; const int CorpseEnd = invslot::PossessionsGeneral1 + invslot::PossessionsCursor; - extern const char* InvPossessionsSlotName(int inv_slot); - extern const char* InvCorpseSlotName(int inv_slot); - extern const char* InvSlotName(int inv_type, int inv_slot); + extern const char* GetInvPossessionsSlotName(int inv_slot); + extern const char* GetInvCorpseSlotName(int inv_slot); + extern const char* GetInvSlotName(int inv_type, int inv_slot); } /*invslot*/ @@ -248,14 +263,14 @@ namespace UF const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize; const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1; - extern const char* InvBagIndexName(int bag_index); + extern const char* GetInvBagIndexName(int bag_index); } /*invbag*/ namespace invaug { const size_t ItemAugSize = 5; - extern const char* InvAugIndexName(int aug_index); + extern const char* GetInvAugIndexName(int aug_index); } /*invaug*/ @@ -283,13 +298,6 @@ namespace UF } /*constants*/ namespace behavior { - const bool ConcatenateInvTypeLimbo = true; - - const bool AllowOverLevelEquipment = true; - - const bool AllowEmptyBagInBag = false; - const bool AllowClickCastFromBag = false; - const bool CoinHasWeight = false; } /*behavior*/ diff --git a/common/say_link.cpp b/common/say_link.cpp index 12c1d80d1..bbadc0c92 100644 --- a/common/say_link.cpp +++ b/common/say_link.cpp @@ -65,19 +65,19 @@ void EQEmu::saylink::SayLinkEngine::Reset() m_ItemData = nullptr; m_LootData = nullptr; m_ItemInst = nullptr; - m_Proxy_unknown_1 = NOT_USED; - m_ProxyItemID = NOT_USED; - m_ProxyAugment1ID = NOT_USED; - m_ProxyAugment2ID = NOT_USED; - m_ProxyAugment3ID = NOT_USED; - m_ProxyAugment4ID = NOT_USED; - m_ProxyAugment5ID = NOT_USED; - m_ProxyAugment6ID = NOT_USED; - m_ProxyIsEvolving = NOT_USED; - m_ProxyEvolveGroup = NOT_USED; - m_ProxyEvolveLevel = NOT_USED; - m_ProxyOrnamentIcon = NOT_USED; - m_ProxyHash = NOT_USED; + m_Proxy_unknown_1 = 0; + m_ProxyItemID = 0; + m_ProxyAugment1ID = 0; + m_ProxyAugment2ID = 0; + m_ProxyAugment3ID = 0; + m_ProxyAugment4ID = 0; + m_ProxyAugment5ID = 0; + m_ProxyAugment6ID = 0; + m_ProxyIsEvolving = 0; + m_ProxyEvolveGroup = 0; + m_ProxyEvolveLevel = 0; + m_ProxyOrnamentIcon = 0; + m_ProxyHash = 0; m_ProxyText = nullptr; m_TaskUse = false; m_Link.clear(); diff --git a/world/client.cpp b/world/client.cpp index fdccc8f7d..1fc2a93f8 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -211,7 +211,7 @@ void Client::SendMaxCharCreate() { auto outapp = new EQApplicationPacket(OP_SendMaxCharacters, sizeof(MaxCharacters_Struct)); MaxCharacters_Struct* mc = (MaxCharacters_Struct*)outapp->pBuffer; - mc->max_chars = EQEmu::constants::CharacterCreationLimit(m_ClientVersion); + mc->max_chars = EQEmu::constants::GetCharacterCreationLimit(m_ClientVersion); if (mc->max_chars > EQEmu::constants::CharacterCreationMax) mc->max_chars = EQEmu::constants::CharacterCreationMax; @@ -746,7 +746,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) { // This can probably be moved outside and have another method return requested info (don't forget to remove the #include "../common/shareddb.h" above) // (This is a literal translation of the original process..I don't see why it can't be changed to a single-target query over account iteration) if (!pZoning) { - size_t character_limit = EQEmu::constants::CharacterCreationLimit(eqs->ClientVersion()); + size_t character_limit = EQEmu::constants::GetCharacterCreationLimit(eqs->ClientVersion()); if (character_limit > EQEmu::constants::CharacterCreationMax) { character_limit = EQEmu::constants::CharacterCreationMax; } if (eqs->ClientVersion() == EQEmu::versions::ClientVersion::Titanium) { character_limit = 8; } diff --git a/world/worlddb.cpp b/world/worlddb.cpp index 684ab0d64..9a447640b 100644 --- a/world/worlddb.cpp +++ b/world/worlddb.cpp @@ -37,7 +37,7 @@ void WorldDatabase::GetCharSelectInfo(uint32 accountID, EQApplicationPacket **ou { /* Set Character Creation Limit */ EQEmu::versions::ClientVersion client_version = EQEmu::versions::ConvertClientVersionBitToClientVersion(clientVersionBit); - size_t character_limit = EQEmu::constants::CharacterCreationLimit(client_version); + size_t character_limit = EQEmu::constants::GetCharacterCreationLimit(client_version); // Validate against absolute server max if (character_limit > EQEmu::constants::CharacterCreationMax) diff --git a/zone/bot.cpp b/zone/bot.cpp index 76f537a5b..9975881f3 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -347,7 +347,7 @@ NPCType Bot::FillNPCTypeStruct(uint32 botSpellsID, std::string botName, std::str BotNPCType.hp_regen = 1; BotNPCType.mana_regen = 1; BotNPCType.maxlevel = botLevel; - BotNPCType.light = NOT_USED; // due to the way that bots are coded..this is sent post-spawn + BotNPCType.light = 0; // due to the way that bots are coded..this is sent post-spawn return BotNPCType; } diff --git a/zone/client_mods.cpp b/zone/client_mods.cpp index fbbce59ce..266f5540b 100644 --- a/zone/client_mods.cpp +++ b/zone/client_mods.cpp @@ -1355,7 +1355,7 @@ uint32 Client::CalcCurrentWeight() This is the ONLY instance I have seen where the client is hard coded to particular Item IDs to set a certain property for an item. It is very odd. */ // SoD+ client has no weight for coin - if (EQEmu::profile::CoinHasWeight(EQEmu::versions::ConvertClientVersionToInventoryVersion(ClientVersion()))) { + if (EQEmu::behavior::GetCoinHasWeight(EQEmu::versions::ConvertClientVersionToInventoryVersion(ClientVersion()))) { Total += (m_pp.platinum + m_pp.gold + m_pp.silver + m_pp.copper) / 4; } float Packrat = (float)spellbonuses.Packrat + (float)aabonuses.Packrat + (float)itembonuses.Packrat; diff --git a/zone/command.cpp b/zone/command.cpp index d0143a0ad..4b7c6e929 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -5627,13 +5627,13 @@ void command_itemsearch(Client *c, const Seperator *sep) return; } - int count = NOT_USED; + int count = 0; char sName[64]; char sCriteria[255]; strn0cpy(sCriteria, search_criteria, sizeof(sCriteria)); strupr(sCriteria); char* pdest; - uint32 it = NOT_USED; + uint32 it = 0; while ((item = database.IterateItems(&it))) { strn0cpy(sName, item->Name, sizeof(sName)); strupr(sName); diff --git a/zone/corpse.cpp b/zone/corpse.cpp index 9245099e4..48bd46fed 100644 --- a/zone/corpse.cpp +++ b/zone/corpse.cpp @@ -998,7 +998,7 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a cur = itemlist.begin(); end = itemlist.end(); - int corpselootlimit = EQEmu::inventory::InventoryTypeSize(EQEmu::versions::ConvertClientVersionToInventoryVersion(client->ClientVersion()), EQEmu::legacy::TypeCorpse); + int corpselootlimit = EQEmu::inventory::GetInventoryTypeSize(EQEmu::versions::ConvertClientVersionToInventoryVersion(client->ClientVersion()), EQEmu::legacy::TypeCorpse); for(; cur != end; ++cur) { ServerLootItem_Struct* item_data = *cur; @@ -1292,7 +1292,7 @@ void Corpse::QueryLoot(Client* to) { cur = itemlist.begin(); end = itemlist.end(); - int corpselootlimit = EQEmu::inventory::InventoryTypeSize(EQEmu::versions::ConvertClientVersionToInventoryVersion(to->ClientVersion()), EQEmu::legacy::TypeCorpse); + int corpselootlimit = EQEmu::inventory::GetInventoryTypeSize(EQEmu::versions::ConvertClientVersionToInventoryVersion(to->ClientVersion()), EQEmu::legacy::TypeCorpse); for(; cur != end; ++cur) { ServerLootItem_Struct* sitem = *cur; diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 9b453847f..1dbdcab11 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -2759,7 +2759,7 @@ void TaskManager::SendActiveTaskDescription(Client *c, int TaskID, int SequenceN + sizeof(TaskDescriptionData2_Struct) + 1 + sizeof(TaskDescriptionTrailer_Struct); std::string reward_text; - int ItemID = NOT_USED; + int ItemID = 0; // If there is an item make the Reward text into a link to the item (only the first item if a list // is specified). I have been unable to get multiple item links to work.