diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index d6e8b0c97..c22069196 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -375,13 +375,16 @@ struct NewZone_Struct { /*0686*/ uint16 zone_instance; /*0688*/ uint32 unknown688; /*0692*/ uint8 unknown692[8]; +// Titanium doesn't have a translator, but we can still safely add stuff under here without issues since client memcpy's only what it knows +// Just wastes some bandwidth sending to tit clients /shrug /*0700*/ float fog_density; /*0704*/ uint32 SuspendBuffs; /*0708*/ uint32 FastRegenHP; /*0712*/ uint32 FastRegenMana; /*0716*/ uint32 FastRegenEndurance; /*0720*/ uint32 NPCAggroMaxDist; -/*0724*/ +/*0724*/ uint32 underworld_teleport_index; // > 0 teleports w/ zone point index, invalid succors, if this value is 0, it prevents you from running off edges that would end up underworld +/*0728*/ }; /* diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index c9e80a0f1..8811c8746 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -1827,6 +1827,7 @@ namespace RoF OUT(FastRegenHP); OUT(FastRegenMana); OUT(FastRegenEndurance); + OUT(underworld_teleport_index); eq->FogDensity = emu->fog_density; diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 1b3827984..09a2d502d 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -1876,6 +1876,7 @@ namespace RoF2 OUT(FastRegenHP); OUT(FastRegenMana); OUT(FastRegenEndurance); + OUT(underworld_teleport_index); eq->FogDensity = emu->fog_density; diff --git a/common/patches/rof2_structs.h b/common/patches/rof2_structs.h index 67947d57f..96e74187d 100644 --- a/common/patches/rof2_structs.h +++ b/common/patches/rof2_structs.h @@ -628,7 +628,7 @@ struct NewZone_Struct { /*0856*/ uint32 scriptNPCReceivedanItem; /*0860*/ uint32 bCheck; // padded bool /*0864*/ uint32 scriptIDSomething; - /*0868*/ uint32 scriptIDSomething2; + /*0868*/ uint32 underworld_teleport_index; // > 0 teleports w/ zone point index, invalid succors, -1 affects some collisions /*0872*/ uint32 scriptIDSomething3; /*0876*/ uint32 SuspendBuffs; // padded bool /*0880*/ uint32 LavaDamage; // LavaDamage value diff --git a/common/patches/rof_structs.h b/common/patches/rof_structs.h index 76324d59b..c22278aac 100644 --- a/common/patches/rof_structs.h +++ b/common/patches/rof_structs.h @@ -575,7 +575,11 @@ struct NewZone_Struct { /*0848*/ int32 unknown848; /*0852*/ uint16 zone_id; /*0854*/ uint16 zone_instance; -/*0856*/ char unknown856[20]; +/*0856*/ uint32 scriptNPCReceivedanItem; +/*0860*/ uint32 bCheck; // padded bool +/*0864*/ uint32 scriptIDSomething; +/*0868*/ uint32 underworld_teleport_index; // > 0 teleports w/ zone point index, invalid succors, -1 affects some collisions +/*0872*/ uint32 scriptIDSomething3; /*0876*/ uint32 SuspendBuffs; /*0880*/ uint32 unknown880; // Seen 50 /*0884*/ uint32 unknown884; // Seen 10 diff --git a/common/patches/sod.cpp b/common/patches/sod.cpp index 6e3f274e7..45f2fe20e 100644 --- a/common/patches/sod.cpp +++ b/common/patches/sod.cpp @@ -1353,6 +1353,7 @@ namespace SoD OUT(FastRegenHP); OUT(FastRegenMana); OUT(FastRegenEndurance); + OUT(underworld_teleport_index); /*fill in some unknowns with observed values, hopefully it will help */ eq->unknown800 = -1; diff --git a/common/patches/sod_structs.h b/common/patches/sod_structs.h index 2a8b0cec8..7a2ae5710 100644 --- a/common/patches/sod_structs.h +++ b/common/patches/sod_structs.h @@ -444,7 +444,11 @@ struct NewZone_Struct { /*0848*/ int32 unknown848; /*0852*/ uint16 zone_id; /*0854*/ uint16 zone_instance; -/*0856*/ char unknown856[20]; +/*0856*/ uint32 scriptNPCReceivedanItem; +/*0860*/ uint32 bCheck; // padded bool +/*0864*/ uint32 scriptIDSomething; +/*0868*/ uint32 underworld_teleport_index; // > 0 teleports w/ zone point index, invalid succors, -1 affects some collisions +/*0872*/ uint32 scriptIDSomething3; /*0876*/ uint32 SuspendBuffs; /*0880*/ uint32 unknown880; //seen 50 /*0884*/ uint32 unknown884; //seen 10 diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index 94e94f946..f8ccf0274 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -1030,6 +1030,7 @@ namespace SoF OUT(FastRegenHP); OUT(FastRegenMana); OUT(FastRegenEndurance); + OUT(underworld_teleport_index); /*fill in some unknowns with observed values, hopefully it will help */ eq->unknown796 = -1; diff --git a/common/patches/sof_structs.h b/common/patches/sof_structs.h index c76ef0b96..b9716d016 100644 --- a/common/patches/sof_structs.h +++ b/common/patches/sof_structs.h @@ -448,7 +448,11 @@ struct NewZone_Struct { /*0844*/ int32 unknown844; /*0848*/ uint16 zone_id; /*0850*/ uint16 zone_instance; -/*0852*/ char unknown852[20]; +/*0852*/ uint32 scriptNPCReceivedanItem; +/*0856*/ uint32 bCheck; // padded bool +/*0860*/ uint32 scriptIDSomething; +/*0864*/ uint32 underworld_teleport_index; // > 0 teleports w/ zone point index, invalid succors, -1 affects some collisions +/*0868*/ uint32 scriptIDSomething3; /*0872*/ uint32 SuspendBuffs; /*0876*/ uint32 unknown876; //seen 50 /*0880*/ uint32 unknown880; //seen 10 diff --git a/common/patches/uf.cpp b/common/patches/uf.cpp index 49c13833d..9dfc653b4 100644 --- a/common/patches/uf.cpp +++ b/common/patches/uf.cpp @@ -1577,6 +1577,7 @@ namespace UF OUT(FastRegenHP); OUT(FastRegenMana); OUT(FastRegenEndurance); + OUT(underworld_teleport_index); eq->FogDensity = emu->fog_density; diff --git a/common/patches/uf_structs.h b/common/patches/uf_structs.h index a87ab7a07..895881a7a 100644 --- a/common/patches/uf_structs.h +++ b/common/patches/uf_structs.h @@ -444,7 +444,11 @@ struct NewZone_Struct { /*0848*/ int32 unknown848; /*0852*/ uint16 zone_id; /*0854*/ uint16 zone_instance; -/*0856*/ char unknown856[20]; +/*0856*/ uint32 scriptNPCReceivedanItem; +/*0860*/ uint32 bCheck; // padded bool +/*0864*/ uint32 scriptIDSomething; +/*0868*/ uint32 underworld_teleport_index; // > 0 teleports w/ zone point index, invalid succors, -1 affects some collisions +/*0872*/ uint32 scriptIDSomething3; /*0876*/ uint32 SuspendBuffs; /*0880*/ uint32 unknown880; //seen 50 /*0884*/ uint32 unknown884; //seen 10 diff --git a/common/version.h b/common/version.h index e524afb01..82fe629b6 100644 --- a/common/version.h +++ b/common/version.h @@ -34,7 +34,7 @@ * Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9157 +#define CURRENT_BINARY_DATABASE_VERSION 9158 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9027 diff --git a/utils/patches/patch_RoF.conf b/utils/patches/patch_RoF.conf index 31b091ff8..6e638ba1a 100644 --- a/utils/patches/patch_RoF.conf +++ b/utils/patches/patch_RoF.conf @@ -366,6 +366,7 @@ OP_CancelSneakHide=0x265f OP_AggroMeterLockTarget=0x70b7 OP_AggroMeterTargetInfo=0x18fe OP_AggroMeterUpdate=0x75aa +OP_UnderWorld=0x44f9 # clients sends up when they detect an underworld issue, might be useful for cheat detection OP_DzQuit=0x5fc8 OP_DzListTimers=0x67b9 diff --git a/utils/patches/patch_RoF2.conf b/utils/patches/patch_RoF2.conf index a39fde999..f62b90dd4 100644 --- a/utils/patches/patch_RoF2.conf +++ b/utils/patches/patch_RoF2.conf @@ -367,6 +367,7 @@ OP_CancelSneakHide=0x0927 OP_AggroMeterLockTarget=0x1643 OP_AggroMeterTargetInfo=0x16bc OP_AggroMeterUpdate=0x1781 +OP_UnderWorld=0x2eb3 # clients sends up when they detect an underworld issue, might be useful for cheat detection # Expeditions OP_DzAddPlayer=0x4701 diff --git a/utils/patches/patch_SoD.conf b/utils/patches/patch_SoD.conf index 619f986c1..05e4a335f 100644 --- a/utils/patches/patch_SoD.conf +++ b/utils/patches/patch_SoD.conf @@ -357,6 +357,7 @@ OP_OpenContainer=0x3278 OP_Marquee=0x7dc9 OP_Fling=0x2b88 OP_CancelSneakHide=0x7705 +OP_UnderWorld=0x51ae # clients sends up when they detect an underworld issue, might be useful for cheat detection # Expedition OP_DzQuit=0x054e diff --git a/utils/patches/patch_SoF.conf b/utils/patches/patch_SoF.conf index 6a5d41fb4..c6d754ba3 100644 --- a/utils/patches/patch_SoF.conf +++ b/utils/patches/patch_SoF.conf @@ -338,6 +338,7 @@ OP_OpenContainer=0x10e3 OP_Marquee=0x2f75 OP_Untargetable=0x3e36 OP_CancelSneakHide=0x5335 +OP_UnderWorld=0x7580 # clients sends up when they detect an underworld issue, might be useful for cheat detection #expedition OP_DzQuit=0x20d6 diff --git a/utils/patches/patch_Titanium.conf b/utils/patches/patch_Titanium.conf index 9a7e1e800..ade2576aa 100644 --- a/utils/patches/patch_Titanium.conf +++ b/utils/patches/patch_Titanium.conf @@ -543,6 +543,7 @@ OP_PlayerStateRemove=0x381d OP_VoiceMacroIn=0x2866 # Client to Server OP_VoiceMacroOut=0x2ec6 # Server to Client OP_CameraEffect=0x0937 # Correct +OP_UnderWorld=0x7186 # clients sends up when they detect an underworld issue, might be useful for cheat detection #named unknowns, to make looking for real unknown easier OP_AnnoyingZoneUnknown=0x729c diff --git a/utils/patches/patch_UF.conf b/utils/patches/patch_UF.conf index 69d6bb1e5..101fafde1 100644 --- a/utils/patches/patch_UF.conf +++ b/utils/patches/patch_UF.conf @@ -368,6 +368,7 @@ OP_OpenContainer=0x041a OP_Marquee=0x3675 OP_Fling=0x51b1 OP_CancelSneakHide=0x7686 +OP_UnderWorld=0x2d9d # clients sends up when they detect an underworld issue, might be useful for cheat detection OP_DzQuit=0x1539 OP_DzListTimers=0x21e9 diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 63af98bbd..9f005365b 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -411,6 +411,7 @@ 9155|2020_08_15_lootdrop_level_filtering.sql|SHOW COLUMNS from `lootdrop_entries` LIKE 'trivial_min_level'|empty| 9156|2020_08_16_virtual_zonepoints.sql|SHOW COLUMNS from `zone_points` LIKE 'is_virtual'|empty| 9157|2020_09_02_pet_taunting.sql|SHOW COLUMNS from `character_pet_info` LIKE 'taunting'|empty| +9158|2020_12_09_underworld.sql|SHOW COLUMNS from `zone` LIKE 'underworld_teleport_index'|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/2020_12_09_underworld.sql b/utils/sql/git/required/2020_12_09_underworld.sql new file mode 100644 index 000000000..f2f2ba032 --- /dev/null +++ b/utils/sql/git/required/2020_12_09_underworld.sql @@ -0,0 +1,6 @@ +ALTER TABLE `zone` ADD COLUMN `underworld_teleport_index` INT(4) NOT NULL DEFAULT '0'; +UPDATE `zone` SET `underworld` = '-2030' WHERE `zoneidnumber` = '71'; +UPDATE `zone` SET `underworld_teleport_index` = '11' WHERE `zoneidnumber` = '71'; +UPDATE `zone` SET `underworld_teleport_index` = '-1' WHERE `zoneidnumber` = '75'; +UPDATE `zone` SET `underworld_teleport_index` = '-1' WHERE `zoneidnumber` = '150'; + diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index bc1b542dd..5b8a08d77 100755 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -105,68 +105,69 @@ bool ZoneDatabase::GetZoneCFG( std::string query = StringFormat( "SELECT " - "ztype, " // 0 - "fog_red, " // 1 - "fog_green, " // 2 - "fog_blue, " // 3 - "fog_minclip, " // 4 - "fog_maxclip, " // 5 - "fog_red2, " // 6 - "fog_green2, " // 7 - "fog_blue2, " // 8 - "fog_minclip2, " // 9 - "fog_maxclip2, " // 10 - "fog_red3, " // 11 - "fog_green3, " // 12 - "fog_blue3, " // 13 - "fog_minclip3, " // 14 - "fog_maxclip3, " // 15 - "fog_red4, " // 16 - "fog_green4, " // 17 - "fog_blue4, " // 18 - "fog_minclip4, " // 19 - "fog_maxclip4, " // 20 - "fog_density, " // 21 - "sky, " // 22 - "zone_exp_multiplier, " // 23 - "safe_x, " // 24 - "safe_y, " // 25 - "safe_z, " // 26 - "underworld, " // 27 - "minclip, " // 28 - "maxclip, " // 29 - "time_type, " // 30 - "canbind, " // 31 - "cancombat, " // 32 - "canlevitate, " // 33 - "castoutdoor, " // 34 - "hotzone, " // 35 - "ruleset, " // 36 - "suspendbuffs, " // 37 - "map_file_name, " // 38 - "short_name, " // 39 - "rain_chance1, " // 40 - "rain_chance2, " // 41 - "rain_chance3, " // 42 - "rain_chance4, " // 43 - "rain_duration1, " // 44 - "rain_duration2, " // 45 - "rain_duration3, " // 46 - "rain_duration4, " // 47 - "snow_chance1, " // 48 - "snow_chance2, " // 49 - "snow_chance3, " // 50 - "snow_chance4, " // 51 - "snow_duration1, " // 52 - "snow_duration2, " // 53 - "snow_duration3, " // 54 - "snow_duration4, " // 55 - "gravity, " // 56 - "fast_regen_hp, " // 57 - "fast_regen_mana, " // 58 - "fast_regen_endurance, " // 59 - "npc_max_aggro_dist, " // 60 - "max_movement_update_range " // 61 + "ztype, " // 0 + "fog_red, " // 1 + "fog_green, " // 2 + "fog_blue, " // 3 + "fog_minclip, " // 4 + "fog_maxclip, " // 5 + "fog_red2, " // 6 + "fog_green2, " // 7 + "fog_blue2, " // 8 + "fog_minclip2, " // 9 + "fog_maxclip2, " // 10 + "fog_red3, " // 11 + "fog_green3, " // 12 + "fog_blue3, " // 13 + "fog_minclip3, " // 14 + "fog_maxclip3, " // 15 + "fog_red4, " // 16 + "fog_green4, " // 17 + "fog_blue4, " // 18 + "fog_minclip4, " // 19 + "fog_maxclip4, " // 20 + "fog_density, " // 21 + "sky, " // 22 + "zone_exp_multiplier, " // 23 + "safe_x, " // 24 + "safe_y, " // 25 + "safe_z, " // 26 + "underworld, " // 27 + "minclip, " // 28 + "maxclip, " // 29 + "time_type, " // 30 + "canbind, " // 31 + "cancombat, " // 32 + "canlevitate, " // 33 + "castoutdoor, " // 34 + "hotzone, " // 35 + "ruleset, " // 36 + "suspendbuffs, " // 37 + "map_file_name, " // 38 + "short_name, " // 39 + "rain_chance1, " // 40 + "rain_chance2, " // 41 + "rain_chance3, " // 42 + "rain_chance4, " // 43 + "rain_duration1, " // 44 + "rain_duration2, " // 45 + "rain_duration3, " // 46 + "rain_duration4, " // 47 + "snow_chance1, " // 48 + "snow_chance2, " // 49 + "snow_chance3, " // 50 + "snow_chance4, " // 51 + "snow_duration1, " // 52 + "snow_duration2, " // 53 + "snow_duration3, " // 54 + "snow_duration4, " // 55 + "gravity, " // 56 + "fast_regen_hp, " // 57 + "fast_regen_mana, " // 58 + "fast_regen_endurance, " // 59 + "npc_max_aggro_dist, " // 60 + "max_movement_update_range, " // 61 + "underwold_teleport_index " // 62 "FROM zone WHERE zoneidnumber = %i AND version = %i %s", zoneid, instance_id, @@ -218,6 +219,7 @@ bool ZoneDatabase::GetZoneCFG( zone_data->FastRegenMana = atoi(row[58]); zone_data->FastRegenEndurance = atoi(row[59]); zone_data->NPCAggroMaxDist = atoi(row[60]); + zone_data->underworld_teleport_index = atoi(row[62]); int bindable = 0; bindable = atoi(row[31]);