From 53a1faa36feb5a6e9253c79d6877fcee17488530 Mon Sep 17 00:00:00 2001 From: Uleat Date: Sat, 14 Feb 2015 22:57:47 -0500 Subject: [PATCH] Constant name and eqdictionary entry addition prior to per-client version limit activation --- common/eq_dictionary.cpp | 22 ++++++++++++++++++++++ common/eq_dictionary.h | 6 ++++++ common/patches/rof2_constants.h | 2 ++ common/patches/rof_constants.h | 2 ++ common/patches/sod_constants.h | 2 ++ common/patches/sof_constants.h | 2 ++ common/patches/titanium_constants.h | 2 ++ common/patches/uf_constants.h | 2 ++ 8 files changed, 40 insertions(+) diff --git a/common/eq_dictionary.cpp b/common/eq_dictionary.cpp index a6a0d806d..9bc602aa1 100644 --- a/common/eq_dictionary.cpp +++ b/common/eq_dictionary.cpp @@ -319,6 +319,28 @@ ClientVersion EQLimits::ValidateMobClientVersion(ClientVersion clientVersion) return ClientVersion::Unknown; } +// database +size_t EQLimits::CharacterCreationLimit(ClientVersion clientVersion) +{ + static const size_t local[CLIENT_VERSION_COUNT] = { +/*Unknown*/ NOT_USED, +/*Client62*/ NOT_USED, +/*Titanium*/ Titanium::consts::CHARACTER_CREATION_LIMIT, +/*SoF*/ SoF::consts::CHARACTER_CREATION_LIMIT, +/*SoD*/ SoD::consts::CHARACTER_CREATION_LIMIT, +/*UF*/ UF::consts::CHARACTER_CREATION_LIMIT, +/*RoF*/ RoF::consts::CHARACTER_CREATION_LIMIT, +/*RoF2*/ RoF2::consts::CHARACTER_CREATION_LIMIT, + +/*MobNPC*/ NOT_USED, +/*MobMerc*/ NOT_USED, +/*MobBot*/ NOT_USED, +/*MobPet*/ NOT_USED + }; + + return local[static_cast(ValidateMobClientVersion(clientVersion))]; +} + // inventory uint16 EQLimits::InventoryMapSize(int16 indexMap, ClientVersion clientVersion) { diff --git a/common/eq_dictionary.h b/common/eq_dictionary.h index 16586f356..84da53f63 100644 --- a/common/eq_dictionary.h +++ b/common/eq_dictionary.h @@ -49,6 +49,9 @@ public: // database static const ClientVersion CHARACTER_CREATION_CLIENT = ClientVersion::RoF2; // adjust according to starting item placement and target client + // This value should be at least 8 or Titanium will have issues (tested at 6) + static const size_t CHARACTER_CREATION_LIMIT = RoF2::consts::CHARACTER_CREATION_LIMIT; + // inventory static uint16 InventoryMapSize(int16 indexMap); //static std::string InventoryLocationName(Location_Struct location); @@ -170,6 +173,9 @@ public: static bool IsValidMobClientVersion(ClientVersion clientVersion); static ClientVersion ValidateMobClientVersion(ClientVersion clientVersion); + // database + static size_t CharacterCreationLimit(ClientVersion clientVersion); + // inventory static uint16 InventoryMapSize(int16 indexMap, ClientVersion clientVersion); static uint64 PossessionsBitmask(ClientVersion clientVersion); diff --git a/common/patches/rof2_constants.h b/common/patches/rof2_constants.h index 867574670..750a6fb3e 100644 --- a/common/patches/rof2_constants.h +++ b/common/patches/rof2_constants.h @@ -103,6 +103,8 @@ namespace RoF2 { } namespace consts { + static const size_t CHARACTER_CREATION_LIMIT = 10; + static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount; static const uint16 MAP_BANK_SIZE = 24; static const uint16 MAP_SHARED_BANK_SIZE = 2; diff --git a/common/patches/rof_constants.h b/common/patches/rof_constants.h index 4fbf21d47..86367b3d9 100644 --- a/common/patches/rof_constants.h +++ b/common/patches/rof_constants.h @@ -102,6 +102,8 @@ namespace RoF { } namespace consts { + static const size_t CHARACTER_CREATION_LIMIT = 10; + static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount; static const uint16 MAP_BANK_SIZE = 24; static const uint16 MAP_SHARED_BANK_SIZE = 2; diff --git a/common/patches/sod_constants.h b/common/patches/sod_constants.h index 6b587b7c4..5fdb89578 100644 --- a/common/patches/sod_constants.h +++ b/common/patches/sod_constants.h @@ -101,6 +101,8 @@ namespace SoD { } namespace consts { + static const size_t CHARACTER_CREATION_LIMIT = 10; + static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount; static const uint16 MAP_BANK_SIZE = 24; static const uint16 MAP_SHARED_BANK_SIZE = 2; diff --git a/common/patches/sof_constants.h b/common/patches/sof_constants.h index f5376cd13..4729eb436 100644 --- a/common/patches/sof_constants.h +++ b/common/patches/sof_constants.h @@ -101,6 +101,8 @@ namespace SoF { } namespace consts { + static const size_t CHARACTER_CREATION_LIMIT = 10; + static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount; static const uint16 MAP_BANK_SIZE = 24; static const uint16 MAP_SHARED_BANK_SIZE = 2; diff --git a/common/patches/titanium_constants.h b/common/patches/titanium_constants.h index 61da2ba59..c93de7666 100644 --- a/common/patches/titanium_constants.h +++ b/common/patches/titanium_constants.h @@ -100,6 +100,8 @@ namespace Titanium { } namespace consts { + static const size_t CHARACTER_CREATION_LIMIT = 8; + static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount; static const uint16 MAP_BANK_SIZE = 16; static const uint16 MAP_SHARED_BANK_SIZE = 2; diff --git a/common/patches/uf_constants.h b/common/patches/uf_constants.h index fc14af63f..3320fee76 100644 --- a/common/patches/uf_constants.h +++ b/common/patches/uf_constants.h @@ -101,6 +101,8 @@ namespace UF { } namespace consts { + static const size_t CHARACTER_CREATION_LIMIT = 10; + static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount; static const uint16 MAP_BANK_SIZE = 24; static const uint16 MAP_SHARED_BANK_SIZE = 2;