From f39244acca8c233d70d3557189ef65f3607b1cc8 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 2 Jan 2019 17:09:36 -0500 Subject: [PATCH 01/20] Comment out some IsBardOnlyStackEffect stuff --- common/spdat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/spdat.cpp b/common/spdat.cpp index cb41c5158..8006e377d 100644 --- a/common/spdat.cpp +++ b/common/spdat.cpp @@ -1125,10 +1125,10 @@ bool IsStackableDot(uint16 spell_id) bool IsBardOnlyStackEffect(int effect) { switch(effect) { - case SE_CurrentMana: + /*case SE_CurrentMana: case SE_ManaRegen_v2: case SE_CurrentHP: - case SE_HealOverTime: + case SE_HealOverTime:*/ case SE_BardAEDot: return true; default: From 55e856d5fe056f46677c14a880c914eb39a92d51 Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 2 Jan 2019 19:41:48 -0500 Subject: [PATCH 02/20] Update for a couple of things... - secondary material slot on self spawn (inc. pet) - instant update of prim/sec weapon ornamentations --- common/patches/rof2.cpp | 10 +--------- zone/client.cpp | 18 +++++++++++++----- zone/client_packet.cpp | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 949cd1db3..a062033fc 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -5491,16 +5491,8 @@ namespace RoF2 ob.write(item->Lore, strlen(item->Lore)); ob.write("\0", 1); - if (inst->GetNewIDFile() > 0) { - char new_id_file[30]; - memset(new_id_file, 0x0, 30); - sprintf(new_id_file, "IT%d", inst->GetNewIDFile()); - ob.write(new_id_file, strlen(new_id_file)); - } - else if (strlen(item->IDFile) > 0) { + if (strlen(item->IDFile) > 0) ob.write(item->IDFile, strlen(item->IDFile)); - } - ob.write("\0", 1); ob.write("\0", 1); diff --git a/zone/client.cpp b/zone/client.cpp index e4b81cdf7..12555cc75 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -9034,7 +9034,8 @@ void Client::SetDevToolsWindowEnabled(bool in_dev_tools_window_enabled) */ void Client::SetPrimaryWeaponOrnamentation(uint32 model_id) { - if (GetItemIDAt(EQEmu::invslot::slotPrimary) > 0) { + auto primary_item = m_inv.GetItem(EQEmu::invslot::slotPrimary); + if (primary_item) { database.QueryDatabase( StringFormat( "UPDATE `inventory` SET `ornamentidfile` = %i WHERE `charid` = %i AND `slotid` = %i", @@ -9043,8 +9044,11 @@ void Client::SetPrimaryWeaponOrnamentation(uint32 model_id) EQEmu::invslot::slotPrimary )); + primary_item->SetOrnamentationIDFile(model_id); + SendItemPacket(EQEmu::invslot::slotPrimary, primary_item, ItemPacketTrade); WearChange(EQEmu::textures::weaponPrimary, static_cast(model_id), 0); - Message(15, "Your primary weapon appearance has been modified, changes will fully take affect next time you zone"); + + Message(15, "Your primary weapon appearance has been modified"); } } @@ -9053,7 +9057,8 @@ void Client::SetPrimaryWeaponOrnamentation(uint32 model_id) */ void Client::SetSecondaryWeaponOrnamentation(uint32 model_id) { - if (GetItemIDAt(EQEmu::invslot::slotSecondary) > 0) { + auto secondary_item = m_inv.GetItem(EQEmu::invslot::slotSecondary); + if (secondary_item) { database.QueryDatabase( StringFormat( "UPDATE `inventory` SET `ornamentidfile` = %i WHERE `charid` = %i AND `slotid` = %i", @@ -9062,7 +9067,10 @@ void Client::SetSecondaryWeaponOrnamentation(uint32 model_id) EQEmu::invslot::slotSecondary )); + secondary_item->SetOrnamentationIDFile(model_id); + SendItemPacket(EQEmu::invslot::slotSecondary, secondary_item, ItemPacketTrade); WearChange(EQEmu::textures::weaponSecondary, static_cast(model_id), 0); - Message(15, "Your secondary weapon appearance has been modified, changes will fully take affect next time you zone"); + + Message(15, "Your secondary weapon appearance has been modified"); } -} \ No newline at end of file +} diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index efaa05e0a..eca721031 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -753,7 +753,7 @@ void Client::CompleteConnect() entity_list.SendUntargetable(this); int x; - for (x = 0; x < 8; x++) { + for (x = EQEmu::textures::textureBegin; x <= EQEmu::textures::LastTexture; x++) { SendWearChange(x); } // added due to wear change above @@ -762,7 +762,7 @@ void Client::CompleteConnect() Mob *pet = GetPet(); if (pet != nullptr) { - for (x = 0; x < 8; x++) { + for (x = EQEmu::textures::textureBegin; x <= EQEmu::textures::LastTexture; x++) { pet->SendWearChange(x); } // added due to wear change above From 4a099ca0ef4e1edf05fbeea6f327d615d26e4e29 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Thu, 3 Jan 2019 19:45:16 -0600 Subject: [PATCH 03/20] Update maintenance script with new appveyor windows CI build artifact [skip ci] --- utils/scripts/eqemu_server.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/scripts/eqemu_server.pl b/utils/scripts/eqemu_server.pl index 29a8142a6..6cacc5108 100644 --- a/utils/scripts/eqemu_server.pl +++ b/utils/scripts/eqemu_server.pl @@ -1257,8 +1257,8 @@ sub copy_file { sub fetch_latest_windows_appveyor { print "[Update] Fetching Latest Windows Binaries (unstable) from Appveyor... \n"; - get_remote_file("https://ci.appveyor.com/api/projects/KimLS/server/artifacts/build_x86_pdb.zip", "updates_staged/master_windows_build_pdb.zip", 1); - get_remote_file("https://ci.appveyor.com/api/projects/KimLS/server/artifacts/build_x86.zip", "updates_staged/master_windows_build.zip", 1); + get_remote_file("https://ci.appveyor.com/api/projects/KimLS/server/artifacts/eqemu-x86-no-bots.zip", "updates_staged/master_windows_build_pdb.zip", 1); + print "[Update] Fetched Latest Windows Binaries (unstable) from Appveyor... \n"; print "[Update] Extracting... --- \n"; unzip('updates_staged/master_windows_build.zip', 'updates_staged/binaries/'); From 85ebda1b5acfb3cb0df39d38d095d547520217c7 Mon Sep 17 00:00:00 2001 From: KimLS Date: Thu, 3 Jan 2019 18:33:22 -0800 Subject: [PATCH 04/20] GMMove minor logic change so clients who are not LD/Charmed will be affected --- zone/mob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/mob.cpp b/zone/mob.cpp index d38121b06..89d2ff1de 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1665,7 +1665,7 @@ void Mob::ShowBuffList(Client* client) { } void Mob::GMMove(float x, float y, float z, float heading, bool SendUpdate) { - if (IsCorpse()) { + if (IsCorpse() || (IsClient() && !IsAIControlled())) { m_Position.x = x; m_Position.y = y; m_Position.z = z; From d25dff7a72ed05459713947d1eec9694879da31f Mon Sep 17 00:00:00 2001 From: Akkadius Date: Thu, 3 Jan 2019 20:48:59 -0600 Subject: [PATCH 05/20] Update eqemu_server.pl [skip ci] --- utils/scripts/eqemu_server.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utils/scripts/eqemu_server.pl b/utils/scripts/eqemu_server.pl index 6cacc5108..7eff0c2dd 100644 --- a/utils/scripts/eqemu_server.pl +++ b/utils/scripts/eqemu_server.pl @@ -1257,12 +1257,11 @@ sub copy_file { sub fetch_latest_windows_appveyor { print "[Update] Fetching Latest Windows Binaries (unstable) from Appveyor... \n"; - get_remote_file("https://ci.appveyor.com/api/projects/KimLS/server/artifacts/eqemu-x86-no-bots.zip", "updates_staged/master_windows_build_pdb.zip", 1); + get_remote_file("https://ci.appveyor.com/api/projects/KimLS/server/artifacts/eqemu-x86-no-bots.zip", "updates_staged/eqemu-x86-no-bots.zip", 1); print "[Update] Fetched Latest Windows Binaries (unstable) from Appveyor... \n"; print "[Update] Extracting... --- \n"; - unzip('updates_staged/master_windows_build.zip', 'updates_staged/binaries/'); - unzip('updates_staged/master_windows_build_pdb.zip', 'updates_staged/binaries/'); + unzip('updates_staged/eqemu-x86-no-bots.zip', 'updates_staged/binaries/'); my @files; my $start_dir = "updates_staged/binaries"; find( From b9abc09294fd2f4230dc083700060ad1db6db64c Mon Sep 17 00:00:00 2001 From: Akkadius Date: Fri, 4 Jan 2019 18:14:11 -0600 Subject: [PATCH 06/20] Update base scaling data [skip ci] --- common/version.h | 2 +- utils/sql/db_update_manifest.txt | 1 + .../2019_01_04_update_global_base_scaling.sql | 272 ++++++++++++++++++ 3 files changed, 274 insertions(+), 1 deletion(-) create mode 100644 utils/sql/git/required/2019_01_04_update_global_base_scaling.sql diff --git a/common/version.h b/common/version.h index 157a82139..ba57cf898 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9133 +#define CURRENT_BINARY_DATABASE_VERSION 9134 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9021 #else diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 7850a0d42..7a7523c94 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -387,6 +387,7 @@ 9131|2018_12_13_spell_buckets.sql|SHOW TABLES LIKE 'spell_buckets'|empty| 9132|2018_12_16_global_base_scaling.sql|SHOW TABLES LIKE 'npc_scale_global_base'|empty| 9133|2018_11_25_StuckBehavior.sql|SHOW COLUMNS FROM `npc_types` LIKE 'stuck_behavior'|empty| +9134|2019_01_04_update_global_base_scaling.sql|SELECT * FROM db_version WHERE version >= 9134|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2019_01_04_update_global_base_scaling.sql b/utils/sql/git/required/2019_01_04_update_global_base_scaling.sql new file mode 100644 index 000000000..1aeb321d1 --- /dev/null +++ b/utils/sql/git/required/2019_01_04_update_global_base_scaling.sql @@ -0,0 +1,272 @@ +REPLACE INTO `npc_scale_global_base` (`type`, `level`, `ac`, `hp`, `accuracy`, `slow_mitigation`, `attack`, `strength`, `stamina`, `dexterity`, `agility`, `intelligence`, `wisdom`, `charisma`, `magic_resist`, `cold_resist`, `fire_resist`, `poison_resist`, `disease_resist`, `corruption_resist`, `physical_resist`, `min_dmg`, `max_dmg`, `hp_regen_rate`, `attack_delay`, `spell_scale`, `heal_scale`, `special_abilities`) +VALUES + (0, 1, 8, 11, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 1, 1, 1, 1, 1, 1, 10, 1, 6, 1, 30, 100, 100, ''), + (0, 2, 11, 27, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, 1, 1, 1, 1, 1, 2, 10, 1, 8, 1, 30, 100, 100, ''), + (0, 3, 14, 43, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 2, 2, 2, 2, 2, 2, 10, 1, 10, 1, 30, 100, 100, ''), + (0, 4, 16, 59, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 2, 2, 2, 2, 2, 3, 10, 1, 12, 1, 30, 100, 100, ''), + (0, 5, 19, 75, 0, 0, 0, 20, 20, 20, 20, 20, 20, 20, 2, 2, 2, 2, 2, 3, 10, 1, 14, 1, 30, 100, 100, ''), + (0, 6, 22, 100, 0, 0, 0, 23, 23, 23, 23, 23, 23, 23, 2, 2, 2, 2, 2, 4, 10, 1, 16, 1, 30, 100, 100, ''), + (0, 7, 25, 125, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 3, 3, 3, 3, 3, 4, 10, 1, 18, 2, 30, 100, 100, ''), + (0, 8, 28, 150, 0, 0, 0, 29, 29, 29, 29, 29, 29, 29, 3, 3, 3, 3, 3, 5, 10, 1, 20, 2, 30, 100, 100, ''), + (0, 9, 31, 175, 0, 0, 0, 32, 32, 32, 32, 32, 32, 32, 4, 4, 4, 4, 4, 5, 10, 1, 22, 2, 30, 100, 100, ''), + (0, 10, 34, 200, 0, 0, 0, 35, 35, 35, 35, 35, 35, 35, 4, 4, 4, 4, 4, 6, 10, 1, 24, 2, 30, 100, 100, ''), + (0, 11, 37, 234, 0, 0, 0, 38, 38, 38, 38, 38, 38, 38, 5, 5, 5, 5, 5, 7, 10, 3, 27, 2, 30, 100, 100, ''), + (0, 12, 40, 268, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, 5, 5, 5, 5, 5, 8, 10, 4, 30, 3, 30, 100, 100, ''), + (0, 13, 43, 302, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 6, 6, 6, 6, 6, 8, 10, 6, 32, 3, 30, 100, 100, ''), + (0, 14, 46, 336, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 6, 6, 6, 6, 6, 9, 10, 7, 35, 3, 30, 100, 100, ''), + (0, 15, 52, 381, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 6, 6, 6, 6, 6, 10, 10, 7, 37, 4, 30, 100, 100, ''), + (0, 16, 59, 426, 0, 0, 0, 54, 54, 54, 54, 54, 54, 54, 7, 7, 7, 7, 7, 10, 10, 8, 39, 4, 30, 100, 100, ''), + (0, 17, 65, 471, 0, 0, 0, 57, 57, 57, 57, 57, 57, 57, 7, 7, 7, 7, 7, 11, 10, 8, 41, 5, 30, 100, 100, ''), + (0, 18, 72, 516, 0, 0, 0, 60, 60, 60, 60, 60, 60, 60, 7, 7, 7, 7, 7, 11, 10, 9, 42, 5, 30, 100, 100, ''), + (0, 19, 78, 561, 0, 0, 0, 63, 63, 63, 63, 63, 63, 63, 7, 7, 7, 7, 7, 12, 10, 9, 44, 6, 30, 100, 100, ''), + (0, 20, 85, 606, 0, 0, 0, 66, 66, 66, 66, 66, 66, 66, 8, 8, 8, 8, 8, 12, 10, 10, 46, 6, 30, 100, 100, ''), + (0, 21, 91, 651, 0, 0, 0, 69, 69, 69, 69, 69, 69, 69, 8, 8, 8, 8, 8, 13, 10, 10, 48, 7, 30, 100, 100, ''), + (0, 22, 95, 712, 0, 0, 0, 72, 72, 72, 72, 72, 72, 72, 8, 8, 8, 8, 8, 14, 10, 10, 50, 7, 30, 100, 100, ''), + (0, 23, 99, 800, 0, 0, 0, 75, 75, 75, 75, 75, 75, 75, 9, 9, 9, 9, 9, 14, 10, 10, 52, 8, 30, 100, 100, ''), + (0, 24, 103, 845, 0, 0, 0, 78, 78, 78, 78, 78, 78, 78, 9, 9, 9, 9, 9, 15, 10, 11, 55, 8, 30, 100, 100, ''), + (0, 25, 107, 895, 0, 0, 0, 81, 81, 81, 81, 81, 81, 81, 10, 10, 10, 10, 10, 16, 10, 11, 57, 9, 30, 100, 100, ''), + (0, 26, 111, 956, 0, 0, 0, 85, 85, 85, 85, 85, 85, 85, 10, 10, 10, 10, 10, 16, 10, 11, 59, 10, 30, 100, 100, ''), + (0, 27, 115, 1100, 0, 0, 0, 88, 88, 88, 88, 88, 88, 88, 11, 11, 11, 11, 11, 17, 10, 11, 61, 10, 30, 100, 100, ''), + (0, 28, 119, 1140, 0, 0, 0, 91, 91, 91, 91, 91, 91, 91, 11, 11, 11, 11, 11, 18, 10, 12, 64, 11, 30, 100, 100, ''), + (0, 29, 123, 1240, 0, 0, 0, 94, 94, 94, 94, 94, 94, 94, 12, 12, 12, 12, 12, 18, 10, 12, 66, 12, 30, 100, 100, ''), + (0, 30, 127, 1350, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 12, 12, 12, 12, 12, 19, 10, 12, 68, 13, 30, 100, 100, ''), + (0, 31, 135, 1450, 4, 0, 4, 104, 104, 104, 104, 104, 104, 104, 13, 13, 13, 13, 13, 20, 10, 14, 74, 14, 30, 100, 100, ''), + (0, 32, 142, 1550, 8, 0, 8, 110, 110, 110, 110, 110, 110, 110, 14, 14, 14, 14, 14, 22, 10, 16, 79, 15, 30, 100, 100, ''), + (0, 33, 150, 1650, 12, 0, 12, 117, 117, 117, 117, 117, 117, 117, 15, 15, 15, 15, 15, 23, 10, 18, 85, 16, 29, 100, 100, ''), + (0, 34, 158, 1750, 16, 0, 16, 123, 123, 123, 123, 123, 123, 123, 16, 16, 16, 16, 16, 25, 10, 20, 90, 17, 28, 100, 100, ''), + (0, 35, 166, 1850, 20, 0, 20, 130, 130, 130, 130, 130, 130, 130, 17, 17, 17, 17, 17, 26, 10, 22, 96, 18, 27, 100, 100, ''), + (0, 36, 173, 1950, 24, 0, 24, 137, 137, 137, 137, 137, 137, 137, 17, 17, 17, 17, 17, 27, 10, 24, 102, 19, 25, 100, 100, ''), + (0, 37, 181, 2100, 28, 0, 28, 143, 143, 143, 143, 143, 143, 143, 18, 18, 18, 18, 18, 29, 10, 26, 107, 21, 24, 100, 100, ''), + (0, 38, 189, 2350, 32, 0, 32, 150, 150, 150, 150, 150, 150, 150, 19, 19, 19, 19, 19, 30, 10, 28, 113, 23, 23, 100, 100, ''), + (0, 39, 196, 2650, 36, 0, 36, 156, 156, 156, 156, 156, 156, 156, 20, 20, 20, 20, 20, 32, 10, 30, 118, 26, 22, 100, 100, ''), + (0, 40, 204, 2900, 40, 0, 40, 163, 163, 163, 163, 163, 163, 163, 21, 21, 21, 21, 21, 33, 10, 32, 124, 29, 21, 100, 100, ''), + (0, 41, 208, 3250, 42, 0, 42, 166, 166, 166, 166, 166, 166, 166, 22, 22, 22, 22, 22, 34, 10, 33, 127, 32, 21, 100, 100, ''), + (0, 42, 212, 3750, 44, 0, 44, 169, 169, 169, 169, 169, 169, 169, 22, 22, 22, 22, 22, 35, 10, 34, 130, 37, 21, 100, 100, ''), + (0, 43, 217, 4250, 46, 0, 46, 173, 173, 173, 173, 173, 173, 173, 23, 23, 23, 23, 23, 35, 10, 34, 133, 42, 21, 100, 100, ''), + (0, 44, 221, 5000, 48, 0, 48, 176, 176, 176, 176, 176, 176, 176, 23, 23, 23, 23, 23, 36, 10, 35, 136, 50, 21, 100, 100, ''), + (0, 45, 225, 5600, 50, 0, 50, 179, 179, 179, 179, 179, 179, 179, 24, 24, 24, 24, 24, 37, 10, 36, 139, 56, 21, 100, 100, ''), + (0, 46, 229, 6000, 50, 0, 50, 182, 182, 182, 182, 182, 182, 182, 24, 24, 24, 24, 24, 38, 10, 44, 152, 60, 21, 100, 100, ''), + (0, 47, 233, 6500, 50, 0, 50, 185, 185, 185, 185, 185, 185, 185, 25, 25, 25, 25, 25, 39, 10, 51, 165, 65, 21, 100, 100, ''), + (0, 48, 237, 7500, 50, 0, 50, 188, 188, 188, 188, 188, 188, 188, 25, 25, 25, 25, 25, 39, 10, 59, 178, 75, 21, 100, 100, ''), + (0, 49, 241, 8500, 50, 0, 50, 191, 191, 191, 191, 191, 191, 191, 26, 26, 26, 26, 26, 40, 10, 66, 191, 85, 21, 100, 100, ''), + (0, 50, 245, 10000, 50, 0, 50, 194, 194, 194, 194, 194, 194, 194, 26, 26, 26, 26, 26, 41, 10, 74, 204, 100, 21, 100, 100, ''), + (0, 51, 249, 11700, 53, 0, 53, 197, 197, 197, 197, 197, 197, 197, 27, 27, 27, 27, 27, 42, 11, 78, 231, 117, 20, 100, 100, ''), + (0, 52, 253, 13400, 56, 0, 56, 200, 200, 200, 200, 200, 200, 200, 27, 27, 27, 27, 27, 43, 12, 81, 258, 134, 20, 100, 100, ''), + (0, 53, 257, 15100, 59, 0, 59, 203, 203, 203, 203, 203, 203, 203, 28, 28, 28, 28, 28, 43, 13, 85, 284, 151, 20, 100, 100, ''), + (0, 54, 261, 16800, 62, 10, 62, 206, 206, 206, 206, 206, 206, 206, 28, 28, 28, 28, 28, 44, 14, 89, 311, 168, 20, 100, 100, ''), + (0, 55, 266, 18500, 65, 10, 65, 210, 210, 210, 210, 210, 210, 210, 29, 29, 29, 29, 29, 45, 15, 93, 338, 185, 20, 100, 100, ''), + (0, 56, 270, 20200, 68, 10, 68, 213, 213, 213, 213, 213, 213, 213, 29, 29, 29, 29, 29, 46, 16, 96, 365, 202, 20, 100, 100, ''), + (0, 57, 274, 21900, 71, 10, 71, 216, 216, 216, 216, 216, 216, 216, 30, 30, 30, 30, 30, 47, 17, 100, 392, 219, 19, 100, 100, ''), + (0, 58, 278, 23600, 74, 10, 74, 219, 219, 219, 219, 219, 219, 219, 30, 30, 30, 30, 30, 47, 18, 104, 418, 236, 19, 100, 100, '8,1'), + (0, 59, 282, 25300, 77, 10, 77, 222, 222, 222, 222, 222, 222, 222, 31, 31, 31, 31, 31, 48, 19, 107, 445, 253, 19, 100, 100, '8,1'), + (0, 60, 286, 27000, 80, 20, 80, 225, 225, 225, 225, 225, 225, 225, 31, 31, 31, 31, 31, 49, 20, 111, 472, 270, 19, 100, 100, '8,1^21,1'), + (0, 61, 290, 28909, 85, 20, 84, 228, 228, 228, 228, 228, 228, 228, 32, 32, 32, 32, 32, 50, 24, 128, 536, 289, 19, 100, 100, '8,1^21,1'), + (0, 62, 294, 30818, 91, 20, 87, 231, 231, 231, 231, 231, 231, 231, 32, 32, 32, 32, 32, 51, 28, 145, 599, 308, 18, 100, 100, '8,1^21,1'), + (0, 63, 299, 32727, 96, 20, 91, 234, 234, 234, 234, 234, 234, 234, 33, 33, 33, 33, 33, 51, 32, 162, 663, 327, 18, 100, 100, '8,1^21,1'), + (0, 64, 303, 34636, 102, 20, 95, 237, 237, 237, 237, 237, 237, 237, 33, 33, 33, 33, 33, 52, 36, 179, 727, 346, 18, 100, 100, '8,1^21,1'), + (0, 65, 307, 36545, 107, 25, 98, 240, 240, 240, 240, 240, 240, 240, 34, 34, 34, 34, 34, 53, 40, 196, 790, 365, 18, 100, 100, '8,1^21,1'), + (0, 66, 311, 38455, 113, 25, 102, 244, 244, 244, 244, 244, 244, 244, 34, 34, 34, 34, 34, 54, 44, 213, 854, 384, 18, 100, 100, '8,1^21,1'), + (0, 67, 315, 40364, 118, 25, 105, 247, 247, 247, 247, 247, 247, 247, 35, 35, 35, 35, 35, 55, 48, 230, 917, 403, 17, 100, 100, '8,1^21,1'), + (0, 68, 319, 42273, 124, 25, 109, 250, 250, 250, 250, 250, 250, 250, 35, 35, 35, 35, 35, 56, 52, 247, 981, 422, 17, 100, 100, '8,1^21,1'), + (0, 69, 324, 44182, 129, 25, 113, 253, 253, 253, 253, 253, 253, 253, 36, 36, 36, 36, 36, 56, 56, 264, 1045, 441, 17, 100, 100, '8,1^21,1'), + (0, 70, 328, 46091, 135, 30, 116, 256, 256, 256, 256, 256, 256, 256, 36, 36, 36, 36, 36, 57, 60, 281, 1108, 460, 17, 100, 100, '8,1^21,1'), + (0, 71, 332, 48000, 140, 30, 120, 259, 259, 259, 259, 259, 259, 259, 37, 37, 37, 37, 37, 58, 64, 298, 1172, 480, 17, 100, 100, '8,1^21,1'), + (0, 72, 336, 49909, 143, 30, 128, 262, 262, 262, 262, 262, 262, 262, 38, 38, 38, 38, 38, 59, 68, 305, 1193, 499, 17, 100, 100, '8,1^21,1'), + (0, 73, 340, 51818, 145, 30, 135, 265, 265, 265, 265, 265, 265, 265, 39, 39, 39, 39, 39, 60, 72, 312, 1214, 518, 17, 100, 100, '8,1^21,1'), + (0, 74, 344, 53727, 148, 30, 143, 268, 268, 268, 268, 268, 268, 268, 39, 39, 39, 39, 39, 61, 76, 318, 1235, 537, 17, 100, 100, '8,1^21,1'), + (0, 75, 348, 55636, 150, 30, 150, 271, 271, 271, 271, 271, 271, 271, 40, 40, 40, 40, 40, 62, 80, 325, 1256, 556, 17, 100, 100, '8,1^21,1'), + (0, 76, 352, 75000, 160, 30, 160, 274, 274, 274, 274, 274, 274, 274, 41, 41, 41, 41, 41, 63, 84, 400, 1600, 750, 17, 100, 100, '8,1^21,1'), + (0, 77, 356, 90000, 170, 30, 170, 277, 277, 277, 277, 277, 277, 277, 42, 42, 42, 42, 42, 64, 88, 500, 2050, 900, 17, 100, 100, '8,1^21,1'), + (0, 78, 360, 113000, 180, 30, 180, 280, 280, 280, 280, 280, 280, 280, 43, 43, 43, 43, 43, 65, 92, 594, 2323, 1130, 17, 100, 100, '8,1^21,1'), + (0, 79, 364, 130000, 190, 30, 190, 283, 283, 283, 283, 283, 283, 283, 44, 44, 44, 44, 44, 66, 96, 650, 2500, 1300, 17, 100, 100, '8,1^21,1'), + (0, 80, 368, 140000, 200, 30, 200, 286, 286, 286, 286, 286, 286, 286, 45, 45, 45, 45, 45, 67, 100, 720, 2799, 1140, 16, 100, 100, '8,1^21,1'), + (0, 81, 372, 240000, 300, 30, 300, 289, 289, 289, 289, 289, 289, 289, 46, 46, 46, 46, 46, 68, 104, 800, 3599, 2400, 16, 100, 100, '8,1^21,1'), + (0, 82, 376, 340000, 400, 30, 400, 292, 292, 292, 292, 292, 292, 292, 47, 47, 47, 47, 47, 69, 108, 900, 4599, 3400, 16, 100, 100, '8,1^21,1'), + (0, 83, 380, 440000, 410, 30, 410, 295, 295, 295, 295, 295, 295, 295, 48, 48, 48, 48, 48, 70, 112, 1275, 4904, 4400, 16, 100, 100, '8,1^21,1'), + (0, 84, 384, 445000, 420, 30, 420, 298, 298, 298, 298, 298, 298, 298, 49, 49, 49, 49, 49, 71, 116, 1300, 5100, 4450, 16, 100, 100, '8,1^21,1'), + (0, 85, 388, 450000, 430, 30, 430, 301, 301, 301, 301, 301, 301, 301, 50, 50, 50, 50, 50, 72, 120, 1359, 5292, 4500, 16, 100, 100, '8,1^21,1'), + (0, 86, 392, 455000, 440, 30, 440, 304, 304, 304, 304, 304, 304, 304, 51, 51, 51, 51, 51, 73, 124, 1475, 5578, 4550, 16, 100, 100, '8,1^21,1'), + (0, 87, 396, 460000, 450, 30, 450, 307, 307, 307, 307, 307, 307, 307, 52, 52, 52, 52, 52, 74, 128, 1510, 5918, 4600, 16, 100, 100, '8,1^21,1'), + (0, 88, 400, 465000, 460, 30, 460, 310, 310, 310, 310, 310, 310, 310, 53, 53, 53, 53, 53, 75, 132, 1610, 6200, 4650, 16, 100, 100, '8,1^21,1'), + (0, 89, 404, 470000, 470, 30, 470, 313, 313, 313, 313, 313, 313, 313, 54, 54, 54, 54, 54, 76, 136, 1650, 6275, 4700, 16, 100, 100, '8,1^21,1'), + (0, 90, 408, 475000, 480, 30, 480, 316, 316, 316, 316, 316, 316, 316, 55, 55, 55, 55, 55, 77, 140, 1700, 6350, 4750, 16, 100, 100, '8,1^21,1'), + (1, 1, 10, 13, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 1, 1, 1, 1, 1, 1, 12, 1, 7, 0, 30, 100, 100, '13,1^14,1^21,1'), + (1, 2, 13, 32, 0, 0, 0, 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, 1, 1, 2, 12, 1, 10, 0, 30, 100, 100, '13,1^14,1^21,1'), + (1, 3, 17, 52, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 2, 2, 2, 2, 2, 2, 12, 1, 12, 1, 30, 100, 100, '13,1^14,1^21,1'), + (1, 4, 19, 71, 0, 0, 0, 20, 20, 20, 20, 20, 20, 20, 2, 2, 2, 2, 2, 4, 12, 1, 14, 1, 30, 100, 100, '13,1^14,1^21,1'), + (1, 5, 23, 90, 0, 0, 0, 24, 24, 24, 24, 24, 24, 24, 2, 2, 2, 2, 2, 4, 12, 1, 17, 1, 30, 100, 100, '13,1^14,1^21,1'), + (1, 6, 26, 120, 0, 0, 0, 28, 28, 28, 28, 28, 28, 28, 2, 2, 2, 2, 2, 5, 12, 1, 19, 1, 30, 100, 100, '13,1^14,1^21,1'), + (1, 7, 30, 150, 0, 0, 0, 31, 31, 31, 31, 31, 31, 31, 4, 4, 4, 4, 4, 5, 12, 1, 22, 2, 30, 100, 100, '13,1^14,1^21,1'), + (1, 8, 34, 180, 0, 0, 0, 35, 35, 35, 35, 35, 35, 35, 4, 4, 4, 4, 4, 6, 12, 1, 24, 2, 30, 100, 100, '13,1^14,1^21,1'), + (1, 9, 37, 210, 0, 0, 0, 38, 38, 38, 38, 38, 38, 38, 5, 5, 5, 5, 5, 6, 12, 1, 26, 2, 30, 100, 100, '13,1^14,1^21,1'), + (1, 10, 41, 240, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, 5, 5, 5, 5, 5, 7, 12, 1, 29, 2, 30, 100, 100, '13,1^14,1^21,1'), + (1, 11, 44, 281, 0, 0, 0, 46, 46, 46, 46, 46, 46, 46, 6, 6, 6, 6, 6, 8, 12, 4, 32, 3, 30, 100, 100, '13,1^14,1^21,1'), + (1, 12, 48, 322, 0, 0, 0, 50, 50, 50, 50, 50, 50, 50, 6, 6, 6, 6, 6, 10, 12, 5, 36, 3, 30, 100, 100, '13,1^14,1^21,1'), + (1, 13, 52, 362, 0, 0, 0, 54, 54, 54, 54, 54, 54, 54, 7, 7, 7, 7, 7, 10, 12, 7, 38, 4, 30, 100, 100, '13,1^14,1^21,1'), + (1, 14, 55, 403, 0, 0, 0, 58, 58, 58, 58, 58, 58, 58, 7, 7, 7, 7, 7, 11, 12, 8, 42, 4, 30, 100, 100, '13,1^14,1^21,1'), + (1, 15, 62, 457, 0, 0, 0, 61, 61, 61, 61, 61, 61, 61, 7, 7, 7, 7, 7, 12, 12, 8, 44, 5, 30, 100, 100, '13,1^14,1^21,1'), + (1, 16, 71, 511, 0, 0, 0, 65, 65, 65, 65, 65, 65, 65, 8, 8, 8, 8, 8, 12, 12, 10, 47, 5, 30, 100, 100, '13,1^14,1^21,1'), + (1, 17, 78, 565, 0, 0, 0, 68, 68, 68, 68, 68, 68, 68, 8, 8, 8, 8, 8, 13, 12, 10, 49, 6, 30, 100, 100, '13,1^14,1^21,1'), + (1, 18, 86, 619, 0, 0, 0, 72, 72, 72, 72, 72, 72, 72, 8, 8, 8, 8, 8, 13, 12, 11, 50, 6, 30, 100, 100, '13,1^14,1^21,1'), + (1, 19, 94, 673, 0, 0, 0, 76, 76, 76, 76, 76, 76, 76, 8, 8, 8, 8, 8, 14, 12, 11, 53, 7, 30, 100, 100, '13,1^14,1^21,1'), + (1, 20, 102, 727, 0, 0, 0, 79, 79, 79, 79, 79, 79, 79, 10, 10, 10, 10, 10, 14, 12, 12, 55, 7, 30, 100, 100, '13,1^14,1^21,1'), + (1, 21, 109, 781, 0, 0, 0, 83, 83, 83, 83, 83, 83, 83, 10, 10, 10, 10, 10, 16, 12, 12, 58, 8, 30, 100, 100, '13,1^14,1^21,1'), + (1, 22, 114, 854, 0, 0, 0, 86, 86, 86, 86, 86, 86, 86, 10, 10, 10, 10, 10, 17, 12, 12, 60, 9, 30, 100, 100, '13,1^14,1^21,1'), + (1, 23, 119, 928, 0, 0, 0, 90, 90, 90, 90, 90, 90, 90, 11, 11, 11, 11, 11, 17, 12, 12, 62, 9, 30, 100, 100, '13,1^14,1^21,1'), + (1, 24, 124, 1001, 0, 0, 0, 94, 94, 94, 94, 94, 94, 94, 11, 11, 11, 11, 11, 18, 12, 13, 66, 10, 30, 100, 100, '13,1^14,1^21,1'), + (1, 25, 128, 1074, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 12, 12, 12, 12, 12, 19, 12, 13, 68, 11, 30, 100, 100, '13,1^14,1^21,1'), + (1, 26, 133, 1147, 0, 0, 0, 102, 102, 102, 102, 102, 102, 102, 12, 12, 12, 12, 12, 19, 12, 13, 71, 11, 30, 100, 100, '13,1^14,1^21,1'), + (1, 27, 138, 1220, 0, 0, 0, 106, 106, 106, 106, 106, 106, 106, 13, 13, 13, 13, 13, 20, 12, 13, 73, 12, 30, 100, 100, '13,1^14,1^21,1'), + (1, 28, 143, 1294, 0, 0, 0, 109, 109, 109, 109, 109, 109, 109, 13, 13, 13, 13, 13, 22, 12, 14, 77, 13, 30, 100, 100, '13,1^14,1^21,1'), + (1, 29, 148, 1367, 0, 0, 0, 113, 113, 113, 113, 113, 113, 113, 14, 14, 14, 14, 14, 22, 12, 14, 79, 14, 30, 100, 100, '13,1^14,1^21,1'), + (1, 30, 152, 1440, 0, 0, 0, 116, 116, 116, 116, 116, 116, 116, 14, 14, 14, 14, 14, 23, 12, 14, 82, 14, 30, 100, 100, '13,1^14,1^21,1'), + (1, 31, 162, 1896, 5, 0, 5, 125, 125, 125, 125, 125, 125, 125, 16, 16, 16, 16, 16, 24, 12, 17, 89, 19, 30, 100, 100, '13,1^14,1^21,1'), + (1, 32, 170, 2352, 10, 0, 10, 132, 132, 132, 132, 132, 132, 132, 17, 17, 17, 17, 17, 26, 12, 19, 95, 24, 30, 100, 100, '13,1^14,1^21,1'), + (1, 33, 180, 2808, 14, 0, 14, 140, 140, 140, 140, 140, 140, 140, 18, 18, 18, 18, 18, 28, 12, 22, 102, 28, 29, 100, 100, '13,1^14,1^21,1'), + (1, 34, 190, 3264, 19, 0, 19, 148, 148, 148, 148, 148, 148, 148, 19, 19, 19, 19, 19, 30, 12, 24, 108, 33, 28, 100, 100, '13,1^14,1^21,1'), + (1, 35, 199, 3720, 24, 0, 24, 156, 156, 156, 156, 156, 156, 156, 20, 20, 20, 20, 20, 31, 12, 26, 115, 37, 27, 100, 100, '13,1^14,1^21,1'), + (1, 36, 208, 4176, 29, 0, 29, 164, 164, 164, 164, 164, 164, 164, 20, 20, 20, 20, 20, 32, 12, 29, 122, 42, 25, 100, 100, '13,1^14,1^21,1'), + (1, 37, 217, 4632, 34, 0, 34, 172, 172, 172, 172, 172, 172, 172, 22, 22, 22, 22, 22, 35, 12, 31, 128, 46, 24, 100, 100, '13,1^14,1^21,1'), + (1, 38, 227, 5088, 38, 0, 38, 180, 180, 180, 180, 180, 180, 180, 23, 23, 23, 23, 23, 36, 12, 34, 136, 51, 23, 100, 100, '13,1^14,1^21,1'), + (1, 39, 235, 5544, 43, 0, 43, 187, 187, 187, 187, 187, 187, 187, 24, 24, 24, 24, 24, 38, 12, 36, 142, 55, 22, 100, 100, '13,1^14,1^21,1'), + (1, 40, 245, 6000, 48, 0, 48, 196, 196, 196, 196, 196, 196, 196, 25, 25, 25, 25, 25, 40, 12, 38, 149, 60, 21, 100, 100, '13,1^14,1^21,1'), + (1, 41, 250, 6360, 50, 0, 50, 199, 199, 199, 199, 199, 199, 199, 26, 26, 26, 26, 26, 41, 12, 40, 152, 64, 21, 100, 100, '13,1^14,1^21,1'), + (1, 42, 254, 6720, 53, 0, 53, 203, 203, 203, 203, 203, 203, 203, 26, 26, 26, 26, 26, 42, 12, 41, 156, 67, 21, 100, 100, '13,1^14,1^21,1'), + (1, 43, 260, 7080, 55, 0, 55, 208, 208, 208, 208, 208, 208, 208, 28, 28, 28, 28, 28, 42, 12, 41, 160, 71, 21, 100, 100, '13,1^14,1^21,1'), + (1, 44, 265, 7440, 58, 0, 58, 211, 211, 211, 211, 211, 211, 211, 28, 28, 28, 28, 28, 43, 12, 42, 163, 74, 21, 100, 100, '13,1^14,1^21,1'), + (1, 45, 270, 7800, 60, 0, 60, 215, 215, 215, 215, 215, 215, 215, 29, 29, 29, 29, 29, 44, 12, 43, 167, 78, 21, 100, 100, '13,1^14,1^21,1'), + (1, 46, 275, 8640, 60, 0, 60, 218, 218, 218, 218, 218, 218, 218, 29, 29, 29, 29, 29, 46, 12, 53, 182, 86, 21, 100, 100, '13,1^14,1^21,1'), + (1, 47, 280, 9480, 60, 0, 60, 222, 222, 222, 222, 222, 222, 222, 30, 30, 30, 30, 30, 47, 12, 61, 198, 95, 21, 100, 100, '13,1^14,1^21,1'), + (1, 48, 284, 10320, 60, 0, 60, 226, 226, 226, 226, 226, 226, 226, 30, 30, 30, 30, 30, 47, 12, 71, 214, 103, 21, 100, 100, '13,1^14,1^21,1'), + (1, 49, 289, 11160, 60, 0, 60, 229, 229, 229, 229, 229, 229, 229, 31, 31, 31, 31, 31, 48, 12, 79, 229, 112, 21, 100, 100, '13,1^14,1^21,1'), + (1, 50, 294, 12000, 60, 0, 60, 233, 233, 233, 233, 233, 233, 233, 31, 31, 31, 31, 31, 49, 12, 89, 245, 120, 21, 100, 100, '13,1^14,1^21,1'), + (1, 51, 299, 14040, 64, 0, 64, 236, 236, 236, 236, 236, 236, 236, 32, 32, 32, 32, 32, 50, 13, 94, 277, 140, 20, 100, 100, '13,1^14,1^21,1'), + (1, 52, 304, 16080, 67, 0, 67, 240, 240, 240, 240, 240, 240, 240, 32, 32, 32, 32, 32, 52, 14, 97, 310, 161, 20, 100, 100, '13,1^14,1^21,1'), + (1, 53, 308, 18120, 71, 0, 71, 244, 244, 244, 244, 244, 244, 244, 34, 34, 34, 34, 34, 52, 16, 102, 341, 181, 20, 100, 100, '13,1^14,1^21,1'), + (1, 54, 313, 20160, 74, 0, 74, 247, 247, 247, 247, 247, 247, 247, 34, 34, 34, 34, 34, 53, 17, 107, 373, 202, 20, 100, 100, '13,1^14,1^21,1'), + (1, 55, 319, 22200, 78, 0, 78, 252, 252, 252, 252, 252, 252, 252, 35, 35, 35, 35, 35, 54, 18, 112, 406, 222, 20, 100, 100, '13,1^14,1^21,1'), + (1, 56, 324, 24240, 82, 0, 82, 256, 256, 256, 256, 256, 256, 256, 35, 35, 35, 35, 35, 55, 19, 115, 438, 242, 20, 100, 100, '13,1^14,1^21,1'), + (1, 57, 329, 26280, 85, 0, 85, 259, 259, 259, 259, 259, 259, 259, 36, 36, 36, 36, 36, 56, 20, 120, 470, 263, 19, 100, 100, '13,1^14,1^21,1'), + (1, 58, 334, 28320, 89, 0, 89, 263, 263, 263, 263, 263, 263, 263, 36, 36, 36, 36, 36, 56, 22, 125, 502, 283, 19, 100, 100, '13,1^14,1^21,1'), + (1, 59, 338, 30360, 92, 0, 92, 266, 266, 266, 266, 266, 266, 266, 37, 37, 37, 37, 37, 58, 23, 128, 534, 304, 19, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 60, 343, 32400, 96, 30, 96, 270, 270, 270, 270, 270, 270, 270, 37, 37, 37, 37, 37, 59, 24, 133, 566, 324, 19, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 61, 348, 34691, 102, 30, 101, 274, 274, 274, 274, 274, 274, 274, 38, 38, 38, 38, 38, 60, 29, 154, 643, 347, 19, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 62, 353, 36982, 109, 30, 104, 277, 277, 277, 277, 277, 277, 277, 38, 38, 38, 38, 38, 61, 34, 174, 719, 370, 18, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 63, 359, 39272, 115, 30, 109, 281, 281, 281, 281, 281, 281, 281, 40, 40, 40, 40, 40, 61, 38, 194, 796, 393, 18, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 64, 364, 41563, 122, 30, 114, 284, 284, 284, 284, 284, 284, 284, 40, 40, 40, 40, 40, 62, 43, 215, 872, 416, 18, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 65, 368, 43854, 128, 35, 118, 288, 288, 288, 288, 288, 288, 288, 41, 41, 41, 41, 41, 64, 48, 235, 948, 439, 18, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 66, 373, 46146, 136, 35, 122, 293, 293, 293, 293, 293, 293, 293, 41, 41, 41, 41, 41, 65, 53, 256, 1025, 461, 18, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 67, 378, 48437, 142, 35, 126, 296, 296, 296, 296, 296, 296, 296, 42, 42, 42, 42, 42, 66, 58, 276, 1100, 484, 17, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 68, 383, 50728, 149, 35, 131, 300, 300, 300, 300, 300, 300, 300, 42, 42, 42, 42, 42, 67, 62, 296, 1177, 507, 17, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 69, 389, 53018, 155, 35, 136, 304, 304, 304, 304, 304, 304, 304, 43, 43, 43, 43, 43, 67, 67, 317, 1254, 530, 17, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 70, 394, 55309, 162, 40, 139, 307, 307, 307, 307, 307, 307, 307, 43, 43, 43, 43, 43, 68, 72, 337, 1330, 553, 17, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 71, 398, 57600, 168, 40, 144, 311, 311, 311, 311, 311, 311, 311, 44, 44, 44, 44, 44, 70, 77, 358, 1406, 576, 17, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 72, 403, 57600, 172, 40, 154, 314, 314, 314, 314, 314, 314, 314, 46, 46, 46, 46, 46, 71, 82, 366, 1432, 576, 17, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 73, 408, 57600, 174, 40, 162, 318, 318, 318, 318, 318, 318, 318, 47, 47, 47, 47, 47, 72, 86, 374, 1457, 576, 17, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 74, 413, 57600, 178, 40, 172, 322, 322, 322, 322, 322, 322, 322, 47, 47, 47, 47, 47, 73, 91, 382, 1482, 576, 17, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 75, 418, 57600, 180, 40, 180, 325, 325, 325, 325, 325, 325, 325, 48, 48, 48, 48, 48, 74, 96, 390, 1507, 576, 17, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 76, 423, 90000, 192, 45, 192, 329, 329, 329, 329, 329, 329, 329, 49, 49, 49, 49, 49, 76, 101, 480, 1920, 900, 17, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 77, 428, 108000, 204, 45, 204, 332, 332, 332, 332, 332, 332, 332, 50, 50, 50, 50, 50, 77, 106, 600, 2460, 1080, 17, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 78, 433, 135600, 216, 45, 216, 336, 336, 336, 336, 336, 336, 336, 52, 52, 52, 52, 52, 78, 110, 713, 2788, 1356, 17, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 79, 438, 156000, 228, 45, 228, 340, 340, 340, 340, 340, 340, 340, 53, 53, 53, 53, 53, 79, 115, 780, 3000, 1560, 17, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 80, 443, 168000, 240, 45, 240, 343, 343, 343, 343, 343, 343, 343, 54, 54, 54, 54, 54, 80, 120, 864, 3359, 1680, 16, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 81, 448, 288000, 360, 45, 360, 347, 347, 347, 347, 347, 347, 347, 55, 55, 55, 55, 55, 82, 125, 960, 4319, 2880, 16, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 82, 453, 408000, 480, 45, 480, 350, 350, 350, 350, 350, 350, 350, 56, 56, 56, 56, 56, 83, 130, 1080, 5519, 4080, 16, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 83, 458, 528000, 492, 45, 492, 354, 354, 354, 354, 354, 354, 354, 58, 58, 58, 58, 58, 84, 134, 1530, 5885, 5280, 16, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 84, 463, 534000, 504, 45, 504, 358, 358, 358, 358, 358, 358, 358, 59, 59, 59, 59, 59, 85, 139, 1560, 6120, 5340, 16, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 85, 468, 540000, 516, 45, 516, 361, 361, 361, 361, 361, 361, 361, 60, 60, 60, 60, 60, 86, 144, 1631, 6350, 5400, 16, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 86, 473, 546000, 528, 45, 528, 365, 365, 365, 365, 365, 365, 365, 61, 61, 61, 61, 61, 88, 149, 1770, 6694, 5460, 16, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 87, 478, 552000, 540, 45, 540, 368, 368, 368, 368, 368, 368, 368, 62, 62, 62, 62, 62, 89, 154, 1812, 7102, 5520, 16, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 88, 483, 558000, 552, 45, 552, 372, 372, 372, 372, 372, 372, 372, 64, 64, 64, 64, 64, 90, 158, 1932, 7440, 5580, 16, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 89, 488, 564000, 564, 45, 564, 376, 376, 376, 376, 376, 376, 376, 65, 65, 65, 65, 65, 91, 163, 1980, 7530, 5640, 16, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (1, 90, 490, 570000, 576, 45, 576, 379, 379, 379, 379, 379, 379, 379, 66, 66, 66, 66, 66, 92, 168, 2040, 7620, 5700, 16, 100, 100, '1,1^8,1^13,1^14,1^21,1'), + (2, 1, 12, 17, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 2, 2, 2, 2, 2, 2, 15, 2, 9, 0, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 2, 17, 41, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 4, 4, 4, 4, 4, 4, 15, 2, 12, 0, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 3, 21, 65, 0, 0, 0, 21, 21, 21, 21, 21, 21, 21, 6, 6, 6, 6, 6, 6, 15, 2, 15, 1, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 4, 24, 89, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 8, 8, 8, 8, 8, 8, 15, 2, 18, 1, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 5, 29, 113, 0, 0, 0, 30, 30, 30, 30, 30, 30, 30, 10, 10, 10, 10, 10, 10, 15, 2, 21, 1, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 6, 33, 150, 0, 0, 0, 35, 35, 35, 35, 35, 35, 35, 12, 12, 12, 12, 12, 12, 15, 2, 24, 2, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 7, 38, 188, 0, 0, 0, 39, 39, 39, 39, 39, 39, 39, 14, 14, 14, 14, 14, 14, 15, 2, 27, 2, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 8, 42, 225, 0, 0, 0, 44, 44, 44, 44, 44, 44, 44, 16, 16, 16, 16, 16, 16, 15, 2, 30, 2, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 9, 47, 263, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 18, 18, 18, 18, 18, 18, 15, 2, 33, 3, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 10, 51, 300, 0, 0, 0, 53, 53, 53, 53, 53, 53, 53, 20, 20, 20, 20, 20, 20, 15, 2, 36, 3, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 11, 56, 351, 0, 0, 0, 57, 57, 57, 57, 57, 57, 57, 22, 22, 22, 22, 22, 22, 15, 5, 41, 4, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 12, 60, 402, 0, 0, 0, 63, 63, 63, 63, 63, 63, 63, 24, 24, 24, 24, 24, 24, 15, 6, 45, 4, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 13, 65, 453, 0, 0, 0, 68, 68, 68, 68, 68, 68, 68, 26, 26, 26, 26, 26, 26, 15, 9, 48, 5, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 14, 69, 504, 0, 0, 0, 72, 72, 72, 72, 72, 72, 72, 28, 28, 28, 28, 28, 28, 15, 11, 53, 5, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 15, 78, 572, 0, 0, 0, 77, 77, 77, 77, 77, 77, 77, 30, 30, 30, 30, 30, 30, 15, 11, 56, 6, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 16, 89, 639, 0, 0, 0, 81, 81, 81, 81, 81, 81, 81, 32, 32, 32, 32, 32, 32, 15, 12, 59, 6, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 17, 98, 707, 0, 0, 0, 86, 86, 86, 86, 86, 86, 86, 34, 34, 34, 34, 34, 34, 15, 12, 62, 7, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 18, 108, 774, 0, 0, 0, 90, 90, 90, 90, 90, 90, 90, 36, 36, 36, 36, 36, 36, 15, 14, 63, 8, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 19, 117, 842, 0, 0, 0, 95, 95, 95, 95, 95, 95, 95, 38, 38, 38, 38, 38, 38, 15, 14, 66, 8, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 20, 128, 909, 0, 0, 0, 99, 99, 99, 99, 99, 99, 99, 40, 40, 40, 40, 40, 40, 15, 15, 69, 9, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 21, 137, 977, 0, 0, 0, 104, 104, 104, 104, 104, 104, 104, 42, 42, 42, 42, 42, 42, 15, 15, 72, 10, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 22, 143, 1068, 0, 0, 0, 108, 108, 108, 108, 108, 108, 108, 44, 44, 44, 44, 44, 44, 15, 15, 75, 11, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 23, 149, 1160, 0, 0, 0, 113, 113, 113, 113, 113, 113, 113, 46, 46, 46, 46, 46, 46, 15, 15, 78, 12, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 24, 155, 1251, 0, 0, 0, 117, 117, 117, 117, 117, 117, 117, 48, 48, 48, 48, 48, 48, 15, 17, 83, 13, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 25, 161, 1343, 0, 0, 0, 122, 122, 122, 122, 122, 122, 122, 50, 50, 50, 50, 50, 50, 15, 17, 86, 13, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 26, 167, 1434, 0, 0, 0, 128, 128, 128, 128, 128, 128, 128, 52, 52, 52, 52, 52, 52, 15, 17, 89, 14, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 27, 173, 1526, 0, 0, 0, 132, 132, 132, 132, 132, 132, 132, 54, 54, 54, 54, 54, 54, 15, 17, 92, 15, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 28, 179, 1617, 0, 0, 0, 137, 137, 137, 137, 137, 137, 137, 56, 56, 56, 56, 56, 56, 15, 18, 96, 16, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 29, 185, 1709, 0, 0, 0, 141, 141, 141, 141, 141, 141, 141, 58, 58, 58, 58, 58, 58, 15, 18, 99, 17, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 30, 191, 1800, 0, 0, 0, 146, 146, 146, 146, 146, 146, 146, 60, 60, 60, 60, 60, 60, 15, 18, 102, 18, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 31, 203, 2370, 6, 0, 6, 156, 156, 156, 156, 156, 156, 156, 62, 62, 62, 62, 62, 62, 15, 21, 111, 24, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 32, 213, 2940, 12, 0, 12, 165, 165, 165, 165, 165, 165, 165, 64, 64, 64, 64, 64, 64, 15, 24, 119, 29, 30, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 33, 225, 3510, 18, 0, 18, 176, 176, 176, 176, 176, 176, 176, 66, 66, 66, 66, 66, 66, 15, 27, 128, 35, 29, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 34, 237, 4080, 24, 0, 24, 185, 185, 185, 185, 185, 185, 185, 68, 68, 68, 68, 68, 68, 15, 30, 135, 41, 28, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 35, 249, 4650, 30, 0, 30, 195, 195, 195, 195, 195, 195, 195, 70, 70, 70, 70, 70, 70, 15, 33, 144, 47, 27, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 36, 260, 5220, 36, 0, 36, 206, 206, 206, 206, 206, 206, 206, 72, 72, 72, 72, 72, 72, 15, 36, 153, 52, 25, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 37, 272, 5790, 42, 0, 42, 215, 215, 215, 215, 215, 215, 215, 74, 74, 74, 74, 74, 74, 15, 39, 161, 58, 24, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 38, 284, 6360, 48, 0, 48, 225, 225, 225, 225, 225, 225, 225, 76, 76, 76, 76, 76, 76, 15, 42, 170, 64, 23, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 39, 294, 6930, 54, 0, 54, 234, 234, 234, 234, 234, 234, 234, 78, 78, 78, 78, 78, 78, 15, 45, 177, 69, 22, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 40, 306, 7500, 60, 0, 60, 245, 245, 245, 245, 245, 245, 245, 80, 80, 80, 80, 80, 80, 15, 48, 186, 75, 21, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 41, 312, 7950, 63, 0, 63, 249, 249, 249, 249, 249, 249, 249, 82, 82, 82, 82, 82, 82, 15, 50, 191, 80, 21, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 42, 318, 8400, 66, 0, 66, 254, 254, 254, 254, 254, 254, 254, 84, 84, 84, 84, 84, 84, 15, 51, 195, 84, 21, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 43, 326, 11000, 69, 0, 69, 260, 260, 260, 260, 260, 260, 260, 86, 86, 86, 86, 86, 86, 15, 51, 200, 110, 21, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 44, 332, 25000, 72, 0, 72, 264, 264, 264, 264, 264, 264, 264, 88, 88, 88, 88, 88, 88, 15, 53, 204, 250, 21, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 45, 338, 35000, 75, 0, 75, 269, 269, 269, 269, 269, 269, 269, 90, 90, 90, 90, 90, 90, 15, 54, 209, 350, 21, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 46, 344, 45000, 75, 0, 75, 273, 273, 273, 273, 273, 273, 273, 92, 92, 92, 92, 92, 92, 15, 66, 228, 450, 21, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 47, 350, 55000, 75, 0, 75, 278, 278, 278, 278, 278, 278, 278, 94, 94, 94, 94, 94, 94, 15, 77, 248, 550, 21, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 48, 356, 70000, 75, 0, 75, 282, 282, 282, 282, 282, 282, 282, 96, 96, 96, 96, 96, 96, 15, 89, 267, 700, 21, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 49, 362, 85000, 75, 0, 75, 287, 287, 287, 287, 287, 287, 287, 98, 98, 98, 98, 98, 98, 15, 99, 287, 850, 21, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 50, 368, 100000, 75, 0, 75, 291, 291, 291, 291, 291, 291, 291, 100, 100, 100, 100, 100, 100, 15, 111, 306, 1000, 21, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 51, 374, 130000, 80, 0, 80, 296, 296, 296, 296, 296, 296, 296, 102, 102, 102, 102, 102, 102, 17, 117, 347, 1300, 20, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 52, 380, 140000, 84, 0, 84, 300, 300, 300, 300, 300, 300, 300, 104, 104, 104, 104, 104, 104, 18, 122, 387, 1400, 20, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 53, 386, 150000, 89, 0, 89, 305, 305, 305, 305, 305, 305, 305, 106, 106, 106, 106, 106, 106, 20, 128, 426, 1500, 19, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 54, 392, 160000, 93, 0, 93, 309, 309, 309, 309, 309, 309, 309, 108, 108, 108, 108, 108, 108, 21, 134, 467, 1600, 19, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 55, 399, 170000, 98, 0, 98, 315, 315, 315, 315, 315, 315, 315, 110, 110, 110, 110, 110, 110, 23, 140, 507, 1700, 18, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 56, 405, 180000, 102, 0, 102, 320, 320, 320, 320, 320, 320, 320, 112, 112, 112, 112, 112, 112, 24, 144, 548, 1800, 17, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 57, 411, 190000, 107, 0, 107, 324, 324, 324, 324, 324, 324, 324, 114, 114, 114, 114, 114, 114, 26, 150, 588, 1900, 17, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 58, 417, 200000, 111, 0, 111, 329, 329, 329, 329, 329, 329, 329, 116, 116, 116, 116, 116, 116, 27, 156, 627, 2000, 16, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 59, 434, 400750, 130, 0, 125, 253, 253, 253, 253, 253, 253, 253, 118, 118, 118, 118, 118, 118, 19, 170, 700, 4008, 16, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 60, 476, 450813, 140, 0, 129, 258, 258, 258, 258, 258, 258, 258, 120, 120, 120, 120, 120, 120, 22, 185, 740, 4508, 15, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 61, 517, 500875, 145, 0, 130, 263, 263, 263, 263, 263, 263, 263, 122, 122, 122, 122, 122, 122, 26, 195, 780, 5009, 15, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 62, 559, 550938, 150, 0, 140, 268, 268, 268, 268, 268, 268, 268, 124, 124, 124, 124, 124, 124, 29, 210, 800, 5509, 15, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 63, 600, 601000, 155, 0, 160, 273, 273, 273, 273, 273, 273, 273, 126, 126, 126, 126, 126, 126, 32, 220, 825, 6010, 15, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 64, 563, 734167, 160, 0, 170, 277, 277, 277, 277, 277, 277, 277, 128, 128, 128, 128, 128, 128, 50, 241, 850, 7342, 15, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 65, 525, 867333, 165, 0, 180, 281, 281, 281, 281, 281, 281, 281, 130, 130, 130, 130, 130, 130, 67, 262, 875, 8673, 14, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 66, 488, 1000500, 170, 0, 190, 285, 285, 285, 285, 285, 285, 285, 132, 132, 132, 132, 132, 132, 85, 283, 904, 10005, 14, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 67, 498, 1013841, 175, 10, 200, 292, 292, 292, 292, 292, 292, 292, 134, 134, 134, 134, 134, 134, 81, 312, 1071, 10138, 14, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 68, 508, 1027182, 180, 20, 225, 300, 300, 300, 300, 300, 300, 300, 136, 136, 136, 136, 136, 136, 77, 341, 1238, 10272, 14, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 69, 519, 1040522, 185, 30, 239, 307, 307, 307, 307, 307, 307, 307, 138, 138, 138, 138, 138, 138, 72, 369, 1404, 10405, 14, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 70, 529, 1053863, 190, 40, 245, 315, 315, 315, 315, 315, 315, 315, 140, 140, 140, 140, 140, 140, 68, 398, 1571, 10539, 14, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 71, 539, 1067204, 200, 50, 255, 322, 322, 322, 322, 322, 322, 322, 142, 142, 142, 142, 142, 142, 64, 427, 1738, 10672, 14, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 72, 547, 1262903, 220, 56, 265, 327, 327, 327, 327, 327, 327, 327, 144, 144, 144, 144, 144, 144, 68, 520, 1979, 12629, 14, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 73, 556, 1458602, 253, 63, 285, 332, 332, 332, 332, 332, 332, 332, 146, 146, 146, 146, 146, 146, 72, 614, 2219, 14586, 13, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 74, 564, 1654301, 306, 69, 300, 337, 337, 337, 337, 337, 337, 337, 148, 148, 148, 148, 148, 148, 76, 707, 2460, 16543, 13, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 75, 572, 1850000, 330, 75, 310, 342, 342, 342, 342, 342, 342, 342, 150, 150, 150, 150, 150, 150, 80, 725, 2700, 18500, 13, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 76, 579, 1900000, 348, 77, 320, 346, 346, 346, 346, 346, 346, 346, 152, 152, 152, 152, 152, 152, 84, 750, 2960, 19000, 13, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 77, 586, 1950000, 355, 79, 330, 350, 350, 350, 350, 350, 350, 350, 154, 154, 154, 154, 154, 154, 88, 775, 3000, 19500, 13, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 78, 594, 2000000, 365, 81, 340, 354, 354, 354, 354, 354, 354, 354, 156, 156, 156, 156, 156, 156, 92, 800, 3100, 20000, 13, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 79, 601, 2050000, 375, 83, 350, 358, 358, 358, 358, 358, 358, 358, 158, 158, 158, 158, 158, 158, 96, 825, 3200, 20500, 13, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 80, 608, 2100000, 380, 85, 360, 362, 362, 362, 362, 362, 362, 362, 160, 160, 160, 160, 160, 160, 100, 850, 3300, 21000, 13, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 81, 615, 2480000, 385, 83, 370, 366, 366, 366, 366, 366, 366, 366, 162, 162, 162, 162, 162, 162, 104, 875, 3350, 24800, 13, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 82, 622, 2860000, 390, 81, 380, 370, 370, 370, 370, 370, 370, 370, 164, 164, 164, 164, 164, 164, 108, 900, 3400, 28600, 13, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 83, 629, 3240000, 395, 79, 390, 375, 375, 375, 375, 375, 375, 375, 166, 166, 166, 166, 166, 166, 112, 925, 3450, 32400, 13, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 84, 636, 3620000, 400, 77, 400, 379, 379, 379, 379, 379, 379, 379, 168, 168, 168, 168, 168, 168, 116, 940, 3500, 36200, 13, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 85, 643, 4000000, 405, 75, 410, 383, 383, 383, 383, 383, 383, 383, 170, 170, 170, 170, 170, 170, 120, 960, 3550, 40000, 12, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 86, 650, 4800000, 410, 77, 420, 387, 387, 387, 387, 387, 387, 387, 172, 172, 172, 172, 172, 172, 124, 980, 3600, 48000, 12, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 87, 657, 5600000, 415, 79, 430, 391, 391, 391, 391, 391, 391, 391, 174, 174, 174, 174, 174, 174, 128, 1000, 3650, 56000, 12, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 88, 665, 6400000, 420, 81, 440, 395, 395, 395, 395, 395, 395, 395, 176, 176, 176, 176, 176, 176, 132, 1010, 3700, 64000, 12, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 89, 672, 7200000, 420, 83, 445, 399, 399, 399, 399, 399, 399, 399, 178, 178, 178, 178, 178, 178, 136, 1018, 3800, 72000, 12, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2, 90, 679, 8000000, 420, 85, 450, 403, 403, 403, 403, 403, 403, 403, 180, 180, 180, 180, 180, 180, 140, 1050, 3900, 80000, 12, 100, 100, '1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'); \ No newline at end of file From 2da6acee6cb36d5b4ab6cd448c2338be05d4ff12 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Fri, 4 Jan 2019 18:45:11 -0600 Subject: [PATCH 07/20] Update user_tables.txt [skip ci] --- utils/sql/user_tables.txt | 57 ++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/utils/sql/user_tables.txt b/utils/sql/user_tables.txt index a76e110f3..35fd57015 100644 --- a/utils/sql/user_tables.txt +++ b/utils/sql/user_tables.txt @@ -10,31 +10,32 @@ Banned_IPs bugs buyer char_recipe_list -character_data -character_currency -character_alternate_abilities -character_bind -character_corpses -character_corpse_items -character_languages -character_skills -character_spells -character_memmed_spells -character_disciplines -character_material -character_tribute -character_bandolier -character_potionbelt -character_inspect_messages -character_leadership_abilities character_activities character_alt_currency +character_alternate_abilities +character_auras +character_bandolier +character_bind character_buffs +character_corpse_items +character_corpses +character_currency +character_data +character_disciplines character_enabledtasks +character_inspect_messages +character_languages +character_leadership_abilities +character_material +character_memmed_spells character_pet_buffs character_pet_info character_pet_inventory +character_potionbelt +character_skills +character_spells character_tasks +character_tribute chatchannels completed_tasks discovered_items @@ -44,11 +45,11 @@ friends gm_ips group_id group_leaders -guilds guild_bank +guild_members guild_ranks guild_relations -guild_members +guilds hackers instance_list_player inventory @@ -62,6 +63,14 @@ merchantlist_temp object_contents petitions player_titlesets +qs_merchant_transaction_record +qs_merchant_transaction_record_entries +qs_player_aa_rate_hourly +qs_player_delete_record +qs_player_delete_record_entries +qs_player_events +qs_player_handin_record +qs_player_handin_record_entries qs_player_move_record qs_player_move_record_entries qs_player_npc_kill_record @@ -69,14 +78,6 @@ qs_player_npc_kill_record_entries qs_player_speech qs_player_trade_record qs_player_trade_record_entries -qs_merchant_transaction_record -qs_merchant_transaction_record_entries -qs_player_delete_record -qs_player_delete_record_entries -qs_player_handin_record -qs_player_handin_record_entries -qs_player_aa_rate_hourly -qs_player_events quest_globals raid_details raid_leaders @@ -84,8 +85,8 @@ raid_members reports respawn_times sharedbank -spell_globals spell_buckets +spell_globals timers trader trader_audit From e5021241b256453d2b3b12f7b66aa1cfc3adbbad Mon Sep 17 00:00:00 2001 From: Akkadius Date: Fri, 4 Jan 2019 18:56:53 -0600 Subject: [PATCH 08/20] Update user_tables.txt [skip ci] --- utils/sql/user_tables.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/sql/user_tables.txt b/utils/sql/user_tables.txt index 35fd57015..9806395e8 100644 --- a/utils/sql/user_tables.txt +++ b/utils/sql/user_tables.txt @@ -24,6 +24,7 @@ character_data character_disciplines character_enabledtasks character_inspect_messages +character_item_recast character_languages character_leadership_abilities character_material From 4471a0aab50e19f8064f97c1fb03ee9e88904503 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Fri, 4 Jan 2019 18:58:57 -0600 Subject: [PATCH 09/20] Update system_tables [skip ci] --- utils/sql/system_tables.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/sql/system_tables.txt b/utils/sql/system_tables.txt index e3eb0cdcc..d1c1b454c 100644 --- a/utils/sql/system_tables.txt +++ b/utils/sql/system_tables.txt @@ -20,6 +20,7 @@ class_skill damageshieldtypes data_buckets doors +eqtime faction_list faction_list_mod fear_hints From 57c3e9d14606b9f8058420c7b7ca8d3008bfc4f8 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Fri, 4 Jan 2019 19:03:02 -0600 Subject: [PATCH 10/20] Update system_tables [skip ci] --- utils/sql/system_tables.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/sql/system_tables.txt b/utils/sql/system_tables.txt index d1c1b454c..61d58f248 100644 --- a/utils/sql/system_tables.txt +++ b/utils/sql/system_tables.txt @@ -19,6 +19,8 @@ char_create_point_allocations class_skill damageshieldtypes data_buckets +db_str +db_version doors eqtime faction_list @@ -74,6 +76,7 @@ npc_types npc_types_metadata npc_types_tint object +perl_event_export_settings pets pets_equipmentset pets_equipmentset_entries From 030339aab82a4921ff26033e060d555c04a17bf3 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Fri, 4 Jan 2019 19:06:16 -0600 Subject: [PATCH 11/20] Update system_tables.txt [skip ci] --- utils/sql/system_tables.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/utils/sql/system_tables.txt b/utils/sql/system_tables.txt index 61d58f248..672a9ed0d 100644 --- a/utils/sql/system_tables.txt +++ b/utils/sql/system_tables.txt @@ -20,7 +20,6 @@ class_skill damageshieldtypes data_buckets db_str -db_version doors eqtime faction_list From bce36096176e494c1ad741049893553e3d4d0b12 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Fri, 4 Jan 2019 19:15:32 -0600 Subject: [PATCH 12/20] Update system_tables.txt [skip ci] --- utils/sql/system_tables.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/sql/system_tables.txt b/utils/sql/system_tables.txt index 672a9ed0d..a6bcfe81b 100644 --- a/utils/sql/system_tables.txt +++ b/utils/sql/system_tables.txt @@ -14,6 +14,7 @@ auras base_data blocked_spells books +bug_reports char_create_combinations char_create_point_allocations class_skill @@ -36,6 +37,7 @@ ground_spawns horses instance_list items +ip_exemptions ldon_trap_entries ldon_trap_templates level_exp_mods From f3782af10ed1306f3a26b14ee233db11bcf74f6f Mon Sep 17 00:00:00 2001 From: Akkadius Date: Fri, 4 Jan 2019 19:38:33 -0600 Subject: [PATCH 13/20] Update eqemu_server.pl [skip ci] --- utils/scripts/eqemu_server.pl | 798 +++++++++++++++++----------------- 1 file changed, 401 insertions(+), 397 deletions(-) diff --git a/utils/scripts/eqemu_server.pl b/utils/scripts/eqemu_server.pl index 7eff0c2dd..f4adff7a2 100644 --- a/utils/scripts/eqemu_server.pl +++ b/utils/scripts/eqemu_server.pl @@ -15,7 +15,7 @@ use File::Copy qw(copy); use POSIX qw(strftime); use File::Path; use File::Find; -use Time::HiRes qw(usleep); +use Time::HiRes qw(usleep); #::: Variables $install_repository_request_url = "https://raw.githubusercontent.com/Akkadius/EQEmuInstall/master/"; @@ -24,7 +24,7 @@ $eqemu_repository_request_url = "https://raw.githubusercontent.com/EQEmu/Server/ #::: Globals $time_stamp = strftime('%m-%d-%Y', gmtime()); $db_run_stage = 0; #::: Sets database run stage check -if($Config{osname}=~/freebsd|linux/i){ +if($Config{osname}=~/freebsd|linux/i){ $OS = "Linux"; $os_flavor = ""; if(-e "/etc/debian_version"){ @@ -37,8 +37,8 @@ if($Config{osname}=~/freebsd|linux/i){ $os_flavor = "red_hat"; } } -if($Config{osname}=~/Win|MS/i){ - $OS = "Windows"; +if($Config{osname}=~/Win|MS/i){ + $OS = "Windows"; } $has_internet_connection = check_internet_connection(); @@ -70,17 +70,18 @@ get_mysql_path(); #::: Remove old eqemu_update.pl if(-e "eqemu_update.pl"){ unlink("eqemu_update.pl"); -} +} print "[Info] For EQEmu Server management utilities - run eqemu_server.pl\n" if $ARGV[0] eq "ran_from_world"; -#::: Check if db_version table exists... +check_db_version_table(); + +#::: Check if db_version table exists... if(trim(get_mysql_result("SHOW COLUMNS FROM db_version LIKE 'Revision'")) ne "" && $db){ print get_mysql_result("DROP TABLE db_version"); print "[Database] Old db_version table present, dropping...\n\n"; } -check_db_version_table(); check_for_world_bootup_database_update(); sub urlencode { @@ -99,12 +100,12 @@ sub urldecode { sub analytics_insertion { $event_name = urlencode($_[0]); $event_data = urlencode($_[1]); - + #::: Check for internet connection before doing analytics if(!$has_internet_connection || $can_see_analytics_server == -1){ return; } - + #::: Check for analytics server connectivity so that the script doesn't break when its offline if(!$can_see_analytics_server){ if($OS eq "Linux"){ @@ -113,7 +114,7 @@ sub analytics_insertion { if($OS eq "Windows"){ $count = "n"; } - + if (`ping analytics.akkadius.com -$count 1 -w 500`=~/Reply from|1 received/i) { $can_see_analytics_server = 1; } @@ -121,12 +122,12 @@ sub analytics_insertion { $can_see_analytics_server = -1; } } - + $server_name = ""; if($long_name){ - $server_name = "&server_name=" . urlencode($long_name); + $server_name = "&server_name=" . urlencode($long_name); } - + if(!$extended_os){ if($OS eq "Linux"){ $extended_os = `cat /proc/version`; @@ -142,7 +143,7 @@ sub analytics_insertion { } } } - + $url = "http://analytics.akkadius.com/"; $url .= "?api_key=24a0bde2e5bacd65bcab06a9ac40b62c"; $url .= "&event=" . $event_name; @@ -150,14 +151,14 @@ sub analytics_insertion { $url .= "&OS=" . urlencode($OS); $url .= "&extended_os=" . urlencode($extended_os); $url .= $server_name; - - # print "Calling url :: '" . $url . "'\n"; - + + # print "Calling url :: '" . $url . "'\n"; + if($OS eq "Windows"){ eval('require LWP::UserAgent;'); - my $ua = LWP::UserAgent->new; + my $ua = LWP::UserAgent->new; $ua->timeout(1); - $ua->env_proxy; + $ua->env_proxy; my $response = $ua->get($url); } if($OS eq "Linux"){ @@ -213,42 +214,42 @@ sub new_server { $file_count++; } closedir(DIR); - - if($file_count > 4 && (!-e "install_variables.txt" && !-e "../install_variables.txt")){ + + if($file_count > 4 && (!-e "install_variables.txt" && !-e "../install_variables.txt")){ print "[New Server] ERROR: You must run eqemu_server.pl in an empty directory\n"; <>; exit; } - if(-e "install_variables.txt" || -e "../install_variables.txt"){ + if(-e "install_variables.txt" || -e "../install_variables.txt"){ get_installation_variables(); } while(1){ - + $database_name = $installation_variables{"mysql_eqemu_db_name"}; $database_user = $installation_variables{"mysql_eqemu_user"}; $database_password = $installation_variables{"mysql_eqemu_password"}; - + if($database_name ne ""){ $mysql_pass = 1; } else { - + print "\n"; print "[New Server] For a new server folder install, we assume Perl and MySQL are configured\n"; print "[New Server] This will install a fresh PEQ Database, with all server assets\n"; print "[New Server] You will need to supply database credentials to get started...\n\n"; - - check_for_input("MySQL User: "); + + check_for_input("MySQL User: "); $database_user = trim($input); - check_for_input("MySQL Password: "); + check_for_input("MySQL Password: "); $database_password = trim($input); - + $check_connection = `mysql -u $database_user -p$database_password -N -B -e "SHOW PROCESSLIST" > mysqlcheck.txt`; $mysql_pass = 0; - open (MYSQL_CHECK, "mysqlcheck.txt"); + open (MYSQL_CHECK, "mysqlcheck.txt"); while (){ chomp; $o = $_; @@ -258,15 +259,15 @@ sub new_server { close (MYSQL_CHECK); unlink("mysqlcheck.txt"); } - + if($mysql_pass == 1){ - - if((!-e "install_variables.txt" && !-e "../install_variables.txt")){ + + if((!-e "install_variables.txt" && !-e "../install_variables.txt")){ print "[New Server] Success! We have a database connection\n"; - - check_for_input("Specify a NEW database name that PEQ will be installed to: "); + + check_for_input("Specify a NEW database name that PEQ will be installed to: "); $database_name = trim($input); - + #::: Write install vars open (INSTALL_VARS, '>', 'install_variables.txt'); print INSTALL_VARS ""; @@ -276,30 +277,30 @@ sub new_server { close (INSTALL_VARS); } analytics_insertion("new_server::install", $database_name); - + if($OS eq "Linux"){ build_linux_source("login"); } - + do_installer_routines(); - + if($OS eq "Linux"){ print `chmod 755 *.sh`; } - + analytics_insertion("new_server::install_complete", $database_name . " :: Binary DB Version / Local DB Version :: " . $binary_database_version . " / " . $local_database_version); - + print "[New Server] New server folder install complete\n"; print "[New Server] Below is your installation info:\n"; - + show_install_summary_info(); - + if($OS eq "Linux") { unlink('/home/eqemu/install_variables.txt'); } - + rmtree('updates_staged'); - + return; } else { @@ -338,16 +339,16 @@ sub check_xml_to_json_conversion { $json->canonical(1); print $json->pretty->indent_length(5)->utf8->encode($result),"\n"; - + open(my $fh, '>', 'eqemu_config.json'); print $fh $json->pretty->indent_length(5)->utf8->encode($result); close $fh; - + mkdir('backups'); copy_file("eqemu_config.xml", "backups/eqemu_config.xml"); unlink('eqemu_config.xml'); unlink('db_dumper.pl'); - + print "[Server Maintenance] eqemu_config.xml is now DEPRECATED \n"; print "[Server Maintenance] eqemu_config.json is now the new Server config format \n"; print " A backup of this old config is located in the backups folder of your server directory\n"; @@ -357,19 +358,19 @@ sub check_xml_to_json_conversion { print " --- \n"; print " Thanks for your understanding\n"; print " The EQEmulator Team\n\n"; - + exit; } - + } sub build_linux_source { - + $build_options = $_[0]; - + $cmake_options = ""; $source_folder_post_fix = ""; - + if($build_options =~/bots/i){ $cmake_options .= " -DEQEMU_ENABLE_BOTS=ON"; $source_folder_post_fix = "_bots"; @@ -384,11 +385,11 @@ sub build_linux_source { } my $eqemu_server_directory = "/home/eqemu"; my $source_dir = $eqemu_server_directory . '/' . $last_directory . '_source' . $source_folder_post_fix; - + $current_directory = trim($current_directory); - + mkdir($source_dir) if (!-e $source_dir); - + # print 'server_dir: ' . $eqemu_server_directory . "\n"; # print 'source_dir: ' . $source_dir . "\n"; # print 'current_dir: \'' . $current_directory . "'\n"; @@ -396,7 +397,7 @@ sub build_linux_source { chdir($source_dir); print `git clone https://github.com/EQEmu/Server.git`; - + mkdir ($source_dir . "/Server/build") if (!-e $source_dir . "/Server/build"); chdir ($source_dir . "/Server/build"); @@ -404,16 +405,16 @@ sub build_linux_source { if($os_flavor eq "fedora_core"){ print `cmake $cmake_options -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_LUA=ON -DLUA_INCLUDE_DIR=/usr/include/lua-5.1/ -G "Unix Makefiles" ..`; } - else { + else { print `cmake $cmake_options -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_LUA=ON -G "Unix Makefiles" ..`; } print "Building EQEmu Server code. This will take a while."; #::: Build print `make`; - + chdir ($current_directory); - + print `ln -s -f $source_dir/Server/build/bin/eqlaunch .`; print `ln -s -f $source_dir/Server/build/bin/export_client_files .`; print `ln -s -f $source_dir/Server/build/bin/import_client_files .`; @@ -429,24 +430,25 @@ sub build_linux_source { sub do_installer_routines { print "[Install] EQEmu Server Installer... LOADING... PLEASE WAIT...\n"; - + #::: Make some local server directories... mkdir('logs'); mkdir('updates_staged'); mkdir('shared'); - + do_install_config_json(); read_eqemu_config_json(); get_installation_variables(); - + $db_name = "peq"; if($installation_variables{"mysql_eqemu_db_name"}){ $db_name = $installation_variables{"mysql_eqemu_db_name"}; } - + #::: Download assets if($OS eq "Windows"){ - fetch_latest_windows_binaries(); + # fetch_latest_windows_binaries(); + fetch_latest_windows_appveyor(); get_remote_file($install_repository_request_url . "lua51.dll", "lua51.dll", 1); get_remote_file($install_repository_request_url . "zlib1.dll", "zlib1.dll", 1); get_remote_file($install_repository_request_url . "libmysql.dll", "libmysql.dll", 1); @@ -458,30 +460,30 @@ sub do_installer_routines { quest_files_fetch(); lua_modules_fetch(); fetch_utility_scripts(); - + #::: Database Routines print "[Database] Creating Database '" . $db_name . "'\n"; print `"$path" --host $host --user $user --password="$pass" -N -B -e "DROP DATABASE IF EXISTS $db_name;"`; print `"$path" --host $host --user $user --password="$pass" -N -B -e "CREATE DATABASE $db_name"`; - + #::: Get Binary DB version - if($OS eq "Windows"){ @db_version = split(': ', `world db_version`); } - if($OS eq "Linux"){ @db_version = split(': ', `./world db_version`); } + if($OS eq "Windows"){ @db_version = split(': ', `world db_version`); } + if($OS eq "Linux"){ @db_version = split(': ', `./world db_version`); } $binary_database_version = trim($db_version[1]); - + #::: Local DB Version check_db_version_table(); $local_database_version = trim(get_mysql_result("SELECT version FROM db_version LIMIT 1")); - + #::: Download PEQ latest fetch_peq_db_full(); print "[Database] Fetching Latest Database Updates...\n"; main_db_management(); print "[Database] Applying Latest Database Updates...\n"; main_db_management(); - + remove_duplicate_rule_values(); - + if($OS eq "Windows"){ check_windows_firewall_rules(); do_windows_login_server_setup(); @@ -498,12 +500,12 @@ sub check_for_input { } sub check_for_world_bootup_database_update { - if($OS eq "Windows"){ - @db_version = split(': ', `world db_version`); + if($OS eq "Windows"){ + @db_version = split(': ', `world db_version`); + } + if($OS eq "Linux"){ + @db_version = split(': ', `./world db_version`); } - if($OS eq "Linux"){ - @db_version = split(': ', `./world db_version`); - } $binary_database_version = trim($db_version[1]); $local_database_version = trim(get_mysql_result("SELECT version FROM db_version LIMIT 1")); @@ -520,21 +522,21 @@ sub check_for_world_bootup_database_update { database_dump_compress(); print "[Update] Updating bots database...\n"; sleep(1); - bots_db_management(); + bots_db_management(); run_database_check(); print "[Update] Continuing bootup\n"; analytics_insertion("auto database bots upgrade world", $db . " :: Binary DB Version / Local DB Version :: " . $binary_database_version . " / " . $local_database_version); - + exit; } else { print "[Update] Bots database up to Date: Continuing World Bootup...\n"; } } - - if($binary_database_version == $local_database_version && $ARGV[0] eq "ran_from_world"){ - print "[Update] Database up to date...\n"; - exit; + + if($binary_database_version == $local_database_version && $ARGV[0] eq "ran_from_world"){ + print "[Update] Database up to date...\n"; + exit; } else { #::: We ran world - Database needs to update, lets backup and run updates and continue world bootup @@ -548,7 +550,7 @@ sub check_for_world_bootup_database_update { main_db_management(); print "[Update] Continuing bootup\n"; analytics_insertion("auto database upgrade world", $db . " :: Binary DB Version / Local DB Version :: " . $binary_database_version . " / " . $local_database_version); - + exit; } @@ -561,18 +563,18 @@ sub check_for_world_bootup_database_update { } sub check_internet_connection { - if($OS eq "Linux"){ + if($OS eq "Linux"){ $count = "c"; } if($OS eq "Windows"){ $count = "n"; } - if (`ping 8.8.8.8 -$count 1 -w 500`=~/TTL|1 received/i) { + if (`ping 8.8.8.8 -$count 1 -w 500`=~/TTL|1 received/i) { # print "[Update] We have a connection to the internet, continuing...\n"; return 1; } - elsif (`ping 4.2.2.2 -$count 1 -w 500`=~/TTL|1 received/i) { + elsif (`ping 4.2.2.2 -$count 1 -w 500`=~/TTL|1 received/i) { # print "[Update] We have a connection to the internet, continuing...\n"; return 1; } @@ -587,8 +589,8 @@ sub get_perl_version { $perl_version = $^V; $perl_version =~s/v//g; print "[Update] Perl Version is " . $perl_version . "\n" if $debug; - if($perl_version > 5.12){ - no warnings 'uninitialized'; + if($perl_version > 5.12){ + no warnings 'uninitialized'; } no warnings; } @@ -601,37 +603,37 @@ sub get_windows_wget { } sub do_self_update_check_routine { - + #::: Check for internet connection before updating if(!$has_internet_connection){ print "[Update] Cannot check update without internet connection...\n"; return; } - + #::: Check for script changes :: eqemu_server.pl get_remote_file($eqemu_repository_request_url . "utils/scripts/eqemu_server.pl", "updates_staged/eqemu_server.pl", 0, 1, 1); - - if(-e "updates_staged/eqemu_server.pl") { - + + if(-e "updates_staged/eqemu_server.pl") { + my $remote_script_size = -s "updates_staged/eqemu_server.pl"; my $local_script_size = -s "eqemu_server.pl"; - + if($remote_script_size != $local_script_size){ print "[Update] Script has been updated, updating...\n"; - + my @files; my $start_dir = "updates_staged/"; - find( - sub { push @files, $File::Find::name unless -d; }, + find( + sub { push @files, $File::Find::name unless -d; }, $start_dir ); for my $file (@files) { - if($file=~/eqemu_server/i){ + if($file=~/eqemu_server/i){ $destination_file = $file; $destination_file =~s/updates_staged\///g; print "[Install] Installing :: " . $destination_file . "\n"; unlink($destination_file); - copy_file($file, $destination_file); + copy_file($file, $destination_file); if($OS eq "Linux"){ system("chmod 755 eqemu_server.pl"); } @@ -673,10 +675,10 @@ sub get_installation_variables{ sub do_install_config_json { get_installation_variables(); - + #::: Fetch json template get_remote_file($install_repository_request_url . "eqemu_config.json", "eqemu_config_template.json"); - + use JSON; my $json = new JSON(); @@ -688,33 +690,33 @@ sub do_install_config_json { close($fh); $config = $json->decode($content); - + $long_name = "Akkas " . $OS . " PEQ Installer (" . generate_random_password(5) . ')'; $config->{"server"}{"world"}{"longname"} = $long_name; $config->{"server"}{"world"}{"key"} = generate_random_password(30); - + if($installation_variables{"mysql_eqemu_db_name"}){ $db_name = $installation_variables{"mysql_eqemu_db_name"}; } else { $db_name = "peq"; } - + $config->{"server"}{"database"}{"username"} = $installation_variables{"mysql_eqemu_user"}; $config->{"server"}{"database"}{"password"} = $installation_variables{"mysql_eqemu_password"}; $config->{"server"}{"database"}{"db"} = $db_name; - + $config->{"server"}{"qsdatabase"}{"username"} = $installation_variables{"mysql_eqemu_user"}; $config->{"server"}{"qsdatabase"}{"password"} = $installation_variables{"mysql_eqemu_password"}; $config->{"server"}{"qsdatabase"}{"db"} = $db_name; - + $json->canonical(1); $json->indent_length(5); - + open(my $fh, '>', 'eqemu_config.json'); print $fh $json->pretty->indent_length(5)->utf8->encode($config); close $fh; - + unlink("eqemu_config_template.json"); } @@ -722,6 +724,7 @@ sub fetch_utility_scripts { if($OS eq "Windows"){ get_remote_file($install_repository_request_url . "t_database_backup.bat", "t_database_backup.bat"); get_remote_file($install_repository_request_url . "t_start_server.bat", "t_start_server.bat"); + get_remote_file($install_repository_request_url . "t_server_update_binaries_no_bots.bat", "t_server_update_binaries_no_bots.bat"); get_remote_file($install_repository_request_url . "t_start_server_with_login_server.bat", "t_start_server_with_login_server.bat"); get_remote_file($install_repository_request_url . "t_stop_server.bat", "t_stop_server.bat"); get_remote_file($install_repository_request_url . "t_server_crash_report.pl", "t_server_crash_report.pl"); @@ -739,35 +742,35 @@ sub fetch_utility_scripts { sub setup_bots { if($OS eq "Windows"){ - fetch_latest_windows_binaries_bots(); + fetch_latest_windows_binaries_bots(); } if($OS eq "Linux"){ build_linux_source("bots"); } - bots_db_management(); + bots_db_management(); run_database_check(); - + print "Bots should be setup, run your server and the #bot command should be available in-game\n"; } sub show_menu_prompt { $dc = 0; - while (1) { - + while (1) { + if($ARGV[0] ne ""){ $input = trim($ARGV[0]); } else { $input = trim($input); } - + $errored_command = 0; - + if($input eq "database"){ print "\n>>> Database Menu\n\n"; print " [backup_database] Back up database to backups/ directory\n"; - print " [backup_player_tables] Back up player tables to backups/ directory\n"; + print " [backup_player_tables] Back up player tables to backups/ directory\n"; print " [backup_database_compressed] Back up database compressed to backups/ directory\n"; print " \n"; print " [check_db_updates] Checks for database updates manually\n"; @@ -776,7 +779,7 @@ sub show_menu_prompt { print " [aa_tables] Downloads and installs clean slate AA data from PEQ\n"; print " [remove_duplicate_rules] Removes duplicate rules from rule_values table\n"; print " [drop_bots_db_schema] Removes bot database schema\n"; - + print " \n> main - go back to main menu\n"; print "Enter a command #> "; $last_menu = trim($input); @@ -805,7 +808,7 @@ sub show_menu_prompt { print " [setup_loginserver] Sets up loginserver for Windows\n"; } print " \n> main - go back to main menu\n"; - print "Enter a command #> "; + print "Enter a command #> "; $last_menu = trim($input); } elsif($input eq "backup_database"){ database_dump(); $dc = 1; } @@ -850,20 +853,20 @@ sub show_menu_prompt { else { print_main_menu(); } - + #::: Errored command checking if($errored_command == 1){ $input = $last_menu; } elsif($dc == 1){ analytics_insertion("menu", trim($input)); - $dc = 0; + $dc = 0; $input = ""; } else { $input = <>; } - + #::: If we're processing a CLI command, kill the loop if($ARGV[0] ne ""){ analytics_insertion("cli", trim($input)); @@ -871,7 +874,7 @@ sub show_menu_prompt { $ARGV[0] = ""; exit; } - } + } } sub print_main_menu { @@ -885,18 +888,18 @@ sub print_main_menu { print " [conversions] Routines used for conversion of scripts/data \n"; print "\n"; print " exit \n"; - print "\n"; + print "\n"; print "Enter a command #> "; } sub get_mysql_path { if($OS eq "Windows"){ $has_mysql_path = `echo %PATH%`; - if($has_mysql_path=~/MySQL|MariaDB/i){ + if($has_mysql_path=~/MySQL|MariaDB/i){ @mysql = split(';', $has_mysql_path); foreach my $v (@mysql){ - if($v=~/MySQL|MariaDB/i){ - $v =~s/\n//g; + if($v=~/MySQL|MariaDB/i){ + $v =~s/\n//g; $path = trim($v) . "/mysql"; last; } @@ -904,13 +907,13 @@ sub get_mysql_path { } } if($OS eq "Linux"){ - $path = `which mysql`; + $path = `which mysql`; if ($path eq "") { - $path = `which mariadb`; + $path = `which mariadb`; } - $path =~s/\n//g; + $path =~s/\n//g; } - + #::: Path not found, error and exit if($path eq ""){ print "[Error:eqemu_server.pl] MySQL path not found, please add the path for automatic database upgrading to continue... \n\n"; @@ -927,28 +930,28 @@ sub check_for_database_dump_script{ #::: Check for script changes :: database_dumper.pl get_remote_file($eqemu_repository_request_url . "utils/scripts/database_dumper.pl", "updates_staged/database_dumper.pl", 0, 1, 1); - - if(-e "updates_staged/database_dumper.pl") { - + + if(-e "updates_staged/database_dumper.pl") { + my $remote_script_size = -s "updates_staged/database_dumper.pl"; my $local_script_size = -s "database_dumper.pl"; - + if($remote_script_size != $local_script_size){ print "[Update] Script has been updated, updating...\n"; - + my @files; my $start_dir = "updates_staged/"; - find( - sub { push @files, $File::Find::name unless -d; }, + find( + sub { push @files, $File::Find::name unless -d; }, $start_dir ); for my $file (@files) { - if($file=~/database_dumper/i){ + if($file=~/database_dumper/i){ $destination_file = $file; $destination_file =~s/updates_staged\///g; print "[Install] Installing :: " . $destination_file . "\n"; unlink($destination_file); - copy_file($file, $destination_file); + copy_file($file, $destination_file); if($OS eq "Linux"){ system("chmod 755 database_dumper.pl"); } @@ -962,22 +965,22 @@ sub check_for_database_dump_script{ unlink("updates_staged/database_dumper.pl"); } - + return; - + } -sub database_dump { +sub database_dump { check_for_database_dump_script(); print "[Database] Performing database backup....\n"; print `perl database_dumper.pl database="$db" loc="backups"`; } -sub database_dump_player_tables { +sub database_dump_player_tables { check_for_database_dump_script(); print "[Database] Performing database backup of player tables....\n"; get_remote_file($eqemu_repository_request_url . "utils/sql/character_table_list.txt", "backups/character_table_list.txt"); - + $tables = ""; open (FILE, "backups/character_table_list.txt"); $i = 0; @@ -989,20 +992,20 @@ sub database_dump_player_tables { $tables = substr($tables, 0, -1); print `perl database_dumper.pl database="$db" loc="backups" tables="$tables" backup_name="player_tables_export" nolock`; - + print "[Database] Press any key to continue...\n"; <>; #Read from STDIN - + } -sub database_dump_compress { +sub database_dump_compress { check_for_database_dump_script(); print "[Database] Performing database backup....\n"; print `perl database_dumper.pl database="$db" loc="backups" compress`; } -sub script_exit{ +sub script_exit{ #::: Cleanup staged folder... rmtree("updates_staged/"); exit; @@ -1015,7 +1018,7 @@ sub check_db_version_table{ version int(11) DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO db_version (version) VALUES ('1000');"); - print "[Database] Table 'db_version' does not exists.... Creating...\n\n"; + print "[Database] Table 'db_version' does not exist.... Creating...\n\n"; } } @@ -1024,9 +1027,9 @@ sub get_mysql_result{ my $run_query = $_[0]; if(!$db){ return; } if($OS eq "Windows"){ return `"$path" --host $host --user $user --password="$pass" $db -N -B -e "$run_query"`; } - if($OS eq "Linux"){ + if($OS eq "Linux"){ $run_query =~s/`//g; - return `$path --user="$user" --host $host --password="$pass" $db -N -B -e "$run_query"`; + return `$path --user="$user" --host $host --password="$pass" $db -N -B -e "$run_query"`; } } @@ -1045,23 +1048,23 @@ sub get_remote_file{ my $content_type = $_[2]; my $no_retry = $_[3]; my $silent_download = $_[4]; - + if(!$has_internet_connection){ print "[Download] Cannot download without internet connection...\n"; return; } - + #::: Build file path of the destination file so that we may check for the folder's existence and make it if necessary - + if($destination_file=~/\//i){ my @directory_path = split('/', $destination_file); $build_path = ""; $directory_index = 0; while($directory_path[$directory_index] && $directory_path[$directory_index + 1]){ - $build_path .= $directory_path[$directory_index] . "/"; + $build_path .= $directory_path[$directory_index] . "/"; # print "checking '" . $build_path . "'\n"; #::: If path does not exist, create the directory... - if (!-d $build_path) { + if (!-d $build_path) { print "[Copy] folder doesn't exist, creating '" . $build_path . "'\n"; mkdir($build_path); } @@ -1073,70 +1076,70 @@ sub get_remote_file{ $directory_index++; } } - + #::: wget -O db_update/db_update_manifest.txt https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/db_update_manifest.txt $wget = `wget -N --cache=no --no-check-certificate --quiet -O $destination_file $request_url`; print "[Download] Saved: (" . $destination_file . ") from " . $request_url . "\n" if !$silent_download; - if($wget=~/unable to resolve/i){ + if($wget=~/unable to resolve/i){ print "Error, no connection or failed request...\n\n"; #die; } - + } #::: Trim Whitespaces -sub trim { - my $string = $_[0]; - $string =~ s/^\s+//; - $string =~ s/\s+$//; - return $string; +sub trim { + my $string = $_[0]; + $string =~ s/^\s+//; + $string =~ s/\s+$//; + return $string; } sub read_eqemu_config_xml { - open (CONFIG, "eqemu_config.xml"); - while (){ - chomp; - $o = $_; - - if($o=~/\<\!--/i){ - next; - } - - if($o=~/database/i && $o=~/\<\//i){ - $in_database_tag = 0; - } - if($o=~//i){ + open (CONFIG, "eqemu_config.xml"); + while (){ + chomp; + $o = $_; + + if($o=~/\<\!--/i){ + next; + } + + if($o=~/database/i && $o=~/\<\//i){ + $in_database_tag = 0; + } + if($o=~//i){ print "IN DATABASE TAG\n" if $debug; $in_database_tag = 1; - } - if($o=~//i){ + } + if($o=~//i){ ($long_name) = $o =~ /(.*)<\/longname>/; print "Long Name: '" . $long_name . "'\n" if $debug; - } - if($in_database_tag == 1){ - @left = split (">", $o); + } + if($in_database_tag == 1){ + @left = split (">", $o); @right = split("<", $left[1]); $tag_data = trim($right[0]); - - if($o=~//i && $in_database_tag){ + + if($o=~//i && $in_database_tag){ $user = $tag_data; print "Database User: '" . $user . "'\n" if $debug; - } - if($o=~//i && $in_database_tag){ + } + if($o=~//i && $in_database_tag){ $pass = $tag_data; - print "Database Pass: '" . $pass . "'\n" if $debug; - } - if($o=~//i){ - $db = $tag_data; - print "Database Name: '" . $db . "'\n" if $debug; - } - if($o=~//i){ + print "Database Pass: '" . $pass . "'\n" if $debug; + } + if($o=~//i){ + $db = $tag_data; + print "Database Name: '" . $db . "'\n" if $debug; + } + if($o=~//i){ $host = $tag_data; print "Database Host: '" . $host . "'\n" if $debug; - } - } - } - close(CONFIG); + } + } + } + close(CONFIG); } sub read_eqemu_config_json { @@ -1151,7 +1154,7 @@ sub read_eqemu_config_json { close($fh); $config = $json->decode($content); - + $db = $config->{"server"}{"database"}{"db"}; $host = $config->{"server"}{"database"}{"host"}; $user = $config->{"server"}{"database"}{"username"}; @@ -1175,7 +1178,7 @@ sub aa_fetch{ #::: Fetch Latest Opcodes sub opcodes_fetch{ - print "[Update] Pulling down latest opcodes...\n"; + print "[Update] Pulling down latest opcodes...\n"; %opcodes = ( 1 => ["opcodes", $eqemu_repository_request_url . "utils/patches/opcodes.conf"], 2 => ["mail_opcodes", $eqemu_repository_request_url . "utils/patches/mail_opcodes.conf"], @@ -1187,27 +1190,27 @@ sub opcodes_fetch{ 8 => ["Rain of Fear 2", $eqemu_repository_request_url . "utils/patches/patch_RoF2.conf"], ); $loop = 1; - while($opcodes{$loop}[0]){ + while($opcodes{$loop}[0]){ #::: Split the request_url by the patches folder to get the file name from request_url @real_file = split("patches/", $opcodes{$loop}[1]); $find = 0; while($real_file[$find]){ - $file_name = $real_file[$find]; + $file_name = $real_file[$find]; $find++; } get_remote_file($opcodes{$loop}[1], $file_name); - $loop++; + $loop++; } - print "[Update] Done...\n"; + print "[Update] Done...\n"; } sub remove_duplicate_rule_values { $ruleset_id = trim(get_mysql_result("SELECT `ruleset_id` FROM `rule_sets` WHERE `name` = 'default'")); print "[Database] Default Ruleset ID: " . $ruleset_id . "\n"; - + $total_removed = 0; - + #::: Store Default values... $mysql_result = get_mysql_result("SELECT * FROM `rule_values` WHERE `ruleset_id` = " . $ruleset_id); my @lines = split("\n", $mysql_result); @@ -1215,7 +1218,7 @@ sub remove_duplicate_rule_values { my @values = split("\t", $val); $rule_set_values{$values[1]}[0] = $values[2]; } - + #::: Compare default values against other rulesets to check for duplicates... $mysql_result = get_mysql_result("SELECT * FROM `rule_values` WHERE `ruleset_id` != " . $ruleset_id); my @lines = split("\n", $mysql_result); @@ -1227,7 +1230,7 @@ sub remove_duplicate_rule_values { $total_removed++; } } - + print "[Database] Total duplicate rules removed... " . $total_removed . "\n"; } @@ -1264,8 +1267,8 @@ sub fetch_latest_windows_appveyor { unzip('updates_staged/eqemu-x86-no-bots.zip', 'updates_staged/binaries/'); my @files; my $start_dir = "updates_staged/binaries"; - find( - sub { push @files, $File::Find::name unless -d; }, + find( + sub { push @files, $File::Find::name unless -d; }, $start_dir ); for my $file (@files) { @@ -1275,7 +1278,7 @@ sub fetch_latest_windows_appveyor { copy_file($file, $destination_file); } print "[Update] Done\n"; - + rmtree('updates_staged'); } @@ -1287,8 +1290,8 @@ sub fetch_latest_windows_binaries { unzip('updates_staged/master_windows_build.zip', 'updates_staged/binaries/'); my @files; my $start_dir = "updates_staged/binaries"; - find( - sub { push @files, $File::Find::name unless -d; }, + find( + sub { push @files, $File::Find::name unless -d; }, $start_dir ); for my $file (@files) { @@ -1298,7 +1301,8 @@ sub fetch_latest_windows_binaries { copy_file($file, $destination_file); } print "[Update] Done\n"; - + + rmtree('updates_staged'); } @@ -1310,8 +1314,8 @@ sub fetch_latest_windows_binaries_bots { unzip('updates_staged/master_windows_build_bots.zip', 'updates_staged/binaries/'); my @files; my $start_dir = "updates_staged/binaries"; - find( - sub { push @files, $File::Find::name unless -d; }, + find( + sub { push @files, $File::Find::name unless -d; }, $start_dir ); for my $file (@files) { @@ -1321,7 +1325,7 @@ sub fetch_latest_windows_binaries_bots { copy_file($file, $destination_file); } print "[Update] Done...\n"; - + rmtree('updates_staged'); } @@ -1332,8 +1336,8 @@ sub do_windows_login_server_setup { unzip('updates_staged/login_server.zip', 'updates_staged/login_server/'); my @files; my $start_dir = "updates_staged/login_server"; - find( - sub { push @files, $File::Find::name unless -d; }, + find( + sub { push @files, $File::Find::name unless -d; }, $start_dir ); for my $file (@files) { @@ -1343,56 +1347,56 @@ sub do_windows_login_server_setup { copy_file($file, $destination_file); } print "[Install] Done... \n"; - + print "[Install] Pulling down Loginserver database tables...\n"; get_remote_file($install_repository_request_url . "login_server_tables.sql", "db_update/login_server_tables.sql"); print "[Install] Installing Loginserver tables...\n"; print get_mysql_result_from_file("db_update/login_server_tables.sql"); print "[Install] Done...\n"; - + add_login_server_firewall_rules(); - + rmtree('updates_staged'); rmtree('db_update'); - + print "[Install] Press any key to continue...\n"; - - <>; #Read from STDIN - + + <>; #Read from STDIN + } sub do_linux_login_server_setup { - + build_linux_source(); - + for my $file (@files) { - $destination_file = $file; + $destination_file = $file; $destination_file =~s/updates_staged\/login_server\///g; print "[Install] Installing :: " . $destination_file . "\n"; copy_file($file, $destination_file); } print "\n Done... \n"; - + print "[Install] Pulling down Loginserver database tables...\n"; get_remote_file($install_repository_request_url . "login_server_tables.sql", "db_update/login_server_tables.sql"); print "[Install] Installing Loginserver tables...\n"; print get_mysql_result_from_file("db_update/login_server_tables.sql"); print "[Install] Done...\n\n"; - + rmtree('updates_staged'); rmtree('db_update'); - + get_remote_file($install_repository_request_url . "linux/login.ini", "login_template.ini"); get_remote_file($install_repository_request_url . "linux/login_opcodes.conf", "login_opcodes.conf"); get_remote_file($install_repository_request_url . "linux/login_opcodes_sod.conf", "login_opcodes_sod.conf"); get_remote_file($install_repository_request_url . "linux/server_start_with_login.sh", "server_start_with_login.sh"); system("chmod 755 *.sh"); - + get_installation_variables(); my $db_name = $installation_variables{"mysql_eqemu_db_name"}; my $db_user = $installation_variables{"mysql_eqemu_user"}; my $db_password = $installation_variables{"mysql_eqemu_password"}; - + #::: Open new config file open (NEW_CONFIG, '>', 'login.ini'); @@ -1405,18 +1409,18 @@ sub do_linux_login_server_setup { if($o=~/db/i){ $o = "db = " . $db_name; } if($o=~/user/i){ $o = "user = " . $db_user; } if($o=~/password/i){ $o = "password = " . $db_password; } - + print NEW_CONFIG $o . "\n"; } - + close(FILE_TEMPLATE); close(NEW_CONFIG); unlink("login_template.ini"); - + print "[Install] Press any key to continue...\n"; - + <>; #Read from STDIN - + } sub add_login_server_firewall_rules { @@ -1439,7 +1443,7 @@ sub add_login_server_firewall_rules { } } } - + if($has_loginserver_rules_titanium == 0){ print "[Install] Attempting to add EQEmu Loginserver Firewall Rules (Titanium) (TCP) port 5998 \n"; print `netsh advfirewall firewall add rule name="EQEmu Loginserver (Titanium) (5998) TCP" dir=in action=allow protocol=TCP localport=5998`; @@ -1452,7 +1456,7 @@ sub add_login_server_firewall_rules { print "[Install] Attempting to add EQEmu Loginserver Firewall Rules (SOD+) (UDP) port 5999 \n"; print `netsh advfirewall firewall add rule name="EQEmu Loginserver (SOD+) (5999) UDP" dir=in action=allow protocol=UDP localport=5999`; } - + print "If firewall rules don't add you must run this script (eqemu_server.pl) as administrator\n"; print "\n"; print "[Install] Instructions \n"; @@ -1493,7 +1497,7 @@ sub check_windows_firewall_rules{ } } } - + if($has_world_rules == 0){ print "[Install] Attempting to add EQEmu World Firewall Rules (TCP) port 9000 \n"; print `netsh advfirewall firewall add rule name="EQEmu World (9000) TCP" dir=in action=allow protocol=TCP localport=9000`; @@ -1521,8 +1525,8 @@ sub fetch_peq_db_full{ print "[Install] Downloaded latest PEQ Database... Extracting...\n"; unzip('updates_staged/peq_beta.zip', 'updates_staged/peq_db/'); my $start_dir = "updates_staged/peq_db"; - find( - sub { push @files, $File::Find::name unless -d; }, + find( + sub { push @files, $File::Find::name unless -d; }, $start_dir ); for my $file (@files) { @@ -1532,11 +1536,11 @@ sub fetch_peq_db_full{ print "[Install] DB :: Installing :: " . $destination_file . "\n"; get_mysql_result_from_file($file); } - if($file=~/eqtime/i){ - print "[Install] Installing eqtime.cfg\n"; - copy_file($file, "eqtime.cfg"); - } } + + #::: PEQ DB baseline version + print get_mysql_result("DELETE FROM db_version"); + print get_mysql_result("INSERT INTO `db_version` (`version`) VALUES (9130);"); } sub map_files_fetch_bulk{ @@ -1545,8 +1549,8 @@ sub map_files_fetch_bulk{ unzip('maps/maps.zip', 'maps/'); my @files; my $start_dir = "maps/EQEmuMaps-master/"; - find( - sub { push @files, $File::Find::name unless -d; }, + find( + sub { push @files, $File::Find::name unless -d; }, $start_dir ); for my $file (@files) { @@ -1556,16 +1560,16 @@ sub map_files_fetch_bulk{ copy_file($file, "maps/" . $destination_file); } print "[Install] Fetched Latest Maps\n"; - + rmtree('maps/EQEmuMaps-master'); unlink('maps/maps.zip'); } sub map_files_fetch{ print "[Install] Fetching Latest Maps --- \n"; - + get_remote_file("https://raw.githubusercontent.com/Akkadius/EQEmuMaps/master/!eqemu_maps_manifest.txt", "updates_staged/eqemu_maps_manifest.txt"); - + #::: Get Data from manifest open (FILE, "updates_staged/eqemu_maps_manifest.txt"); $i = 0; @@ -1578,8 +1582,8 @@ sub map_files_fetch{ $i++; } } - - #::: Download + + #::: Download $fc = 0; for($m = 0; $m <= $i; $m++){ my $file_existing = $maps_manifest[$m][0]; @@ -1590,7 +1594,7 @@ sub map_files_fetch{ $fc++; } } - + if($fc == 0){ print "[Install] No Map Updates found... \n\n"; } @@ -1604,15 +1608,15 @@ sub quest_files_fetch{ mkdir('updates_staged'); unzip('updates_staged/projecteqquests-master.zip', 'updates_staged/'); } - + $fc = 0; use File::Find; use File::Compare; - + my @files; my $start_dir = "updates_staged/projecteqquests-master/"; - find( - sub { push @files, $File::Find::name unless -d; }, + find( + sub { push @files, $File::Find::name unless -d; }, $start_dir ); for my $file (@files) { @@ -1620,7 +1624,7 @@ sub quest_files_fetch{ $staged_file = $file; $destination_file = $file; $destination_file =~s/updates_staged\/projecteqquests-master\//quests\//g; - + if (!-e $destination_file) { copy_file($staged_file, $destination_file); print "[Install] Installing :: '" . $destination_file . "'\n"; @@ -1630,7 +1634,7 @@ sub quest_files_fetch{ $directory_indexff = do_file_diff($destination_file, $staged_file); if($directory_indexff ne ""){ $backup_dest = "updates_backups/" . $time_stamp . "/" . $destination_file; - + print $directory_indexff . "\n"; print "[Update] File Different :: '" . $destination_file . "'\n"; print "[Update] Do you wish to update this Quest? '" . $destination_file . "' [Yes (Enter) - No (N)] \nA backup will be found in '" . $backup_dest . "'\n"; @@ -1648,7 +1652,7 @@ sub quest_files_fetch{ } } } - + if($fc == 0){ print "[Update] No Quest Updates found... \n\n"; } @@ -1662,17 +1666,17 @@ sub lua_modules_fetch { mkdir('updates_staged'); unzip('updates_staged/projecteqquests-master.zip', 'updates_staged/'); } - + $fc = 0; use File::Find; use File::Compare; - + mkdir('lua_modules'); - + my @files; my $start_dir = "updates_staged/projecteqquests-master/lua_modules/"; - find( - sub { push @files, $File::Find::name unless -d; }, + find( + sub { push @files, $File::Find::name unless -d; }, $start_dir ); for my $file (@files) { @@ -1680,7 +1684,7 @@ sub lua_modules_fetch { $staged_file = $file; $destination_file = $file; $destination_file =~s/updates_staged\/projecteqquests-master\/lua_modules\//lua_modules\//g; - + if (!-e $destination_file) { copy_file($staged_file, $destination_file); print "[Install] Installing :: '" . $destination_file . "'\n"; @@ -1707,10 +1711,10 @@ sub lua_modules_fetch { } } } - + if($fc == 0){ print "[Update] No LUA Modules Updates found... \n\n"; - } + } } sub plugins_fetch{ @@ -1721,17 +1725,17 @@ sub plugins_fetch{ mkdir('updates_staged'); unzip('updates_staged/projecteqquests-master.zip', 'updates_staged/'); } - + $fc = 0; use File::Find; use File::Compare; - + mkdir('plugins'); - + my @files; my $start_dir = "updates_staged/projecteqquests-master/plugins/"; - find( - sub { push @files, $File::Find::name unless -d; }, + find( + sub { push @files, $File::Find::name unless -d; }, $start_dir ); for my $file (@files) { @@ -1739,7 +1743,7 @@ sub plugins_fetch{ $staged_file = $file; $destination_file = $file; $destination_file =~s/updates_staged\/projecteqquests-master\///g; - + if (!-e $destination_file) { copy_file($staged_file, $destination_file); print "[Install] Installing :: '" . $destination_file . "'\n"; @@ -1769,7 +1773,7 @@ sub plugins_fetch{ if($fc == 0){ print "[Update] No Plugin Updates found... \n\n"; - } + } } sub do_file_diff{ @@ -1789,8 +1793,8 @@ sub do_file_diff{ sub unzip { $archive_to_unzip = $_[0]; $dest_folder = $_[1]; - - if($OS eq "Windows"){ + + if($OS eq "Windows"){ eval "use Archive::Zip qw( :ERROR_CODES :CONSTANTS )"; my $zip = Archive::Zip->new(); unless ( $zip->read($archive_to_unzip) == AZ_OK ) { @@ -1821,30 +1825,30 @@ sub do_bots_db_schema_drop{ print "[Database] Fetching drop_bots.sql...\n"; get_remote_file($eqemu_repository_request_url . "utils/sql/git/bots/drop_bots.sql", "db_update/drop_bots.sql"); print get_mysql_result_from_file("db_update/drop_bots.sql"); - + print "[Database] Removing bot database tables...\n"; print get_mysql_result("DELETE FROM `rule_values` WHERE `rule_name` LIKE 'Bots:%';"); - + if(get_mysql_result("SHOW TABLES LIKE 'commands'") ne "" && $db){ print get_mysql_result("DELETE FROM `commands` WHERE `command` LIKE 'bot';"); } - + if(get_mysql_result("SHOW TABLES LIKE 'command_settings'") ne "" && $db){ print get_mysql_result("DELETE FROM `command_settings` WHERE `command` LIKE 'bot';"); } - + if(get_mysql_result("SHOW KEYS FROM `group_id` WHERE `Key_name` LIKE 'PRIMARY'") ne "" && $db){ print get_mysql_result("ALTER TABLE `group_id` DROP PRIMARY KEY;"); } print get_mysql_result("ALTER TABLE `group_id` ADD PRIMARY KEY (`groupid`, `charid`, `ismerc`);"); - + if(get_mysql_result("SHOW KEYS FROM `guild_members` WHERE `Key_name` LIKE 'PRIMARY'") ne "" && $db){ print get_mysql_result("ALTER TABLE `guild_members` DROP PRIMARY KEY;"); } print get_mysql_result("ALTER TABLE `guild_members` ADD PRIMARY KEY (`char_id`);"); - + print get_mysql_result("UPDATE `spawn2` SET `enabled` = 0 WHERE `id` IN (59297,59298);"); - + if(get_mysql_result("SHOW COLUMNS FROM `db_version` LIKE 'bots_version'") ne "" && $db){ print get_mysql_result("UPDATE `db_version` SET `bots_version` = 0;"); } @@ -1855,80 +1859,80 @@ sub modify_db_for_bots{ #Called after the db bots schema (2015_09_30_bots.sql) has been loaded print "[Database] Modifying database for bots...\n"; print get_mysql_result("UPDATE `spawn2` SET `enabled` = 1 WHERE `id` IN (59297,59298);"); - + if(get_mysql_result("SHOW KEYS FROM `guild_members` WHERE `Key_name` LIKE 'PRIMARY'") ne "" && $db){ print get_mysql_result("ALTER TABLE `guild_members` DROP PRIMARY KEY;"); } - + if(get_mysql_result("SHOW KEYS FROM `group_id` WHERE `Key_name` LIKE 'PRIMARY'") ne "" && $db){ print get_mysql_result("ALTER TABLE `group_id` DROP PRIMARY KEY;"); } print get_mysql_result("ALTER TABLE `group_id` ADD PRIMARY KEY USING BTREE(`groupid`, `charid`, `name`, `ismerc`);"); - + if(get_mysql_result("SHOW TABLES LIKE 'command_settings'") ne "" && get_mysql_result("SELECT `command` FROM `command_settings` WHERE `command` LIKE 'bot'") eq "" && $db){ print get_mysql_result("INSERT INTO `command_settings` VALUES ('bot', '0', '');"); } - + if(get_mysql_result("SHOW TABLES LIKE 'commands'") ne "" && get_mysql_result("SELECT `command` FROM `commands` WHERE `command` LIKE 'bot'") eq "" && $db){ print get_mysql_result("INSERT INTO `commands` VALUES ('bot', '0');"); } - + if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:BotAAExpansion'") ne "" && $db){ print get_mysql_result("UPDATE `rule_values` SET `rule_name` = 'Bots:AAExpansion' WHERE `rule_name` LIKE 'Bots:BotAAExpansion';"); - } + } if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:AAExpansion'") eq "" && $db){ print get_mysql_result("INSERT INTO `rule_values` VALUES ('1', 'Bots:AAExpansion', '8', 'The expansion through which bots will obtain AAs');"); } - + if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:CreateBotCount'") ne "" && $db){ print get_mysql_result("UPDATE `rule_values` SET `rule_name` = 'Bots:CreationLimit' WHERE `rule_name` LIKE 'Bots:CreateBotCount';"); } if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:CreationLimit'") eq "" && $db){ print get_mysql_result("INSERT INTO `rule_values` VALUES ('1', 'Bots:CreationLimit', '150', 'Number of bots that each account can create');"); } - + if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:BotFinishBuffing'") ne "" && $db){ print get_mysql_result("UPDATE `rule_values` SET `rule_name` = 'Bots:FinishBuffing' WHERE `rule_name` LIKE 'Bots:BotFinishBuffing';"); } if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:FinishBuffing'") eq "" && $db){ print get_mysql_result("INSERT INTO `rule_values` VALUES ('1', 'Bots:FinishBuffing', 'false', 'Allow for buffs to complete even if the bot caster is out of mana. Only affects buffing out of combat.');"); } - + if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:BotGroupBuffing'") ne "" && $db){ print get_mysql_result("UPDATE `rule_values` SET `rule_name` = 'Bots:GroupBuffing' WHERE `rule_name` LIKE 'Bots:BotGroupBuffing';"); } if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:GroupBuffing'") eq "" && $db){ print get_mysql_result("INSERT INTO `rule_values` VALUES ('1', 'Bots:GroupBuffing', 'false', 'Bots will cast single target buffs as group buffs, default is false for single. Does not make single target buffs work for MGB.');"); } - + if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:BotManaRegen'") ne "" && $db){ print get_mysql_result("UPDATE `rule_values` SET `rule_name` = 'Bots:ManaRegen' WHERE `rule_name` LIKE 'Bots:BotManaRegen';"); } if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:ManaRegen'") eq "" && $db){ print get_mysql_result("INSERT INTO `rule_values` VALUES ('1', 'Bots:ManaRegen', '3.0', 'Adjust mana regen for bots, 1 is fast and higher numbers slow it down 3 is about the same as players.');"); } - + if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:BotQuest'") ne "" && $db){ print get_mysql_result("UPDATE `rule_values` SET `rule_name` = 'Bots:QuestableSpawnLimit' WHERE `rule_name` LIKE 'Bots:BotQuest';"); } if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:QuestableSpawnLimit'") eq "" && $db){ print get_mysql_result("INSERT INTO `rule_values` VALUES ('1', 'Bots:QuestableSpawnLimit', 'false', 'Optional quest method to manage bot spawn limits using the quest_globals name bot_spawn_limit, see: /bazaar/Aediles_Thrall.pl');"); } - + if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:BotSpellQuest'") ne "" && $db){ print get_mysql_result("UPDATE `rule_values` SET `rule_name` = 'Bots:QuestableSpells' WHERE `rule_name` LIKE 'Bots:BotSpellQuest';"); } if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:QuestableSpells'") eq "" && $db){ print get_mysql_result("INSERT INTO `rule_values` VALUES ('1', 'Bots:QuestableSpells', 'false', 'Anita Thrall\\\'s (Anita_Thrall.pl) Bot Spell Scriber quests.');"); } - + if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:SpawnBotCount'") ne "" && $db){ print get_mysql_result("UPDATE `rule_values` SET `rule_name` = 'Bots:SpawnLimit' WHERE `rule_name` LIKE 'Bots:SpawnBotCount';"); } if(get_mysql_result("SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:SpawnLimit'") eq "" && $db){ print get_mysql_result("INSERT INTO `rule_values` VALUES ('1', 'Bots:SpawnLimit', '71', 'Number of bots a character can have spawned at one time, You + 71 bots is a 12 group raid');"); } - + convert_existing_bot_data(); } @@ -1936,93 +1940,93 @@ sub convert_existing_bot_data{ if(get_mysql_result("SHOW TABLES LIKE 'bots'") ne "" && $db){ print "[Database] Converting existing bot data...\n"; print get_mysql_result("INSERT INTO `bot_data` (`bot_id`, `owner_id`, `spells_id`, `name`, `last_name`, `zone_id`, `gender`, `race`, `class`, `level`, `creation_day`, `last_spawn`, `time_spawned`, `size`, `face`, `hair_color`, `hair_style`, `beard`, `beard_color`, `eye_color_1`, `eye_color_2`, `drakkin_heritage`, `drakkin_tattoo`, `drakkin_details`, `ac`, `atk`, `hp`, `mana`, `str`, `sta`, `cha`, `dex`, `int`, `agi`, `wis`, `fire`, `cold`, `magic`, `poison`, `disease`, `corruption`) SELECT `BotID`, `BotOwnerCharacterID`, `BotSpellsID`, `Name`, `LastName`, `LastZoneId`, `Gender`, `Race`, `Class`, `BotLevel`, UNIX_TIMESTAMP(`BotCreateDate`), UNIX_TIMESTAMP(`LastSpawnDate`), `TotalPlayTime`, `Size`, `Face`, `LuclinHairColor`, `LuclinHairStyle`, `LuclinBeard`, `LuclinBeardColor`, `LuclinEyeColor`, `LuclinEyeColor2`, `DrakkinHeritage`, `DrakkinTattoo`, `DrakkinDetails`, `AC`, `ATK`, `HP`, `Mana`, `STR`, `STA`, `CHA`, `DEX`, `_INT`, `AGI`, `WIS`, `FR`, `CR`, `MR`, `PR`, `DR`, `Corrup` FROM `bots`;"); - + print get_mysql_result("INSERT INTO `bot_inspect_messages` (`bot_id`, `inspect_message`) SELECT `BotID`, `BotInspectMessage` FROM `bots`;"); - + print get_mysql_result("RENAME TABLE `bots` TO `bots_old`;"); } - + if(get_mysql_result("SHOW TABLES LIKE 'botstances'") ne "" && $db){ print get_mysql_result("INSERT INTO `bot_stances` (`bot_id`, `stance_id`) SELECT bs.`BotID`, bs.`StanceID` FROM `botstances` bs INNER JOIN `bot_data` bd ON bs.`BotID` = bd.`bot_id`;"); - + print get_mysql_result("RENAME TABLE `botstances` TO `botstances_old`;"); } - + if(get_mysql_result("SHOW TABLES LIKE 'bottimers'") ne "" && $db){ print get_mysql_result("INSERT INTO `bot_timers` (`bot_id`, `timer_id`, `timer_value`) SELECT bt.`BotID`, bt.`TimerID`, bt.`Value` FROM `bottimers` bt INNER JOIN `bot_data` bd ON bt.`BotID` = bd.`bot_id`;"); - + print get_mysql_result("RENAME TABLE `bottimers` TO `bottimers_old`;"); } - + if(get_mysql_result("SHOW TABLES LIKE 'botbuffs'") ne "" && $db){ print get_mysql_result("INSERT INTO `bot_buffs` (`buffs_index`, `bot_id`, `spell_id`, `caster_level`, `duration_formula`, `tics_remaining`, `poison_counters`, `disease_counters`, `curse_counters`, `corruption_counters`, `numhits`, `melee_rune`, `magic_rune`, `persistent`) SELECT bb.`BotBuffId`, bb.`BotId`, bb.`SpellId`, bb.`CasterLevel`, bb.`DurationFormula`, bb.`TicsRemaining`, bb.`PoisonCounters`, bb.`DiseaseCounters`, bb.`CurseCounters`, bb.`CorruptionCounters`, bb.`HitCount`, bb.`MeleeRune`, bb.`MagicRune`, bb.`Persistent` FROM `botbuffs` bb INNER JOIN `bot_data` bd ON bb.`BotId` = bd.`bot_id`;"); - + if(get_mysql_result("SHOW COLUMNS FROM `botbuffs` LIKE 'dot_rune'") ne "" && $db){ print get_mysql_result("UPDATE `bot_buffs` bb INNER JOIN `botbuffs` bbo ON bb.`buffs_index` = bbo.`BotBuffId` SET bb.`dot_rune` = bbo.`dot_rune` WHERE bb.`bot_id` = bbo.`BotID`;"); } - + if(get_mysql_result("SHOW COLUMNS FROM `botbuffs` LIKE 'caston_x'") ne "" && $db){ print get_mysql_result("UPDATE `bot_buffs` bb INNER JOIN `botbuffs` bbo ON bb.`buffs_index` = bbo.`BotBuffId` SET bb.`caston_x` = bbo.`caston_x` WHERE bb.`bot_id` = bbo.`BotID`;"); } - + if(get_mysql_result("SHOW COLUMNS FROM `botbuffs` LIKE 'caston_y'") ne "" && $db){ print get_mysql_result("UPDATE `bot_buffs` bb INNER JOIN `botbuffs` bbo ON bb.`buffs_index` = bbo.`BotBuffId` SET bb.`caston_y` = bbo.`caston_y` WHERE bb.`bot_id` = bbo.`BotID`;"); } - + if(get_mysql_result("SHOW COLUMNS FROM `botbuffs` LIKE 'caston_z'") ne "" && $db){ print get_mysql_result("UPDATE `bot_buffs` bb INNER JOIN `botbuffs` bbo ON bb.`buffs_index` = bbo.`BotBuffId` SET bb.`caston_z` = bbo.`caston_z` WHERE bb.`bot_id` = bbo.`BotID`;"); } - + if(get_mysql_result("SHOW COLUMNS FROM `botbuffs` LIKE 'ExtraDIChance'") ne "" && $db){ print get_mysql_result("UPDATE `bot_buffs` bb INNER JOIN `botbuffs` bbo ON bb.`buffs_index` = bbo.`BotBuffId` SET bb.`extra_di_chance` = bbo.`ExtraDIChance` WHERE bb.`bot_id` = bbo.`BotID`;"); } - + print get_mysql_result("RENAME TABLE `botbuffs` TO `botbuffs_old`;"); } - + if(get_mysql_result("SHOW TABLES LIKE 'botinventory'") ne "" && $db){ print get_mysql_result("INSERT INTO `bot_inventories` (`inventories_index`, `bot_id`, `slot_id`, `item_id`, `inst_charges`, `inst_color`, `inst_no_drop`, `augment_1`, `augment_2`, `augment_3`, `augment_4`, `augment_5`) SELECT bi.`BotInventoryID`, bi.`BotID`, bi.`SlotID`, bi.`ItemID`, bi.`charges`, bi.`color`, bi.`instnodrop`, bi.`augslot1`, bi.`augslot2`, bi.`augslot3`, bi.`augslot4`, bi.`augslot5` FROM `botinventory` bi INNER JOIN `bot_data` bd ON bi.`BotID` = bd.`bot_id`;"); - + if(get_mysql_result("SHOW COLUMNS FROM `botinventory` LIKE 'augslot6'") ne "" && $db){ print get_mysql_result("UPDATE `bot_inventories` bi INNER JOIN `botinventory` bio ON bi.`inventories_index` = bio.`BotInventoryID` SET bi.`augment_6` = bio.`augslot6` WHERE bi.`bot_id` = bio.`BotID`;"); } - + print get_mysql_result("RENAME TABLE `botinventory` TO `botinventory_old`;"); } - + if(get_mysql_result("SHOW TABLES LIKE 'botpets'") ne "" && $db){ print get_mysql_result("INSERT INTO `bot_pets` (`pets_index`, `pet_id`, `bot_id`, `name`, `mana`, `hp`) SELECT bp.`BotPetsId`, bp.`PetId`, bp.`BotId`, bp.`Name`, bp.`Mana`, bp.`HitPoints` FROM `botpets` bp INNER JOIN `bot_data` bd ON bp.`BotId` = bd.`bot_id`;"); - + print get_mysql_result("RENAME TABLE `botpets` TO `botpets_old`;"); } - + if(get_mysql_result("SHOW TABLES LIKE 'botpetbuffs'") ne "" && $db){ print get_mysql_result("INSERT INTO `bot_pet_buffs` (`pet_buffs_index`, `pets_index`, `spell_id`, `caster_level`, `duration`) SELECT bpb.`BotPetBuffId`, bpb.`BotPetsId`, bpb.`SpellId`, bpb.`CasterLevel`, bpb.`Duration` FROM `botpetbuffs` bpb INNER JOIN `bot_pets` bp ON bpb.`BotPetsId` = bp.`pets_index`;"); - + print get_mysql_result("RENAME TABLE `botpetbuffs` TO `botpetbuffs_old`;"); } - + if(get_mysql_result("SHOW TABLES LIKE 'botpetinventory'") ne "" && $db){ print get_mysql_result("INSERT INTO `bot_pet_inventories` (`pet_inventories_index`, `pets_index`, `item_id`) SELECT bpi.`BotPetInventoryId`, bpi.`BotPetsId`, bpi.`ItemId` FROM `botpetinventory` bpi INNER JOIN `bot_pets` bp ON bpi.`BotPetsId` = bp.`pets_index`;"); - + print get_mysql_result("RENAME TABLE `botpetinventory` TO `botpetinventory_old`;"); } - + if(get_mysql_result("SHOW TABLES LIKE 'botgroup'") ne "" && $db){ print get_mysql_result("INSERT INTO `bot_groups` (`groups_index`, `group_leader_id`, `group_name`) SELECT bg.`BotGroupId`, bg.`BotGroupLeaderBotId`, bg.`BotGroupName` FROM `botgroup` bg INNER JOIN `bot_data` bd ON bg.`BotGroupLeaderBotId` = bd.`bot_id`;"); - + print get_mysql_result("RENAME TABLE `botgroup` TO `botgroup_old`;"); } - + if(get_mysql_result("SHOW TABLES LIKE 'botgroupmembers'") ne "" && $db){ print get_mysql_result("INSERT INTO `bot_group_members` (`group_members_index`, `groups_index`, `bot_id`) SELECT bgm.`BotGroupMemberId`, bgm.`BotGroupId`, bgm.`BotId` FROM `botgroupmembers` bgm INNER JOIN `bot_groups` bg ON bgm.`BotGroupId` = bg.`groups_index` INNER JOIN `bot_data` bd ON bgm.`BotId` = bd.`bot_id`;"); - + print get_mysql_result("RENAME TABLE `botgroupmembers` TO `botgroupmembers_old`;"); } - + if(get_mysql_result("SHOW TABLES LIKE 'botguildmembers'") ne "" && $db){ print get_mysql_result("INSERT INTO `bot_guild_members` (`bot_id`, `guild_id`, `rank`, `tribute_enable`, `total_tribute`, `last_tribute`, `banker`, `public_note`, `alt`) SELECT bgm.`char_id`, bgm.`guild_id`, bgm.`rank`, bgm.`tribute_enable`, bgm.`total_tribute`, bgm.`last_tribute`, bgm.`banker`, bgm.`public_note`, bgm.`alt` FROM `botguildmembers` bgm INNER JOIN `guilds` g ON bgm.`guild_id` = g.`id` INNER JOIN `bot_data` bd ON bgm.`char_id` = bd.`bot_id`;"); - + print get_mysql_result("RENAME TABLE `botguildmembers` TO `botguildmembers_old`;"); } } @@ -2030,24 +2034,24 @@ sub convert_existing_bot_data{ sub get_bots_db_version{ #::: Check if bots_version column exists... if(get_mysql_result("SHOW COLUMNS FROM db_version LIKE 'bots_version'") eq "" && $db){ - print get_mysql_result("ALTER TABLE db_version ADD bots_version int(11) DEFAULT '0' AFTER version;"); - print "[Database] Column 'bots_version' does not exists.... Adding to 'db_version' table...\n\n"; + print get_mysql_result("ALTER TABLE db_version ADD bots_version int(11) DEFAULT '0' AFTER version;"); + print "[Database] Column 'bots_version' does not exists.... Adding to 'db_version' table...\n\n"; } $bots_local_db_version = trim(get_mysql_result("SELECT bots_version FROM db_version LIMIT 1")); return $bots_local_db_version; } sub bots_db_management{ - if($OS eq "Windows"){ - @db_version = split(': ', `world db_version`); + if($OS eq "Windows"){ + @db_version = split(': ', `world db_version`); + } + if($OS eq "Linux"){ + @db_version = split(': ', `./world db_version`); } - if($OS eq "Linux"){ - @db_version = split(': ', `./world db_version`); - } #::: Main Binary Database version $binary_database_version = trim($db_version[2]); - + #::: If we have stale data from main db run if($db_run_stage > 0 && $bots_db_management == 0){ clear_database_runs(); @@ -2057,14 +2061,14 @@ sub bots_db_management{ print "[Database] Your server binaries (world/zone) are not compiled for bots...\n\n"; return; } - + #::: Set on flag for running bot updates... $bots_db_management = 1; - + $bots_local_db_version = get_bots_db_version(); - + $local_database_version = $bots_local_db_version; - + run_database_check(); } @@ -2076,7 +2080,7 @@ sub main_db_management{ #::: Main Binary Database version $binary_database_version = trim($db_version[1]); - + $bots_db_management = 0; run_database_check(); } @@ -2092,18 +2096,18 @@ sub clear_database_runs{ } #::: Responsible for Database Upgrade Routines -sub run_database_check{ +sub run_database_check{ if(!$db){ print "No database present, check your eqemu_config.xml for proper MySQL/MariaDB configuration...\n"; return; } - + if(!@total_updates){ #::: Pull down bots database manifest if($bots_db_management == 1){ print "[Database] Retrieving latest bots database manifest...\n"; - get_remote_file($eqemu_repository_request_url . "utils/sql/git/bots/bots_db_update_manifest.txt", "db_update/db_update_manifest.txt"); + get_remote_file($eqemu_repository_request_url . "utils/sql/git/bots/bots_db_update_manifest.txt", "db_update/db_update_manifest.txt"); } #::: Pull down mainstream database manifest else{ @@ -2120,7 +2124,7 @@ sub run_database_check{ print "[Database] Running Update: " . $val . " - " . $file_name . "\n"; print get_mysql_result_from_file("db_update/$file_name"); print get_mysql_result("UPDATE db_version SET version = $val WHERE version < $val"); - + if($bots_db_management == 1 && $val == 9000){ modify_db_for_bots(); } @@ -2132,7 +2136,7 @@ sub run_database_check{ print "[Database] Reading manifest...\n"; use Data::Dumper; open (FILE, "db_update/db_update_manifest.txt"); - while () { + while () { chomp; $o = $_; if($o=~/#/i){ next; } @@ -2142,9 +2146,9 @@ sub run_database_check{ #::: Setting Manifest stage... $db_run_stage = 1; } - + @total_updates = (); - + #::: This is where we set checkpoints for where a database might be so we don't check so far back in the manifest... if($local_database_version >= 9000){ $revision_check = $local_database_version; @@ -2155,16 +2159,16 @@ sub run_database_check{ $revision_check = 8999; } } - + #::: Iterate through Manifest backwards from binary version down to local version... - for($i = $binary_database_version ; $i > $revision_check; $i--){ - if(!defined($m_d{$i}[0])){ next; } - + for($i = $revision_check; $i < $binary_database_version; $i++){ + if(!defined($m_d{$i}[0])){ next; } + $file_name = trim($m_d{$i}[1]); $query_check = trim($m_d{$i}[2]); $match_type = trim($m_d{$i}[3]); $match_text = trim($m_d{$i}[4]); - + #::: Match type update if($match_type eq "contains"){ if(trim(get_mysql_result($query_check))=~/$match_text/i){ @@ -2179,9 +2183,9 @@ sub run_database_check{ print_break(); } if($match_type eq "missing"){ - if(get_mysql_result($query_check)=~/$match_text/i){ + if(get_mysql_result($query_check)=~/$match_text/i){ print "[Database] has update: " . $i . " - '" . $file_name . "' \n"; - next; + next; } else{ print "[Database] missing update: " . $i . " '" . $file_name . "' \n"; @@ -2216,19 +2220,19 @@ sub run_database_check{ print_break(); } } - print "\n"; - + print "\n"; + if(scalar (@total_updates) == 0 && $db_run_stage == 2){ print "[Database] No updates need to be run...\n"; if($bots_db_management == 1){ print "[Database] Setting Database to Bots Binary Version (" . $binary_database_version . ") if not already...\n\n"; - get_mysql_result("UPDATE db_version SET bots_version = $binary_database_version "); + get_mysql_result("UPDATE db_version SET bots_version = $binary_database_version "); } - else{ + else{ print "[Database] Setting Database to Binary Version (" . $binary_database_version . ") if not already...\n\n"; - get_mysql_result("UPDATE db_version SET version = $binary_database_version "); + get_mysql_result("UPDATE db_version SET version = $binary_database_version "); } - + clear_database_runs(); } } @@ -2249,7 +2253,7 @@ sub fetch_missing_db_update{ } } -sub print_match_debug{ +sub print_match_debug{ if(!$debug){ return; } print " Match Type: '" . $match_type . "'\n"; print " Match Text: '" . $match_text . "'\n"; @@ -2257,18 +2261,18 @@ sub print_match_debug{ print " Result: '" . trim(get_mysql_result($query_check)) . "'\n"; } -sub print_break{ - if(!$debug){ return; } - print "\n==============================================\n"; +sub print_break{ + if(!$debug){ return; } + print "\n==============================================\n"; } sub generate_random_password { - my $passwordsize = shift; - my @alphanumeric = ('a'..'z', 'A'..'Z', 0..9); - my $randpassword = join '', - map $alphanumeric[rand @alphanumeric], 0..$passwordsize; + my $passwordsize = shift; + my @alphanumeric = ('a'..'z', 'A'..'Z', 0..9); + my $randpassword = join '', + map $alphanumeric[rand @alphanumeric], 0..$passwordsize; - return $randpassword; + return $randpassword; } sub quest_heading_convert { @@ -2290,36 +2294,36 @@ sub quest_heading_convert { ); $total_matches = 0; - + use Scalar::Util qw(looks_like_number); - + my @files; my $start_dir = "quests/."; - find( - sub { push @files, $File::Find::name unless -d; }, + find( + sub { push @files, $File::Find::name unless -d; }, $start_dir ); for my $file (@files) { - + #::: Skip non script files if($file!~/lua|pl/i){ next; } if($file=~/lua|pl/i){ $print_buffer = ""; - + $changes_made = 0; - + #::: Open and read line by line open (FILE, $file); while () { chomp; $line = $_; - + #::: Loop through matches foreach my $key (sort(keys %matches)) { $argument_position = $matches{$key}[1]; $match = $matches{$key}[0]; - + if($line=~/$match/i) { $line_temp = $line; $line_temp =~s/$match\(//g; @@ -2328,31 +2332,31 @@ sub quest_heading_convert { $line_temp =~s/\).*//; $line_temp =~s/\):.*//; $line_temp =~s/\);//g; - + @line_data = split(",", $line_temp); - + # use Data::Dumper; # print Dumper(\@line_data); - + $heading_value = $line_data[$argument_position]; $heading_value_clean = trim($heading_value); $heading_value_raw = $line_data[$argument_position]; $heading_value_before = $line_data[$argument_position - 1]; - + if (looks_like_number($heading_value) && $heading_value != 0 && ($heading_value * 2) <= 512) { $heading_value_new = $heading_value * 2; - + $heading_value=~s/$heading_value_clean/$heading_value_new/g; $heading_value_search = quotemeta($heading_value_before . "," . $heading_value_raw); $heading_value_replace = $heading_value_before . "," . $heading_value; - + print $file . "\n"; print $line . "\n"; $line=~s/$heading_value_search/$heading_value_replace/g; print $line . "\n"; print "\n"; - + $changes_made = 1; } elsif ($heading_value == 0){} #::: Do nothing @@ -2374,31 +2378,31 @@ sub quest_heading_convert { $line .= " -- needs_heading_validation"; } } - + $changes_made = 1; - + print $line . "\n"; } - + $total_matches++; - } + } } - + $print_buffer .= $line . "\n"; } close (FILE); - + if($changes_made == 1) { #::: Write changes open (NEW_FILE, '>', $file); - print NEW_FILE $print_buffer; + print NEW_FILE $print_buffer; close NEW_FILE; } } } - + #::: Mark conversion as ran print get_mysql_result("INSERT INTO `variables` (varname, value, information, ts) VALUES ('new_heading_conversion', 'true', 'Script ran against quests folder to convert new heading values', NOW())"); - + print "Total matches: " . $total_matches . "\n"; } From 5a5d73ca25f7d1c3e749660f4bfdd22be0811bcd Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 6 Jan 2019 15:45:13 -0600 Subject: [PATCH 14/20] [Scaling] Global base scaling data has been updated in new database binary revision --- changelog.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/changelog.txt b/changelog.txt index 43bc26bfa..3e2c4f671 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,9 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 1/4/2019 == +Akkadius: [Scaling] Global base scaling data has been updated in new database binary revision + == 1/1/2019 == Akkadius: - [Logging] Added new logging category "MobAppearance" From d127b1bef9dac29536872d1d716eae0af7647602 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 6 Jan 2019 18:41:05 -0600 Subject: [PATCH 15/20] Client version check on show proximity --- zone/command.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zone/command.cpp b/zone/command.cpp index 6362337a2..bccf0747a 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -5015,7 +5015,9 @@ void command_proximity(Client *c, const Seperator *sep) points.push_back(p); } - c->SendPathPacket(points); + if (c->ClientVersion() >= EQEmu::versions::ClientVersion::RoF) { + c->SendPathPacket(points); + } } void command_pvp(Client *c, const Seperator *sep) From 9c9d46e3ea92c69ff3e819957cd46920629f14ca Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 6 Jan 2019 18:46:14 -0600 Subject: [PATCH 16/20] Fix NpcScaleManager::ScaleNPC MinDMG overflow issue when NPC's load dynamic min with static maxd --- zone/npc_scale_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/npc_scale_manager.cpp b/zone/npc_scale_manager.cpp index 130f8c601..9e20935e8 100644 --- a/zone/npc_scale_manager.cpp +++ b/zone/npc_scale_manager.cpp @@ -100,7 +100,7 @@ void NpcScaleManager::ScaleNPC(NPC * npc) if (npc->GetPhR() == 0) { npc->ModifyNPCStat("pr", std::to_string(scale_data.physical_resist).c_str()); } - if (npc->GetMinDMG() == 0) { + if (npc->GetMinDMG() == 0 && npc->GetMaxDMG() == 0) { int min_dmg = scale_data.min_dmg; if (RuleB(Combat, UseNPCDamageClassLevelMods)) { int32 class_level_damage_mod = GetClassLevelDamageMod(npc->GetLevel(), npc->GetClass()); From 011d7a6a299f5febf6686c8eb989d31114cf1499 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 7 Jan 2019 00:11:07 -0500 Subject: [PATCH 17/20] Updated EQDictionary entries to allow ease of reading and gui tooltip propagation --- common/eq_limits.cpp | 1008 +++++++++++++--------------------- common/eq_limits.h | 70 ++- common/inventory_profile.cpp | 22 +- common/shareddb.cpp | 2 +- zone/corpse.cpp | 2 +- zone/inventory.cpp | 30 +- 6 files changed, 467 insertions(+), 667 deletions(-) diff --git a/common/eq_limits.cpp b/common/eq_limits.cpp index 0265a8a42..9d37946cc 100644 --- a/common/eq_limits.cpp +++ b/common/eq_limits.cpp @@ -23,7 +23,8 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versions::ClientVersionCount] = { - { + /*[ClientVersion::Unknown] =*/ + EQEmu::constants::LookupEntry() = { ClientUnknown::INULL, ClientUnknown::INULL, ClientUnknown::INULL, @@ -33,7 +34,8 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi ClientUnknown::INULL, ClientUnknown::INULL }, - { + /*[ClientVersion::Client62] =*/ + EQEmu::constants::LookupEntry() = { Client62::INULL, Client62::INULL, Client62::INULL, @@ -43,7 +45,8 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi Client62::INULL, Client62::INULL }, - { + /*[ClientVersion::Titanium] =*/ + EQEmu::constants::LookupEntry() = { Titanium::constants::CHARACTER_CREATION_LIMIT, Titanium::constants::LongBuffs, Titanium::constants::ShortBuffs, @@ -53,7 +56,8 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi Titanium::constants::PetBuffs, Titanium::constants::MercBuffs }, - { + /*[ClientVersion::SoF] =*/ + EQEmu::constants::LookupEntry() = { SoF::constants::CHARACTER_CREATION_LIMIT, SoF::constants::LongBuffs, SoF::constants::ShortBuffs, @@ -63,7 +67,8 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi SoF::constants::PetBuffs, SoF::constants::MercBuffs }, - { + /*[ClientVersion::SoD] =*/ + EQEmu::constants::LookupEntry() = { SoD::constants::CHARACTER_CREATION_LIMIT, SoD::constants::LongBuffs, SoD::constants::ShortBuffs, @@ -73,7 +78,8 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi SoD::constants::PetBuffs, SoD::constants::MercBuffs }, - { + /*[ClientVersion::UF] =*/ + EQEmu::constants::LookupEntry() = { UF::constants::CHARACTER_CREATION_LIMIT, UF::constants::LongBuffs, UF::constants::ShortBuffs, @@ -83,7 +89,8 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi UF::constants::PetBuffs, UF::constants::MercBuffs }, - { + /*[ClientVersion::RoF] =*/ + EQEmu::constants::LookupEntry() = { RoF::constants::CHARACTER_CREATION_LIMIT, RoF::constants::LongBuffs, RoF::constants::ShortBuffs, @@ -93,7 +100,8 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi RoF::constants::PetBuffs, RoF::constants::MercBuffs }, - { + /*[ClientVersion::RoF2] =*/ + EQEmu::constants::LookupEntry() = { RoF2::constants::CHARACTER_CREATION_LIMIT, RoF2::constants::LongBuffs, RoF2::constants::ShortBuffs, @@ -112,180 +120,115 @@ const EQEmu::constants::LookupEntry* EQEmu::constants::Lookup(versions::ClientVe static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versions::MobVersionCount] = { - { + /*[MobVersion::Unknown] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + ClientUnknown::INULL, ClientUnknown::INULL, ClientUnknown::INULL, + ClientUnknown::INULL, ClientUnknown::INULL, ClientUnknown::INULL, + ClientUnknown::INULL, ClientUnknown::INULL, ClientUnknown::INULL, + ClientUnknown::INULL, ClientUnknown::INULL, ClientUnknown::INULL, + ClientUnknown::INULL, ClientUnknown::INULL, ClientUnknown::INULL, + ClientUnknown::INULL, ClientUnknown::INULL, ClientUnknown::INULL, + ClientUnknown::INULL, ClientUnknown::INULL, ClientUnknown::INULL, + ClientUnknown::INULL, ClientUnknown::INULL, ClientUnknown::INULL, + ClientUnknown::INULL + ), + ClientUnknown::INULL, ClientUnknown::INULL, ClientUnknown::INULL, ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - ClientUnknown::INULL, - + false, false, false, false - }, - { + ), + /*[MobVersion::Client62] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + Client62::INULL, Client62::INULL, Client62::INULL, + Client62::INULL, Client62::INULL, Client62::INULL, + Client62::INULL, Client62::INULL, Client62::INULL, + Client62::INULL, Client62::INULL, Client62::INULL, + Client62::INULL, Client62::INULL, Client62::INULL, + Client62::INULL, Client62::INULL, Client62::INULL, + Client62::INULL, Client62::INULL, Client62::INULL, + Client62::INULL, Client62::INULL, Client62::INULL, + Client62::INULL + ), + Client62::INULL, Client62::INULL, Client62::INULL, Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - - Client62::INULL, - Client62::INULL, - Client62::INULL, - Client62::INULL, - + false, false, false, false - }, - { - EQEmu::invtype::POSSESSIONS_SIZE, - Titanium::invtype::BANK_SIZE, - Titanium::invtype::SHARED_BANK_SIZE, - Titanium::invtype::TRADE_SIZE, - Titanium::invtype::WORLD_SIZE, - Titanium::invtype::LIMBO_SIZE, - Titanium::invtype::TRIBUTE_SIZE, - Titanium::INULL, - Titanium::invtype::GUILD_TRIBUTE_SIZE, - Titanium::invtype::MERCHANT_SIZE, - Titanium::INULL, - Titanium::invtype::CORPSE_SIZE, - Titanium::invtype::BAZAAR_SIZE, - Titanium::invtype::INSPECT_SIZE, - Titanium::INULL, - Titanium::invtype::VIEW_MOD_PC_SIZE, - Titanium::invtype::VIEW_MOD_BANK_SIZE, - Titanium::invtype::VIEW_MOD_SHARED_BANK_SIZE, - Titanium::invtype::VIEW_MOD_LIMBO_SIZE, - Titanium::invtype::ALT_STORAGE_SIZE, - Titanium::invtype::ARCHIVED_SIZE, - Titanium::INULL, - Titanium::INULL, - Titanium::INULL, - Titanium::invtype::OTHER_SIZE, - + ), + /*[MobVersion::Titanium] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + EQEmu::invtype::POSSESSIONS_SIZE, Titanium::invtype::BANK_SIZE, Titanium::invtype::SHARED_BANK_SIZE, + Titanium::invtype::TRADE_SIZE, Titanium::invtype::WORLD_SIZE, Titanium::invtype::LIMBO_SIZE, + Titanium::invtype::TRIBUTE_SIZE, Titanium::INULL, Titanium::invtype::GUILD_TRIBUTE_SIZE, + Titanium::invtype::MERCHANT_SIZE, Titanium::INULL, Titanium::invtype::CORPSE_SIZE, + Titanium::invtype::BAZAAR_SIZE, Titanium::invtype::INSPECT_SIZE, Titanium::INULL, + Titanium::invtype::VIEW_MOD_PC_SIZE, Titanium::invtype::VIEW_MOD_BANK_SIZE, Titanium::invtype::VIEW_MOD_SHARED_BANK_SIZE, + Titanium::invtype::VIEW_MOD_LIMBO_SIZE, Titanium::invtype::ALT_STORAGE_SIZE, Titanium::invtype::ARCHIVED_SIZE, + Titanium::INULL, Titanium::INULL, Titanium::INULL, + Titanium::invtype::OTHER_SIZE + ), + Titanium::invslot::POSSESSIONS_BITMASK, Titanium::invslot::CORPSE_BITMASK, Titanium::invbag::SLOT_COUNT, Titanium::invaug::SOCKET_COUNT, - + Titanium::inventory::AllowEmptyBagInBag, Titanium::inventory::AllowClickCastFromBag, Titanium::inventory::ConcatenateInvTypeLimbo, Titanium::inventory::AllowOverLevelEquipment - }, - { - EQEmu::invtype::POSSESSIONS_SIZE, - SoF::invtype::BANK_SIZE, - SoF::invtype::SHARED_BANK_SIZE, - SoF::invtype::TRADE_SIZE, - SoF::invtype::WORLD_SIZE, - SoF::invtype::LIMBO_SIZE, - SoF::invtype::TRIBUTE_SIZE, - SoF::INULL, - SoF::invtype::GUILD_TRIBUTE_SIZE, - SoF::invtype::MERCHANT_SIZE, - SoF::INULL, - SoF::invtype::CORPSE_SIZE, - SoF::invtype::BAZAAR_SIZE, - SoF::invtype::INSPECT_SIZE, - SoF::INULL, - SoF::invtype::VIEW_MOD_PC_SIZE, - SoF::invtype::VIEW_MOD_BANK_SIZE, - SoF::invtype::VIEW_MOD_SHARED_BANK_SIZE, - SoF::invtype::VIEW_MOD_LIMBO_SIZE, - SoF::invtype::ALT_STORAGE_SIZE, - SoF::invtype::ARCHIVED_SIZE, - SoF::INULL, - SoF::INULL, - SoF::INULL, - SoF::invtype::OTHER_SIZE, - + ), + /*[MobVersion::SoF] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + EQEmu::invtype::POSSESSIONS_SIZE, SoF::invtype::BANK_SIZE, SoF::invtype::SHARED_BANK_SIZE, + SoF::invtype::TRADE_SIZE, SoF::invtype::WORLD_SIZE, SoF::invtype::LIMBO_SIZE, + SoF::invtype::TRIBUTE_SIZE, SoF::INULL, SoF::invtype::GUILD_TRIBUTE_SIZE, + SoF::invtype::MERCHANT_SIZE, SoF::INULL, SoF::invtype::CORPSE_SIZE, + SoF::invtype::BAZAAR_SIZE, SoF::invtype::INSPECT_SIZE, SoF::INULL, + SoF::invtype::VIEW_MOD_PC_SIZE, SoF::invtype::VIEW_MOD_BANK_SIZE, SoF::invtype::VIEW_MOD_SHARED_BANK_SIZE, + SoF::invtype::VIEW_MOD_LIMBO_SIZE, SoF::invtype::ALT_STORAGE_SIZE, SoF::invtype::ARCHIVED_SIZE, + SoF::INULL, SoF::INULL, SoF::INULL, + SoF::invtype::OTHER_SIZE + ), + SoF::invslot::POSSESSIONS_BITMASK, SoF::invslot::CORPSE_BITMASK, SoF::invbag::SLOT_COUNT, SoF::invaug::SOCKET_COUNT, - + SoF::inventory::AllowEmptyBagInBag, SoF::inventory::AllowClickCastFromBag, SoF::inventory::ConcatenateInvTypeLimbo, SoF::inventory::AllowOverLevelEquipment - }, - { - EQEmu::invtype::POSSESSIONS_SIZE, - SoD::invtype::BANK_SIZE, - SoD::invtype::SHARED_BANK_SIZE, - SoD::invtype::TRADE_SIZE, - SoD::invtype::WORLD_SIZE, - SoD::invtype::LIMBO_SIZE, - SoD::invtype::TRIBUTE_SIZE, - SoD::INULL, - SoD::invtype::GUILD_TRIBUTE_SIZE, - SoD::invtype::MERCHANT_SIZE, - SoD::INULL, - SoD::invtype::CORPSE_SIZE, - SoD::invtype::BAZAAR_SIZE, - SoD::invtype::INSPECT_SIZE, - SoD::INULL, - SoD::invtype::VIEW_MOD_PC_SIZE, - SoD::invtype::VIEW_MOD_BANK_SIZE, - SoD::invtype::VIEW_MOD_SHARED_BANK_SIZE, - SoD::invtype::VIEW_MOD_LIMBO_SIZE, - SoD::invtype::ALT_STORAGE_SIZE, - SoD::invtype::ARCHIVED_SIZE, - SoD::INULL, - SoD::INULL, - SoD::INULL, - SoD::invtype::OTHER_SIZE, + ), + /*[MobVersion::SoD] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + EQEmu::invtype::POSSESSIONS_SIZE, SoD::invtype::BANK_SIZE, SoD::invtype::SHARED_BANK_SIZE, + SoD::invtype::TRADE_SIZE, SoD::invtype::WORLD_SIZE, SoD::invtype::LIMBO_SIZE, + SoD::invtype::TRIBUTE_SIZE, SoD::INULL, SoD::invtype::GUILD_TRIBUTE_SIZE, + SoD::invtype::MERCHANT_SIZE, SoD::INULL, SoD::invtype::CORPSE_SIZE, + SoD::invtype::BAZAAR_SIZE, SoD::invtype::INSPECT_SIZE, SoD::INULL, + SoD::invtype::VIEW_MOD_PC_SIZE, SoD::invtype::VIEW_MOD_BANK_SIZE, SoD::invtype::VIEW_MOD_SHARED_BANK_SIZE, + SoD::invtype::VIEW_MOD_LIMBO_SIZE, SoD::invtype::ALT_STORAGE_SIZE, SoD::invtype::ARCHIVED_SIZE, + SoD::INULL, SoD::INULL, SoD::INULL, + SoD::invtype::OTHER_SIZE + ), SoD::invslot::POSSESSIONS_BITMASK, SoD::invslot::CORPSE_BITMASK, @@ -296,33 +239,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi SoD::inventory::AllowClickCastFromBag, SoD::inventory::ConcatenateInvTypeLimbo, SoD::inventory::AllowOverLevelEquipment - }, - { - EQEmu::invtype::POSSESSIONS_SIZE, - UF::invtype::BANK_SIZE, - UF::invtype::SHARED_BANK_SIZE, - UF::invtype::TRADE_SIZE, - UF::invtype::WORLD_SIZE, - UF::invtype::LIMBO_SIZE, - UF::invtype::TRIBUTE_SIZE, - UF::INULL, - UF::invtype::GUILD_TRIBUTE_SIZE, - UF::invtype::MERCHANT_SIZE, - UF::INULL, - UF::invtype::CORPSE_SIZE, - UF::invtype::BAZAAR_SIZE, - UF::invtype::INSPECT_SIZE, - UF::INULL, - UF::invtype::VIEW_MOD_PC_SIZE, - UF::invtype::VIEW_MOD_BANK_SIZE, - UF::invtype::VIEW_MOD_SHARED_BANK_SIZE, - UF::invtype::VIEW_MOD_LIMBO_SIZE, - UF::invtype::ALT_STORAGE_SIZE, - UF::invtype::ARCHIVED_SIZE, - UF::INULL, - UF::INULL, - UF::INULL, - UF::invtype::OTHER_SIZE, + ), + /*[MobVersion::UF] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + EQEmu::invtype::POSSESSIONS_SIZE, UF::invtype::BANK_SIZE, UF::invtype::SHARED_BANK_SIZE, + UF::invtype::TRADE_SIZE, UF::invtype::WORLD_SIZE, UF::invtype::LIMBO_SIZE, + UF::invtype::TRIBUTE_SIZE, UF::INULL, UF::invtype::GUILD_TRIBUTE_SIZE, + UF::invtype::MERCHANT_SIZE, UF::INULL, UF::invtype::CORPSE_SIZE, + UF::invtype::BAZAAR_SIZE, UF::invtype::INSPECT_SIZE, UF::INULL, + UF::invtype::VIEW_MOD_PC_SIZE, UF::invtype::VIEW_MOD_BANK_SIZE, UF::invtype::VIEW_MOD_SHARED_BANK_SIZE, + UF::invtype::VIEW_MOD_LIMBO_SIZE, UF::invtype::ALT_STORAGE_SIZE, UF::invtype::ARCHIVED_SIZE, + UF::INULL, UF::INULL, UF::INULL, + UF::invtype::OTHER_SIZE + ), UF::invslot::POSSESSIONS_BITMASK, UF::invslot::CORPSE_BITMASK, @@ -333,33 +263,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi UF::inventory::AllowClickCastFromBag, UF::inventory::ConcatenateInvTypeLimbo, UF::inventory::AllowOverLevelEquipment - }, - { - EQEmu::invtype::POSSESSIONS_SIZE, - RoF::invtype::BANK_SIZE, - RoF::invtype::SHARED_BANK_SIZE, - RoF::invtype::TRADE_SIZE, - RoF::invtype::WORLD_SIZE, - RoF::invtype::LIMBO_SIZE, - RoF::invtype::TRIBUTE_SIZE, - RoF::invtype::TROPHY_TRIBUTE_SIZE, - RoF::invtype::GUILD_TRIBUTE_SIZE, - RoF::invtype::MERCHANT_SIZE, - RoF::invtype::DELETED_SIZE, - RoF::invtype::CORPSE_SIZE, - RoF::invtype::BAZAAR_SIZE, - RoF::invtype::INSPECT_SIZE, - RoF::invtype::REAL_ESTATE_SIZE, - RoF::invtype::VIEW_MOD_PC_SIZE, - RoF::invtype::VIEW_MOD_BANK_SIZE, - RoF::invtype::VIEW_MOD_SHARED_BANK_SIZE, - RoF::invtype::VIEW_MOD_LIMBO_SIZE, - RoF::invtype::ALT_STORAGE_SIZE, - RoF::invtype::ARCHIVED_SIZE, - RoF::invtype::MAIL_SIZE, - RoF::invtype::GUILD_TROPHY_TRIBUTE_SIZE, - RoF::INULL, - RoF::invtype::OTHER_SIZE, + ), + /*[MobVersion::RoF] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + EQEmu::invtype::POSSESSIONS_SIZE, RoF::invtype::BANK_SIZE, RoF::invtype::SHARED_BANK_SIZE, + RoF::invtype::TRADE_SIZE, RoF::invtype::WORLD_SIZE, RoF::invtype::LIMBO_SIZE, + RoF::invtype::TRIBUTE_SIZE, RoF::invtype::TROPHY_TRIBUTE_SIZE, RoF::invtype::GUILD_TRIBUTE_SIZE, + RoF::invtype::MERCHANT_SIZE, RoF::invtype::DELETED_SIZE, RoF::invtype::CORPSE_SIZE, + RoF::invtype::BAZAAR_SIZE, RoF::invtype::INSPECT_SIZE, RoF::invtype::REAL_ESTATE_SIZE, + RoF::invtype::VIEW_MOD_PC_SIZE, RoF::invtype::VIEW_MOD_BANK_SIZE, RoF::invtype::VIEW_MOD_SHARED_BANK_SIZE, + RoF::invtype::VIEW_MOD_LIMBO_SIZE, RoF::invtype::ALT_STORAGE_SIZE, RoF::invtype::ARCHIVED_SIZE, + RoF::invtype::MAIL_SIZE, RoF::invtype::GUILD_TROPHY_TRIBUTE_SIZE, RoF::INULL, + RoF::invtype::OTHER_SIZE + ), RoF::invslot::POSSESSIONS_BITMASK, RoF::invslot::CORPSE_BITMASK, @@ -370,33 +287,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi RoF::inventory::AllowClickCastFromBag, RoF::inventory::ConcatenateInvTypeLimbo, RoF::inventory::AllowOverLevelEquipment - }, - { - EQEmu::invtype::POSSESSIONS_SIZE, - RoF2::invtype::BANK_SIZE, - RoF2::invtype::SHARED_BANK_SIZE, - RoF2::invtype::TRADE_SIZE, - RoF2::invtype::WORLD_SIZE, - RoF2::invtype::LIMBO_SIZE, - RoF2::invtype::TRIBUTE_SIZE, - RoF2::invtype::TROPHY_TRIBUTE_SIZE, - RoF2::invtype::GUILD_TRIBUTE_SIZE, - RoF2::invtype::MERCHANT_SIZE, - RoF2::invtype::DELETED_SIZE, - RoF2::invtype::CORPSE_SIZE, - RoF2::invtype::BAZAAR_SIZE, - RoF2::invtype::INSPECT_SIZE, - RoF2::invtype::REAL_ESTATE_SIZE, - RoF2::invtype::VIEW_MOD_PC_SIZE, - RoF2::invtype::VIEW_MOD_BANK_SIZE, - RoF2::invtype::VIEW_MOD_SHARED_BANK_SIZE, - RoF2::invtype::VIEW_MOD_LIMBO_SIZE, - RoF2::invtype::ALT_STORAGE_SIZE, - RoF2::invtype::ARCHIVED_SIZE, - RoF2::invtype::MAIL_SIZE, - RoF2::invtype::GUILD_TROPHY_TRIBUTE_SIZE, - RoF2::invtype::KRONO_SIZE, - RoF2::invtype::OTHER_SIZE, + ), + /*[MobVersion::RoF2] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + EQEmu::invtype::POSSESSIONS_SIZE, RoF2::invtype::BANK_SIZE, RoF2::invtype::SHARED_BANK_SIZE, + RoF2::invtype::TRADE_SIZE, RoF2::invtype::WORLD_SIZE, RoF2::invtype::LIMBO_SIZE, + RoF2::invtype::TRIBUTE_SIZE, RoF2::invtype::TROPHY_TRIBUTE_SIZE, RoF2::invtype::GUILD_TRIBUTE_SIZE, + RoF2::invtype::MERCHANT_SIZE, RoF2::invtype::DELETED_SIZE, RoF2::invtype::CORPSE_SIZE, + RoF2::invtype::BAZAAR_SIZE, RoF2::invtype::INSPECT_SIZE, RoF2::invtype::REAL_ESTATE_SIZE, + RoF2::invtype::VIEW_MOD_PC_SIZE, RoF2::invtype::VIEW_MOD_BANK_SIZE, RoF2::invtype::VIEW_MOD_SHARED_BANK_SIZE, + RoF2::invtype::VIEW_MOD_LIMBO_SIZE, RoF2::invtype::ALT_STORAGE_SIZE, RoF2::invtype::ARCHIVED_SIZE, + RoF2::invtype::MAIL_SIZE, RoF2::invtype::GUILD_TROPHY_TRIBUTE_SIZE, RoF2::invtype::KRONO_SIZE, + RoF2::invtype::OTHER_SIZE + ), RoF2::invslot::POSSESSIONS_BITMASK, RoF2::invslot::CORPSE_BITMASK, @@ -407,33 +311,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi RoF2::inventory::AllowClickCastFromBag, RoF2::inventory::ConcatenateInvTypeLimbo, RoF2::inventory::AllowOverLevelEquipment - }, - { - EQEmu::invtype::POSSESSIONS_SIZE, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::invtype::TRADE_SIZE, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, /*InvTypeCorpseSize,*/ - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, - EntityLimits::NPC::INULL, + ), + /*[MobVersion::NPC] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + EQEmu::invtype::POSSESSIONS_SIZE, EntityLimits::NPC::INULL, EntityLimits::NPC::INULL, + EntityLimits::NPC::invtype::TRADE_SIZE, EntityLimits::NPC::INULL, EntityLimits::NPC::INULL, + EntityLimits::NPC::INULL, EntityLimits::NPC::INULL, EntityLimits::NPC::INULL, + EntityLimits::NPC::INULL, EntityLimits::NPC::INULL, EntityLimits::NPC::INULL, /*InvTypeCorpseSize,*/ + EntityLimits::NPC::INULL, EntityLimits::NPC::INULL, EntityLimits::NPC::INULL, + EntityLimits::NPC::INULL, EntityLimits::NPC::INULL, EntityLimits::NPC::INULL, + EntityLimits::NPC::INULL, EntityLimits::NPC::INULL, EntityLimits::NPC::INULL, + EntityLimits::NPC::INULL, EntityLimits::NPC::INULL, EntityLimits::NPC::INULL, + EntityLimits::NPC::INULL + ), EntityLimits::NPC::INULL, EntityLimits::NPC::INULL, @@ -444,33 +335,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi false, false, false - }, - { - EQEmu::invtype::POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::invtype::TRADE_SIZE, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, /*InvTypeCorpseSize,*/ - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, - EntityLimits::NPCMerchant::INULL, + ), + /*[MobVersion::NPCMerchant] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + EQEmu::invtype::POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ EntityLimits::NPCMerchant::INULL, EntityLimits::NPCMerchant::INULL, + EntityLimits::NPCMerchant::invtype::TRADE_SIZE, EntityLimits::NPCMerchant::INULL, EntityLimits::NPCMerchant::INULL, + EntityLimits::NPCMerchant::INULL, EntityLimits::NPCMerchant::INULL, EntityLimits::NPCMerchant::INULL, + EntityLimits::NPCMerchant::INULL, EntityLimits::NPCMerchant::INULL, EntityLimits::NPCMerchant::INULL, /*InvTypeCorpseSize,*/ + EntityLimits::NPCMerchant::INULL, EntityLimits::NPCMerchant::INULL, EntityLimits::NPCMerchant::INULL, + EntityLimits::NPCMerchant::INULL, EntityLimits::NPCMerchant::INULL, EntityLimits::NPCMerchant::INULL, + EntityLimits::NPCMerchant::INULL, EntityLimits::NPCMerchant::INULL, EntityLimits::NPCMerchant::INULL, + EntityLimits::NPCMerchant::INULL, EntityLimits::NPCMerchant::INULL, EntityLimits::NPCMerchant::INULL, + EntityLimits::NPCMerchant::INULL + ), EntityLimits::NPCMerchant::INULL, EntityLimits::NPCMerchant::INULL, @@ -481,33 +359,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi false, false, false - }, - { - EQEmu::invtype::POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::invtype::TRADE_SIZE, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, /*InvTypeCorpseSize,*/ - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, - EntityLimits::Merc::INULL, + ), + /*[MobVersion::Merc] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + EQEmu::invtype::POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ EntityLimits::Merc::INULL, EntityLimits::Merc::INULL, + EntityLimits::Merc::invtype::TRADE_SIZE, EntityLimits::Merc::INULL, EntityLimits::Merc::INULL, + EntityLimits::Merc::INULL, EntityLimits::Merc::INULL, EntityLimits::Merc::INULL, + EntityLimits::Merc::INULL, EntityLimits::Merc::INULL, EntityLimits::Merc::INULL, /*InvTypeCorpseSize,*/ + EntityLimits::Merc::INULL, EntityLimits::Merc::INULL, EntityLimits::Merc::INULL, + EntityLimits::Merc::INULL, EntityLimits::Merc::INULL, EntityLimits::Merc::INULL, + EntityLimits::Merc::INULL, EntityLimits::Merc::INULL, EntityLimits::Merc::INULL, + EntityLimits::Merc::INULL, EntityLimits::Merc::INULL, EntityLimits::Merc::INULL, + EntityLimits::Merc::INULL + ), EntityLimits::Merc::INULL, EntityLimits::Merc::INULL, @@ -518,33 +383,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi false, false, false - }, - { - EQEmu::invtype::POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::invtype::TRADE_SIZE, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, /*InvTypeCorpseSize,*/ - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, - EntityLimits::Bot::INULL, + ), + /*[MobVersion::Bot] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + EQEmu::invtype::POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ EntityLimits::Bot::INULL, EntityLimits::Bot::INULL, + EntityLimits::Bot::invtype::TRADE_SIZE, EntityLimits::Bot::INULL, EntityLimits::Bot::INULL, + EntityLimits::Bot::INULL, EntityLimits::Bot::INULL, EntityLimits::Bot::INULL, + EntityLimits::Bot::INULL, EntityLimits::Bot::INULL, EntityLimits::Bot::INULL, /*InvTypeCorpseSize,*/ + EntityLimits::Bot::INULL, EntityLimits::Bot::INULL, EntityLimits::Bot::INULL, + EntityLimits::Bot::INULL, EntityLimits::Bot::INULL, EntityLimits::Bot::INULL, + EntityLimits::Bot::INULL, EntityLimits::Bot::INULL, EntityLimits::Bot::INULL, + EntityLimits::Bot::INULL, EntityLimits::Bot::INULL, EntityLimits::Bot::INULL, + EntityLimits::Bot::INULL + ), EntityLimits::Bot::invslot::POSSESSIONS_BITMASK, EntityLimits::Bot::INULL, @@ -555,33 +407,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi false, false, false - }, - { - EQEmu::invtype::POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::invtype::TRADE_SIZE, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, /*InvTypeCorpseSize,*/ - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, - EntityLimits::ClientPet::INULL, + ), + /*[MobVersion::ClientPet] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + EQEmu::invtype::POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ EntityLimits::ClientPet::INULL, EntityLimits::ClientPet::INULL, + EntityLimits::ClientPet::invtype::TRADE_SIZE, EntityLimits::ClientPet::INULL, EntityLimits::ClientPet::INULL, + EntityLimits::ClientPet::INULL, EntityLimits::ClientPet::INULL, EntityLimits::ClientPet::INULL, + EntityLimits::ClientPet::INULL, EntityLimits::ClientPet::INULL, EntityLimits::ClientPet::INULL, /*InvTypeCorpseSize,*/ + EntityLimits::ClientPet::INULL, EntityLimits::ClientPet::INULL, EntityLimits::ClientPet::INULL, + EntityLimits::ClientPet::INULL, EntityLimits::ClientPet::INULL, EntityLimits::ClientPet::INULL, + EntityLimits::ClientPet::INULL, EntityLimits::ClientPet::INULL, EntityLimits::ClientPet::INULL, + EntityLimits::ClientPet::INULL, EntityLimits::ClientPet::INULL, EntityLimits::ClientPet::INULL, + EntityLimits::ClientPet::INULL + ), EntityLimits::ClientPet::INULL, EntityLimits::ClientPet::INULL, @@ -592,33 +431,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi false, false, false - }, - { - EQEmu::invtype::POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::invtype::TRADE_SIZE, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, /*InvTypeCorpseSize,*/ - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, - EntityLimits::NPCPet::INULL, + ), + /*[MobVersion::NPCPet] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + EQEmu::invtype::POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ EntityLimits::NPCPet::INULL, EntityLimits::NPCPet::INULL, + EntityLimits::NPCPet::invtype::TRADE_SIZE, EntityLimits::NPCPet::INULL, EntityLimits::NPCPet::INULL, + EntityLimits::NPCPet::INULL, EntityLimits::NPCPet::INULL, EntityLimits::NPCPet::INULL, + EntityLimits::NPCPet::INULL, EntityLimits::NPCPet::INULL, EntityLimits::NPCPet::INULL, /*InvTypeCorpseSize,*/ + EntityLimits::NPCPet::INULL, EntityLimits::NPCPet::INULL, EntityLimits::NPCPet::INULL, + EntityLimits::NPCPet::INULL, EntityLimits::NPCPet::INULL, EntityLimits::NPCPet::INULL, + EntityLimits::NPCPet::INULL, EntityLimits::NPCPet::INULL, EntityLimits::NPCPet::INULL, + EntityLimits::NPCPet::INULL, EntityLimits::NPCPet::INULL, EntityLimits::NPCPet::INULL, + EntityLimits::NPCPet::INULL + ), EntityLimits::NPCPet::INULL, EntityLimits::NPCPet::INULL, @@ -629,33 +455,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi false, false, false - }, - { - EQEmu::invtype::POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::invtype::TRADE_SIZE, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, /*InvTypeCorpseSize,*/ - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, - EntityLimits::MercPet::INULL, + ), + /*[MobVersion::MercPet] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + EQEmu::invtype::POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ EntityLimits::MercPet::INULL, EntityLimits::MercPet::INULL, + EntityLimits::MercPet::invtype::TRADE_SIZE, EntityLimits::MercPet::INULL, EntityLimits::MercPet::INULL, + EntityLimits::MercPet::INULL, EntityLimits::MercPet::INULL, EntityLimits::MercPet::INULL, + EntityLimits::MercPet::INULL, EntityLimits::MercPet::INULL, EntityLimits::MercPet::INULL, /*InvTypeCorpseSize,*/ + EntityLimits::MercPet::INULL, EntityLimits::MercPet::INULL, EntityLimits::MercPet::INULL, + EntityLimits::MercPet::INULL, EntityLimits::MercPet::INULL, EntityLimits::MercPet::INULL, + EntityLimits::MercPet::INULL, EntityLimits::MercPet::INULL, EntityLimits::MercPet::INULL, + EntityLimits::MercPet::INULL, EntityLimits::MercPet::INULL, EntityLimits::MercPet::INULL, + EntityLimits::MercPet::INULL + ), EntityLimits::MercPet::INULL, EntityLimits::MercPet::INULL, @@ -666,33 +479,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi false, false, false - }, - { - EQEmu::invtype::POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::invtype::TRADE_SIZE, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, /*InvTypeCorpseSize,*/ - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, - EntityLimits::BotPet::INULL, + ), + /*[MobVersion::BotPet] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + EQEmu::invtype::POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ EntityLimits::BotPet::INULL, EntityLimits::BotPet::INULL, + EntityLimits::BotPet::invtype::TRADE_SIZE, EntityLimits::BotPet::INULL, EntityLimits::BotPet::INULL, + EntityLimits::BotPet::INULL, EntityLimits::BotPet::INULL, EntityLimits::BotPet::INULL, + EntityLimits::BotPet::INULL, EntityLimits::BotPet::INULL, EntityLimits::BotPet::INULL, /*InvTypeCorpseSize,*/ + EntityLimits::BotPet::INULL, EntityLimits::BotPet::INULL, EntityLimits::BotPet::INULL, + EntityLimits::BotPet::INULL, EntityLimits::BotPet::INULL, EntityLimits::BotPet::INULL, + EntityLimits::BotPet::INULL, EntityLimits::BotPet::INULL, EntityLimits::BotPet::INULL, + EntityLimits::BotPet::INULL, EntityLimits::BotPet::INULL, EntityLimits::BotPet::INULL, + EntityLimits::BotPet::INULL + ), EntityLimits::BotPet::INULL, EntityLimits::BotPet::INULL, @@ -703,33 +503,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi false, false, false - }, - { // OfflineTitanium - Titanium::INULL, - Titanium::INULL, - Titanium::INULL, - Titanium::invtype::TRADE_SIZE, - Titanium::INULL, - Titanium::INULL, - Titanium::INULL, - Titanium::INULL, - Titanium::INULL, - Titanium::invtype::MERCHANT_SIZE, - Titanium::INULL, - Titanium::INULL, - Titanium::invtype::BAZAAR_SIZE, - Titanium::invtype::INSPECT_SIZE, - Titanium::INULL, - Titanium::invtype::VIEW_MOD_PC_SIZE, - Titanium::invtype::VIEW_MOD_BANK_SIZE, - Titanium::invtype::VIEW_MOD_SHARED_BANK_SIZE, - Titanium::invtype::VIEW_MOD_LIMBO_SIZE, - Titanium::INULL, - Titanium::INULL, - Titanium::INULL, - Titanium::INULL, - Titanium::INULL, - Titanium::INULL, + ), + /*[MobVersion::OfflineTitanium] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + Titanium::INULL, Titanium::INULL, Titanium::INULL, + Titanium::invtype::TRADE_SIZE, Titanium::INULL, Titanium::INULL, + Titanium::INULL, Titanium::INULL, Titanium::INULL, + Titanium::invtype::MERCHANT_SIZE, Titanium::INULL, Titanium::INULL, + Titanium::invtype::BAZAAR_SIZE, Titanium::invtype::INSPECT_SIZE, Titanium::INULL, + Titanium::invtype::VIEW_MOD_PC_SIZE, Titanium::invtype::VIEW_MOD_BANK_SIZE, Titanium::invtype::VIEW_MOD_SHARED_BANK_SIZE, + Titanium::invtype::VIEW_MOD_LIMBO_SIZE, Titanium::INULL, Titanium::INULL, + Titanium::INULL, Titanium::INULL, Titanium::INULL, + Titanium::INULL + ), Titanium::INULL, Titanium::INULL, @@ -740,33 +527,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi false, false, false - }, - { // OfflineSoF - SoF::INULL, - SoF::INULL, - SoF::INULL, - SoF::invtype::TRADE_SIZE, - SoF::INULL, - SoF::INULL, - SoF::INULL, - SoF::INULL, - SoF::INULL, - SoF::invtype::MERCHANT_SIZE, - SoF::INULL, - SoF::INULL, - SoF::invtype::BAZAAR_SIZE, - SoF::invtype::INSPECT_SIZE, - SoF::INULL, - SoF::invtype::VIEW_MOD_PC_SIZE, - SoF::invtype::VIEW_MOD_BANK_SIZE, - SoF::invtype::VIEW_MOD_SHARED_BANK_SIZE, - SoF::invtype::VIEW_MOD_LIMBO_SIZE, - SoF::INULL, - SoF::INULL, - SoF::INULL, - SoF::INULL, - SoF::INULL, - SoF::INULL, + ), + /*[MobVersion::OfflineSoF] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + SoF::INULL, SoF::INULL, SoF::INULL, + SoF::invtype::TRADE_SIZE, SoF::INULL, SoF::INULL, + SoF::INULL, SoF::INULL, SoF::INULL, + SoF::invtype::MERCHANT_SIZE, SoF::INULL, SoF::INULL, + SoF::invtype::BAZAAR_SIZE, SoF::invtype::INSPECT_SIZE, SoF::INULL, + SoF::invtype::VIEW_MOD_PC_SIZE, SoF::invtype::VIEW_MOD_BANK_SIZE, SoF::invtype::VIEW_MOD_SHARED_BANK_SIZE, + SoF::invtype::VIEW_MOD_LIMBO_SIZE, SoF::INULL, SoF::INULL, + SoF::INULL, SoF::INULL, SoF::INULL, + SoF::INULL + ), SoF::INULL, SoF::INULL, @@ -777,33 +551,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi false, false, false - }, - { // OfflineSoD - SoD::INULL, - SoD::INULL, - SoD::INULL, - SoD::invtype::TRADE_SIZE, - SoD::INULL, - SoD::INULL, - SoD::INULL, - SoD::INULL, - SoD::INULL, - SoD::invtype::MERCHANT_SIZE, - SoD::INULL, - SoD::INULL, - SoD::invtype::BAZAAR_SIZE, - SoD::invtype::INSPECT_SIZE, - SoD::INULL, - SoD::invtype::VIEW_MOD_PC_SIZE, - SoD::invtype::VIEW_MOD_BANK_SIZE, - SoD::invtype::VIEW_MOD_SHARED_BANK_SIZE, - SoD::invtype::VIEW_MOD_LIMBO_SIZE, - SoD::INULL, - SoD::INULL, - SoD::INULL, - SoD::INULL, - SoD::INULL, - SoD::INULL, + ), + /*[MobVersion::OfflineSoD] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + SoD::INULL, SoD::INULL, SoD::INULL, + SoD::invtype::TRADE_SIZE, SoD::INULL, SoD::INULL, + SoD::INULL, SoD::INULL, SoD::INULL, + SoD::invtype::MERCHANT_SIZE, SoD::INULL, SoD::INULL, + SoD::invtype::BAZAAR_SIZE, SoD::invtype::INSPECT_SIZE, SoD::INULL, + SoD::invtype::VIEW_MOD_PC_SIZE, SoD::invtype::VIEW_MOD_BANK_SIZE, SoD::invtype::VIEW_MOD_SHARED_BANK_SIZE, + SoD::invtype::VIEW_MOD_LIMBO_SIZE, SoD::INULL, SoD::INULL, + SoD::INULL, SoD::INULL, SoD::INULL, + SoD::INULL + ), SoD::INULL, SoD::INULL, @@ -814,33 +575,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi false, false, false - }, - { // OfflineUF - UF::INULL, - UF::INULL, - UF::INULL, - UF::invtype::TRADE_SIZE, - UF::INULL, - UF::INULL, - UF::INULL, - UF::INULL, - UF::INULL, - UF::invtype::MERCHANT_SIZE, - UF::INULL, - UF::INULL, - UF::invtype::BAZAAR_SIZE, - UF::invtype::INSPECT_SIZE, - UF::INULL, - UF::invtype::VIEW_MOD_PC_SIZE, - UF::invtype::VIEW_MOD_BANK_SIZE, - UF::invtype::VIEW_MOD_SHARED_BANK_SIZE, - UF::invtype::VIEW_MOD_LIMBO_SIZE, - UF::INULL, - UF::INULL, - UF::INULL, - UF::INULL, - UF::INULL, - UF::INULL, + ), + /*[MobVersion::OfflineUF] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + UF::INULL, UF::INULL, UF::INULL, + UF::invtype::TRADE_SIZE, UF::INULL, UF::INULL, + UF::INULL, UF::INULL, UF::INULL, + UF::invtype::MERCHANT_SIZE, UF::INULL, UF::INULL, + UF::invtype::BAZAAR_SIZE, UF::invtype::INSPECT_SIZE, UF::INULL, + UF::invtype::VIEW_MOD_PC_SIZE, UF::invtype::VIEW_MOD_BANK_SIZE, UF::invtype::VIEW_MOD_SHARED_BANK_SIZE, + UF::invtype::VIEW_MOD_LIMBO_SIZE, UF::INULL, UF::INULL, + UF::INULL, UF::INULL, UF::INULL, + UF::INULL + ), UF::INULL, UF::INULL, @@ -851,33 +599,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi false, false, false - }, - { // OfflineRoF - RoF::INULL, - RoF::INULL, - RoF::INULL, - RoF::invtype::TRADE_SIZE, - RoF::INULL, - RoF::INULL, - RoF::INULL, - RoF::INULL, - RoF::INULL, - RoF::invtype::MERCHANT_SIZE, - RoF::INULL, - RoF::INULL, - RoF::invtype::BAZAAR_SIZE, - RoF::invtype::INSPECT_SIZE, - RoF::INULL, - RoF::invtype::VIEW_MOD_PC_SIZE, - RoF::invtype::VIEW_MOD_BANK_SIZE, - RoF::invtype::VIEW_MOD_SHARED_BANK_SIZE, - RoF::invtype::VIEW_MOD_LIMBO_SIZE, - RoF::INULL, - RoF::INULL, - RoF::INULL, - RoF::INULL, - RoF::INULL, - RoF::INULL, + ), + /*[MobVersion::OfflineRoF] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + RoF::INULL, RoF::INULL, RoF::INULL, + RoF::invtype::TRADE_SIZE, RoF::INULL, RoF::INULL, + RoF::INULL, RoF::INULL, RoF::INULL, + RoF::invtype::MERCHANT_SIZE, RoF::INULL, RoF::INULL, + RoF::invtype::BAZAAR_SIZE, RoF::invtype::INSPECT_SIZE, RoF::INULL, + RoF::invtype::VIEW_MOD_PC_SIZE, RoF::invtype::VIEW_MOD_BANK_SIZE, RoF::invtype::VIEW_MOD_SHARED_BANK_SIZE, + RoF::invtype::VIEW_MOD_LIMBO_SIZE, RoF::INULL, RoF::INULL, + RoF::INULL, RoF::INULL, RoF::INULL, + RoF::INULL + ), RoF::INULL, RoF::INULL, @@ -888,33 +623,20 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi false, false, false - }, - { // OfflineRoF2 - RoF2::INULL, - RoF2::INULL, - RoF2::INULL, - RoF2::invtype::TRADE_SIZE, - RoF2::INULL, - RoF2::INULL, - RoF2::INULL, - RoF2::INULL, - RoF2::INULL, - RoF2::invtype::MERCHANT_SIZE, - RoF2::INULL, - RoF2::INULL, - RoF2::invtype::BAZAAR_SIZE, - RoF2::invtype::INSPECT_SIZE, - RoF2::INULL, - RoF2::invtype::VIEW_MOD_PC_SIZE, - RoF2::invtype::VIEW_MOD_BANK_SIZE, - RoF2::invtype::VIEW_MOD_SHARED_BANK_SIZE, - RoF2::invtype::VIEW_MOD_LIMBO_SIZE, - RoF2::INULL, - RoF2::INULL, - RoF2::INULL, - RoF2::INULL, - RoF2::INULL, - RoF2::INULL, + ), + /*[MobVersion::OfflineRoF2] =*/ + EQEmu::inventory::LookupEntry( + EQEmu::inventory::LookupEntry::InventoryTypeSize_Struct( + RoF2::INULL, RoF2::INULL, RoF2::INULL, + RoF2::invtype::TRADE_SIZE, RoF2::INULL, RoF2::INULL, + RoF2::INULL, RoF2::INULL, RoF2::INULL, + RoF2::invtype::MERCHANT_SIZE, RoF2::INULL, RoF2::INULL, + RoF2::invtype::BAZAAR_SIZE, RoF2::invtype::INSPECT_SIZE, RoF2::INULL, + RoF2::invtype::VIEW_MOD_PC_SIZE, RoF2::invtype::VIEW_MOD_BANK_SIZE, RoF2::invtype::VIEW_MOD_SHARED_BANK_SIZE, + RoF2::invtype::VIEW_MOD_LIMBO_SIZE, RoF2::INULL, RoF2::INULL, + RoF2::INULL, RoF2::INULL, RoF2::INULL, + RoF2::INULL + ), RoF2::INULL, RoF2::INULL, @@ -925,7 +647,7 @@ static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versi false, false, false - } + ) }; const EQEmu::inventory::LookupEntry* EQEmu::inventory::Lookup(versions::MobVersion mob_version) @@ -935,70 +657,92 @@ const EQEmu::inventory::LookupEntry* EQEmu::inventory::Lookup(versions::MobVersi static const EQEmu::behavior::LookupEntry behavior_lookup_entries[EQEmu::versions::MobVersionCount] = { - { // Unknown + /*[MobVersion::Unknown] =*/ + EQEmu::behavior::LookupEntry() = { true }, - { // Client62 + /*[MobVersion::Client62] =*/ + EQEmu::behavior::LookupEntry() = { true }, - { // Titanium + /*[MobVersion::Titanium] =*/ + EQEmu::behavior::LookupEntry() = { Titanium::behavior::CoinHasWeight }, - { // SoF + /*[MobVersion::SoF] =*/ + EQEmu::behavior::LookupEntry() = { SoF::behavior::CoinHasWeight }, - { // SoD + /*[MobVersion::SoD] =*/ + EQEmu::behavior::LookupEntry() = { SoD::behavior::CoinHasWeight }, - { // UF + /*[MobVersion::UF] =*/ + EQEmu::behavior::LookupEntry() = { UF::behavior::CoinHasWeight }, - { // RoF + /*[MobVersion::RoF] =*/ + EQEmu::behavior::LookupEntry() = { RoF::behavior::CoinHasWeight }, - { // RoF2 + /*[MobVersion::RoF2] =*/ + EQEmu::behavior::LookupEntry() = { RoF2::behavior::CoinHasWeight }, - { // NPC + /*[MobVersion::NPC] =*/ + EQEmu::behavior::LookupEntry() = { EQEmu::behavior::CoinHasWeight }, - { // NPCMerchant + /*[MobVersion::NPCMerchant] =*/ + EQEmu::behavior::LookupEntry() = { EQEmu::behavior::CoinHasWeight }, - { // Merc + /*[MobVersion::Merc] =*/ + EQEmu::behavior::LookupEntry() = { EQEmu::behavior::CoinHasWeight }, - { // Bot + /*[MobVersion::Bot] =*/ + EQEmu::behavior::LookupEntry() = { EQEmu::behavior::CoinHasWeight }, - { // ClientPet + /*[MobVersion::ClientPet] =*/ + EQEmu::behavior::LookupEntry() = { EQEmu::behavior::CoinHasWeight }, - { // NPCPet + /*[MobVersion::NPCPet] =*/ + EQEmu::behavior::LookupEntry() = { EQEmu::behavior::CoinHasWeight }, - { // MercPet + /*[MobVersion::MercPet] =*/ + EQEmu::behavior::LookupEntry() = { EQEmu::behavior::CoinHasWeight }, - { // BotPet + /*[MobVersion::BotPet] =*/ + EQEmu::behavior::LookupEntry() = { EQEmu::behavior::CoinHasWeight }, - { // OfflineTitanium + /*[MobVersion::OfflineTitanium] =*/ + EQEmu::behavior::LookupEntry() = { Titanium::behavior::CoinHasWeight }, - { // OfflineSoF + /*[MobVersion::OfflineSoF] =*/ + EQEmu::behavior::LookupEntry() = { SoF::behavior::CoinHasWeight }, - { // OfflineSoD + /*[MobVersion::OfflineSoD] =*/ + EQEmu::behavior::LookupEntry() = { SoD::behavior::CoinHasWeight }, - { // OfflineUF + /*[MobVersion::OfflineUF] =*/ + EQEmu::behavior::LookupEntry() = { UF::behavior::CoinHasWeight }, - { // OfflineRoF + /*[MobVersion::OfflineRoF] =*/ + EQEmu::behavior::LookupEntry() = { RoF::behavior::CoinHasWeight }, - { // OfflineRoF2 + /*[MobVersion::OfflineRoF2] =*/ + EQEmu::behavior::LookupEntry() = { RoF2::behavior::CoinHasWeight } }; diff --git a/common/eq_limits.h b/common/eq_limits.h index c26c7697e..8bb620d0e 100644 --- a/common/eq_limits.h +++ b/common/eq_limits.h @@ -34,8 +34,7 @@ namespace EQEmu { namespace constants { - class LookupEntry { - public: + struct LookupEntry { int16 CharacterCreationLimit; int LongBuffs; int ShortBuffs; @@ -51,14 +50,50 @@ namespace EQEmu } /*constants*/ namespace inventory { - class LookupEntry { - public: + struct LookupEntry { // note: 'PossessionsBitmask' needs to be attuned to the client version with the highest number // of possessions slots and 'InventoryTypeSize[typePossessions]' should reflect the same count // with translators adjusting for valid slot indices. Server-side validations will be performed // against 'PossessionsBitmask' (note: the same applies to Corpse type size and bitmask) - int16 InventoryTypeSize[25]; // should reflect EQEmu::invtype::TYPE_COUNT referenced in emu_constants.h + struct InventoryTypeSize_Struct { // should reflect count and naming conventions referenced in emu_constants.h + int16 Possessions, Bank, SharedBank; + int16 Trade, World, Limbo; + int16 Tribute, TrophyTribute, GuildTribute; + int16 Merchant, Deleted, Corpse; + int16 Bazaar, Inspect, RealEstate; + int16 ViewMODPC, ViewMODBank, ViewMODSharedBank; + int16 ViewMODLimbo, AltStorage, Archived; + int16 Mail, GuildTrophyTribute, Krono; + int16 Other; + + InventoryTypeSize_Struct( + int16 Possessions, int16 Bank, int16 SharedBank, + int16 Trade, int16 World, int16 Limbo, + int16 Tribute, int16 TrophyTribute, int16 GuildTribute, + int16 Merchant, int16 Deleted, int16 Corpse, + int16 Bazaar, int16 Inspect, int16 RealEstate, + int16 ViewMODPC, int16 ViewMODBank, int16 ViewMODSharedBank, + int16 ViewMODLimbo, int16 AltStorage, int16 Archived, + int16 Mail, int16 GuildTrophyTribute, int16 Krono, + int16 Other + ) : + Possessions(Possessions), Bank(Bank), SharedBank(SharedBank), + Trade(Trade), World(World), Limbo(Limbo), + Tribute(Tribute), TrophyTribute(TrophyTribute), GuildTribute(GuildTribute), + Merchant(Merchant), Deleted(Deleted), Corpse(Corpse), + Bazaar(Bazaar), Inspect(Inspect), RealEstate(RealEstate), + ViewMODPC(ViewMODPC), ViewMODBank(ViewMODBank), ViewMODSharedBank(ViewMODSharedBank), + ViewMODLimbo(ViewMODLimbo), AltStorage(AltStorage), Archived(Archived), + Mail(Mail), GuildTrophyTribute(GuildTrophyTribute), Krono(Krono), + Other(Other) + { } + }; + + union { + InventoryTypeSize_Struct InventoryTypeSize; + int16 InventoryTypeSizeArray[25]; // should reflect EQEmu::invtype::TYPE_COUNT referenced in emu_constants.h + }; uint64 PossessionsBitmask; uint64 CorpseBitmask; @@ -69,6 +104,28 @@ namespace EQEmu bool AllowClickCastFromBag; bool ConcatenateInvTypeLimbo; bool AllowOverLevelEquipment; + + LookupEntry( + InventoryTypeSize_Struct InventoryTypeSize, + uint64 PossessionsBitmask, + uint64 CorpseBitmask, + int16 BagSlotCount, + int16 AugSocketCount, + bool AllowEmptyBagInBag, + bool AllowClickCastFromBag, + bool ConcatenateInvTypeLimbo, + bool AllowOverLevelEquipment + ) : + InventoryTypeSize(InventoryTypeSize), + PossessionsBitmask(PossessionsBitmask), + CorpseBitmask(CorpseBitmask), + BagSlotCount(BagSlotCount), + AugSocketCount(AugSocketCount), + AllowEmptyBagInBag(AllowEmptyBagInBag), + AllowClickCastFromBag(AllowClickCastFromBag), + ConcatenateInvTypeLimbo(ConcatenateInvTypeLimbo), + AllowOverLevelEquipment(AllowOverLevelEquipment) + { } }; const LookupEntry* Lookup(versions::MobVersion mob_version); @@ -76,8 +133,7 @@ namespace EQEmu } /*inventory*/ namespace behavior { - class LookupEntry { - public: + struct LookupEntry { bool CoinHasWeight; }; diff --git a/common/inventory_profile.cpp b/common/inventory_profile.cpp index 47068a492..f353aa673 100644 --- a/common/inventory_profile.cpp +++ b/common/inventory_profile.cpp @@ -241,12 +241,12 @@ int16 EQEmu::InventoryProfile::PutItem(int16 slot_id, const ItemInstance& inst) return EQEmu::invslot::SLOT_INVALID; } else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) { - if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) + if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize.Bank) return EQEmu::invslot::SLOT_INVALID; } else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) { auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; - if (temp_slot >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) + if (temp_slot >= m_lookup->InventoryTypeSize.Bank) return EQEmu::invslot::SLOT_INVALID; } @@ -298,14 +298,14 @@ bool EQEmu::InventoryProfile::SwapItem( } } else if (source_slot <= EQEmu::invslot::BANK_END && source_slot >= EQEmu::invslot::BANK_BEGIN) { - if ((source_slot - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) { + if ((source_slot - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize.Bank) { fail_state = swapNotAllowed; return false; } } else if (source_slot <= EQEmu::invbag::BANK_BAGS_END && source_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) { auto temp_slot = (source_slot - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; - if (temp_slot >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) { + if (temp_slot >= m_lookup->InventoryTypeSize.Bank) { fail_state = swapNotAllowed; return false; } @@ -325,14 +325,14 @@ bool EQEmu::InventoryProfile::SwapItem( } } else if (destination_slot <= EQEmu::invslot::BANK_END && destination_slot >= EQEmu::invslot::BANK_BEGIN) { - if ((destination_slot - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) { + if ((destination_slot - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize.Bank) { fail_state = swapNotAllowed; return false; } } else if (destination_slot <= EQEmu::invbag::BANK_BAGS_END && destination_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) { auto temp_slot = (destination_slot - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; - if (temp_slot >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) { + if (temp_slot >= m_lookup->InventoryTypeSize.Bank) { fail_state = swapNotAllowed; return false; } @@ -1308,7 +1308,7 @@ EQEmu::ItemInstance* EQEmu::InventoryProfile::_GetItem(const std::map= EQEmu::invslot::BANK_BEGIN) { - if (slot_id - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) + if (slot_id - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize.Bank) return nullptr; } @@ -1360,7 +1360,7 @@ int16 EQEmu::InventoryProfile::_PutItem(int16 slot_id, ItemInstance* inst) result = slot_id; } else if (slot_id >= invslot::BANK_BEGIN && slot_id <= invslot::BANK_END) { - if (slot_id - EQEmu::invslot::BANK_BEGIN < m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) { + if (slot_id - EQEmu::invslot::BANK_BEGIN < m_lookup->InventoryTypeSize.Bank) { m_bank[slot_id] = inst; result = slot_id; } @@ -1403,7 +1403,7 @@ int16 EQEmu::InventoryProfile::_HasItem(std::map& bucket, continue; } else if (iter->first <= EQEmu::invslot::BANK_END && iter->first >= EQEmu::invslot::BANK_BEGIN) { - if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) + if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize.Bank) continue; } @@ -1505,7 +1505,7 @@ int16 EQEmu::InventoryProfile::_HasItemByUse(std::map& buc continue; } else if (iter->first <= EQEmu::invslot::BANK_END && iter->first >= EQEmu::invslot::BANK_BEGIN) { - if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) + if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize.Bank) continue; } @@ -1578,7 +1578,7 @@ int16 EQEmu::InventoryProfile::_HasItemByLoreGroup(std::mapfirst <= EQEmu::invslot::BANK_END && iter->first >= EQEmu::invslot::BANK_BEGIN) { - if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) + if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize.Bank) continue; } diff --git a/common/shareddb.cpp b/common/shareddb.cpp index c4dd86f32..97a071448 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -571,7 +571,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, EQEmu::InventoryProfile *inv) auto cv_conflict = false; auto pmask = inv->GetLookup()->PossessionsBitmask; - auto bank_size = inv->GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]; + auto bank_size = inv->GetLookup()->InventoryTypeSize.Bank; for (auto row = results.begin(); row != results.end(); ++row) { int16 slot_id = atoi(row[0]); diff --git a/zone/corpse.cpp b/zone/corpse.cpp index dd362fedb..681f6d17a 100644 --- a/zone/corpse.cpp +++ b/zone/corpse.cpp @@ -1374,7 +1374,7 @@ void Corpse::QueryLoot(Client* to) { cur = itemlist.begin(); end = itemlist.end(); - int corpselootlimit = EQEmu::inventory::Lookup(EQEmu::versions::ConvertClientVersionToMobVersion(to->ClientVersion()))->InventoryTypeSize[EQEmu::invtype::typeCorpse]; + int corpselootlimit = EQEmu::inventory::Lookup(EQEmu::versions::ConvertClientVersionToMobVersion(to->ClientVersion()))->InventoryTypeSize.Corpse; for(; cur != end; ++cur) { ServerLootItem_Struct* sitem = *cur; diff --git a/zone/inventory.cpp b/zone/inventory.cpp index 3ceefc33b..9c802b5a3 100644 --- a/zone/inventory.cpp +++ b/zone/inventory.cpp @@ -113,7 +113,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { x++; } - DeleteItemInInventory(i, 0, ((i - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank])); + DeleteItemInInventory(i, 0, ((i - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize.Bank)); } } @@ -126,7 +126,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { x++; } - DeleteItemInInventory(i, 0, (((i - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank])); + DeleteItemInInventory(i, 0, (((i - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT) >= GetInv().GetLookup()->InventoryTypeSize.Bank)); } } } @@ -781,12 +781,12 @@ int32 Client::GetItemIDAt(int16 slot_id) { return INVALID_ID; } else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) { - if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize.Bank) return INVALID_ID; } else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) { auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; - if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize.Bank) return INVALID_ID; } @@ -811,12 +811,12 @@ int32 Client::GetAugmentIDAt(int16 slot_id, uint8 augslot) { return INVALID_ID; } else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) { - if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize.Bank) return INVALID_ID; } else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) { auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; - if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize.Bank) return INVALID_ID; } @@ -1474,11 +1474,11 @@ bool Client::IsValidSlot(uint32 slot) { return ((((uint64)1 << temp_slot) & GetInv().GetLookup()->PossessionsBitmask) != 0); } else if (slot <= EQEmu::invslot::BANK_END && slot >= EQEmu::invslot::BANK_BEGIN) { - return ((slot - EQEmu::invslot::BANK_BEGIN) < GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]); + return ((slot - EQEmu::invslot::BANK_BEGIN) < GetInv().GetLookup()->InventoryTypeSize.Bank); } else if (slot <= EQEmu::invbag::BANK_BAGS_END && slot >= EQEmu::invbag::BANK_BAGS_BEGIN) { auto temp_slot = (slot - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; - return (temp_slot < GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]); + return (temp_slot < GetInv().GetLookup()->InventoryTypeSize.Bank); } else if ( (slot == (uint32)INVALID_INDEX) || @@ -2500,7 +2500,7 @@ void Client::DisenchantSummonedBags(bool client_update) } for (auto slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; ++slot_id) { - if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize.Bank) continue; auto inst = m_inv[slot_id]; @@ -2627,7 +2627,7 @@ void Client::RemoveNoRent(bool client_update) } for (auto slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; ++slot_id) { - if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize.Bank) continue; auto inst = m_inv[slot_id]; @@ -2639,7 +2639,7 @@ void Client::RemoveNoRent(bool client_update) for (auto slot_id = EQEmu::invbag::BANK_BAGS_BEGIN; slot_id <= EQEmu::invbag::BANK_BAGS_END; ++slot_id) { auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; - if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize.Bank) continue; auto inst = m_inv[slot_id]; @@ -2745,7 +2745,7 @@ void Client::RemoveDuplicateLore(bool client_update) } for (auto slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; ++slot_id) { - if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize.Bank) continue; auto inst = m_inv.PopItem(slot_id); @@ -2762,7 +2762,7 @@ void Client::RemoveDuplicateLore(bool client_update) for (auto slot_id = EQEmu::invbag::BANK_BAGS_BEGIN; slot_id <= EQEmu::invbag::BANK_BAGS_END; ++slot_id) { auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; - if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize.Bank) continue; auto inst = m_inv.PopItem(slot_id); @@ -2925,12 +2925,12 @@ void Client::SendItemPacket(int16 slot_id, const EQEmu::ItemInstance* inst, Item return; } else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) { - if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize.Bank) return; } else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) { auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; - if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize.Bank) return; } From 0d3880803019c0ef3bbd7965f71a00dfb7936cf6 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 7 Jan 2019 07:39:43 -0500 Subject: [PATCH 18/20] Updated EQDictionary entries to allow ease of reading and gui tooltip propagation (pt. 2) --- common/eq_limits.cpp | 120 +++++++++++++++++++++---------------------- common/eq_limits.h | 26 ++++++++++ 2 files changed, 86 insertions(+), 60 deletions(-) diff --git a/common/eq_limits.cpp b/common/eq_limits.cpp index 9d37946cc..557e5c7f4 100644 --- a/common/eq_limits.cpp +++ b/common/eq_limits.cpp @@ -24,7 +24,7 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versions::ClientVersionCount] = { /*[ClientVersion::Unknown] =*/ - EQEmu::constants::LookupEntry() = { + EQEmu::constants::LookupEntry( ClientUnknown::INULL, ClientUnknown::INULL, ClientUnknown::INULL, @@ -33,9 +33,9 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi ClientUnknown::INULL, ClientUnknown::INULL, ClientUnknown::INULL - }, + ), /*[ClientVersion::Client62] =*/ - EQEmu::constants::LookupEntry() = { + EQEmu::constants::LookupEntry( Client62::INULL, Client62::INULL, Client62::INULL, @@ -44,9 +44,9 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi Client62::INULL, Client62::INULL, Client62::INULL - }, + ), /*[ClientVersion::Titanium] =*/ - EQEmu::constants::LookupEntry() = { + EQEmu::constants::LookupEntry( Titanium::constants::CHARACTER_CREATION_LIMIT, Titanium::constants::LongBuffs, Titanium::constants::ShortBuffs, @@ -55,9 +55,9 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi Titanium::constants::NPCBuffs, Titanium::constants::PetBuffs, Titanium::constants::MercBuffs - }, + ), /*[ClientVersion::SoF] =*/ - EQEmu::constants::LookupEntry() = { + EQEmu::constants::LookupEntry( SoF::constants::CHARACTER_CREATION_LIMIT, SoF::constants::LongBuffs, SoF::constants::ShortBuffs, @@ -66,9 +66,9 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi SoF::constants::NPCBuffs, SoF::constants::PetBuffs, SoF::constants::MercBuffs - }, + ), /*[ClientVersion::SoD] =*/ - EQEmu::constants::LookupEntry() = { + EQEmu::constants::LookupEntry( SoD::constants::CHARACTER_CREATION_LIMIT, SoD::constants::LongBuffs, SoD::constants::ShortBuffs, @@ -77,9 +77,9 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi SoD::constants::NPCBuffs, SoD::constants::PetBuffs, SoD::constants::MercBuffs - }, + ), /*[ClientVersion::UF] =*/ - EQEmu::constants::LookupEntry() = { + EQEmu::constants::LookupEntry( UF::constants::CHARACTER_CREATION_LIMIT, UF::constants::LongBuffs, UF::constants::ShortBuffs, @@ -88,9 +88,9 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi UF::constants::NPCBuffs, UF::constants::PetBuffs, UF::constants::MercBuffs - }, + ), /*[ClientVersion::RoF] =*/ - EQEmu::constants::LookupEntry() = { + EQEmu::constants::LookupEntry( RoF::constants::CHARACTER_CREATION_LIMIT, RoF::constants::LongBuffs, RoF::constants::ShortBuffs, @@ -99,9 +99,9 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi RoF::constants::NPCBuffs, RoF::constants::PetBuffs, RoF::constants::MercBuffs - }, + ), /*[ClientVersion::RoF2] =*/ - EQEmu::constants::LookupEntry() = { + EQEmu::constants::LookupEntry( RoF2::constants::CHARACTER_CREATION_LIMIT, RoF2::constants::LongBuffs, RoF2::constants::ShortBuffs, @@ -110,7 +110,7 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi RoF2::constants::NPCBuffs, RoF2::constants::PetBuffs, RoF2::constants::MercBuffs - } + ) }; const EQEmu::constants::LookupEntry* EQEmu::constants::Lookup(versions::ClientVersion client_version) @@ -658,93 +658,93 @@ const EQEmu::inventory::LookupEntry* EQEmu::inventory::Lookup(versions::MobVersi static const EQEmu::behavior::LookupEntry behavior_lookup_entries[EQEmu::versions::MobVersionCount] = { /*[MobVersion::Unknown] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( true - }, + ), /*[MobVersion::Client62] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( true - }, + ), /*[MobVersion::Titanium] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( Titanium::behavior::CoinHasWeight - }, + ), /*[MobVersion::SoF] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( SoF::behavior::CoinHasWeight - }, + ), /*[MobVersion::SoD] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( SoD::behavior::CoinHasWeight - }, + ), /*[MobVersion::UF] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( UF::behavior::CoinHasWeight - }, + ), /*[MobVersion::RoF] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( RoF::behavior::CoinHasWeight - }, + ), /*[MobVersion::RoF2] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( RoF2::behavior::CoinHasWeight - }, + ), /*[MobVersion::NPC] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( EQEmu::behavior::CoinHasWeight - }, + ), /*[MobVersion::NPCMerchant] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( EQEmu::behavior::CoinHasWeight - }, + ), /*[MobVersion::Merc] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( EQEmu::behavior::CoinHasWeight - }, + ), /*[MobVersion::Bot] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( EQEmu::behavior::CoinHasWeight - }, + ), /*[MobVersion::ClientPet] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( EQEmu::behavior::CoinHasWeight - }, + ), /*[MobVersion::NPCPet] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( EQEmu::behavior::CoinHasWeight - }, + ), /*[MobVersion::MercPet] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( EQEmu::behavior::CoinHasWeight - }, + ), /*[MobVersion::BotPet] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( EQEmu::behavior::CoinHasWeight - }, + ), /*[MobVersion::OfflineTitanium] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( Titanium::behavior::CoinHasWeight - }, + ), /*[MobVersion::OfflineSoF] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( SoF::behavior::CoinHasWeight - }, + ), /*[MobVersion::OfflineSoD] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( SoD::behavior::CoinHasWeight - }, + ), /*[MobVersion::OfflineUF] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( UF::behavior::CoinHasWeight - }, + ), /*[MobVersion::OfflineRoF] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( RoF::behavior::CoinHasWeight - }, + ), /*[MobVersion::OfflineRoF2] =*/ - EQEmu::behavior::LookupEntry() = { + EQEmu::behavior::LookupEntry( RoF2::behavior::CoinHasWeight - } + ) }; const EQEmu::behavior::LookupEntry* EQEmu::behavior::Lookup(versions::MobVersion mob_version) diff --git a/common/eq_limits.h b/common/eq_limits.h index 8bb620d0e..fe95ea809 100644 --- a/common/eq_limits.h +++ b/common/eq_limits.h @@ -43,6 +43,26 @@ namespace EQEmu int NPCBuffs; int PetBuffs; int MercBuffs; + + LookupEntry( + int16 CharacterCreationLimit, + int LongBuffs, + int ShortBuffs, + int DiscBuffs, + int TotalBuffs, + int NPCBuffs, + int PetBuffs, + int MercBuffs + ) : + CharacterCreationLimit(CharacterCreationLimit), + LongBuffs(LongBuffs), + ShortBuffs(ShortBuffs), + DiscBuffs(DiscBuffs), + TotalBuffs(TotalBuffs), + NPCBuffs(NPCBuffs), + PetBuffs(PetBuffs), + MercBuffs(MercBuffs) + { } }; const LookupEntry* Lookup(versions::ClientVersion client_version); @@ -135,6 +155,12 @@ namespace EQEmu namespace behavior { struct LookupEntry { bool CoinHasWeight; + + LookupEntry( + bool CoinHasWeight + ) : + CoinHasWeight(CoinHasWeight) + { } }; const LookupEntry* Lookup(versions::MobVersion mob_version); From 8eaed2233f321e6b56c9798acd730d385b319131 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 7 Jan 2019 18:18:35 -0500 Subject: [PATCH 19/20] Added namespace expansions --- common/emu_constants.h | 3 + common/emu_versions.cpp | 109 +++++++++++++++++++++++++------ common/emu_versions.h | 56 +++++++++++++++- common/eq_limits.cpp | 24 +++++++ common/eq_limits.h | 9 +++ common/patches/rof2_limits.h | 3 + common/patches/rof_limits.h | 3 + common/patches/sod_limits.h | 3 + common/patches/sof_limits.h | 3 + common/patches/titanium_limits.h | 3 + common/patches/uf_limits.h | 3 + world/client.cpp | 2 +- zone/attack.cpp | 2 +- zone/client_packet.cpp | 2 +- 14 files changed, 198 insertions(+), 27 deletions(-) diff --git a/common/emu_constants.h b/common/emu_constants.h index 4fbdd107d..8d27e74b0 100644 --- a/common/emu_constants.h +++ b/common/emu_constants.h @@ -188,6 +188,9 @@ namespace EQEmu namespace constants { const EQEmu::versions::ClientVersion CHARACTER_CREATION_CLIENT = EQEmu::versions::ClientVersion::Titanium; + using RoF2::constants::EXPANSION_BIT; + using RoF2::constants::EXPANSIONS_MASK; + using RoF2::constants::CHARACTER_CREATION_LIMIT; const size_t SAY_LINK_OPENER_SIZE = 1; diff --git a/common/emu_versions.cpp b/common/emu_versions.cpp index ee4970638..e1c867cbb 100644 --- a/common/emu_versions.cpp +++ b/common/emu_versions.cpp @@ -106,27 +106,6 @@ EQEmu::versions::ClientVersion EQEmu::versions::ConvertClientVersionBitToClientV } } -uint32 EQEmu::versions::ConvertClientVersionToExpansion(ClientVersion client_version) -{ - switch (client_version) { - case ClientVersion::Unknown: - case ClientVersion::Client62: - case ClientVersion::Titanium: - return 0x000007FFU; - case ClientVersion::SoF: - return 0x00007FFFU; - case ClientVersion::SoD: - return 0x0000FFFFU; - case ClientVersion::UF: - return 0x0001FFFFU; - case ClientVersion::RoF: - case ClientVersion::RoF2: - return 0x000FFFFFU; - default: - return 0; - } -} - bool EQEmu::versions::IsValidMobVersion(MobVersion mob_version) { if (mob_version <= MobVersion::Unknown || mob_version > LastMobVersion) @@ -368,3 +347,91 @@ EQEmu::versions::MobVersion EQEmu::versions::ConvertClientVersionToOfflinePCMobV return MobVersion::Unknown; } } + +const char* EQEmu::expansions::ExpansionName(uint32 expansion_bit) +{ + switch (expansion_bit) { + case expansions::bitEverQuest: + return "EverQuest"; + case expansions::bitRoK: + return "The Ruins of Kunark"; + case expansions::bitSoV: + return "The Scars of Velious"; + case expansions::bitSoL: + return "The Shadows of Luclin"; + case expansions::bitPoP: + return "The Planes of Power"; + case expansions::bitLoY: + return "The Legacy of Ykesha"; + case expansions::bitLDoN: + return "Lost Dungeons of Norrath"; + case expansions::bitGoD: + return "Gates of Discord"; + case expansions::bitOoW: + return "Omens of War"; + case expansions::bitDoN: + return "Dragons of Norrath"; + case expansions::bitDoD: + return "Depths of Darkhollow"; + case expansions::bitPoR: + return "Prophecy of Ro"; + case expansions::bitTSS: + return "The Serpent's Spine"; + case expansions::bitTBS: + return "The Buried Sea"; + case expansions::bitSoF: + return "Secrets of Faydwer"; + case expansions::bitSoD: + return "Seeds of Destruction"; + case expansions::bitUF: + return "Underfoot"; + case expansions::bitHoT: + return "House of Thule"; + case expansions::bitVoA: + return "Veil of Alaris"; + case expansions::bitRoF: + return "Rain of Fear"; + case expansions::bitCotF: + return "Call of the Forsaken"; + default: + return "Invalid Expansion"; + } +} + +uint32 EQEmu::expansions::ConvertClientVersionToExpansionBit(versions::ClientVersion client_version) +{ + switch (client_version) { + case versions::ClientVersion::Titanium: + return expansions::bitPoR; + case versions::ClientVersion::SoF: + return expansions::bitSoF; + case versions::ClientVersion::SoD: + return expansions::bitSoD; + case versions::ClientVersion::UF: + return expansions::bitUF; + case versions::ClientVersion::RoF: + case versions::ClientVersion::RoF2: + return expansions::bitRoF; + default: + return expansions::bitEverQuest; + } +} + +uint32 EQEmu::expansions::ConvertClientVersionToExpansionMask(versions::ClientVersion client_version) +{ + switch (client_version) { + case versions::ClientVersion::Titanium: + return expansions::maskPoR; + case versions::ClientVersion::SoF: + return expansions::maskSoF; + case versions::ClientVersion::SoD: + return expansions::maskSoD; + case versions::ClientVersion::UF: + return expansions::maskUF; + case versions::ClientVersion::RoF: + case versions::ClientVersion::RoF2: + return expansions::maskRoF; + default: + return expansions::maskEverQuest; + } +} diff --git a/common/emu_versions.h b/common/emu_versions.h index a5f3d0183..2ef68b283 100644 --- a/common/emu_versions.h +++ b/common/emu_versions.h @@ -69,9 +69,7 @@ namespace EQEmu const char* ClientVersionName(ClientVersion client_version); uint32 ConvertClientVersionToClientVersionBit(ClientVersion client_version); ClientVersion ConvertClientVersionBitToClientVersion(uint32 client_version_bit); - uint32 ConvertClientVersionToExpansion(ClientVersion client_version); - - + enum class MobVersion : uint32 { Unknown = 0, Client62, @@ -137,6 +135,58 @@ namespace EQEmu } /*versions*/ + namespace expansions { + enum ExpansionBitmask : uint32 { + bitEverQuest = 0x00000000, + bitRoK = 0x00000001, + bitSoV = 0x00000002, + bitSoL = 0x00000004, + bitPoP = 0x00000008, + bitLoY = 0x00000010, + bitLDoN = 0x00000020, + bitGoD = 0x00000040, + bitOoW = 0x00000080, + bitDoN = 0x00000100, + bitDoD = 0x00000200, + bitPoR = 0x00000400, + bitTSS = 0x00000800, + bitTBS = 0x00001000, + bitSoF = 0x00002000, + bitSoD = 0x00004000, + bitUF = 0x00008000, + bitHoT = 0x00010000, + bitVoA = 0x00020000, + bitRoF = 0x00040000, + bitCotF = 0x00080000, + maskEverQuest = 0x00000000, + maskRoK = 0x00000001, + maskSoV = 0x00000003, + maskSoL = 0x00000007, + maskPoP = 0x0000000F, + maskLoY = 0x0000001F, + maskLDoN = 0x0000003F, + maskGoD = 0x0000007F, + maskOoW = 0x000000FF, + maskDoN = 0x000001FF, + maskDoD = 0x000003FF, + maskPoR = 0x000007FF, + maskTSS = 0x00000FFF, + maskTBS = 0x00001FFF, + maskSoF = 0x00003FFF, + maskSoD = 0x00007FFF, + maskUF = 0x0000FFFF, + maskHoT = 0x0001FFFF, + maskVoA = 0x0003FFFF, + maskRoF = 0x0007FFFF, + maskCotF = 0x000FFFFF + }; + + const char* ExpansionName(uint32 expansion_bit); + uint32 ConvertClientVersionToExpansionBit(versions::ClientVersion client_version); + uint32 ConvertClientVersionToExpansionMask(versions::ClientVersion client_version); + + } /*expansions*/ + } /*EQEmu*/ #endif /*COMMON_EMU_VERSIONS_H*/ diff --git a/common/eq_limits.cpp b/common/eq_limits.cpp index 557e5c7f4..025ec4f95 100644 --- a/common/eq_limits.cpp +++ b/common/eq_limits.cpp @@ -32,6 +32,9 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi ClientUnknown::INULL, ClientUnknown::INULL, ClientUnknown::INULL, + ClientUnknown::INULL, + ClientUnknown::INULL, + ClientUnknown::INULL, ClientUnknown::INULL ), /*[ClientVersion::Client62] =*/ @@ -43,11 +46,17 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi Client62::INULL, Client62::INULL, Client62::INULL, + Client62::INULL, + Client62::INULL, + Client62::INULL, Client62::INULL ), /*[ClientVersion::Titanium] =*/ EQEmu::constants::LookupEntry( + Titanium::constants::EXPANSION_BIT, + Titanium::constants::EXPANSIONS_MASK, Titanium::constants::CHARACTER_CREATION_LIMIT, + Titanium::constants::SAY_LINK_BODY_SIZE, Titanium::constants::LongBuffs, Titanium::constants::ShortBuffs, Titanium::constants::DiscBuffs, @@ -58,7 +67,10 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi ), /*[ClientVersion::SoF] =*/ EQEmu::constants::LookupEntry( + SoF::constants::EXPANSION_BIT, + SoF::constants::EXPANSIONS_MASK, SoF::constants::CHARACTER_CREATION_LIMIT, + SoF::constants::SAY_LINK_BODY_SIZE, SoF::constants::LongBuffs, SoF::constants::ShortBuffs, SoF::constants::DiscBuffs, @@ -69,7 +81,10 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi ), /*[ClientVersion::SoD] =*/ EQEmu::constants::LookupEntry( + SoD::constants::EXPANSION_BIT, + SoD::constants::EXPANSIONS_MASK, SoD::constants::CHARACTER_CREATION_LIMIT, + SoD::constants::SAY_LINK_BODY_SIZE, SoD::constants::LongBuffs, SoD::constants::ShortBuffs, SoD::constants::DiscBuffs, @@ -80,7 +95,10 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi ), /*[ClientVersion::UF] =*/ EQEmu::constants::LookupEntry( + UF::constants::EXPANSION_BIT, + UF::constants::EXPANSIONS_MASK, UF::constants::CHARACTER_CREATION_LIMIT, + UF::constants::SAY_LINK_BODY_SIZE, UF::constants::LongBuffs, UF::constants::ShortBuffs, UF::constants::DiscBuffs, @@ -91,7 +109,10 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi ), /*[ClientVersion::RoF] =*/ EQEmu::constants::LookupEntry( + RoF::constants::EXPANSION_BIT, + RoF::constants::EXPANSIONS_MASK, RoF::constants::CHARACTER_CREATION_LIMIT, + RoF::constants::SAY_LINK_BODY_SIZE, RoF::constants::LongBuffs, RoF::constants::ShortBuffs, RoF::constants::DiscBuffs, @@ -102,7 +123,10 @@ static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versi ), /*[ClientVersion::RoF2] =*/ EQEmu::constants::LookupEntry( + RoF2::constants::EXPANSION_BIT, + RoF2::constants::EXPANSIONS_MASK, RoF2::constants::CHARACTER_CREATION_LIMIT, + RoF2::constants::SAY_LINK_BODY_SIZE, RoF2::constants::LongBuffs, RoF2::constants::ShortBuffs, RoF2::constants::DiscBuffs, diff --git a/common/eq_limits.h b/common/eq_limits.h index fe95ea809..f18edd212 100644 --- a/common/eq_limits.h +++ b/common/eq_limits.h @@ -35,7 +35,10 @@ namespace EQEmu { namespace constants { struct LookupEntry { + uint32 ExpansionBit; + uint32 ExpansionsMask; int16 CharacterCreationLimit; + size_t SayLinkBodySize; int LongBuffs; int ShortBuffs; int DiscBuffs; @@ -45,7 +48,10 @@ namespace EQEmu int MercBuffs; LookupEntry( + uint32 ExpansionBit, + uint32 ExpansionsMask, int16 CharacterCreationLimit, + size_t SayLinkBodySize, int LongBuffs, int ShortBuffs, int DiscBuffs, @@ -54,7 +60,10 @@ namespace EQEmu int PetBuffs, int MercBuffs ) : + ExpansionBit(ExpansionBit), + ExpansionsMask(ExpansionsMask), CharacterCreationLimit(CharacterCreationLimit), + SayLinkBodySize(SayLinkBodySize), LongBuffs(LongBuffs), ShortBuffs(ShortBuffs), DiscBuffs(DiscBuffs), diff --git a/common/patches/rof2_limits.h b/common/patches/rof2_limits.h index 96c231cf4..ecfd6de4b 100644 --- a/common/patches/rof2_limits.h +++ b/common/patches/rof2_limits.h @@ -259,6 +259,9 @@ namespace RoF2 namespace constants { inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::RoF2; } + const uint32 EXPANSION_BIT = EQEmu::expansions::bitRoF; + const uint32 EXPANSIONS_MASK = EQEmu::expansions::maskRoF; + const size_t CHARACTER_CREATION_LIMIT = 12; const size_t SAY_LINK_BODY_SIZE = 56; diff --git a/common/patches/rof_limits.h b/common/patches/rof_limits.h index 69db29f8f..6bb59c14c 100644 --- a/common/patches/rof_limits.h +++ b/common/patches/rof_limits.h @@ -250,6 +250,9 @@ namespace RoF namespace constants { inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::RoF; } + const uint32 EXPANSION_BIT = EQEmu::expansions::bitRoF; + const uint32 EXPANSIONS_MASK = EQEmu::expansions::maskRoF; + const size_t CHARACTER_CREATION_LIMIT = 12; const size_t SAY_LINK_BODY_SIZE = 55; diff --git a/common/patches/sod_limits.h b/common/patches/sod_limits.h index 82381355e..cb7e3e21a 100644 --- a/common/patches/sod_limits.h +++ b/common/patches/sod_limits.h @@ -277,6 +277,9 @@ namespace SoD namespace constants { inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::SoD; } + const uint32 EXPANSION_BIT = EQEmu::expansions::bitSoD; + const uint32 EXPANSIONS_MASK = EQEmu::expansions::maskSoD; + const size_t CHARACTER_CREATION_LIMIT = 12; const size_t SAY_LINK_BODY_SIZE = 50; diff --git a/common/patches/sof_limits.h b/common/patches/sof_limits.h index ab5a32807..a3ff9bc2d 100644 --- a/common/patches/sof_limits.h +++ b/common/patches/sof_limits.h @@ -277,6 +277,9 @@ namespace SoF namespace constants { inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::SoF; } + const uint32 EXPANSION_BIT = EQEmu::expansions::bitSoF; + const uint32 EXPANSIONS_MASK = EQEmu::expansions::maskSoF; + const size_t CHARACTER_CREATION_LIMIT = 12; const size_t SAY_LINK_BODY_SIZE = 50; diff --git a/common/patches/titanium_limits.h b/common/patches/titanium_limits.h index 33fb3bdc5..01cbe0b09 100644 --- a/common/patches/titanium_limits.h +++ b/common/patches/titanium_limits.h @@ -276,6 +276,9 @@ namespace Titanium namespace constants { inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::Titanium; } + const uint32 EXPANSION_BIT = EQEmu::expansions::bitPoR; + const uint32 EXPANSIONS_MASK = EQEmu::expansions::maskPoR; + const size_t CHARACTER_CREATION_LIMIT = 8; // Hard-coded in client - DO NOT ALTER const size_t SAY_LINK_BODY_SIZE = 45; diff --git a/common/patches/uf_limits.h b/common/patches/uf_limits.h index ef00b912e..0232a1b85 100644 --- a/common/patches/uf_limits.h +++ b/common/patches/uf_limits.h @@ -278,6 +278,9 @@ namespace UF namespace constants { inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::UF; } + const uint32 EXPANSION_BIT = EQEmu::expansions::bitUF; + const uint32 EXPANSIONS_MASK = EQEmu::expansions::maskUF; + const size_t CHARACTER_CREATION_LIMIT = 12; const size_t SAY_LINK_BODY_SIZE = 50; diff --git a/world/client.cpp b/world/client.cpp index d3b477286..b72b81351 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -172,7 +172,7 @@ void Client::SendExpansionInfo() { auto outapp = new EQApplicationPacket(OP_ExpansionInfo, sizeof(ExpansionInfo_Struct)); ExpansionInfo_Struct *eis = (ExpansionInfo_Struct*)outapp->pBuffer; if(RuleB(World, UseClientBasedExpansionSettings)) { - eis->Expansions = EQEmu::versions::ConvertClientVersionToExpansion(eqs->ClientVersion()); + eis->Expansions = EQEmu::expansions::ConvertClientVersionToExpansionMask(eqs->ClientVersion()); } else { eis->Expansions = (RuleI(World, ExpansionSettings)); } diff --git a/zone/attack.cpp b/zone/attack.cpp index 771976ef1..a6a9da784 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -5478,4 +5478,4 @@ int32 Mob::GetHPRegen() const int32 Mob::GetManaRegen() const { return mana_regen; -} \ No newline at end of file +} diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index eca721031..07c5cbb2f 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -1398,7 +1398,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app) if (m_pp.ldon_points_available < 0 || m_pp.ldon_points_available > 2000000000) { m_pp.ldon_points_available = 0; } if (RuleB(World, UseClientBasedExpansionSettings)) { - m_pp.expansions = EQEmu::versions::ConvertClientVersionToExpansion(ClientVersion()); + m_pp.expansions = EQEmu::expansions::ConvertClientVersionToExpansionMask(ClientVersion()); } else { m_pp.expansions = RuleI(World, ExpansionSettings); From 0ad43977bf94e3a2ca83966f7fc9ba5592bb2a54 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 7 Jan 2019 20:25:43 -0500 Subject: [PATCH 20/20] Naming convention update for EQEmu::versions::ClientVersionBit --- common/emu_versions.cpp | 20 +++++++------------- common/emu_versions.h | 41 ++++++++++++++++++++-------------------- world/client.cpp | 12 ++++++------ zone/aa.cpp | 4 ++-- zone/attack.cpp | 10 +++++----- zone/client.cpp | 16 ++++++++-------- zone/client.h | 4 ++-- zone/client_packet.cpp | 42 ++++++++++++++++++++--------------------- zone/client_process.cpp | 6 +++--- zone/entity.cpp | 2 +- zone/entity.h | 2 +- zone/guild_mgr.cpp | 2 +- zone/mob.cpp | 2 +- zone/npc.cpp | 2 +- zone/spell_effects.cpp | 18 +++++++++--------- zone/spells.cpp | 6 +++--- zone/tasks.cpp | 2 +- zone/zoning.cpp | 2 +- 18 files changed, 94 insertions(+), 99 deletions(-) diff --git a/common/emu_versions.cpp b/common/emu_versions.cpp index e1c867cbb..ba532b8fc 100644 --- a/common/emu_versions.cpp +++ b/common/emu_versions.cpp @@ -63,32 +63,26 @@ const char* EQEmu::versions::ClientVersionName(ClientVersion client_version) uint32 EQEmu::versions::ConvertClientVersionToClientVersionBit(ClientVersion client_version) { switch (client_version) { - case ClientVersion::Unknown: - case ClientVersion::Client62: - return bit_Unknown; case ClientVersion::Titanium: - return bit_Titanium; + return bitTitanium; case ClientVersion::SoF: - return bit_SoF; + return bitSoF; case ClientVersion::SoD: - return bit_SoD; + return bitSoD; case ClientVersion::UF: - return bit_UF; + return bitUF; case ClientVersion::RoF: - return bit_RoF; + return bitRoF; case ClientVersion::RoF2: - return bit_RoF2; + return bitRoF2; default: - return bit_Unknown; + return bitUnknown; } } EQEmu::versions::ClientVersion EQEmu::versions::ConvertClientVersionBitToClientVersion(uint32 client_version_bit) { switch (client_version_bit) { - case (uint32)static_cast(ClientVersion::Unknown) : - case ((uint32)1 << (static_cast(ClientVersion::Client62) - 1)) : - return ClientVersion::Unknown; case ((uint32)1 << (static_cast(ClientVersion::Titanium) - 1)) : return ClientVersion::Titanium; case ((uint32)1 << (static_cast(ClientVersion::SoF) - 1)) : diff --git a/common/emu_versions.h b/common/emu_versions.h index 2ef68b283..20bfd6dbc 100644 --- a/common/emu_versions.h +++ b/common/emu_versions.h @@ -39,26 +39,27 @@ namespace EQEmu RoF2 // Build: 'May 10 2013 23:30:08' }; - enum ClientVersionBit : uint32 { - bit_Unknown = 0, - bit_Client62 = 0x00000001, // unsupported (placeholder for scripts) - bit_Titanium = 0x00000002, - bit_SoF = 0x00000004, - bit_SoD = 0x00000008, - bit_UF = 0x00000010, - bit_RoF = 0x00000020, - bit_RoF2 = 0x00000040, - bit_TitaniumAndEarlier = 0x00000003, - bit_SoFAndEarlier = 0x00000007, - bit_SoDAndEarlier = 0x0000000F, - bit_UFAndEarlier = 0x0000001F, - bit_RoFAndEarlier = 0x0000003F, - bit_SoFAndLater = 0xFFFFFFFC, - bit_SoDAndLater = 0xFFFFFFF8, - bit_UFAndLater = 0xFFFFFFF0, - bit_RoFAndLater = 0xFFFFFFE0, - bit_RoF2AndLater = 0xFFFFFFC0, - bit_AllClients = 0xFFFFFFFF + enum ClientVersionBitmask : uint32 { + bitUnknown = 0x00000000, + bitClient62 = 0x00000001, // unsupported (placeholder for scripts) + bitTitanium = 0x00000002, + bitSoF = 0x00000004, + bitSoD = 0x00000008, + bitUF = 0x00000010, + bitRoF = 0x00000020, + bitRoF2 = 0x00000040, + maskUnknown = 0x00000000, + maskTitaniumAndEarlier = 0x00000003, + maskSoFAndEarlier = 0x00000007, + maskSoDAndEarlier = 0x0000000F, + maskUFAndEarlier = 0x0000001F, + maskRoFAndEarlier = 0x0000003F, + maskSoFAndLater = 0xFFFFFFFC, + maskSoDAndLater = 0xFFFFFFF8, + maskUFAndLater = 0xFFFFFFF0, + maskRoFAndLater = 0xFFFFFFE0, + maskRoF2AndLater = 0xFFFFFFC0, + maskAllClients = 0xFFFFFFFF }; const ClientVersion LastClientVersion = ClientVersion::RoF2; diff --git a/world/client.cpp b/world/client.cpp index b72b81351..fba31d5cd 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -186,7 +186,7 @@ void Client::SendCharInfo() { cle->SetOnline(CLE_Status_CharSelect); } - if (m_ClientVersionBit & EQEmu::versions::bit_RoFAndLater) { + if (m_ClientVersionBit & EQEmu::versions::maskRoFAndLater) { SendMaxCharCreate(); SendMembership(); SendMembershipSettings(); @@ -717,7 +717,7 @@ bool Client::HandleCharacterCreatePacket(const EQApplicationPacket *app) { } else { - if (m_ClientVersionBit & EQEmu::versions::bit_TitaniumAndEarlier) + if (m_ClientVersionBit & EQEmu::versions::maskTitaniumAndEarlier) StartInTutorial = true; SendCharInfo(); } @@ -989,7 +989,7 @@ bool Client::HandleDeleteCharacterPacket(const EQApplicationPacket *app) { bool Client::HandleZoneChangePacket(const EQApplicationPacket *app) { // HoT sends this to world while zoning and wants it echoed back. - if (m_ClientVersionBit & EQEmu::versions::bit_RoFAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskRoFAndLater) { QueuePacket(app); } @@ -1465,7 +1465,7 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc) Log(Logs::Detail, Logs::World_Server, "Beard: %d Beardcolor: %d", cc->beard, cc->beardcolor); /* Validate the char creation struct */ - if (m_ClientVersionBit & EQEmu::versions::bit_SoFAndLater) { + if (m_ClientVersionBit & EQEmu::versions::maskSoFAndLater) { if (!CheckCharCreateInfoSoF(cc)) { Log(Logs::Detail, Logs::World_Server,"CheckCharCreateInfo did not validate the request (bad race/class/stats)"); return false; @@ -1536,7 +1536,7 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc) pp.pvp = database.GetServerType() == 1 ? 1 : 0; /* If it is an SoF Client and the SoF Start Zone rule is set, send new chars there */ - if (m_ClientVersionBit & EQEmu::versions::bit_SoFAndLater) { + if (m_ClientVersionBit & EQEmu::versions::maskSoFAndLater) { Log(Logs::Detail, Logs::World_Server,"Found 'SoFStartZoneID' rule setting: %i", RuleI(World, SoFStartZoneID)); if (RuleI(World, SoFStartZoneID) > 0) { pp.zone_id = RuleI(World, SoFStartZoneID); @@ -1552,7 +1552,7 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc) } } /* use normal starting zone logic to either get defaults, or if startzone was set, load that from the db table.*/ - bool ValidStartZone = database.GetStartZone(&pp, cc, m_ClientVersionBit & EQEmu::versions::bit_TitaniumAndEarlier); + bool ValidStartZone = database.GetStartZone(&pp, cc, m_ClientVersionBit & EQEmu::versions::maskTitaniumAndEarlier); if (!ValidStartZone){ return false; diff --git a/zone/aa.cpp b/zone/aa.cpp index cb2e6ab7e..dfbf9de12 100644 --- a/zone/aa.cpp +++ b/zone/aa.cpp @@ -488,7 +488,7 @@ void Client::ResetAA() { database.DeleteCharacterLeadershipAAs(CharacterID()); // undefined for these clients - if (ClientVersionBit() & EQEmu::versions::bit_TitaniumAndEarlier) + if (ClientVersionBit() & EQEmu::versions::maskTitaniumAndEarlier) Kick(); } @@ -1455,7 +1455,7 @@ bool Mob::CanUseAlternateAdvancementRank(AA::Rank *rank) { //the one titanium hack i will allow //just to make sure we dont crash the client with newer aas //we'll exclude any expendable ones - if(IsClient() && CastToClient()->ClientVersionBit() & EQEmu::versions::bit_TitaniumAndEarlier) { + if(IsClient() && CastToClient()->ClientVersionBit() & EQEmu::versions::maskTitaniumAndEarlier) { if(ability->charges > 0) { return false; } diff --git a/zone/attack.cpp b/zone/attack.cpp index a6a9da784..013f0fa5b 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -1794,7 +1794,7 @@ bool Client::Death(Mob* killerMob, int32 damage, uint16 spell, EQEmu::skills::Sk //this generates a lot of 'updates' to the client that the client does not need BuffFadeNonPersistDeath(); if (RuleB(Character, UnmemSpellsOnDeath)) { - if ((ClientVersionBit() & EQEmu::versions::bit_SoFAndLater) && RuleB(Character, RespawnFromHover)) + if ((ClientVersionBit() & EQEmu::versions::maskSoFAndLater) && RuleB(Character, RespawnFromHover)) UnmemSpellAll(true); else UnmemSpellAll(false); @@ -1857,7 +1857,7 @@ bool Client::Death(Mob* killerMob, int32 damage, uint16 spell, EQEmu::skills::Sk from these and overwrite what we set in pp anyway */ - if (LeftCorpse && (ClientVersionBit() & EQEmu::versions::bit_SoFAndLater) && RuleB(Character, RespawnFromHover)) + if (LeftCorpse && (ClientVersionBit() & EQEmu::versions::maskSoFAndLater) && RuleB(Character, RespawnFromHover)) { ClearDraggedCorpses(); RespawnFromHoverTimer.Start(RuleI(Character, RespawnFromHoverTimer) * 1000); @@ -3791,7 +3791,7 @@ void Mob::HealDamage(uint32 amount, Mob *caster, uint16 spell_id) if (IsBuffSpell(spell_id)) { // hots // message to caster if (caster->IsClient() && caster == this) { - if (caster->CastToClient()->ClientVersionBit() & EQEmu::versions::bit_SoFAndLater) + if (caster->CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoFAndLater) FilteredMessage_StringID(caster, MT_NonMelee, FilterHealOverTime, HOT_HEAL_SELF, itoa(acthealed), spells[spell_id].name); else @@ -3799,7 +3799,7 @@ void Mob::HealDamage(uint32 amount, Mob *caster, uint16 spell_id) YOU_HEALED, GetCleanName(), itoa(acthealed)); } else if (caster->IsClient() && caster != this) { - if (caster->CastToClient()->ClientVersionBit() & EQEmu::versions::bit_SoFAndLater) + if (caster->CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoFAndLater) caster->FilteredMessage_StringID(caster, MT_NonMelee, FilterHealOverTime, HOT_HEAL_OTHER, GetCleanName(), itoa(acthealed), spells[spell_id].name); @@ -3809,7 +3809,7 @@ void Mob::HealDamage(uint32 amount, Mob *caster, uint16 spell_id) } // message to target if (IsClient() && caster != this) { - if (CastToClient()->ClientVersionBit() & EQEmu::versions::bit_SoFAndLater) + if (CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoFAndLater) FilteredMessage_StringID(this, MT_NonMelee, FilterHealOverTime, HOT_HEALED_OTHER, caster->GetCleanName(), itoa(acthealed), spells[spell_id].name); diff --git a/zone/client.cpp b/zone/client.cpp index 12555cc75..3327f2633 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -1899,9 +1899,9 @@ void Client::CheckManaEndUpdate() { mana_update->cur_mana = GetMana(); mana_update->max_mana = GetMaxMana(); mana_update->spawn_id = GetID(); - if ((ClientVersionBit() & EQEmu::versions::ClientVersionBit::bit_SoDAndLater) != 0) + if ((ClientVersionBit() & EQEmu::versions::ClientVersionBitmask::maskSoDAndLater) != 0) QueuePacket(mana_packet); // do we need this with the OP_ManaChange packet above? - entity_list.QueueClientsByXTarget(this, mana_packet, false, EQEmu::versions::ClientVersionBit::bit_SoDAndLater); + entity_list.QueueClientsByXTarget(this, mana_packet, false, EQEmu::versions::ClientVersionBitmask::maskSoDAndLater); safe_delete(mana_packet); last_reported_mana_percent = this->GetManaPercent(); @@ -1924,9 +1924,9 @@ void Client::CheckManaEndUpdate() { endurance_update->cur_end = GetEndurance(); endurance_update->max_end = GetMaxEndurance(); endurance_update->spawn_id = GetID(); - if ((ClientVersionBit() & EQEmu::versions::ClientVersionBit::bit_SoDAndLater) != 0) + if ((ClientVersionBit() & EQEmu::versions::ClientVersionBitmask::maskSoDAndLater) != 0) QueuePacket(endurance_packet); // do we need this with the OP_ManaChange packet above? - entity_list.QueueClientsByXTarget(this, endurance_packet, false, EQEmu::versions::ClientVersionBit::bit_SoDAndLater); + entity_list.QueueClientsByXTarget(this, endurance_packet, false, EQEmu::versions::ClientVersionBitmask::maskSoDAndLater); safe_delete(endurance_packet); last_reported_endurance_percent = this->GetEndurancePercent(); @@ -3054,7 +3054,7 @@ void Client::ServerFilter(SetServerFilter_Struct* filter){ Filter0(FilterMissedMe); Filter1(FilterDamageShields); - if (ClientVersionBit() & EQEmu::versions::bit_SoDAndLater) { + if (ClientVersionBit() & EQEmu::versions::maskSoDAndLater) { if (filter->filters[FilterDOT] == 0) ClientFilters[FilterDOT] = FilterShow; else if (filter->filters[FilterDOT] == 1) @@ -3075,7 +3075,7 @@ void Client::ServerFilter(SetServerFilter_Struct* filter){ Filter1(FilterFocusEffects); Filter1(FilterPetSpells); - if (ClientVersionBit() & EQEmu::versions::bit_SoDAndLater) { + if (ClientVersionBit() & EQEmu::versions::maskSoDAndLater) { if (filter->filters[FilterHealOverTime] == 0) ClientFilters[FilterHealOverTime] = FilterShow; // This is called 'Show Mine Only' in the clients, but functions the same as show @@ -5622,7 +5622,7 @@ void Client::SuspendMinion() memset(&m_suspendedminion, 0, sizeof(struct PetInfo)); // TODO: These pet command states need to be synced ... // Will just fix them for now - if (m_ClientVersionBit & EQEmu::versions::bit_UFAndLater) { + if (m_ClientVersionBit & EQEmu::versions::maskUFAndLater) { SetPetCommandState(PET_BUTTON_SIT, 0); SetPetCommandState(PET_BUTTON_STOP, 0); SetPetCommandState(PET_BUTTON_REGROUP, 0); @@ -7631,7 +7631,7 @@ void Client::SendClearMercInfo() void Client::DuplicateLoreMessage(uint32 ItemID) { - if (!(m_ClientVersionBit & EQEmu::versions::bit_RoFAndLater)) + if (!(m_ClientVersionBit & EQEmu::versions::maskRoFAndLater)) { Message_StringID(0, PICK_LORE); return; diff --git a/zone/client.h b/zone/client.h index 96b386a85..854786efc 100644 --- a/zone/client.h +++ b/zone/client.h @@ -1160,7 +1160,7 @@ public: void HandleLFGuildResponse(ServerPacket *pack); void SendLFGuildStatus(); void SendGuildLFGuildStatus(); - inline bool XTargettingAvailable() const { return ((m_ClientVersionBit & EQEmu::versions::bit_UFAndLater) && RuleB(Character, EnableXTargetting)); } + inline bool XTargettingAvailable() const { return ((m_ClientVersionBit & EQEmu::versions::maskUFAndLater) && RuleB(Character, EnableXTargetting)); } inline uint8 GetMaxXTargets() const { return MaxXTargets; } void SetMaxXTargets(uint8 NewMax); bool IsXTarget(const Mob *m) const; @@ -1184,7 +1184,7 @@ public: bool GroupFollow(Client* inviter); inline bool GetRunMode() const { return runmode; } - inline bool AggroMeterAvailable() const { return ((m_ClientVersionBit & EQEmu::versions::bit_RoF2AndLater)) && RuleB(Character, EnableAggroMeter); } // RoF untested + inline bool AggroMeterAvailable() const { return ((m_ClientVersionBit & EQEmu::versions::maskRoF2AndLater)) && RuleB(Character, EnableAggroMeter); } // RoF untested inline void SetAggroMeterLock(int in) { m_aggrometer.set_lock_id(in); } void ProcessAggroMeter(); // builds packet and sends diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 07c5cbb2f..7dc36771f 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -868,14 +868,14 @@ void Client::CompleteConnect() worldserver.SendPacket(pack); delete pack; - if (IsClient() && CastToClient()->ClientVersionBit() & EQEmu::versions::bit_UFAndLater) { + if (IsClient() && CastToClient()->ClientVersionBit() & EQEmu::versions::maskUFAndLater) { EQApplicationPacket *outapp = MakeBuffsPacket(false); CastToClient()->FastQueuePacket(&outapp); } // TODO: load these states // We at least will set them to the correct state for now - if (m_ClientVersionBit & EQEmu::versions::bit_UFAndLater && GetPet()) { + if (m_ClientVersionBit & EQEmu::versions::maskUFAndLater && GetPet()) { SetPetCommandState(PET_BUTTON_SIT, 0); SetPetCommandState(PET_BUTTON_STOP, 0); SetPetCommandState(PET_BUTTON_REGROUP, 0); @@ -1663,7 +1663,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app) } } - if (m_ClientVersionBit & EQEmu::versions::bit_UFAndLater) { + if (m_ClientVersionBit & EQEmu::versions::maskUFAndLater) { outapp = new EQApplicationPacket(OP_XTargetResponse, 8); outapp->WriteUInt32(GetMaxXTargets()); outapp->WriteUInt32(0); @@ -10168,16 +10168,16 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) if (aabonuses.PetCommands[PetCommand] && mypet->IsNPC()) { if (mypet->IsHeld()) { - if (m_ClientVersionBit & EQEmu::versions::bit_SoDAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater) Message_StringID(MT_PetResponse, PET_HOLD_SET_OFF); mypet->SetHeld(false); } else { - if (m_ClientVersionBit & EQEmu::versions::bit_SoDAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater) Message_StringID(MT_PetResponse, PET_HOLD_SET_ON); - if (m_ClientVersionBit & EQEmu::versions::bit_UFAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskUFAndLater) mypet->SayTo_StringID(this, MT_PetResponse, PET_NOW_HOLDING); else mypet->SayTo_StringID(this, MT_PetResponse, PET_ON_HOLD); @@ -10191,10 +10191,10 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) } case PET_HOLD_ON: { if (aabonuses.PetCommands[PetCommand] && mypet->IsNPC() && !mypet->IsHeld()) { - if (m_ClientVersionBit & EQEmu::versions::bit_SoDAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater) Message_StringID(MT_PetResponse, PET_HOLD_SET_ON); - if (m_ClientVersionBit & EQEmu::versions::bit_UFAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskUFAndLater) mypet->SayTo_StringID(this, MT_PetResponse, PET_NOW_HOLDING); else mypet->SayTo_StringID(this, MT_PetResponse, PET_ON_HOLD); @@ -10206,7 +10206,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) } case PET_HOLD_OFF: { if (aabonuses.PetCommands[PetCommand] && mypet->IsNPC() && mypet->IsHeld()) { - if (m_ClientVersionBit & EQEmu::versions::bit_SoDAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater) Message_StringID(MT_PetResponse, PET_HOLD_SET_OFF); mypet->SetHeld(false); } @@ -10216,13 +10216,13 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) if (aabonuses.PetCommands[PetCommand] && mypet->IsNPC()) { if (mypet->IsGHeld()) { - if (m_ClientVersionBit & EQEmu::versions::bit_UFAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskUFAndLater) Message_StringID(MT_PetResponse, PET_OFF_GHOLD); mypet->SetGHeld(false); } else { - if (m_ClientVersionBit & EQEmu::versions::bit_UFAndLater) { + if (m_ClientVersionBit & EQEmu::versions::maskUFAndLater) { Message_StringID(MT_PetResponse, PET_ON_GHOLD); mypet->SayTo_StringID(this, MT_PetResponse, PET_GHOLD_ON_MSG); } else { @@ -10237,7 +10237,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) } case PET_GHOLD_ON: { if (aabonuses.PetCommands[PetCommand] && mypet->IsNPC()) { - if (m_ClientVersionBit & EQEmu::versions::bit_UFAndLater) { + if (m_ClientVersionBit & EQEmu::versions::maskUFAndLater) { Message_StringID(MT_PetResponse, PET_ON_GHOLD); mypet->SayTo_StringID(this, MT_PetResponse, PET_GHOLD_ON_MSG); } else { @@ -10251,7 +10251,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) } case PET_GHOLD_OFF: { if (aabonuses.PetCommands[PetCommand] && mypet->IsNPC() && mypet->IsGHeld()) { - if (m_ClientVersionBit & EQEmu::versions::bit_UFAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskUFAndLater) Message_StringID(MT_PetResponse, PET_OFF_GHOLD); mypet->SetGHeld(false); } @@ -10263,13 +10263,13 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) break; if (mypet->IsNoCast()) { Message_StringID(MT_PetResponse, PET_CASTING); - if (m_ClientVersionBit & EQEmu::versions::bit_SoDAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater) Message_StringID(MT_PetResponse, PET_SPELLHOLD_SET_OFF); mypet->SetNoCast(false); } else { Message_StringID(MT_PetResponse, PET_NOT_CASTING); - if (m_ClientVersionBit & EQEmu::versions::bit_SoDAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater) Message_StringID(MT_PetResponse, PET_SPELLHOLD_SET_ON); mypet->SetNoCast(true); } @@ -10282,7 +10282,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) break; if (!mypet->IsNoCast()) { Message_StringID(MT_PetResponse, PET_NOT_CASTING); - if (m_ClientVersionBit & EQEmu::versions::bit_SoDAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater) Message_StringID(MT_PetResponse, PET_SPELLHOLD_SET_ON); mypet->SetNoCast(true); } @@ -10295,7 +10295,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) break; if (mypet->IsNoCast()) { Message_StringID(MT_PetResponse, PET_CASTING); - if (m_ClientVersionBit & EQEmu::versions::bit_SoDAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater) Message_StringID(MT_PetResponse, PET_SPELLHOLD_SET_OFF); mypet->SetNoCast(false); } @@ -10308,13 +10308,13 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) break; if (mypet->IsFocused()) { Message_StringID(MT_PetResponse, PET_NOT_FOCUSING); - if (m_ClientVersionBit & EQEmu::versions::bit_SoDAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater) Message_StringID(MT_PetResponse, PET_FOCUS_SET_OFF); mypet->SetFocused(false); } else { Message_StringID(MT_PetResponse, PET_NOW_FOCUSING); - if (m_ClientVersionBit & EQEmu::versions::bit_SoDAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater) Message_StringID(MT_PetResponse, PET_FOCUS_SET_ON); mypet->SetFocused(true); } @@ -10327,7 +10327,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) break; if (!mypet->IsFocused()) { Message_StringID(MT_PetResponse, PET_NOW_FOCUSING); - if (m_ClientVersionBit & EQEmu::versions::bit_SoDAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater) Message_StringID(MT_PetResponse, PET_FOCUS_SET_ON); mypet->SetFocused(true); } @@ -10340,7 +10340,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) break; if (mypet->IsFocused()) { Message_StringID(MT_PetResponse, PET_NOT_FOCUSING); - if (m_ClientVersionBit & EQEmu::versions::bit_SoDAndLater) + if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater) Message_StringID(MT_PetResponse, PET_FOCUS_SET_OFF); mypet->SetFocused(false); } diff --git a/zone/client_process.cpp b/zone/client_process.cpp index 82f118384..5c750f03a 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -812,7 +812,7 @@ void Client::BulkSendInventoryItems() void Client::BulkSendMerchantInventory(int merchant_id, int npcid) { const EQEmu::ItemData* handyitem = nullptr; uint32 numItemSlots = 80; //The max number of items passed in the transaction. - if (m_ClientVersionBit & EQEmu::versions::bit_RoFAndLater) { // RoF+ can send 200 items + if (m_ClientVersionBit & EQEmu::versions::maskRoFAndLater) { // RoF+ can send 200 items numItemSlots = 200; } const EQEmu::ItemData *item = nullptr; @@ -1132,7 +1132,7 @@ void Client::CancelSneakHide() // The later clients send back a OP_Hide (this has a size but data is 0) // as well as OP_SpawnAppearance with AT_Invis and one with AT_Sneak // So we don't have to handle any of those flags - if (ClientVersionBit() & EQEmu::versions::bit_SoFAndEarlier) + if (ClientVersionBit() & EQEmu::versions::maskSoFAndEarlier) sneaking = false; } } @@ -2129,7 +2129,7 @@ void Client::ClearHover() entity_list.QueueClients(this, outapp, false); safe_delete(outapp); - if (IsClient() && CastToClient()->ClientVersionBit() & EQEmu::versions::bit_UFAndLater) + if (IsClient() && CastToClient()->ClientVersionBit() & EQEmu::versions::maskUFAndLater) { EQApplicationPacket *outapp = MakeBuffsPacket(false); CastToClient()->FastQueuePacket(&outapp); diff --git a/zone/entity.cpp b/zone/entity.cpp index e288493f8..9b31abc2b 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -1564,7 +1564,7 @@ void EntityList::QueueClientsByTarget(Mob *sender, const EQApplicationPacket *ap } } -void EntityList::QueueClientsByXTarget(Mob *sender, const EQApplicationPacket *app, bool iSendToSender, EQEmu::versions::ClientVersionBit client_version_bits) +void EntityList::QueueClientsByXTarget(Mob *sender, const EQApplicationPacket *app, bool iSendToSender, EQEmu::versions::ClientVersionBitmask client_version_bits) { auto it = client_list.begin(); while (it != client_list.end()) { diff --git a/zone/entity.h b/zone/entity.h index 89f64b798..b815dc396 100644 --- a/zone/entity.h +++ b/zone/entity.h @@ -353,7 +353,7 @@ public: void QueueClientsByTarget(Mob* sender, const EQApplicationPacket* app, bool iSendToSender = true, Mob* SkipThisMob = 0, bool ackreq = true, bool HoTT = true, uint32 ClientVersionBits = 0xFFFFFFFF, bool inspect_buffs = false); - void QueueClientsByXTarget(Mob* sender, const EQApplicationPacket* app, bool iSendToSender = true, EQEmu::versions::ClientVersionBit client_version_bits = EQEmu::versions::ClientVersionBit::bit_AllClients); + void QueueClientsByXTarget(Mob* sender, const EQApplicationPacket* app, bool iSendToSender = true, EQEmu::versions::ClientVersionBitmask client_version_bits = EQEmu::versions::ClientVersionBitmask::maskAllClients); void QueueToGroupsForNPCHealthAA(Mob* sender, const EQApplicationPacket* app); void QueueManaged(Mob* sender, const EQApplicationPacket* app, bool ignore_sender=false, bool ackreq = true); diff --git a/zone/guild_mgr.cpp b/zone/guild_mgr.cpp index 73a60cd66..eafe4b9f5 100644 --- a/zone/guild_mgr.cpp +++ b/zone/guild_mgr.cpp @@ -691,7 +691,7 @@ void GuildBankManager::SendGuildBank(Client *c) auto &guild_bank = *Iterator; // RoF+ uses a bulk list packet -- This is also how the Action 0 of older clients basically works - if (c->ClientVersionBit() & EQEmu::versions::bit_RoFAndLater) { + if (c->ClientVersionBit() & EQEmu::versions::maskRoFAndLater) { auto outapp = new EQApplicationPacket(OP_GuildBankItemList, sizeof(GuildBankItemListEntry_Struct) * 240); for (int i = 0; i < GUILD_BANK_DEPOSIT_AREA_SIZE; ++i) { const EQEmu::ItemData *Item = database.GetItem(guild_bank->Items.DepositArea[i].ItemID); diff --git a/zone/mob.cpp b/zone/mob.cpp index 5fe9391f5..4ef43c4e0 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1381,7 +1381,7 @@ void Mob::SendHPUpdate(bool skip_self /*= false*/, bool force_update_all /*= fal /** * Update those who have us targeted */ - entity_list.QueueClientsByTarget(this, &hp_packet, false, 0, false, true, EQEmu::versions::bit_AllClients); + entity_list.QueueClientsByTarget(this, &hp_packet, false, 0, false, true, EQEmu::versions::maskAllClients); /** * Update those who have us on x-target diff --git a/zone/npc.cpp b/zone/npc.cpp index 01339fde9..8de819e0c 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -507,7 +507,7 @@ void NPC::SetTarget(Mob* mob) { if (owner) { auto client = owner->CastToClient(); - if (client->ClientVersionBit() & EQEmu::versions::bit_UFAndLater) { + if (client->ClientVersionBit() & EQEmu::versions::maskUFAndLater) { auto app = new EQApplicationPacket(OP_PetHoTT, sizeof(ClientTarget_Struct)); auto ct = (ClientTarget_Struct *)app->pBuffer; ct->new_target = mob ? mob->GetID() : 0; diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 0f239fe6f..82fef55cf 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -149,7 +149,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove if (spells[spell_id].EndurUpkeep > 0) SetEndurUpkeep(true); - if (IsClient() && CastToClient()->ClientVersionBit() & EQEmu::versions::bit_UFAndLater) + if (IsClient() && CastToClient()->ClientVersionBit() & EQEmu::versions::maskUFAndLater) { EQApplicationPacket *outapp = MakeBuffsPacket(false); CastToClient()->FastQueuePacket(&outapp); @@ -826,7 +826,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove #endif if(IsClient()) { - if (CastToClient()->ClientVersionBit() & EQEmu::versions::bit_SoDAndLater) + if (CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoDAndLater) { bodyType bt = BT_Undead; @@ -1244,7 +1244,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove // Will fix buttons for now if (IsClient()) { auto c = CastToClient(); - if (c->ClientVersionBit() & EQEmu::versions::bit_UFAndLater) { + if (c->ClientVersionBit() & EQEmu::versions::maskUFAndLater) { c->SetPetCommandState(PET_BUTTON_SIT, 0); c->SetPetCommandState(PET_BUTTON_STOP, 0); c->SetPetCommandState(PET_BUTTON_REGROUP, 0); @@ -1663,7 +1663,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove #endif // This is handled by the client prior to SoD. // - if (IsClient() && (CastToClient()->ClientVersionBit() & EQEmu::versions::bit_SoDAndLater)) + if (IsClient() && (CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoDAndLater)) CastToClient()->LocateCorpse(); break; @@ -3402,7 +3402,7 @@ void Mob::BuffProcess() Log(Logs::Detail, Logs::Spells, "Buff %d in slot %d has %d tics remaining.", buffs[buffs_i].spellid, buffs_i, buffs[buffs_i].ticsremaining); } } - else if (IsClient() && !(CastToClient()->ClientVersionBit() & EQEmu::versions::bit_SoFAndLater)) + else if (IsClient() && !(CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoFAndLater)) { buffs[buffs_i].UpdateClient = true; } @@ -3669,7 +3669,7 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster) case SE_LocateCorpse: { // This is handled by the client prior to SoD. - if (IsClient() && (CastToClient()->ClientVersionBit() & EQEmu::versions::bit_SoDAndLater)) + if (IsClient() && (CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoDAndLater)) CastToClient()->LocateCorpse(); } @@ -4085,7 +4085,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses) { EQApplicationPacket *outapp = MakeBuffsPacket(); - entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, EQEmu::versions::bit_SoDAndLater); + entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, EQEmu::versions::maskSoDAndLater); if(IsClient() && GetTarget() == this) { CastToClient()->QueuePacket(outapp); } @@ -4095,11 +4095,11 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses) if (IsNPC()) { EQApplicationPacket *outapp = MakeBuffsPacket(); - entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, EQEmu::versions::bit_SoDAndLater, true); + entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, EQEmu::versions::maskSoDAndLater, true); safe_delete(outapp); } - if (IsClient() && CastToClient()->ClientVersionBit() & EQEmu::versions::bit_UFAndLater) + if (IsClient() && CastToClient()->ClientVersionBit() & EQEmu::versions::maskUFAndLater) { EQApplicationPacket *outapp = MakeBuffsPacket(false); CastToClient()->FastQueuePacket(&outapp); diff --git a/zone/spells.cpp b/zone/spells.cpp index 42a64d6f0..2f10af690 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -3317,7 +3317,7 @@ int Mob::AddBuff(Mob *caster, uint16 spell_id, int duration, int32 level_overrid { EQApplicationPacket *outapp = MakeBuffsPacket(); - entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, EQEmu::versions::bit_SoDAndLater); + entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, EQEmu::versions::maskSoDAndLater); if(IsClient() && GetTarget() == this) CastToClient()->QueuePacket(outapp); @@ -3327,7 +3327,7 @@ int Mob::AddBuff(Mob *caster, uint16 spell_id, int duration, int32 level_overrid if (IsNPC()) { EQApplicationPacket *outapp = MakeBuffsPacket(); - entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, EQEmu::versions::bit_SoDAndLater, true); + entity_list.QueueClientsByTarget(this, outapp, false, nullptr, true, false, EQEmu::versions::maskSoDAndLater, true); safe_delete(outapp); } @@ -5531,7 +5531,7 @@ void Mob::SendBuffsToClient(Client *c) if(!c) return; - if (c->ClientVersionBit() & EQEmu::versions::bit_SoDAndLater) + if (c->ClientVersionBit() & EQEmu::versions::maskSoDAndLater) { EQApplicationPacket *outapp = MakeBuffsPacket(); c->FastQueuePacket(&outapp); diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 56297bf3b..7761747f9 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -2700,7 +2700,7 @@ void TaskManager::SendTaskActivityShort(Client *c, int TaskID, int ActivityID, i TaskActivityShort_Struct* tass; - if (c->ClientVersionBit() & EQEmu::versions::bit_RoFAndLater) + if (c->ClientVersionBit() & EQEmu::versions::maskRoFAndLater) { auto outapp = new EQApplicationPacket(OP_TaskActivity, 25); outapp->WriteUInt32(ClientTaskIndex); diff --git a/zone/zoning.cpp b/zone/zoning.cpp index 3d98f9ad6..dbe9346b7 100644 --- a/zone/zoning.cpp +++ b/zone/zoning.cpp @@ -588,7 +588,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z // If we are SoF and later and are respawning from hover, we want the real zone ID, else zero to use the old hack. // if(zone->GetZoneID() == zoneID) { - if ((ClientVersionBit() & EQEmu::versions::bit_SoFAndLater) && (!RuleB(Character, RespawnFromHover) || !IsHoveringForRespawn())) + if ((ClientVersionBit() & EQEmu::versions::maskSoFAndLater) && (!RuleB(Character, RespawnFromHover) || !IsHoveringForRespawn())) gmg->bind_zone_id = 0; else gmg->bind_zone_id = zoneID;