From dec5879fc98f6a8f76f8c1072c3cf29540189a85 Mon Sep 17 00:00:00 2001 From: DeKaN Date: Mon, 22 Aug 2022 03:33:11 +0400 Subject: [PATCH] Extract World SNO ids into enum and replace int "magic constants" --- src/DiIiS-NA/Core/MPQ/Dicts.cs | 641 +----------- .../CommandManager/GameCommands.cs | 3 +- .../D3-GameServer/Core/Types/SNO/WorldSno.cs | 909 ++++++++++++++++++ .../GSSystem/ActorSystem/Actor.cs | 36 +- .../GSSystem/ActorSystem/BossPortal.cs | 11 +- .../ActorSystem/Implementations/Boss.cs | 3 +- .../ActorSystem/Implementations/Door.cs | 5 +- .../Implementations/DungeonStonePortal.cs | 17 +- .../ActorSystem/Implementations/Goblin.cs | 3 +- .../Implementations/HearthPortal.cs | 5 +- .../Implementations/LootContainer.cs | 11 +- .../Implementations/LootRunPortal.cs | 5 +- .../ActorSystem/Implementations/NPC/Humans.cs | 3 +- .../Implementations/NPC/LorathNahr_NPC.cs | 3 +- .../ActorSystem/Implementations/Readable.cs | 4 +- .../ActorSystem/Implementations/Savepoint.cs | 2 +- .../ScriptObjects/ActVBarricade.cs | 3 +- .../X1_Westm_Door_Giant_Event.cs | 3 +- .../Spawners/KingGhost_Spawner.cs | 3 +- .../ActorSystem/Implementations/Waypoint.cs | 2 +- .../GSSystem/ActorSystem/InteractiveNPC.cs | 3 +- .../GSSystem/ActorSystem/Monster.cs | 6 +- .../GSSystem/ActorSystem/Portal.cs | 641 ++++++------ .../D3-GameServer/GSSystem/GameSystem/Game.cs | 96 +- .../GSSystem/GameSystem/QuestManager.cs | 16 +- .../GSSystem/GeneratorsSystem/DRLGTemplate.cs | 159 +-- .../GSSystem/GeneratorsSystem/LoreRegistry.cs | 95 +- .../GeneratorsSystem/WorldGenerator.cs | 273 +++--- .../D3-GameServer/GSSystem/MapSystem/Scene.cs | 63 +- .../D3-GameServer/GSSystem/MapSystem/World.cs | 29 +- .../PlayerSystem/ConversationManager.cs | 20 +- .../GSSystem/PlayerSystem/Player.cs | 94 +- .../Implementations/General/TownTeleport.cs | 2 +- .../MonsterSkills/SingleProjectileSkill.cs | 1 + .../PowerSystem/Payloads/DeathPayload.cs | 15 +- .../GSSystem/QuestSystem/ActI.cs | 451 +++++---- .../GSSystem/QuestSystem/ActII.cs | 341 ++++--- .../GSSystem/QuestSystem/ActIII.cs | 138 +-- .../GSSystem/QuestSystem/ActIV.cs | 79 +- .../GSSystem/QuestSystem/ActV.cs | 369 +++---- .../GSSystem/QuestSystem/Events.cs | 68 +- .../GSSystem/QuestSystem/OpenWorld.cs | 25 +- .../Act I/AttackTownBoominHome.cs | 2 - .../Implementations/Act I/AttackTownKilled.cs | 5 +- .../Implementations/Act I/CryptPortals.cs | 7 +- .../Implementations/Act I/DrownedTemple.cs | 5 +- .../Implementations/Act I/StartSceneinHome.cs | 3 +- .../GSSystem/QuestSystem/QuestProgress.cs | 7 +- 48 files changed, 2545 insertions(+), 2140 deletions(-) create mode 100644 src/DiIiS-NA/D3-GameServer/Core/Types/SNO/WorldSno.cs diff --git a/src/DiIiS-NA/Core/MPQ/Dicts.cs b/src/DiIiS-NA/Core/MPQ/Dicts.cs index ec48d2f..9f3416d 100644 --- a/src/DiIiS-NA/Core/MPQ/Dicts.cs +++ b/src/DiIiS-NA/Core/MPQ/Dicts.cs @@ -1,4 +1,4 @@ -//Blizzless Project 2022 +//Blizzless Project 2022 using System; //Blizzless Project 2022 using System.Collections.Generic; @@ -8,6 +8,7 @@ using System.Linq; using System.Text; //Blizzless Project 2022 using System.Threading.Tasks; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.Core.MPQ { @@ -88186,643 +88187,7 @@ namespace DiIiS_NA.Core.MPQ } public static Dictionary LoadWorlds() { - Dictionary DictSNOWorlds = new Dictionary(); - #region Worlds - DictSNOWorlds.Add("a2c2dun_zolt_treasurehunter", 2812); - DictSNOWorlds.Add("trdun_leoric_level01", 2826); - DictSNOWorlds.Add("a1trdun_level01", 50579); - DictSNOWorlds.Add("a1trdun_level04", 50582); - DictSNOWorlds.Add("a1trdun_level06", 50584); - DictSNOWorlds.Add("a1trdun_level07", 50585); - DictSNOWorlds.Add("a2c1dun_swr_caldeum_01", 50588); - DictSNOWorlds.Add("a2c2dun_cave_random01", 50589); - DictSNOWorlds.Add("a2dun_zolt_sw_random01", 50594); - DictSNOWorlds.Add("a2dun_zolt_timed01_level01", 50596); - DictSNOWorlds.Add("a2dun_zolt_level01", 50610); - DictSNOWorlds.Add("a2dun_zolt_level02", 50611); - DictSNOWorlds.Add("a2dun_zolt_level03", 50612); - DictSNOWorlds.Add("a2dun_zolt_lobby", 50613); - DictSNOWorlds.Add("axe_bad_data", 50623); - DictSNOWorlds.Add("axe_flatworld", 50627); - DictSNOWorlds.Add("caout_interior_d", 50657); - DictSNOWorlds.Add("caout_mine_abandoned_cellara", 50658); - DictSNOWorlds.Add("pvp_map2", 50715); - DictSNOWorlds.Add("pvp_maze_arena_01", 50716); - DictSNOWorlds.Add("pvp_octagon_arena_01", 50717); - DictSNOWorlds.Add("pvp_pillar_01", 50718); - DictSNOWorlds.Add("pvp_stairs_arena_01", 50719); - DictSNOWorlds.Add("tod_loadscreen", 50814); - DictSNOWorlds.Add("caout_interior_f", 51270); - DictSNOWorlds.Add("a2c3dun_aqd_oasis_level01", 57491); - DictSNOWorlds.Add("a1c6_spidercave_01", 58231); - DictSNOWorlds.Add("a2dun_swr_adria_level01", 58493); - DictSNOWorlds.Add("trdun_leoric_level02", 58982); - DictSNOWorlds.Add("trdun_leoric_level03", 58983); - DictSNOWorlds.Add("a2dun_aqd_special_01", 59486); - DictSNOWorlds.Add("a2dun_zolt_bossfight_level04", 60193); - DictSNOWorlds.Add("trdun_cave_nephalem_01", 60393); - DictSNOWorlds.Add("trdun_cave_nephalem_02", 60394); - DictSNOWorlds.Add("trdun_cave_nephalem_03", 60395); - DictSNOWorlds.Add("caout_khamsin_mine", 60432); - DictSNOWorlds.Add("trdun_crypt_skeletonkingcrown_01", 60600); - DictSNOWorlds.Add("trdun_cain_intro", 60713); - DictSNOWorlds.Add("a2_belial_room_01", 60756); - DictSNOWorlds.Add("caout_interior_g_stranded2", 60838); - DictSNOWorlds.Add("a2dun_zolt_head_random01", 61631); - DictSNOWorlds.Add("a2trdun_cave_oasis_random01", 62568); - DictSNOWorlds.Add("a2trdun_cave_oasis_random02", 62569); - DictSNOWorlds.Add("trout_sub240_fields_cellara", 62706); - DictSNOWorlds.Add("trout_adriascellar", 62751); - DictSNOWorlds.Add("a2dun_aqd_special_a", 62776); - DictSNOWorlds.Add("a2dun_aqd_special_b", 62779); - DictSNOWorlds.Add("caout_town", 70885); - DictSNOWorlds.Add("trout_town", 71150); - DictSNOWorlds.Add("trdun_crypt_falsepassage_01", 72636); - DictSNOWorlds.Add("trdun_crypt_falsepassage_02", 72637); - DictSNOWorlds.Add("trout_townattack", 72882); - DictSNOWorlds.Add("a1trdun_king_level08", 73261); - DictSNOWorlds.Add("a1dun_leor_manor", 75049); - DictSNOWorlds.Add("a3dun_keep_level04", 75434); - DictSNOWorlds.Add("trdun_butcherslair_02", 78839); - DictSNOWorlds.Add("pvp_caout_arena_01", 79100); - DictSNOWorlds.Add("a3dun_crater_st_level01", 79401); - DictSNOWorlds.Add("a1trdun_cath_tower_of_power", 80057); - DictSNOWorlds.Add("a2dun_zolt_shadowrealm_level01", 80589); - DictSNOWorlds.Add("trout_oldtistram_cellar", 80730); - DictSNOWorlds.Add("a3dun_crater_st_level02", 80763); - DictSNOWorlds.Add("a3dun_rmpt_level01", 81019); - DictSNOWorlds.Add("a3dun_crater_level_01", 81049); - DictSNOWorlds.Add("a1_cave_fields_scavengerden_level01", 81163); - DictSNOWorlds.Add("a1_cave_fields_scavengerden_level02", 81164); - DictSNOWorlds.Add("a2_belial_room_intro", 81715); - DictSNOWorlds.Add("a3dun_crater_level_02", 81934); - DictSNOWorlds.Add("highlands_randomdrlg_westtower_level01", 82076); - DictSNOWorlds.Add("highlands_randomdrlg_westtower_level02", 82313); - DictSNOWorlds.Add("a1_cave_fields_minecavea_level01", 82370); - DictSNOWorlds.Add("a1_cave_fields_minecavea_level02", 82371); - DictSNOWorlds.Add("a1_cave_highlands_goatcavea_level01", 82502); - DictSNOWorlds.Add("a1_cave_highlands_goatcavea_level02", 82511); - DictSNOWorlds.Add("trout_oldtristram_treecave", 84518); - DictSNOWorlds.Add("a3dun_crater_st_level04", 85201); - DictSNOWorlds.Add("a2dun_cald", 86594); - DictSNOWorlds.Add("trout_tristram_leahsroom", 86856); - DictSNOWorlds.Add("trout_highlands_dunexteriora", 87707); - DictSNOWorlds.Add("trdun_crypt_skeletonkingcrown_02", 92126); - DictSNOWorlds.Add("a3dun_rmpt_level02", 93099); - DictSNOWorlds.Add("a3dun_keep_level03", 93104); - DictSNOWorlds.Add("trdun_jail_level01", 94676); - DictSNOWorlds.Add("a3_battlefields_02", 95804); - DictSNOWorlds.Add("pvp_butcher_arena_01", 102100); - DictSNOWorlds.Add("trdun_crypt_fields_flooded_memories_level01", 102299); - DictSNOWorlds.Add("gluttony_boss", 103209); - DictSNOWorlds.Add("a4dun_garden3_spireentrance", 103910); - DictSNOWorlds.Add("trout_vendor_tinker", 104446); - DictSNOWorlds.Add("a1trdun_level05_templar", 105406); - DictSNOWorlds.Add("trout_oldtistram_cellar_1", 106746); - DictSNOWorlds.Add("trout_oldtistram_cellar_2", 106752); - DictSNOWorlds.Add("trout_oldtistram_cellar_3", 107050); - DictSNOWorlds.Add("trout_fields_vendor_curios", 107445); - DictSNOWorlds.Add("a4dun_heaven_1000_monsters_fight", 109143); - DictSNOWorlds.Add("trout_tristram_inn", 109362); - DictSNOWorlds.Add("a4dun_garden_of_hope_01", 109513); - DictSNOWorlds.Add("a4dun_hell_portal_01", 109525); - DictSNOWorlds.Add("a4dun_hell_portal_02", 109530); - DictSNOWorlds.Add("a4dun_diablo_arena", 109561); - DictSNOWorlds.Add("a2dun_cald_uprising", 109894); - DictSNOWorlds.Add("a2dun_portalroulette_a", 111376); - DictSNOWorlds.Add("a2dun_boneyard_worm_cave_01", 111666); - DictSNOWorlds.Add("a2trdun_boneyard_spider_cave_01", 111670); - DictSNOWorlds.Add("pvp_cald_swr_ver2", 112864); - DictSNOWorlds.Add("a1trdun_tyrael_level09", 117405); - DictSNOWorlds.Add("a3dun_crater_level_03", 119290); - DictSNOWorlds.Add("a3dun_crater_st_level01b", 119641); - DictSNOWorlds.Add("a3dun_crater_st_level04b", 119650); - DictSNOWorlds.Add("fields_cave_swordofjustice_level01", 119888); - DictSNOWorlds.Add("a3dun_azmodan_arena", 121214); - DictSNOWorlds.Add("a4dun_spire_level_01", 121579); - DictSNOWorlds.Add("a2dun_zolt_blood02", 123183); - DictSNOWorlds.Add("pvp_neph_arena", 129123); - DictSNOWorlds.Add("a4dun_spire_level_02", 129305); - DictSNOWorlds.Add("a4dun_spire_level_03", 129306); - DictSNOWorlds.Add("trout_tristram_cainshouse", 130161); - DictSNOWorlds.Add("pvp_crypt_arena_01", 131908); - DictSNOWorlds.Add("a1_cave_highlands_vendorrescue", 132995); - DictSNOWorlds.Add("caout_oasis_cellar_d_refugeecellar", 134820); - DictSNOWorlds.Add("caout_oasis_cellar_c_zakarwamerchant", 134822); - DictSNOWorlds.Add("a1_cave_wilderness_den_level01", 135193); - DictSNOWorlds.Add("a1dun_labyrinth_01", 135713); - DictSNOWorlds.Add("caout_stingingwinds_randomcellar_1", 136058); - DictSNOWorlds.Add("caout_stingingwinds_randomcellar_2", 136116); - DictSNOWorlds.Add("caout_stingingwinds_randomcellar_3", 136136); - DictSNOWorlds.Add("a3dun_keep_level05", 136415); - DictSNOWorlds.Add("trout_oldtristram_cellar_f", 136441); - DictSNOWorlds.Add("caout_oasis_randomcellar_1", 136900); - DictSNOWorlds.Add("caout_oasis_randomcellar_2", 136932); - DictSNOWorlds.Add("caout_oasis_randomcellar_3", 136936); - DictSNOWorlds.Add("pvp_zolt_ruins_arena", 137439); - DictSNOWorlds.Add("a3dun_crater_st_level02b", 139272); - DictSNOWorlds.Add("pvp_crypt_arena_02", 139469); - DictSNOWorlds.Add("a4dun_sigil_a", 139965); - DictSNOWorlds.Add("a3dun_bridge_interior_random01", 140444); - DictSNOWorlds.Add("pvp_craterst_arena", 140638); - DictSNOWorlds.Add("a2_event_dyingman_mine", 140652); - DictSNOWorlds.Add("a4dun_sigil_b", 140709); - DictSNOWorlds.Add("a2dun_swr_swr_to_oasis_level01", 146619); - DictSNOWorlds.Add("battlenet_mainscreen", 148534); - DictSNOWorlds.Add("caout_alcarnus_randomcellar_1", 148899); - DictSNOWorlds.Add("caout_alcarnus_randomcellar_2", 148907); - DictSNOWorlds.Add("caout_alcarnus_randomcellar_3", 148908); - DictSNOWorlds.Add("limbo", 149898); - DictSNOWorlds.Add("a4dun_diablo_shadowrealm_01", 153670); - DictSNOWorlds.Add("trdun_crypt_skeletonkingcrown_00", 154587); - DictSNOWorlds.Add("a2dun_aqd_oasis_randomfacepuzzle_small", 157882); - DictSNOWorlds.Add("a2dun_aqd_oasis_randomfacepuzzle_large", 158593); - DictSNOWorlds.Add("a2trdun_cave_oasis_random02_level02", 161011); - DictSNOWorlds.Add("caout_refugeecamp", 161472); - DictSNOWorlds.Add("a1trdun_cave_old_ruins_random01", 161961); - DictSNOWorlds.Add("caout_oasis_randomcellar_4", 162790); - DictSNOWorlds.Add("trdun_crypt_fields_flooded_memories_level02", 165797); - DictSNOWorlds.Add("a4dun_libraryoffate", 166640); - DictSNOWorlds.Add("trout_townattack_chapelcellar_a", 167721); - DictSNOWorlds.Add("a2dun_zolt_timed01_level02", 168196); - DictSNOWorlds.Add("pvp_trainingground", 168230); - DictSNOWorlds.Add("a2dun_cave_mapdungeon_level01", 169477); - DictSNOWorlds.Add("pvp_traininginn", 170375); - DictSNOWorlds.Add("trout_highlands_servanthouse_cellar_vendor", 171189); - DictSNOWorlds.Add("a3dun_hub_keep", 172909); - DictSNOWorlds.Add("a2_swr_fcauseway_01", 174434); - DictSNOWorlds.Add("trout_tristram_cainshouse_event", 174449); - DictSNOWorlds.Add("a3dun_keep_random_01", 174516); - DictSNOWorlds.Add("caout_hub_inn", 174530); - DictSNOWorlds.Add("a3dun_keep_random_02", 174555); - DictSNOWorlds.Add("a3dun_keep_random_03", 174560); - DictSNOWorlds.Add("a3dun_keep_random_04", 174665); - DictSNOWorlds.Add("a4dun_heaven_hub_keep", 178152); - DictSNOWorlds.Add("a4dun_sigil_d", 180517); - DictSNOWorlds.Add("a1dun_spidercave_01", 180550); - DictSNOWorlds.Add("a4dun_sigil_c", 181644); - DictSNOWorlds.Add("a3dun_keep_hub_inn", 182875); - DictSNOWorlds.Add("a4dun_heaven_1000_monsters_fight_entrance", 182944); - DictSNOWorlds.Add("a1dun_spidercave_02", 182976); - DictSNOWorlds.Add("a4dun_heaven_keep_hub_inn", 183800); - DictSNOWorlds.Add("a3dun_keep_random_cellar_01", 185217); - DictSNOWorlds.Add("a3dun_keep_random_cellar_02", 185247); - DictSNOWorlds.Add("a3dun_hub_adria_tower", 186552); - DictSNOWorlds.Add("a3dun_icecaves_random_01", 189259); - DictSNOWorlds.Add("a3dun_icecaves_timed_01", 189910); - DictSNOWorlds.Add("battlenet_act2screen", 191376); - DictSNOWorlds.Add("battlenet_act3screen", 191389); - DictSNOWorlds.Add("battlenet_act4screen", 191390); - DictSNOWorlds.Add("a2dun_aqd_oasis_level01", 192640); - DictSNOWorlds.Add("a2dun_aqd_oasis_level00", 192687); - DictSNOWorlds.Add("a1_cave_wilderness_den_level02", 194231); - DictSNOWorlds.Add("a2dun_cave_mapdungeon_level02", 194238); - DictSNOWorlds.Add("a2trdun_cave_oasis_random01_level02", 194240); - DictSNOWorlds.Add("battlenet_pvpscreen", 194282); - DictSNOWorlds.Add("caout_cellar_alcarnus_main", 195200); - DictSNOWorlds.Add("a2_event_priceofmercy_cellar", 195997); - DictSNOWorlds.Add("a2dun_zolt_random_portalroulette_02", 196036); - DictSNOWorlds.Add("a2_rockworm_cellar_cave", 196222); - DictSNOWorlds.Add("a4dun_diablo_arena_phase3", 196292); - DictSNOWorlds.Add("a3dun_keep_random_cellar_03", 197622); - DictSNOWorlds.Add("a4dun_spire_level_00", 198281); - DictSNOWorlds.Add("trout_wilderness_corpsehouse", 199388); - DictSNOWorlds.Add("a2dun_cave_bloodvial_01", 204628); - DictSNOWorlds.Add("a2dun_cave_bloodvial_02", 204674); - DictSNOWorlds.Add("a3dun_hub_adria_tower_intro", 204707); - DictSNOWorlds.Add("a4dun_spire_diabloentrance", 205399); - DictSNOWorlds.Add("a3dun_bridge_interior_random02", 205422); - DictSNOWorlds.Add("a4dun_spire_level_04", 210725); - DictSNOWorlds.Add("a1dun_random_level01", 211471); - DictSNOWorlds.Add("a4dun_spire_exterior", 214956); - DictSNOWorlds.Add("a2trdun_boneyard_spider_cave_02", 218967); - DictSNOWorlds.Add("a2dun_boneyard_worm_cave_02", 218970); - DictSNOWorlds.Add("a4dun_garden_of_hope_random", 219659); - DictSNOWorlds.Add("a2c2dun_cave_random01_level02", 220804); - DictSNOWorlds.Add("a3dun_icecaves_random_01_level_02", 221688); - DictSNOWorlds.Add("a3dun_icecaves_timed_01_level_02", 221689); - DictSNOWorlds.Add("a3dun_keep_random_01_level_02", 221748); - DictSNOWorlds.Add("a3dun_keep_random_02_level_02", 221749); - DictSNOWorlds.Add("a3dun_keep_random_03_level_02", 221750); - DictSNOWorlds.Add("a3dun_keep_random_04_level_02", 221751); - DictSNOWorlds.Add("a2dun_zolt_sw_random01_level02", 222575); - DictSNOWorlds.Add("a1dun_crypt_dev_hell", 222591); - DictSNOWorlds.Add("utility_server_world", 223474); - DictSNOWorlds.Add("pvp_keep_arena", 225850); - DictSNOWorlds.Add("a3_battlefields_03", 226713); - DictSNOWorlds.Add("pvp_garden_arena", 227206); - DictSNOWorlds.Add("a1trdun_cave_qa_well", 230288); - DictSNOWorlds.Add("x1_bogcave_random01", 234962); - DictSNOWorlds.Add("pvp_leoricsgarden_arena", 235229); - DictSNOWorlds.Add("x1_bogcave_random02", 235882); - DictSNOWorlds.Add("pvp_zolt_small_arena", 236154); - DictSNOWorlds.Add("battlenet_act1screen", 238775); - DictSNOWorlds.Add("x1_pof_dungeonlayout_level_01", 245391); - DictSNOWorlds.Add("x1_pof_dungeonlayout_level_02", 245402); - DictSNOWorlds.Add("x1_test_challengetestworld", 245736); - DictSNOWorlds.Add("x1_westm_int_gen_c_miser", 246369); - DictSNOWorlds.Add("x1_pof_dungeonboss_01", 252144); - DictSNOWorlds.Add("qa_pvp_test_map", 252723); - DictSNOWorlds.Add("uber_bossworld1", 256111); - DictSNOWorlds.Add("uber_bossworld2", 256112); - DictSNOWorlds.Add("uber_bossworld3", 256607); - DictSNOWorlds.Add("uber_portalworld", 257117); - DictSNOWorlds.Add("pvp_regicide_prototype_small", 258624); - DictSNOWorlds.Add("x1_westm_zone_01", 261712); - DictSNOWorlds.Add("x1_westm_zone_03", 263494); - DictSNOWorlds.Add("flatworld_pvp_demo", 265834); - DictSNOWorlds.Add("x1_bog_01", 267412); - DictSNOWorlds.Add("x1_bog_bogpeople_cellar_c", 269874); - DictSNOWorlds.Add("x1_fortress_level_01", 271233); - DictSNOWorlds.Add("x1_fortress_level_02", 271235); - DictSNOWorlds.Add("x1_bog_bogpeople_cellar_d", 271533); - DictSNOWorlds.Add("x1_bog_bogpeople_cellar_a", 272172); - DictSNOWorlds.Add("pvp_duel_box", 273257); - DictSNOWorlds.Add("x1_fortress_temp_malthaelarena", 273433); - DictSNOWorlds.Add("pvp_field_test", 273769); - DictSNOWorlds.Add("pvp_z_lane_test", 274044); - DictSNOWorlds.Add("pvp_peanut_longlane", 274658); - DictSNOWorlds.Add("pvp_duel_small", 275192); - DictSNOWorlds.Add("x1_pand_ext_level_01", 275415); - DictSNOWorlds.Add("x1_lr_tileset_cath", 275921); - DictSNOWorlds.Add("x1_lr_tileset_corruptspire", 275926); - DictSNOWorlds.Add("x1_lr_tileset_leorics", 275930); - DictSNOWorlds.Add("x1_lr_tileset_rootcave", 275943); - DictSNOWorlds.Add("x1_lr_tileset_wormcaves", 275944); - DictSNOWorlds.Add("x1_lr_tileset_zoltarchives", 275945); - DictSNOWorlds.Add("x1_lr_tileset_crypt", 275946); - DictSNOWorlds.Add("x1_lr_tileset_floodedcave", 275947); - DictSNOWorlds.Add("x1_lr_tileset_icecave", 275960); - DictSNOWorlds.Add("x1_lr_hubworld", 276032); - DictSNOWorlds.Add("pvp_three_control", 276095); - DictSNOWorlds.Add("pvp_murderball_test_01", 277669); - DictSNOWorlds.Add("pvp_duel_small_multi", 279626); - DictSNOWorlds.Add("x1_bog_adriaritual", 282460); - DictSNOWorlds.Add("x1_catacombs_level01", 283552); - DictSNOWorlds.Add("x1_catacombs_level02", 283566); - DictSNOWorlds.Add("x1_westm_rescueinterior_01", 284491); - DictSNOWorlds.Add("x1_westm_rescueinterior_02", 284492); - DictSNOWorlds.Add("battlenet_act5screen", 288104); - DictSNOWorlds.Add("x1_lr_level_01", 288454); - DictSNOWorlds.Add("x1_lr_level_02", 288685); - DictSNOWorlds.Add("x1_lr_level_03", 288687); - DictSNOWorlds.Add("x1_lr_level_04", 288798); - DictSNOWorlds.Add("x1_lr_level_05", 288800); - DictSNOWorlds.Add("x1_lr_level_06", 288802); - DictSNOWorlds.Add("x1_lr_level_07", 288804); - DictSNOWorlds.Add("x1_lr_level_08", 288810); - DictSNOWorlds.Add("x1_lr_level_09", 288814); - DictSNOWorlds.Add("x1_lr_level_10", 288816); - DictSNOWorlds.Add("x1_lr_tileset_zoltruins", 288823); - DictSNOWorlds.Add("x1_lr_tileset_sewers", 288843); - DictSNOWorlds.Add("x1_westm_int_gen_a_01", 288972); - DictSNOWorlds.Add("x1_westm_custom_alley_01_rat", 289523); - DictSNOWorlds.Add("x1_pand_ext_gateoverlook", 291941); - DictSNOWorlds.Add("x1_pand_hexmaze", 294585); - DictSNOWorlds.Add("x1_westm_int_rescue_guards_01", 294633); - DictSNOWorlds.Add("x1_pand_batteringram", 295225); - DictSNOWorlds.Add("x1_adria_boss_arena_02", 297771); - DictSNOWorlds.Add("x1_pand_hexmaze_en_01", 302603); - DictSNOWorlds.Add("x1_westm_int_gen_b_01madman", 302733); - DictSNOWorlds.Add("x1_westm_int_gen_a_01zombiesorcerer", 302876); - DictSNOWorlds.Add("x1_westm_int_gen_b_02doomedwoman", 303058); - DictSNOWorlds.Add("x1_westm_int_gen_a02necromancer", 303361); - DictSNOWorlds.Add("x1_westm_scoundrelevent", 303430); - DictSNOWorlds.Add("x1_westmarch_hub", 304235); - DictSNOWorlds.Add("x1_westm_alley_rats", 304358); - DictSNOWorlds.Add("x1_westm_intro", 306549); - DictSNOWorlds.Add("x1_pand_hexmaze_2", 306747); - DictSNOWorlds.Add("x1_westm_int_rescue_guards_02", 306915); - DictSNOWorlds.Add("x1_urzael_arena", 308446); - DictSNOWorlds.Add("x1_westmarch_cath_int", 308549); - DictSNOWorlds.Add("x1_westmarch_overlook_d", 308705); - DictSNOWorlds.Add("x1_pand_hexmaze_en_02", 310706); - DictSNOWorlds.Add("x1_westm_reformedcultist", 310845); - DictSNOWorlds.Add("pvp_square_test_01", 315043); - DictSNOWorlds.Add("x1_westm_int_gen_a_01_captainstokely", 321968); - DictSNOWorlds.Add("x1_pand_ext_cellar_a", 322531); - DictSNOWorlds.Add("x1_lr_tileset_keep_war", 322661); - DictSNOWorlds.Add("x1_lr_tileset_keep_forge", 322662); - DictSNOWorlds.Add("x1_lr_tileset_keep_river", 322663); - DictSNOWorlds.Add("x1_lr_tileset_aqueducts", 322710); - DictSNOWorlds.Add("x1_lr_tileset_spidercaves", 322726); - DictSNOWorlds.Add("x1_lr_tileset_crater", 323565); - DictSNOWorlds.Add("x1_lr_tileset_cath_large", 324418); - DictSNOWorlds.Add("x1_lr_tileset_cath_small", 324425); - DictSNOWorlds.Add("x1_lr_tileset_leorics_small", 327401); - DictSNOWorlds.Add("x1_lr_tileset_crypt_small", 327768); - DictSNOWorlds.Add("x1_lr_tileset_zoltarchives_small", 327864); - DictSNOWorlds.Add("x1_lr_tileset_cath_extralarge", 328037); - DictSNOWorlds.Add("x1_westm_int_gen_c_01_skeleton_rush", 328325); - DictSNOWorlds.Add("x1_westm_int_gen_b_02_var_c_yard_rush", 328344); - DictSNOWorlds.Add("x1_malthael_boss_arena", 328484); - DictSNOWorlds.Add("x1_westm_int_gen_c_03_elements", 328933); - DictSNOWorlds.Add("x1_westm_int_gen_b_03_var_c_panic", 330207); - DictSNOWorlds.Add("x1_westm_templar_event", 330391); - DictSNOWorlds.Add("x1_lr_tileset_exterior_tristramfields", 330465); - DictSNOWorlds.Add("x1_westm_cellar_corpsefinder", 330761); - DictSNOWorlds.Add("x1_lr_tileset_westmarch", 331263); - DictSNOWorlds.Add("x1_lr_tileset_abattoir", 331384); - DictSNOWorlds.Add("x1_lr_tileset_bogcave", 331385); - DictSNOWorlds.Add("x1_lr_tileset_fortress", 331387); - DictSNOWorlds.Add("x1_lr_tileset_catacombs", 331388); - DictSNOWorlds.Add("x1_lr_tileset_hexmaze", 331389); - DictSNOWorlds.Add("x1_a5_challenge_westm_dreadghosts", 331944); - DictSNOWorlds.Add("x1_lr_tileset_exterior_bog", 332284); - DictSNOWorlds.Add("x1_tristram_adventure_mode_hub", 332336); - DictSNOWorlds.Add("x1_lr_tileset_aqueducts_small", 333443); - DictSNOWorlds.Add("x1_westm_int_gen_b_03_var_b_ghostchase", 335058); - DictSNOWorlds.Add("x1_lr_tileset_aqueducts_large", 335192); - DictSNOWorlds.Add("x1_lr_tileset_corruptspire_large", 335410); - DictSNOWorlds.Add("x1_lr_tileset_crypt_large", 335922); - DictSNOWorlds.Add("x1_lr_tileset_crater_small", 335992); - DictSNOWorlds.Add("x1_lr_tileset_floodedcave_large", 336064); - DictSNOWorlds.Add("x1_lr_tileset_icecave_large", 336068); - DictSNOWorlds.Add("x1_lr_tileset_keep_forge_large", 336073); - DictSNOWorlds.Add("x1_lr_tileset_keep_river_large", 336077); - DictSNOWorlds.Add("x1_lr_tileset_keep_war_large", 336078); - DictSNOWorlds.Add("x1_lr_tileset_leorics_large", 336083); - DictSNOWorlds.Add("x1_lr_tileset_rootcave_large", 336085); - DictSNOWorlds.Add("x1_lr_tileset_sewers_large", 336086); - DictSNOWorlds.Add("x1_lr_tileset_spidercaves_large", 336096); - DictSNOWorlds.Add("x1_lr_tileset_wormcaves_large", 336104); - DictSNOWorlds.Add("x1_lr_tileset_zoltarchives_large", 336137); - DictSNOWorlds.Add("x1_lr_tileset_zoltruins_large", 336139); - DictSNOWorlds.Add("x1_lr_tileset_corruptspire_small", 336143); - DictSNOWorlds.Add("x1_lr_tileset_floodedcave_small", 336148); - DictSNOWorlds.Add("x1_lr_tileset_icecave_small", 336149); - DictSNOWorlds.Add("x1_lr_tileset_keep_forge_small", 336234); - DictSNOWorlds.Add("x1_lr_tileset_keep_river_small", 336239); - DictSNOWorlds.Add("x1_lr_tileset_keep_war_small", 336240); - DictSNOWorlds.Add("x1_lr_tileset_rootcave_small", 336242); - DictSNOWorlds.Add("x1_lr_tileset_sewers_small", 336244); - DictSNOWorlds.Add("x1_lr_tileset_spidercaves_small", 336246); - DictSNOWorlds.Add("x1_bogcave_random01_b", 336572); - DictSNOWorlds.Add("x1_bogcave_random02_b", 336573); - DictSNOWorlds.Add("x1_westm_int_gen_a_03_kingevent01", 336844); - DictSNOWorlds.Add("x1_westm_int_gen_b_02_kingevent02", 336852); - DictSNOWorlds.Add("x1_westm_int_gen_a_04_kingevent03", 336902); - DictSNOWorlds.Add("x1_lr_tileset_wormcaves_small", 337001); - DictSNOWorlds.Add("x1_lr_tileset_zoltruins_small", 337003); - DictSNOWorlds.Add("x1_pand_ext_2_battlefields", 338600); - DictSNOWorlds.Add("x1_westm_deathorb_gideonscourt", 338891); - DictSNOWorlds.Add("x1_abattoir_random01", 338930); - DictSNOWorlds.Add("x1_westm_graveyard_deathorb", 338944); - DictSNOWorlds.Add("x1_abattoir_random01_b", 338968); - DictSNOWorlds.Add("x1_abattoir_random02", 338976); - DictSNOWorlds.Add("x1_abattoir_random02_b", 338977); - DictSNOWorlds.Add("x1_westm_deathorb_kerwinsrow", 339151); - DictSNOWorlds.Add("x1_heaven_pandemonium_portal", 339160); - DictSNOWorlds.Add("x1_pand_ext_batteringram_entrance_a", 339254); - DictSNOWorlds.Add("x1_westm_scoundrelevent_level02", 340624); - DictSNOWorlds.Add("x1_catacombs_fakeentrance_02", 341037); - DictSNOWorlds.Add("x1_catacombs_fakeentrance_03", 341038); - DictSNOWorlds.Add("x1_catacombs_fakeentrance_04", 341040); - DictSNOWorlds.Add("x1_catacombs_jeweler_1", 342109); - DictSNOWorlds.Add("x1_lr_tileset_pony", 343942); - DictSNOWorlds.Add("x1_lr_tileset_pony_large", 343943); - DictSNOWorlds.Add("x1_lr_tileset_pony_small", 343944); - DictSNOWorlds.Add("x1_fortress_malthael_entrance", 346410); - DictSNOWorlds.Add("x1_lr_tileset_exterior_wilderness", 346912); - DictSNOWorlds.Add("x1_lr_tileset_exterior_highlands", 347368); - DictSNOWorlds.Add("x1_lr_tileset_exterior_gardensofhope1", 347749); - DictSNOWorlds.Add("x1_lr_tileset_exterior_gardensofhope2", 347750); - DictSNOWorlds.Add("x1_lr_tileset_exterior_gardensofhope3", 347751); - DictSNOWorlds.Add("x1_lr_tileset_exterior_graveyard", 347861); - DictSNOWorlds.Add("x1_lr_tileset_exterior_pandext", 347903); - DictSNOWorlds.Add("x1_lr_tileset_breakup_wortham", 348606); - DictSNOWorlds.Add("x1_lr_tileset_exterior_boneyards", 349173); - DictSNOWorlds.Add("x1_lr_tileset_cratertowers1_small", 350309); - DictSNOWorlds.Add("x1_lr_tileset_cratertowers2_small", 350310); - DictSNOWorlds.Add("x1_lr_tileset_cratertowers3_small", 350311); - DictSNOWorlds.Add("x1_lr_tileset_cratertowers4_small", 350312); - DictSNOWorlds.Add("x1_lr_tileset_cratertowers5_small", 350313); - DictSNOWorlds.Add("x1_lr_tileset_cratertowers6_small", 350314); - DictSNOWorlds.Add("x1_lr_tileset_cratertowers7_small", 350315); - DictSNOWorlds.Add("x1_lr_tileset_exterior_ramparts1", 351261); - DictSNOWorlds.Add("x1_lr_tileset_exterior_ramparts2", 351269); - DictSNOWorlds.Add("x1_lr_tileset_exterior_ramparts3", 351270); - DictSNOWorlds.Add("x1_lr_tileset_exterior_rampartsdamaged1", 351271); - DictSNOWorlds.Add("x1_lr_tileset_exterior_rampartsdamaged2", 351272); - DictSNOWorlds.Add("x1_lr_tileset_exterior_rampartsdamaged3", 351273); - DictSNOWorlds.Add("x1_westm_cellar_kids", 351793); - DictSNOWorlds.Add("x1_westm_cellar_ruffians", 351794); - DictSNOWorlds.Add("x1_westm_int_gen_c_03_dogs", 357501); - DictSNOWorlds.Add("x1_westm_int_gen_c_03_deathmaiden", 357502); - DictSNOWorlds.Add("x1_pand_ext_cellar_b", 357650); - DictSNOWorlds.Add("x1_pand_ext_cellar_c", 357653); - DictSNOWorlds.Add("x1_pand_ext_cellar_d", 357656); - DictSNOWorlds.Add("x1_pand_ext_cellar_e", 357658); - DictSNOWorlds.Add("x1_catacombs_jeweler_2", 358554); - DictSNOWorlds.Add("x1_westm_int_gen_c_01_zombiefireplace", 358641); - DictSNOWorlds.Add("x1_bogcave_random_connector", 358955); - DictSNOWorlds.Add("x1_bog_bogpeople_cellar_b", 359862); - DictSNOWorlds.Add("x1_lr_tileset_hexmaze_large", 360736); - DictSNOWorlds.Add("x1_lr_tileset_hexmaze_small", 360737); - DictSNOWorlds.Add("x1_lr_tileset_catacombs_large", 360756); - DictSNOWorlds.Add("x1_lr_tileset_catacombs_small", 360757); - DictSNOWorlds.Add("x1_lr_tileset_bogcave_large", 360768); - DictSNOWorlds.Add("x1_lr_tileset_bogcave_small", 360769); - DictSNOWorlds.Add("x1_lr_tileset_fortress_small", 360796); - DictSNOWorlds.Add("x1_lr_tileset_fortress_large", 360797); - DictSNOWorlds.Add("x1_lr_tileset_abattoir_large", 360811); - DictSNOWorlds.Add("x1_lr_tileset_abattoir_small", 360812); - DictSNOWorlds.Add("x1_lr_tileset_westmarch_small", 360815); - DictSNOWorlds.Add("x1_lr_tileset_westmarch_large", 360816); - DictSNOWorlds.Add("x1_lr_tileset_westmarchfire", 360823); - DictSNOWorlds.Add("x1_lr_tileset_westmarchfire_small", 360835); - DictSNOWorlds.Add("x1_lr_tileset_westmarchfire_large", 360836); - DictSNOWorlds.Add("x1_lr_tileset_fortressislands", 362155); - DictSNOWorlds.Add("x1_lr_tileset_fortressislands_small", 362175); - DictSNOWorlds.Add("x1_lr_tileset_hellportala_small", 362178); - DictSNOWorlds.Add("x1_lr_tileset_hellportalb_small", 362187); - DictSNOWorlds.Add("x1_lr_tileset_exterior_graveyard_small", 363977); - DictSNOWorlds.Add("x1_lr_tileset_exterior_bog_small", 363998); - DictSNOWorlds.Add("x1_lr_tileset_exterior_pandext_small", 364270); - DictSNOWorlds.Add("x1_lr_tileset_exterior_pandext_large", 364271); - DictSNOWorlds.Add("x1_lr_tileset_exterior_graveyard_large", 364391); - DictSNOWorlds.Add("x1_lr_tileset_exterior_bog_large", 364392); - DictSNOWorlds.Add("x1_lr_tileset_exterior_boneyards_large", 364533); - DictSNOWorlds.Add("a4dun_uber_diablo_shadowrealm_01", 365973); - DictSNOWorlds.Add("x1_lr_tileset_event_crypt_udderchaos", 366326); - DictSNOWorlds.Add("x1_westm_int_blacksmith", 368426); - DictSNOWorlds.Add("x1_lr_tileset_crypt_small_udderchaos", 373812); - DictSNOWorlds.Add("x1_pand_hexmaze_bloone", 374758); - DictSNOWorlds.Add("x1_pand_hexmaze_borgoth", 374762); - DictSNOWorlds.Add("x1_pand_hexmaze_grotescor", 374766); - DictSNOWorlds.Add("x1_pand_hexmaze_haziael", 374770); - DictSNOWorlds.Add("x1_pand_hexmaze_magrethar", 374774); - DictSNOWorlds.Add("x1_pand_hexmaze_severag", 374778); - DictSNOWorlds.Add("x2_zpvp_cath_01", 378972); - DictSNOWorlds.Add("x1_lr_tileset_event_graveyard_devhell_02", 379922); - DictSNOWorlds.Add("x1_lr_tileset_event_graveyard_devhell_01", 379923); - DictSNOWorlds.Add("p1_tgoblin_realm", 379962); - DictSNOWorlds.Add("p1_tgoblin_realm_bossroom", 380753); - DictSNOWorlds.Add("p2_scoundrelevent", 384425); - DictSNOWorlds.Add("p1_lr_tileset_cesspools_small", 389322); - DictSNOWorlds.Add("p1_lr_tileset_cesspools_large", 389323); - DictSNOWorlds.Add("p2_datedungeon_01", 404654); - DictSNOWorlds.Add("p2_datedungeon_02", 405005); - DictSNOWorlds.Add("p1_tieredrift_challenge", 405684); - DictSNOWorlds.Add("x1_p4_forest_coast_01", 408254); - DictSNOWorlds.Add("a4dun_corruptspire_sidedungeon_a_level1", 409000); - DictSNOWorlds.Add("p1_a1dun_random_level_goblin", 409093); - DictSNOWorlds.Add("a4dun_corruptspire_sidedungeon_a_level2", 409374); - DictSNOWorlds.Add("a4dun_garden_of_hope_random_a", 409510); - DictSNOWorlds.Add("a4dun_garden_of_hope_random_b", 409511); - DictSNOWorlds.Add("px_lr_tileset_exterior_oasisdrlg", 409626); - DictSNOWorlds.Add("px_lr_tileset_exterior_oasisdrlg_small", 409777); - DictSNOWorlds.Add("px_lr_tileset_exterior_oasisdrlg_large", 409779); - DictSNOWorlds.Add("px_lr_tileset_exterior_leoricsjail", 409802); - DictSNOWorlds.Add("px_lr_tileset_exterior_leoricsjail_small", 409803); - DictSNOWorlds.Add("px_lr_tileset_exterior_leoricsjail_large", 409804); - DictSNOWorlds.Add("px_lr_tileset_exterior_tristramfieldsdrlg", 414834); - DictSNOWorlds.Add("px_lr_tileset_exterior_tristramfieldsdrlg_small", 414848); - DictSNOWorlds.Add("px_lr_tileset_exterior_tristramfieldsdrlg_large", 414849); - DictSNOWorlds.Add("px_lr_tileset_exterior_festeringwoodsdrlg_large", 414971); - DictSNOWorlds.Add("px_lr_tileset_exterior_desert", 415309); - DictSNOWorlds.Add("px_lr_tileset_exterior_desert_large", 415310); - DictSNOWorlds.Add("px_lr_tileset_exterior_desert_small", 415311); - DictSNOWorlds.Add("px_lr_tileset_exterior_festeringwoodsdrlg", 415352); - DictSNOWorlds.Add("px_lr_tileset_exterior_festeringwoodsdrlg_small", 415354); - DictSNOWorlds.Add("x1_p4_forest_coast_cellar_01", 424373); - DictSNOWorlds.Add("x1_p4_forest_coast_cellar_02", 424521); - DictSNOWorlds.Add("x1_p4_forest_coast_cellar_03", 424525); - DictSNOWorlds.Add("x1_p4_forest_coast_cellar_04", 424528); - DictSNOWorlds.Add("a3dun_ruins_frost_city_a_01", 428493); - DictSNOWorlds.Add("x1_lr_tileset_monster_prototypes", 429679); - DictSNOWorlds.Add("a3dun_ruins_frost_city_a_02", 430335); - DictSNOWorlds.Add("x1_p4_forest_coast_cave_level02", 432436); - DictSNOWorlds.Add("x1_p4_forest_coast_cave_level01", 432535); - DictSNOWorlds.Add("px_lr_tileset_exterior_battlefieldsdrlg", 432563); - DictSNOWorlds.Add("px_lr_tileset_exterior_battlefieldsdrlg_large", 432689); - DictSNOWorlds.Add("px_lr_tileset_exterior_battlefieldsdrlg_small", 432696); - DictSNOWorlds.Add("x1_westm_cesspools_randoma_level01", 432697); - DictSNOWorlds.Add("x1_westm_cesspools_randoma_level02", 432698); - DictSNOWorlds.Add("a2dun_aqd_special_a_level01", 432993); - DictSNOWorlds.Add("a2dun_aqd_special_b_level01", 432997); - DictSNOWorlds.Add("a2dun_aqd_special_a_level02", 432998); - DictSNOWorlds.Add("a2dun_aqd_special_b_level02", 433001); - DictSNOWorlds.Add("x1_p4_forest_ancient_city_crypt_03b", 433755); - DictSNOWorlds.Add("p2_totallynotacowlevel", 434649); - DictSNOWorlds.Add("a3dun_event_ruins_frost_kkg_dungeon", 436291); - DictSNOWorlds.Add("p4_ruins_frost_events", 436306); - DictSNOWorlds.Add("p4_lr_tileset_ruins_frost", 436403); - DictSNOWorlds.Add("p3_benchmark_challenge", 436494); - DictSNOWorlds.Add("x1_p4_forest_coast_tower_mid_lvl", 441322); - DictSNOWorlds.Add("x1_p4_forest_coast_tower_top", 441386); - DictSNOWorlds.Add("x1_p4_forest_coast_tower_mid_lvl_b", 441412); - DictSNOWorlds.Add("x1_p4_forest_coast_tower_top_winter", 442666); - DictSNOWorlds.Add("p4_lr_tileset_ruins_frost_small", 442934); - DictSNOWorlds.Add("p4_lr_tileset_ruins_frost_large", 442938); - DictSNOWorlds.Add("p4_lr_tileset_exterior_forest", 442959); - DictSNOWorlds.Add("x1_p4_leoric_estate", 443346); - DictSNOWorlds.Add("p4_lr_tileset_exterior_forest_large", 443550); - DictSNOWorlds.Add("p4_lr_tileset_exterior_forest_small", 443551); - DictSNOWorlds.Add("p4_bounty_grounds_keep", 443678); - DictSNOWorlds.Add("p4_bounty_grounds_swr", 443686); - DictSNOWorlds.Add("p4_bounty_grounds_zolt", 443705); - DictSNOWorlds.Add("p4_bounty_grounds_crypt", 443720); - DictSNOWorlds.Add("p4_bounty_grounds_leorics_garden", 443756); - DictSNOWorlds.Add("p4_setdung_wiz_opus", 443772); - DictSNOWorlds.Add("p4_bounty_grounds_neph", 443801); - DictSNOWorlds.Add("p4_lr_tileset_exterior_forest_snow", 443834); - DictSNOWorlds.Add("p4_lr_tileset_exterior_forest_snow_small", 443894); - DictSNOWorlds.Add("p4_lr_tileset_exterior_forest_snow_large", 443895); - DictSNOWorlds.Add("p4_lr_tileset_forest_coast_cave", 443996); - DictSNOWorlds.Add("p4_lr_tileset_forest_coast_cave_large", 443999); - DictSNOWorlds.Add("p4_lr_tileset_forest_coast_cave_small", 444000); - DictSNOWorlds.Add("p4_forest_snow_01", 444305); - DictSNOWorlds.Add("p4_setdung_wiz_firebird", 444482); - DictSNOWorlds.Add("p4_setdung_wiz_rasha", 444485); - DictSNOWorlds.Add("p4_setdung_cru_akkhan", 444616); - DictSNOWorlds.Add("p4_setdung_cru_roland", 444704); - DictSNOWorlds.Add("p4_setdung_barb_kings", 444755); - DictSNOWorlds.Add("p4_setdung_barb_wastes", 444818); - DictSNOWorlds.Add("p4_setdung_barb_raekor", 444860); - DictSNOWorlds.Add("p4_setdung_barb_might", 444908); - DictSNOWorlds.Add("p4_setdung_wiz_vyr", 444953); - DictSNOWorlds.Add("p4_setdung_dh_mar", 444977); - DictSNOWorlds.Add("p4_setdung_dh_nat", 444999); - DictSNOWorlds.Add("p4_setdung_dh_ess", 445019); - DictSNOWorlds.Add("p4_setdung_dh_shadow", 445038); - DictSNOWorlds.Add("p4_setdung_wd_tooth", 445065); - DictSNOWorlds.Add("p4_setdung_wd_haunt", 445084); - DictSNOWorlds.Add("p4_setdung_wd_spider", 445108); - DictSNOWorlds.Add("p4_setdung_wd_jade", 445141); - DictSNOWorlds.Add("p4_setdung_monk_innas", 445160); - DictSNOWorlds.Add("p4_setdung_monk_sunwuko", 445177); - DictSNOWorlds.Add("p4_setdung_monk_uliana", 445194); - DictSNOWorlds.Add("p4_setdung_monk_storms", 445211); - DictSNOWorlds.Add("p4_setdung_cru_thorns", 445235); - DictSNOWorlds.Add("p4_setdung_cru_seeker", 445259); - DictSNOWorlds.Add("p4_forest_snow_icecave_01", 445736); - DictSNOWorlds.Add("p4_forest_snow_cellar_a", 445896); - DictSNOWorlds.Add("p4_a5_bounty_grounds_zolt", 448366); - DictSNOWorlds.Add("p4_a5_bounty_grounds_swr", 448373); - DictSNOWorlds.Add("p4_a5_bounty_grounds_neph", 448381); - DictSNOWorlds.Add("p4_a5_bounty_grounds_leorics_garden", 448396); - DictSNOWorlds.Add("p4_a5_bounty_grounds_keep", 448402); - DictSNOWorlds.Add("p4_a5_bounty_grounds_crypt", 448409); - DictSNOWorlds.Add("p43_ad_cathedral_level_01", 452721); - DictSNOWorlds.Add("p43_ad_cathedral_level_02", 452922); - DictSNOWorlds.Add("p43_ad_cathedral_level_03", 452984); - DictSNOWorlds.Add("p43_ad_cathedral_level_04", 452985); - DictSNOWorlds.Add("p43_ad_catacombs_level_05", 452991); - DictSNOWorlds.Add("p43_ad_catacombs_level_06", 452996); - DictSNOWorlds.Add("p43_ad_catacombs_level_07", 452997); - DictSNOWorlds.Add("p43_ad_catacombs_level_08", 452998); - DictSNOWorlds.Add("p43_ad_caves_level_09", 452999); - DictSNOWorlds.Add("p43_ad_caves_level_12", 453002); - DictSNOWorlds.Add("p43_ad_caves_level_11", 453003); - DictSNOWorlds.Add("p43_ad_caves_level_10", 453004); - DictSNOWorlds.Add("p43_ad_hell_level_13", 453008); - DictSNOWorlds.Add("p43_ad_hell_level_14", 453014); - DictSNOWorlds.Add("p43_ad_hell_level_15", 453015); - DictSNOWorlds.Add("p43_ad_hell_level_16", 453016); - DictSNOWorlds.Add("p43_lr_tileset_interiorgrift_forest_snow", 453210); - DictSNOWorlds.Add("p43_lr_tileset_interiorgrift_desert", 453211); - DictSNOWorlds.Add("p43_lr_tileset_interiorgrift_pandext", 453212); - DictSNOWorlds.Add("p43_lr_tileset_interiorgrift_festeringwoodsdrlg", 453213); - DictSNOWorlds.Add("p43_lr_tileset_interiorgrift_forest_coast", 453214); - DictSNOWorlds.Add("p43_ad_level02_sidedungeon_darkpassage", 453440); - DictSNOWorlds.Add("p43_ad_level03_sidedungeon_leoricstomb", 453446); - DictSNOWorlds.Add("p43_ad_level06_sidedungeon_chamberofbone", 453582); - DictSNOWorlds.Add("p43_ad_level15_sidedungeon_unholyaltar", 454208); - DictSNOWorlds.Add("p43_ad_oldtristram", 455282); - DictSNOWorlds.Add("lost_souls_prototype_v2", 456029); - DictSNOWorlds.Add("p6_church_level_01", 456634); - DictSNOWorlds.Add("lost_souls_prototype_v3", 457461); - DictSNOWorlds.Add("p43_ad_abandonedfarmstead", 458255); - DictSNOWorlds.Add("px_lr_tileset_exterior_moors_small", 458829); - DictSNOWorlds.Add("lost_souls_prototype_v4", 458965); - DictSNOWorlds.Add("weekly_challenge_hub", 459976); - DictSNOWorlds.Add("p6_moor_01", 460372); - DictSNOWorlds.Add("lost_souls_prototype_v5", 460587); - DictSNOWorlds.Add("px_lr_tileset_church_small", 462861); - DictSNOWorlds.Add("px_lr_tileset_church", 462957); - DictSNOWorlds.Add("px_lr_tileset_exterior_moors", 462958); - DictSNOWorlds.Add("p6_church_level_02", 464096); - DictSNOWorlds.Add("p6_cave_moors_to_church_01", 464829); - DictSNOWorlds.Add("p6_lr_tileset_interiorgrift_moors", 465376); - DictSNOWorlds.Add("p6_moors_cave_well_01", 465884); - DictSNOWorlds.Add("p6_setdung_necro_blood", 468085); - DictSNOWorlds.Add("p6_setdung_necro_bone", 468086); - DictSNOWorlds.Add("p6_setdung_necro_saint", 468094); - DictSNOWorlds.Add("p6_setdung_necro_plague", 468095); - DictSNOWorlds.Add("p6_church_level_02_boss", 470238); - DictSNOWorlds.Add("mb313_pand", 478413); - DictSNOWorlds.Add("mb313_church", 478433); - DictSNOWorlds.Add("mb313_moors", 478434); - DictSNOWorlds.Add("mb313_cave", 478435); - DictSNOWorlds.Add("mb313_firerealm", 478437); - DictSNOWorlds.Add("mb313_cage", 478438); - DictSNOWorlds.Add("mb313_town", 478439); - DictSNOWorlds.Add("p1_tgoblin_realm_ancient", 483057); - DictSNOWorlds.Add("p1_tgoblin_realm_bossroom_ancient", 483086); - - #endregion - return DictSNOWorlds; + return Enum.GetValues().Where(x => x != WorldSno.__NONE).ToDictionary(x => x.ToString(), x => (int)x); } } diff --git a/src/DiIiS-NA/D3-GameServer/CommandManager/GameCommands.cs b/src/DiIiS-NA/D3-GameServer/CommandManager/GameCommands.cs index db7756a..7d6c7f8 100644 --- a/src/DiIiS-NA/D3-GameServer/CommandManager/GameCommands.cs +++ b/src/DiIiS-NA/D3-GameServer/CommandManager/GameCommands.cs @@ -4,6 +4,7 @@ using DiIiS_NA.Core.Helpers.Math; using DiIiS_NA.Core.MPQ; //Blizzless Project 2022 using DiIiS_NA.Core.MPQ.FileFormats; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; //Blizzless Project 2022 using DiIiS_NA.GameServer.Core.Types.Math; //Blizzless Project 2022 @@ -461,7 +462,7 @@ namespace DiIiS_NA.GameServer.CommandManager if (!MPQStorage.Data.Assets[SNOGroup.Worlds].ContainsKey(worldId)) return "There exist no world with SNOId: " + worldId; - var world = invokerClient.InGameClient.Game.GetWorld(worldId); + var world = invokerClient.InGameClient.Game.GetWorld((WorldSno)worldId); if (world == null) return "Can't teleport you to world with snoId " + worldId; diff --git a/src/DiIiS-NA/D3-GameServer/Core/Types/SNO/WorldSno.cs b/src/DiIiS-NA/D3-GameServer/Core/Types/SNO/WorldSno.cs new file mode 100644 index 0000000..3071ea9 --- /dev/null +++ b/src/DiIiS-NA/D3-GameServer/Core/Types/SNO/WorldSno.cs @@ -0,0 +1,909 @@ +using System; +using System.Linq; + +namespace DiIiS_NA.D3_GameServer.Core.Types.SNO +{ + public enum WorldSno: int + { + __NONE = -1, + a2c2dun_zolt_treasurehunter = 2812, + trdun_leoric_level01 = 2826, + a1trdun_level01 = 50579, + a1trdun_level04 = 50582, + a1trdun_level06 = 50584, + a1trdun_level07 = 50585, + a2c1dun_swr_caldeum_01 = 50588, + a2c2dun_cave_random01 = 50589, + a2dun_zolt_sw_random01 = 50594, + a2dun_zolt_timed01_level01 = 50596, + a2dun_zolt_level01 = 50610, + a2dun_zolt_level02 = 50611, + a2dun_zolt_level03 = 50612, + a2dun_zolt_lobby = 50613, + axe_bad_data = 50623, + axe_flatworld = 50627, + caout_interior_d = 50657, + caout_mine_abandoned_cellara = 50658, + pvp_map2 = 50715, + pvp_maze_arena_01 = 50716, + pvp_octagon_arena_01 = 50717, + pvp_pillar_01 = 50718, + pvp_stairs_arena_01 = 50719, + tod_loadscreen = 50814, + caout_interior_f = 51270, + a2c3dun_aqd_oasis_level01 = 57491, + a1c6_spidercave_01 = 58231, + a2dun_swr_adria_level01 = 58493, + trdun_leoric_level02 = 58982, + trdun_leoric_level03 = 58983, + a2dun_aqd_special_01 = 59486, + a2dun_zolt_bossfight_level04 = 60193, + trdun_cave_nephalem_01 = 60393, + trdun_cave_nephalem_02 = 60394, + trdun_cave_nephalem_03 = 60395, + caout_khamsin_mine = 60432, + trdun_crypt_skeletonkingcrown_01 = 60600, + trdun_cain_intro = 60713, + a2_belial_room_01 = 60756, + caout_interior_g_stranded2 = 60838, + a2dun_zolt_head_random01 = 61631, + a2trdun_cave_oasis_random01 = 62568, + a2trdun_cave_oasis_random02 = 62569, + trout_sub240_fields_cellara = 62706, + trout_adriascellar = 62751, + a2dun_aqd_special_a = 62776, + a2dun_aqd_special_b = 62779, + caout_town = 70885, + trout_town = 71150, + trdun_crypt_falsepassage_01 = 72636, + trdun_crypt_falsepassage_02 = 72637, + trout_townattack = 72882, + a1trdun_king_level08 = 73261, + a1dun_leor_manor = 75049, + a3dun_keep_level04 = 75434, + trdun_butcherslair_02 = 78839, + pvp_caout_arena_01 = 79100, + a3dun_crater_st_level01 = 79401, + a1trdun_cath_tower_of_power = 80057, + a2dun_zolt_shadowrealm_level01 = 80589, + trout_oldtistram_cellar = 80730, + a3dun_crater_st_level02 = 80763, + a3dun_rmpt_level01 = 81019, + a3dun_crater_level_01 = 81049, + a1_cave_fields_scavengerden_level01 = 81163, + a1_cave_fields_scavengerden_level02 = 81164, + a2_belial_room_intro = 81715, + a3dun_crater_level_02 = 81934, + highlands_randomdrlg_westtower_level01 = 82076, + highlands_randomdrlg_westtower_level02 = 82313, + a1_cave_fields_minecavea_level01 = 82370, + a1_cave_fields_minecavea_level02 = 82371, + a1_cave_highlands_goatcavea_level01 = 82502, + a1_cave_highlands_goatcavea_level02 = 82511, + trout_oldtristram_treecave = 84518, + a3dun_crater_st_level04 = 85201, + a2dun_cald = 86594, + trout_tristram_leahsroom = 86856, + trout_highlands_dunexteriora = 87707, + trdun_crypt_skeletonkingcrown_02 = 92126, + a3dun_rmpt_level02 = 93099, + a3dun_keep_level03 = 93104, + trdun_jail_level01 = 94676, + a3_battlefields_02 = 95804, + pvp_butcher_arena_01 = 102100, + trdun_crypt_fields_flooded_memories_level01 = 102299, + gluttony_boss = 103209, + a4dun_garden3_spireentrance = 103910, + trout_vendor_tinker = 104446, + a1trdun_level05_templar = 105406, + trout_oldtistram_cellar_1 = 106746, + trout_oldtistram_cellar_2 = 106752, + trout_oldtistram_cellar_3 = 107050, + trout_fields_vendor_curios = 107445, + a4dun_heaven_1000_monsters_fight = 109143, + trout_tristram_inn = 109362, + a4dun_garden_of_hope_01 = 109513, + a4dun_hell_portal_01 = 109525, + a4dun_hell_portal_02 = 109530, + a4dun_diablo_arena = 109561, + a2dun_cald_uprising = 109894, + a2dun_portalroulette_a = 111376, + a2dun_boneyard_worm_cave_01 = 111666, + a2trdun_boneyard_spider_cave_01 = 111670, + pvp_cald_swr_ver2 = 112864, + a1trdun_tyrael_level09 = 117405, + a3dun_crater_level_03 = 119290, + a3dun_crater_st_level01b = 119641, + a3dun_crater_st_level04b = 119650, + fields_cave_swordofjustice_level01 = 119888, + a3dun_azmodan_arena = 121214, + a4dun_spire_level_01 = 121579, + a2dun_zolt_blood02 = 123183, + pvp_neph_arena = 129123, + a4dun_spire_level_02 = 129305, + a4dun_spire_level_03 = 129306, + trout_tristram_cainshouse = 130161, + pvp_crypt_arena_01 = 131908, + a1_cave_highlands_vendorrescue = 132995, + caout_oasis_cellar_d_refugeecellar = 134820, + caout_oasis_cellar_c_zakarwamerchant = 134822, + a1_cave_wilderness_den_level01 = 135193, + a1dun_labyrinth_01 = 135713, + caout_stingingwinds_randomcellar_1 = 136058, + caout_stingingwinds_randomcellar_2 = 136116, + caout_stingingwinds_randomcellar_3 = 136136, + a3dun_keep_level05 = 136415, + trout_oldtristram_cellar_f = 136441, + caout_oasis_randomcellar_1 = 136900, + caout_oasis_randomcellar_2 = 136932, + caout_oasis_randomcellar_3 = 136936, + pvp_zolt_ruins_arena = 137439, + a3dun_crater_st_level02b = 139272, + pvp_crypt_arena_02 = 139469, + a4dun_sigil_a = 139965, + a3dun_bridge_interior_random01 = 140444, + pvp_craterst_arena = 140638, + a2_event_dyingman_mine = 140652, + a4dun_sigil_b = 140709, + a2dun_swr_swr_to_oasis_level01 = 146619, + battlenet_mainscreen = 148534, + caout_alcarnus_randomcellar_1 = 148899, + caout_alcarnus_randomcellar_2 = 148907, + caout_alcarnus_randomcellar_3 = 148908, + limbo = 149898, + a4dun_diablo_shadowrealm_01 = 153670, + trdun_crypt_skeletonkingcrown_00 = 154587, + a2dun_aqd_oasis_randomfacepuzzle_small = 157882, + a2dun_aqd_oasis_randomfacepuzzle_large = 158593, + a2trdun_cave_oasis_random02_level02 = 161011, + caout_refugeecamp = 161472, + a1trdun_cave_old_ruins_random01 = 161961, + caout_oasis_randomcellar_4 = 162790, + trdun_crypt_fields_flooded_memories_level02 = 165797, + a4dun_libraryoffate = 166640, + trout_townattack_chapelcellar_a = 167721, + a2dun_zolt_timed01_level02 = 168196, + pvp_trainingground = 168230, + a2dun_cave_mapdungeon_level01 = 169477, + pvp_traininginn = 170375, + trout_highlands_servanthouse_cellar_vendor = 171189, + a3dun_hub_keep = 172909, + a2_swr_fcauseway_01 = 174434, + trout_tristram_cainshouse_event = 174449, + a3dun_keep_random_01 = 174516, + caout_hub_inn = 174530, + a3dun_keep_random_02 = 174555, + a3dun_keep_random_03 = 174560, + a3dun_keep_random_04 = 174665, + a4dun_heaven_hub_keep = 178152, + a4dun_sigil_d = 180517, + a1dun_spidercave_01 = 180550, + a4dun_sigil_c = 181644, + a3dun_keep_hub_inn = 182875, + a4dun_heaven_1000_monsters_fight_entrance = 182944, + a1dun_spidercave_02 = 182976, + a4dun_heaven_keep_hub_inn = 183800, + a3dun_keep_random_cellar_01 = 185217, + a3dun_keep_random_cellar_02 = 185247, + a3dun_hub_adria_tower = 186552, + a3dun_icecaves_random_01 = 189259, + a3dun_icecaves_timed_01 = 189910, + battlenet_act2screen = 191376, + battlenet_act3screen = 191389, + battlenet_act4screen = 191390, + a2dun_aqd_oasis_level01 = 192640, + a2dun_aqd_oasis_level00 = 192687, + a1_cave_wilderness_den_level02 = 194231, + a2dun_cave_mapdungeon_level02 = 194238, + a2trdun_cave_oasis_random01_level02 = 194240, + battlenet_pvpscreen = 194282, + caout_cellar_alcarnus_main = 195200, + a2_event_priceofmercy_cellar = 195997, + a2dun_zolt_random_portalroulette_02 = 196036, + a2_rockworm_cellar_cave = 196222, + a4dun_diablo_arena_phase3 = 196292, + a3dun_keep_random_cellar_03 = 197622, + a4dun_spire_level_00 = 198281, + trout_wilderness_corpsehouse = 199388, + a2dun_cave_bloodvial_01 = 204628, + a2dun_cave_bloodvial_02 = 204674, + a3dun_hub_adria_tower_intro = 204707, + a4dun_spire_diabloentrance = 205399, + a3dun_bridge_interior_random02 = 205422, + a4dun_spire_level_04 = 210725, + a1dun_random_level01 = 211471, + a4dun_spire_exterior = 214956, + a2trdun_boneyard_spider_cave_02 = 218967, + a2dun_boneyard_worm_cave_02 = 218970, + a4dun_garden_of_hope_random = 219659, + a2c2dun_cave_random01_level02 = 220804, + a3dun_icecaves_random_01_level_02 = 221688, + a3dun_icecaves_timed_01_level_02 = 221689, + a3dun_keep_random_01_level_02 = 221748, + a3dun_keep_random_02_level_02 = 221749, + a3dun_keep_random_03_level_02 = 221750, + a3dun_keep_random_04_level_02 = 221751, + a2dun_zolt_sw_random01_level02 = 222575, + a1dun_crypt_dev_hell = 222591, + utility_server_world = 223474, + pvp_keep_arena = 225850, + a3_battlefields_03 = 226713, + pvp_garden_arena = 227206, + a1trdun_cave_qa_well = 230288, + x1_bogcave_random01 = 234962, + pvp_leoricsgarden_arena = 235229, + x1_bogcave_random02 = 235882, + pvp_zolt_small_arena = 236154, + battlenet_act1screen = 238775, + x1_pof_dungeonlayout_level_01 = 245391, + x1_pof_dungeonlayout_level_02 = 245402, + x1_test_challengetestworld = 245736, + x1_westm_int_gen_c_miser = 246369, + x1_pof_dungeonboss_01 = 252144, + qa_pvp_test_map = 252723, + uber_bossworld1 = 256111, + uber_bossworld2 = 256112, + uber_bossworld3 = 256607, + uber_portalworld = 257117, + pvp_regicide_prototype_small = 258624, + x1_westm_zone_01 = 261712, + x1_westm_zone_03 = 263494, + flatworld_pvp_demo = 265834, + x1_bog_01 = 267412, + x1_bog_bogpeople_cellar_c = 269874, + x1_fortress_level_01 = 271233, + x1_fortress_level_02 = 271235, + x1_bog_bogpeople_cellar_d = 271533, + x1_bog_bogpeople_cellar_a = 272172, + pvp_duel_box = 273257, + x1_fortress_temp_malthaelarena = 273433, + pvp_field_test = 273769, + pvp_z_lane_test = 274044, + pvp_peanut_longlane = 274658, + pvp_duel_small = 275192, + x1_pand_ext_level_01 = 275415, + x1_lr_tileset_cath = 275921, + x1_lr_tileset_corruptspire = 275926, + x1_lr_tileset_leorics = 275930, + x1_lr_tileset_rootcave = 275943, + x1_lr_tileset_wormcaves = 275944, + x1_lr_tileset_zoltarchives = 275945, + x1_lr_tileset_crypt = 275946, + x1_lr_tileset_floodedcave = 275947, + x1_lr_tileset_icecave = 275960, + x1_lr_hubworld = 276032, + pvp_three_control = 276095, + pvp_murderball_test_01 = 277669, + pvp_duel_small_multi = 279626, + x1_bog_adriaritual = 282460, + x1_catacombs_level01 = 283552, + x1_catacombs_level02 = 283566, + x1_westm_rescueinterior_01 = 284491, + x1_westm_rescueinterior_02 = 284492, + battlenet_act5screen = 288104, + x1_lr_level_01 = 288454, + x1_lr_level_02 = 288685, + x1_lr_level_03 = 288687, + x1_lr_level_04 = 288798, + x1_lr_level_05 = 288800, + x1_lr_level_06 = 288802, + x1_lr_level_07 = 288804, + x1_lr_level_08 = 288810, + x1_lr_level_09 = 288814, + x1_lr_level_10 = 288816, + x1_lr_tileset_zoltruins = 288823, + x1_lr_tileset_sewers = 288843, + x1_westm_int_gen_a_01 = 288972, + x1_westm_custom_alley_01_rat = 289523, + x1_pand_ext_gateoverlook = 291941, + x1_pand_hexmaze = 294585, + x1_westm_int_rescue_guards_01 = 294633, + x1_pand_batteringram = 295225, + x1_adria_boss_arena_02 = 297771, + x1_pand_hexmaze_en_01 = 302603, + x1_westm_int_gen_b_01madman = 302733, + x1_westm_int_gen_a_01zombiesorcerer = 302876, + x1_westm_int_gen_b_02doomedwoman = 303058, + x1_westm_int_gen_a02necromancer = 303361, + x1_westm_scoundrelevent = 303430, + x1_westmarch_hub = 304235, + x1_westm_alley_rats = 304358, + x1_westm_intro = 306549, + x1_pand_hexmaze_2 = 306747, + x1_westm_int_rescue_guards_02 = 306915, + x1_urzael_arena = 308446, + x1_westmarch_cath_int = 308549, + x1_westmarch_overlook_d = 308705, + x1_pand_hexmaze_en_02 = 310706, + x1_westm_reformedcultist = 310845, + pvp_square_test_01 = 315043, + x1_westm_int_gen_a_01_captainstokely = 321968, + x1_pand_ext_cellar_a = 322531, + x1_lr_tileset_keep_war = 322661, + x1_lr_tileset_keep_forge = 322662, + x1_lr_tileset_keep_river = 322663, + x1_lr_tileset_aqueducts = 322710, + x1_lr_tileset_spidercaves = 322726, + x1_lr_tileset_crater = 323565, + x1_lr_tileset_cath_large = 324418, + x1_lr_tileset_cath_small = 324425, + x1_lr_tileset_leorics_small = 327401, + x1_lr_tileset_crypt_small = 327768, + x1_lr_tileset_zoltarchives_small = 327864, + x1_lr_tileset_cath_extralarge = 328037, + x1_westm_int_gen_c_01_skeleton_rush = 328325, + x1_westm_int_gen_b_02_var_c_yard_rush = 328344, + x1_malthael_boss_arena = 328484, + x1_westm_int_gen_c_03_elements = 328933, + x1_westm_int_gen_b_03_var_c_panic = 330207, + x1_westm_templar_event = 330391, + x1_lr_tileset_exterior_tristramfields = 330465, + x1_westm_cellar_corpsefinder = 330761, + x1_lr_tileset_westmarch = 331263, + x1_lr_tileset_abattoir = 331384, + x1_lr_tileset_bogcave = 331385, + x1_lr_tileset_fortress = 331387, + x1_lr_tileset_catacombs = 331388, + x1_lr_tileset_hexmaze = 331389, + x1_a5_challenge_westm_dreadghosts = 331944, + x1_lr_tileset_exterior_bog = 332284, + x1_tristram_adventure_mode_hub = 332336, + x1_lr_tileset_aqueducts_small = 333443, + x1_westm_int_gen_b_03_var_b_ghostchase = 335058, + x1_lr_tileset_aqueducts_large = 335192, + x1_lr_tileset_corruptspire_large = 335410, + x1_lr_tileset_crypt_large = 335922, + x1_lr_tileset_crater_small = 335992, + x1_lr_tileset_floodedcave_large = 336064, + x1_lr_tileset_icecave_large = 336068, + x1_lr_tileset_keep_forge_large = 336073, + x1_lr_tileset_keep_river_large = 336077, + x1_lr_tileset_keep_war_large = 336078, + x1_lr_tileset_leorics_large = 336083, + x1_lr_tileset_rootcave_large = 336085, + x1_lr_tileset_sewers_large = 336086, + x1_lr_tileset_spidercaves_large = 336096, + x1_lr_tileset_wormcaves_large = 336104, + x1_lr_tileset_zoltarchives_large = 336137, + x1_lr_tileset_zoltruins_large = 336139, + x1_lr_tileset_corruptspire_small = 336143, + x1_lr_tileset_floodedcave_small = 336148, + x1_lr_tileset_icecave_small = 336149, + x1_lr_tileset_keep_forge_small = 336234, + x1_lr_tileset_keep_river_small = 336239, + x1_lr_tileset_keep_war_small = 336240, + x1_lr_tileset_rootcave_small = 336242, + x1_lr_tileset_sewers_small = 336244, + x1_lr_tileset_spidercaves_small = 336246, + x1_bogcave_random01_b = 336572, + x1_bogcave_random02_b = 336573, + x1_westm_int_gen_a_03_kingevent01 = 336844, + x1_westm_int_gen_b_02_kingevent02 = 336852, + x1_westm_int_gen_a_04_kingevent03 = 336902, + x1_lr_tileset_wormcaves_small = 337001, + x1_lr_tileset_zoltruins_small = 337003, + x1_pand_ext_2_battlefields = 338600, + x1_westm_deathorb_gideonscourt = 338891, + x1_abattoir_random01 = 338930, + x1_westm_graveyard_deathorb = 338944, + x1_abattoir_random01_b = 338968, + x1_abattoir_random02 = 338976, + x1_abattoir_random02_b = 338977, + x1_westm_deathorb_kerwinsrow = 339151, + x1_heaven_pandemonium_portal = 339160, + x1_pand_ext_batteringram_entrance_a = 339254, + x1_westm_scoundrelevent_level02 = 340624, + x1_catacombs_fakeentrance_02 = 341037, + x1_catacombs_fakeentrance_03 = 341038, + x1_catacombs_fakeentrance_04 = 341040, + x1_catacombs_jeweler_1 = 342109, + x1_lr_tileset_pony = 343942, + x1_lr_tileset_pony_large = 343943, + x1_lr_tileset_pony_small = 343944, + x1_fortress_malthael_entrance = 346410, + x1_lr_tileset_exterior_wilderness = 346912, + x1_lr_tileset_exterior_highlands = 347368, + x1_lr_tileset_exterior_gardensofhope1 = 347749, + x1_lr_tileset_exterior_gardensofhope2 = 347750, + x1_lr_tileset_exterior_gardensofhope3 = 347751, + x1_lr_tileset_exterior_graveyard = 347861, + x1_lr_tileset_exterior_pandext = 347903, + x1_lr_tileset_breakup_wortham = 348606, + x1_lr_tileset_exterior_boneyards = 349173, + x1_lr_tileset_cratertowers1_small = 350309, + x1_lr_tileset_cratertowers2_small = 350310, + x1_lr_tileset_cratertowers3_small = 350311, + x1_lr_tileset_cratertowers4_small = 350312, + x1_lr_tileset_cratertowers5_small = 350313, + x1_lr_tileset_cratertowers6_small = 350314, + x1_lr_tileset_cratertowers7_small = 350315, + x1_lr_tileset_exterior_ramparts1 = 351261, + x1_lr_tileset_exterior_ramparts2 = 351269, + x1_lr_tileset_exterior_ramparts3 = 351270, + x1_lr_tileset_exterior_rampartsdamaged1 = 351271, + x1_lr_tileset_exterior_rampartsdamaged2 = 351272, + x1_lr_tileset_exterior_rampartsdamaged3 = 351273, + x1_westm_cellar_kids = 351793, + x1_westm_cellar_ruffians = 351794, + x1_westm_int_gen_c_03_dogs = 357501, + x1_westm_int_gen_c_03_deathmaiden = 357502, + x1_pand_ext_cellar_b = 357650, + x1_pand_ext_cellar_c = 357653, + x1_pand_ext_cellar_d = 357656, + x1_pand_ext_cellar_e = 357658, + x1_catacombs_jeweler_2 = 358554, + x1_westm_int_gen_c_01_zombiefireplace = 358641, + x1_bogcave_random_connector = 358955, + x1_bog_bogpeople_cellar_b = 359862, + x1_lr_tileset_hexmaze_large = 360736, + x1_lr_tileset_hexmaze_small = 360737, + x1_lr_tileset_catacombs_large = 360756, + x1_lr_tileset_catacombs_small = 360757, + x1_lr_tileset_bogcave_large = 360768, + x1_lr_tileset_bogcave_small = 360769, + x1_lr_tileset_fortress_small = 360796, + x1_lr_tileset_fortress_large = 360797, + x1_lr_tileset_abattoir_large = 360811, + x1_lr_tileset_abattoir_small = 360812, + x1_lr_tileset_westmarch_small = 360815, + x1_lr_tileset_westmarch_large = 360816, + x1_lr_tileset_westmarchfire = 360823, + x1_lr_tileset_westmarchfire_small = 360835, + x1_lr_tileset_westmarchfire_large = 360836, + x1_lr_tileset_fortressislands = 362155, + x1_lr_tileset_fortressislands_small = 362175, + x1_lr_tileset_hellportala_small = 362178, + x1_lr_tileset_hellportalb_small = 362187, + x1_lr_tileset_exterior_graveyard_small = 363977, + x1_lr_tileset_exterior_bog_small = 363998, + x1_lr_tileset_exterior_pandext_small = 364270, + x1_lr_tileset_exterior_pandext_large = 364271, + x1_lr_tileset_exterior_graveyard_large = 364391, + x1_lr_tileset_exterior_bog_large = 364392, + x1_lr_tileset_exterior_boneyards_large = 364533, + a4dun_uber_diablo_shadowrealm_01 = 365973, + x1_lr_tileset_event_crypt_udderchaos = 366326, + x1_westm_int_blacksmith = 368426, + x1_lr_tileset_crypt_small_udderchaos = 373812, + x1_pand_hexmaze_bloone = 374758, + x1_pand_hexmaze_borgoth = 374762, + x1_pand_hexmaze_grotescor = 374766, + x1_pand_hexmaze_haziael = 374770, + x1_pand_hexmaze_magrethar = 374774, + x1_pand_hexmaze_severag = 374778, + x2_zpvp_cath_01 = 378972, + p1_tgoblin_realm = 379962, + p1_tgoblin_realm_bossroom = 380753, + p2_scoundrelevent = 384425, + p1_lr_tileset_cesspools_small = 389322, + p1_lr_tileset_cesspools_large = 389323, + p2_datedungeon_01 = 404654, + p2_datedungeon_02 = 405005, + p1_tieredrift_challenge = 405684, + x1_p4_forest_coast_01 = 408254, + a4dun_corruptspire_sidedungeon_a_level1 = 409000, + p1_a1dun_random_level_goblin = 409093, + a4dun_corruptspire_sidedungeon_a_level2 = 409374, + a4dun_garden_of_hope_random_a = 409510, + a4dun_garden_of_hope_random_b = 409511, + px_lr_tileset_exterior_oasisdrlg = 409626, + px_lr_tileset_exterior_oasisdrlg_small = 409777, + px_lr_tileset_exterior_oasisdrlg_large = 409779, + px_lr_tileset_exterior_leoricsjail = 409802, + px_lr_tileset_exterior_leoricsjail_small = 409803, + px_lr_tileset_exterior_leoricsjail_large = 409804, + px_lr_tileset_exterior_tristramfieldsdrlg = 414834, + px_lr_tileset_exterior_tristramfieldsdrlg_small = 414848, + px_lr_tileset_exterior_tristramfieldsdrlg_large = 414849, + px_lr_tileset_exterior_festeringwoodsdrlg_large = 414971, + px_lr_tileset_exterior_desert = 415309, + px_lr_tileset_exterior_desert_large = 415310, + px_lr_tileset_exterior_desert_small = 415311, + px_lr_tileset_exterior_festeringwoodsdrlg = 415352, + px_lr_tileset_exterior_festeringwoodsdrlg_small = 415354, + x1_p4_forest_coast_cellar_01 = 424373, + x1_p4_forest_coast_cellar_02 = 424521, + x1_p4_forest_coast_cellar_03 = 424525, + x1_p4_forest_coast_cellar_04 = 424528, + a3dun_ruins_frost_city_a_01 = 428493, + x1_lr_tileset_monster_prototypes = 429679, + a3dun_ruins_frost_city_a_02 = 430335, + x1_p4_forest_coast_cave_level02 = 432436, + x1_p4_forest_coast_cave_level01 = 432535, + px_lr_tileset_exterior_battlefieldsdrlg = 432563, + px_lr_tileset_exterior_battlefieldsdrlg_large = 432689, + px_lr_tileset_exterior_battlefieldsdrlg_small = 432696, + x1_westm_cesspools_randoma_level01 = 432697, + x1_westm_cesspools_randoma_level02 = 432698, + a2dun_aqd_special_a_level01 = 432993, + a2dun_aqd_special_b_level01 = 432997, + a2dun_aqd_special_a_level02 = 432998, + a2dun_aqd_special_b_level02 = 433001, + x1_p4_forest_ancient_city_crypt_03b = 433755, + p2_totallynotacowlevel = 434649, + a3dun_event_ruins_frost_kkg_dungeon = 436291, + p4_ruins_frost_events = 436306, + p4_lr_tileset_ruins_frost = 436403, + p3_benchmark_challenge = 436494, + x1_p4_forest_coast_tower_mid_lvl = 441322, + x1_p4_forest_coast_tower_top = 441386, + x1_p4_forest_coast_tower_mid_lvl_b = 441412, + x1_p4_forest_coast_tower_top_winter = 442666, + p4_lr_tileset_ruins_frost_small = 442934, + p4_lr_tileset_ruins_frost_large = 442938, + p4_lr_tileset_exterior_forest = 442959, + x1_p4_leoric_estate = 443346, + p4_lr_tileset_exterior_forest_large = 443550, + p4_lr_tileset_exterior_forest_small = 443551, + p4_bounty_grounds_keep = 443678, + p4_bounty_grounds_swr = 443686, + p4_bounty_grounds_zolt = 443705, + p4_bounty_grounds_crypt = 443720, + p4_bounty_grounds_leorics_garden = 443756, + p4_setdung_wiz_opus = 443772, + p4_bounty_grounds_neph = 443801, + p4_lr_tileset_exterior_forest_snow = 443834, + p4_lr_tileset_exterior_forest_snow_small = 443894, + p4_lr_tileset_exterior_forest_snow_large = 443895, + p4_lr_tileset_forest_coast_cave = 443996, + p4_lr_tileset_forest_coast_cave_large = 443999, + p4_lr_tileset_forest_coast_cave_small = 444000, + p4_forest_snow_01 = 444305, + p4_setdung_wiz_firebird = 444482, + p4_setdung_wiz_rasha = 444485, + p4_setdung_cru_akkhan = 444616, + p4_setdung_cru_roland = 444704, + p4_setdung_barb_kings = 444755, + p4_setdung_barb_wastes = 444818, + p4_setdung_barb_raekor = 444860, + p4_setdung_barb_might = 444908, + p4_setdung_wiz_vyr = 444953, + p4_setdung_dh_mar = 444977, + p4_setdung_dh_nat = 444999, + p4_setdung_dh_ess = 445019, + p4_setdung_dh_shadow = 445038, + p4_setdung_wd_tooth = 445065, + p4_setdung_wd_haunt = 445084, + p4_setdung_wd_spider = 445108, + p4_setdung_wd_jade = 445141, + p4_setdung_monk_innas = 445160, + p4_setdung_monk_sunwuko = 445177, + p4_setdung_monk_uliana = 445194, + p4_setdung_monk_storms = 445211, + p4_setdung_cru_thorns = 445235, + p4_setdung_cru_seeker = 445259, + p4_forest_snow_icecave_01 = 445736, + p4_forest_snow_cellar_a = 445896, + p4_a5_bounty_grounds_zolt = 448366, + p4_a5_bounty_grounds_swr = 448373, + p4_a5_bounty_grounds_neph = 448381, + p4_a5_bounty_grounds_leorics_garden = 448396, + p4_a5_bounty_grounds_keep = 448402, + p4_a5_bounty_grounds_crypt = 448409, + p43_ad_cathedral_level_01 = 452721, + p43_ad_cathedral_level_02 = 452922, + p43_ad_cathedral_level_03 = 452984, + p43_ad_cathedral_level_04 = 452985, + p43_ad_catacombs_level_05 = 452991, + p43_ad_catacombs_level_06 = 452996, + p43_ad_catacombs_level_07 = 452997, + p43_ad_catacombs_level_08 = 452998, + p43_ad_caves_level_09 = 452999, + p43_ad_caves_level_12 = 453002, + p43_ad_caves_level_11 = 453003, + p43_ad_caves_level_10 = 453004, + p43_ad_hell_level_13 = 453008, + p43_ad_hell_level_14 = 453014, + p43_ad_hell_level_15 = 453015, + p43_ad_hell_level_16 = 453016, + p43_lr_tileset_interiorgrift_forest_snow = 453210, + p43_lr_tileset_interiorgrift_desert = 453211, + p43_lr_tileset_interiorgrift_pandext = 453212, + p43_lr_tileset_interiorgrift_festeringwoodsdrlg = 453213, + p43_lr_tileset_interiorgrift_forest_coast = 453214, + p43_ad_level02_sidedungeon_darkpassage = 453440, + p43_ad_level03_sidedungeon_leoricstomb = 453446, + p43_ad_level06_sidedungeon_chamberofbone = 453582, + p43_ad_level15_sidedungeon_unholyaltar = 454208, + p43_ad_oldtristram = 455282, + lost_souls_prototype_v2 = 456029, + p6_church_level_01 = 456634, + lost_souls_prototype_v3 = 457461, + p43_ad_abandonedfarmstead = 458255, + px_lr_tileset_exterior_moors_small = 458829, + lost_souls_prototype_v4 = 458965, + weekly_challenge_hub = 459976, + p6_moor_01 = 460372, + lost_souls_prototype_v5 = 460587, + px_lr_tileset_church_small = 462861, + px_lr_tileset_church = 462957, + px_lr_tileset_exterior_moors = 462958, + p6_church_level_02 = 464096, + p6_cave_moors_to_church_01 = 464829, + p6_lr_tileset_interiorgrift_moors = 465376, + p6_moors_cave_well_01 = 465884, + p6_setdung_necro_blood = 468085, + p6_setdung_necro_bone = 468086, + p6_setdung_necro_saint = 468094, + p6_setdung_necro_plague = 468095, + p6_church_level_02_boss = 470238, + mb313_pand = 478413, + mb313_church = 478433, + mb313_moors = 478434, + mb313_cave = 478435, + mb313_firerealm = 478437, + mb313_cage = 478438, + mb313_town = 478439, + p1_tgoblin_realm_ancient = 483057, + p1_tgoblin_realm_bossroom_ancient = 483086, + p73_swarmrift_bounty_grounds_caout = 486820, + p73_swarmrift_a5_bounty_grounds_neph = 486821, + p73_swarmrift_a5_bounty_grounds_leorics_garden = 486822, + p73_swarmrift_a4dun_heaven_1000_monsters_fight = 486823, + p73_swarmrift_trialrift_tileset = 486828, + p43_lr_tileset_interiorgrift_desert_gg = 486855, + p43_lr_tileset_interiorgrift_festeringwoodsdrlg_gg = 486856, + p43_lr_tileset_interiorgrift_pandext_gg = 486857, + p6_lr_tileset_interiorgrift_moors_gg = 486858, + px_lr_tileset_exterior_tristramfieldsdrlg_small_gg = 486859, + x1_lr_tileset_exterior_boneyards_gg = 486860, + x1_lr_tileset_exterior_graveyard_small_gg = 486861, + px_lr_tileset_exterior_tristramfieldsdrlg_small_gr = 487126, + x1_lr_tileset_exterior_graveyard_small_gr = 487223, + } + + static class WorldSnoExtensions + { + // all `x1_lr_tileset` worlds + private static readonly WorldSno[] dungeonWorlds = new WorldSno[] + { + WorldSno.x1_lr_tileset_cath, + WorldSno.x1_lr_tileset_corruptspire, + WorldSno.x1_lr_tileset_leorics, + WorldSno.x1_lr_tileset_rootcave, + WorldSno.x1_lr_tileset_wormcaves, + WorldSno.x1_lr_tileset_zoltarchives, + WorldSno.x1_lr_tileset_crypt, + WorldSno.x1_lr_tileset_floodedcave, + WorldSno.x1_lr_tileset_icecave, + WorldSno.x1_lr_tileset_zoltruins, + WorldSno.x1_lr_tileset_sewers, + WorldSno.x1_lr_tileset_keep_war, + WorldSno.x1_lr_tileset_keep_forge, + WorldSno.x1_lr_tileset_keep_river, + WorldSno.x1_lr_tileset_aqueducts, + WorldSno.x1_lr_tileset_spidercaves, + WorldSno.x1_lr_tileset_crater, + WorldSno.x1_lr_tileset_cath_large, + WorldSno.x1_lr_tileset_cath_small, + WorldSno.x1_lr_tileset_leorics_small, + WorldSno.x1_lr_tileset_crypt_small, + WorldSno.x1_lr_tileset_zoltarchives_small, + WorldSno.x1_lr_tileset_cath_extralarge, + WorldSno.x1_lr_tileset_exterior_tristramfields, + WorldSno.x1_lr_tileset_westmarch, + WorldSno.x1_lr_tileset_abattoir, + WorldSno.x1_lr_tileset_bogcave, + WorldSno.x1_lr_tileset_fortress, + WorldSno.x1_lr_tileset_catacombs, + WorldSno.x1_lr_tileset_hexmaze, + WorldSno.x1_lr_tileset_exterior_bog, + WorldSno.x1_lr_tileset_aqueducts_small, + WorldSno.x1_lr_tileset_aqueducts_large, + WorldSno.x1_lr_tileset_corruptspire_large, + WorldSno.x1_lr_tileset_crypt_large, + WorldSno.x1_lr_tileset_crater_small, + WorldSno.x1_lr_tileset_floodedcave_large, + WorldSno.x1_lr_tileset_icecave_large, + WorldSno.x1_lr_tileset_keep_forge_large, + WorldSno.x1_lr_tileset_keep_river_large, + WorldSno.x1_lr_tileset_keep_war_large, + WorldSno.x1_lr_tileset_leorics_large, + WorldSno.x1_lr_tileset_rootcave_large, + WorldSno.x1_lr_tileset_sewers_large, + WorldSno.x1_lr_tileset_spidercaves_large, + WorldSno.x1_lr_tileset_wormcaves_large, + WorldSno.x1_lr_tileset_zoltarchives_large, + WorldSno.x1_lr_tileset_zoltruins_large, + WorldSno.x1_lr_tileset_corruptspire_small, + WorldSno.x1_lr_tileset_floodedcave_small, + WorldSno.x1_lr_tileset_icecave_small, + WorldSno.x1_lr_tileset_keep_forge_small, + WorldSno.x1_lr_tileset_keep_river_small, + WorldSno.x1_lr_tileset_keep_war_small, + WorldSno.x1_lr_tileset_rootcave_small, + WorldSno.x1_lr_tileset_sewers_small, + WorldSno.x1_lr_tileset_spidercaves_small, + WorldSno.x1_lr_tileset_wormcaves_small, + WorldSno.x1_lr_tileset_zoltruins_small, + WorldSno.x1_lr_tileset_pony, + WorldSno.x1_lr_tileset_pony_large, + WorldSno.x1_lr_tileset_pony_small, + WorldSno.x1_lr_tileset_exterior_wilderness, + WorldSno.x1_lr_tileset_exterior_highlands, + WorldSno.x1_lr_tileset_exterior_gardensofhope1, + WorldSno.x1_lr_tileset_exterior_gardensofhope2, + WorldSno.x1_lr_tileset_exterior_gardensofhope3, + WorldSno.x1_lr_tileset_exterior_graveyard, + WorldSno.x1_lr_tileset_exterior_pandext, + WorldSno.x1_lr_tileset_breakup_wortham, + WorldSno.x1_lr_tileset_exterior_boneyards, + WorldSno.x1_lr_tileset_cratertowers1_small, + WorldSno.x1_lr_tileset_cratertowers2_small, + WorldSno.x1_lr_tileset_cratertowers3_small, + WorldSno.x1_lr_tileset_cratertowers4_small, + WorldSno.x1_lr_tileset_cratertowers5_small, + WorldSno.x1_lr_tileset_cratertowers6_small, + WorldSno.x1_lr_tileset_cratertowers7_small, + WorldSno.x1_lr_tileset_exterior_ramparts1, + WorldSno.x1_lr_tileset_exterior_ramparts2, + WorldSno.x1_lr_tileset_exterior_ramparts3, + WorldSno.x1_lr_tileset_exterior_rampartsdamaged1, + WorldSno.x1_lr_tileset_exterior_rampartsdamaged2, + WorldSno.x1_lr_tileset_exterior_rampartsdamaged3, + WorldSno.x1_lr_tileset_hexmaze_large, + WorldSno.x1_lr_tileset_hexmaze_small, + WorldSno.x1_lr_tileset_catacombs_large, + WorldSno.x1_lr_tileset_catacombs_small, + WorldSno.x1_lr_tileset_bogcave_large, + WorldSno.x1_lr_tileset_bogcave_small, + WorldSno.x1_lr_tileset_fortress_small, + WorldSno.x1_lr_tileset_fortress_large, + WorldSno.x1_lr_tileset_abattoir_large, + WorldSno.x1_lr_tileset_abattoir_small, + WorldSno.x1_lr_tileset_westmarch_small, + WorldSno.x1_lr_tileset_westmarch_large, + WorldSno.x1_lr_tileset_westmarchfire, + WorldSno.x1_lr_tileset_westmarchfire_small, + WorldSno.x1_lr_tileset_westmarchfire_large, + WorldSno.x1_lr_tileset_fortressislands, + WorldSno.x1_lr_tileset_fortressislands_small, + WorldSno.x1_lr_tileset_hellportala_small, + WorldSno.x1_lr_tileset_hellportalb_small, + WorldSno.x1_lr_tileset_exterior_graveyard_small, + WorldSno.x1_lr_tileset_exterior_bog_small, + WorldSno.x1_lr_tileset_exterior_pandext_small, + WorldSno.x1_lr_tileset_exterior_pandext_large, + WorldSno.x1_lr_tileset_exterior_graveyard_large, + WorldSno.x1_lr_tileset_exterior_bog_large, + WorldSno.x1_lr_tileset_exterior_boneyards_large, + WorldSno.x1_lr_tileset_event_crypt_udderchaos, + WorldSno.x1_lr_tileset_crypt_small_udderchaos, + WorldSno.x1_lr_tileset_monster_prototypes, + WorldSno.x1_lr_tileset_exterior_boneyards_gg, + WorldSno.x1_lr_tileset_exterior_graveyard_small_gg, + WorldSno.x1_lr_tileset_exterior_graveyard_small_gr, + }; + + + // `x1_lr` worlds `dungeonWorlds` + private static readonly WorldSno[] generatedNotDungeonsWorlds = new WorldSno[] + { + WorldSno.x1_lr_hubworld, + WorldSno.x1_lr_level_01, + WorldSno.x1_lr_level_02, + WorldSno.x1_lr_level_03, + WorldSno.x1_lr_level_04, + WorldSno.x1_lr_level_05, + WorldSno.x1_lr_level_06, + WorldSno.x1_lr_level_07, + WorldSno.x1_lr_level_08, + WorldSno.x1_lr_level_09, + WorldSno.x1_lr_level_10, + }; + + // `zolt` worlds + private static readonly WorldSno[] zoltWorlds = new WorldSno[] + { + WorldSno.a2c2dun_zolt_treasurehunter, + WorldSno.a2dun_zolt_sw_random01, + WorldSno.a2dun_zolt_timed01_level01, + WorldSno.a2dun_zolt_level01, + WorldSno.a2dun_zolt_level02, + WorldSno.a2dun_zolt_level03, + WorldSno.a2dun_zolt_lobby, + WorldSno.a2dun_zolt_bossfight_level04, + WorldSno.a2dun_zolt_head_random01, + WorldSno.a2dun_zolt_shadowrealm_level01, + WorldSno.a2dun_zolt_blood02, + WorldSno.a2dun_zolt_timed01_level02, + WorldSno.a2dun_zolt_random_portalroulette_02, + WorldSno.a2dun_zolt_sw_random01_level02, + WorldSno.x1_lr_tileset_zoltarchives, + WorldSno.x1_lr_tileset_zoltruins, + WorldSno.x1_lr_tileset_zoltarchives_small, + WorldSno.x1_lr_tileset_zoltarchives_large, + WorldSno.x1_lr_tileset_zoltruins_large, + WorldSno.x1_lr_tileset_zoltruins_small, + WorldSno.p4_bounty_grounds_zolt, + WorldSno.p4_a5_bounty_grounds_zolt, + WorldSno.pvp_zolt_ruins_arena, + WorldSno.pvp_zolt_small_arena, + }; + + // `uber` worlds + private static readonly WorldSno[] uberWorlds = new WorldSno[] + { + WorldSno.uber_bossworld1, + WorldSno.uber_bossworld2, + WorldSno.uber_bossworld3, + WorldSno.uber_portalworld, + WorldSno.a4dun_uber_diablo_shadowrealm_01, + }; + + // excluded from generation worlds + private static readonly WorldSno[] notDynamicWorlds = new WorldSno[] { + WorldSno.a1trdun_cave_old_ruins_random01, + WorldSno.a1trdun_cave_qa_well, + WorldSno.a1trdun_level05_templar, + WorldSno.a2dun_zolt_head_random01, + WorldSno.a2c1dun_swr_caldeum_01, + WorldSno.a2dun_cave_bloodvial_02, + WorldSno.a3dun_ruins_frost_city_a_02, + WorldSno.a3dun_crater_level_01, + WorldSno.a3dun_crater_level_02, + WorldSno.a3dun_crater_st_level01b, + WorldSno.a3dun_crater_st_level02b, + WorldSno.a3dun_crater_st_level04, + WorldSno.a3dun_crater_st_level04b, + WorldSno.a3dun_ruins_frost_city_a_01, + WorldSno.a4dun_hell_portal_01, + WorldSno.a4dun_hell_portal_02, + WorldSno.a4dun_garden_of_hope_random, + WorldSno.p4_forest_snow_icecave_01, + WorldSno.p4_forest_snow_01, + WorldSno.a3dun_crater_st_level01, + WorldSno.a3dun_crater_st_level02, + WorldSno.trdun_leoric_level02, + WorldSno.trdun_leoric_level03, + // all `Crater` worlds + WorldSno.a3dun_crater_st_level01, + WorldSno.a3dun_crater_st_level02, + WorldSno.a3dun_crater_level_01, + WorldSno.a3dun_crater_level_02, + WorldSno.a3dun_crater_st_level04, + WorldSno.a3dun_crater_level_03, + WorldSno.a3dun_crater_st_level01b, + WorldSno.a3dun_crater_st_level04b, + WorldSno.a3dun_crater_st_level02b, + WorldSno.pvp_craterst_arena, + WorldSno.x1_lr_tileset_crater, + WorldSno.x1_lr_tileset_crater_small, + WorldSno.x1_lr_tileset_cratertowers1_small, + WorldSno.x1_lr_tileset_cratertowers2_small, + WorldSno.x1_lr_tileset_cratertowers3_small, + WorldSno.x1_lr_tileset_cratertowers4_small, + WorldSno.x1_lr_tileset_cratertowers5_small, + WorldSno.x1_lr_tileset_cratertowers6_small, + WorldSno.x1_lr_tileset_cratertowers7_small, + // all `Hell_Portal` worlds + WorldSno.a4dun_hell_portal_01, + WorldSno.a4dun_hell_portal_02, + }; + + public static bool IsDungeon(this WorldSno worldSno) + { + return dungeonWorlds.Contains(worldSno); + } + + public static bool IsGenerated(this WorldSno worldSno) + { + return worldSno.IsDungeon() || generatedNotDungeonsWorlds.Contains(worldSno); + } + + public static bool IsUberWorld(this WorldSno worldSno) + { + return uberWorlds.Contains(worldSno); + } + + public static bool IsUsingZoltCustomGrid(this WorldSno worldSno) + { + return zoltWorlds.Contains(worldSno); + } + + public static bool IsNotDynamicWorld(this WorldSno worldSno) + { + return notDynamicWorlds.Contains(worldSno); + } + } +} diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Actor.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Actor.cs index 7c2c343..cd4bd71 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Actor.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Actor.cs @@ -1,5 +1,6 @@ //Blizzless Project 2022 using DiIiS_NA.Core.Logging; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; //Blizzless Project 2022 using DiIiS_NA.GameServer.Core.Types.Math; //Blizzless Project 2022 @@ -849,25 +850,24 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem lock (player.RevealedObjects) { if (this.Hidden || this.Dead || !this.Visible || this.World == null) return false; - + + var mysticHiddenWorlds = new WorldSno[] { + WorldSno.trdun_crypt_falsepassage_01, + WorldSno.trdun_crypt_falsepassage_02, + WorldSno.trdun_crypt_fields_flooded_memories_level01, + WorldSno.trdun_crypt_fields_flooded_memories_level02, + WorldSno.trdun_crypt_skeletonkingcrown_00, + WorldSno.trdun_crypt_skeletonkingcrown_01, + WorldSno.trdun_crypt_skeletonkingcrown_02, + }; //Leave Miriam in Crypt - if (this.ActorSNO.Id == 175310) - if (this.World.WorldSNO.Id == 72636 || - this.World.WorldSNO.Id == 72637 || - this.World.WorldSNO.Id == 102299 || - this.World.WorldSNO.Id == 165797 || - this.World.WorldSNO.Id == 154587 || - this.World.WorldSNO.Id == 60600 || - this.World.WorldSNO.Id == 92126 - ) - return false; + if (this.ActorSNO.Id == 175310 && mysticHiddenWorlds.Contains(World.SNO)) return false; //Destroy Bonewall and Jondar if Exit_S on Second Level of Cathedral - if (World.WorldSNO.Id == 50582 && this.ActorSNO.Id == 109209) return false; - if (World.WorldSNO.Id == 50582 && this.ActorSNO.Id == 86624) return false; + if (World.SNO == WorldSno.a1trdun_level04 && (this.ActorSNO.Id == 109209 || this.ActorSNO.Id == 86624)) return false; - if (this.ActorSNO.Name.Contains("Uber") && !this.World.WorldSNO.Name.Contains("Uber")) return false; + if (this.ActorSNO.Name.Contains("Uber") && !this.World.SNO.IsUberWorld()) return false; if (this.ActorSNO.Name.Contains("AdventureMode") && this.World.Game.CurrentAct != 3000) return false; if (this.ActorSNO.Name.Contains("ScriptedSequenceOnly")) return false; @@ -876,7 +876,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem if (player.World == null) return false; if (this.ActorSNO.Id == 218339) - if (this.World.WorldSNO.Id == 71150) + if (this.World.SNO == WorldSno.trout_town) if (this.CurrentScene.SceneSNO.Id == 33348) if (this.Position.X < 2896) return false; @@ -884,7 +884,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem if (!(this is Item) && player.World.GlobalID != this.World.GlobalID) return false; - if (!(this is Item) && this.GetScenesInRange().Count() > 0 && !this.GetScenesInRange().OrderBy(scene => PowerMath.Distance2D(scene.Position, this.Position)).First().IsRevealedToPlayer(player)) return false; + if (!(this is Item) && this.GetScenesInRange().Count > 0 && !this.GetScenesInRange().OrderBy(scene => PowerMath.Distance2D(scene.Position, this.Position)).First().IsRevealedToPlayer(player)) return false; uint objId = player.NewDynamicID(this.GlobalID, (this is Player && (!(this as Player).IsInPvPWorld || this == player)) ? (int)(this as Player).PlayerIndex : -1); @@ -974,7 +974,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #region Особенные случаи //Задаём идл для зомбей в тристраме - ЖРАТ - if (this.World.WorldSNO.Id == 71150) + if (this.World.SNO == WorldSno.trout_town) { if (this.Tags != null) if (this.Tags.ContainsKey(MarkerKeys.Group1Hash)) @@ -982,7 +982,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem this.PlayActionAnimation(11514); } //Задаём идл для работяг - else if (this.World.WorldSNO.Id == 109362 & this.ActorSNO.Id == 84529) + else if (this.World.SNO == WorldSno.trout_tristram_inn & this.ActorSNO.Id == 84529) this.PlayActionAnimation(102329); else if (this.ActorSNO.Id == 4580) player.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Inventory.VisualInventoryMessage() diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/BossPortal.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/BossPortal.cs index 32f2c17..eaf8af2 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/BossPortal.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/BossPortal.cs @@ -52,7 +52,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem this.Attributes[GameAttribute.MinimapActive] = true; this.Attributes[GameAttribute.Untargetable] = false; - switch (((this.ActorSNO.Target as DiIiS_NA.Core.MPQ.FileFormats.Actor).TagMap[MarkerKeys.BossEncounter].Target as DiIiS_NA.Core.MPQ.FileFormats.BossEncounter).Worlds[0]) + var bossEncounter = ((this.ActorSNO.Target as DiIiS_NA.Core.MPQ.FileFormats.Actor).TagMap[MarkerKeys.BossEncounter].Target as DiIiS_NA.Core.MPQ.FileFormats.BossEncounter); + DestWorld = bossEncounter.Worlds[0]; + switch (DestWorld) { case 60713: DestArea = 60714; break; @@ -99,8 +101,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem } - DestWorld = ((this.ActorSNO.Target as DiIiS_NA.Core.MPQ.FileFormats.Actor).TagMap[MarkerKeys.BossEncounter].Target as DiIiS_NA.Core.MPQ.FileFormats.BossEncounter).Worlds[0]; - DestPoint = ((this.ActorSNO.Target as DiIiS_NA.Core.MPQ.FileFormats.Actor).TagMap[MarkerKeys.BossEncounter].Target as DiIiS_NA.Core.MPQ.FileFormats.BossEncounter).I11; + DestPoint = bossEncounter.I11; //get EncounterSNO switch (this.ActorSNO.Id) { @@ -178,8 +179,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem break; } - this.Destination = new DiIiS_NA.GameServer.MessageSystem.Message.Fields.ResolvedPortalDestination - { + this.Destination = new ResolvedPortalDestination + { WorldSNO = DestWorld, DestLevelAreaSNO = DestArea, StartingPointActorTag = DestPoint diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Boss.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Boss.cs index e094952..7bc4a95 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Boss.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Boss.cs @@ -1,4 +1,5 @@ //Blizzless Project 2022 +using DiIiS_NA.D3_GameServer.Core.Types.SNO; using DiIiS_NA.GameServer.Core.Types.TagMap; //Blizzless Project 2022 using DiIiS_NA.GameServer.GSSystem.AISystem.Brains; @@ -76,7 +77,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations public Boss(MapSystem.World world, int snoId, TagMap tags) : base(world, snoId, tags) { - if (snoId == 80509 && world.WorldSNO.Id == 50613) this.SetVisible(false); + if (snoId == 80509 && world.SNO == WorldSno.a2dun_zolt_lobby) this.SetVisible(false); this.Attributes[GameAttribute.MinimapActive] = true; //this.Attributes[GameAttribute.Immune_To_Charm] = true; this.Attributes[GameAttribute.//Blizzless Project 2022 diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Door.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Door.cs index 923e63f..f7fe0a3 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Door.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Door.cs @@ -1,4 +1,5 @@ //Blizzless Project 2022 +using DiIiS_NA.D3_GameServer.Core.Types.SNO; using DiIiS_NA.GameServer.Core.Types.TagMap; //Blizzless Project 2022 using DiIiS_NA.GameServer.GSSystem.MapSystem; @@ -49,8 +50,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations public override bool Reveal(Player player) { if (this.ActorSNO.Id == 167185) return false; - if (this.ActorSNO.Id == 207615 && this.World.WorldSNO.Id != 158593) return false; //dakab door - if (this.ActorSNO.Id == 153836 && this.World.WorldSNO.Id == 158593) return false; //not dakab door + if (this.ActorSNO.Id == 207615 && this.World.SNO != WorldSno.a2dun_aqd_oasis_randomfacepuzzle_large) return false; //dakab door + if (this.ActorSNO.Id == 153836 && this.World.SNO == WorldSno.a2dun_aqd_oasis_randomfacepuzzle_large) return false; //not dakab door if (this.ActorSNO.Id == 220337) //Treasure Room door this.isOpened = true; diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/DungeonStonePortal.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/DungeonStonePortal.cs index 8072179..87e5857 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/DungeonStonePortal.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/DungeonStonePortal.cs @@ -18,6 +18,7 @@ using DiIiS_NA.GameServer.MessageSystem; using DiIiS_NA.Core.Logging; //Blizzless Project 2022 using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Portal; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations { @@ -36,12 +37,12 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations //this.Field2 = 0x9;//16; this.Attributes[GameAttribute.MinimapActive] = true; //this.Attributes[GameAttribute.MinimapIconOverride] = 218394; - if (this.World.WorldSNO.Name.ToLower().Contains("x1_lr_tileset")) + if (this.World.SNO.IsDungeon()) { this.Destination = new ResolvedPortalDestination() { DestLevelAreaSNO = 332339, - WorldSNO = 332336, + WorldSNO = (int)WorldSno.x1_tristram_adventure_mode_hub, StartingPointActorTag = 24 }; } @@ -52,10 +53,10 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations if (!base.Reveal(player)) return false; - if (World.WorldSNO.Id == 92126) + if (World.SNO == WorldSno.trdun_crypt_skeletonkingcrown_02) { Portal Exit = null; - foreach (Actor actor in World.Game.GetWorld(154587).GetStartingPointById(172).GetActorsInRange(120f)) + foreach (Actor actor in World.Game.GetWorld(WorldSno.trdun_crypt_skeletonkingcrown_00).GetStartingPointById(172).GetActorsInRange(120f)) if (actor is Portal) Exit = actor as Portal; if (Exit != null) @@ -77,7 +78,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations if (this.Destination.StartingPointActorTag != 0) { StartingPoint NeededStartingPoint = world.GetStartingPointById(this.Destination.StartingPointActorTag); - var DestWorld = world.Game.GetWorld(this.Destination.WorldSNO); + var DestWorld = world.Game.GetWorld((WorldSno)this.Destination.WorldSNO); var StartingPoints = DestWorld.GetActorsBySNO(5502); foreach (var ST in StartingPoints) { @@ -96,14 +97,14 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations { Logger.Debug("(OnTargeted) Portal has been activated "); - if (this.World.WorldSNO.Name.ToLower().Contains("x1_lr_tileset")) + if (this.World.SNO.IsDungeon()) { this.Destination.DestLevelAreaSNO = 332339; - this.Destination.WorldSNO = 332336; + this.Destination.WorldSNO = (int)WorldSno.x1_tristram_adventure_mode_hub; this.Destination.StartingPointActorTag = 24; } - var world = this.World.Game.GetWorld(this.Destination.WorldSNO); + var world = this.World.Game.GetWorld((WorldSno)this.Destination.WorldSNO); if (world == null) { diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Goblin.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Goblin.cs index c70edcd..3fab6a6 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Goblin.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Goblin.cs @@ -1,4 +1,5 @@ //Blizzless Project 2022 +using DiIiS_NA.D3_GameServer.Core.Types.SNO; using DiIiS_NA.GameServer.Core.Types.TagMap; //Blizzless Project 2022 using DiIiS_NA.GameServer.GSSystem.AISystem.Brains; @@ -44,7 +45,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations public override bool Reveal(Player player) { - if (this.World.WorldSNO.Id == 180550 || this.World.WorldSNO.Id == 107050) + if (this.World.SNO == WorldSno.a1dun_spidercave_01 || this.World.SNO == WorldSno.trout_oldtistram_cellar_3) { this.Destroy(); return false; diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/HearthPortal.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/HearthPortal.cs index 98ee535..5316a35 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/HearthPortal.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/HearthPortal.cs @@ -1,4 +1,5 @@ //Blizzless Project 2022 +using DiIiS_NA.D3_GameServer.Core.Types.SNO; using DiIiS_NA.GameServer.Core.Types.Math; //Blizzless Project 2022 using DiIiS_NA.GameServer.Core.Types.TagMap; @@ -25,7 +26,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations { class HearthPortal : Gizmo { - public int ReturnWorld = -1; + public WorldSno ReturnWorld = WorldSno.__NONE; public Vector3D ReturnPosition = null; @@ -50,7 +51,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations return; } - if (this.World.Game.QuestManager.SideQuests.ContainsKey(120396) && this.World.Game.QuestManager.SideQuests[120396].Completed && this.ReturnWorld == 50596) return; + if (this.World.Game.QuestManager.SideQuests.ContainsKey(120396) && this.World.Game.QuestManager.SideQuests[120396].Completed && this.ReturnWorld == WorldSno.a2dun_zolt_timed01_level01) return; Vector3D exCheckpoint = player.CheckPointPosition; diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/LootContainer.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/LootContainer.cs index b07c869..be1d40d 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/LootContainer.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/LootContainer.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Linq; //Blizzless Project 2022 using DiIiS_NA.Core.Helpers.Math; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; //Blizzless Project 2022 using DiIiS_NA.GameServer.Core.Types.TagMap; //Blizzless Project 2022 @@ -58,8 +59,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations public override bool Reveal(PlayerSystem.Player player) { - if (this.ActorSNO.Id == 190524 && this.World.WorldSNO.Id != 158593) return false; //dakab chest - if (this.ActorSNO.Id == 190708 && this.World.WorldSNO.Id == 158593) return false; //not dakab chest + if (this.ActorSNO.Id == 190524 && this.World.SNO != WorldSno.a2dun_aqd_oasis_randomfacepuzzle_large) return false; //dakab chest + if (this.ActorSNO.Id == 190708 && this.World.SNO == WorldSno.a2dun_aqd_oasis_randomfacepuzzle_large) return false; //not dakab chest if (!rewardChestAvailable) return false; //event reward chest @@ -142,9 +143,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations } } - if (GeneratorsSystem.LoreRegistry.Lore.ContainsKey(this.World.WorldSNO.Id) && GeneratorsSystem.LoreRegistry.Lore[this.World.WorldSNO.Id].chests_lore.ContainsKey(this.ActorSNO.Id)) + if (GeneratorsSystem.LoreRegistry.Lore.ContainsKey(this.World.SNO) && GeneratorsSystem.LoreRegistry.Lore[this.World.SNO].chests_lore.ContainsKey(this.ActorSNO.Id)) foreach (var p in this.GetPlayersInRange(30)) - foreach (int loreId in GeneratorsSystem.LoreRegistry.Lore[this.World.WorldSNO.Id].chests_lore[this.ActorSNO.Id]) + foreach (int loreId in GeneratorsSystem.LoreRegistry.Lore[this.World.SNO].chests_lore[this.ActorSNO.Id]) if (!p.HasLore(loreId)) { World.DropItem(this, null, ItemGenerator.CreateLore(p, loreId)); @@ -192,7 +193,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations if (this.ActorSNO.Id == 2975) { - if (this.World.WorldSNO.Id == 50610) + if (this.World.SNO == WorldSno.a2dun_zolt_level01) foreach (var plr in this.World.Game.Players.Values) plr.InGameClient.SendMessage(new QuestCounterMessage() { diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/LootRunPortal.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/LootRunPortal.cs index e7b8cc7..ea1e7aa 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/LootRunPortal.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/LootRunPortal.cs @@ -8,6 +8,7 @@ using System.Linq; using DiIiS_NA.Core.Helpers.Math; //Blizzless Project 2022 using DiIiS_NA.Core.Logging; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; //Blizzless Project 2022 using DiIiS_NA.GameServer.Core.Types.TagMap; //Blizzless Project 2022 @@ -42,7 +43,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations { this.Destination = new ResolvedPortalDestination { - WorldSNO = 338944, + WorldSNO = (int)WorldSno.x1_westm_graveyard_deathorb, DestLevelAreaSNO = 338946, StartingPointActorTag = 171 }; @@ -80,7 +81,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations { Logger.Debug("(OnTargeted) Portal has been activated, Id: {0}, LevelArea: {1}, World: {2}", this.ActorSNO.Id, this.Destination.DestLevelAreaSNO, this.Destination.WorldSNO); - var world = this.World.Game.GetWorld(this.Destination.WorldSNO); + var world = this.World.Game.GetWorld((WorldSno)this.Destination.WorldSNO); if (world == null) { diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/NPC/Humans.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/NPC/Humans.cs index ee98b8a..07ecec9 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/NPC/Humans.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/NPC/Humans.cs @@ -1,4 +1,5 @@ //Blizzless Project 2022 +using DiIiS_NA.D3_GameServer.Core.Types.SNO; using DiIiS_NA.GameServer.Core.Types.TagMap; //Blizzless Project 2022 using DiIiS_NA.GameServer.GSSystem.MapSystem; @@ -42,7 +43,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations { _collapsed = true; - if (this.World.WorldSNO.Id == 306549) + if (this.World.SNO == WorldSno.x1_westm_intro) switch (this.ActorSNO.Id) { case 308474: diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/NPC/LorathNahr_NPC.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/NPC/LorathNahr_NPC.cs index 0e319d4..2337807 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/NPC/LorathNahr_NPC.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/NPC/LorathNahr_NPC.cs @@ -2,6 +2,7 @@ using DiIiS_NA.Core.MPQ; //Blizzless Project 2022 using DiIiS_NA.Core.MPQ.FileFormats; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; //Blizzless Project 2022 using DiIiS_NA.GameServer.Core.Types.SNO; //Blizzless Project 2022 @@ -37,7 +38,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max_Total]; this.Attributes[GameAttribute.Invulnerable] = true; this.Attributes[GameAttribute.Attacks_Per_Second] = 1.0f; - if (world.WorldSNO.Id == 308705) + if (world.SNO == WorldSno.x1_westmarch_overlook_d) { this.Attributes[GameAttribute.Damage_Weapon_Min, 0] = 0f; this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 0f; diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Readable.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Readable.cs index 3eec1c2..d7c3ee1 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Readable.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Readable.cs @@ -41,9 +41,9 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations if (ActorData.TagMap.ContainsKey(ActorKeys.Lore)) Logger.Debug("Lore detected: {0}", ActorData.TagMap[ActorKeys.Lore].Id); - if (LoreRegistry.Lore.ContainsKey(this.World.WorldSNO.Id) && LoreRegistry.Lore[this.World.WorldSNO.Id].chests_lore.ContainsKey(this.ActorSNO.Id)) + if (LoreRegistry.Lore.ContainsKey(this.World.SNO) && LoreRegistry.Lore[this.World.SNO].chests_lore.ContainsKey(this.ActorSNO.Id)) foreach (var p in this.GetPlayersInRange(30)) - foreach (int loreId in LoreRegistry.Lore[this.World.WorldSNO.Id].chests_lore[this.ActorSNO.Id]) + foreach (int loreId in LoreRegistry.Lore[this.World.SNO].chests_lore[this.ActorSNO.Id]) if (!p.HasLore(loreId)) { World.DropItem(this, null, ItemGenerator.CreateLore(p, loreId)); diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Savepoint.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Savepoint.cs index 533395d..c2c5ddf 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Savepoint.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Savepoint.cs @@ -43,7 +43,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations snoLevelArea = SNOLevelArea,//102362, }); - player.SavePointData = new SavePointData() { snoWorld = World.WorldSNO.Id, SavepointId = SavepointId }; + player.SavePointData = new SavePointData() { snoWorld = (int)World.SNO, SavepointId = SavepointId }; player.UpdateHeroState(); player.CheckPointPosition = this._position; // This seemed easier than having on Death find the SavePoint based on ID, then getting its location. - DarkLotus } diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/ScriptObjects/ActVBarricade.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/ScriptObjects/ActVBarricade.cs index 8c5a822..c77ff9d 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/ScriptObjects/ActVBarricade.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/ScriptObjects/ActVBarricade.cs @@ -1,4 +1,5 @@ //Blizzless Project 2022 +using DiIiS_NA.D3_GameServer.Core.Types.SNO; using DiIiS_NA.GameServer.Core.Types.TagMap; //Blizzless Project 2022 using DiIiS_NA.GameServer.GSSystem.MapSystem; @@ -27,7 +28,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.ScriptObjects public override bool Reveal(Player player) { - if (this.World.WorldSNO.Id == 304235) return false; + if (this.World.SNO == WorldSno.x1_westmarch_hub) return false; return base.Reveal(player); } } diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/ScriptObjects/X1_Westm_Door_Giant_Event.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/ScriptObjects/X1_Westm_Door_Giant_Event.cs index 0bb9a7d..32ec9b5 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/ScriptObjects/X1_Westm_Door_Giant_Event.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/ScriptObjects/X1_Westm_Door_Giant_Event.cs @@ -1,4 +1,5 @@ //Blizzless Project 2022 +using DiIiS_NA.D3_GameServer.Core.Types.SNO; using DiIiS_NA.GameServer.Core.Types.TagMap; //Blizzless Project 2022 using DiIiS_NA.GameServer.GSSystem.MapSystem; @@ -45,7 +46,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.ScriptObjects public override bool Reveal(Player player) { - if (this.World.WorldSNO.Id == 306549) + if (this.World.SNO == WorldSno.x1_westm_intro) { World.BroadcastIfRevealed(plr => new SetIdleAnimationMessage { diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Spawners/KingGhost_Spawner.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Spawners/KingGhost_Spawner.cs index a4e503b..85460ae 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Spawners/KingGhost_Spawner.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Spawners/KingGhost_Spawner.cs @@ -1,4 +1,5 @@ //Blizzless Project 2022 +using DiIiS_NA.D3_GameServer.Core.Types.SNO; using DiIiS_NA.GameServer.Core.Types.TagMap; //Blizzless Project 2022 using DiIiS_NA.GameServer.GSSystem.MapSystem; @@ -30,7 +31,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Spawners public override void OnPlayerApproaching(Player player) { if (player.Position.DistanceSquared(ref _position) < ActorData.Sphere.Radius * ActorData.Sphere.Radius * 1.5 * this.Scale * this.Scale && !_collapsed) - if (this.World.WorldSNO.Id == 50585) + if (this.World.SNO == WorldSno.a1trdun_level07) { _collapsed = true; diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Waypoint.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Waypoint.cs index bb99a07..7f9b103 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Waypoint.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Implementations/Waypoint.cs @@ -94,7 +94,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations if (scene.Specification == null) continue; foreach (var area in scene.Specification.SNOLevelAreas) { - if (wayPointInfo[i].SNOWorld != this.World.WorldSNO.Id || wayPointInfo[i].SNOLevelArea != area) + if (wayPointInfo[i].SNOWorld != (int)this.World.SNO || wayPointInfo[i].SNOLevelArea != area) continue; this.SNOLevelArea = wayPointInfo[i].SNOLevelArea; diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/InteractiveNPC.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/InteractiveNPC.cs index 56222fa..964d696 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/InteractiveNPC.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/InteractiveNPC.cs @@ -46,6 +46,7 @@ using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Hireling; using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Artisan; //Blizzless Project 2022 using DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.ActorSystem { @@ -100,7 +101,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem public override bool Reveal(Player player) { if (this.ActorSNO.Id == 81609) return false; - if (this.ActorSNO.Id == 114622 && this.World.WorldSNO.Id == 71150 && this.World.Game.CurrentAct != 3000) return false; + if (this.ActorSNO.Id == 114622 && this.World.SNO == WorldSno.trout_town && this.World.Game.CurrentAct != 3000) return false; return base.Reveal(player); } diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Monster.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Monster.cs index c8e9eca..babc455 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Monster.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Monster.cs @@ -31,6 +31,7 @@ using DiIiS_NA.GameServer.GSSystem.AISystem.Brains; using DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations; //Blizzless Project 2022 using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.ACD; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.ActorSystem { @@ -195,14 +196,15 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem return; this.Brain.Update(tickCounter); - if (this.World.WorldSNO.Id == 109561) + if (this.World.SNO == WorldSno.a4dun_diablo_arena) if (this.ActorSNO.Id == 114917) if (this.Attributes[GameAttribute.Hitpoints_Cur] < (this.Attributes[GameAttribute.Hitpoints_Max_Total] / 2)) { this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max_Total]; this.World.Game.QuestManager.Advance();//advancing United Evil quest + var nextWorld = this.World.Game.GetWorld(WorldSno.a4dun_diablo_shadowrealm_01); foreach (var plr in this.World.Players.Values) - plr.ChangeWorld(this.World.Game.GetWorld(153670), this.World.Game.GetWorld(153670).GetStartingPointById(172).Position); + plr.ChangeWorld(nextWorld, nextWorld.GetStartingPointById(172).Position); } if (this is Boss) diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Portal.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Portal.cs index a748439..ac48716 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Portal.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/ActorSystem/Portal.cs @@ -4,6 +4,7 @@ using DiIiS_NA.Core.Helpers.Hash; using DiIiS_NA.Core.Helpers.Math; //Blizzless Project 2022 using DiIiS_NA.Core.Logging; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; //Blizzless Project 2022 using DiIiS_NA.GameServer.Core.Types.Math; //Blizzless Project 2022 @@ -94,86 +95,86 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem Logger.Trace("Portal {0} has incomplete definition", this.ActorSNO.Id); } - if (this.World.WorldSNO.Id == 72636 || this.World.WorldSNO.Id == 72637) + if (this.World.SNO == WorldSno.trdun_crypt_falsepassage_01 || this.World.SNO == WorldSno.trdun_crypt_falsepassage_02) { this.Destination = SmartExitGenerate(); } - else if (this.World.WorldSNO.Id == 62751) //portal Adria's Hut + else if (this.World.SNO == WorldSno.trout_adriascellar) //portal Adria's Hut this.Destination = new ResolvedPortalDestination { - WorldSNO = 71150, + WorldSNO = (int)WorldSno.trout_town, DestLevelAreaSNO = 101351, StartingPointActorTag = 8 }; - else if (this.World.WorldSNO.Id == 339151) //portal Noble's Rest Courtyard + else if (this.World.SNO == WorldSno.x1_westm_deathorb_kerwinsrow) //portal Noble's Rest Courtyard this.Destination = new ResolvedPortalDestination { - WorldSNO = 338944, + WorldSNO = (int)WorldSno.x1_westm_graveyard_deathorb, DestLevelAreaSNO = 338946, StartingPointActorTag = 171 }; - else if(this.ActorSNO.Id == 175999 && this.World.WorldSNO.Id == 94676) //portal Leoric Jail -> 3rd lvl Halls of Agony + else if(this.ActorSNO.Id == 175999 && this.World.SNO == WorldSno.trdun_jail_level01) //portal Leoric Jail -> 3rd lvl Halls of Agony this.Destination = new ResolvedPortalDestination { - WorldSNO = 58983, + WorldSNO = (int)WorldSno.trdun_leoric_level03, DestLevelAreaSNO = 19776, StartingPointActorTag = 172 }; - else if(this.ActorSNO.Id == 176002 && this.World.WorldSNO.Id == 92126) //portal advisor's tomb -> 2nd lvl Crypt + else if(this.ActorSNO.Id == 176002 && this.World.SNO == WorldSno.trdun_crypt_skeletonkingcrown_02) //portal advisor's tomb -> 2nd lvl Crypt this.Destination = new ResolvedPortalDestination { - WorldSNO = 60600, + WorldSNO = (int)WorldSno.trdun_crypt_skeletonkingcrown_01, DestLevelAreaSNO = 60601, StartingPointActorTag = 171 }; - else if(this.World.WorldSNO.Id == 50657) //portal conclave -> Stinging winds + else if(this.World.SNO == WorldSno.caout_interior_d) //portal conclave -> Stinging winds this.Destination = new ResolvedPortalDestination { - WorldSNO = 70885, + WorldSNO = (int)WorldSno.caout_town, DestLevelAreaSNO = 19839, StartingPointActorTag = 201 }; - else if(this.World.WorldSNO.Id == 51270) //portal altar -> Stinging winds + else if(this.World.SNO == WorldSno.caout_interior_f) //portal altar -> Stinging winds this.Destination = new ResolvedPortalDestination { - WorldSNO = 70885, + WorldSNO = (int)WorldSno.caout_town, DestLevelAreaSNO = 19839, StartingPointActorTag = 194 }; - else if(this.World.WorldSNO.Id == 60432) //portal Khamsin HQ -> Stinging winds + else if(this.World.SNO == WorldSno.caout_khamsin_mine) //portal Khamsin HQ -> Stinging winds this.Destination = new ResolvedPortalDestination { - WorldSNO = 70885, + WorldSNO = (int)WorldSno.caout_town, DestLevelAreaSNO = 63666, StartingPointActorTag = 70 }; - else if(this.World.WorldSNO.Id == 59486 && this.Destination == null) //portal Khamsin HQ -> Stinging winds + else if(this.World.SNO == WorldSno.a2dun_aqd_special_01 && this.Destination == null) //portal Khamsin HQ -> Stinging winds this.Destination = new ResolvedPortalDestination { - WorldSNO = 59486, + WorldSNO = (int)WorldSno.a2dun_aqd_special_01, DestLevelAreaSNO = 62752, StartingPointActorTag = 86 }; - else if(this.World.WorldSNO.Id == 80589) //portal ZKShadow + else if(this.World.SNO == WorldSno.a2dun_zolt_shadowrealm_level01) //portal ZKShadow this.Destination = new ResolvedPortalDestination { - WorldSNO = 50613, + WorldSNO = (int)WorldSno.a2dun_zolt_lobby, DestLevelAreaSNO = 19800, StartingPointActorTag = 145 }; #region Спуск на второй уровень в подземелье на кладбище - else if (this.World.WorldSNO.Id == 154587 && this.ActorSNO.Id == 176002) //Crypt A1 Q3 + else if (this.World.SNO == WorldSno.trdun_crypt_skeletonkingcrown_00 && this.ActorSNO.Id == 176002) //Crypt A1 Q3 { var Portal = world.GetActorBySNO(176002); if (Portal == null) @@ -184,20 +185,20 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem { this.Destination = new ResolvedPortalDestination { - WorldSNO = 60600, + WorldSNO = (int)WorldSno.trdun_crypt_skeletonkingcrown_01, DestLevelAreaSNO = 60601, StartingPointActorTag = 15 }; } } - else if (this.World.WorldSNO.Id == 60600) + else if (this.World.SNO == WorldSno.trdun_crypt_skeletonkingcrown_01) { var Portal = world.GetActorBySNO(176002); if (Portal == null) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 154587, + WorldSNO = (int)WorldSno.trdun_crypt_skeletonkingcrown_00, DestLevelAreaSNO = 145182, StartingPointActorTag = 171 }; @@ -206,7 +207,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem { this.Destination = new ResolvedPortalDestination { - WorldSNO = 92126, + WorldSNO = (int)WorldSno.trdun_crypt_skeletonkingcrown_02, DestLevelAreaSNO = 102362, StartingPointActorTag = 172 }; @@ -217,14 +218,14 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #endregion #region 2 Этаж собора - if (world.WorldSNO.Id == 50582 && this.ActorSNO.Id == 176001) + if (world.SNO == WorldSno.a1trdun_level04 && this.ActorSNO.Id == 176001) { var Portal = world.GetActorBySNO(176001); if (Portal == null) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 105406, + WorldSNO = (int)WorldSno.a1trdun_level05_templar, DestLevelAreaSNO = 87907, StartingPointActorTag = 172 }; @@ -233,7 +234,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem { this.Destination = new ResolvedPortalDestination { - WorldSNO = 60713, + WorldSNO = (int)WorldSno.trdun_cain_intro, DestLevelAreaSNO = 60714, StartingPointActorTag = 15 //30 }; @@ -241,14 +242,14 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem } #endregion #region 3 Этаж собора - if (world.WorldSNO.Id == 105406 && this.ActorSNO.Id == 176001) + if (world.SNO == WorldSno.a1trdun_level05_templar && this.ActorSNO.Id == 176001) { var Portal = world.GetActorBySNO(176001); if (Portal == null) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 50582, + WorldSNO = (int)WorldSno.a1trdun_level04, DestLevelAreaSNO = 19783,//19785 - 4 уровень собора StartingPointActorTag = 171 }; @@ -257,7 +258,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem { this.Destination = new ResolvedPortalDestination { - WorldSNO = 50584, + WorldSNO = (int)WorldSno.a1trdun_level06, DestLevelAreaSNO = 19785, StartingPointActorTag = 172 }; @@ -266,20 +267,20 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem } #endregion #region 4 Этаж собора - if (world.WorldSNO.Id == 50584 && this.ActorSNO.Id == 176001) + if (world.SNO == WorldSno.a1trdun_level06 && this.ActorSNO.Id == 176001) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 105406, + WorldSNO = (int)WorldSno.a1trdun_level05_templar, DestLevelAreaSNO = 87907, StartingPointActorTag = 171 }; } - if (world.WorldSNO.Id == 50584 && this.ActorSNO.Id == 175467) + if (world.SNO == WorldSno.a1trdun_level06 && this.ActorSNO.Id == 175467) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 50585, + WorldSNO = (int)WorldSno.a1trdun_level07, DestLevelAreaSNO = 19787, StartingPointActorTag = 172 }; @@ -288,11 +289,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #region Первый этаж Агонии //Вход - else if (world.WorldSNO.Id == 2826 && this.ActorSNO.Id == 175999) + else if (world.SNO == WorldSno.trdun_leoric_level01 && this.ActorSNO.Id == 175999) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 75049, + WorldSNO = (int)WorldSno.a1dun_leor_manor, DestLevelAreaSNO = 100854, StartingPointActorTag = 171 }; @@ -308,11 +309,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem } } //Выход на 2 этаж - else if (world.WorldSNO.Id == 2826 && this.ActorSNO.Id == 175482) + else if (world.SNO == WorldSno.trdun_leoric_level01 && this.ActorSNO.Id == 175482) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 58982, + WorldSNO = (int)WorldSno.trdun_leoric_level02, DestLevelAreaSNO = 19775, StartingPointActorTag = 172,//tags[MarkerKeys.DestinationActorTag] }; @@ -330,11 +331,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #endregion #region Второй этаж Агонии //Вход - else if (world.WorldSNO.Id == 58982 && this.ActorSNO.Id == 175999) + else if (world.SNO == WorldSno.trdun_leoric_level02 && this.ActorSNO.Id == 175999) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 2826, + WorldSNO = (int)WorldSno.trdun_leoric_level01, DestLevelAreaSNO = 19774, StartingPointActorTag = 171 }; @@ -352,11 +353,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #endregion #region Переправа в высокогорье //Вход - else if (world.WorldSNO.Id == 87707 && this.ActorSNO.Id == 176001 && this.NumberInWorld == 1) + else if (world.SNO == WorldSno.trout_highlands_dunexteriora && this.ActorSNO.Id == 176001 && this.NumberInWorld == 1) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 58982, + WorldSNO = (int)WorldSno.trdun_leoric_level02, DestLevelAreaSNO = 19775, StartingPointActorTag = 171 }; @@ -374,11 +375,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #endregion #region Проклятая крепость //Выход на 3 этаж Агонии - else if (world.WorldSNO.Id == 94676 && this.ActorSNO.Id == 175999) + else if (world.SNO == WorldSno.trdun_jail_level01 && this.ActorSNO.Id == 175999) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 58983, + WorldSNO = (int)WorldSno.trdun_leoric_level03, DestLevelAreaSNO = 19776, StartingPointActorTag = 172 }; @@ -396,11 +397,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #endregion #region Третий этаж Агонии //Вход - else if (world.WorldSNO.Id == 58983 && this.ActorSNO.Id == 175999) + else if (world.SNO == WorldSno.trdun_leoric_level03 && this.ActorSNO.Id == 175999) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 94676, + WorldSNO = (int)WorldSno.trdun_jail_level01, DestLevelAreaSNO = 94672, StartingPointActorTag = 171 }; @@ -419,14 +420,14 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #endregion #region Восточный водосток - if (world.WorldSNO.Id == 62779 && this.ActorSNO.Id == 176007) + if (world.SNO == WorldSno.a2dun_aqd_special_b && this.ActorSNO.Id == 176007) { var Portal = world.GetActorBySNO(176007); if (Portal == null) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 59486, + WorldSNO = (int)WorldSno.a2dun_aqd_special_01, DestLevelAreaSNO = 62752, StartingPointActorTag = 93 }; @@ -435,7 +436,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem { this.Destination = new ResolvedPortalDestination { - WorldSNO = 59486, + WorldSNO = (int)WorldSno.a2dun_aqd_special_01, DestLevelAreaSNO = 62752, StartingPointActorTag = 87 }; @@ -445,13 +446,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #endregion #region Нижние этажи крепости: Уровень 2 - if (world.WorldSNO.Id == 75434) + if (world.SNO == WorldSno.a3dun_keep_level04) { if (this.ActorSNO.Id == 176001) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 93104, + WorldSNO = (int)WorldSno.a3dun_keep_level03, DestLevelAreaSNO = 75436, StartingPointActorTag = 171 }; @@ -460,7 +461,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem { this.Destination = new ResolvedPortalDestination { - WorldSNO = 136415, + WorldSNO = (int)WorldSno.a3dun_keep_level05, DestLevelAreaSNO = 136448, StartingPointActorTag = 172 }; @@ -468,13 +469,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem } #endregion #region Нижние этажи крепости: Уровень 3 - else if (world.WorldSNO.Id == 136415) + else if (world.SNO == WorldSno.a3dun_keep_level05) { if (this.ActorSNO.Id == 176001) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 75434, + WorldSNO = (int)WorldSno.a3dun_keep_level04, DestLevelAreaSNO = 93103, StartingPointActorTag = 171 }; @@ -483,7 +484,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem { this.Destination = new ResolvedPortalDestination { - WorldSNO = 103209, + WorldSNO = (int)WorldSno.gluttony_boss, DestLevelAreaSNO = 111232, StartingPointActorTag = 172 }; @@ -493,38 +494,19 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #endregion #region Ареатский кратер: Уровень 1 - else if (world.WorldSNO.Id == 81049) + else if (world.SNO == WorldSno.a3dun_crater_level_01) { if (this.World.GetActorsBySNO(176001).Count > 0) this.Destination = new ResolvedPortalDestination { - WorldSNO = 75434, + WorldSNO = (int)WorldSno.a3dun_keep_level04, DestLevelAreaSNO = 112580, StartingPointActorTag = 171 }; else this.Destination = new ResolvedPortalDestination { - WorldSNO = 79401, - DestLevelAreaSNO = 80791, - StartingPointActorTag = 172 - }; - } - #endregion - #region Ареатский кратер: Уровень 1 - else if (world.WorldSNO.Id == 81049) - { - if (this.World.GetActorsBySNO(176001).Count > 0) - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 75434, - DestLevelAreaSNO = 112580, - StartingPointActorTag = 171 - }; - else - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 79401, + WorldSNO = (int)WorldSno.a3dun_crater_st_level01, DestLevelAreaSNO = 80791, StartingPointActorTag = 172 }; @@ -532,12 +514,12 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #endregion #region Башня обреченных: Уровень 1 - else if (world.WorldSNO.Id == 79401) + else if (world.SNO == WorldSno.a3dun_crater_st_level01) { if (this.ActorSNO.Id == 204747) this.Destination = new ResolvedPortalDestination { - WorldSNO = 81049, + WorldSNO = (int)WorldSno.a3dun_crater_level_01, DestLevelAreaSNO = 86080, StartingPointActorTag = 171 }; @@ -545,19 +527,19 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #endregion #region Башня обреченных: Уровень 2 - else if (world.WorldSNO.Id == 80763) + else if (world.SNO == WorldSno.a3dun_crater_st_level02) { if (this.World.GetActorsBySNO(176001).Count > 0) this.Destination = new ResolvedPortalDestination { - WorldSNO = 79401, + WorldSNO = (int)WorldSno.a3dun_crater_st_level01, DestLevelAreaSNO = 80791, StartingPointActorTag = 171 }; else this.Destination = new ResolvedPortalDestination { - WorldSNO = 85201, + WorldSNO = (int)WorldSno.a3dun_crater_st_level04, DestLevelAreaSNO = 85202, StartingPointActorTag = 172 }; @@ -568,12 +550,12 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #endregion #region Башня проклятых: Уровень 1 - else if (world.WorldSNO.Id == 119641) + else if (world.SNO == WorldSno.a3dun_crater_st_level01b) { if (this.ActorSNO.Id == 204747) this.Destination = new ResolvedPortalDestination { - WorldSNO = 81934, + WorldSNO = (int)WorldSno.a3dun_crater_level_02, DestLevelAreaSNO = 119305, StartingPointActorTag = 171 }; @@ -582,12 +564,12 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #region Вход на первый этаж Садов //109143 - else if (world.WorldSNO.Id == 109143) + else if (world.SNO == WorldSno.a4dun_heaven_1000_monsters_fight) { //if (this.ActorSNO.Id == 204747) this.Destination = new ResolvedPortalDestination { - WorldSNO = 109513, + WorldSNO = (int)WorldSno.a4dun_garden_of_hope_01, DestLevelAreaSNO = 109514, StartingPointActorTag = 172 }; @@ -595,11 +577,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #endregion #region Пещера под колодцем - else if (world.WorldSNO.Id == 230288) + else if (world.SNO == WorldSno.a1trdun_cave_qa_well) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 71150, + WorldSNO = (int)WorldSno.trout_town, DestLevelAreaSNO = 91133, StartingPointActorTag = 148 }; @@ -607,22 +589,22 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #endregion #region Демонический разлом на первом этаже Садов Надежды. - else if (world.WorldSNO.Id == 109513 && this.ActorSNO.Id == 224890) + else if (world.SNO == WorldSno.a4dun_garden_of_hope_01 && this.ActorSNO.Id == 224890) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 109525,//tags[MarkerKeys.DestinationWorld].Id, + WorldSNO = (int)WorldSno.a4dun_hell_portal_01,//tags[MarkerKeys.DestinationWorld].Id, DestLevelAreaSNO = 109526, StartingPointActorTag = 172 }; } #endregion #region Демонический разлом на втором этаже Садов Надежды. - else if (world.WorldSNO.Id == 219659 && this.ActorSNO.Id == 224890) + else if (world.SNO == WorldSno.a4dun_garden_of_hope_random && this.ActorSNO.Id == 224890) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 109530,//tags[MarkerKeys.DestinationWorld].Id, + WorldSNO = (int)WorldSno.a4dun_hell_portal_02,//tags[MarkerKeys.DestinationWorld].Id, DestLevelAreaSNO = 109526, StartingPointActorTag = 172 }; @@ -630,11 +612,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #endregion #region Выход на первый этаж садов //109143 - else if (world.WorldSNO.Id == 109525) + else if (world.SNO == WorldSno.a4dun_hell_portal_01) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 109513, + WorldSNO = (int)WorldSno.a4dun_garden_of_hope_01, DestLevelAreaSNO = 109514, StartingPointActorTag = 172 }; @@ -642,11 +624,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #endregion #region Выход на второй этаж садов //109143 - else if (world.WorldSNO.Id == 109530) + else if (world.SNO == WorldSno.a4dun_hell_portal_02) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 219659, + WorldSNO = (int)WorldSno.a4dun_garden_of_hope_random, DestLevelAreaSNO = 109516, StartingPointActorTag = 172 }; @@ -655,56 +637,56 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #region Шпиль //1 Этаж - else if (world.WorldSNO.Id == 121579) + else if (world.SNO == WorldSno.a4dun_spire_level_01) { if (this.ActorSNO.Id == 211300) //Выход this.Destination = new ResolvedPortalDestination { - WorldSNO = 198281, + WorldSNO = (int)WorldSno.a4dun_spire_level_00, DestLevelAreaSNO = 198564, StartingPointActorTag = 171 }; else this.Destination = new ResolvedPortalDestination { - WorldSNO = 214956, + WorldSNO = (int)WorldSno.a4dun_spire_exterior, DestLevelAreaSNO = 215396, StartingPointActorTag = 172 }; } //Пролёт - else if (world.WorldSNO.Id == 214956) + else if (world.SNO == WorldSno.a4dun_spire_exterior) { if (world.Portals.Count == 0) //Выход this.Destination = new ResolvedPortalDestination { - WorldSNO = 121579, + WorldSNO = (int)WorldSno.a4dun_spire_level_01, DestLevelAreaSNO = 109538, StartingPointActorTag = 171 }; else this.Destination = new ResolvedPortalDestination { - WorldSNO = 129305, + WorldSNO = (int)WorldSno.a4dun_spire_level_02, DestLevelAreaSNO = 109540, StartingPointActorTag = 172 }; } //2 Этаж - else if (world.WorldSNO.Id == 129305) + else if (world.SNO == WorldSno.a4dun_spire_level_02) { if (world.Portals.Count == 0) this.Destination = new ResolvedPortalDestination { //TODO: - WorldSNO = 205399, + WorldSNO = (int)WorldSno.a4dun_spire_diabloentrance, DestLevelAreaSNO = 205434, StartingPointActorTag = 172 }; else this.Destination = new ResolvedPortalDestination { - WorldSNO = 214956, + WorldSNO = (int)WorldSno.a4dun_spire_exterior, DestLevelAreaSNO = 215396, StartingPointActorTag = 171 }; @@ -712,12 +694,12 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #endregion - #region Зона гоблинсов =) + #region Сокровищница / Зона гоблинсов =) else if (this.ActorSNO.Id == 393030) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 379962, + WorldSNO = (int)WorldSno.p1_tgoblin_realm, DestLevelAreaSNO = 378681, StartingPointActorTag = 172 }; @@ -726,209 +708,201 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #region Эвент - Старый тристрам #region 1 Этаж - собор - else if (world.WorldSNO.Id == 452721 && this.ActorSNO.Id == 176001) + else if (world.SNO == WorldSno.p43_ad_cathedral_level_01 && this.ActorSNO.Id == 176001) { - if (this.ActorSNO.Id == 176001) - if (this.NumberInWorld == 1) + if (this.NumberInWorld == 1) + { + this.Destination = new ResolvedPortalDestination { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 452922, - DestLevelAreaSNO = 452988, - StartingPointActorTag = 172 - }; - } - else + WorldSNO = (int)WorldSno.p43_ad_cathedral_level_02, + DestLevelAreaSNO = 452988, + StartingPointActorTag = 172 + }; + } + else + { + this.Destination = new ResolvedPortalDestination { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 455282, - DestLevelAreaSNO = 455466, - StartingPointActorTag = 171 - }; - } + WorldSNO = (int)WorldSno.p43_ad_oldtristram, + DestLevelAreaSNO = 455466, + StartingPointActorTag = 171 + }; + } } #endregion #region 2 Этаж - собор - else if (world.WorldSNO.Id == 452922 && this.ActorSNO.Id == 176001) + else if (world.SNO == WorldSno.p43_ad_cathedral_level_02 && this.ActorSNO.Id == 176001) { - if (this.ActorSNO.Id == 176001) - if (this.NumberInWorld == 1) + if (this.NumberInWorld == 1) + { + this.Destination = new ResolvedPortalDestination { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 452984, - DestLevelAreaSNO = 452989, - StartingPointActorTag = 172 - }; - } - else + WorldSNO = (int)WorldSno.p43_ad_cathedral_level_03, + DestLevelAreaSNO = 452989, + StartingPointActorTag = 172 + }; + } + else + { + this.Destination = new ResolvedPortalDestination { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 452721, - DestLevelAreaSNO = 452986, - StartingPointActorTag = 171 - }; - } + WorldSNO = (int)WorldSno.p43_ad_cathedral_level_01, + DestLevelAreaSNO = 452986, + StartingPointActorTag = 171 + }; + } } #endregion #region 3 Этаж - собор - else if (world.WorldSNO.Id == 452984 && this.ActorSNO.Id == 176001) + else if (world.SNO == WorldSno.p43_ad_cathedral_level_03 && this.ActorSNO.Id == 176001) { - if (this.ActorSNO.Id == 176001) - if (this.NumberInWorld == 1) + if (this.NumberInWorld == 1) + { + this.Destination = new ResolvedPortalDestination { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 452985, - DestLevelAreaSNO = 452990, - StartingPointActorTag = 172 - }; - } - else + WorldSNO = (int)WorldSno.p43_ad_cathedral_level_04, + DestLevelAreaSNO = 452990, + StartingPointActorTag = 172 + }; + } + else + { + this.Destination = new ResolvedPortalDestination { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 452922, - DestLevelAreaSNO = 452988, - StartingPointActorTag = 171 - }; - } + WorldSNO = (int)WorldSno.p43_ad_cathedral_level_02, + DestLevelAreaSNO = 452988, + StartingPointActorTag = 171 + }; + } } #endregion #region 4 Этаж - собор - else if (world.WorldSNO.Id == 452985 && this.ActorSNO.Id == 176001) + else if (world.SNO == WorldSno.p43_ad_cathedral_level_04 && this.ActorSNO.Id == 176001) { - if (this.ActorSNO.Id == 176001) - if (this.NumberInWorld == 1) + if (this.NumberInWorld == 1) + { + this.Destination = new ResolvedPortalDestination { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 452991, - DestLevelAreaSNO = 452992, - StartingPointActorTag = 172 - }; - } - else + WorldSNO = (int)WorldSno.p43_ad_catacombs_level_05, + DestLevelAreaSNO = 452992, + StartingPointActorTag = 172 + }; + } + else + { + this.Destination = new ResolvedPortalDestination { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 452984, - DestLevelAreaSNO = 452989, - StartingPointActorTag = 171 - }; - } + WorldSNO = (int)WorldSno.p43_ad_cathedral_level_03, + DestLevelAreaSNO = 452989, + StartingPointActorTag = 171 + }; + } } #endregion #region 5 Этаж - катакомбы - else if (world.WorldSNO.Id == 452991 && this.ActorSNO.Id == 341572) + else if (world.SNO == WorldSno.p43_ad_catacombs_level_05 && this.ActorSNO.Id == 341572) { - if (this.ActorSNO.Id == 341572) - if (this.NumberInWorld == 1) + if (this.NumberInWorld == 1) + { + this.Destination = new ResolvedPortalDestination { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 452996, - DestLevelAreaSNO = 452993, - StartingPointActorTag = 172 - }; - } - else + WorldSNO = (int)WorldSno.p43_ad_catacombs_level_06, + DestLevelAreaSNO = 452993, + StartingPointActorTag = 172 + }; + } + else + { + this.Destination = new ResolvedPortalDestination { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 452985, - DestLevelAreaSNO = 452990, - StartingPointActorTag = 171 - }; - } + WorldSNO = (int)WorldSno.p43_ad_cathedral_level_04, + DestLevelAreaSNO = 452990, + StartingPointActorTag = 171 + }; + } } #endregion #region 6 Этаж - катакомбы - else if (world.WorldSNO.Id == 452996 && this.ActorSNO.Id == 341572) + else if (world.SNO == WorldSno.p43_ad_catacombs_level_06 && this.ActorSNO.Id == 341572) { - if (this.ActorSNO.Id == 341572) - if (this.NumberInWorld == 1) + if (this.NumberInWorld == 1) + { + this.Destination = new ResolvedPortalDestination { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 452997, - DestLevelAreaSNO = 452994, - StartingPointActorTag = 172 - }; - } - else + WorldSNO = (int)WorldSno.p43_ad_catacombs_level_07, + DestLevelAreaSNO = 452994, + StartingPointActorTag = 172 + }; + } + else + { + this.Destination = new ResolvedPortalDestination { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 452991, - DestLevelAreaSNO = 452992, - StartingPointActorTag = 171 - }; - } + WorldSNO = (int)WorldSno.p43_ad_catacombs_level_05, + DestLevelAreaSNO = 452992, + StartingPointActorTag = 171 + }; + } } #endregion #region 7 Этаж - катакомбы - else if (world.WorldSNO.Id == 452997 && this.ActorSNO.Id == 341572) + else if (world.SNO == WorldSno.p43_ad_catacombs_level_07 && this.ActorSNO.Id == 341572) { - if (this.ActorSNO.Id == 341572) - if (this.NumberInWorld == 1) + if (this.NumberInWorld == 1) + { + this.Destination = new ResolvedPortalDestination { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 452998, - DestLevelAreaSNO = 452995, - StartingPointActorTag = 172 - }; - } - else + WorldSNO = (int)WorldSno.p43_ad_catacombs_level_08, + DestLevelAreaSNO = 452995, + StartingPointActorTag = 172 + }; + } + else + { + this.Destination = new ResolvedPortalDestination { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 452996, - DestLevelAreaSNO = 452993, - StartingPointActorTag = 171 - }; - } + WorldSNO = (int)WorldSno.p43_ad_catacombs_level_06, + DestLevelAreaSNO = 452993, + StartingPointActorTag = 171 + }; + } } #endregion #region 8 Этаж - катакомбы - else if (world.WorldSNO.Id == 452998 && this.ActorSNO.Id == 341572) + else if (world.SNO == WorldSno.p43_ad_catacombs_level_08 && this.ActorSNO.Id == 341572) { - if (this.ActorSNO.Id == 341572) - if (this.NumberInWorld == 1) + if (this.NumberInWorld == 1) + { + this.Destination = new ResolvedPortalDestination { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 452999, - DestLevelAreaSNO = 453001, - StartingPointActorTag = 172 - }; - } - else + WorldSNO = (int)WorldSno.p43_ad_caves_level_09, + DestLevelAreaSNO = 453001, + StartingPointActorTag = 172 + }; + } + else + { + this.Destination = new ResolvedPortalDestination { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 452997, - DestLevelAreaSNO = 452994, - StartingPointActorTag = 171 - }; - } + WorldSNO = (int)WorldSno.p43_ad_catacombs_level_07, + DestLevelAreaSNO = 452994, + StartingPointActorTag = 171 + }; + } } #endregion #endregion #region Старый монастырь - else if (world.WorldSNO.Id == 430335) + else if (world.SNO == WorldSno.a3dun_ruins_frost_city_a_02) { if (this.ActorSNO.Id == 175467 && this.World.GetActorsBySNO(175467).Count == 0) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 428493, + WorldSNO = (int)WorldSno.a3dun_ruins_frost_city_a_01, DestLevelAreaSNO = 428494, StartingPointActorTag = 171 }; @@ -936,13 +910,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem } #endregion #region Руины Сечерона - else if (world.WorldSNO.Id == 428493) + else if (world.SNO == WorldSno.a3dun_ruins_frost_city_a_01) { if (this.ActorSNO.Id == 175467 && this.World.GetActorsBySNO(175467).Count == 1) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 430335, + WorldSNO = (int)WorldSno.a3dun_ruins_frost_city_a_02, DestLevelAreaSNO = 430336, StartingPointActorTag = 172 }; @@ -950,13 +924,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem } #endregion #region Вечный лес - else if (world.WorldSNO.Id == 444305) + else if (world.SNO == WorldSno.p4_forest_snow_01) { if (this.ActorSNO.Id == 176002 && this.World.GetActorsBySNO(176002).Count == 0) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 428493, + WorldSNO = (int)WorldSno.a3dun_ruins_frost_city_a_01, DestLevelAreaSNO = 428494, StartingPointActorTag = 615 }; @@ -966,13 +940,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #region 5 Акт #region Торговый квартал Вестмарша - else if (world.WorldSNO.Id == 261712 && this.ActorSNO.Id == 176002) + else if (world.SNO == WorldSno.x1_westm_zone_01 && this.ActorSNO.Id == 176002) { if (this.NumberInWorld == 0) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 304235, + WorldSNO = (int)WorldSno.x1_westmarch_hub, DestLevelAreaSNO = 270011, StartingPointActorTag = 466 }; @@ -980,13 +954,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem } #endregion #region Кладбище Бриартон - else if (world.WorldSNO.Id == 338944 && this.ActorSNO.Id == 176002) + else if (world.SNO == WorldSno.x1_westm_graveyard_deathorb && this.ActorSNO.Id == 176002) { if (this.NumberInWorld == 0) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 338891, + WorldSNO = (int)WorldSno.x1_westm_deathorb_gideonscourt, DestLevelAreaSNO = 338956, StartingPointActorTag = 171 }; @@ -995,13 +969,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem //338946 #endregion #region Верхний Вестамарш - else if (world.WorldSNO.Id == 263494 && this.ActorSNO.Id == 176001) + else if (world.SNO == WorldSno.x1_westm_zone_03 && this.ActorSNO.Id == 176001) { if (this.NumberInWorld == 0) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 304235, + WorldSNO = (int)WorldSno.x1_westmarch_hub, DestLevelAreaSNO = 270011, StartingPointActorTag = 442 }; @@ -1012,13 +986,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem #region Проход к Корвусу //Выход - W:267412 A: 258142 P: 171 - else if (world.WorldSNO.Id == 283552 && this.ActorSNO.Id == 341572) + else if (world.SNO == WorldSno.x1_catacombs_level01 && this.ActorSNO.Id == 341572) { if (this.NumberInWorld == 0) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 283566, + WorldSNO = (int)WorldSno.x1_catacombs_level02, DestLevelAreaSNO = 283567, StartingPointActorTag = 172 }; @@ -1027,20 +1001,20 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem { this.Destination = new ResolvedPortalDestination { - WorldSNO = 267412, + WorldSNO = (int)WorldSno.x1_bog_01, DestLevelAreaSNO = 258142, StartingPointActorTag = 171 }; } } //Второй уровень - else if (world.WorldSNO.Id == 283566 && this.ActorSNO.Id == 341572) + else if (world.SNO == WorldSno.x1_catacombs_level02 && this.ActorSNO.Id == 341572) { if (this.NumberInWorld == 0) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 283552, + WorldSNO = (int)WorldSno.x1_catacombs_level01, DestLevelAreaSNO = 283553, StartingPointActorTag = 171 }; @@ -1048,13 +1022,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem } #endregion #region Крепость пандемония. Уровень 1 - else if (world.WorldSNO.Id == 271233 && this.ActorSNO.Id == 176007) + else if (world.SNO == WorldSno.x1_fortress_level_01 && this.ActorSNO.Id == 176007) { if (this.NumberInWorld == 0) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 271235, + WorldSNO = (int)WorldSno.x1_fortress_level_02, DestLevelAreaSNO = 360494, StartingPointActorTag = 172 }; @@ -1063,19 +1037,19 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem { this.Destination = new ResolvedPortalDestination { - WorldSNO = 295225, + WorldSNO = (int)WorldSno.x1_pand_batteringram, DestLevelAreaSNO = 295228, StartingPointActorTag = 171 }; } } - else if (world.WorldSNO.Id == 271235 && this.ActorSNO.Id == 365112) + else if (world.SNO == WorldSno.x1_fortress_level_02 && this.ActorSNO.Id == 365112) { if (this.NumberInWorld == 0) { this.Destination = new ResolvedPortalDestination { - WorldSNO = 271233, + WorldSNO = (int)WorldSno.x1_fortress_level_01, DestLevelAreaSNO = 271234, StartingPointActorTag = 171 }; @@ -1084,17 +1058,6 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem } #endregion #endregion - #region Сокровищница - else if (this.ActorSNO.Id == 393030) - { - this.Destination = new ResolvedPortalDestination - { - WorldSNO = 379962, - DestLevelAreaSNO = 378681, - StartingPointActorTag = 172 - }; - } - #endregion #region Умное вычисление выхода if (this.Destination == null) { @@ -1104,7 +1067,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem this.Destination = new ResolvedPortalDestination { - WorldSNO = -1, + WorldSNO = (int)WorldSno.__NONE, DestLevelAreaSNO = -1, StartingPointActorTag = -1 }; @@ -1118,15 +1081,15 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem Logger.Warn("Portal - {0} Smart Генерация.", this.ActorSNO.Id); int LevelArea = 0; int BackPoint = -1; - if (this.World.WorldSNO.Name.ToLower().Contains("x1_lr_tileset")) + if (this.World.SNO.IsDungeon()) { - if (this.World.WorldSNO.Id == this.World.Game.WorldOfPortalNephalem) + if (this.World.SNO == this.World.Game.WorldOfPortalNephalem) { //Вход 1 этаж if(this.CurrentScene.SceneSNO.Name.ToLower().Contains("entr")) return new ResolvedPortalDestination { - WorldSNO = 332336, + WorldSNO = (int)WorldSno.x1_tristram_adventure_mode_hub, DestLevelAreaSNO = 332339, StartingPointActorTag = 24 }; @@ -1134,7 +1097,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem else return new ResolvedPortalDestination { - WorldSNO = this.World.Game.WorldOfPortalNephalemSec, + WorldSNO = (int)this.World.Game.WorldOfPortalNephalemSec, DestLevelAreaSNO = 288684, StartingPointActorTag = 172 }; @@ -1142,7 +1105,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem return new ResolvedPortalDestination { - WorldSNO = this.World.Game.WorldOfPortalNephalem, + WorldSNO = (int)this.World.Game.WorldOfPortalNephalem, DestLevelAreaSNO = 288482, StartingPointActorTag = 171 }; @@ -1150,19 +1113,17 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem } else { - if (this.World.Game.Players.Count > 0) + if (!World.Game.Players.IsEmpty) { - if (this.World.Game.Players.First().Value.CurrentScene.Specification.SNOLevelAreas[1] != -1) - LevelArea = this.World.Game.Players.First().Value.CurrentScene.Specification.SNOLevelAreas[1]; - else - LevelArea = this.World.Game.Players.First().Value.CurrentScene.Specification.SNOLevelAreas[0]; + var player = this.World.Game.Players.First().Value; + LevelArea = player.CurrentScene.Specification.SNOLevelAreas.LastOrDefault(x => x != -1); - if (this.World.Game.Players.First().Value.GetActorsInRange(20f).Count > 0) - BackPoint = (this.World.Game.Players.First().Value.GetActorsInRange(20f).First() as StartingPoint).TargetId; + if (player.GetActorsInRange(20f).Count > 0) + BackPoint = (player.GetActorsInRange(20f).First() as StartingPoint).TargetId; return new ResolvedPortalDestination - { - WorldSNO = this.World.Game.Players.First().Value.World.WorldSNO.Id, + { + WorldSNO = (int)player.World.SNO, DestLevelAreaSNO = LevelArea, StartingPointActorTag = BackPoint }; @@ -1171,7 +1132,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem { return new ResolvedPortalDestination { - WorldSNO = -1, + WorldSNO = (int)WorldSno.__NONE, DestLevelAreaSNO = LevelArea, StartingPointActorTag = -1 }; @@ -1181,14 +1142,14 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem public override void EnterWorld(Vector3D position) { base.EnterWorld(position); - if (this.World.WorldSNO.Id == 70885 || this.World.WorldSNO.Id == 95804) + if (this.World.SNO == WorldSno.caout_town || this.World.SNO == WorldSno.a3_battlefields_02) { var portals = this.GetActorsInRange(5f).Where(p => p.Destination != null && p.Destination.DestLevelAreaSNO != -1).ToList(); if (portals.Count >= 2) { var random_portal = portals[FastRandom.Instance.Next(portals.Count)]; var bounty_portals = this.World.Game.QuestManager.Bounties.Where(b => !b.PortalSpawned).SelectMany(b => b.LevelAreaChecks).Intersect(portals.Select(p => p.Destination.DestLevelAreaSNO)); - if (bounty_portals.Count() > 0) + if (bounty_portals.Any()) { random_portal = portals.Where(p => this.World.Game.QuestManager.Bounties.SelectMany(b => b.LevelAreaChecks).Where(w => w != -1).Contains(p.Destination.DestLevelAreaSNO)).First(); this.World.Game.QuestManager.Bounties.Where(b => b.LevelAreaChecks.Contains(random_portal.Destination.DestLevelAreaSNO)).First().PortalSpawned = true; @@ -1199,7 +1160,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem } } - if (this.Destination == null || this.Destination.WorldSNO == -1) + if (this.Destination == null || this.Destination.WorldSNO == (int)WorldSno.__NONE) { var proximity = new RectangleF(this.Position.X - 1f, this.Position.Y - 1f, 2f, 2f); var scenes = this.World.QuadTree.Query(proximity); @@ -1223,7 +1184,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem if (this.Position.Y < 100.0f) this.Destination = new ResolvedPortalDestination { - WorldSNO = 81049, + WorldSNO = (int)WorldSno.a3dun_crater_level_01, DestLevelAreaSNO = 86080, StartingPointActorTag = 171 }; @@ -1231,14 +1192,14 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem if (scene.SceneSNO.Id == 335727) //Gideon's Row entrance this.Destination = new ResolvedPortalDestination { - WorldSNO = 261712, + WorldSNO = (int)WorldSno.x1_westm_zone_01, DestLevelAreaSNO = 261758, StartingPointActorTag = 171 }; if (scene.SceneSNO.Id == 335742) //Gideon's Row exit this.Destination = new ResolvedPortalDestination { - WorldSNO = 338944, + WorldSNO = (int)WorldSno.x1_westm_graveyard_deathorb, DestLevelAreaSNO = 338946, StartingPointActorTag = 172 }; @@ -1246,7 +1207,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem if (this.World.PortalOverrides.ContainsKey(scene.SceneSNO.Id)) this.Destination = new ResolvedPortalDestination { - WorldSNO = this.World.PortalOverrides[scene.SceneSNO.Id], + WorldSNO = (int)this.World.PortalOverrides[scene.SceneSNO.Id], DestLevelAreaSNO = 283553, StartingPointActorTag = 172 }; @@ -1272,84 +1233,82 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem public override bool Reveal(Player player) { - if (this.ActorSNO.Id == 176002 && this.World.WorldSNO.Id == 154587) + if (this.ActorSNO.Id == 176002 && this.World.SNO == WorldSno.trdun_crypt_skeletonkingcrown_00) { //this.Destination.WorldSNO = } if (!this.randomed && this.Destination.DestLevelAreaSNO != 19794) return false; //if (this.ActorSNO.Id == 209083) return false; //pony level portal - if (this.ActorSNO.Id == 175482 && this.World.WorldSNO.Id == 178152) return false; //armory a4 portal + if (this.ActorSNO.Id == 175482 && this.World.SNO == WorldSno.a4dun_heaven_hub_keep) return false; //armory a4 portal if (this.World.IsPvP && this.Destination != null && this.Destination.DestLevelAreaSNO != 19947) return false; //unwanted portals in PvP hub //Logger.Debug(" (Reveal) portal {0} has location {1}", this.ActorSNO, this._position); if (this.Destination != null) { - if (this.Destination.DestLevelAreaSNO == 168200 && this.World.WorldSNO.Id == 70885) return false; //treasure room short portal + if (this.Destination.DestLevelAreaSNO == 168200 && this.World.SNO == WorldSno.caout_town) return false; //treasure room short portal if (this.Destination.DestLevelAreaSNO == 154588) return false; if (this.Destination.DestLevelAreaSNO == 83264) return false; if (this.Destination.DestLevelAreaSNO == 83265) return false; if (this.Destination.DestLevelAreaSNO == 161964) return false; if (this.Destination.DestLevelAreaSNO == 81178) return false; if (this.Destination.DestLevelAreaSNO == 210451 && !(this.World.Game.CurrentQuest == 121792 || this.World.Game.CurrentQuest == 57339)) return false; - if (this.Destination.DestLevelAreaSNO == 19789 && this.World.WorldSNO.Id == 50585) return false; - if (this.Destination.WorldSNO == 332336 && this.Destination.StartingPointActorTag == 483 && this.World.WorldSNO.Id == 71150) + if (this.Destination.DestLevelAreaSNO == 19789 && this.World.SNO == WorldSno.a1trdun_level07) return false; + if (this.Destination.WorldSNO == (int)WorldSno.x1_tristram_adventure_mode_hub && this.Destination.StartingPointActorTag == 483 && this.World.SNO == WorldSno.trout_town) { - this.Destination.WorldSNO = 71150; this.Destination.StartingPointActorTag = 338; + this.Destination.WorldSNO = (int)WorldSno.trout_town; + this.Destination.StartingPointActorTag = 338; } } - if (this.World.WorldSNO.Id == 80763 && this.Destination.WorldSNO == 85201) //Tower of the Damned lvl2 - this.Destination.StartingPointActorTag = 172; - - if (this.World.WorldSNO.Id == 85201) //Heart of the Damned + if (this.World.SNO == WorldSno.a3dun_crater_st_level04) //Heart of the Damned if (this.Position.X < 100.0f) this.Destination = new ResolvedPortalDestination { - WorldSNO = 81934, + WorldSNO = (int)WorldSno.a3dun_crater_level_02, DestLevelAreaSNO = 119305, StartingPointActorTag = 172 }; else this.Destination = new ResolvedPortalDestination { - WorldSNO = 80763, + WorldSNO = (int)WorldSno.a3dun_crater_st_level02, DestLevelAreaSNO = 80792, StartingPointActorTag = 171 }; - if (this.World.WorldSNO.Id == 119641) //Tower of the Cursed lvl1 + if (this.World.SNO == WorldSno.a3dun_crater_st_level01b) //Tower of the Cursed lvl1 if (this.Position.X > 300.0f) this.Destination = new ResolvedPortalDestination { - WorldSNO = 139272, + WorldSNO = (int)WorldSno.a3dun_crater_st_level02b, DestLevelAreaSNO = 139274, StartingPointActorTag = 172 }; - if (this.World.WorldSNO.Id == 139272) //Tower of the Cursed lvl2 + if (this.World.SNO == WorldSno.a3dun_crater_st_level02b) //Tower of the Cursed lvl2 this.Destination = new ResolvedPortalDestination { - WorldSNO = 119641, + WorldSNO = (int)WorldSno.a3dun_crater_st_level01b, DestLevelAreaSNO = 119653, StartingPointActorTag = 171 }; - if (this.World.WorldSNO.Id == 192687) //drowned passge portals + if (this.World.SNO == WorldSno.a2dun_aqd_oasis_level00) //drowned passge portals if (this.Position.Y > 200.0f) this.Destination = new ResolvedPortalDestination { - WorldSNO = 59486, + WorldSNO = (int)WorldSno.a2dun_aqd_special_01, DestLevelAreaSNO = 62752, StartingPointActorTag = 95 }; else this.Destination = new ResolvedPortalDestination { - WorldSNO = 192640, + WorldSNO = (int)WorldSno.a2dun_aqd_oasis_level01, DestLevelAreaSNO = 192689, StartingPointActorTag = 96 }; - if (this.Destination == null || this.Destination.WorldSNO == -1 || this.Destination.StartingPointActorTag > 500) + if (this.Destination == null || this.Destination.WorldSNO == (int)WorldSno.__NONE || this.Destination.StartingPointActorTag > 500) { if (Smart == true) this.Destination = SmartExitGenerate(); @@ -1368,13 +1327,13 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem if (this.World.worldData.DynamicWorld) if (scene.TileType == 300) - if (this.World.NextLocation.WorldSNO != -1) + if (this.World.NextLocation.WorldSNO != (int)WorldSno.__NONE) this.Destination = this.World.NextLocation; - else if (this.World.PrevLocation.WorldSNO != -1) + else if (this.World.PrevLocation.WorldSNO != (int)WorldSno.__NONE) this.Destination = this.World.PrevLocation; else { - if (this.World.PrevLocation.WorldSNO != -1) + if (this.World.PrevLocation.WorldSNO != (int)WorldSno.__NONE) this.Destination = this.World.PrevLocation; } } @@ -1382,7 +1341,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem //if (this.Destination == null || this.Destination.DestLevelAreaSNO == -1) this.Destination = SmartExitGenerate(); //return false; - if (this.Destination.WorldSNO == 204707 && this.World.Game.CurrentQuest == 101758) return false; + if (this.Destination.WorldSNO == (int)WorldSno.a3dun_hub_adria_tower_intro && this.World.Game.CurrentQuest == 101758) return false; if (!base.Reveal(player)) return false; @@ -1421,7 +1380,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem if (this.Destination.StartingPointActorTag != 0) { StartingPoint NeededStartingPoint = world.GetStartingPointById(this.Destination.StartingPointActorTag); - var DestWorld = world.Game.GetWorld(this.Destination.WorldSNO); + var DestWorld = world.Game.GetWorld((WorldSno)this.Destination.WorldSNO); var StartingPoints = DestWorld.GetActorsBySNO(5502); foreach (var ST in StartingPoints) if (ST.CurrentScene.SceneSNO.Id == this.Destination.StartingPointActorTag) @@ -1437,27 +1396,27 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem } public override void OnTargeted(Player player, TargetMessage message) { - if (this.Destination.WorldSNO == this.World.Game.WorldOfPortalNephalemSec) + if (this.Destination.WorldSNO == (int)this.World.Game.WorldOfPortalNephalemSec) { this.Destination.StartingPointActorTag = 172; } var doors = this.GetActorsInRange(10f).Where(d => d.Visible); - if (this.ActorSNO.Id == 434659 & this.Destination.WorldSNO != 434649) + if (this.ActorSNO.Id == 434659 & this.Destination.WorldSNO != (int)WorldSno.p2_totallynotacowlevel) { - this.Destination.WorldSNO = 379962; + this.Destination.WorldSNO = (int)WorldSno.p1_tgoblin_realm; this.Destination.StartingPointActorTag = 171; } Logger.Warn("(OnTargeted) Portal has been activated, Id: {0}, LevelArea: {1}, World: {2}", this.ActorSNO.Id, this.Destination.DestLevelAreaSNO, this.Destination.WorldSNO); - if (this.Destination.WorldSNO != 71150 && this.Destination.WorldSNO != 332336) + if (this.Destination.WorldSNO != (int)WorldSno.trout_town && this.Destination.WorldSNO != (int)WorldSno.x1_tristram_adventure_mode_hub) foreach (var door in doors) if (!door.isOpened) return; //return; - if (Destination.WorldSNO != -1) - player.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Base.SimpleMessage(Opcodes.LoadingWarping)); + if (Destination.WorldSNO != (int)WorldSno.__NONE) + player.InGameClient.SendMessage(new SimpleMessage(Opcodes.LoadingWarping)); if (this.World.IsPvP) - this.Destination.WorldSNO = 332336; - var world = this.World.Game.GetWorld(this.Destination.WorldSNO); + this.Destination.WorldSNO = (int)WorldSno.x1_tristram_adventure_mode_hub; + var world = this.World.Game.GetWorld((WorldSno)this.Destination.WorldSNO); if (this.Destination.DestLevelAreaSNO == 288482 && this.World.Game.ActiveNephalemTimer == false && this.World.Game.NephalemGreater == false) { @@ -1517,7 +1476,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem Logger.Warn("Portal's destination world does not exist (WorldSNO = {0})", this.Destination.WorldSNO); return; } - Logger.Info("World - {0} - {1}", world.WorldSNO.Id, world.WorldSNO.Name); + Logger.Info("World - {0} - {1}", world.SNO, world.WorldSNO.Name); var startingPoint = world.GetStartingPointById(this.Destination.StartingPointActorTag); if (startingPoint == null) diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/GameSystem/Game.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/GameSystem/Game.cs index ea1ec10..06028fe 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/GameSystem/Game.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/GameSystem/Game.cs @@ -66,6 +66,7 @@ using DiIiS_NA.GameServer.GSSystem.GeneratorsSystem; using DiIiS_NA.GameServer.GSSystem.AISystem.Brains; //Blizzless Project 2022 using System.Diagnostics; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.GameSystem { @@ -95,8 +96,8 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem public TickTimer GlobalPvPTimer; public TickTimer QuestTimer; - public int WorldOfPortalNephalem = -1; - public int WorldOfPortalNephalemSec = -1; + public WorldSno WorldOfPortalNephalem = WorldSno.__NONE; + public WorldSno WorldOfPortalNephalemSec = WorldSno.__NONE; public int NephalemGreaterLevel = -1; public bool NephalemGreater = false; public bool NephalemBuff = false; @@ -138,7 +139,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem /// Dictionary that tracks world. /// NOTE: This tracks by WorldSNO rather than by DynamicID; this.Objects _does_ still contain the world since it is a DynamicObject /// - private readonly ConcurrentDictionary _worlds; + private readonly ConcurrentDictionary _worlds; public List Worlds { @@ -162,14 +163,15 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem public int acceptedPlayers; }; - public Dictionary> OnLoadWorldActions = new Dictionary>(); + public Dictionary> OnLoadWorldActions = new Dictionary>(); + public Dictionary> OnLoadSceneActions = new Dictionary>(); public BossEncounter CurrentEncounter = new BossEncounter { SnoId = -1, activated = false, acceptedPlayers = 0 }; /// - /// Starting world's sno id. + /// Starting world's sno. /// - public int StartingWorldSNOId { get; private set; } + public WorldSno StartingWorldSNO { get; private set; } /// /// Starting world's monster level @@ -196,7 +198,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem { get { - return GetWorld(this.StartingWorldSNOId); + return GetWorld(this.StartingWorldSNO); } } @@ -422,8 +424,8 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem this._lastObjectID = (uint)gameId * 100000; this.Empty = true; this.Players = new ConcurrentDictionary(); - this._worlds = new ConcurrentDictionary(); - this.StartingWorldSNOId = 79100;// FIXME: track the player's save point and toss this stuff. + this._worlds = new ConcurrentDictionary(); + this.StartingWorldSNO = WorldSno.pvp_caout_arena_01;// FIXME: track the player's save point and toss this stuff. this.InitialMonsterLevel = initalLevel; this.MonsterLevel = initalLevel; this.QuestManager = new QuestManager(this); @@ -443,7 +445,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem this.GameDBSession = new GameDBSession(); this.LockdownTimer = TickTimer.WaitSeconds(this, 60f, new Action((q) => { - if (this.Empty || this.Players.Count == 0) + if (this.Empty || Players.IsEmpty) { Logger.Info("All players disconnected, closing game session."); this.Dispose(); @@ -688,13 +690,13 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem joinedPlayer.EnterWorld(this.StartingWorld.GetStartingPointById(130).Position); break; case 200: - joinedPlayer.ChangeWorld(this.GetWorld(204707), this.GetWorld(204707).GetStartingPointById(206).Position); + joinedPlayer.ChangeWorld(this.GetWorld(WorldSno.a3dun_hub_adria_tower_intro), this.GetWorld(WorldSno.a3dun_hub_adria_tower_intro).GetStartingPointById(206).Position); break; case 300: - joinedPlayer.ChangeWorld(this.GetWorld(182944), this.GetWorld(182944).StartingPoints.First().Position); + joinedPlayer.ChangeWorld(this.GetWorld(WorldSno.a4dun_heaven_1000_monsters_fight_entrance), this.GetWorld(WorldSno.a4dun_heaven_1000_monsters_fight_entrance).StartingPoints.First().Position); break; case 400: - joinedPlayer.ChangeWorld(this.GetWorld(308705), this.GetWorld(308705).StartingPoints.First().Position); + joinedPlayer.ChangeWorld(this.GetWorld(WorldSno.x1_westmarch_overlook_d), this.GetWorld(WorldSno.x1_westmarch_overlook_d).StartingPoints.First().Position); break; default: break; @@ -960,7 +962,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem { case Game.Mode.Portals: this.QuestsOrder = new int[] { -1 }; - this.StartingWorldSNOId = 459976; + this.StartingWorldSNO = WorldSno.weekly_challenge_hub; this.QuestProgress = new QuestRegistry(this); break; } @@ -972,7 +974,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem this.CurrentAct = 0; this.QuestsOrder = questsOrder_a1; this.QuestProgress = new QuestRegistry(this); - this.StartingWorldSNOId = 79100; + this.StartingWorldSNO = WorldSno.pvp_caout_arena_01; return; } if (CurrentAct != act) @@ -983,38 +985,38 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem { case 0: this.QuestsOrder = questsOrder_a1; - this.StartingWorldSNOId = 71150; + this.StartingWorldSNO = WorldSno.trout_town; this.QuestProgress = new ActI(this); break; case 100: this.QuestsOrder = questsOrder_a2; - this.StartingWorldSNOId = 161472; + this.StartingWorldSNO = WorldSno.caout_refugeecamp; this.QuestProgress = new ActII(this); break; case 200: this.QuestsOrder = questsOrder_a3; - this.StartingWorldSNOId = 172909; + this.StartingWorldSNO = WorldSno.a3dun_hub_keep; this.QuestProgress = new ActIII(this); break; case 300: this.QuestsOrder = questsOrder_a4; - this.StartingWorldSNOId = 178152; + this.StartingWorldSNO = WorldSno.a4dun_heaven_hub_keep; this.QuestProgress = new ActIV(this); break; case 400: this.QuestsOrder = questsOrder_a5; - this.StartingWorldSNOId = 304235; + this.StartingWorldSNO = WorldSno.x1_westmarch_hub; this.QuestProgress = new ActV(this); break; case 3000: this.QuestsOrder = questsOrder_openWorld; - this.StartingWorldSNOId = 332336; + this.StartingWorldSNO = WorldSno.x1_tristram_adventure_mode_hub; this.QuestProgress = new OpenWorld(this); this.QuestManager.SetBounties(); break; default: this.QuestsOrder = questsOrder_a1; - this.StartingWorldSNOId = 71150; + this.StartingWorldSNO = WorldSno.trout_town; this.QuestProgress = new QuestRegistry(this); break; } @@ -1107,13 +1109,13 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem plr.Value.ChangeWorld(this.StartingWorld, this.StartingWorld.GetStartingPointById(130).Position); break; case 200: - plr.Value.ChangeWorld(this.GetWorld(204707), this.GetWorld(204707).GetStartingPointById(206).Position); + plr.Value.ChangeWorld(this.GetWorld(WorldSno.a3dun_hub_adria_tower_intro), this.GetWorld(WorldSno.a3dun_hub_adria_tower_intro).GetStartingPointById(206).Position); break; case 300: - plr.Value.ChangeWorld(this.GetWorld(182944), this.GetWorld(182944).StartingPoints.First().Position); + plr.Value.ChangeWorld(this.GetWorld(WorldSno.a4dun_heaven_1000_monsters_fight_entrance), this.GetWorld(WorldSno.a4dun_heaven_1000_monsters_fight_entrance).StartingPoints.First().Position); break; case 400: - plr.Value.ChangeWorld(this.GetWorld(308705), this.GetWorld(308705).StartingPoints.First().Position); + plr.Value.ChangeWorld(this.GetWorld(WorldSno.x1_westmarch_overlook_d), this.GetWorld(WorldSno.x1_westmarch_overlook_d).StartingPoints.First().Position); break; default: break; @@ -1375,7 +1377,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem }*/ var encAsset = (DiIiS_NA.Core.MPQ.FileFormats.BossEncounter)MPQStorage.Data.Assets[SNOGroup.BossEncounter][snoId].Data; - World encWorld = this.GetWorld(encAsset.Worlds[0]); + World encWorld = this.GetWorld((WorldSno)encAsset.Worlds[0]); Logger.Debug("TeleportToBossEncounter, worldId: {0}", encAsset.Worlds[0]); Vector3D startPoint = null; switch (snoId) @@ -1651,10 +1653,10 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem this.CurrentEncounter.acceptedPlayers = 0; } - public void AddOnLoadAction(int worldSNO, Action action) + public void AddOnLoadWorldAction(WorldSno worldSNO, Action action) { - Logger.Trace("AddOnLoadAction: {0}", worldSNO); - if (this.Players.Values.Where(p => p.World != null && p.World.WorldSNO.Id == worldSNO).Count() > 0) + Logger.Trace("AddOnLoadWorldAction: {0}", worldSNO); + if (Players.Values.Any(p => p.World != null && p.World.SNO == worldSNO)) { action.Invoke(); } @@ -1667,33 +1669,45 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem } } + public void AddOnLoadSceneAction(int sceneSNO, Action action) + { + Logger.Trace("AddOnLoadSceneAction: {0}", sceneSNO); + if (!this.OnLoadSceneActions.ContainsKey(sceneSNO)) + this.OnLoadSceneActions.Add(sceneSNO, new List()); + + this.OnLoadSceneActions[sceneSNO].Add(action); + } + #endregion #region world collection public void AddWorld(World world) { - if (world.WorldSNO.Id == -1 || WorldExists(world.WorldSNO.Id)) - Logger.Error(String.Format("World has an invalid SNO or was already being tracked (ID = {0}, SNO = {1})", world.GlobalID, world.WorldSNO.Id)); + if (world.SNO == WorldSno.__NONE || WorldExists(world.SNO)) + Logger.Error(String.Format("World has an invalid SNO or was already being tracked (ID = {0}, SNO = {1})", world.GlobalID, world.SNO)); else - this._worlds.TryAdd(world.WorldSNO.Id, world); + this._worlds.TryAdd(world.SNO, world); } public void RemoveWorld(World world) { World removed; - if (world.WorldSNO.Id == -1 || !WorldExists(world.WorldSNO.Id)) - Logger.Error(String.Format("World has an invalid SNO or was not being tracked (ID = {0}, SNO = {1})", world.GlobalID, world.WorldSNO.Id)); + if (world.SNO == WorldSno.__NONE || !WorldExists(world.SNO)) + Logger.Error(String.Format("World has an invalid SNO or was not being tracked (ID = {0}, SNO = {1})", world.GlobalID, world.SNO)); else - this._worlds.TryRemove(world.WorldSNO.Id, out removed); + this._worlds.TryRemove(world.SNO, out removed); } - public World GetWorld(int worldSNO) + public World GetWorld(WorldSno worldSNO) { + if (worldSNO == WorldSno.__NONE) + return null; + World world; - if (this.CurrentAct != 3000 && worldSNO == 332336) //fix for a1 Tristram - worldSNO = 71150; + if (this.CurrentAct != 3000 && worldSNO == WorldSno.x1_tristram_adventure_mode_hub) //fix for a1 Tristram + worldSNO = WorldSno.trout_town; if (!WorldExists(worldSNO)) // If it doesn't exist, try to load it { @@ -1721,12 +1735,12 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem return world; } - public bool WorldExists(int worldSNO) + public bool WorldExists(WorldSno worldSNO) { return this._worlds.ContainsKey(worldSNO); } - public bool WorldCleared(int worldSNO) + public bool WorldCleared(WorldSno worldSNO) { return this._worlds[worldSNO].Actors.Values.OfType().Where(m => m.OriginalLevelArea != -1 && !m.Dead).Count() < 5; } @@ -1749,7 +1763,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem .Where(w => w.SNOWorld != -1).ToList(); var wayPointInfo = actData.Where(w => w.Flags == 3 || (isOpenWorld ? (w.Flags == 2) : (w.Flags == 1))).ToList(); //Logger.Debug("GetWayPointWorldById: world id {0}", wayPointInfo[id].SNOWorld); - return GetWorld(wayPointInfo[id].SNOWorld); + return GetWorld((WorldSno)wayPointInfo[id].SNOWorld); } #endregion diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/GameSystem/QuestManager.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/GameSystem/QuestManager.cs index 7eac6ed..895c134 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/GameSystem/QuestManager.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/GameSystem/QuestManager.cs @@ -30,6 +30,7 @@ using DiIiS_NA.GameServer.GSSystem.ItemsSystem; using DiIiS_NA.Core.Helpers.Math; //Blizzless Project 2022 using DiIiS_NA.GameServer.GSSystem.PlayerSystem; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.GameSystem { @@ -104,7 +105,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem Act = b.BountyData0.ActData, Type = b.BountyData0.Type, LevelArea = b.BountyData0.LeveAreaSNO0, - World = -1, + World = WorldSno.__NONE, Target = b.QuestSteps .SelectMany(s => s.StepObjectiveSets) .SelectMany(s => s.StepObjectives) @@ -146,7 +147,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem .SelectMany(s => s.StepObjectiveSets) .SelectMany(s => s.StepObjectives) .Single(o => o.ObjectiveType == DiIiS_NA.Core.MPQ.FileFormats.QuestStepObjectiveType.KillAny).SNOName1.Id, - World = -1, + World = WorldSno.__NONE, Target = b.QuestSteps .SelectMany(s => s.StepObjectiveSets) .SelectMany(s => s.StepObjectives) @@ -393,8 +394,11 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem { foreach (var plr in this.Game.Players.Values) { - if (plr.World.WorldSNO.Id == 50596) - plr.ChangeWorld(plr.World.Game.GetWorld(70885), plr.World.Game.GetWorld(70885).GetStartingPointById(63)); + if (plr.World.SNO == WorldSno.a2dun_zolt_timed01_level01) + { + var world = plr.World.Game.GetWorld(WorldSno.caout_town); + plr.ChangeWorld(world, world.GetStartingPointById(63)); + } } } @@ -844,7 +848,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem public DiIiS_NA.Core.MPQ.FileFormats.BountyData.ActT Act { get; set; } public DiIiS_NA.Core.MPQ.FileFormats.BountyData.BountyType Type { get; set; } public int LevelArea { get; set; } - public int World { get; set; } + public WorldSno World { get; set; } public bool PortalSpawned = false; public bool SubsceneSpawned = false; public int Target { get; set; } @@ -894,7 +898,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GameSystem }); } } - public void CheckKill(int snoId, int levelArea, int world) + public void CheckKill(int snoId, int levelArea, WorldSno world) { //435868 //220789 diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/GeneratorsSystem/DRLGTemplate.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/GeneratorsSystem/DRLGTemplate.cs index fb390fa..dccbf63 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/GeneratorsSystem/DRLGTemplate.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/GeneratorsSystem/DRLGTemplate.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; //Blizzless Project 2022 using DiIiS_NA.Core.Helpers.Math; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem { @@ -18,10 +19,10 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem public List> map; }; - public static readonly Dictionary> Templates = new Dictionary> + public static readonly Dictionary> Templates = new Dictionary> { #region Cathedral - {50579, //cath, 1st level + {WorldSno.a1trdun_level01, //cath, 1st level new List{ new DRLGLayout{ enterPositionX = 1, @@ -65,7 +66,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem } } }, - {50582, //cath, 2nd level + {WorldSno.a1trdun_level04, //cath, 2nd level new List{ new DRLGLayout{ enterPositionX = 3, @@ -83,7 +84,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {50584, //cath, 4th level + {WorldSno.a1trdun_level06, //cath, 4th level new List{ new DRLGLayout{ enterPositionX = 5, @@ -118,7 +119,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, #endregion #region Araneae - {180550, //Caverns of Araneae + {WorldSno.a1dun_spidercave_01, //Caverns of Araneae new List{ new DRLGLayout{ enterPositionX = 2, @@ -140,7 +141,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, #endregion #region Fields of Misery - {82370, //Lost Mine, 1st level + {WorldSno.a1_cave_fields_minecavea_level01, //Lost Mine, 1st level new List{ new DRLGLayout{ enterPositionX = 4, @@ -158,7 +159,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {82371, //Lost Mine, 2nd level + {WorldSno.a1_cave_fields_minecavea_level02, //Lost Mine, 2nd level new List{ new DRLGLayout{ enterPositionX = 4, @@ -175,7 +176,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {102299, //Decaying Crypt, 1st level + {WorldSno.trdun_crypt_fields_flooded_memories_level01, //Decaying Crypt, 1st level new List{ new DRLGLayout{ enterPositionX = 2, @@ -194,7 +195,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {165797, //Decaying Crypt, 2nd level + {WorldSno.trdun_crypt_fields_flooded_memories_level02, //Decaying Crypt, 2nd level new List{ new DRLGLayout{ enterPositionX = 2, @@ -211,7 +212,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {119888, //Khazra Den + {WorldSno.fields_cave_swordofjustice_level01, //Khazra Den new List{ new DRLGLayout{ enterPositionX = 2, @@ -228,7 +229,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {81163, //Scavenger's Den 1st level + {WorldSno.a1_cave_fields_scavengerden_level01, //Scavenger's Den 1st level new List{ new DRLGLayout{ enterPositionX = 3, @@ -245,7 +246,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {81164, //Scavenger's Den 2nd level + {WorldSno.a1_cave_fields_scavengerden_level02, //Scavenger's Den 2nd level new List{ new DRLGLayout{ enterPositionX = 1, @@ -263,7 +264,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, #endregion #region Defiled crypts - {154587, //Defiled crypts, true + {WorldSno.trdun_crypt_skeletonkingcrown_00, //Defiled crypts, true new List{ new DRLGLayout{ enterPositionX = 1, @@ -280,7 +281,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {72638, //Defiled crypts, falseOne + {WorldSno.trdun_crypt_falsepassage_01, //Defiled crypts, falseOne new List{ new DRLGLayout{ enterPositionX = 1, @@ -297,7 +298,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {72637, //Defiled crypts, falseTwo + {WorldSno.trdun_crypt_falsepassage_02, //Defiled crypts, falseTwo new List{ new DRLGLayout{ enterPositionX = 2, @@ -316,7 +317,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, #endregion #region 4th Act - {121579, //The Silver Spire, 1st level + {WorldSno.a4dun_spire_level_01, //The Silver Spire, 1st level new List{ new DRLGLayout{ enterPositionX = 3, @@ -334,7 +335,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {129305, //The Silver Spire, 2nd level + {WorldSno.a4dun_spire_level_02, //The Silver Spire, 2nd level new List{ new DRLGLayout{ enterPositionX = 1, @@ -352,7 +353,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {129306, //The Silver Spire, 4th level + {WorldSno.a4dun_spire_level_03, //The Silver Spire, 4th level new List{ new DRLGLayout{ enterPositionX = 1, @@ -378,7 +379,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem } } }, - {210725, //The Silver Spire, 5th level + {WorldSno.a4dun_spire_level_04, //The Silver Spire, 5th level new List{ new DRLGLayout{ enterPositionX = 1, @@ -398,7 +399,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, #endregion #region 3rd Act - {93104, //The Keep Depths, 1st level + {WorldSno.a3dun_keep_level03, //The Keep Depths, 1st level new List{ new DRLGLayout{ enterPositionX = 2, @@ -415,7 +416,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {75434, //The Keep Depths, 2nd level + {WorldSno.a3dun_keep_level04, //The Keep Depths, 2nd level new List{ new DRLGLayout{ enterPositionX = 4, @@ -434,7 +435,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {136415, //The Keep Depths, 3rd level + {WorldSno.a3dun_keep_level05, //The Keep Depths, 3rd level new List{ new DRLGLayout{ enterPositionX = 3, @@ -453,7 +454,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {189910, //Icefall Caves, 1st level + {WorldSno.a3dun_icecaves_timed_01, //Icefall Caves, 1st level new List{ new DRLGLayout{ enterPositionX = 2, @@ -470,7 +471,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {221689, //Icefall Caves, 2nd level + {WorldSno.a3dun_icecaves_timed_01_level_02, //Icefall Caves, 2nd level new List{ new DRLGLayout{ enterPositionX = 1, @@ -486,7 +487,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {189259, //Caverns of Frost, 1st level + {WorldSno.a3dun_icecaves_random_01, //Caverns of Frost, 1st level new List{ new DRLGLayout{ enterPositionX = 1, @@ -503,7 +504,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {221688, //Caverns of Frost, 2nd level + {WorldSno.a3dun_icecaves_random_01_level_02, //Caverns of Frost, 2nd level new List{ new DRLGLayout{ enterPositionX = 3, @@ -520,7 +521,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {174516, //Fortified Bunker, 1st level + {WorldSno.a3dun_keep_random_01, //Fortified Bunker, 1st level new List{ new DRLGLayout{ enterPositionX = 3, @@ -538,7 +539,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {221748, //Fortified Bunker, 2nd level + {WorldSno.a3dun_keep_random_01_level_02, //Fortified Bunker, 2nd level new List{ new DRLGLayout{ enterPositionX = 3, @@ -556,7 +557,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {174555, //The Barracks, 1st level + {WorldSno.a3dun_keep_random_02, //The Barracks, 1st level new List{ new DRLGLayout{ enterPositionX = 3, @@ -574,7 +575,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {221749, //The Barracks, 2nd level + {WorldSno.a3dun_keep_random_02_level_02, //The Barracks, 2nd level new List{ new DRLGLayout{ enterPositionX = 3, @@ -592,7 +593,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {174560, //Battlefield Stores, 1st level + {WorldSno.a3dun_keep_random_03, //Battlefield Stores, 1st level new List{ new DRLGLayout{ enterPositionX = 3, @@ -610,7 +611,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {221750, //Battlefield Stores, 2nd level + {WorldSno.a3dun_keep_random_03_level_02, //Battlefield Stores, 2nd level new List{ new DRLGLayout{ enterPositionX = 3, @@ -628,7 +629,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {174665, //The Foundry, 1st level + {WorldSno.a3dun_keep_random_04, //The Foundry, 1st level new List{ new DRLGLayout{ enterPositionX = 3, @@ -646,7 +647,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {221751, //The Foundry, 2nd level + {WorldSno.a3dun_keep_random_04_level_02, //The Foundry, 2nd level new List{ new DRLGLayout{ enterPositionX = 1, @@ -665,7 +666,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, #endregion #region 2nd Act - {50588, //Sewers of Caldeum + {WorldSno.a2c1dun_swr_caldeum_01, //Sewers of Caldeum new List{ new DRLGLayout{ enterPositionX = 3, @@ -684,7 +685,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {50589, //Sirocco Caverns, 1st level + {WorldSno.a2c2dun_cave_random01, //Sirocco Caverns, 1st level new List{ new DRLGLayout{ enterPositionX = 4, @@ -701,7 +702,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {220804, //Sirocco Caverns, 2nd level + {WorldSno.a2c2dun_cave_random01_level02, //Sirocco Caverns, 2nd level new List{ new DRLGLayout{ enterPositionX = 2, @@ -717,7 +718,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {2812, //Chamber of the Lost Idol + {WorldSno.a2c2dun_zolt_treasurehunter, //Chamber of the Lost Idol new List{ new DRLGLayout{ enterPositionX = 1, @@ -735,7 +736,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {62776, //Western Channel + {WorldSno.a2dun_aqd_special_a, //Western Channel new List{ new DRLGLayout{ enterPositionX = 3, @@ -754,7 +755,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {62779, //Eastern Channel + {WorldSno.a2dun_aqd_special_b, //Eastern Channel new List{ new DRLGLayout{ enterPositionX = 4, @@ -772,7 +773,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {157882, //Tomb of Sardar + {WorldSno.a2dun_aqd_oasis_randomfacepuzzle_small, //Tomb of Sardar new List{ new DRLGLayout{ enterPositionX = 2, @@ -790,7 +791,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {158593, //Tomb of Khan Dakab + {WorldSno.a2dun_aqd_oasis_randomfacepuzzle_large, //Tomb of Khan Dakab new List{ new DRLGLayout{ enterPositionX = 3, @@ -809,7 +810,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {111666, //Cave of Burrowing Horror, 1st level + {WorldSno.a2dun_boneyard_worm_cave_01, //Cave of Burrowing Horror, 1st level new List{ new DRLGLayout{ enterPositionX = 1, @@ -827,7 +828,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {218970, //Cave of Burrowing Horror, 2nd level + {WorldSno.a2dun_boneyard_worm_cave_02, //Cave of Burrowing Horror, 2nd level new List{ new DRLGLayout{ enterPositionX = 2, @@ -844,7 +845,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {204628, //Cave of the Betrayer, 1st level + {WorldSno.a2dun_cave_bloodvial_01, //Cave of the Betrayer, 1st level new List{ new DRLGLayout{ enterPositionX = 2, @@ -861,7 +862,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {204674, //Cave of the Betrayer, 2nd level + {WorldSno.a2dun_cave_bloodvial_02, //Cave of the Betrayer, 2nd level new List{ new DRLGLayout{ enterPositionX = 2, @@ -878,7 +879,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {169477, //Mysterious Cave, 1st level + {WorldSno.a2dun_cave_mapdungeon_level01, //Mysterious Cave, 1st level new List{ new DRLGLayout{ enterPositionX = 2, @@ -895,7 +896,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {194238, //Mysterious Cave, 2nd level + {WorldSno.a2dun_cave_mapdungeon_level02, //Mysterious Cave, 2nd level new List{ new DRLGLayout{ enterPositionX = 1, @@ -911,7 +912,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {146619, //Ruined Cistern + {WorldSno.a2dun_swr_swr_to_oasis_level01, //Ruined Cistern new List{ new DRLGLayout{ enterPositionX = 2, @@ -928,7 +929,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {80589, //Realm of Shadow + {WorldSno.a2dun_zolt_shadowrealm_level01, //Realm of Shadow new List{ new DRLGLayout{ enterPositionX = 2, @@ -945,7 +946,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {61631, //The Forgotten Ruins + {WorldSno.a2dun_zolt_head_random01, //The Forgotten Ruins new List{ new DRLGLayout{ enterPositionX = 2, @@ -962,7 +963,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {50594, //The Ruins, 1st level + {WorldSno.a2dun_zolt_sw_random01, //The Ruins, 1st level new List{ new DRLGLayout{ enterPositionX = 2, @@ -979,7 +980,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {222575, //The Ruins, 2nd level + {WorldSno.a2dun_zolt_sw_random01_level02, //The Ruins, 2nd level new List{ new DRLGLayout{ enterPositionX = 2, @@ -996,7 +997,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {123183, //Vault of the Assassin + {WorldSno.a2dun_zolt_blood02, //Vault of the Assassin new List{ new DRLGLayout{ enterPositionX = 2, @@ -1013,7 +1014,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {50596, //The Crumbling Vault + {WorldSno.a2dun_zolt_timed01_level01, //The Crumbling Vault new List{ new DRLGLayout{ enterPositionX = 3, @@ -1043,7 +1044,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {50610, //The Unknown Depths + {WorldSno.a2dun_zolt_level01, //The Unknown Depths new List{ new DRLGLayout{ enterPositionX = 2, @@ -1060,7 +1061,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {50611, //The Storm Halls + {WorldSno.a2dun_zolt_level02, //The Storm Halls new List{ new DRLGLayout{ enterPositionX = 2, @@ -1077,7 +1078,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {50612, //Halls of Dusk + {WorldSno.a2dun_zolt_level03, //Halls of Dusk new List{ new DRLGLayout{ enterPositionX = 2, @@ -1094,7 +1095,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {168196, //Vault Treasure Room + {WorldSno.a2dun_zolt_timed01_level02, //Vault Treasure Room new List{ new DRLGLayout{ enterPositionX = 1, @@ -1110,7 +1111,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {62568, //Ancient Cave, 1st level + {WorldSno.a2trdun_cave_oasis_random01, //Ancient Cave, 1st level new List{ new DRLGLayout{ enterPositionX = 2, @@ -1127,7 +1128,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {194240, //Ancient Cave, 2nd level + {WorldSno.a2trdun_cave_oasis_random01_level02, //Ancient Cave, 2nd level new List{ new DRLGLayout{ enterPositionX = 2, @@ -1144,7 +1145,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {62569, //Flooded Cave, 1st level + {WorldSno.a2trdun_cave_oasis_random02, //Flooded Cave, 1st level new List{ new DRLGLayout{ enterPositionX = 2, @@ -1161,7 +1162,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {161011, //Flooded Cave, 2nd level + {WorldSno.a2trdun_cave_oasis_random02_level02, //Flooded Cave, 2nd level new List{ new DRLGLayout{ enterPositionX = 2, @@ -1178,7 +1179,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {111670, //Vile Cavern, 1st level + {WorldSno.a2trdun_boneyard_spider_cave_01, //Vile Cavern, 1st level new List{ new DRLGLayout{ enterPositionX = 2, @@ -1195,7 +1196,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {218967, //Vile Cavern, 2st level + {WorldSno.a2trdun_boneyard_spider_cave_02, //Vile Cavern, 2st level new List{ new DRLGLayout{ enterPositionX = 2, @@ -1214,7 +1215,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, #endregion #region Halls of Agony - {2826, //Halls of Agony, 1st level + {WorldSno.trdun_leoric_level01, //Halls of Agony, 1st level new List{ new DRLGLayout{ enterPositionX = 1, @@ -1232,7 +1233,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {58983, //Halls of Agony, 3rd level + {WorldSno.trdun_leoric_level03, //Halls of Agony, 3rd level new List{ new DRLGLayout{ enterPositionX = 1, @@ -1252,7 +1253,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, #endregion #region Westmarch - {261712, //Westmarch commons + {WorldSno.x1_westm_zone_01, //Westmarch commons new List{ new DRLGLayout{ enterPositionX = 2, @@ -1272,7 +1273,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {338944, //Briarthorn Cemetery + {WorldSno.x1_westm_graveyard_deathorb, //Briarthorn Cemetery new List{ new DRLGLayout{ enterPositionX = 2, @@ -1293,7 +1294,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {263494, //Westmarch heights + {WorldSno.x1_westm_zone_03, //Westmarch heights new List{ new DRLGLayout{ enterPositionX = 1, @@ -1328,7 +1329,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {338600, //Battlefields of Eternity + {WorldSno.x1_pand_ext_2_battlefields, //Battlefields of Eternity new List{ new DRLGLayout{ enterPositionX = 5, @@ -1424,7 +1425,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {271233, //Pandemonius fortress lv. 1 + {WorldSno.x1_fortress_level_01, //Pandemonius fortress lv. 1 new List{ new DRLGLayout{ enterPositionX = 3, @@ -1442,7 +1443,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {271235, //Pandemonius fortress lv. 2 + {WorldSno.x1_fortress_level_02, //Pandemonius fortress lv. 2 new List{ new DRLGLayout{ enterPositionX = 4, @@ -1462,7 +1463,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {283566, //Ruins of Corvus + {WorldSno.x1_catacombs_level02, //Ruins of Corvus new List{ new DRLGLayout{ enterPositionX = 8, @@ -1480,7 +1481,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {283552, //Path to Corvus + {WorldSno.x1_catacombs_level01, //Path to Corvus new List{ new DRLGLayout{ enterPositionX = 3, @@ -1498,7 +1499,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {341037, //Path to Corvus (fake) + {WorldSno.x1_catacombs_fakeentrance_02, //Path to Corvus (fake) new List{ new DRLGLayout{ enterPositionX = 3, @@ -1516,7 +1517,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {341038, //Path to Corvus (fake) + {WorldSno.x1_catacombs_fakeentrance_03, //Path to Corvus (fake) new List{ new DRLGLayout{ enterPositionX = 3, @@ -1534,7 +1535,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {341040, //Path to Corvus (fake) + {WorldSno.x1_catacombs_fakeentrance_04, //Path to Corvus (fake) new List{ new DRLGLayout{ enterPositionX = 3, @@ -1552,7 +1553,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem }, } }, - {267412, //Bog (the whole) + {WorldSno.x1_bog_01, //Bog (the whole) new List{ new DRLGLayout{ enterPositionX = 8, diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/GeneratorsSystem/LoreRegistry.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/GeneratorsSystem/LoreRegistry.cs index d561e24..1019a3f 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/GeneratorsSystem/LoreRegistry.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/GeneratorsSystem/LoreRegistry.cs @@ -8,6 +8,7 @@ using System.Linq; using System.Text; //Blizzless Project 2022 using System.Threading.Tasks; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem { @@ -18,10 +19,10 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem public Dictionary> chests_lore; }; - public static readonly Dictionary Lore = new Dictionary + public static readonly Dictionary Lore = new Dictionary { //////////////////////////////////////////////////////////////////////////////////////////////////Act I/////////////////////////////////////////////////////////////////////////////////////////// - {71150, new LoreLayout{ chests_lore = new Dictionary>{ + {WorldSno.trout_town, new LoreLayout{ chests_lore = new Dictionary>{ {224686, new List{158668}}, {199346, new List{201960}}, {158681, new List{98897}}, @@ -39,30 +40,30 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem {119801, new List{106821}}, {137125, new List{106823}}, {108792, new List{145423}}, }}}, //NewTristram - {109362, new LoreLayout{ chests_lore = new Dictionary>{ {230232, new List{211567}}, }}}, //New Tristram tavern - {86856, new LoreLayout{ chests_lore = new Dictionary>{ {86817, new List{86639, 89489, 89519, 89520, 89521, 89522, 89523}}, }}}, //New Tristram Leah's room - {130161, new LoreLayout{ chests_lore = new Dictionary>{ {115124, new List{115115, 167797}}, }}}, //Cain's house - {50579, new LoreLayout{ chests_lore = new Dictionary>{ {85790, new List{85757, 85759}}, }}}, //Sobor: level 1 - {50584, new LoreLayout{ chests_lore = new Dictionary>{ {85790, new List{85779, 85780, 85781}}, }}}, //Sobor: level 4 - {2826, new LoreLayout{ chests_lore = new Dictionary>{ {159446, new List{84556}}, + {WorldSno.trout_tristram_inn, new LoreLayout{ chests_lore = new Dictionary>{ {230232, new List{211567}}, }}}, //New Tristram tavern + {WorldSno.trout_tristram_leahsroom, new LoreLayout{ chests_lore = new Dictionary>{ {86817, new List{86639, 89489, 89519, 89520, 89521, 89522, 89523}}, }}}, //New Tristram Leah's room + {WorldSno.trout_tristram_cainshouse, new LoreLayout{ chests_lore = new Dictionary>{ {115124, new List{115115, 167797}}, }}}, //Cain's house + {WorldSno.a1trdun_level01, new LoreLayout{ chests_lore = new Dictionary>{ {85790, new List{85757, 85759}}, }}}, //Sobor: level 1 + {WorldSno.a1trdun_level06, new LoreLayout{ chests_lore = new Dictionary>{ {85790, new List{85779, 85780, 85781}}, }}}, //Sobor: level 4 + {WorldSno.trdun_leoric_level01, new LoreLayout{ chests_lore = new Dictionary>{ {159446, new List{84556}}, {5891, new List{156458}}, {170633, new List{85714}}, }}}, //Hall agony: level 1 - {58982, new LoreLayout{ chests_lore = new Dictionary>{ {159446, new List{85724}}, + {WorldSno.trdun_leoric_level02, new LoreLayout{ chests_lore = new Dictionary>{ {159446, new List{85724}}, {5891, new List{156460}}, {170633, new List{85719}}, }}}, //Hall agony: level 2 - {58983, new LoreLayout{ chests_lore = new Dictionary>{ {159446, new List{85729}}, }}}, //Hall agony: level 3 - {180550, new LoreLayout{ chests_lore = new Dictionary>{ {167350, new List{154405, 156462, 156453, 156455}}, }}}, //Сave Arana - {94676, new LoreLayout{ chests_lore = new Dictionary>{ {105758, new List{107268}}, }}}, //Damn Fort - {75049, new LoreLayout{ chests_lore = new Dictionary>{ {187436, new List{144181}}, }}}, //Leoric Manor - {82502, new LoreLayout{ chests_lore = new Dictionary>{ {166661, new List{166878}}, }}}, //Сave clan moon: level 1 - {82511, new LoreLayout{ chests_lore = new Dictionary>{ {166661, new List{166896, 166898}}, }}}, //Сave clan moon: level 2 - {60395, new LoreLayout{ chests_lore = new Dictionary>{ {137189, new List{119733}}, }}}, //Sunken temple + {WorldSno.trdun_leoric_level03, new LoreLayout{ chests_lore = new Dictionary>{ {159446, new List{85729}}, }}}, //Hall agony: level 3 + {WorldSno.a1dun_spidercave_01, new LoreLayout{ chests_lore = new Dictionary>{ {167350, new List{154405, 156462, 156453, 156455}}, }}}, //Сave Arana + {WorldSno.trdun_jail_level01, new LoreLayout{ chests_lore = new Dictionary>{ {105758, new List{107268}}, }}}, //Damn Fort + {WorldSno.a1dun_leor_manor, new LoreLayout{ chests_lore = new Dictionary>{ {187436, new List{144181}}, }}}, //Leoric Manor + {WorldSno.a1_cave_highlands_goatcavea_level01, new LoreLayout{ chests_lore = new Dictionary>{ {166661, new List{166878}}, }}}, //Сave clan moon: level 1 + {WorldSno.a1_cave_highlands_goatcavea_level02, new LoreLayout{ chests_lore = new Dictionary>{ {166661, new List{166896, 166898}}, }}}, //Сave clan moon: level 2 + {WorldSno.trdun_cave_nephalem_03, new LoreLayout{ chests_lore = new Dictionary>{ {137189, new List{119733}}, }}}, //Sunken temple //////////////////////////////////////////////////////////////////////////////////////////////////Act II/////////////////////////////////////////////////////////////////////////////////////////// - {70885, new LoreLayout{ chests_lore = new Dictionary>{ + {WorldSno.caout_town, new LoreLayout{ chests_lore = new Dictionary>{ {170233, new List{170224}}, {194145, new List{189736, 189764, 189779, 189781, 189783, 189785}}, {169836, new List{171460, 169932}}, @@ -76,26 +77,26 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem {230712, new List{183610}}, {218649, new List{178770}}, {192437, new List{189677, 189679, 189687}}, }}}, //Caldeum - {204628, new LoreLayout{ chests_lore = new Dictionary>{ {216316, new List{148806}}, }}}, //Пещера предателя: уровень 1 - {123183, new LoreLayout{ chests_lore = new Dictionary>{ {216311, new List{148800}}, }}}, //Гробница наемника - {204674, new LoreLayout{ chests_lore = new Dictionary>{ {216768, new List{148812}}, }}}, //Пещера предателя: уровень 2 - {161472, new LoreLayout{ chests_lore = new Dictionary>{ {192154, new List{189698, 189700, 189702, 189704, 189715}}, }}}, //Тайный лагерь - {174530, new LoreLayout{ chests_lore = new Dictionary>{ {190014, new List{189657, 189660, 189664, 189666, 189669, 189671}}, }}}, //Таверна "Жгучие пески" - {51270, new LoreLayout{ chests_lore = new Dictionary>{ {194145, new List{189789}}, }}}, //Тайный алтарь - {146619, new LoreLayout{ chests_lore = new Dictionary>{ {194145, new List{189806}}, }}}, //Разрушенный резервуар - {2812, new LoreLayout{ chests_lore = new Dictionary>{ {192325, new List{189826}}, }}}, //Зал Утерянного Идола - {109894, new LoreLayout{ chests_lore = new Dictionary>{ {169999, new List{170007}}, }}}, //Caldeum(Uprising) - {86594, new LoreLayout{ chests_lore = new Dictionary>{ {170063, new List{170064}}, + {WorldSno.a2dun_cave_bloodvial_01, new LoreLayout{ chests_lore = new Dictionary>{ {216316, new List{148806}}, }}}, //Пещера предателя: уровень 1 + {WorldSno.a2dun_zolt_blood02, new LoreLayout{ chests_lore = new Dictionary>{ {216311, new List{148800}}, }}}, //Гробница наемника + {WorldSno.a2dun_cave_bloodvial_02, new LoreLayout{ chests_lore = new Dictionary>{ {216768, new List{148812}}, }}}, //Пещера предателя: уровень 2 + {WorldSno.caout_refugeecamp, new LoreLayout{ chests_lore = new Dictionary>{ {192154, new List{189698, 189700, 189702, 189704, 189715}}, }}}, //Тайный лагерь + {WorldSno.caout_hub_inn, new LoreLayout{ chests_lore = new Dictionary>{ {190014, new List{189657, 189660, 189664, 189666, 189669, 189671}}, }}}, //Таверна "Жгучие пески" + {WorldSno.caout_interior_f, new LoreLayout{ chests_lore = new Dictionary>{ {194145, new List{189789}}, }}}, //Тайный алтарь + {WorldSno.a2dun_swr_swr_to_oasis_level01, new LoreLayout{ chests_lore = new Dictionary>{ {194145, new List{189806}}, }}}, //Разрушенный резервуар + {WorldSno.a2c2dun_zolt_treasurehunter, new LoreLayout{ chests_lore = new Dictionary>{ {192325, new List{189826}}, }}}, //Зал Утерянного Идола + {WorldSno.a2dun_cald_uprising, new LoreLayout{ chests_lore = new Dictionary>{ {169999, new List{170007}}, }}}, //Caldeum(Uprising) + {WorldSno.a2dun_cald, new LoreLayout{ chests_lore = new Dictionary>{ {170063, new List{170064}}, {145601, new List{156470}},}}}, //Caldeum bazaar - {50657, new LoreLayout{ chests_lore = new Dictionary>{ {167090, new List{156472}}, }}}, //Сокрытый конклав - {50588, new LoreLayout{ chests_lore = new Dictionary>{ {145609, new List{156478}}, }}}, //Калдейские стоки - {61631, new LoreLayout{ chests_lore = new Dictionary>{ {216022, new List{148672}}, + {WorldSno.caout_interior_d, new LoreLayout{ chests_lore = new Dictionary>{ {167090, new List{156472}}, }}}, //Сокрытый конклав + {WorldSno.a2c1dun_swr_caldeum_01, new LoreLayout{ chests_lore = new Dictionary>{ {145609, new List{156478}}, }}}, //Калдейские стоки + {WorldSno.a2dun_zolt_head_random01, new LoreLayout{ chests_lore = new Dictionary>{ {216022, new List{148672}}, {216805, new List{148707}},}}}, //Заброшенные руины - {62776, new LoreLayout{ chests_lore = new Dictionary>{ {216308, new List{148680}}, + {WorldSno.a2dun_aqd_special_a, new LoreLayout{ chests_lore = new Dictionary>{ {216308, new List{148680}}, {189984, new List{189652}},}}}, //Западный канал - {50611, new LoreLayout{ chests_lore = new Dictionary>{ {216805, new List{148693}}, }}}, //Залы Бурь - {50610, new LoreLayout{ chests_lore = new Dictionary>{ {216805, new List{148701}}, }}}, //Таинственная бездна - {62779, new LoreLayout{ chests_lore = new Dictionary>{ {189984, new List{189654}}, }}}, //Восточный канал + {WorldSno.a2dun_zolt_level02, new LoreLayout{ chests_lore = new Dictionary>{ {216805, new List{148693}}, }}}, //Залы Бурь + {WorldSno.a2dun_zolt_level01, new LoreLayout{ chests_lore = new Dictionary>{ {216805, new List{148701}}, }}}, //Таинственная бездна + {WorldSno.a2dun_aqd_special_b, new LoreLayout{ chests_lore = new Dictionary>{ {189984, new List{189654}}, }}}, //Восточный канал @@ -103,29 +104,29 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem //////////////////////////////////////////////////////////////////////////////////////////////////Act III/////////////////////////////////////////////////////////////////////////////////////////// - {93104, new LoreLayout{ chests_lore = new Dictionary>{ {204724, new List{204678}}, + {WorldSno.a3dun_keep_level03, new LoreLayout{ chests_lore = new Dictionary>{ {204724, new List{204678}}, {213447, new List{204820}}, {213470, new List{204828, 204831, 204839, 204846, 204848}},}}}, //Нижние этажи крепости: уровень 1 - {103209, new LoreLayout{ chests_lore = new Dictionary>{ {212704, new List{204850}}, }}}, //Кладовая - {172909, new LoreLayout{ chests_lore = new Dictionary>{ {178357, new List{178349}}, }}}, //Главная башня бастиона - {182875, new LoreLayout{ chests_lore = new Dictionary>{ {212222, new List{204853, 204859, 204875, 204878}}, }}}, //Оружейная - {81019, new LoreLayout{ chests_lore = new Dictionary>{ {192778, new List{190879, 191086, 191133}}, + {WorldSno.gluttony_boss, new LoreLayout{ chests_lore = new Dictionary>{ {212704, new List{204850}}, }}}, //Кладовая + {WorldSno.a3dun_hub_keep, new LoreLayout{ chests_lore = new Dictionary>{ {178357, new List{178349}}, }}}, //Главная башня бастиона + {WorldSno.a3dun_keep_hub_inn, new LoreLayout{ chests_lore = new Dictionary>{ {212222, new List{204853, 204859, 204875, 204878}}, }}}, //Оружейная + {WorldSno.a3dun_rmpt_level01, new LoreLayout{ chests_lore = new Dictionary>{ {192778, new List{190879, 191086, 191133}}, {213445, new List{204033}}, }}}, //Заоблачные стены - {93099, new LoreLayout{ chests_lore = new Dictionary>{ {213446, new List{204817}}, }}}, //Каменный форт - {95804, new LoreLayout{ chests_lore = new Dictionary>{ {213445, new List{204822}}, + {WorldSno.a3dun_rmpt_level02, new LoreLayout{ chests_lore = new Dictionary>{ {213446, new List{204817}}, }}}, //Каменный форт + {WorldSno.a3_battlefields_02, new LoreLayout{ chests_lore = new Dictionary>{ {213445, new List{204822}}, {213446, new List{204824}},}}}, //Поля Кровавой Бойни - {81049, new LoreLayout{ chests_lore = new Dictionary>{ {213447, new List{204826}}, }}}, //Арреатский кратер: уровень 1 - {174516, new LoreLayout{ chests_lore = new Dictionary>{ {178366, new List{178367}}, }}}, //Укрепленный бункер: уровень 1 + {WorldSno.a3dun_crater_level_01, new LoreLayout{ chests_lore = new Dictionary>{ {213447, new List{204826}}, }}}, //Арреатский кратер: уровень 1 + {WorldSno.a3dun_keep_random_01, new LoreLayout{ chests_lore = new Dictionary>{ {178366, new List{178367}}, }}}, //Укрепленный бункер: уровень 1 //////////////////////////////////////////////////////////////////////////////////////////////////Act IV/////////////////////////////////////////////////////////////////////////////////////////// - {178152, new LoreLayout{ chests_lore = new Dictionary>{ {177462, new List{166775}}, }}}, //Главная башня бастиона - {109513, new LoreLayout{ chests_lore = new Dictionary>{ {216482, new List{193560, 193586, 193568}}, }}}, //Сады надежды: уровень 1 - {219659, new LoreLayout{ chests_lore = new Dictionary>{ {216482, new List{193574, 193580, 193592}}, }}}, //Сады надежды: уровень 2 - {121579, new LoreLayout{ chests_lore = new Dictionary>{ {216551, new List{211609, 211611, 211613}}, + {WorldSno.a4dun_heaven_hub_keep, new LoreLayout{ chests_lore = new Dictionary>{ {177462, new List{166775}}, }}}, //Главная башня бастиона + {WorldSno.a4dun_garden_of_hope_01, new LoreLayout{ chests_lore = new Dictionary>{ {216482, new List{193560, 193586, 193568}}, }}}, //Сады надежды: уровень 1 + {WorldSno.a4dun_garden_of_hope_random, new LoreLayout{ chests_lore = new Dictionary>{ {216482, new List{193574, 193580, 193592}}, }}}, //Сады надежды: уровень 2 + {WorldSno.a4dun_spire_level_01, new LoreLayout{ chests_lore = new Dictionary>{ {216551, new List{211609, 211611, 211613}}, {216537, new List{211599, 211601, 211603, 211605}},}}}, //Серебрянный шпиль: уровень 1 }; diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/GeneratorsSystem/WorldGenerator.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/GeneratorsSystem/WorldGenerator.cs index fd56877..573b799 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/GeneratorsSystem/WorldGenerator.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/GeneratorsSystem/WorldGenerator.cs @@ -48,6 +48,7 @@ using DiIiS_NA.GameServer.Core.Types.Scene; using DiIiS_NA.GameServer.MessageSystem; //Blizzless Project 2022 using DiIiS_NA.GameServer.GSSystem.ActorSystem.Interactions; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem { @@ -98,30 +99,30 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem } } - public World Generate(int worldSNO) + public World Generate(WorldSno worldSNO) { - if (!MPQStorage.Data.Assets[SNOGroup.Worlds].ContainsKey(worldSNO)) + if (!MPQStorage.Data.Assets[SNOGroup.Worlds].ContainsKey((int)worldSNO)) { Logger.Error("Can't find a valid world definition for sno: {0}", worldSNO); return null; } - var worldAsset = MPQStorage.Data.Assets[SNOGroup.Worlds][worldSNO]; + var worldAsset = MPQStorage.Data.Assets[SNOGroup.Worlds][(int)worldSNO]; Dictionary> levelAreas = new Dictionary>(); World world = new World(this.Game, worldSNO); bool DRLGEmuActive = false; world.worldData = (DiIiS_NA.Core.MPQ.FileFormats.World)worldAsset.Data; - if (worldSNO == 146619) + if (worldSNO == WorldSno.a2dun_swr_swr_to_oasis_level01) world.worldData.DynamicWorld = true; - + //445736 - p4_forest_snow_icecave_01 - if (world.worldData.DynamicWorld && worldSNO != 161961 && worldSNO != 230288 && worldSNO != 430335 && worldSNO != 445736 && worldSNO != 444305 && worldSNO != 109530 && worldSNO != 109525 && worldSNO != 85201 && worldSNO != 119650 && worldSNO != 119641 && worldSNO != 139272 && worldSNO != 80763 && worldSNO != 79401 && worldSNO != 80791 && worldSNO != 81934 && worldSNO != 81049 && worldSNO != 61631 && worldSNO != 50588 && worldSNO != 428493 && worldSNO != 219659 && worldSNO != 58982 && worldSNO != 58983 && worldSNO != 105406 && worldSNO != 204674 && !world.WorldSNO.Name.Contains("Crater") && !world.WorldSNO.Name.Contains("Hell_Portal")) //Gardens of Hope - 2 lvl is NOT random + if (world.worldData.DynamicWorld && !worldSNO.IsNotDynamicWorld()) //Gardens of Hope - 2 lvl is NOT random { if (!GameServer.Config.Instance.DRLGemu) Logger.Warn("DRLG-Emu деактивирован."); string DRLGVersion = "1.8"; - var WorldContainer = DBSessions.WorldSession.Query().Where(dbt => dbt.WorldSNO == worldSNO).ToList(); - if (WorldContainer.Count > 0 && worldSNO != 105406 && GameServer.Config.Instance.DRLGemu) + var WorldContainer = DBSessions.WorldSession.Query().Where(dbt => dbt.WorldSNO == (int)worldSNO).ToList(); + if (WorldContainer.Count > 0 && worldSNO != WorldSno.a1trdun_level05_templar && GameServer.Config.Instance.DRLGemu) { DRLGEmuActive = true; Logger.Warn("Мир - {0} [{1}] динамический! Найден контейнер, DRLG-Emu v{2} Активирован!", worldAsset.Name, worldAsset.SNOId, DRLGVersion); @@ -160,9 +161,9 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem } else { - world.PrevLocation = new DiIiS_NA.GameServer.MessageSystem.Message.Fields.ResolvedPortalDestination + world.PrevLocation = new MessageSystem.Message.Fields.ResolvedPortalDestination { - WorldSNO = -1, + WorldSNO = (int)WorldSno.__NONE, DestLevelAreaSNO = -1, StartingPointActorTag = -1 }; @@ -177,7 +178,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem List EndChuncks = new List { }; List FillerChuncks = new List { }; - var WorldContainer = DBSessions.WorldSession.Query().Where(dbt => dbt.WorldSNO == world.WorldSNO.Id).First(); + var WorldContainer = DBSessions.WorldSession.Query().Where(dbt => dbt.WorldSNO == (int)world.SNO).First(); var DRLGTiles = DBSessions.WorldSession.Query().Where(dbt => dbt.Head_Container == (int)WorldContainer.Id).ToList(); REP: @@ -210,7 +211,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem DRLGContainers.Add(EndChuncks); DRLGContainers.Add(FillerChuncks); - if (world.WorldSNO.Name.ToLower().Contains("x1_lr")) + if (world.SNO.IsGenerated()) while (true) { @@ -376,7 +377,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem //world.LevelAreasData = levelAreas; - if (worldSNO == 105406) + if (worldSNO == WorldSno.a1trdun_level05_templar) world.SpawnMonster(6442, new Vector3D { X = 700.67f, Y = 580.128f, Z = 0.1f }); try @@ -392,29 +393,29 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem #region Патчи switch (worldSNO) { - case 338600: //x1_pand_ext_2_battlefields + case WorldSno.x1_pand_ext_2_battlefields: //x1_pand_ext_2_battlefields RandomSpawnInWorldWithLevelArea(world, 361364); RandomSpawnInWorldWithLevelArea(world, 361364); break; - case 263494: + case WorldSno.x1_westm_zone_03: RandomSpawnInWorldWithLevelArea(world, 355667); RandomSpawnInWorldWithLevelArea(world, 355667); RandomSpawnInWorldWithLevelArea(world, 355667); break; - case 58983: //Установка портала на третий этаж Залов Агонии рядом с входом к Мяснику. + case WorldSno.trdun_leoric_level03: //Установка портала на третий этаж Залов Агонии рядом с входом к Мяснику. Vector3D Scene0Pos = world.GetSceneBySnoId(78824).Position; world.SpawnMonster(6442, new Vector3D(Scene0Pos.X + 149.0907f, Scene0Pos.Y + 106.7075f, Scene0Pos.Z)); break; - case 338944: + case WorldSno.x1_westm_graveyard_deathorb: FilterWaypoints(world); break; - case 331389: + case WorldSno.x1_lr_tileset_hexmaze: foreach (var actor in world.GetActorsBySNO(310965)) actor.Destroy(); //X1_Pand_HexMaze_EN_Lore_Sister1_Chest foreach (var actor in world.GetActorsBySNO(310967)) actor.Destroy(); //X1_Pand_HexMaze_EN_Lore_Sister2_Chest foreach (var actor in world.GetActorsBySNO(310970)) actor.Destroy(); //X1_Pand_HexMaze_EN_Lore_Sister3_Chest foreach (var actor in world.GetActorsBySNO(307480)) actor.Destroy(); //X1_Pand_HexMaze_EN_Enchantress break; - case 71150: //Упоротый наёмник =) + case WorldSno.trout_town: //Упоротый наёмник =) var Templar = world.GetActorBySNO(4538); var hasmalth = world.GetActorBySNO(274457); @@ -441,21 +442,21 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem TownDoor.Attributes.BroadcastChangedIfRevealed(); } break; - case 50582: //2 уровень собора + case WorldSno.a1trdun_level04: //2 уровень собора foreach (var actor in world.GetActorsBySNO(256728)) { foreach (var sp in actor.GetActorsInRange(20f)) sp.Destroy(); actor.Destroy(); //g_Portal_TownPortal_Red } break; - case 50584: //4 уровень собора + case WorldSno.a1trdun_level06: //4 уровень собора foreach (var actor in world.GetActorsBySNO(256728)) { foreach (var sp in actor.GetActorsInRange(20f)) sp.Destroy(); actor.Destroy(); //g_Portal_TownPortal_Red } break; - case 105406: //Лишние NPC в соборе (3 уровень) + case WorldSno.a1trdun_level05_templar: //Лишние NPC в соборе (3 уровень) foreach (var actor in world.GetActorsBySNO(249214)) actor.Destroy(); //x1_NPC_ foreach (var actor in world.GetActorsBySNO(51346)) actor.Destroy(); //TristramFemale foreach (var actor in world.GetActorsBySNO(84542)) actor.Destroy(); //OmniNPC_Tristram_Male_E @@ -468,34 +469,34 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem } break; - case 146619: //Убиваем ненужный портал в локации если игра не в режиме приключений + case WorldSno.a2dun_swr_swr_to_oasis_level01: //Убиваем ненужный портал в локации если игра не в режиме приключений if (this.Game.CurrentAct != 3000) foreach (var wayp in world.GetActorsBySNO(6442)) wayp.Destroy(); break; - case 61631: //Убираем кровь кула + case WorldSno.a2dun_zolt_head_random01: //Убираем кровь кула foreach (var act in world.GetActorsBySNO(213859)) act.Destroy(); break; - case 59486: //Главный водосток. Убираем лишние порталы. + case WorldSno.a2dun_aqd_special_01: //Главный водосток. Убираем лишние порталы. foreach (var port in world.Actors.Values) if (port is Portal) - if ((port as Portal).Destination.WorldSNO == 432997) + if ((port as Portal).Destination.WorldSNO == (int)WorldSno.a2dun_aqd_special_b_level01) port.Destroy(); break; - case 75434: //Убиваем ненужный портал в локации если игра не в режиме приключений + case WorldSno.a3dun_keep_level04: //Убиваем ненужный портал в локации если игра не в режиме приключений if (this.Game.CurrentAct != 3000) foreach (var wayp in world.GetActorsBySNO(6442)) wayp.Destroy(); break; #region Убиваем все порталы в демонические разломы на первом этаже садов(теперь и на втором этаже), а то чет дохера их), создавать будет скрипт уничтожения скверны. Добалвяем голос Дьябло на несколько участков - case 109513: //1 Этаж садов + case WorldSno.a4dun_garden_of_hope_01: //1 Этаж садов foreach (var HellPortal in world.GetActorsBySNO(224890)) HellPortal.Destroy(); break; - case 219659: //2 Этаж садов + case WorldSno.a4dun_garden_of_hope_random: //2 Этаж садов foreach (var HellPortal in world.GetActorsBySNO(224890)) HellPortal.Destroy(); break; #endregion - case 198281: + case WorldSno.a4dun_spire_level_00: var LeahGhost = world.SpawnMonster(196905, new Vector3D(570f, 570f, 0.1f)) as InteractiveNPC; LeahGhost.Conversations.Clear(); LeahGhost.Conversations.Add(new ConversationInteraction(198600)); @@ -503,20 +504,20 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem LeahGhost.Attributes.BroadcastChangedIfRevealed(); break; //428f, 836f, -20.3f - case 121579: + case WorldSno.a4dun_spire_level_01: var ZoltunGhost = world.SpawnMonster(196900, new Vector3D(428f, 836f, -2f)) as InteractiveNPC; ZoltunGhost.Conversations.Clear(); ZoltunGhost.Conversations.Add(new ConversationInteraction(198402)); ZoltunGhost.Attributes[GameAttribute.Conversation_Icon, 0] = 6; ZoltunGhost.Attributes.BroadcastChangedIfRevealed(); break; - case 430335: + case WorldSno.a3dun_ruins_frost_city_a_02: foreach (var wayp in world.GetActorsBySNO(6442)) wayp.Destroy(); break; - case 455282: + case WorldSno.p43_ad_oldtristram: foreach (var wayp in world.GetActorsBySNO(108466)) wayp.Destroy(); break; - case 332336: + case WorldSno.x1_tristram_adventure_mode_hub: //Отображаем только одного продавца world.ShowOnlyNumNPC(178396, 0); @@ -532,7 +533,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem Door.Attributes[GameAttribute.Immunity] = true; Door.Attributes.BroadcastChangedIfRevealed(); break; - case 452721: //1 этаж собора (Режим D1) + case WorldSno.p43_ad_cathedral_level_01: //1 этаж собора (Режим D1) foreach (var actor in world.GetActorsBySNO(249214)) actor.Destroy(); //x1_mysticIntro_NPC foreach (var actor in world.GetActorsBySNO(51346)) actor.Destroy(); //TristramFemale foreach (var actor in world.GetActorsBySNO(81609)) actor.Destroy(); //{[Actor] [Type: Monster] SNOId:81609 GlobalId: 1014803624 Position: x:807.75 y:996.75 z:0 Name: A1_UniqueVendor_Armorer} @@ -547,7 +548,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem } break; - case 452922: //2 этаж собора (Режим D1) + case WorldSno.p43_ad_cathedral_level_02: //2 этаж собора (Режим D1) foreach (var actor in world.GetActorsBySNO(249214)) actor.Destroy(); //x1_mysticIntro_NPC foreach (var actor in world.GetActorsBySNO(51346)) actor.Destroy(); //TristramFemale foreach (var actor in world.GetActorsBySNO(81609)) actor.Destroy(); //{[Actor] [Type: Monster] SNOId:81609 GlobalId: 1014803624 Position: x:807.75 y:996.75 z:0 Name: A1_UniqueVendor_Armorer} @@ -561,7 +562,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem actor.Destroy(); //g_Portal_TownPortal_Red } break; - case 452984: //3 этаж собора (Режим D1) + case WorldSno.p43_ad_cathedral_level_03: //3 этаж собора (Режим D1) foreach (var actor in world.GetActorsBySNO(249214)) actor.Destroy(); //x1_mysticIntro_NPC foreach (var actor in world.GetActorsBySNO(51346)) actor.Destroy(); //TristramFemale foreach (var actor in world.GetActorsBySNO(81609)) actor.Destroy(); //{[Actor] [Type: Monster] SNOId:81609 GlobalId: 1014803624 Position: x:807.75 y:996.75 z:0 Name: A1_UniqueVendor_Armorer} @@ -575,7 +576,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem actor.Destroy(); //g_Portal_TownPortal_Red } break; - case 452985: //4 этаж собора (Режим D1) + case WorldSno.p43_ad_cathedral_level_04: //4 этаж собора (Режим D1) foreach (var actor in world.GetActorsBySNO(249214)) actor.Destroy(); //x1_mysticIntro_NPC foreach (var actor in world.GetActorsBySNO(51346)) actor.Destroy(); //TristramFemale foreach (var actor in world.GetActorsBySNO(81609)) actor.Destroy(); //{[Actor] [Type: Monster] SNOId:81609 GlobalId: 1014803624 Position: x:807.75 y:996.75 z:0 Name: A1_UniqueVendor_Armorer} @@ -590,7 +591,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem actor.Destroy(); //g_Portal_TownPortal_Red } break; - case 452991: //5 этаж собора (Режим D1) + case WorldSno.p43_ad_catacombs_level_05: //5 этаж собора (Режим D1) foreach (var actor in world.GetActorsBySNO(249214)) actor.Destroy(); //x1_mysticIntro_NPC foreach (var actor in world.GetActorsBySNO(51346)) actor.Destroy(); //TristramFemale foreach (var actor in world.GetActorsBySNO(81609)) actor.Destroy(); //{[Actor] [Type: Monster] SNOId:81609 GlobalId: 1014803624 Position: x:807.75 y:996.75 z:0 Name: A1_UniqueVendor_Armorer} @@ -604,7 +605,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem actor.Destroy(); //g_Portal_TownPortal_Red } break; - case 452996: //6 этаж собора (Режим D1) + case WorldSno.p43_ad_catacombs_level_06: //6 этаж собора (Режим D1) foreach (var actor in world.GetActorsBySNO(249214)) actor.Destroy(); //x1_mysticIntro_NPC foreach (var actor in world.GetActorsBySNO(51346)) actor.Destroy(); //TristramFemale foreach (var actor in world.GetActorsBySNO(81609)) actor.Destroy(); //{[Actor] [Type: Monster] SNOId:81609 GlobalId: 1014803624 Position: x:807.75 y:996.75 z:0 Name: A1_UniqueVendor_Armorer} @@ -618,7 +619,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem actor.Destroy(); //g_Portal_TownPortal_Red } break; - case 452997: //7 этаж собора (Режим D1) + case WorldSno.p43_ad_catacombs_level_07: //7 этаж собора (Режим D1) foreach (var actor in world.GetActorsBySNO(249214)) actor.Destroy(); //x1_mysticIntro_NPC foreach (var actor in world.GetActorsBySNO(51346)) actor.Destroy(); //TristramFemale foreach (var actor in world.GetActorsBySNO(81609)) actor.Destroy(); //{[Actor] [Type: Monster] SNOId:81609 GlobalId: 1014803624 Position: x:807.75 y:996.75 z:0 Name: A1_UniqueVendor_Armorer} @@ -632,7 +633,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem actor.Destroy(); //g_Portal_TownPortal_Red } break; - case 452998: //8 этаж собора (Режим D1) + case WorldSno.p43_ad_catacombs_level_08: //8 этаж собора (Режим D1) foreach (var actor in world.GetActorsBySNO(249214)) actor.Destroy(); //x1_mysticIntro_NPC foreach (var actor in world.GetActorsBySNO(51346)) actor.Destroy(); //TristramFemale foreach (var actor in world.GetActorsBySNO(81609)) actor.Destroy(); //{[Actor] [Type: Monster] SNOId:81609 GlobalId: 1014803624 Position: x:807.75 y:996.75 z:0 Name: A1_UniqueVendor_Armorer} @@ -655,7 +656,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem foreach (var oldp in world.GetActorsBySNO(166389)) { foreach(var plr in world.Game.Players.Values) world.SpawnGold(oldp, plr); oldp.Destroy(); } foreach (var oldp in world.GetActorsBySNO(404043)) { oldp.Destroy(); }//сломанные мосты - if(world.WorldSNO.Id != 105406 ) foreach (var oldp in world.GetActorsBySNO(408511)) { oldp.Destroy(); }//109209 - Костяные стены из собора + if(world.SNO != WorldSno.a1trdun_level05_templar) foreach (var oldp in world.GetActorsBySNO(408511)) { oldp.Destroy(); }//109209 - Костяные стены из собора #endregion return world; @@ -672,7 +673,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem while (true) { - SP = new Vector3D(SSV.X + DiIiS_NA.Core.Helpers.Math.RandomHelper.Next(0, 240), SSV.Y + DiIiS_NA.Core.Helpers.Math.RandomHelper.Next(0, 240), SSV.Z); + SP = new Vector3D(SSV.X + RandomHelper.Next(0, 240), SSV.Y + RandomHelper.Next(0, 240), SSV.Z); if (world.CheckLocationForFlag(SP, DiIiS_NA.Core.MPQ.FileFormats.Scene.NavCellFlags.AllowWalk)) break; } @@ -735,16 +736,14 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem { Logger.Error("Scene {0}, not added on DRLG", Scene.SnoID); } - bool Rift = false; - if (world.WorldSNO.Name.ToLower().Contains("x1_lr")) - Rift = true; + bool Rift = world.SNO.IsGenerated(); //Getting Enter var loadedscene = new SceneChunk(); CurrentScene = DRLGContainers[0][RandomHelper.Next(0, DRLGContainers[0].Count)]; loadedscene.SNOHandle = new SNOHandle(SNOGroup.Scene, CurrentScene.SnoID); loadedscene.PRTransform = new PRTransform(new Quaternion(new Vector3D(0f, 0f, 0f), 1), new Vector3D(0, 0, 0)); loadedscene.SceneSpecification = new SceneSpecification( - 0, new Vector2D(0, 0), new int[4] { Rift ? world.WorldSNO.Id != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, + 0, new Vector2D(0, 0), new int[4] { Rift ? world.SNO != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, -1, -1, -1, -1, -1, -1, CurrentScene.Music, -1, -1, -1, CurrentScene.Weather, -1, -1, -1, -1, -1, new SceneCachedValues(-1, -1, -1, new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new int[4] { 0, 0, 0, 0 }, 0)); @@ -801,7 +800,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem nextscene.SNOHandle = new SNOHandle(SNOGroup.Scene, CurrentScene.SnoID); nextscene.PRTransform = new PRTransform(new Quaternion(new Vector3D(0f, 0f, 0f), 1), PlaceToNewScene); nextscene.SceneSpecification = new SceneSpecification( - 0, new Vector2D(0, 0), new int[4] { Rift ? world.WorldSNO.Id != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, + 0, new Vector2D(0, 0), new int[4] { Rift ? world.SNO != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, -1, -1, -1, -1, -1, -1, CurrentScene.Music, -1, -1, -1, CurrentScene.Weather, -1, -1, -1, -1, -1, new SceneCachedValues(-1, -1, -1, new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new int[4] { 0, 0, 0, 0 }, 0)); @@ -840,7 +839,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem nextscene.SNOHandle = new SNOHandle(SNOGroup.Scene, CurrentScene.SnoID); nextscene.PRTransform = new PRTransform(new Quaternion(new Vector3D(0f, 0f, 0f), 1), PlaceToNewScene); nextscene.SceneSpecification = new SceneSpecification( - 0, new Vector2D(0, 0), new int[4] { Rift ? world.WorldSNO.Id != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, + 0, new Vector2D(0, 0), new int[4] { Rift ? world.SNO != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, -1, -1, -1, -1, -1, -1, CurrentScene.Music, -1, -1, -1, CurrentScene.Weather, -1, -1, -1, -1, -1, new SceneCachedValues(-1, -1, -1, new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new int[4] { 0, 0, 0, 0 }, 0)); @@ -879,7 +878,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem nextscene.SNOHandle = new SNOHandle(SNOGroup.Scene, CurrentScene.SnoID); nextscene.PRTransform = new PRTransform(new Quaternion(new Vector3D(0f, 0f, 0f), 1), PlaceToNewScene); nextscene.SceneSpecification = new SceneSpecification( - 0, new Vector2D(0, 0), new int[4] { Rift ? world.WorldSNO.Id != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, + 0, new Vector2D(0, 0), new int[4] { Rift ? world.SNO != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, -1, -1, -1, -1, -1, -1, CurrentScene.Music, -1, -1, -1, CurrentScene.Weather, -1, -1, -1, -1, -1, new SceneCachedValues(-1, -1, -1, new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new int[4] { 0, 0, 0, 0 }, 0)); @@ -919,7 +918,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem nextscene.SNOHandle = new SNOHandle(SNOGroup.Scene, CurrentScene.SnoID); nextscene.PRTransform = new PRTransform(new Quaternion(new Vector3D(0f, 0f, 0f), 1), PlaceToNewScene); nextscene.SceneSpecification = new SceneSpecification( - 0, new Vector2D(0, 0), new int[4] { Rift ? world.WorldSNO.Id != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, + 0, new Vector2D(0, 0), new int[4] { Rift ? world.SNO != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, -1, -1, -1, -1, -1, -1, CurrentScene.Music, -1, -1, -1, CurrentScene.Weather, -1, -1, -1, -1, -1, new SceneCachedValues(-1, -1, -1, new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new int[4] { 0, 0, 0, 0 }, 0)); @@ -959,7 +958,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem nextscene1.SNOHandle = new SNOHandle(SNOGroup.Scene, CurrentScene.SnoID); nextscene1.PRTransform = new PRTransform(new Quaternion(new Vector3D(0f, 0f, 0f), 1), PlaceToNewScene); nextscene1.SceneSpecification = new SceneSpecification( - 0, new Vector2D(0, 0), new int[4] { Rift ? world.WorldSNO.Id != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, + 0, new Vector2D(0, 0), new int[4] { Rift ? world.SNO != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, -1, -1, -1, -1, -1, -1, CurrentScene.Music, -1, -1, -1, CurrentScene.Weather, -1, -1, -1, -1, -1, new SceneCachedValues(-1, -1, -1, new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new int[4] { 0, 0, 0, 0 }, 0)); @@ -993,7 +992,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem nextscene.SNOHandle = new SNOHandle(SNOGroup.Scene, CurrentScene.SnoID); nextscene.PRTransform = new PRTransform(new Quaternion(new Vector3D(0f, 0f, 0f), 1), PlaceToNewScene); nextscene.SceneSpecification = new SceneSpecification( - 0, new Vector2D(0, 0), new int[4] { Rift ? world.WorldSNO.Id != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, + 0, new Vector2D(0, 0), new int[4] { Rift ? world.SNO != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, -1, -1, -1, -1, -1, -1, CurrentScene.Music, -1, -1, -1, CurrentScene.Weather, -1, -1, -1, -1, -1, new SceneCachedValues(-1, -1, -1, new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new int[4] { 0, 0, 0, 0 }, 0)); @@ -1157,7 +1156,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem newscene.SNOHandle = new SNOHandle(SNOGroup.Scene, CurrentScene.SnoID); newscene.PRTransform = new PRTransform(new Quaternion(new Vector3D(0f, 0f, 0f), 1), PlaceToNewScene); newscene.SceneSpecification = new SceneSpecification( - 0, new Vector2D(0, 0), new int[4] { Rift ? world.WorldSNO.Id != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, + 0, new Vector2D(0, 0), new int[4] { Rift ? world.SNO != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, -1, -1, -1, -1, -1, -1, CurrentScene.Music, -1, -1, -1, CurrentScene.Weather, -1, -1, -1, -1, -1, new SceneCachedValues(-1, -1, -1, new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new int[4] { 0, 0, 0, 0 }, 0)); @@ -1306,7 +1305,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem newscene.SNOHandle = new SNOHandle(SNOGroup.Scene, CurrentScene.SnoID); newscene.PRTransform = new PRTransform(new Quaternion(new Vector3D(0f, 0f, 0f), 1), PlaceToNewScene); newscene.SceneSpecification = new SceneSpecification( - 0, new Vector2D(0, 0), new int[4] { Rift ? world.WorldSNO.Id != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, + 0, new Vector2D(0, 0), new int[4] { Rift ? world.SNO != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, -1, -1, -1, -1, -1, -1, CurrentScene.Music, -1, -1, -1, CurrentScene.Weather, -1, -1, -1, -1, -1, new SceneCachedValues(-1, -1, -1, new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new int[4] { 0, 0, 0, 0 }, 0)); @@ -1454,7 +1453,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem newscene.SNOHandle = new SNOHandle(SNOGroup.Scene, CurrentScene.SnoID); newscene.PRTransform = new PRTransform(new Quaternion(new Vector3D(0f, 0f, 0f), 1), PlaceToNewScene); newscene.SceneSpecification = new SceneSpecification( - 0, new Vector2D(0, 0), new int[4] { Rift ? world.WorldSNO.Id != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, + 0, new Vector2D(0, 0), new int[4] { Rift ? world.SNO != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, -1, -1, -1, -1, -1, -1, CurrentScene.Music, -1, -1, -1, CurrentScene.Weather, -1, -1, -1, -1, -1, new SceneCachedValues(-1, -1, -1, new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new int[4] { 0, 0, 0, 0 }, 0)); @@ -1602,7 +1601,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem newscene.SNOHandle = new SNOHandle(SNOGroup.Scene, CurrentScene.SnoID); newscene.PRTransform = new PRTransform(new Quaternion(new Vector3D(0f, 0f, 0f), 1), PlaceToNewScene); newscene.SceneSpecification = new SceneSpecification( - 0, new Vector2D(0, 0), new int[4] { Rift ? world.WorldSNO.Id != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, + 0, new Vector2D(0, 0), new int[4] { Rift ? world.SNO != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, -1, -1, -1, -1, -1, -1, CurrentScene.Music, -1, -1, -1, CurrentScene.Weather, -1, -1, -1, -1, -1, new SceneCachedValues(-1, -1, -1, new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new int[4] { 0, 0, 0, 0 }, 0)); @@ -1667,7 +1666,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem newscene.SNOHandle = new SNOHandle(SNOGroup.Scene, CurrentScene.SnoID); newscene.PRTransform = Chunck.PRTransform; newscene.SceneSpecification = new SceneSpecification( - 0, new Vector2D(0, 0), new int[4] { Rift ? world.WorldSNO.Id != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, + 0, new Vector2D(0, 0), new int[4] { Rift ? world.SNO != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, -1, -1, -1, -1, -1, -1, CurrentScene.Music, -1, -1, -1, CurrentScene.Weather, -1, -1, -1, -1, -1, new SceneCachedValues(-1, -1, -1, new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new int[4] { 0, 0, 0, 0 }, 0)); @@ -1720,7 +1719,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem var newscene = new SceneChunk(); newscene.SNOHandle = new SNOHandle(SNOGroup.Scene, CurrentScene.SnoID); newscene.PRTransform = new PRTransform(new Quaternion(new Vector3D(0f, 0f, 0f), 1), new Vector3D(X, Y, 0)); - newscene.SceneSpecification = new SceneSpecification(0, new Vector2D(0, 0), new int[4] { Rift ? world.WorldSNO.Id != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, + newscene.SceneSpecification = new SceneSpecification(0, new Vector2D(0, 0), new int[4] { Rift ? world.SNO != world.Game.WorldOfPortalNephalem ? 288684 : 288482 : CurrentScene.LevelArea, Rift ? CurrentScene.LevelArea : -1, -1, -1 }, -1, -1, -1, -1, -1, -1, CurrentScene.Music, -1, -1, -1, CurrentScene.Weather, -1, -1, -1, -1, -1, new SceneCachedValues(-1, -1, -1, new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new AABB(new Vector3D(-1, -1, -1), new Vector3D(-1, -1, -1)), new int[4] { 0, 0, 0, 0 }, 0)); FillerChunks.Add(newscene); } @@ -1741,7 +1740,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem world.DRLGEmuActive = true; } - private bool GenerateRandomDungeon(int worldSNO, DiIiS_NA.Core.MPQ.FileFormats.World worldData) + private bool GenerateRandomDungeon(WorldSno worldSNO, DiIiS_NA.Core.MPQ.FileFormats.World worldData) { //if ((worldData.DRLGParams == null)||(worldData.DRLGParams.Count == 0)) //return false; @@ -1776,7 +1775,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem TileInfo entrance = new TileInfo(); //HACK for Defiled Crypt as there is no tile yet with type 200. Maybe changing in DB would make more sense than putting this hack in // [11]: {[161961, Mooege.Common.MPQ.MPQAsset]}Worlds\\a1trDun_Cave_Old_Ruins_Random01.wrl - if (worldSNO == 161961) + if (worldSNO == WorldSno.a1trdun_cave_old_ruins_random01) { entrance = tiles[131902]; tiles.Remove(131902); @@ -1788,7 +1787,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem if (DRLGTemplate.Templates.ContainsKey(worldSNO)) { - DRLGTemplate.DRLGLayout world_layout = DRLGTemplate.Templates[worldSNO][DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(DRLGTemplate.Templates[worldSNO].Count)]; + DRLGTemplate.DRLGLayout world_layout = DRLGTemplate.Templates[worldSNO][FastRandom.Instance.Next(DRLGTemplate.Templates[worldSNO].Count)]; int coordY = 0; foreach (List row in world_layout.map) @@ -1851,7 +1850,7 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem chunk.SceneSpecification.SNOLevelAreas[0] = drlgparam.LevelArea; chunk.SceneSpecification.SNOWeather = drlgparam.Weather; } - if (worldSNO == 267412) //A5 marsh + if (worldSNO == WorldSno.x1_bog_01) //A5 marsh { if (chunk.PRTransform.Vector3D.Y < 960 || chunk.PRTransform.Vector3D.X < 720) chunk.SceneSpecification.SNOLevelAreas[0] = 258142; @@ -2374,19 +2373,19 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem gizmoLocations = finalLocationsList; //sorting with no duplications - if (world.WorldSNO.Id == 169477) //Mysterious Cave lv 1 + if (world.SNO == WorldSno.a2dun_cave_mapdungeon_level01) //Mysterious Cave lv 1 { var handle = new SNOHandle(207706); - if (handle == null || gizmoLocations.Count() == 0) continue; - LazyLoadActor(handle, gizmoLocations[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(gizmoLocations.Count())], world, ((DiIiS_NA.Core.MPQ.FileFormats.Actor)handle.Target).TagMap); + if (handle == null || gizmoLocations.Count == 0) continue; + LazyLoadActor(handle, gizmoLocations[FastRandom.Instance.Next(gizmoLocations.Count)], world, ((DiIiS_NA.Core.MPQ.FileFormats.Actor)handle.Target).TagMap); } else foreach (var location in gizmoLocations) { - if (DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(100) < 1) + if (FastRandom.Instance.Next(100) < 1) { SNOHandle gizmoHandle = null; - float seed = (float)DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble(); + float seed = (float)FastRandom.Instance.NextDouble(); foreach (var pair in GizmosToSpawn) { if (seed < pair.Value) @@ -2402,18 +2401,18 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem } } - if (gizmoLocations.Count() > 0 && world.Game.MonsterLevel >= Program.MaxLevel && DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(100) < 30) + if (gizmoLocations.Count > 0 && world.Game.MonsterLevel >= Program.MaxLevel && FastRandom.Instance.Next(100) < 30) { var handle_chest = new SNOHandle(96993); //leg chest if (handle_chest == null) continue; - var golden_chest = loadActor(handle_chest, gizmoLocations[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(0, gizmoLocations.Count() - 1)], world, ((DiIiS_NA.Core.MPQ.FileFormats.Actor)handle_chest.Target).TagMap); + var golden_chest = loadActor(handle_chest, gizmoLocations[FastRandom.Instance.Next(0, gizmoLocations.Count - 1)], world, ((DiIiS_NA.Core.MPQ.FileFormats.Actor)handle_chest.Target).TagMap); if (golden_chest > 0) (world.GetActorByGlobalId(golden_chest) as LegendaryChest).ChestActive = true; } if (world.DRLGEmuActive) { - int wid = world.WorldSNO.Id; + int wid = (int)world.SNO; // Load monsters for level area foreach (var scene in levelAreas.First().Value) { @@ -2428,12 +2427,12 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem } #region unique spawn //unique spawn - if (SpawnGenerator.Spawns.ContainsKey(wid) && SpawnGenerator.Spawns[wid].dangerous.Count() > 0 && DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() < 0.5) + if (SpawnGenerator.Spawns.ContainsKey(wid) && SpawnGenerator.Spawns[wid].dangerous.Count > 0 && FastRandom.Instance.NextDouble() < 0.5) { - var randomUnique = new SNOHandle(SpawnGenerator.Spawns[wid].dangerous[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(SpawnGenerator.Spawns[wid].dangerous.Count())]); - var scene = levelAreas.First().Value[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(levelAreas.First().Value.Count())]; - int x = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); - int y = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); + var randomUnique = new SNOHandle(SpawnGenerator.Spawns[wid].dangerous[FastRandom.Instance.Next(SpawnGenerator.Spawns[wid].dangerous.Count)]); + var scene = levelAreas.First().Value[FastRandom.Instance.Next(levelAreas.First().Value.Count)]; + int x = FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); + int y = FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); int threshold = 0; while ((scene.NavMesh.Squares[y * scene.NavMesh.SquaresCountX + x].Flags & DiIiS_NA.Core.MPQ.FileFormats.Scene.NavCellFlags.NoSpawn) != 0) { @@ -2443,8 +2442,8 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem break; //continue; } - x = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); - y = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); + x = FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); + y = FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); } var uniq = loadActor( @@ -2453,11 +2452,11 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem { Vector3D = new Vector3D { - X = (float)(x * 2.4 + scene.Position.X) + (float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * 20 - 10), - Y = (float)(y * 2.4 + scene.Position.Y) + (float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * 20 - 10), + X = (float)(x * 2.4 + scene.Position.X) + (float)(FastRandom.Instance.NextDouble() * 20 - 10), + Y = (float)(y * 2.4 + scene.Position.Y) + (float)(FastRandom.Instance.NextDouble() * 20 - 10), Z = scene.NavMesh.Squares[y * scene.NavMesh.SquaresCountX + x].Z + scene.Position.Z }, - Quaternion = Quaternion.FacingRotation((float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * System.Math.PI * 2)) + Quaternion = Quaternion.FacingRotation((float)(FastRandom.Instance.NextDouble() * System.Math.PI * 2)) }, world, new TagMap() @@ -2470,13 +2469,13 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem #endregion #region goblin spawn //goblin spawn - if (SpawnGenerator.Spawns.ContainsKey(wid) && SpawnGenerator.Spawns[wid].can_spawn_goblin && DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() < 0.5) + if (SpawnGenerator.Spawns.ContainsKey(wid) && SpawnGenerator.Spawns[wid].can_spawn_goblin && FastRandom.Instance.NextDouble() < 0.5) { - var randomGoblin = new SNOHandle(Goblins[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(Goblins.Count())]); + var randomGoblin = new SNOHandle(Goblins[FastRandom.Instance.Next(Goblins.Count)]); if (world.Game.IsHardcore) randomGoblin = new SNOHandle(3852); - var scene = levelAreas.First().Value[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(levelAreas.First().Value.Count())]; - int x = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); - int y = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); + var scene = levelAreas.First().Value[FastRandom.Instance.Next(levelAreas.First().Value.Count)]; + int x = FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); + int y = FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); int threshold = 0; while ((scene.NavMesh.Squares[y * scene.NavMesh.SquaresCountX + x].Flags & DiIiS_NA.Core.MPQ.FileFormats.Scene.NavCellFlags.NoSpawn) != 0) { @@ -2486,8 +2485,8 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem break; //continue; } - x = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); - y = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); + x = FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); + y = FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); } LazyLoadActor( @@ -2496,11 +2495,11 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem { Vector3D = new Vector3D { - X = (float)(x * 2.4 + scene.Position.X) + (float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * 20 - 10), - Y = (float)(y * 2.4 + scene.Position.Y) + (float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * 20 - 10), + X = (float)(x * 2.4 + scene.Position.X) + (float)(FastRandom.Instance.NextDouble() * 20 - 10), + Y = (float)(y * 2.4 + scene.Position.Y) + (float)(FastRandom.Instance.NextDouble() * 20 - 10), Z = scene.NavMesh.Squares[y * scene.NavMesh.SquaresCountX + x].Z + scene.Position.Z }, - Quaternion = Quaternion.FacingRotation((float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * System.Math.PI * 2)) + Quaternion = Quaternion.FacingRotation((float)(FastRandom.Instance.NextDouble() * System.Math.PI * 2)) }, world, new TagMap() @@ -2525,12 +2524,12 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem } #region unique spawn //unique spawn - if (SpawnGenerator.Spawns.ContainsKey(la) && SpawnGenerator.Spawns[la].dangerous.Count() > 0 && DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() < 0.5) + if (SpawnGenerator.Spawns.ContainsKey(la) && SpawnGenerator.Spawns[la].dangerous.Count > 0 && FastRandom.Instance.NextDouble() < 0.5) { - var randomUnique = new SNOHandle(SpawnGenerator.Spawns[la].dangerous[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(SpawnGenerator.Spawns[la].dangerous.Count())]); - var scene = levelAreas[la][DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(levelAreas[la].Count())]; - int x = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); - int y = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); + var randomUnique = new SNOHandle(SpawnGenerator.Spawns[la].dangerous[FastRandom.Instance.Next(SpawnGenerator.Spawns[la].dangerous.Count)]); + var scene = levelAreas[la][FastRandom.Instance.Next(levelAreas[la].Count)]; + int x = FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); + int y = FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); int threshold = 0; while ((scene.NavMesh.Squares[y * scene.NavMesh.SquaresCountX + x].Flags & DiIiS_NA.Core.MPQ.FileFormats.Scene.NavCellFlags.NoSpawn) != 0) { @@ -2540,8 +2539,8 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem break; //continue; } - x = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); - y = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); + x = FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); + y = FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); } var uniq = loadActor( @@ -2550,11 +2549,11 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem { Vector3D = new Vector3D { - X = (float)(x * 2.4 + scene.Position.X) + (float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * 20 - 10), - Y = (float)(y * 2.4 + scene.Position.Y) + (float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * 20 - 10), + X = (float)(x * 2.4 + scene.Position.X) + (float)(FastRandom.Instance.NextDouble() * 20 - 10), + Y = (float)(y * 2.4 + scene.Position.Y) + (float)(FastRandom.Instance.NextDouble() * 20 - 10), Z = scene.NavMesh.Squares[y * scene.NavMesh.SquaresCountX + x].Z + scene.Position.Z }, - Quaternion = Quaternion.FacingRotation((float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * System.Math.PI * 2)) + Quaternion = Quaternion.FacingRotation((float)(FastRandom.Instance.NextDouble() * System.Math.PI * 2)) }, world, new TagMap() @@ -2567,13 +2566,13 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem #endregion #region goblin spawn //goblin spawn - if (SpawnGenerator.Spawns.ContainsKey(la) && SpawnGenerator.Spawns[la].can_spawn_goblin && DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() < 0.5) + if (SpawnGenerator.Spawns.ContainsKey(la) && SpawnGenerator.Spawns[la].can_spawn_goblin && FastRandom.Instance.NextDouble() < 0.5) { - var randomGoblin = new SNOHandle(Goblins[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(Goblins.Count())]); + var randomGoblin = new SNOHandle(Goblins[FastRandom.Instance.Next(Goblins.Count)]); if (world.Game.IsHardcore) randomGoblin = new SNOHandle(3852); - var scene = levelAreas[la][DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(levelAreas[la].Count())]; - int x = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); - int y = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); + var scene = levelAreas[la][FastRandom.Instance.Next(levelAreas[la].Count)]; + int x = FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); + int y = FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); int threshold = 0; while ((scene.NavMesh.Squares[y * scene.NavMesh.SquaresCountX + x].Flags & DiIiS_NA.Core.MPQ.FileFormats.Scene.NavCellFlags.NoSpawn) != 0) { @@ -2583,8 +2582,8 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem break; //continue; } - x = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); - y = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); + x = FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); + y = FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); } LazyLoadActor( @@ -2593,11 +2592,11 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem { Vector3D = new Vector3D { - X = (float)(x * 2.4 + scene.Position.X) + (float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * 20 - 10), - Y = (float)(y * 2.4 + scene.Position.Y) + (float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * 20 - 10), + X = (float)(x * 2.4 + scene.Position.X) + (float)(FastRandom.Instance.NextDouble() * 20 - 10), + Y = (float)(y * 2.4 + scene.Position.Y) + (float)(FastRandom.Instance.NextDouble() * 20 - 10), Z = scene.NavMesh.Squares[y * scene.NavMesh.SquaresCountX + x].Z + scene.Position.Z }, - Quaternion = Quaternion.FacingRotation((float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * System.Math.PI * 2)) + Quaternion = Quaternion.FacingRotation((float)(FastRandom.Instance.NextDouble() * System.Math.PI * 2)) }, world, new TagMap() @@ -2635,20 +2634,20 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem for (int i = 0; i < packs_count; i++) { - int x = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); - int y = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); - groupId = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(); + int x = FastRandom.Instance.Next(scene.NavMesh.SquaresCountX); + int y = FastRandom.Instance.Next(scene.NavMesh.SquaresCountY); + groupId = FastRandom.Instance.Next(); if ((scene.NavMesh.Squares[y * scene.NavMesh.SquaresCountX + x].Flags & DiIiS_NA.Core.MPQ.FileFormats.Scene.NavCellFlags.NoSpawn) == 0) { - bool isElite = (DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() < 0.03); + bool isElite = (FastRandom.Instance.NextDouble() < 0.03); if (isElite) { #region elite spawn int randomMeleeMonsterId = -1; int randomRangedMonsterId = -1; - if (SpawnGenerator.Spawns[la].melee.Count() > 0) randomMeleeMonsterId = SpawnGenerator.Spawns[la].melee[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(SpawnGenerator.Spawns[la].melee.Count())]; - if (SpawnGenerator.Spawns[la].range.Count() > 0) randomRangedMonsterId = SpawnGenerator.Spawns[la].range[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(SpawnGenerator.Spawns[la].range.Count())]; + if (SpawnGenerator.Spawns[la].melee.Count > 0) randomMeleeMonsterId = SpawnGenerator.Spawns[la].melee[FastRandom.Instance.Next(SpawnGenerator.Spawns[la].melee.Count)]; + if (SpawnGenerator.Spawns[la].range.Count > 0) randomRangedMonsterId = SpawnGenerator.Spawns[la].range[FastRandom.Instance.Next(SpawnGenerator.Spawns[la].range.Count)]; SNOHandle meleeMonsterHandle = (randomMeleeMonsterId == -1 ? null : new SNOHandle(randomMeleeMonsterId)); SNOHandle rangedMonsterHandle = (randomRangedMonsterId == -1 ? null : new SNOHandle(randomRangedMonsterId)); if (rangedMonsterHandle == null) rangedMonsterHandle = meleeMonsterHandle; @@ -2656,19 +2655,19 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem if (meleeMonsterHandle == null) meleeMonsterHandle = rangedMonsterHandle; for (int n = 0; n < 5; n++) { - if (n == 0 || DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() < 0.85) + if (n == 0 || FastRandom.Instance.NextDouble() < 0.85) { uint actor = loadActor( - (n == 0 ? (DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() < 0.5 ? meleeMonsterHandle : rangedMonsterHandle) : meleeMonsterHandle), + (n == 0 ? (FastRandom.Instance.NextDouble() < 0.5 ? meleeMonsterHandle : rangedMonsterHandle) : meleeMonsterHandle), new PRTransform { Vector3D = new Vector3D { - X = (float)(x * 2.4 + scene.Position.X) + (float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * 20 - 10), - Y = (float)(y * 2.4 + scene.Position.Y) + (float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * 20 - 10), + X = (float)(x * 2.4 + scene.Position.X) + (float)(FastRandom.Instance.NextDouble() * 20 - 10), + Y = (float)(y * 2.4 + scene.Position.Y) + (float)(FastRandom.Instance.NextDouble() * 20 - 10), Z = scene.NavMesh.Squares[y * scene.NavMesh.SquaresCountX + x].Z + scene.Position.Z }, - Quaternion = Quaternion.FacingRotation((float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * System.Math.PI * 2)) + Quaternion = Quaternion.FacingRotation((float)(FastRandom.Instance.NextDouble() * System.Math.PI * 2)) }, world, new TagMap(), @@ -2686,32 +2685,32 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem #endregion else { - bool isChampion = (DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() < 0.07); + bool isChampion = (FastRandom.Instance.NextDouble() < 0.07); if (!isChampion) #region default spawn { int randomMeleeMonsterId = -1; int randomRangedMonsterId = -1; - if (SpawnGenerator.Spawns[la].melee.Count() > 0) randomMeleeMonsterId = SpawnGenerator.Spawns[la].melee[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(SpawnGenerator.Spawns[la].melee.Count())]; - if (SpawnGenerator.Spawns[la].range.Count() > 0) randomRangedMonsterId = SpawnGenerator.Spawns[la].range[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(SpawnGenerator.Spawns[la].range.Count())]; + if (SpawnGenerator.Spawns[la].melee.Count > 0) randomMeleeMonsterId = SpawnGenerator.Spawns[la].melee[FastRandom.Instance.Next(SpawnGenerator.Spawns[la].melee.Count)]; + if (SpawnGenerator.Spawns[la].range.Count > 0) randomRangedMonsterId = SpawnGenerator.Spawns[la].range[FastRandom.Instance.Next(SpawnGenerator.Spawns[la].range.Count)]; SNOHandle meleeMonsterHandle = (randomMeleeMonsterId == -1 ? null : new SNOHandle(randomMeleeMonsterId)); SNOHandle rangedMonsterHandle = (randomRangedMonsterId == -1 ? null : new SNOHandle(randomRangedMonsterId)); //int maxMobsInStack = (SpawnGenerator.IsMelee(la, randomMonsterId) ? 6 : (SpawnGenerator.IsDangerous(la, randomMonsterId) ? 1 : 3)); for (int n = 0; n < 6; n++) { - if (n == 0 || DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() < 0.6) + if (n == 0 || FastRandom.Instance.NextDouble() < 0.6) { LazyLoadActor( - (meleeMonsterHandle == null ? rangedMonsterHandle : (rangedMonsterHandle == null ? meleeMonsterHandle : (DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() < 0.65 ? meleeMonsterHandle : rangedMonsterHandle))), + (meleeMonsterHandle == null ? rangedMonsterHandle : (rangedMonsterHandle == null ? meleeMonsterHandle : (FastRandom.Instance.NextDouble() < 0.65 ? meleeMonsterHandle : rangedMonsterHandle))), new PRTransform { Vector3D = new Vector3D { - X = (float)(x * 2.4 + scene.Position.X) + (float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * 20 - 10), - Y = (float)(y * 2.4 + scene.Position.Y) + (float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * 20 - 10), + X = (float)(x * 2.4 + scene.Position.X) + (float)(FastRandom.Instance.NextDouble() * 20 - 10), + Y = (float)(y * 2.4 + scene.Position.Y) + (float)(FastRandom.Instance.NextDouble() * 20 - 10), Z = scene.NavMesh.Squares[y * scene.NavMesh.SquaresCountX + x].Z + scene.Position.Z }, - Quaternion = Quaternion.FacingRotation((float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * System.Math.PI * 2)) + Quaternion = Quaternion.FacingRotation((float)(FastRandom.Instance.NextDouble() * System.Math.PI * 2)) }, world, new TagMap(), @@ -2724,11 +2723,11 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem else //spawn champions #region champion spawn { - SNOHandle championHandle = new SNOHandle(SpawnGenerator.Spawns[la].melee[DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(SpawnGenerator.Spawns[la].melee.Count())]); - groupId = DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.Next(); + SNOHandle championHandle = new SNOHandle(SpawnGenerator.Spawns[la].melee[FastRandom.Instance.Next(SpawnGenerator.Spawns[la].melee.Count)]); + groupId = FastRandom.Instance.Next(); for (int n = 0; n < 4; n++) { - if (n == 0 || DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() < 0.85) + if (n == 0 || FastRandom.Instance.NextDouble() < 0.85) { uint actor = loadActor( championHandle, @@ -2736,11 +2735,11 @@ namespace DiIiS_NA.GameServer.GSSystem.GeneratorsSystem { Vector3D = new Vector3D { - X = (float)(x * 2.4 + scene.Position.X) + (float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * 20 - 10), - Y = (float)(y * 2.4 + scene.Position.Y) + (float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * 20 - 10), + X = (float)(x * 2.4 + scene.Position.X) + (float)(FastRandom.Instance.NextDouble() * 20 - 10), + Y = (float)(y * 2.4 + scene.Position.Y) + (float)(FastRandom.Instance.NextDouble() * 20 - 10), Z = scene.NavMesh.Squares[y * scene.NavMesh.SquaresCountX + x].Z + scene.Position.Z }, - Quaternion = Quaternion.FacingRotation((float)(DiIiS_NA.Core.Helpers.Math.FastRandom.Instance.NextDouble() * System.Math.PI * 2)) + Quaternion = Quaternion.FacingRotation((float)(FastRandom.Instance.NextDouble() * Math.PI * 2)) }, world, new TagMap(), diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/MapSystem/Scene.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/MapSystem/Scene.cs index e432cc2..d4de4c3 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/MapSystem/Scene.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/MapSystem/Scene.cs @@ -6,6 +6,7 @@ using DiIiS_NA.Core.Logging; using DiIiS_NA.Core.MPQ; //Blizzless Project 2022 using DiIiS_NA.Core.MPQ.FileFormats; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; //Blizzless Project 2022 using DiIiS_NA.GameServer.Core.Types.Collision; //Blizzless Project 2022 @@ -265,8 +266,8 @@ namespace DiIiS_NA.GameServer.GSSystem.MapSystem var actor = ActorFactory.Create(this.World, marker.SNOHandle.Id, marker.TagMap); // try to create it. //Logger.Debug("not-lazy spawned {0}", actor.GetType().Name); if (actor == null) continue; - if (this.World.WorldSNO.Id == 95804 && this.SceneSNO.Id == 145392 && actor is StartingPoint) continue; //arreat crater hack - if (this.World.WorldSNO.Id == 306549 && this.SceneSNO.Id == 311310 && actor is StartingPoint) continue; //A5 start location hack + if (this.World.SNO == WorldSno.a3_battlefields_02 && this.SceneSNO.Id == 145392 && actor is StartingPoint) continue; //arreat crater hack + if (this.World.SNO == WorldSno.x1_westm_intro && this.SceneSNO.Id == 311310 && actor is StartingPoint) continue; //A5 start location hack var position = marker.PRTransform.Vector3D + this.Position; // calculate the position for the actor. actor.RotationW = marker.PRTransform.Quaternion.W; @@ -466,7 +467,7 @@ namespace DiIiS_NA.GameServer.GSSystem.MapSystem specification.SNOCombatMusic = -1;//World.Environment.snoCombatMusic; specification.SNOAmbient = World.Environment.snoAmbient; specification.SNOReverb = World.Environment.snoReverb; - specification.SNOPresetWorld = this.World.WorldSNO.Id; + specification.SNOPresetWorld = (int)this.World.SNO; } else if (World.Environment != null) { @@ -475,7 +476,7 @@ namespace DiIiS_NA.GameServer.GSSystem.MapSystem specification.SNOAmbient = World.Environment.snoAmbient; specification.SNOReverb = World.Environment.snoReverb; specification.SNOWeather = World.Environment.snoWeather; - specification.SNOPresetWorld = this.World.WorldSNO.Id; + specification.SNOPresetWorld = (int)this.World.SNO; } else @@ -486,39 +487,37 @@ namespace DiIiS_NA.GameServer.GSSystem.MapSystem specification.SNOReverb = -1; if (specification.SNOWeather == -1) specification.SNOWeather = 0x00013220; - specification.SNOPresetWorld = this.World.WorldSNO.Id; + specification.SNOPresetWorld = (int)this.World.SNO; } - if (this.World.Game.NephalemGreater && this.World.WorldSNO.Name.ToLower().Contains("x1_lr_tileset")) + if (this.World.Game.NephalemGreater && this.World.SNO.IsDungeon()) specification.SNOLevelAreas[0] = 332339; - if (this.World.WorldSNO.Name.ToLower().Contains("p43_ad")) + switch (this.World.SNO) { - switch (this.World.WorldSNO.Id) - { - case 455282: specification.SNOLevelAreas[0] = 455466; break; //p43_ad_oldtristram - case 452721: specification.SNOLevelAreas[0] = 452986; break; //p43_ad_cathedral_level_01 - case 452922: specification.SNOLevelAreas[0] = 452988; break; //p43_ad_cathedral_level_02 - case 452984: specification.SNOLevelAreas[0] = 452989; break; //p43_ad_cathedral_level_03 - case 452985: specification.SNOLevelAreas[0] = 452990; break; //p43_ad_cathedral_level_04 - case 452991: specification.SNOLevelAreas[0] = 452992; break; //p43_ad_catacombs_level_05 - case 452996: specification.SNOLevelAreas[0] = 452993; break; //p43_ad_catacombs_level_06 - case 452997: specification.SNOLevelAreas[0] = 452994; break; //p43_ad_catacombs_level_07 - case 452998: specification.SNOLevelAreas[0] = 452995; break; //p43_ad_catacombs_level_08 - case 452999: specification.SNOLevelAreas[0] = 453001; break; //p43_ad_caves_level_09 - case 453004: specification.SNOLevelAreas[0] = 453007; break; //p43_ad_caves_level_10 - case 453003: specification.SNOLevelAreas[0] = 453006; break; //p43_ad_caves_level_11 - case 453002: specification.SNOLevelAreas[0] = 453005; break; //p43_ad_caves_level_12 - case 453008: specification.SNOLevelAreas[0] = 453009; break; //p43_ad_hell_level_13 - case 453014: specification.SNOLevelAreas[0] = 453011; break; //p43_ad_hell_level_14 - case 453015: specification.SNOLevelAreas[0] = 453012; break; //p43_ad_hell_level_15 - case 453016: specification.SNOLevelAreas[0] = 453441; break; //p43_ad_hell_level_16 - case 453440: specification.SNOLevelAreas[0] = 453441; break; //p43_ad_level02_sidedungeon_darkpassage - case 453446: specification.SNOLevelAreas[0] = 453471; break; //p43_ad_level03_sidedungeon_leoricstomb - case 453582: specification.SNOLevelAreas[0] = 453583; break; //p43_ad_level06_sidedungeon_chamberofbone - case 458255: specification.SNOLevelAreas[0] = 458256; break; //p43_ad_abandonedfarmstead - case 454208: specification.SNOLevelAreas[0] = 454209; break; //p43_ad_level15_sidedungeon_unholyaltar - } + case WorldSno.p43_ad_oldtristram: specification.SNOLevelAreas[0] = 455466; break; //p43_ad_oldtristram + case WorldSno.p43_ad_cathedral_level_01: specification.SNOLevelAreas[0] = 452986; break; //p43_ad_cathedral_level_01 + case WorldSno.p43_ad_cathedral_level_02: specification.SNOLevelAreas[0] = 452988; break; //p43_ad_cathedral_level_02 + case WorldSno.p43_ad_cathedral_level_03: specification.SNOLevelAreas[0] = 452989; break; //p43_ad_cathedral_level_03 + case WorldSno.p43_ad_cathedral_level_04: specification.SNOLevelAreas[0] = 452990; break; //p43_ad_cathedral_level_04 + case WorldSno.p43_ad_catacombs_level_05: specification.SNOLevelAreas[0] = 452992; break; //p43_ad_catacombs_level_05 + case WorldSno.p43_ad_catacombs_level_06: specification.SNOLevelAreas[0] = 452993; break; //p43_ad_catacombs_level_06 + case WorldSno.p43_ad_catacombs_level_07: specification.SNOLevelAreas[0] = 452994; break; //p43_ad_catacombs_level_07 + case WorldSno.p43_ad_catacombs_level_08: specification.SNOLevelAreas[0] = 452995; break; //p43_ad_catacombs_level_08 + case WorldSno.p43_ad_caves_level_09: specification.SNOLevelAreas[0] = 453001; break; //p43_ad_caves_level_09 + case WorldSno.p43_ad_caves_level_10: specification.SNOLevelAreas[0] = 453007; break; //p43_ad_caves_level_10 + case WorldSno.p43_ad_caves_level_11: specification.SNOLevelAreas[0] = 453006; break; //p43_ad_caves_level_11 + case WorldSno.p43_ad_caves_level_12: specification.SNOLevelAreas[0] = 453005; break; //p43_ad_caves_level_12 + case WorldSno.p43_ad_hell_level_13: specification.SNOLevelAreas[0] = 453009; break; //p43_ad_hell_level_13 + case WorldSno.p43_ad_hell_level_14: specification.SNOLevelAreas[0] = 453011; break; //p43_ad_hell_level_14 + case WorldSno.p43_ad_hell_level_15: specification.SNOLevelAreas[0] = 453012; break; //p43_ad_hell_level_15 + case WorldSno.p43_ad_hell_level_16: specification.SNOLevelAreas[0] = 453441; break; //p43_ad_hell_level_16 + case WorldSno.p43_ad_level02_sidedungeon_darkpassage: specification.SNOLevelAreas[0] = 453441; break; //p43_ad_level02_sidedungeon_darkpassage + case WorldSno.p43_ad_level03_sidedungeon_leoricstomb: specification.SNOLevelAreas[0] = 453471; break; //p43_ad_level03_sidedungeon_leoricstomb + case WorldSno.p43_ad_level06_sidedungeon_chamberofbone: specification.SNOLevelAreas[0] = 453583; break; //p43_ad_level06_sidedungeon_chamberofbone + case WorldSno.p43_ad_abandonedfarmstead: specification.SNOLevelAreas[0] = 458256; break; //p43_ad_abandonedfarmstead + case WorldSno.p43_ad_level15_sidedungeon_unholyaltar: specification.SNOLevelAreas[0] = 454209; break; //p43_ad_level15_sidedungeon_unholyaltar + default: break; // don't change anything for other worlds } return new RevealSceneMessage { diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/MapSystem/World.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/MapSystem/World.cs index 096fbae..10eae72 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/MapSystem/World.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/MapSystem/World.cs @@ -2,6 +2,7 @@ using DiIiS_NA.Core.Helpers.Math; //Blizzless Project 2022 using DiIiS_NA.Core.Logging; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; //Blizzless Project 2022 using DiIiS_NA.GameServer.Core.Types.Math; //Blizzless Project 2022 @@ -70,6 +71,10 @@ namespace DiIiS_NA.GameServer.GSSystem.MapSystem /// SNOHandle for the world. /// public SNOHandle WorldSNO { get; private set; } + public WorldSno SNO + { + get { return (WorldSno)WorldSNO.Id; } + } /// /// QuadTree that contains scenes & actors. @@ -133,7 +138,7 @@ namespace DiIiS_NA.GameServer.GSSystem.MapSystem set { } } - public Dictionary PortalOverrides = new Dictionary(); + public Dictionary PortalOverrides = new Dictionary(); /// /// List of players contained in the world. @@ -161,7 +166,7 @@ namespace DiIiS_NA.GameServer.GSSystem.MapSystem /// public uint NewSceneID { get { return this.IsPvP ? World.NewPvPSceneID : this.Game.NewSceneID; } } - public bool IsPvP { get { return this.WorldSNO.Id == 279626; } } //PvP_Duel_Small + public bool IsPvP { get { return this.SNO == WorldSno.pvp_duel_small_multi; } } //PvP_Duel_Small public static bool PvPMapLoaded = false; @@ -245,11 +250,11 @@ namespace DiIiS_NA.GameServer.GSSystem.MapSystem /// Creates a new world for the given game with given snoId. /// /// The parent game. - /// The snoId for the world. - public World(Game game, int snoId) - : base(snoId == 279626 ? 99999 : game.NewWorldID) + /// The sno for the world. + public World(Game game, WorldSno sno) + : base(sno == WorldSno.pvp_duel_small_multi ? 99999 : game.NewWorldID) { - this.WorldSNO = new SNOHandle(SNOGroup.Worlds, snoId); + this.WorldSNO = new SNOHandle(SNOGroup.Worlds, (int)sno); this.Game = game; @@ -259,7 +264,7 @@ namespace DiIiS_NA.GameServer.GSSystem.MapSystem this._quadTree = new QuadTree(new Size(60, 60), 0); this.NextLocation = this.PrevLocation = new ResolvedPortalDestination { - WorldSNO = -1, + WorldSNO = (int)WorldSno.__NONE, DestLevelAreaSNO = -1, StartingPointActorTag = -1 }; @@ -269,13 +274,13 @@ namespace DiIiS_NA.GameServer.GSSystem.MapSystem this.Game.AddWorld(this); //this.Game.StartTracking(this); // start tracking the dynamicId for the world. - if (this.WorldSNO.Id == 267412) //Blood Marsh + if (this.SNO == WorldSno.x1_bog_01) //Blood Marsh { - var worlds = new List() { 283552, 341037, 341038, 341040 }; + var worlds = new List() { WorldSno.x1_catacombs_level01, WorldSno.x1_catacombs_fakeentrance_02, WorldSno.x1_catacombs_fakeentrance_03, WorldSno.x1_catacombs_fakeentrance_04 }; var scenes = new List() { 265624, 265655, 265678, 265693 }; foreach (var scene in scenes) { - var wld = worlds[FastRandom.Instance.Next(worlds.Count())]; + var wld = worlds[FastRandom.Instance.Next(worlds.Count)]; this.PortalOverrides.Add(scene, wld); worlds.Remove(wld); } @@ -404,7 +409,7 @@ namespace DiIiS_NA.GameServer.GSSystem.MapSystem if (player.RevealedObjects.ContainsKey(this.GlobalID)) return false; - int sceneGridSize = this.WorldSNO.Name.ToLower().Contains("zolt") ? 100 : 60; + int sceneGridSize = this.SNO.IsUsingZoltCustomGrid() ? 100 : 60; player.InGameClient.SendMessage(new RevealWorldMessage() // Reveal world to player { @@ -477,7 +482,7 @@ namespace DiIiS_NA.GameServer.GSSystem.MapSystem } //Убираем балки с проходов - if (this.WorldSNO.Id == 71150) + if (this.SNO == WorldSno.trout_town) { foreach (var boarded in this.GetActorsBySNO(111888)) boarded.Destroy(); diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/ConversationManager.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/ConversationManager.cs index c525c45..c682fe7 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/ConversationManager.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/ConversationManager.cs @@ -56,6 +56,7 @@ using System.Collections.Concurrent; using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Quest; //Blizzless Project 2022 using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Platinum; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem { @@ -341,13 +342,13 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem if (this.SNOId == 72817) //Tristram parom man { - var world = this.player.World.Game.GetWorld(72882); + var world = this.player.World.Game.GetWorld(WorldSno.trout_townattack); this.player.ChangeWorld(world, world.GetStartingPointById(116).Position); } else if (this.SNOId == 208400) //Cow king { - var portal = this.player.World.Game.GetWorld(71150).GetActorBySNO(209083); + var portal = this.player.World.Game.GetWorld(WorldSno.trout_town).GetActorBySNO(209083); (portal as ActorSystem.Implementations.WhimsyshirePortal).Open(); } @@ -355,7 +356,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem { this.player.ShowConfirmation(this.player.DynamicID(this.player), (() => { - var world = this.player.World.Game.GetWorld(279626); + var world = this.player.World.Game.GetWorld(WorldSno.pvp_duel_small_multi); this.player.ChangeWorld(world, world.GetStartingPointById(288).Position); })); } @@ -494,7 +495,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem this.player.InGameClient.Game.ActiveNephalemTimer = false; this.player.InGameClient.Game.ActiveNephalemProgress = 0; - var HubWorld = this.player.InGameClient.Game.GetWorld(332336); + var HubWorld = this.player.InGameClient.Game.GetWorld(WorldSno.x1_tristram_adventure_mode_hub); var NStone = HubWorld.GetActorBySNO(364715); bool Activated = true; NStone.SetIdleAnimation(NStone.AnimationSet.TagMapAnimDefault[Core.Types.TagMap.AnimationSetKeys.IdleDefault]); @@ -671,13 +672,14 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem #region A1-Q2 case 17667: //var BlacksmithQuest = player.InGameClient.Game.GetWorld(71150).GetActorBySNO(65036,true); - var CainBrains = player.InGameClient.Game.GetWorld(60713).GetActorBySNO(102386, true); + var world = player.InGameClient.Game.GetWorld(WorldSno.trdun_cain_intro); + var CainBrains = world.GetActorBySNO(102386, true); Vector3D CainPath = new Vector3D(76.99389f, 155.145f, 0.0997252f); var facingAngle = ActorSystem.Movement.MovementHelpers.GetFacingAngle(CainBrains, CainPath); CainBrains.Move(CainPath, facingAngle); var A1Q2Wait1 = System.Threading.Tasks.Task.Delay(7000).ContinueWith(delegate { - var actor = player.InGameClient.Game.GetWorld(60713).GetActorsBySNO(5723).Where(d => d.Visible).FirstOrDefault(); + var actor = world.GetActorsBySNO(5723).Where(d => d.Visible).FirstOrDefault(); (actor as ActorSystem.Implementations.Door).Open(); var A1Q2Wait2 = System.Threading.Tasks.Task.Delay(2000).ContinueWith(delegate @@ -691,7 +693,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem #endregion #region A1-Q3 case 198292: - var BlacksmithQuest = player.InGameClient.Game.GetWorld(71150).GetActorBySNO(65036, true); + var BlacksmithQuest = player.InGameClient.Game.GetWorld(WorldSno.trout_town).GetActorBySNO(65036, true); BlacksmithQuest.WalkSpeed = 0.33f; Vector3D FirstPoint = new Vector3D(2905.856f, 2584.807f, 0.5997877f); Vector3D SecondPoint = new Vector3D(2790.396f, 2611.313f, 0.5997864f); @@ -712,7 +714,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem //168282 #region A1-Q4 case 168282: - var wrld = player.InGameClient.Game.GetWorld(105406); + var wrld = player.InGameClient.Game.GetWorld(WorldSno.a1trdun_level05_templar); foreach (var Wall in wrld.GetActorsBySNO(109209)) if (Wall.Position.Z > -23f) { @@ -724,7 +726,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem } break; case 17921: - var cryptwrld = player.InGameClient.Game.GetWorld(50585); + var cryptwrld = player.InGameClient.Game.GetWorld(WorldSno.a1trdun_level07); foreach (var ghost in cryptwrld.GetActorsBySNO(5360)) ghost.Destroy(); break; diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Player.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Player.cs index 5b0777b..645cbed 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Player.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Player.cs @@ -117,6 +117,7 @@ using DiIiS_NA.Core.Helpers.Hash; using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Encounter; //Blizzless Project 2022 using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.UI; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem { @@ -1603,18 +1604,18 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem World NephalemPWorld = null; Actor NStone = null; Portal portal = null; - int map = -1; - int[] Maps = new int[] + var map = WorldSno.__NONE; + WorldSno[] Maps = new WorldSno[] { - 331263, //x1_lr_tileset_Westmarch - 360797, //_x1_lr_tileset_fortress_large - 288823, //x1_lr_tileset_zoltruins - 331389, //x1_lr_tileset_hexmaze - 275960, //x1_lr_tileset_icecave + WorldSno.x1_lr_tileset_westmarch, //x1_lr_tileset_Westmarch + WorldSno.x1_lr_tileset_fortress_large, //_x1_lr_tileset_fortress_large + WorldSno.x1_lr_tileset_zoltruins, //x1_lr_tileset_zoltruins + WorldSno.x1_lr_tileset_hexmaze, //x1_lr_tileset_hexmaze + WorldSno.x1_lr_tileset_icecave, //x1_lr_tileset_icecave - 275946, //x1_lr_tileset_crypt - 275926, //x1_lr_tileset_corruptspire + WorldSno.x1_lr_tileset_crypt, //x1_lr_tileset_crypt + WorldSno.x1_lr_tileset_corruptspire, //x1_lr_tileset_corruptspire //288843, //x1_lr_tileset_sewers }; @@ -1631,7 +1632,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem map = Maps[RandomHelper.Next(0, Maps.Length)]; //map = 288823; - NewTagMap.Add(new TagKeySNO(526850), new TagMapEntry(526850, map, 0)); //Мир + NewTagMap.Add(new TagKeySNO(526850), new TagMapEntry(526850, (int)map, 0)); //Мир NewTagMap.Add(new TagKeySNO(526853), new TagMapEntry(526853, 288482, 0)); //Зона NewTagMap.Add(new TagKeySNO(526851), new TagMapEntry(526851, 172, 0)); //Точка входа this.InGameClient.Game.WorldOfPortalNephalem = map; @@ -1653,14 +1654,15 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem foreach (var actor in NephalemPWorld.Actors.Values) if (actor is Portal) { + var p = actor as Portal; if (!actor.CurrentScene.SceneSNO.Name.ToLower().Contains("entrance")) { if (!actor.CurrentScene.SceneSNO.Name.ToLower().Contains("exit")) actor.Destroy(); else if (!ExitSetted) { - (actor as Portal).Destination.DestLevelAreaSNO = 288684; - (actor as Portal).Destination.WorldSNO = this.InGameClient.Game.WorldOfPortalNephalemSec; + p.Destination.DestLevelAreaSNO = 288684; + p.Destination.WorldSNO = (int)this.InGameClient.Game.WorldOfPortalNephalemSec; ExitSetted = true; var NephalemPWorldS2 = this.InGameClient.Game.GetWorld(this.InGameClient.Game.WorldOfPortalNephalemSec); @@ -1672,7 +1674,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem else { (atr as Portal).Destination.DestLevelAreaSNO = 332339; - (atr as Portal).Destination.WorldSNO = 332336; + (atr as Portal).Destination.WorldSNO = (int)WorldSno.x1_tristram_adventure_mode_hub; (atr as Portal).Destination.StartingPointActorTag = 172; } } @@ -1684,9 +1686,9 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem } else { - (actor as Portal).Destination.DestLevelAreaSNO = 332339; - (actor as Portal).Destination.WorldSNO = 332336; - (actor as Portal).Destination.StartingPointActorTag = 24; + p.Destination.DestLevelAreaSNO = 332339; + p.Destination.WorldSNO = (int)WorldSno.x1_tristram_adventure_mode_hub; + p.Destination.StartingPointActorTag = 24; } } else if (actor is Waypoint) @@ -1809,7 +1811,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem this.InGameClient.Game.NephalemGreater = true; map = Maps[RandomHelper.Next(0, Maps.Length)]; - NewTagMap.Add(new TagKeySNO(526850), new TagMapEntry(526850, map, 0)); //Мир + NewTagMap.Add(new TagKeySNO(526850), new TagMapEntry(526850, (int)map, 0)); //Мир NewTagMap.Add(new TagKeySNO(526853), new TagMapEntry(526853, 288482, 0)); //Зона NewTagMap.Add(new TagKeySNO(526851), new TagMapEntry(526851, 172, 0)); //Точка входа this.InGameClient.Game.WorldOfPortalNephalem = map; @@ -1823,7 +1825,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem else { (actor as Portal).Destination.DestLevelAreaSNO = 332339; - (actor as Portal).Destination.WorldSNO = 332336; + (actor as Portal).Destination.WorldSNO = (int)WorldSno.x1_tristram_adventure_mode_hub; (actor as Portal).Destination.StartingPointActorTag = 24; } } @@ -2409,36 +2411,36 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem actor.OnPlayerApproaching(this); this.VacuumPickup(); - if (this.World.Game.OnLoadWorldActions.ContainsKey(this.World.WorldSNO.Id)) + if (this.World.Game.OnLoadWorldActions.ContainsKey(this.World.SNO)) { - Logger.Trace("OnLoadWorldActions: {0}", this.World.WorldSNO.Id); - lock (this.World.Game.OnLoadWorldActions[this.World.WorldSNO.Id]) + Logger.Trace("OnLoadWorldActions: {0}", this.World.SNO); + lock (this.World.Game.OnLoadWorldActions[this.World.SNO]) { try { - foreach (var action in this.World.Game.OnLoadWorldActions[this.World.WorldSNO.Id]) + foreach (var action in this.World.Game.OnLoadWorldActions[this.World.SNO]) { action.Invoke(); } } catch { } - this.World.Game.OnLoadWorldActions[this.World.WorldSNO.Id].Clear(); + this.World.Game.OnLoadWorldActions[this.World.SNO].Clear(); } } - if (this.World.Game.OnLoadWorldActions.ContainsKey(this.CurrentScene.SceneSNO.Id)) + if (this.World.Game.OnLoadSceneActions.ContainsKey(this.CurrentScene.SceneSNO.Id)) { Logger.Trace("OnLoadSceneActions: {0}", this.CurrentScene.SceneSNO.Id); - lock (this.World.Game.OnLoadWorldActions[this.CurrentScene.SceneSNO.Id]) + lock (this.World.Game.OnLoadSceneActions[this.CurrentScene.SceneSNO.Id]) { try { - foreach (var action in this.World.Game.OnLoadWorldActions[this.CurrentScene.SceneSNO.Id]) + foreach (var action in this.World.Game.OnLoadSceneActions[this.CurrentScene.SceneSNO.Id]) { action.Invoke(); } } catch { } - this.World.Game.OnLoadWorldActions[this.CurrentScene.SceneSNO.Id].Clear(); + this.World.Game.OnLoadSceneActions[this.CurrentScene.SceneSNO.Id].Clear(); } } @@ -2519,7 +2521,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem } var levelArea = scene.Specification.SNOLevelAreas[0]; - Logger.Warn($"OnTryWaypoint: Id: {tryWaypointMessage.nWaypoint}, WorldId: {wpWorld.WorldSNO.Id}, levelArea: {levelArea}"); + Logger.Warn($"OnTryWaypoint: Id: {tryWaypointMessage.nWaypoint}, WorldId: {wpWorld.SNO}, levelArea: {levelArea}"); if (wayPoint == null) return; Logger.Warn($"WpWorld: {wpWorld}, wayPoint: {wayPoint}"); InGameClient.SendMessage(new SimpleMessage(Opcodes.LoadingWarping)); @@ -3348,30 +3350,30 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem float Range = 200f; if (this.InGameClient.Game.CurrentEncounter.activated) Range = 360f; - - List actors_around = this.GetActorsInRange(Range); - if (this.World.WorldSNO.Id == 295225 || - this.World.WorldSNO.Id == 103209 || - this.World.WorldSNO.Id == 186552 || - this.World.WorldSNO.Id == 328484 || - this.World.WorldSNO.Id == 105406) + var specialWorlds = new WorldSno[] { - actors_around = this.World.Actors.Values.ToList(); - } + WorldSno.x1_pand_batteringram, + WorldSno.gluttony_boss, + WorldSno.a3dun_hub_adria_tower, + WorldSno.x1_malthael_boss_arena, + WorldSno.a1trdun_level05_templar, + }; + + var actors_around = specialWorlds.Contains(this.World.SNO) ? this.World.Actors.Values.ToList() : this.GetActorsInRange(Range); foreach (var actor in actors_around) // reveal actors in player's proximity. { if (actor is Player) // if the actors is already revealed, skip it. continue; - if (this.World.WorldSNO.Id == 332336 && actor is Portal) - if ((actor as Portal).Destination.WorldSNO == 332336) + if (this.World.SNO == WorldSno.x1_tristram_adventure_mode_hub && actor is Portal) + if ((actor as Portal).Destination.WorldSNO == (int)WorldSno.x1_tristram_adventure_mode_hub) continue; - if (this.World.WorldSNO.Id == 71150 && actor is Portal) - if ((actor as Portal).Destination.WorldSNO == 71150 && (actor as Portal).Destination.DestLevelAreaSNO == 19947) + if (this.World.SNO == WorldSno.trout_town && actor is Portal) + if ((actor as Portal).Destination.WorldSNO == (int)WorldSno.trout_town && (actor as Portal).Destination.DestLevelAreaSNO == 19947) { - (actor as Portal).Destination.WorldSNO = 332336; + (actor as Portal).Destination.WorldSNO = (int)WorldSno.x1_tristram_adventure_mode_hub; (actor as Portal).Destination.StartingPointActorTag = 483; } @@ -3460,22 +3462,22 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem { EnterPosition = this.Position, WorldID = world.GlobalID, - WorldSNO = world.WorldSNO.Id, + WorldSNO = (int)world.SNO, PlayerIndex = this.PlayerIndex, EnterLookUsed = true, EnterKnownLookOverrides = new EnterKnownLookOverrides { Field0 = new int[] { -1, -1, -1, -1, -1, -1 } } }); - switch (world.WorldSNO.Id) + switch (world.SNO) { - case 308705: + case WorldSno.x1_westmarch_overlook_d: this.InGameClient.SendMessage(new PlayerSetCameraObserverMessage() { Field0 = 309026, Field1 = new WorldPlace() { Position = new Vector3D(), WorldID = 0 } }); break; - case 306549: + case WorldSno.x1_westm_intro: this.InGameClient.SendMessage(new PlayerSetCameraObserverMessage() { Field0 = 1541, diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/PowerSystem/Implementations/General/TownTeleport.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/PowerSystem/Implementations/General/TownTeleport.cs index 99004d9..69e9ee0 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/PowerSystem/Implementations/General/TownTeleport.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/PowerSystem/Implementations/General/TownTeleport.cs @@ -35,7 +35,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations var scenes = World.QuadTree.Query(proximity); var scene = scenes[0]; // Parent scene /fasbat int levelArea = scene.Specification.SNOLevelAreas[0]; - (World.Game.GetHearthPortal() as HearthPortal).ReturnWorld = World.WorldSNO.Id; + (World.Game.GetHearthPortal() as HearthPortal).ReturnWorld = World.SNO; (World.Game.GetHearthPortal() as HearthPortal).ReturnPosition = User.Position; Vector3D exCheckpoint = User.CheckPointPosition; diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/PowerSystem/Implementations/MonsterSkills/SingleProjectileSkill.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/PowerSystem/Implementations/MonsterSkills/SingleProjectileSkill.cs index 7c04518..1938167 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/PowerSystem/Implementations/MonsterSkills/SingleProjectileSkill.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/PowerSystem/Implementations/MonsterSkills/SingleProjectileSkill.cs @@ -31,6 +31,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Implementations.MonsterSkills protected void SetProjectile(PowerContext context, int actorSNO, Vector3D position, float speed = 1f, Action OnCollision = null) { if (User is Monster) + // FIXME: Non-exist world id if (User.World.WorldSNO.Id == 1 || User.World.WorldSNO.Id == 1) position.Z = (User as Monster).CorrectedPosition.Z; diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/PowerSystem/Payloads/DeathPayload.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/PowerSystem/Payloads/DeathPayload.cs index 3d989a0..75f6e2c 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/PowerSystem/Payloads/DeathPayload.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/PowerSystem/Payloads/DeathPayload.cs @@ -56,6 +56,7 @@ using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Quest; using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.World; //Blizzless Project 2022 using DiIiS_NA.GameServer.MessageSystem.Message.Fields; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads { @@ -306,7 +307,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads this.Context.User.Attributes[GameAttribute.Item_Power_Passive, 249963] == 1 || this.Context.User.Attributes[GameAttribute.Item_Power_Passive, 249954] == 1 || (float)FastRandom.Instance.NextDouble() < 0.1f || - this.Target.World.WorldSNO.Id == 211471) + this.Target.World.SNO == WorldSno.a1dun_random_level01) switch ((int)this.DeathDamageType.HitEffect) { case 0: this.Target.World.BroadcastIfRevealed(plr => new PlayEffectMessage() { ActorId = this.Target.DynamicID(plr), Effect = Effect.Gore }, this.Target); break; @@ -336,7 +337,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads if (this.Target.ActorSNO.Id == 210120) //Сады надежды { //Первый этаж садов надежды - if (Target.World.WorldSNO.Id == 109513) + if (Target.World.SNO == WorldSno.a4dun_garden_of_hope_01) { //Проверяем есть ли порталы var PortalToHell = Target.World.GetActorsBySNO(224890); //{[Actor] [Type: Gizmo] SNOId:224890 DynamicId: 280 Position: x:696,681 y:695,4387 z:0,2636871 Name: a4_Heaven_Gardens_HellPortal} @@ -363,7 +364,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads } } //Второй этаж садов надежды - else if (Target.World.WorldSNO.Id == 219659) + else if (Target.World.SNO == WorldSno.a4dun_garden_of_hope_random) { //Проверяем есть ли порталы var PortalToHell = Target.World.GetActorsBySNO(224890); //{[Actor] [Type: Gizmo] SNOId:224890 DynamicId: 280 Position: x:696,681 y:695,4387 z:0,2636871 Name: a4_Heaven_Gardens_HellPortal} if (PortalToHell.Count == 0) @@ -480,8 +481,8 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads if (this.Target is Unique) { - if (LoreRegistry.Lore.ContainsKey(this.Target.World.WorldSNO.Id) && LoreRegistry.Lore[this.Target.World.WorldSNO.Id].chests_lore.ContainsKey(this.Target.ActorSNO.Id)) - foreach (int loreId in LoreRegistry.Lore[this.Target.World.WorldSNO.Id].chests_lore[this.Target.ActorSNO.Id]) + if (LoreRegistry.Lore.ContainsKey(this.Target.World.SNO) && LoreRegistry.Lore[this.Target.World.SNO].chests_lore.ContainsKey(this.Target.ActorSNO.Id)) + foreach (int loreId in LoreRegistry.Lore[this.Target.World.SNO].chests_lore[this.Target.ActorSNO.Id]) if (!plr.HasLore(loreId)) { this.Target.World.DropItem(this.Target, null, ItemGenerator.CreateLore(plr, loreId)); @@ -598,7 +599,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads foreach (var bounty in this.Target.World.Game.QuestManager.Bounties) { if (this.Target.OriginalLevelArea == -1) this.Target.OriginalLevelArea = this.Target.CurrentScene.Specification.SNOLevelAreas[0]; - bounty.CheckKill(this.Target.ActorSNO.Id, this.Target.OriginalLevelArea, this.Target.World.WorldSNO.Id); + bounty.CheckKill(this.Target.ActorSNO.Id, this.Target.OriginalLevelArea, this.Target.World.SNO); } //Nephalem Rift @@ -796,7 +797,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PowerSystem.Payloads } }); //StartConversation(this.Target.World, 340878); - var HubWorld = this.Target.World.Game.GetWorld(332336); + var HubWorld = this.Target.World.Game.GetWorld(WorldSno.x1_tristram_adventure_mode_hub); var Orek = (HubWorld.GetActorBySNO(363744) as InteractiveNPC); Orek.Conversations.Add(new ActorSystem.Interactions.ConversationInteraction(340878)); Orek.ForceConversationSNO = 340878; diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActI.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActI.cs index 9f27316..d4483df 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActI.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActI.cs @@ -36,6 +36,7 @@ using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Hireling; using DiIiS_NA.GameServer.Core.Types.TagMap; //Blizzless Project 2022 using DiIiS_NA.GameServer.GSSystem.PowerSystem; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.QuestSystem { @@ -79,7 +80,8 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - this.Game.AddOnLoadAction(71150, () => + var world = this.Game.GetWorld(WorldSno.trout_town); + this.Game.AddOnLoadWorldAction(WorldSno.trout_town, () => { if (Game.CurrentQuest == 87700 & Game.CurrentStep == -1) { @@ -87,11 +89,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem //ActiveArrow(this.Game.GetWorld(71150), 3739); //Убираем лишнюю Лею - var Leah = this.Game.GetWorld(71150).GetActorBySNO(4580, true); + var Leah = world.GetActorBySNO(4580, true); if (Leah != null) Leah.Hidden = true; } }); - setActorOperable(this.Game.GetWorld(71150), 90419, false); + setActorOperable(world, 90419, false); ListenConversation(151087, new Advance()); }) }); @@ -103,10 +105,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 42, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => - { + { + var world = this.Game.GetWorld(WorldSno.trout_town); script = new SurviveTheWaves(); - script.Execute(this.Game.GetWorld(71150)); - var Leah = this.Game.GetWorld(71150).GetActorBySNO(4580, true); + script.Execute(world); + var Leah = world.GetActorBySNO(4580, true); if (Leah != null) Leah.Hidden = true; ListenKill(6644, 6, new SecondWave()); ListenKill(6632, 7, new Advance()); @@ -123,21 +126,22 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go and talk to Leah - StartConversation(this.Game.GetWorld(71150), 151102); + var world = this.Game.GetWorld(WorldSno.trout_town); + StartConversation(world, 151102); try { - setActorOperable(this.Game.GetWorld(71150), 3739, true); - if (this.Game.GetWorld(71150).GetActorBySNO(141508, true) != null) - this.Game.GetWorld(71150).GetActorBySNO(141508, true).Hidden = true; - if (this.Game.GetWorld(71150).GetActorBySNO(112131, true) != null) - this.Game.GetWorld(71150).GetActorBySNO(112131, true).Hidden = true; + setActorOperable(world, 3739, true); + if (world.GetActorBySNO(141508, true) != null) + world.GetActorBySNO(141508, true).Hidden = true; + if (world.GetActorBySNO(112131, true) != null) + world.GetActorBySNO(112131, true).Hidden = true; } catch { } UnlockTeleport(0); - if (this.Game.GetWorld(71150).GetActorsBySNO(90419).Where(d => d.Visible).FirstOrDefault() != null) - Open(this.Game.GetWorld(71150), 90419); - ActiveArrow(this.Game.GetWorld(71150), 178293, 109362); + if (world.GetActorsBySNO(90419).Where(d => d.Visible).FirstOrDefault() != null) + Open(world, 90419); + ActiveArrow(world, 178293, WorldSno.trout_tristram_inn); ListenConversation(151123, new Advance()); }) }); @@ -151,7 +155,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //fighting zombies script = new LeahInn(); - script.Execute(this.Game.GetWorld(109362)); + script.Execute(this.Game.GetWorld(WorldSno.trout_tristram_inn)); ListenKill(203121, 5, new LaunchConversation(151156)); ListenConversation(151156, new Advance()); @@ -167,10 +171,10 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //talk to Leah again ListenConversation(151167, new Advance()); - this.Game.AddOnLoadAction(71150, () => + this.Game.AddOnLoadWorldAction(WorldSno.trout_town, () => { if (Game.CurrentQuest == 87700) - ActiveArrow(this.Game.GetWorld(71150), 3739); + ActiveArrow(this.Game.GetWorld(WorldSno.trout_town), 3739); }); }) }); @@ -197,17 +201,18 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill wretched mother - Break(this.Game.GetWorld(71150), 81699); + var world = this.Game.GetWorld(WorldSno.trout_town); + Break(world, 81699); - foreach (var sp in this.Game.GetWorld(71150).GetActorsBySNO(89957)) + foreach (var sp in world.GetActorsBySNO(89957)) { if (sp.CurrentScene.SceneSNO.Id == 33348) if (sp is ActorSystem.Spawner) //(sp as ActorSystem.Spawner).Spawn(); - this.Game.GetWorld(71150).SpawnMonster(6644, sp.Position); + world.SpawnMonster(6644, sp.Position); } - ActivateQuestMonsters(this.Game.GetWorld(71150), 219725); + ActivateQuestMonsters(world, 219725); ListenKill(219725, 1, new Advance()); }) }); @@ -220,7 +225,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //MOAR wretched mothers - StartConversation(this.Game.GetWorld(71150), 156223); + StartConversation(this.Game.GetWorld(WorldSno.trout_town), 156223); ListenKill(176889, 1, new Advance()); ListenKillBonus(219725, 3, new SideTarget()); }) @@ -234,7 +239,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 }, new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //return to New Tristram and talk to Rumford - DeactivateQuestMonsters(this.Game.GetWorld(71150), 219725); + DeactivateQuestMonsters(this.Game.GetWorld(WorldSno.trout_town), 219725); ListenInteract(192164, 1, new CompleteObjective(0)); ListenConversation(198521, new Advance()); }) @@ -262,7 +267,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - StartConversation(this.Game.GetWorld(71150), 198541); + StartConversation(this.Game.GetWorld(WorldSno.trout_town), 198541); }) }); @@ -277,14 +282,15 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem UnlockTeleport(1); ListenTeleport(101351, new Advance()); //AddFollower(this.Game.GetWorld(71150), 4580); - this.Game.AddOnLoadAction(71150, () => + this.Game.AddOnLoadWorldAction(WorldSno.trout_town, () => { - this.Game.AddOnLoadAction(71150, () => + // TODO: CHeck for possible removing outer adding + this.Game.AddOnLoadWorldAction(WorldSno.trout_town, () => { if (Game.CurrentQuest == 72095) if (Game.CurrentStep == -1 || Game.CurrentStep == 7) { - AddFollower(this.Game.GetWorld(71150), 4580); + AddFollower(this.Game.GetWorld(WorldSno.trout_town), 4580); } }); @@ -300,13 +306,14 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go to gates - StartConversation(this.Game.GetWorld(71150), 166678); + var world = this.Game.GetWorld(WorldSno.trout_town); + StartConversation(world, 166678); ListenProximity(108466, new Advance()); - this.Game.AddOnLoadAction(71150, () => + this.Game.AddOnLoadWorldAction(WorldSno.trout_town, () => { if (Game.CurrentQuest == 72095) if (Game.CurrentStep == 28 || Game.CurrentStep == 7 || Game.CurrentStep == -1) - ActiveArrow(this.Game.GetWorld(71150), 108466); + ActiveArrow(world, 108466); }); }) @@ -320,13 +327,14 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go to Adria house - if (this.Game.GetWorld(71150).GetActorsBySNO(108466).Where(d => d.Visible).FirstOrDefault() != null) - Open(this.Game.GetWorld(71150), 108466); - this.Game.AddOnLoadAction(71150, () => + var world = this.Game.GetWorld(WorldSno.trout_town); + if (world.GetActorsBySNO(108466).Where(d => d.Visible).FirstOrDefault() != null) + Open(world, 108466); + this.Game.AddOnLoadWorldAction(WorldSno.trout_town, () => { if (Game.CurrentQuest == 72095) if (Game.CurrentStep == 49 || Game.CurrentStep == 39) - ActiveArrow(this.Game.GetWorld(71150), 191886, 62751); + ActiveArrow(world, 191886, WorldSno.trout_adriascellar); }); ListenProximity(191886, new Advance()); }) @@ -355,16 +363,17 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem { //go to cave //DestroyFollower(4580); ListenTeleport(62968, new Advance()); - this.Game.AddOnLoadAction(62751, () => + this.Game.AddOnLoadWorldAction(WorldSno.trout_adriascellar, () => { - foreach (var lh in this.Game.GetWorld(62751).GetActorsBySNO(203030)) + var world = this.Game.GetWorld(WorldSno.trout_adriascellar); + foreach (var lh in world.GetActorsBySNO(203030)) { lh.SetVisible(false); lh.Hidden = true; } if (Game.CurrentQuest == 72095) - ActiveArrow(this.Game.GetWorld(71150), 131123); + ActiveArrow(world, 131123); }); }) }); @@ -399,14 +408,15 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem - this.Game.AddOnLoadAction(62751, () => + this.Game.AddOnLoadWorldAction(WorldSno.trout_adriascellar, () => { - CapitanDaltyn = this.Game.GetWorld(62751).SpawnMonster(156801, new Vector3D { X = 52.587f, Y = 103.368f, Z = 0.1f }); + var world = this.Game.GetWorld(WorldSno.trout_adriascellar); + CapitanDaltyn = world.SpawnMonster(156801, new Vector3D { X = 52.587f, Y = 103.368f, Z = 0.1f }); CapitanDaltyn.Attributes[GameAttribute.Quest_Monster] = true; CapitanDaltyn.PlayAnimation(5, 11523); foreach (Vector3D point in Zombies) { - var Zombie = this.Game.GetWorld(62751).SpawnMonster(6644, point); + var Zombie = world.SpawnMonster(6644, point); Zombie.Attributes[GameAttribute.Quest_Monster] = true; Zombie.PlayAnimation(5, 11523); } @@ -423,9 +433,10 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk to Leah in cave - foreach (var host in this.Game.GetWorld(62751).GetActorsBySNO(4580)) + var world = this.Game.GetWorld(WorldSno.trout_adriascellar); + foreach (var host in world.GetActorsBySNO(4580)) { - foreach (var lh in this.Game.GetWorld(62751).GetActorsBySNO(203030)) + foreach (var lh in world.GetActorsBySNO(203030)) { lh.SetVisible(true); lh.Hidden = false; @@ -447,12 +458,13 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go to church + var world = this.Game.GetWorld(WorldSno.trout_town); ListenProximity(167289, new Advance()); - if (this.Game.GetWorld(71150).GetActorByGlobalId(LeahTempId) != null) - this.Game.GetWorld(71150).GetActorByGlobalId(LeahTempId).Hidden = false; - setActorVisible(this.Game.GetWorld(71150), 141508, false); - if (this.Game.GetWorld(71150).GetActorBySNO(112131, true) != null) - this.Game.GetWorld(71150).GetActorBySNO(112131, true).Hidden = true; + if (world.GetActorByGlobalId(LeahTempId) != null) + world.GetActorByGlobalId(LeahTempId).Hidden = false; + setActorVisible(world, 141508, false); + if (world.GetActorBySNO(112131, true) != null) + world.GetActorBySNO(112131, true).Hidden = true; //this.Game.GetWorld(71150).GetActorBySNO(196224, true).Hidden = true; }) }); @@ -490,9 +502,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //kill skeletons //115403 elite //this.Game.GetWorld(60713).SpawnMonster(115403, new Vector3D{X = 99.131f, Y = 211.501f, Z = 0.1f}); - this.Game.AddOnLoadAction(60713, () => + this.Game.AddOnLoadWorldAction(WorldSno.trdun_cain_intro, () => { - setActorOperable(this.Game.GetWorld(60713), 156058, false); + setActorOperable(this.Game.GetWorld(WorldSno.trdun_cain_intro), 156058, false); }); ListenKill(115403, 1, new Advance()); }) @@ -507,7 +519,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //talk to Cain //this.Game.GetWorld(60713).GetActorBySNO(5723, true).Hidden = true; - setActorOperable(this.Game.GetWorld(71150), 121241, false); + setActorOperable(this.Game.GetWorld(WorldSno.trout_town), 121241, false); ListenConversation(17667, new Advance()); }) }); @@ -521,7 +533,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //go with Cain this.Game.CurrentEncounter.activated = false; - StartConversation(this.Game.GetWorld(60713), 72496); + StartConversation(this.Game.GetWorld(WorldSno.trdun_cain_intro), 72496); ListenTeleport(19938, new Advance()); }) }); @@ -534,19 +546,20 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk to Leah in New Tristram - this.Game.AddOnLoadAction(60713, () => + var tristramWorld = this.Game.GetWorld(WorldSno.trout_town); + this.Game.AddOnLoadWorldAction(WorldSno.trdun_cain_intro, () => { - Open(this.Game.GetWorld(60713), 5723); + Open(this.Game.GetWorld(WorldSno.trdun_cain_intro), 5723); }); - this.Game.AddOnLoadAction(71150, () => + this.Game.AddOnLoadWorldAction(WorldSno.trout_town, () => { - StartConversation(this.Game.GetWorld(71150), 72498); + StartConversation(tristramWorld, 72498); }); //StartConversation(this.Game.GetWorld(71150), 72496); - var CheckLeah = this.Game.GetWorld(71150).GetActorBySNO(4580, true); + var CheckLeah = tristramWorld.GetActorBySNO(4580, true); if (CheckLeah == null) { - var Leah = this.Game.GetWorld(71150).GetActorBySNO(4580, false); + var Leah = tristramWorld.GetActorBySNO(4580, false); if (Leah != null) { Leah.Hidden = false; @@ -582,7 +595,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - this.Game.AddOnLoadAction(71150, () => + this.Game.AddOnLoadWorldAction(WorldSno.trout_town, () => { if (Game.CurrentQuest == 72221) if (Game.CurrentStep == -1 || Game.CurrentStep == 41) @@ -596,7 +609,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Cain.Attributes[GameAttribute.Conversation_Icon, 0] = 2; Cain.Attributes.BroadcastChangedIfRevealed(); //*/ - StartConversation(this.Game.GetWorld(71150), 198691); + StartConversation(this.Game.GetWorld(WorldSno.trout_town), 198691); } }); //ListenConversation(198691, new Advance()); @@ -611,8 +624,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk to Hedric - ActiveArrow(this.Game.GetWorld(71150), 65036); - ActorSystem.InteractiveNPC Cain = this.Game.GetWorld(71150).GetActorBySNO(3533, true) as ActorSystem.InteractiveNPC; + var world = this.Game.GetWorld(WorldSno.trout_town); + ActiveArrow(world, 65036); + var Cain = world.GetActorBySNO(3533, true) as ActorSystem.InteractiveNPC; Cain.Conversations.Clear(); Cain.Attributes[GameAttribute.Conversation_Icon, 0] = 1; Cain.Attributes.BroadcastChangedIfRevealed(); @@ -630,20 +644,23 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go to cellar and kill zombies - DisableArrow(this.Game.GetWorld(71150), this.Game.GetWorld(71150).GetActorBySNO(65036)); + var tristramWorld = this.Game.GetWorld(WorldSno.trout_town); + DisableArrow(tristramWorld, tristramWorld.GetActorBySNO(65036)); //136441 //* - this.Game.AddOnLoadAction(136441, () => + this.Game.AddOnLoadWorldAction(WorldSno.trout_oldtristram_cellar_f, () => { //ТОЧНО ПРЯЧЕМ КУЗНЕЦА - this.Game.GetWorld(136441).GetActorBySNO(65036).Hidden = true; - this.Game.GetWorld(136441).GetActorBySNO(65036).SetVisible(false); - foreach (var plr in this.Game.GetWorld(136441).Players.Values) - this.Game.GetWorld(136441).GetActorBySNO(65036).Unreveal(plr); + var questWorld = this.Game.GetWorld(WorldSno.trout_oldtristram_cellar_f); + var questActor = questWorld.GetActorBySNO(65036); + questActor.Hidden = true; + questActor.SetVisible(false); + foreach (var plr in questWorld.Players.Values) + questActor.Unreveal(plr); //Добавляем - AddFollower(this.Game.GetWorld(136441), 65036); + AddFollower(questWorld, 65036); //Даём мощ - foreach (var Smith in this.Game.GetWorld(136441).GetActorsBySNO(65036)) + foreach (var Smith in questWorld.GetActorsBySNO(65036)) { var monsterLevels = (DiIiS_NA.Core.MPQ.FileFormats.GameBalance)DiIiS_NA.Core.MPQ.MPQStorage.Data.Assets[Core.Types.SNO.SNOGroup.GameBalance][19760].Data; float DamageMin = monsterLevels.MonsterLevel[this.Game.MonsterLevel].Dmg * 0.5f; @@ -683,16 +700,17 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk to Hedric - var Hedric = this.Game.GetWorld(136441).GetActorBySNO(65036, true); + var world = this.Game.GetWorld(WorldSno.trout_oldtristram_cellar_f); + var Hedric = world.GetActorBySNO(65036, true); if (Hedric != null) { Vector3D PositionToSpawn = Hedric.Position; DestroyFollower(65036); - this.Game.GetWorld(136441).GetActorBySNO(65036).Teleport(PositionToSpawn); + world.GetActorBySNO(65036).Teleport(PositionToSpawn); } - this.Game.GetWorld(136441).GetActorBySNO(65036).Hidden = false; - this.Game.GetWorld(136441).GetActorBySNO(65036).SetVisible(true); - foreach (var plr in this.Game.GetWorld(136441).Players.Values) this.Game.GetWorld(136441).GetActorBySNO(65036).Reveal(plr); + world.GetActorBySNO(65036).Hidden = false; + world.GetActorBySNO(65036).SetVisible(true); + foreach (var plr in world.Players.Values) world.GetActorBySNO(65036).Reveal(plr); ListenConversation(198312, new Advance()); }) }); @@ -717,7 +735,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem plr.LoadCrafterData(); } } - setActorOperable(this.Game.GetWorld(71150), 121241, true); + setActorOperable(this.Game.GetWorld(WorldSno.trout_town), 121241, true); }) }); @@ -741,11 +759,12 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find crown holder + var world = this.Game.GetWorld(WorldSno.trout_town); script = new CryptPortals(); - script.Execute(this.Game.GetWorld(71150)); + script.Execute(world); if (this.Game.Players.Count == 0) UnlockTeleport(6); - if (this.Game.GetWorld(71150).GetActorsBySNO(230324).Where(d => d.Visible).FirstOrDefault() != null) - Open(this.Game.GetWorld(71150), 230324); + if (world.GetActorsBySNO(230324).Where(d => d.Visible).FirstOrDefault() != null) + Open(world, 230324); ListenInteract(159446, 1, new Advance()); //199642 - holder }) @@ -759,10 +778,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill Imon advisor - if (this.Game.Players.Count > 0) UnlockTeleport(6); - this.Game.AddOnLoadAction(92126, () => + if (!Game.Players.IsEmpty) UnlockTeleport(6); + this.Game.AddOnLoadWorldAction(WorldSno.trdun_crypt_skeletonkingcrown_02, () => { - this.Game.GetWorld(92126).SpawnMonster(156353, this.Game.GetWorld(92126).GetActorBySNO(156381).Position);// or 156381 + var world = this.Game.GetWorld(WorldSno.trdun_crypt_skeletonkingcrown_02); + world.SpawnMonster(156353, world.GetActorBySNO(156381).Position);// or 156381 }); ListenKill(156353, 1, new Advance()); }) @@ -814,7 +834,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - StartConversation(this.Game.GetWorld(71150), 80681); + StartConversation(this.Game.GetWorld(WorldSno.trout_town), 80681); }) }); @@ -838,9 +858,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //enter Hall of Leoric - this.Game.AddOnLoadAction(60713, () => + this.Game.AddOnLoadWorldAction(WorldSno.trdun_cain_intro, () => { - setActorOperable(this.Game.GetWorld(60713), 156058, true); + setActorOperable(this.Game.GetWorld(WorldSno.trdun_cain_intro), 156058, true); }); ListenTeleport(60714, new Advance()); }) @@ -879,7 +899,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //help Cormac(kill cultists) - var Kormak_Imprisoned = this.Game.GetWorld(105406).GetActorBySNO(104813); + var Kormak_Imprisoned = this.Game.GetWorld(WorldSno.a1trdun_level05_templar).GetActorBySNO(104813); foreach (var act in Kormak_Imprisoned.GetActorsInRange(80)) if (act.ActorSNO.Id == 145745) { @@ -888,7 +908,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem act.SetFacingRotation(ActorSystem.Movement.MovementHelpers.GetFacingAngle(act, Kormak_Imprisoned)); } - this.Game.AddOnLoadAction(105406, () => + this.Game.AddOnLoadWorldAction(WorldSno.a1trdun_level05_templar, () => { try { @@ -902,7 +922,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem } catch { } }); - if (this.Game.Players.Count == 0) UnlockTeleport(3); + if (Game.Players.IsEmpty) UnlockTeleport(3); //if (this.Game.Players.Count > 0) this.Game.GetWorld(105406).GetActorBySNO(104813, true).Hidden = true; ListenKill(145745, 7, new Advance()); }) @@ -916,16 +936,17 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find Kormac's stuff 178657 - this.Game.AddOnLoadAction(105406, () => + this.Game.AddOnLoadWorldAction(WorldSno.a1trdun_level05_templar, () => { if (this.Game.CurrentQuest == 72061 && this.Game.CurrentStep == 40) { + var world = this.Game.GetWorld(WorldSno.a1trdun_level05_templar); foreach (var act in Prisoners) act.Brain.Activate(); if (ProxyObject != null) ProxyObject.Destroy(); - AddFollower(this.Game.GetWorld(105406), 104813); - StartConversation(this.Game.GetWorld(105406), 104782); + AddFollower(world, 104813); + StartConversation(world, 104782); } }); ListenInteract(178657, 1, new Advance()); @@ -940,16 +961,17 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find and kill Jondar - this.Game.AddOnLoadAction(105406, () => + this.Game.AddOnLoadWorldAction(WorldSno.a1trdun_level05_templar, () => { if (this.Game.CurrentQuest == 72061 && this.Game.CurrentStep == 42) { + var world = this.Game.GetWorld(WorldSno.a1trdun_level05_templar); DestroyFollower(104813); - AddFollower(this.Game.GetWorld(105406), 104813); - StartConversation(this.Game.GetWorld(105406), 168278); - this.Game.AddOnLoadAction(32993, () => + AddFollower(world, 104813); + StartConversation(world, 168278); + this.Game.AddOnLoadSceneAction(32993, () => { - StartConversation(this.Game.GetWorld(105406), 168282); + StartConversation(world, 168282); }); } }); @@ -966,15 +988,15 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //join templar(wtf?) - - this.Game.AddOnLoadAction(105406, () => + var world = this.Game.GetWorld(WorldSno.a1trdun_level05_templar); + this.Game.AddOnLoadWorldAction(WorldSno.a1trdun_level05_templar, () => { if (this.Game.CurrentQuest == 72061 && this.Game.CurrentStep == 56) { DestroyFollower(104813); //AddFollower(this.Game.GetWorld(105406), 104813); } - foreach (var Wall in this.Game.GetWorld(105406).GetActorsBySNO(109209)) + foreach (var Wall in world.GetActorsBySNO(109209)) { Wall.PlayAnimation(11, 108568); Wall.Attributes[GameAttribute.Deleted_On_Server] = true; @@ -986,7 +1008,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem }); UnlockTeleport(3); script = new Advance(); - script.Execute(this.Game.GetWorld(105406)); + script.Execute(world); if (!this.Game.Empty) foreach (var plr in this.Game.Players.Values) { @@ -1009,7 +1031,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //enter king's crypt - this.Game.AddOnLoadAction(105406, () => + this.Game.AddOnLoadWorldAction(WorldSno.a1trdun_level05_templar, () => { if (this.Game.CurrentQuest == 72061 && this.Game.CurrentStep == 44) { @@ -1040,9 +1062,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //enter crypt - this.Game.AddOnLoadAction(73261, () => + this.Game.AddOnLoadWorldAction(WorldSno.a1trdun_king_level08, () => { - this.Game.GetWorld(73261).GetActorBySNO(461, true).Hidden = true; + this.Game.GetWorld(WorldSno.a1trdun_king_level08).GetActorBySNO(461, true).Hidden = true; }); UnlockTeleport(4); ListenTeleport(19789, new Advance()); @@ -1058,10 +1080,10 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill skeletons - this.Game.AddOnLoadAction(73261, () => + this.Game.AddOnLoadWorldAction(WorldSno.a1trdun_king_level08, () => { script = new SpawnSkeletons(); - script.Execute(this.Game.GetWorld(73261)); + script.Execute(this.Game.GetWorld(WorldSno.a1trdun_king_level08)); }); @@ -1077,9 +1099,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //take crown on Leoric's head - this.Game.AddOnLoadAction(73261, () => + this.Game.AddOnLoadWorldAction(WorldSno.a1trdun_king_level08, () => { - Open(this.Game.GetWorld(73261), 5765); + Open(this.Game.GetWorld(WorldSno.a1trdun_king_level08), 5765); }); //Open(this.Game.GetWorld(73261), 172645); ListenInteract(5354, 1, new Advance()); @@ -1108,9 +1130,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem { //go to fallen star room this.Game.CurrentEncounter.activated = false; ListenTeleport(117411, new Advance()); - this.Game.AddOnLoadAction(73261, () => + this.Game.AddOnLoadWorldAction(WorldSno.a1trdun_king_level08, () => { - Open(this.Game.GetWorld(73261), 175181); + Open(this.Game.GetWorld(WorldSno.a1trdun_king_level08), 175181); }); }) }); @@ -1177,8 +1199,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - StartConversation(this.Game.GetWorld(71150), 198706); - this.Game.GetWorld(71150).GetActorBySNO(216574).Hidden = true; + var world = this.Game.GetWorld(WorldSno.trout_town); + StartConversation(world, 198706); + world.GetActorBySNO(216574).Hidden = true; }) }); @@ -1190,12 +1213,13 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go to Wild Fields + var world = this.Game.GetWorld(WorldSno.trout_town); ListenTeleport(19952, new Advance()); ListenProximity(60665, new Advance()); //if going through graveyard - var Gate = this.Game.GetWorld(71150).GetActorBySNO(230324); + var Gate = world.GetActorBySNO(230324); Gate.Field2 = 16; Gate.PlayAnimation(5, Gate.AnimationSet.TagMapAnimDefault[DiIiS_NA.GameServer.Core.Types.TagMap.AnimationSetKeys.Opening]); - this.Game.GetWorld(71150).BroadcastIfRevealed(plr => new DiIiS_NA.GameServer.MessageSystem.Message.Definitions.ACD.ACDCollFlagsMessage + world.BroadcastIfRevealed(plr => new DiIiS_NA.GameServer.MessageSystem.Message.Definitions.ACD.ACDCollFlagsMessage { ActorID = Gate.DynamicID(plr), CollFlags = 0 @@ -1224,11 +1248,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find piece of sword - this.Game.AddOnLoadAction(119888, () => + this.Game.AddOnLoadWorldAction(WorldSno.fields_cave_swordofjustice_level01, () => { if (this.Game.CurrentQuest == 117779 && this.Game.CurrentStep == 3) { - StartConversation(this.Game.GetWorld(119888), 130225); + StartConversation(this.Game.GetWorld(WorldSno.fields_cave_swordofjustice_level01), 130225); } }); //if (!this.Game.Empty) StartConversation(this.Game.GetWorld(119888), 130225); @@ -1284,7 +1308,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //complete - StartConversation(this.Game.GetWorld(71150), 198713); + StartConversation(this.Game.GetWorld(WorldSno.trout_town), 198713); }) }); #endregion @@ -1299,9 +1323,10 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - LeahTempId = this.Game.GetWorld(71150).GetActorBySNO(4580, true).GlobalID; - this.Game.GetWorld(71150).GetActorBySNO(4580, true).Hidden = true; - StartConversation(this.Game.GetWorld(71150), 198713); + var world = this.Game.GetWorld(WorldSno.trout_town); + LeahTempId = world.GetActorBySNO(4580, true).GlobalID; + world.GetActorBySNO(4580, true).Hidden = true; + StartConversation(world, 198713); }) }); @@ -1313,7 +1338,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go to Sunken Temple - AddFollower(this.Game.GetWorld(71150), 4580); + AddFollower(this.Game.GetWorld(WorldSno.trout_town), 4580); ListenProximity(80812, new LaunchConversation(111893)); ListenConversation(111893, new Advance()); }) @@ -1327,11 +1352,12 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //follow Scoundrel NPC + var world = this.Game.GetWorld(WorldSno.trout_town); DestroyFollower(4580); - AddFollower(this.Game.GetWorld(71150), 4580); - AddFollower(this.Game.GetWorld(71150), 80812); + AddFollower(world, 4580); + AddFollower(world, 80812); //Open(this.Game.GetWorld(71150), 170913); - StartConversation(this.Game.GetWorld(71150), 167656); + StartConversation(world, 167656); ListenConversation(167656, new Advance()); }) }); @@ -1344,11 +1370,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with bandits + var world = this.Game.GetWorld(WorldSno.trout_town); DestroyFollower(4580); - AddFollower(this.Game.GetWorld(71150), 4580); - try { (this.Game.GetWorld(71150).FindAt(170913, new Vector3D { X = 1523.13f, Y = 857.71f, Z = 39.26f }, 5.0f) as Door).Open(); } catch { } - try { (this.Game.GetWorld(71150).FindAt(170913, new Vector3D { X = 1523.13f, Y = 857.71f, Z = 39.26f }, 5.0f) as Door).Open(); } catch { } - StartConversation(this.Game.GetWorld(71150), 167677); + AddFollower(world, 4580); + try { (world.FindAt(170913, new Vector3D { X = 1523.13f, Y = 857.71f, Z = 39.26f }, 5.0f) as Door).Open(); } catch { } + StartConversation(world, 167677); ListenConversation(167677, new Advance()); }) }); @@ -1361,9 +1387,10 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill the bandits + var world = this.Game.GetWorld(WorldSno.trout_town); DestroyFollower(4580); - AddFollower(this.Game.GetWorld(71150), 4580); - this.Game.GetWorld(71150).SpawnMonster(174013, new Vector3D { X = 1471.473f, Y = 747.4875f, Z = 40.1f }); + AddFollower(world, 4580); + world.SpawnMonster(174013, new Vector3D { X = 1471.473f, Y = 747.4875f, Z = 40.1f }); ListenKill(174013, 1, new Advance()); }) }); @@ -1377,7 +1404,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //talk with Scoundrel DestroyFollower(4580); - AddFollower(this.Game.GetWorld(71150), 4580); + AddFollower(this.Game.GetWorld(WorldSno.trout_town), 4580); ListenProximity(80812, new LaunchConversation(111899)); ListenConversation(111899, new Advance()); }) @@ -1391,11 +1418,12 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //lead Scoundrel to waypoint + var world = this.Game.GetWorld(WorldSno.trout_town); DestroyFollower(4580); - AddFollower(this.Game.GetWorld(71150), 4580); - try { (this.Game.GetWorld(71150).FindAt(170913, new Vector3D { X = 1444.1f, Y = 786.64f, Z = 39.7f }, 4.0f) as Door).Open(); } catch { } - setActorOperable(this.Game.GetWorld(71150), 63114, false); - setActorOperable(this.Game.GetWorld(71150), 61459, false); + AddFollower(world, 4580); + try { (world.FindAt(170913, new Vector3D { X = 1444.1f, Y = 786.64f, Z = 39.7f }, 4.0f) as Door).Open(); } catch { } + setActorOperable(world, 63114, false); + setActorOperable(world, 61459, false); ListenProximity(6442, new Advance()); if (!this.Game.Empty) foreach (var plr in this.Game.Players.Values) @@ -1422,9 +1450,10 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go to Sunken Temple - StartConversation(this.Game.GetWorld(71150), 223934); + var world = this.Game.GetWorld(WorldSno.trout_town); + StartConversation(world, 223934); DestroyFollower(4580); - AddFollower(this.Game.GetWorld(71150), 4580); + AddFollower(world, 4580); DestroyFollower(80812); ListenProximity(108882, new Advance()); }) @@ -1439,7 +1468,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //talk with Alaric DestroyFollower(4580); - AddFollower(this.Game.GetWorld(71150), 4580); + AddFollower(this.Game.GetWorld(WorldSno.trout_town), 4580); UnlockTeleport(8); ListenConversation(81576, new Advance()); }) @@ -1453,9 +1482,10 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go to Rotten forest + var world = this.Game.GetWorld(WorldSno.trout_town); DestroyFollower(4580); - AddFollower(this.Game.GetWorld(71150), 4580); - Open(this.Game.GetWorld(71150), 100849); //bridge + AddFollower(world, 4580); + Open(world, 100849); //bridge ListenProximity(100849, new Advance()); }) }); @@ -1469,7 +1499,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //find 2 Orbs DestroyFollower(4580); - AddFollower(this.Game.GetWorld(71150), 4580); + AddFollower(this.Game.GetWorld(WorldSno.trout_town), 4580); ListenInteract(215434, 1, new CompleteObjective(0)); ListenInteract(215512, 1, new CompleteObjective(1)); }) @@ -1483,11 +1513,12 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 2, Counter = 0 } }, OnAdvance = new Action(() => { //use 2 stones + var world = this.Game.GetWorld(WorldSno.trout_town); DestroyFollower(4580); - AddFollower(this.Game.GetWorld(71150), 4580); + AddFollower(world, 4580); UnlockTeleport(9); - setActorOperable(this.Game.GetWorld(71150), 63114, true); - setActorOperable(this.Game.GetWorld(71150), 61459, true); + setActorOperable(world, 63114, true); + setActorOperable(world, 61459, true); ListenInteract(63114, 1, new CompleteObjective(0)); ListenInteract(61459, 1, new CompleteObjective(0)); }) @@ -1501,10 +1532,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //enter the temple + var world = this.Game.GetWorld(WorldSno.trout_town); DestroyFollower(4580); - AddFollower(this.Game.GetWorld(71150), 4580); - Open(this.Game.GetWorld(71150), 144149); //bridge - Open(this.Game.GetWorld(71150), 100967); + AddFollower(world, 4580); + Open(world, 144149); //bridge + Open(world, 100967); ListenTeleport(60398, new Advance()); }) }); @@ -1518,9 +1550,8 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //explore the temple DestroyFollower(4580); - AddFollower(this.Game.GetWorld(71150), 4580); + AddFollower(this.Game.GetWorld(WorldSno.trout_town), 4580); //60395 - trdun_cave_nephalem_03 - var DTWorld = this.Game.GetWorld(60395); ListenProximity(98799, new DrownedTemple1()); ListenKill(5395, 14, new LaunchConversation(108256)); @@ -1538,10 +1569,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //kill prophet Ezek and skeletons DestroyFollower(4580); - AddFollower(this.Game.GetWorld(71150), 4580); + AddFollower(this.Game.GetWorld(WorldSno.trout_town), 4580); - foreach (var act in this.Game.GetWorld(60395).GetActorsBySNO(139757)) act.Destroy(); - this.Game.GetWorld(60395).SpawnMonster(139757, new Vector3D(292f, 275f, -76f)); + var world = this.Game.GetWorld(WorldSno.trdun_cave_nephalem_03); + foreach (var act in world.GetActorsBySNO(139757)) act.Destroy(); + world.SpawnMonster(139757, new Vector3D(292f, 275f, -76f)); ListenKill(139757, 1, new Advance()); }) @@ -1556,8 +1588,8 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //talk with Alaric in temple DestroyFollower(4580); - AddFollower(this.Game.GetWorld(71150), 4580); - StartConversation(this.Game.GetWorld(60395), 133372); + AddFollower(this.Game.GetWorld(WorldSno.trout_town), 4580); + StartConversation(this.Game.GetWorld(WorldSno.trdun_cave_nephalem_03), 133372); ListenConversation(133372, new Advance()); }) }); @@ -1571,13 +1603,14 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //defend the sword piece DestroyFollower(4580); - AddFollower(this.Game.GetWorld(71150), 4580); - this.Game.AddOnLoadAction(60395, () => + AddFollower(this.Game.GetWorld(WorldSno.trout_town), 4580); + this.Game.AddOnLoadWorldAction(WorldSno.trdun_cave_nephalem_03, () => { - Open(this.Game.GetWorld(60395), 177439); + var world = this.Game.GetWorld(WorldSno.trdun_cave_nephalem_03); + Open(world, 177439); if (this.Game.CurrentQuest == 72738 && this.Game.CurrentStep == 103) { - StartConversation(this.Game.GetWorld(60395), 108256); + StartConversation(world, 108256); } }); ListenProximity(206461, new Advance()); @@ -1592,12 +1625,13 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //use the piece of sword + var world = this.Game.GetWorld(WorldSno.trout_town); DestroyFollower(4580); - AddFollower(this.Game.GetWorld(71150), 4580); + AddFollower(world, 4580); ListenInteract(206461, 1, new LaunchConversation(198925)); ListenConversation(198925, new LaunchConversation(133487)); ListenConversation(133487, new Advance()); - this.Game.GetWorld(71150).GetActorByGlobalId(LeahTempId).Hidden = false; + world.GetActorByGlobalId(LeahTempId).Hidden = false; }) }); @@ -1609,11 +1643,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //return to Tristram - this.Game.AddOnLoadAction(60395, () => + this.Game.AddOnLoadWorldAction(WorldSno.trdun_cave_nephalem_03, () => { if (this.Game.CurrentQuest == 72738 && this.Game.CurrentStep == 56) { - StartConversation(this.Game.GetWorld(60395), 202967); + StartConversation(this.Game.GetWorld(WorldSno.trdun_cave_nephalem_03), 202967); } }); DestroyFollower(4580); @@ -1643,7 +1677,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - StartConversation(this.Game.GetWorld(71150), 120357); + StartConversation(this.Game.GetWorld(WorldSno.trout_town), 120357); }) }); @@ -1667,7 +1701,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go to Vortem square - var AttackedTown = this.Game.GetWorld(72882); + var AttackedTown = this.Game.GetWorld(WorldSno.trout_townattack); var Maghda = AttackedTown.GetActorBySNO(129345); AttackedTown.Leave(Maghda); @@ -1684,7 +1718,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //kill all cultists int Count = 0; - foreach (var cultist in this.Game.GetWorld(72882).GetActorsBySNO(90008)) + foreach (var cultist in this.Game.GetWorld(WorldSno.trout_townattack).GetActorsBySNO(90008)) if (cultist.CurrentScene.SceneSNO.Id == 76000) { cultist.Attributes[GameAttribute.Quest_Monster] = true; @@ -1707,11 +1741,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - this.Game.AddOnLoadAction(72882, () => + this.Game.AddOnLoadWorldAction(WorldSno.trout_townattack, () => { if (this.Game.CurrentQuest == 73236 && this.Game.CurrentStep == 11) { - this.Game.GetWorld(72882).SpawnMonster(178619, new Vector3D { X = 581.237f, Y = 584.346f, Z = 70.1f }); + this.Game.GetWorld(WorldSno.trout_townattack).SpawnMonster(178619, new Vector3D { X = 581.237f, Y = 584.346f, Z = 70.1f }); } ListenKill(178619, 1, new Advance()); }); @@ -1726,13 +1760,14 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill 3 berserkers - this.Game.AddOnLoadAction(72882, () => + this.Game.AddOnLoadWorldAction(WorldSno.trout_townattack, () => { if (this.Game.CurrentQuest == 73236 && this.Game.CurrentStep == 16) { - this.Game.GetWorld(72882).SpawnMonster(178300, new Vector3D { X = 577.724f, Y = 562.869f, Z = 70.1f }); - this.Game.GetWorld(72882).SpawnMonster(178300, new Vector3D { X = 565.886f, Y = 577.66f, Z = 70.1f }); - this.Game.GetWorld(72882).SpawnMonster(178300, new Vector3D { X = 581.308f, Y = 581.079f, Z = 70.1f }); + var world = this.Game.GetWorld(WorldSno.trout_townattack); + world.SpawnMonster(178300, new Vector3D { X = 577.724f, Y = 562.869f, Z = 70.1f }); + world.SpawnMonster(178300, new Vector3D { X = 565.886f, Y = 577.66f, Z = 70.1f }); + world.SpawnMonster(178300, new Vector3D { X = 581.308f, Y = 581.079f, Z = 70.1f }); } }); ListenKill(178300, 3, new Advance()); @@ -1747,11 +1782,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with priest - this.Game.AddOnLoadAction(72882, () => + this.Game.AddOnLoadWorldAction(WorldSno.trout_townattack, () => { if (this.Game.CurrentQuest == 73236 && this.Game.CurrentStep == 63) { - StartConversation(this.Game.GetWorld(72882), 120372); + StartConversation(this.Game.GetWorld(WorldSno.trout_townattack), 120372); } }); ListenConversation(120372, new Advance()); @@ -1797,7 +1832,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //go to Cain's house - if (!this.Game.Empty) StartConversation(this.Game.GetWorld(119888), 130225); + if (!this.Game.Empty) StartConversation(this.Game.GetWorld(WorldSno.fields_cave_swordofjustice_level01), 130225); ListenTeleport(130163, new StartSceneinHome()); //ListenTeleport(130163, new LaunchConversation(165125)); ListenConversation(165125, new LaunchConversation(190199)); @@ -1852,13 +1887,15 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - this.Game.AddOnLoadAction(167721, () => + this.Game.AddOnLoadWorldAction(WorldSno.trout_townattack_chapelcellar_a, () => { - foreach (var Table in this.Game.GetWorld(167721).GetActorsBySNO(153260)) { Table.SetUsable(false); Table.SetIdleAnimation(Table.AnimationSet.TagMapAnimDefault[AnimationSetKeys.Open]); } - foreach (var Maghda in this.Game.GetWorld(167721).GetActorsBySNO(129345)) Maghda.Destroy(); + var world = this.Game.GetWorld(WorldSno.trout_townattack_chapelcellar_a); + foreach (var Table in world.GetActorsBySNO(153260)) { Table.SetUsable(false); Table.SetIdleAnimation(Table.AnimationSet.TagMapAnimDefault[AnimationSetKeys.Open]); } + foreach (var Maghda in world.GetActorsBySNO(129345)) Maghda.Destroy(); }); - var Leah = this.Game.GetWorld(71150).GetActorBySNO(4580); - var LeahAfterEvent = this.Game.GetWorld(71150).SpawnMonster(138271, Leah.Position); + var tristramWorld = this.Game.GetWorld(WorldSno.trout_town); + var Leah = tristramWorld.GetActorBySNO(4580); + var LeahAfterEvent = tristramWorld.SpawnMonster(138271, Leah.Position); //ListenProximity(4580, new LaunchConversation(93337)); //cork (LeahAfterEvent as ActorSystem.InteractiveNPC).Conversations.Clear(); @@ -1878,7 +1915,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go to Aranea Cave - var LeahAfterEvent = this.Game.GetWorld(71150).GetActorBySNO(138271); + var LeahAfterEvent = this.Game.GetWorld(WorldSno.trout_town).GetActorBySNO(138271); (LeahAfterEvent as ActorSystem.InteractiveNPC).Attributes[GameAttribute.Conversation_Icon, 0] = 1; (LeahAfterEvent as ActorSystem.InteractiveNPC).Attributes.BroadcastChangedIfRevealed(); ListenTeleport(78572, new Advance()); @@ -1893,7 +1930,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find Aranea Queen lair - this.Game.GetWorld(71150).GetActorBySNO(138271, true).Hidden = true; + this.Game.GetWorld(WorldSno.trout_town).GetActorBySNO(138271, true).Hidden = true; //this.Game.GetWorld(71150).GetActorBySNO(138271,true).SetVisible(false); ListenTeleport(62726, new Advance()); }) @@ -1907,8 +1944,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with woman in web - setActorOperable(this.Game.GetWorld(182976), 213490, false); - setActorOperable(this.Game.GetWorld(182976), 104545, false); + var world = this.Game.GetWorld(WorldSno.a1dun_spidercave_02); + setActorOperable(world, 213490, false); + setActorOperable(world, 104545, false); ListenProximity(104545, new Advance()); }) }); @@ -1921,7 +1959,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill Aranea Queen - this.Game.GetWorld(182976).SpawnMonster(51341, new Vector3D { X = 149.439f, Y = 121.452f, Z = 13.794f }); + this.Game.GetWorld(WorldSno.a1dun_spidercave_02).SpawnMonster(51341, new Vector3D { X = 149.439f, Y = 121.452f, Z = 13.794f }); ListenKill(51341, 1, new Advance()); }) }); @@ -1934,7 +1972,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //grab Aranea acid - setActorOperable(this.Game.GetWorld(182976), 213490, true); + setActorOperable(this.Game.GetWorld(WorldSno.a1dun_spidercave_02), 213490, true); ListenInteract(213490, 1, new Advance()); }) }); @@ -1947,7 +1985,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //use acid on Karina - setActorOperable(this.Game.GetWorld(182976), 104545, true); + setActorOperable(this.Game.GetWorld(WorldSno.a1dun_spidercave_02), 104545, true); ListenInteract(104545, 1, new Advance()); }) }); @@ -1972,7 +2010,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Karina - setActorOperable(this.Game.GetWorld(71150), 167311, false); + setActorOperable(this.Game.GetWorld(WorldSno.trout_town), 167311, false); ListenProximity(194263, new LaunchConversation(191511)); //cork ListenConversation(191511, new Advance()); }) @@ -1999,7 +2037,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go to Hazra wall - setActorOperable(this.Game.GetWorld(71150), 167311, true); + setActorOperable(this.Game.GetWorld(WorldSno.trout_town), 167311, true); UnlockTeleport(11); ListenInteract(167311, 1, new Advance()); }) @@ -2050,10 +2088,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill cultists - if (!this.Game.Empty) StartConversation(this.Game.GetWorld(75049), 134968); + if (!this.Game.Empty) StartConversation(this.Game.GetWorld(WorldSno.a1dun_leor_manor), 134968); ListenConversation(134968, new LaunchConversation(134565)); - this.Game.GetWorld(71150).GetActorBySNO(4580).Hidden = false; - this.Game.GetWorld(71150).GetActorBySNO(4580).SetVisible(true); + var world = this.Game.GetWorld(WorldSno.trout_town); + world.GetActorBySNO(4580).Hidden = false; + world.GetActorBySNO(4580).SetVisible(true); ListenKill(6024, 7, new Advance()); }) }); @@ -2142,9 +2181,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Asilla Queen (npc 103381) - this.Game.AddOnLoadAction(94676, () => + this.Game.AddOnLoadWorldAction(WorldSno.trdun_jail_level01, () => { - setActorOperable(this.Game.GetWorld(94676), 95571, false); + setActorOperable(this.Game.GetWorld(WorldSno.trdun_jail_level01), 95571, false); }); ListenConversation(103388, new Advance()); }) @@ -2159,11 +2198,12 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //free 6 souls //spawn souls on 104104, 104106, 104108 - this.Game.AddOnLoadAction(94676, () => + this.Game.AddOnLoadWorldAction(WorldSno.trdun_jail_level01, () => { - setActorOperable(this.Game.GetWorld(94676), 95571, true); + var world = this.Game.GetWorld(WorldSno.trdun_jail_level01); + setActorOperable(world, 95571, true); script = new SpawnSouls(); - script.Execute(this.Game.GetWorld(94676)); + script.Execute(world); }); ListenInteract(102927, 6, new Advance()); }) @@ -2177,9 +2217,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill Overseer - this.Game.AddOnLoadAction(94676, () => + this.Game.AddOnLoadWorldAction(WorldSno.trdun_jail_level01, () => { - this.Game.GetWorld(94676).SpawnMonster(98879, new Vector3D { X = 360.236f, Y = 840.47f, Z = 0.1f }); + this.Game.GetWorld(WorldSno.trdun_jail_level01).SpawnMonster(98879, new Vector3D { X = 360.236f, Y = 840.47f, Z = 0.1f }); }); ListenKill(98879, 1, new Advance()); }) @@ -2194,9 +2234,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //find Butcher's Room if (this.Game.Empty) UnlockTeleport(15); - this.Game.AddOnLoadAction(94676, () => + this.Game.AddOnLoadWorldAction(WorldSno.trdun_jail_level01, () => { - Open(this.Game.GetWorld(94676), 100862); + Open(this.Game.GetWorld(WorldSno.trdun_jail_level01), 100862); }); ListenTeleport(90881, new Advance()); }) @@ -2210,11 +2250,12 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill Butcher - this.Game.AddOnLoadAction(78839, () => + this.Game.AddOnLoadWorldAction(WorldSno.trdun_butcherslair_02, () => { - setActorOperable(this.Game.GetWorld(78839), 105361, false); - if (this.Game.GetWorld(78839).GetActorBySNO(3526) == null) - this.Game.GetWorld(78839).SpawnMonster(3526, new Vector3D { X = 93.022f, Y = 89.86f, Z = 0.1f }); + var world = this.Game.GetWorld(WorldSno.trdun_butcherslair_02); + setActorOperable(world, 105361, false); + if (world.GetActorBySNO(3526) == null) + world.SpawnMonster(3526, new Vector3D { X = 93.022f, Y = 89.86f, Z = 0.1f }); }); UnlockTeleport(15); @@ -2231,9 +2272,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //find Tyrael this.Game.CurrentEncounter.activated = false; - this.Game.AddOnLoadAction(78839, () => + this.Game.AddOnLoadWorldAction(WorldSno.trdun_butcherslair_02, () => { - setActorOperable(this.Game.GetWorld(78839), 105361, true); + setActorOperable(this.Game.GetWorld(WorldSno.trdun_butcherslair_02), 105361, true); }); ListenTeleport(148551, new Advance()); }) diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActII.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActII.cs index b41807a..45e15a2 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActII.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActII.cs @@ -38,6 +38,7 @@ using DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.ScriptObjects; using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Hireling; //Blizzless Project 2022 using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Base; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.QuestSystem { @@ -63,16 +64,17 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 82, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { + var world = this.Game.GetWorld(WorldSno.caout_town); //ListenProximity(151989, new Advance()); ListenConversation(57401, new Advance()); //Base world State - this.Game.GetWorld(70885).GetActorBySNO(175810).SetUsable(false); //Khamsim_Gate - this.Game.GetWorld(70885).GetActorBySNO(96132).Hidden = true; //Bezir - this.Game.GetWorld(70885).ShowOnlyNumNPC(2928, 1); //Kadin - this.Game.GetWorld(70885).ShowOnlyNumNPC(51291, 1); //Aleser - this.Game.GetWorld(70885).ShowOnlyNumNPC(51292, 1); //Caliem - this.Game.GetWorld(70885).ShowOnlyNumNPC(80980, -1); //Davyd - foreach (var Door in this.Game.GetWorld(70885).GetActorsBySNO(175810)) + world.GetActorBySNO(175810).SetUsable(false); //Khamsim_Gate + world.GetActorBySNO(96132).Hidden = true; //Bezir + world.ShowOnlyNumNPC(2928, 1); //Kadin + world.ShowOnlyNumNPC(51291, 1); //Aleser + world.ShowOnlyNumNPC(51292, 1); //Caliem + world.ShowOnlyNumNPC(80980, -1); //Davyd + foreach (var Door in world.GetActorsBySNO(175810)) Door.SetUsable(false);//Khamsim_Gate }) @@ -96,8 +98,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 50, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Asheera (201085) - this.Game.GetWorld(70885).GetActorBySNO(162378).SetUsable(false); - this.Game.GetWorld(70885).ShowOnlyNumNPC(3205, 2); + var world = this.Game.GetWorld(WorldSno.caout_town); + world.GetActorBySNO(162378).SetUsable(false); + world.ShowOnlyNumNPC(3205, 2); UnlockTeleport(0); //ListenProximity(3205, new LaunchConversation(201085)); ListenConversation(201085, new Advance()); @@ -113,7 +116,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //go through canyon try { - Door TDoor = (this.Game.GetWorld(70885).FindAt(169502, new Vector3D { X = 2905.62f, Y = 1568.82f, Z = 250.75f }, 6.0f) as Door); + Door TDoor = (this.Game.GetWorld(WorldSno.caout_town).FindAt(169502, new Vector3D { X = 2905.62f, Y = 1568.82f, Z = 250.75f }, 6.0f) as Door); //ListenProximity(TDoor, ) TDoor.Open(); } catch { } @@ -129,10 +132,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 52, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill cultists - AddFollower(this.Game.GetWorld(70885), 85843); + var world = this.Game.GetWorld(WorldSno.caout_town); + AddFollower(world, 85843); //ListenProximity(85843, new SpawnCultists()); script = new SpawnCultists(); - script.Execute(this.Game.GetWorld(70885)); + script.Execute(world); ListenKill(6027, 7, new Advance()); }) }); @@ -146,7 +150,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //talk with enchantress DestroyFollower(85843); //ListenProximity(85843, new LaunchConversation(85832)); - var EnchNPC = (this.Game.GetWorld(70885).GetActorBySNO(85843) as InteractiveNPC); + var EnchNPC = (this.Game.GetWorld(WorldSno.caout_town).GetActorBySNO(85843) as InteractiveNPC); EnchNPC.Conversations.Clear(); EnchNPC.Conversations.Add(new ActorSystem.Interactions.ConversationInteraction(85832)); ListenConversation(85832, new Advance()); @@ -160,9 +164,10 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 106, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill Lakuni's - this.Game.GetWorld(70885).GetActorBySNO(85843).Hidden = true; - AddFollower(this.Game.GetWorld(70885), 85843); - Open(this.Game.GetWorld(70885), 180225); + var world = this.Game.GetWorld(WorldSno.caout_town); + world.GetActorBySNO(85843).Hidden = true; + AddFollower(world, 85843); + Open(world, 180225); ListenKill(4541, 5, new Advance()); }) }); @@ -174,10 +179,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 91, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Steel Wolf's leader + var world = this.Game.GetWorld(WorldSno.caout_town); DestroyFollower(85843); - AddFollower(this.Game.GetWorld(70885), 85843); + AddFollower(world, 85843); //ListenProximity(164195, new LaunchConversation(164197)); - var Leader = (this.Game.GetWorld(70885).GetActorBySNO(164195) as InteractiveNPC); + var Leader = (world.GetActorBySNO(164195) as InteractiveNPC); Leader.Conversations.Clear(); Leader.Conversations.Add(new ActorSystem.Interactions.ConversationInteraction(164197)); ListenConversation(164197, new Advance()); @@ -191,9 +197,10 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 58, Objectives = new List { new Objective { Limit = 1, Counter = 0 }, new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //break rituals (2 counters) + var world = this.Game.GetWorld(WorldSno.caout_town); DestroyFollower(85843); - AddFollower(this.Game.GetWorld(70885), 85843); - var Leader = (this.Game.GetWorld(70885).GetActorBySNO(164195) as InteractiveNPC); + AddFollower(world, 85843); + var Leader = (world.GetActorBySNO(164195) as InteractiveNPC); Leader.Conversations.Clear(); ListenProximity(171329, new CompleteObjective(0)); ListenProximity(3594, new CompleteObjective(1)); @@ -208,7 +215,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go to Canyon Bridge DestroyFollower(85843); - AddFollower(this.Game.GetWorld(70885), 85843); + AddFollower(this.Game.GetWorld(WorldSno.caout_town), 85843); ListenProximity(3665, new Advance()); }) }); @@ -221,7 +228,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with enchantress DestroyFollower(85843); - AddFollower(this.Game.GetWorld(70885), 85843); + AddFollower(this.Game.GetWorld(WorldSno.caout_town), 85843); ListenProximity(85843, new LaunchConversation(86196)); ListenConversation(86196, new Advance()); }) @@ -235,7 +242,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //complete DestroyFollower(85843); - Open(this.Game.GetWorld(70885), 185949); + Open(this.Game.GetWorld(WorldSno.caout_town), 185949); if (!this.Game.Empty) foreach (var plr in this.Game.Players.Values) { @@ -286,12 +293,13 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 46, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find Khasim gate + var world = this.Game.GetWorld(WorldSno.caout_town); ListenProximity(145599, new Advance()); - this.Game.GetWorld(70885).GetActorBySNO(96132).Hidden = true; //Bezir - this.Game.GetWorld(70885).ShowOnlyNumNPC(2928, 0); //Kadin - this.Game.GetWorld(70885).ShowOnlyNumNPC(51291, 0); //Aleser - this.Game.GetWorld(70885).ShowOnlyNumNPC(51292, 0); //Caliem - this.Game.GetWorld(70885).ShowOnlyNumNPC(80980, -1); //Davyd + world.GetActorBySNO(96132).Hidden = true; //Bezir + world.ShowOnlyNumNPC(2928, 0); //Kadin + world.ShowOnlyNumNPC(51291, 0); //Aleser + world.ShowOnlyNumNPC(51292, 0); //Caliem + world.ShowOnlyNumNPC(80980, -1); //Davyd }) }); @@ -328,13 +336,14 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 4, Objectives = new List { new Objective { Limit = 1, Counter = 0 }, new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill demons and open cell - this.Game.AddOnLoadAction(60432, () => + this.Game.AddOnLoadWorldAction(WorldSno.caout_khamsin_mine, () => { if ((Game.CurrentQuest == 93396 & Game.CurrentStep == 30) || (Game.CurrentQuest == 93396 & Game.CurrentStep == 74)) { - DisableEveryone(this.Game.GetWorld(60432), true); + var world = this.Game.GetWorld(WorldSno.caout_khamsin_mine); + DisableEveryone(world, true); - StartConversation(this.Game.GetWorld(60432), 195060); + StartConversation(world, 195060); ListenConversation(195060, new LaunchConversation(195062)); ListenConversation(195062, new KhasimHQ()); @@ -357,7 +366,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill stealthed demons script = new SpawnSnakemans(); - script.Execute(this.Game.GetWorld(70885)); + script.Execute(this.Game.GetWorld(WorldSno.caout_town)); ListenKill(60816, 3, new Advance()); }) }); @@ -369,7 +378,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 10, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with captain David - this.Game.GetWorld(70885).ShowOnlyNumNPC(80980, 1); + this.Game.GetWorld(WorldSno.caout_town).ShowOnlyNumNPC(80980, 1); //ListenProximity(80980, new LaunchConversation(60608)); ListenConversation(81351, new Advance()); }) @@ -382,7 +391,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = -1, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //complete - Open(this.Game.GetWorld(70885), 175810); + Open(this.Game.GetWorld(WorldSno.caout_town), 175810); }) }); @@ -419,7 +428,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 26, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find Maghda's lair and optionally, free 8 cells - var encW = this.Game.GetWorld(70885); + var encW = this.Game.GetWorld(WorldSno.caout_town); encW.SpawnMonster(3628, new Vector3D(528.7084f, 1469.1945f, 197.2559f)); encW.SpawnMonster(3628, new Vector3D(475.812f, 1554.7146f, 197.25589f)); encW.SpawnMonster(3628, new Vector3D(463.88342f, 1542.4092f, 197.25587f)); @@ -450,9 +459,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //return to camp this.Game.CurrentEncounter.activated = false; - this.Game.AddOnLoadAction(195200, () => + this.Game.AddOnLoadWorldAction(WorldSno.caout_cellar_alcarnus_main, () => { - Open(this.Game.GetWorld(195200), 214196); + Open(this.Game.GetWorld(WorldSno.caout_cellar_alcarnus_main), 214196); }); ListenProximity(191492, new Advance()); }) @@ -491,7 +500,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Asheera //ListenProximity(3205, new LaunchConversation(201285)); - this.Game.GetWorld(70885).ShowOnlyNumNPC(3205, 0); + this.Game.GetWorld(WorldSno.caout_town).ShowOnlyNumNPC(3205, 0); ListenConversation(201285, new Advance()); }) }); @@ -516,20 +525,21 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 21, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Emperor - this.Game.AddOnLoadAction(81715, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2_belial_room_intro, () => { //ID: 59447 Name: BelialBoyEmperor + var world = this.Game.GetWorld(WorldSno.a2_belial_room_intro); foreach (var plr in this.Game.Players.Values) { plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraCriptedSequenceStartMessage() { Activate = true }); - plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraFocusMessage() { ActorID = (int)this.Game.GetWorld(81715).GetActorBySNO(59447).DynamicID(plr), Duration = 1f, Snap = false }); + plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraFocusMessage() { ActorID = (int)world.GetActorBySNO(59447).DynamicID(plr), Duration = 1f, Snap = false }); } - foreach (var leah in this.Game.GetWorld(81715).GetActorsBySNO(4580)) + foreach (var leah in world.GetActorsBySNO(4580)) if (leah is TownLeah) (leah as TownLeah).Brain.DeActivate(); - setActorOperable(this.Game.GetWorld(81715), 190236, false); - DisableEveryone(this.Game.GetWorld(81715), true); - StartConversation(this.Game.GetWorld(81715), 160894); + setActorOperable(world, 190236, false); + DisableEveryone(world, true); + StartConversation(world, 160894); }); //ListenTeleport(81178, new LaunchConversation(160894)); ListenConversation(160894, new LaunchConversation(160896)); @@ -546,19 +556,20 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill demons int snakes = 0; - this.Game.AddOnLoadAction(81715, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2_belial_room_intro, () => { if (this.Game.CurrentQuest == 57331 && this.Game.CurrentStep == 21) { - DisableEveryone(this.Game.GetWorld(81715), false); - AddFollower(this.Game.GetWorld(81715), 4580); - foreach (var leah in this.Game.GetWorld(81715).GetActorsBySNO(4580)) + var world = this.Game.GetWorld(WorldSno.a2_belial_room_intro); + DisableEveryone(world, false); + AddFollower(world, 4580); + foreach (var leah in world.GetActorsBySNO(4580)) if (leah is TownLeah) (leah as TownLeah).Brain.Activate(); script = new SpawnSnakemanGuards(); - script.Execute(this.Game.GetWorld(81715)); + script.Execute(world); - foreach (var snake in this.Game.GetWorld(81715).GetActorsBySNO(60816)) + foreach (var snake in world.GetActorsBySNO(60816)) snakes++; } }); @@ -574,13 +585,14 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 31, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //escape the emperor's palace - this.Game.AddOnLoadAction(81715, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2_belial_room_intro, () => { if (this.Game.CurrentQuest == 57331 && this.Game.CurrentStep == 2) { + var world = this.Game.GetWorld(WorldSno.a2_belial_room_intro); DestroyFollower(4580); - AddFollower(this.Game.GetWorld(81715), 4580); - Open(this.Game.GetWorld(81715), 190236); + AddFollower(world, 4580); + Open(world, 190236); } }); ListenTeleport(102964, new Advance()); @@ -594,17 +606,19 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 34, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //destroy 4 demon summoners - this.Game.AddOnLoadAction(86594, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_cald, () => { if (this.Game.CurrentQuest == 57331 && this.Game.CurrentStep == 31) { - this.Game.GetWorld(86594).ShowOnlyNumNPC(3205, -1); //Leave all Asheara - this.Game.GetWorld(86594).ShowOnlyNumNPC(4580, -1); //Leave all Leah - this.Game.GetWorld(86594).ShowOnlyNumNPC(4580, -1); //Leave all Adria + var world = this.Game.GetWorld(WorldSno.a2dun_cald); + world.ShowOnlyNumNPC(3205, -1); //Leave all Asheara + world.ShowOnlyNumNPC(4580, -1); //Leave all Leah + // FIXME: check NPC snoID, maybe it should be 3095 + world.ShowOnlyNumNPC(4580, -1); //Leave all Adria DestroyFollower(4580); - AddFollower(this.Game.GetWorld(81715), 4580); + AddFollower(this.Game.GetWorld(WorldSno.a2_belial_room_intro), 4580); script = new SpawnSnakemanDefenders(); - script.Execute(this.Game.GetWorld(86594)); + script.Execute(world); } }); @@ -619,14 +633,14 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 7, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //hide into Caldeum drains - this.Game.AddOnLoadAction(86594, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_cald, () => { if (this.Game.CurrentQuest == 57331 && this.Game.CurrentStep == 34) { DestroyFollower(4580); - AddFollower(this.Game.GetWorld(81715), 4580); + AddFollower(this.Game.GetWorld(WorldSno.a2_belial_room_intro), 4580); - foreach (var act in this.Game.GetWorld(86594).GetActorsBySNO(159846)) + foreach (var act in this.Game.GetWorld(WorldSno.a2dun_cald).GetActorsBySNO(159846)) act.Destroy();//TEMP_SnakePortal_Center } }); @@ -641,13 +655,14 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = -1, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //complete - this.Game.AddOnLoadAction(86594, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_cald, () => { if (this.Game.CurrentQuest == 57331 && this.Game.CurrentStep == 7) { + var world = this.Game.GetWorld(WorldSno.a2c1dun_swr_caldeum_01); DestroyFollower(4580); - this.Game.GetWorld(50588).ShowOnlyNumNPC(4580, -1); //Leave all Leah - this.Game.GetWorld(50588).ShowOnlyNumNPC(87496, -1); //Leave all LeahSewer + world.ShowOnlyNumNPC(4580, -1); //Leave all Leah + world.ShowOnlyNumNPC(87496, -1); //Leave all LeahSewer } }); this.Game.CurrentEncounter.activated = false; @@ -687,15 +702,16 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 15, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill guardians - this.Game.AddOnLoadAction(58493, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_swr_adria_level01, () => { if (this.Game.CurrentQuest == 78264 && this.Game.CurrentStep == 2) { - StartConversation(this.Game.GetWorld(58493), 81197); + var world = this.Game.GetWorld(WorldSno.a2dun_swr_adria_level01); + StartConversation(world, 81197); foreach (var plr in this.Game.Players.Values) plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraCriptedSequenceStartMessage() { Activate = true }); foreach (var plr in this.Game.Players.Values) - plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraFocusMessage() { ActorID = (int)this.Game.GetWorld(58493).GetActorBySNO(3095).DynamicID(plr), Duration = 1f, Snap = false }); + plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraFocusMessage() { ActorID = (int)world.GetActorBySNO(3095).DynamicID(plr), Duration = 1f, Snap = false }); ListenConversation(81197, new EndCutScene()); } }); @@ -711,9 +727,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 21, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Adria in pit - this.Game.AddOnLoadAction(58493, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_swr_adria_level01, () => { - AddQuestConversation(this.Game.GetWorld(58493).GetActorBySNO(3095), 81674); + AddQuestConversation(this.Game.GetWorld(WorldSno.a2dun_swr_adria_level01).GetActorBySNO(3095), 81674); ListenConversation(81674, new Advance()); }); }) @@ -726,13 +742,14 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 8, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Adria in camp + var world = this.Game.GetWorld(WorldSno.a2dun_swr_adria_level01); this.Game.CurrentEncounter.activated = false; - if (this.Game.GetWorld(58493).GetActorBySNO(3095) != null) - RemoveConversations(this.Game.GetWorld(58493).GetActorBySNO(3095)); + if (world.GetActorBySNO(3095) != null) + RemoveConversations(world.GetActorBySNO(3095)); - var Adria = this.Game.GetWorld(58493).ShowOnlyNumNPC(3095, 0); - var Portal = this.Game.GetWorld(58493).GetActorBySNO(203431); - var AltPortal = this.Game.GetWorld(58493).SpawnMonster(203431, Portal.Position); + var Adria = world.ShowOnlyNumNPC(3095, 0); + var Portal = world.GetActorBySNO(203431); + var AltPortal = world.SpawnMonster(203431, Portal.Position); Adria.Move(Portal.Position, ActorSystem.Movement.MovementHelpers.GetFacingAngle(Adria, Portal)); //Only Talk Adria @@ -741,12 +758,12 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem System.Threading.Tasks.Task.Delay(3000).ContinueWith(delegate { - this.Game.GetWorld(58493).ShowOnlyNumNPC(3095, -1); //Only Talk Adria + world.ShowOnlyNumNPC(3095, -1); //Only Talk Adria Portal.Destroy(); AltPortal.Destroy(); }); - AddQuestConversation(this.Game.GetWorld(161472).GetActorBySNO(3095), 58139); + AddQuestConversation(this.Game.GetWorld(WorldSno.caout_refugeecamp).GetActorBySNO(3095), 58139); //ListenProximity(6353, new LaunchConversation(58139)); ListenConversation(58139, new Advance()); @@ -761,7 +778,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //complete PlayCutscene(2); - this.Game.GetWorld(70885).GetActorBySNO(162378).SetUsable(true); + this.Game.GetWorld(WorldSno.caout_town).GetActorBySNO(162378).SetUsable(true); }) }); @@ -789,13 +806,13 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem if (Game.DestinationEnterQuest == 78266) if (Game.DestinationEnterQuestStep == -1 || Game.DestinationEnterQuestStep == 2) { - this.Game.AddOnLoadAction(161472, () => + this.Game.AddOnLoadWorldAction(WorldSno.caout_refugeecamp, () => { - ActiveArrow(this.Game.GetWorld(161472), 178304, 70885); + ActiveArrow(this.Game.GetWorld(WorldSno.caout_refugeecamp), 178304, WorldSno.caout_town); }); - this.Game.AddOnLoadAction(70885, () => + this.Game.AddOnLoadWorldAction(WorldSno.caout_town, () => { - ActiveArrow(this.Game.GetWorld(70885), 176003, 174434); + ActiveArrow(this.Game.GetWorld(WorldSno.caout_town), 176003, WorldSno.a2_swr_fcauseway_01); }); } @@ -825,11 +842,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //find Oasis ListenConversation(180063, new LaunchConversation(187093)); ListenTeleport(175367, new Advance()); - this.Game.AddOnLoadAction(174434, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2_swr_fcauseway_01, () => { if (this.Game.CurrentQuest == 78266 && this.Game.CurrentStep == 31) { - StartConversation(this.Game.GetWorld(174434), 180063); + StartConversation(this.Game.GetWorld(WorldSno.a2_swr_fcauseway_01), 180063); } }); }) @@ -926,13 +943,14 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 }, new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //turn east lever and turn west lever and open gates to drowned passage //try {(this.Game.GetWorld(59486).FindAt(83629, new Vector3D{X = 175.1f, Y = 62.275f, Z = 50.17f}, 20.0f) as Door).Open();} catch {} - this.Game.AddOnLoadAction(59486, () => + var world = this.Game.GetWorld(WorldSno.a2dun_aqd_special_01); + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_aqd_special_01, () => { - (this.Game.GetWorld(59486).FindAt(83629, new Vector3D { X = 175.1f, Y = 62.275f, Z = 50.17f }, 20.0f) as Door).Open(); + (world.FindAt(83629, new Vector3D { X = 175.1f, Y = 62.275f, Z = 50.17f }, 20.0f) as Door).Open(); }); ListenInteract(76931, 1, new CompleteObjective(0)); ListenInteract(83295, 1, new Advance()); - StartConversation(this.Game.GetWorld(59486), 186905); + StartConversation(world, 186905); //ListenInteract(83295, 1, new CompleteObjective(2)); }) }); @@ -944,12 +962,13 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 54, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //enter to drowned passage - this.Game.AddOnLoadAction(59486, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_aqd_special_01, () => { - Open(this.Game.GetWorld(59486), 83629); - Open(this.Game.GetWorld(59486), 131364); - Open(this.Game.GetWorld(59486), 159419); - (this.Game.GetWorld(59486).FindAt(83629, new Vector3D { X = 80.5f, Y = 155.631f, Z = 50.33f }, 20.0f) as Door).Open(); + var world = this.Game.GetWorld(WorldSno.a2dun_aqd_special_01); + Open(world, 83629); + Open(world, 131364); + Open(world, 159419); + (world.FindAt(83629, new Vector3D { X = 80.5f, Y = 155.631f, Z = 50.33f }, 20.0f) as Door).Open(); }); //try {(this.Game.GetWorld(59486).FindAt(83629, new Vector3D{X = 80.5f, Y = 155.631f, Z = 50.33f}, 20.0f) as Door).Open();} catch {} ListenTeleport(192694, new Advance()); @@ -963,12 +982,13 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 56, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill Deceiveds - this.Game.AddOnLoadAction(192687, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_aqd_oasis_level00, () => { - setActorOperable(this.Game.GetWorld(192687), 168235, false); - this.Game.GetWorld(192687).SpawnMonster(4104, new Vector3D { X = 75.209f, Y = 191.342f, Z = -1.5f }); - this.Game.GetWorld(192687).SpawnMonster(4104, new Vector3D { X = 44.703f, Y = 179.753f, Z = -1.56f }); - this.Game.GetWorld(192687).SpawnMonster(4104, new Vector3D { X = 43.304f, Y = 205.28f, Z = -0.34f }); + var world = this.Game.GetWorld(WorldSno.a2dun_aqd_oasis_level00); + setActorOperable(world, 168235, false); + world.SpawnMonster(4104, new Vector3D { X = 75.209f, Y = 191.342f, Z = -1.5f }); + world.SpawnMonster(4104, new Vector3D { X = 44.703f, Y = 179.753f, Z = -1.56f }); + world.SpawnMonster(4104, new Vector3D { X = 43.304f, Y = 205.28f, Z = -0.34f }); }); ListenKill(4104, 3, new Advance()); }) @@ -981,9 +1001,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 58, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //break talking barrel - this.Game.AddOnLoadAction(192687, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_aqd_oasis_level00, () => { - setActorOperable(this.Game.GetWorld(192687), 168235, true); + setActorOperable(this.Game.GetWorld(WorldSno.a2dun_aqd_oasis_level00), 168235, true); }); ListenInteract(168235, 1, new Advance()); }) @@ -996,9 +1016,10 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 60, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with jeweler - this.Game.AddOnLoadAction(192687, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_aqd_oasis_level00, () => { - this.Game.GetWorld(192687).SpawnMonster(61544, this.Game.GetWorld(192687).GetActorBySNO(168235, true).Position); + var world = this.Game.GetWorld(WorldSno.a2dun_aqd_oasis_level00); + world.SpawnMonster(61544, world.GetActorBySNO(168235, true).Position); }); ListenProximity(61544, new LaunchConversation(168948)); ListenConversation(168948, new Advance()); @@ -1012,11 +1033,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 62, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find crucible - this.Game.AddOnLoadAction(192687, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_aqd_oasis_level00, () => { if (this.Game.CurrentQuest == 57335 && this.Game.CurrentStep == 60) { - AddFollower(this.Game.GetWorld(192687), 61544); + AddFollower(this.Game.GetWorld(WorldSno.a2dun_aqd_oasis_level00), 61544); } }); ListenProximity(168240, new Advance()); @@ -1030,16 +1051,17 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 64, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill Gevin - this.Game.AddOnLoadAction(192687, () => + var world = this.Game.GetWorld(WorldSno.a2dun_aqd_oasis_level00); + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_aqd_oasis_level00, () => { if (this.Game.CurrentQuest == 57335 && this.Game.CurrentStep == 62) { DestroyFollower(61544); - AddFollower(this.Game.GetWorld(192687), 61544); + AddFollower(world, 61544); } }); bool Killed = true; - foreach (var act in this.Game.GetWorld(192687).Actors.Values) + foreach (var act in world.Actors.Values) if (act.ActorSNO.Id == 168240) Killed = false; if (!Killed) @@ -1047,7 +1069,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem else { script = new Advance(); - script.Execute(this.Game.GetWorld(192687)); + script.Execute(world); } }) @@ -1060,12 +1082,12 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 44, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //get crucible - this.Game.AddOnLoadAction(192687, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_aqd_oasis_level00, () => { if (this.Game.CurrentQuest == 57335 && this.Game.CurrentStep == 64) { DestroyFollower(61544); - AddFollower(this.Game.GetWorld(192687), 61544); + AddFollower(this.Game.GetWorld(WorldSno.a2dun_aqd_oasis_level00), 61544); } }); ListenInteract(213514, 1, new Advance()); @@ -1079,12 +1101,12 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 24, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //enter the ancient passage - this.Game.AddOnLoadAction(192687, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_aqd_oasis_level00, () => { if (this.Game.CurrentQuest == 57335 && this.Game.CurrentStep == 44) { DestroyFollower(61544); - AddFollower(this.Game.GetWorld(192687), 61544); + AddFollower(this.Game.GetWorld(WorldSno.a2dun_aqd_oasis_level00), 61544); } }); ListenTeleport(175330, new Advance()); @@ -1173,20 +1195,20 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 }, new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //open Abyss lock and open Stormhalls lock if (this.Game.Empty) UnlockTeleport(9); - this.Game.AddOnLoadAction(50613, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_zolt_lobby, () => { if (this.Game.CurrentQuest == 57337 && this.Game.CurrentStep == 35) { - StartConversation(this.Game.GetWorld(50613), 187015); + StartConversation(this.Game.GetWorld(WorldSno.a2dun_zolt_lobby), 187015); } }); - this.Game.AddOnLoadAction(50610, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_zolt_level01, () => { - (this.Game.GetWorld(50610).GetActorBySNO(74187) as Spawner).Spawn(); + (this.Game.GetWorld(WorldSno.a2dun_zolt_level01).GetActorBySNO(74187) as Spawner).Spawn(); }); - this.Game.AddOnLoadAction(50611, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_zolt_level02, () => { - (this.Game.GetWorld(50611).GetActorBySNO(74187) as Spawner).Spawn(); + (this.Game.GetWorld(WorldSno.a2dun_zolt_level02).GetActorBySNO(74187) as Spawner).Spawn(); }); ListenInteract(2975, 2, new Advance()); }) @@ -1199,9 +1221,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 0, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //enter the shadows world - this.Game.AddOnLoadAction(50613, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_zolt_lobby, () => { - Open(this.Game.GetWorld(50613), 205701); + Open(this.Game.GetWorld(WorldSno.a2dun_zolt_lobby), 205701); }); UnlockTeleport(9); ListenTeleport(80592, new Advance()); @@ -1227,7 +1249,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Leah ListenProximity(4580, new LaunchConversation(62505)); - foreach (var act in this.Game.GetWorld(50613).GetActorsBySNO(168333)) + foreach (var act in this.Game.GetWorld(WorldSno.a2dun_zolt_lobby).GetActorsBySNO(168333)) act.Destroy(); ListenConversation(62505, new Advance()); }) @@ -1251,11 +1273,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 4, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Kulle - this.Game.AddOnLoadAction(60193, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_zolt_bossfight_level04, () => { if (this.Game.CurrentQuest == 57337 && this.Game.CurrentStep == 27) { - StartConversation(this.Game.GetWorld(60193), 202697); + StartConversation(this.Game.GetWorld(WorldSno.a2dun_zolt_bossfight_level04), 202697); } }); ListenConversation(202697, new Advance()); @@ -1280,9 +1302,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 33, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //get Soulstone - this.Game.AddOnLoadAction(60193, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_zolt_bossfight_level04, () => { - Open(this.Game.GetWorld(60193), 165415); + Open(this.Game.GetWorld(WorldSno.a2dun_zolt_bossfight_level04), 165415); }); ListenInteract(156328, 1, new Advance()); }) @@ -1331,11 +1353,12 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 23, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find Asheara - this.Game.AddOnLoadAction(70885, () => + this.Game.AddOnLoadWorldAction(WorldSno.caout_town, () => { - this.Game.GetWorld(70885).ShowOnlyNumNPC(3205, 1); + var world = this.Game.GetWorld(WorldSno.caout_town); + world.ShowOnlyNumNPC(3205, 1); script = new Advance(); - script.Execute(this.Game.GetWorld(70885)); + script.Execute(world); }); //ListenProximity(3205, new Advance()); }) @@ -1348,7 +1371,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 21, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Asheara - foreach (var Ashe in this.Game.GetWorld(70885).GetActorsBySNO(3205)) + foreach (var Ashe in this.Game.GetWorld(WorldSno.caout_town).GetActorsBySNO(3205)) AddQuestConversation(Ashe, 121359); ListenConversation(121359, new Advance()); }) @@ -1361,10 +1384,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 3, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //todo: timed event 115494 - try { (this.Game.GetWorld(70885).FindAt(169502, new Vector3D { X = 3135.3f, Y = 1546.1f, Z = 250.545f }, 15.0f) as Door).Open(); } catch { } - foreach (var Ashe in this.Game.GetWorld(70885).GetActorsBySNO(3205)) + var world = this.Game.GetWorld(WorldSno.caout_town); + try { (world.FindAt(169502, new Vector3D { X = 3135.3f, Y = 1546.1f, Z = 250.545f }, 15.0f) as Door).Open(); } catch { } + foreach (var Ashe in world.GetActorsBySNO(3205)) RemoveConversations(Ashe); - StartConversation(this.Game.GetWorld(70885), 178852); + StartConversation(world, 178852); ListenConversation(178852, new RefugeesRescue()); //ListenProximity(162378, new RefugeesRescue()); }) @@ -1401,8 +1425,8 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 12, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //enter the Caldeum palace - AddFollower(this.Game.GetWorld(81715), 4580); - AddFollower(this.Game.GetWorld(161472), 3095); + AddFollower(this.Game.GetWorld(WorldSno.a2_belial_room_intro), 4580); + AddFollower(this.Game.GetWorld(WorldSno.caout_refugeecamp), 3095); ListenTeleport(210451, new Advance()); }) }); @@ -1414,19 +1438,20 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 29, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go to emperor's palace - foreach (var door in this.Game.GetWorld(109894).GetActorsBySNO(190844)) + var world = this.Game.GetWorld(WorldSno.a2dun_cald_uprising); + foreach (var door in world.GetActorsBySNO(190844)) door.Destroy(); - foreach (var guard in this.Game.GetWorld(109894).GetActorsBySNO(57470)) + foreach (var guard in world.GetActorsBySNO(57470)) guard.Destroy(); DestroyFollower(4580); DestroyFollower(3095); - AddFollower(this.Game.GetWorld(81715), 4580); - AddFollower(this.Game.GetWorld(161472), 3095); - this.Game.AddOnLoadAction(109894, () => + AddFollower(this.Game.GetWorld(WorldSno.a2_belial_room_intro), 4580); + AddFollower(this.Game.GetWorld(WorldSno.caout_refugeecamp), 3095); + this.Game.AddOnLoadWorldAction(WorldSno.a2dun_cald_uprising, () => { script = new SpawnBelialDefenders(); - script.Execute(this.Game.GetWorld(109894)); - Open(this.Game.GetWorld(109894), 180254); + script.Execute(world); + Open(world, 180254); }); ListenTeleport(60757, new Advance()); }) @@ -1441,36 +1466,37 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //kill Belial DestroyFollower(4580); DestroyFollower(3095); - this.Game.AddOnLoadAction(60756, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2_belial_room_01, () => { - setActorOperable(this.Game.GetWorld(60756), 169025, false); - setActorOperable(this.Game.GetWorld(60756), 190236, false); - setActorVisible(this.Game.GetWorld(60756), 191922, false); + var world = this.Game.GetWorld(WorldSno.a2_belial_room_01); + setActorOperable(world, 169025, false); + setActorOperable(world, 190236, false); + setActorVisible(world, 191922, false); //stage 1 if (this.Game.CurrentQuest == 57339 && this.Game.CurrentStep == 29) { - DisableEveryone(this.Game.GetWorld(60756), true); - foreach (var Adr in this.Game.GetWorld(60756).GetActorsBySNO(3095)) + DisableEveryone(world, true); + foreach (var Adr in world.GetActorsBySNO(3095)) (Adr as Minion).Brain.DeActivate(); - foreach (var Adr in this.Game.GetWorld(60756).GetActorsBySNO(4580)) + foreach (var Adr in world.GetActorsBySNO(4580)) (Adr as TownLeah).Brain.DeActivate(); //Старт катсцены System.Threading.Tasks.Task.Run(() => { while (true) - if (this.Game.Players.First().Value.World.WorldSNO.Id == 60756) + if (this.Game.Players.First().Value.World.SNO == WorldSno.a2_belial_room_01) break; while (true) - if (this.Game.GetWorld(60756).GetActorBySNO(59447).IsRevealedToPlayer(this.Game.Players.First().Value)) + if (world.GetActorBySNO(59447).IsRevealedToPlayer(this.Game.Players.First().Value)) break; foreach (var plr in this.Game.Players.Values) plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraCriptedSequenceStartMessage() { Activate = true }); foreach (var plr in this.Game.Players.Values) - plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraFocusMessage() { ActorID = (int)this.Game.GetWorld(60756).GetActorBySNO(59447).DynamicID(plr), Duration = 1f, Snap = false }); - StartConversation(this.Game.GetWorld(60756), 61130); + plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraFocusMessage() { ActorID = (int)world.GetActorBySNO(59447).DynamicID(plr), Duration = 1f, Snap = false }); + StartConversation(world, 61130); }); } @@ -1496,9 +1522,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //get Belial's soul this.Game.CurrentEncounter.activated = false; - this.Game.AddOnLoadAction(60756, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2_belial_room_01, () => { - (this.Game.GetWorld(60756).GetActorBySNO(169025) as BelialRoom).Rebuild(); + (this.Game.GetWorld(WorldSno.a2_belial_room_01).GetActorBySNO(169025) as BelialRoom).Rebuild(); }); //this.Game.GetWorld(60756).SpawnMonster(206391, this.Game.GetWorld(60756).GetStartingPointById(108).Position); ListenInteract(206391, 1, new Advance()); @@ -1512,10 +1538,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 14, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Tyrael in camp - this.Game.AddOnLoadAction(60756, () => + this.Game.AddOnLoadWorldAction(WorldSno.a2_belial_room_01, () => { - setActorOperable(this.Game.GetWorld(60756), 190236, true); - this.Game.GetWorld(60756).GetActorBySNO(206391, true).Destroy(); + var world = this.Game.GetWorld(WorldSno.a2_belial_room_01); + setActorOperable(world, 190236, true); + world.GetActorBySNO(206391, true).Destroy(); }); ListenProximity(146980, new LaunchConversation(80329)); ListenConversation(80329, new Advance()); @@ -1531,7 +1558,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //talk with caravan leader ListenInteract(177544, 1, new LaunchConversation(177669)); ListenConversation(177669, new ChangeAct(200)); - this.Game.GetWorld(161472).GetActorBySNO(177544, true).NotifyConversation(1); + this.Game.GetWorld(WorldSno.caout_refugeecamp).GetActorBySNO(177544, true).NotifyConversation(1); }) }); diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActIII.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActIII.cs index 5a72383..9f4e306 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActIII.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActIII.cs @@ -30,6 +30,7 @@ using DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations; using DiIiS_NA.GameServer.GSSystem.ActorSystem.Movement; //Blizzless Project 2022 using System.Threading.Tasks; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.QuestSystem { @@ -53,7 +54,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 8, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - this.Game.GetWorld(204707).GetActorBySNO(170038, true).NotifyConversation(1); + this.Game.GetWorld(WorldSno.a3dun_hub_adria_tower_intro).GetActorBySNO(170038, true).NotifyConversation(1); ListenInteract(170038, 1, new LaunchConversation(204905)); ListenConversation(204905, new Advance()); }) @@ -66,9 +67,10 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 26, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //use fire torches + var world = this.Game.GetWorld(WorldSno.a3dun_hub_adria_tower_intro); ListenInteract(196211, 5, new Advance()); - StartConversation(this.Game.GetWorld(204707), 204915); - this.Game.GetWorld(204707).GetActorBySNO(170038, true).NotifyConversation(0); + StartConversation(world, 204915); + world.GetActorBySNO(170038, true).NotifyConversation(0); }) }); @@ -117,15 +119,16 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 20, Objectives = new List { new Objective { Limit = 3, Counter = 0 } }, OnAdvance = new Action(() => { //use 3 catapults - this.Game.AddOnLoadAction(93099, () => + this.Game.AddOnLoadWorldAction(WorldSno.a3dun_rmpt_level02, () => { + var world = this.Game.GetWorld(WorldSno.a3dun_rmpt_level02); if (this.Game.CurrentQuest == 93684 && this.Game.CurrentStep == 18) { //StartConversation(this.Game.GetWorld(81019), 106160); } - this.Game.GetWorld(93099).GetActorBySNO(154137).NotifyConversation(2); - this.Game.GetWorld(93099).GetActorBySNO(162406).NotifyConversation(2); - this.Game.GetWorld(93099).GetActorBySNO(149810).NotifyConversation(2); + world.GetActorBySNO(154137).NotifyConversation(2); + world.GetActorBySNO(162406).NotifyConversation(2); + world.GetActorBySNO(149810).NotifyConversation(2); }); ListenInteract(154137, 1, new FirstCatapult()); //followers ListenInteract(162406, 1, new SecondCatapult()); @@ -188,9 +191,13 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find breach on 2nd level if (this.Game.Empty) - while (this.Game.GetWorld(172909).GetActorBySNO(77796, true) != null) - this.Game.GetWorld(172909).GetActorBySNO(77796, true).Destroy(); - UnlockTeleport(2); + { + var world = this.Game.GetWorld(WorldSno.a3dun_hub_keep); + while (world.GetActorBySNO(77796, true) != null) + world.GetActorBySNO(77796, true).Destroy(); + } + + UnlockTeleport(2); ListenTeleport(136448, new Advance()); }) }); @@ -214,17 +221,19 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill gluttony UnlockTeleport(3); - this.Game.AddOnLoadAction(103209, () => + this.Game.AddOnLoadWorldAction(WorldSno.gluttony_boss, () => { if (this.Game.CurrentQuest == 93697) { - ActII.DisableEveryone(this.Game.GetWorld(103209), true); + var world = this.Game.GetWorld(WorldSno.gluttony_boss); + // TODO: extract this static method as extension + ActII.DisableEveryone(world, true); //Старт катсцены - foreach (var plr in this.Game.GetWorld(103209).Players.Values) + foreach (var plr in world.Players.Values) plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraCriptedSequenceStartMessage() { Activate = true }); - foreach (var plr in this.Game.GetWorld(103209).Players.Values) - plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraFocusMessage() { ActorID = (int)this.Game.GetWorld(103209).GetActorBySNO(87642).DynamicID(plr), Duration = 1f, Snap = false }); - StartConversation(this.Game.GetWorld(103209), 137018); + foreach (var plr in world.Players.Values) + plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraFocusMessage() { ActorID = (int)world.GetActorBySNO(87642).DynamicID(plr), Duration = 1f, Snap = false }); + StartConversation(world, 137018); } }); ListenConversation(137018, new EndCutScene()); @@ -264,7 +273,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 1, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - var Tyrael = this.Game.GetWorld(172909).GetActorBySNO(170038); + var Tyrael = this.Game.GetWorld(WorldSno.a3dun_hub_keep).GetActorBySNO(170038); (Tyrael as InteractiveNPC).Conversations.Add(new ActorSystem.Interactions.ConversationInteraction(183792)); Tyrael.Attributes[GameAttribute.Conversation_Icon, 0] = 2; Tyrael.Attributes.BroadcastChangedIfRevealed(); @@ -279,7 +288,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 4, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go to Armory - var Tyrael = this.Game.GetWorld(172909).GetActorBySNO(170038); + var Tyrael = this.Game.GetWorld(WorldSno.a3dun_hub_keep).GetActorBySNO(170038); (Tyrael as InteractiveNPC).Conversations.Clear(); Tyrael.Attributes[GameAttribute.Conversation_Icon, 0] = 1; Tyrael.Attributes.BroadcastChangedIfRevealed(); @@ -294,10 +303,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 6, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill shadows - this.Game.AddOnLoadAction(182875, () => + this.Game.AddOnLoadWorldAction(WorldSno.a3dun_keep_hub_inn, () => { + var world = this.Game.GetWorld(WorldSno.a3dun_keep_hub_inn); bool Activated = false; - var NStone = this.Game.GetWorld(182875).GetActorBySNO(156328);//156328 + var NStone = world.GetActorBySNO(156328);//156328 NStone.Attributes[GameAttribute.Team_Override] = (Activated ? -1 : 2); NStone.Attributes[GameAttribute.Untargetable] = !Activated; NStone.Attributes[GameAttribute.NPC_Is_Operatable] = Activated; @@ -307,7 +317,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NStone.Attributes[GameAttribute.Immunity] = !Activated; NStone.Attributes.BroadcastChangedIfRevealed(); NStone.PlayEffectGroup(205460); - foreach (var atr in this.Game.GetWorld(182875).GetActorsBySNO(4580)) + foreach (var atr in world.GetActorsBySNO(4580)) { float facingAngle = MovementHelpers.GetFacingAngle(atr, NStone); @@ -318,13 +328,13 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem } if (this.Game.CurrentQuest == 203595) { - ActII.DisableEveryone(this.Game.GetWorld(182875), true); + ActII.DisableEveryone(world, true); //Старт катсцены - foreach (var plr in this.Game.GetWorld(182875).Players.Values) + foreach (var plr in world.Players.Values) plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraCriptedSequenceStartMessage() { Activate = true }); - foreach (var plr in this.Game.GetWorld(182875).Players.Values) - plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraFocusMessage() { ActorID = (int)this.Game.GetWorld(182875).GetActorBySNO(156328).DynamicID(plr), Duration = 1f, Snap = false }); - StartConversation(this.Game.GetWorld(182875), 134282); + foreach (var plr in world.Players.Values) + plr.InGameClient.SendMessage(new MessageSystem.Message.Definitions.Camera.CameraFocusMessage() { ActorID = (int)world.GetActorBySNO(156328).DynamicID(plr), Duration = 1f, Snap = false }); + StartConversation(world, 134282); } }); ListenConversation(134282, new SpawnShadows()); @@ -343,9 +353,10 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem ListenConversation(134266, new Advance()); try { - this.Game.GetWorld(172909).FindAt(206188, new Vector3D { X = 127.121f, Y = 353.211f, Z = 0.22f }, 25f).Hidden = true; - var NStone = this.Game.GetWorld(182875).GetActorBySNO(156328);//156328 - foreach (var atr in this.Game.GetWorld(182875).GetActorsBySNO(4580)) + this.Game.GetWorld(WorldSno.a3dun_hub_keep).FindAt(206188, new Vector3D { X = 127.121f, Y = 353.211f, Z = 0.22f }, 25f).Hidden = true; + var world = this.Game.GetWorld(WorldSno.a3dun_keep_hub_inn); + var NStone = world.GetActorBySNO(156328);//156328 + foreach (var atr in world.GetActorsBySNO(4580)) { float facingAngle = MovementHelpers.GetFacingAngle(atr, NStone); atr.SetFacingRotation(facingAngle); @@ -398,7 +409,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 9, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with sergeant Pale - var Serge = this.Game.GetWorld(95804).GetActorBySNO(170482); + var Serge = this.Game.GetWorld(WorldSno.a3_battlefields_02).GetActorBySNO(170482); (Serge as InteractiveNPC).Conversations.Add(new ActorSystem.Interactions.ConversationInteraction(170486)); Serge.Attributes[GameAttribute.Conversation_Icon, 0] = 1; //this.Game.GetWorld(95804).SpawnMonster(202730, new Vector3D(4394.2188f, 396.80215f, -2.293509f)); @@ -414,11 +425,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 1, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go through Korsikk bridge - this.Game.AddOnLoadAction(95804, () => + this.Game.AddOnLoadWorldAction(WorldSno.a3_battlefields_02, () => { if (this.Game.CurrentQuest == 101756 && this.Game.CurrentStep == 9) { - StartConversation(this.Game.GetWorld(95804), 187146); + StartConversation(this.Game.GetWorld(WorldSno.a3_battlefields_02), 187146); } }); ListenProximity(6442, new Advance()); @@ -433,9 +444,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 }, new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill 3 ballistas/destroy trebuchet if (this.Game.Empty) UnlockTeleport(4); - this.Game.AddOnLoadAction(95804, () => + this.Game.AddOnLoadWorldAction(WorldSno.a3_battlefields_02, () => { - Open(this.Game.GetWorld(95804), 182443); + Open(this.Game.GetWorld(WorldSno.a3_battlefields_02), 182443); }); ListenKill(176988, 2, new CompleteObjective(0)); ListenKill(177041, 1, new CompleteObjective(1)); @@ -463,11 +474,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 3, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Tyrael - this.Game.AddOnLoadAction(95804, () => + this.Game.AddOnLoadWorldAction(WorldSno.a3_battlefields_02, () => { if (this.Game.CurrentQuest == 101756 && this.Game.CurrentStep == 21) { - var Tyrael = this.Game.GetWorld(95804).GetActorBySNO(170038); + var Tyrael = this.Game.GetWorld(WorldSno.a3_battlefields_02).GetActorBySNO(170038); (Tyrael as InteractiveNPC).Conversations.Add(new ActorSystem.Interactions.ConversationInteraction(209125)); //StartConversation(this.Game.GetWorld(95804), 209125); } @@ -521,10 +532,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill Siegebreaker if (!this.Game.Empty) UnlockTeleport(5); - this.Game.AddOnLoadAction(226713, () => + this.Game.AddOnLoadWorldAction(WorldSno.a3_battlefields_03, () => { - try { this.Game.GetWorld(226713).GetActorBySNO(96192).Destroy(); } catch { } - this.Game.GetWorld(226713).SpawnMonster(96192, this.Game.GetWorld(226713).GetActorBySNO(3095, true).Position); + var world = this.Game.GetWorld(WorldSno.a3_battlefields_03); + try { world.GetActorBySNO(96192).Destroy(); } catch { } + world.SpawnMonster(96192, world.GetActorBySNO(3095, true).Position); }); ListenKill(96192, 1, new Advance()); }) @@ -576,13 +588,13 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 41, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find Tower of the Doomed lv. 1 - this.Game.AddOnLoadAction(226713, () => + this.Game.AddOnLoadWorldAction(WorldSno.a3_battlefields_03, () => { - Open(this.Game.GetWorld(226713), 155128); + Open(this.Game.GetWorld(WorldSno.a3_battlefields_03), 155128); }); - this.Game.AddOnLoadAction(95804, () => + this.Game.AddOnLoadWorldAction(WorldSno.a3_battlefields_02, () => { - Open(this.Game.GetWorld(95804), 155128); + Open(this.Game.GetWorld(WorldSno.a3_battlefields_02), 155128); }); ListenTeleport(80791, new Advance()); }) @@ -622,9 +634,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find Tower of Damned lv. 1 if (this.Game.Empty) UnlockTeleport(8); - this.Game.AddOnLoadAction(85201, () => + this.Game.AddOnLoadWorldAction(WorldSno.a3dun_crater_st_level04, () => { - Open(this.Game.GetWorld(85201), 177040); + Open(this.Game.GetWorld(WorldSno.a3dun_crater_st_level04), 177040); }); ListenTeleport(119653, new Advance()); }) @@ -652,13 +664,14 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //kill Cydaea if (!this.Game.Empty) UnlockTeleport(9); ListenKill(95250, 1, new Advance()); - this.Game.AddOnLoadAction(119650, () => + this.Game.AddOnLoadWorldAction(WorldSno.a3dun_crater_st_level04b, () => { try { - (this.Game.GetWorld(119650).FindAt(201680, new Vector3D { X = 457.04f, Y = 359.03f, Z = 0.39f }, 20f) as Door).Open(); - (this.Game.GetWorld(119650).FindAt(201680, new Vector3D { X = 356.04f, Y = 267.03f, Z = 0.28f }, 20f) as Door).Open(); - setActorOperable(this.Game.GetWorld(119650), 193077, false); + var world = this.Game.GetWorld(WorldSno.a3dun_crater_st_level04b); + (world.FindAt(201680, new Vector3D { X = 457.04f, Y = 359.03f, Z = 0.39f }, 20f) as Door).Open(); + (world.FindAt(201680, new Vector3D { X = 356.04f, Y = 267.03f, Z = 0.28f }, 20f) as Door).Open(); + setActorOperable(world, 193077, false); } catch { } }); @@ -674,11 +687,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //Destroy Heart of Sin this.Game.CurrentEncounter.activated = false; ListenKill(193077, 1, new Advance()); - this.Game.AddOnLoadAction(119650, () => + this.Game.AddOnLoadWorldAction(WorldSno.a3dun_crater_st_level04b, () => { try { - setActorOperable(this.Game.GetWorld(119650), 193077, true); + setActorOperable(this.Game.GetWorld(WorldSno.a3dun_crater_st_level04b), 193077, true); } catch { } }); @@ -694,11 +707,12 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //kill Azmodan, finally if (this.Game.Empty) UnlockTeleport(10); ListenKill(89690, 1, new Advance()); - this.Game.AddOnLoadAction(121214, () => + this.Game.AddOnLoadWorldAction(WorldSno.a3dun_azmodan_arena, () => { - OpenAll(this.Game.GetWorld(121214), 198977); - try { this.Game.GetWorld(121214).GetActorBySNO(89690).Destroy(); } catch { }; - this.Game.GetWorld(121214).SpawnMonster(89690, new Vector3D { X = 395.553f, Y = 394.966f, Z = 0.1f }); + var world = this.Game.GetWorld(WorldSno.a3dun_azmodan_arena); + OpenAll(world, 198977); + try { world.GetActorBySNO(89690).Destroy(); } catch { }; + world.SpawnMonster(89690, new Vector3D { X = 395.553f, Y = 394.966f, Z = 0.1f }); }); }) }); @@ -712,9 +726,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //get Azmodan's soul this.Game.CurrentEncounter.activated = false; ListenProximity(204992, new Advance()); - this.Game.AddOnLoadAction(121214, () => + this.Game.AddOnLoadWorldAction(WorldSno.a3dun_azmodan_arena, () => { - this.Game.GetWorld(121214).SpawnMonster(204992, new Vector3D { X = 395.553f, Y = 394.966f, Z = 0.1f }); + this.Game.GetWorld(WorldSno.a3dun_azmodan_arena).SpawnMonster(204992, new Vector3D { X = 395.553f, Y = 394.966f, Z = 0.1f }); }); }) }); @@ -727,9 +741,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //return to base ListenProximity(170038, new Advance()); - this.Game.AddOnLoadAction(121214, () => + this.Game.AddOnLoadWorldAction(WorldSno.a3dun_azmodan_arena, () => { - this.Game.GetWorld(121214).GetActorBySNO(204992).Destroy(); + this.Game.GetWorld(WorldSno.a3dun_azmodan_arena).GetActorBySNO(204992).Destroy(); }); }) }); @@ -765,7 +779,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go to Adria tower event - var World = this.Game.GetWorld(186552); + var World = this.Game.GetWorld(WorldSno.a3dun_hub_adria_tower); //Удаляем дубликаты var Guardian = World.GetActorBySNO(196244, true); var Leah = World.GetActorBySNO(195376, true); @@ -775,7 +789,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem foreach (var actor in World.GetActorsBySNO(195377)) if (actor.GlobalID != Tyrael.GlobalID) actor.Destroy(); //Тираэль foreach (var actor in World.GetActorsBySNO(195376)) if (actor.GlobalID != Leah.GlobalID) actor.Destroy(); //Лея - this.Game.AddOnLoadAction(186552, () => + this.Game.AddOnLoadWorldAction(WorldSno.a3dun_hub_adria_tower, () => { var portal = World.GetActorBySNO(5660); var Bportal = World.GetActorBySNO(188441); @@ -813,7 +827,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem if (World.Players.Values.First().Position.Y < 140) break; } - script.Execute(this.Game.GetWorld(186552)); + script.Execute(World); }); #region Описание скрипта //Понеслась diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActIV.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActIV.cs index a80b869..244bdc5 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActIV.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActIV.cs @@ -24,6 +24,7 @@ using DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents; using DiIiS_NA.GameServer.Core.Types.Math; //Blizzless Project 2022 using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Base; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.QuestSystem { @@ -48,7 +49,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { UnlockTeleport(0); //{[World] SNOId: 182944 GlobalId: 117440513 Name: a4dun_heaven_1000_monsters_fight_entrance} - var Tyrael = this.Game.GetWorld(182944).GetActorBySNO(6353) as InteractiveNPC; + var Tyrael = this.Game.GetWorld(WorldSno.a4dun_heaven_1000_monsters_fight_entrance).GetActorBySNO(6353) as InteractiveNPC; Tyrael.Conversations.Clear(); Tyrael.OverridedConv = true; Tyrael.Attributes[GameAttribute.Conversation_Icon, 0] = 1; @@ -67,11 +68,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Tyrael UnlockTeleport(1); - this.Game.AddOnLoadAction(182944, () => + this.Game.AddOnLoadWorldAction(WorldSno.a4dun_heaven_1000_monsters_fight_entrance, () => { if (this.Game.CurrentQuest == 112498 && this.Game.CurrentStep == 2) { - var Tyrael = this.Game.GetWorld(182944).GetActorBySNO(6353) as InteractiveNPC; + var Tyrael = this.Game.GetWorld(WorldSno.a4dun_heaven_1000_monsters_fight_entrance).GetActorBySNO(6353) as InteractiveNPC; Tyrael.Conversations.Clear(); Tyrael.Conversations.Add(new ActorSystem.Interactions.ConversationInteraction(112449)); Tyrael.OverridedConv = true; @@ -107,8 +108,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //kill Iskatu if (!this.Game.Empty) { - script = new Invasion(this.Game.GetWorld(109143).Players.First().Value.Position, 50f, new List { 60049 }, 30f, 196102, true); - script.Execute(this.Game.GetWorld(109143)); + var world = this.Game.GetWorld(WorldSno.a4dun_heaven_1000_monsters_fight); + script = new Invasion(world.Players.First().Value.Position, 50f, new List { 60049 }, 30f, 196102, true); + script.Execute(world); ListenKill(196102, 1, new Advance()); } }) @@ -146,17 +148,18 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 58, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find Iterael + var world = this.Game.GetWorld(WorldSno.a4dun_heaven_1000_monsters_fight); if (this.Game.Empty) UnlockTeleport(2); try { - if (this.Game.GetWorld(109143).GetActorBySNO(201603, true) != null) - Open(this.Game.GetWorld(109143), 201603); + if (world.GetActorBySNO(201603, true) != null) + Open(world, 201603); } catch { } try { - if (this.Game.GetWorld(109143).GetActorBySNO(195687, true) != null) - this.Game.GetWorld(109143).SpawnMonster(112768, this.Game.GetWorld(109143).GetActorBySNO(195687, true).Position); + if (world.GetActorBySNO(195687, true) != null) + world.SpawnMonster(112768, world.GetActorBySNO(195687, true).Position); } catch { } ListenProximity(112768, new Advance()); @@ -171,7 +174,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Iterael - var Ityrael = this.Game.GetWorld(109143).GetActorBySNO(112768) as InteractiveNPC; + var Ityrael = this.Game.GetWorld(WorldSno.a4dun_heaven_1000_monsters_fight).GetActorBySNO(112768) as InteractiveNPC; Ityrael.Conversations.Clear(); Ityrael.Conversations.Add(new ActorSystem.Interactions.ConversationInteraction(112763)); Ityrael.OverridedConv = true; @@ -192,7 +195,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //find Library of Fate if (!this.Game.Empty) UnlockTeleport(2); if (this.Game.Empty) UnlockTeleport(3); - var Ityrael = this.Game.GetWorld(109143).GetActorBySNO(112768) as InteractiveNPC; + var Ityrael = this.Game.GetWorld(WorldSno.a4dun_heaven_1000_monsters_fight).GetActorBySNO(112768) as InteractiveNPC; Ityrael.Conversations.Clear(); Ityrael.Attributes[GameAttribute.Conversation_Icon, 0] = 1; Ityrael.Attributes.BroadcastChangedIfRevealed(); @@ -221,10 +224,10 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill Rakanoth if (!this.Game.Empty) UnlockTeleport(3); - var Library = this.Game.GetWorld(166640); + var Library = this.Game.GetWorld(WorldSno.a4dun_libraryoffate); ListenKill(4630, 1, new Advance()); - this.Game.AddOnLoadAction(166640, () => + this.Game.AddOnLoadWorldAction(WorldSno.a4dun_libraryoffate, () => { var Fate = Library.GetActorBySNO(112768); Vector3D Fate_Dist = Fate.Position; Library.Leave(Fate); var Hope = Library.GetActorBySNO(114074); Vector3D Hope_Dist = Hope.Position; Library.Leave(Hope); @@ -254,7 +257,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //destroy Auriel's jail this.Game.CurrentEncounter.activated = false; - var Library = this.Game.GetWorld(166640); + var Library = this.Game.GetWorld(WorldSno.a4dun_libraryoffate); StartConversation(Library, 217223); // Голос дъябло после битвы var Hope_Bound = Library.GetActorBySNO(182826); @@ -275,7 +278,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Auriel - var Library = this.Game.GetWorld(166640); + var Library = this.Game.GetWorld(WorldSno.a4dun_libraryoffate); var Hope_Bound = Library.GetActorBySNO(182826); var Hope = Library.SpawnMonster(114074, new Vector3D(Hope_Bound.Position.X - 0.3854f, Hope_Bound.Position.Y + 0.44201f, Hope_Bound.Position.Z)); var Fate = Library.SpawnMonster(112768, new Vector3D(Hope_Bound.Position.X - 18.6041f, Hope_Bound.Position.Y + 2.35458f, Hope_Bound.Position.Z)); @@ -303,7 +306,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //return to Gardens of Hope lv. 1 PlayCutscene(1); - var Library = this.Game.GetWorld(166640); + var Library = this.Game.GetWorld(WorldSno.a4dun_libraryoffate); var Hope = Library.GetActorBySNO(114074, true); (Hope as InteractiveNPC).Conversations.Clear(); Hope.Attributes[GameAttribute.Conversation_Icon, 0] = 1; @@ -349,7 +352,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 50, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //leave demonic rift - var World = this.Game.GetWorld(109525); + var World = this.Game.GetWorld(WorldSno.a4dun_hell_portal_01); World.SpawnMonster(215103, World.Players.Values.First().Position); StartConversation(World, 217230); ListenTeleport(109514, new Advance()); @@ -397,7 +400,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 56, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //leave demonic rift - var World = this.Game.GetWorld(109530); + var World = this.Game.GetWorld(WorldSno.a4dun_hell_portal_02); World.SpawnMonster(215103, World.Players.Values.First().Position); StartConversation(World, 217232); ListenTeleport(109516, new Advance()); @@ -424,7 +427,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //talk with Tyrael if (!this.Game.Empty) UnlockTeleport(4); - var Garden = this.Game.GetWorld(219659); + var Garden = this.Game.GetWorld(WorldSno.a4dun_garden_of_hope_random); var Tyrael = Garden.GetActorBySNO(122552); Tyrael.Attributes[GameAttribute.MinimapActive] = true; (Tyrael as InteractiveNPC).Conversations.Clear(); @@ -480,9 +483,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 18, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find Imperius - var CrystalWorld = this.Game.GetWorld(103910); + var CrystalWorld = this.Game.GetWorld(WorldSno.a4dun_garden3_spireentrance); - this.Game.AddOnLoadAction(103910, () => + this.Game.AddOnLoadWorldAction(WorldSno.a4dun_garden3_spireentrance, () => { foreach (var mob in CrystalWorld.GetActorsBySNO(106708)) { @@ -490,7 +493,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem mob.Attributes[GameAttribute.Untargetable] = true; } script = new ImperiumScene(); - script.Execute(this.Game.GetWorld(103910)); + script.Execute(CrystalWorld); }); }) @@ -515,9 +518,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 12, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //go to road to Spire - this.Game.AddOnLoadAction(103910, () => + this.Game.AddOnLoadWorldAction(WorldSno.a4dun_garden3_spireentrance, () => { - var CrystalWorld = this.Game.GetWorld(103910); + var CrystalWorld = this.Game.GetWorld(WorldSno.a4dun_garden3_spireentrance); foreach (var plr in CrystalWorld.Players.Values) { plr.InGameClient.SendMessage(new BoolDataMessage(Opcodes.CameraTriggerFadeToBlackMessage) { Field0 = true }); @@ -526,7 +529,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem if (this.Game.CurrentQuest == 114795 && this.Game.CurrentStep == 16) { - StartConversation(this.Game.GetWorld(103910), 196566); + StartConversation(CrystalWorld, 196566); } }); ListenTeleport(198564, new Advance()); @@ -577,14 +580,15 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill Izual if (!this.Game.Empty) UnlockTeleport(5); - this.Game.AddOnLoadAction(214956, () => + this.Game.AddOnLoadWorldAction(WorldSno.a4dun_spire_exterior, () => { - this.Game.GetWorld(214956).SpawnMonster(148449, new Vector3D { X = 585.439f, Y = 560.823f, Z = 0.1f }); - var iceBarrier = this.Game.GetWorld(214956).GetActorBySNO(182526); + var world = this.Game.GetWorld(WorldSno.a4dun_spire_exterior); + world.SpawnMonster(148449, new Vector3D { X = 585.439f, Y = 560.823f, Z = 0.1f }); + var iceBarrier = world.GetActorBySNO(182526); while (iceBarrier != null) { iceBarrier.Destroy(); - iceBarrier = this.Game.GetWorld(214956).GetActorBySNO(182526); + iceBarrier = world.GetActorBySNO(182526); } }); ListenKill(148449, 1, new Advance()); @@ -636,9 +640,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find Diablo if (!this.Game.Empty) UnlockTeleport(7); - this.Game.AddOnLoadAction(109561, () => + this.Game.AddOnLoadWorldAction(WorldSno.a4dun_diablo_arena, () => { - Open(this.Game.GetWorld(109561), 178052); + Open(this.Game.GetWorld(WorldSno.a4dun_diablo_arena), 178052); }); ListenProximity(178052, new Advance()); }) @@ -651,11 +655,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 6, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill Diablo (1st phase, to 50% hp) - this.Game.AddOnLoadAction(109561, () => + this.Game.AddOnLoadWorldAction(WorldSno.a4dun_diablo_arena, () => { if (this.Game.CurrentQuest == 114901 && this.Game.CurrentStep == 1) { - StartConversation(this.Game.GetWorld(109561), 132632); + StartConversation(this.Game.GetWorld(WorldSno.a4dun_diablo_arena), 132632); } }); //seems hacky but works @@ -681,8 +685,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 3, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill Diablo (3rd phase) - TeleportToWorld(this.Game.GetWorld(153670), this.Game.GetWorld(196292), 172); - StartConversation(this.Game.GetWorld(196292), 132640); + var targetWorld = this.Game.GetWorld(WorldSno.a4dun_diablo_arena_phase3); + TeleportToWorld(this.Game.GetWorld(WorldSno.a4dun_diablo_shadowrealm_01), targetWorld, 172); + StartConversation(targetWorld, 132640); ListenKill(114917, 1, new Advance()); }) }); @@ -694,7 +699,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 17, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //destroy Diablo - StartConversation(this.Game.GetWorld(196292), 205783); + StartConversation(this.Game.GetWorld(WorldSno.a4dun_diablo_arena_phase3), 205783); ListenConversation(205783, new Advance()); }) }); @@ -706,7 +711,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 5, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Auriel - this.Game.GetWorld(196292).GetActorBySNO(114074).NotifyConversation(1); + this.Game.GetWorld(WorldSno.a4dun_diablo_arena_phase3).GetActorBySNO(114074).NotifyConversation(1); if (this.Game.IsHardcore) { foreach (var plr in this.Game.Players.Values) diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActV.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActV.cs index ff3b969..6172413 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActV.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActV.cs @@ -26,6 +26,7 @@ using DiIiS_NA.GameServer.Core.Types.Math; using DiIiS_NA.Core.MPQ; //Blizzless Project 2022 using DiIiS_NA.GameServer.Core.Types.SNO; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.QuestSystem { @@ -104,39 +105,42 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem }); this.Game.QuestManager.Quests[251355].Steps.Add(2, new QuestStep - { + { Completed = false, Saveable = false, NextStep = 59, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //enter Westmarch - this.Game.AddOnLoadAction(308705, () => + var world = this.Game.GetWorld(WorldSno.x1_westm_intro); + this.Game.AddOnLoadWorldAction(WorldSno.x1_westmarch_overlook_d, () => { if (this.Game.CurrentQuest == 251355 && this.Game.CurrentStep == 2) { - StartConversation(this.Game.GetWorld(308705), 317212); + StartConversation(this.Game.GetWorld(WorldSno.x1_westmarch_overlook_d), 317212); } }); - this.Game.AddOnLoadAction(306549, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_westm_intro, () => { - StartConversation(this.Game.GetWorld(306549), 311433); + StartConversation(world, 311433); //Delete fake giant door - if (this.Game.GetWorld(306549).GetActorBySNO(328008) != null) - this.Game.GetWorld(306549).Leave(this.Game.GetWorld(306549).GetActorBySNO(328008)); + if (world.GetActorBySNO(328008) != null) + world.Leave(world.GetActorBySNO(328008)); //Delete Cadala from this location TODO: нужно найти анимации Кадалы с убийственной волной на монстров) - foreach (var cadal in this.Game.GetWorld(306549).GetActorsBySNO(311858)) - this.Game.GetWorld(306549).Leave(cadal); + foreach (var cadal in world.GetActorsBySNO(311858)) + world.Leave(cadal); }); - if (this.Game.GetWorld(306549).GetActorBySNO(308377) != null) + var npc = world.GetActorBySNO(308377); + if (npc != null) { - (this.Game.GetWorld(306549).GetActorBySNO(308377) as ActorSystem.InteractiveNPC).Conversations.Add(new ActorSystem.Interactions.ConversationInteraction(308393)); - (this.Game.GetWorld(306549).GetActorBySNO(308377) as ActorSystem.InteractiveNPC).Attributes[GameAttribute.Conversation_Icon, 0] = 2; - (this.Game.GetWorld(306549).GetActorBySNO(308377) as ActorSystem.InteractiveNPC).Attributes.BroadcastChangedIfRevealed(); + var introGuy = npc as InteractiveNPC; + introGuy.Conversations.Add(new ActorSystem.Interactions.ConversationInteraction(308393)); + introGuy.Attributes[GameAttribute.Conversation_Icon, 0] = 2; + introGuy.Attributes.BroadcastChangedIfRevealed(); } - ListenConversation(308393, new EnterToWest()); + ListenConversation(308393, new EnterToWest()); //ListenInteract(309222, 1, new Advance()); //Locked Door - 316495 - Wait @@ -151,11 +155,13 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find a5 hub - if (this.Game.GetWorld(306549).GetActorBySNO(308377) != null) + var npc = this.Game.GetWorld(WorldSno.x1_westm_intro).GetActorBySNO(308377); + if (npc != null) { - (this.Game.GetWorld(306549).GetActorBySNO(308377) as ActorSystem.InteractiveNPC).Conversations.Clear(); - (this.Game.GetWorld(306549).GetActorBySNO(308377) as ActorSystem.InteractiveNPC).Attributes[GameAttribute.Conversation_Icon, 0] = 1; - (this.Game.GetWorld(306549).GetActorBySNO(308377) as ActorSystem.InteractiveNPC).Attributes.BroadcastChangedIfRevealed(); + var introGuy = npc as InteractiveNPC; + introGuy.Conversations.Clear(); + introGuy.Attributes[GameAttribute.Conversation_Icon, 0] = 1; + introGuy.Attributes.BroadcastChangedIfRevealed(); } ListenInteract(309812, 1, new Advance()); @@ -170,21 +176,22 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill mobs at hub - this.Game.AddOnLoadAction(306549, () => + var world = this.Game.GetWorld(WorldSno.x1_westm_intro); + this.Game.AddOnLoadWorldAction(WorldSno.x1_westm_intro, () => { if (this.Game.CurrentQuest == 251355 && this.Game.CurrentStep == 14) { - try { this.Game.GetWorld(306549).FindAt(316495, new Vector3D { X = 555.9f, Y = 403.47f, Z = 10.2f }, 5.0f).Destroy(); } catch { } + try { world.FindAt(316495, new Vector3D { X = 555.9f, Y = 403.47f, Z = 10.2f }, 5.0f).Destroy(); } catch { } } }); ListenKill(276309, 10, new Advance()); - var Tyrael = this.Game.GetWorld(306549).ShowOnlyNumNPC(289293, 0) as ActorSystem.InteractiveNPC; - foreach (var general in this.Game.GetWorld(306549).GetActorsBySNO(303828)) { general.SetVisible(false); general.Hidden = true; } //x1_WestmHub_General - foreach (var general in this.Game.GetWorld(306549).GetActorsBySNO(364173)) { general.SetVisible(false); general.Hidden = true; } //x1_WestmHub_BSS_postChange - foreach (var general in this.Game.GetWorld(306549).GetActorsBySNO(175310)) { general.SetVisible(false); general.Hidden = true; } //PT_Mystic_NoVendor_NonGlobalFollower - foreach (var general in this.Game.GetWorld(306549).GetActorsBySNO(259252)) { general.SetVisible(false); general.Hidden = true; } // X1_WestmHub_angryman_Temp - foreach (var general in this.Game.GetWorld(306549).GetActorsBySNO(259256)) { general.SetVisible(false); general.Hidden = true; } //X1_WestmHub_grieving_Temp - var Lorath = this.Game.GetWorld(306549).ShowOnlyNumNPC(284530, 0) as ActorSystem.InteractiveNPC; + var Tyrael = world.ShowOnlyNumNPC(289293, 0) as ActorSystem.InteractiveNPC; + foreach (var general in world.GetActorsBySNO(303828)) { general.SetVisible(false); general.Hidden = true; } //x1_WestmHub_General + foreach (var general in world.GetActorsBySNO(364173)) { general.SetVisible(false); general.Hidden = true; } //x1_WestmHub_BSS_postChange + foreach (var general in world.GetActorsBySNO(175310)) { general.SetVisible(false); general.Hidden = true; } //PT_Mystic_NoVendor_NonGlobalFollower + foreach (var general in world.GetActorsBySNO(259252)) { general.SetVisible(false); general.Hidden = true; } // X1_WestmHub_angryman_Temp + foreach (var general in world.GetActorsBySNO(259256)) { general.SetVisible(false); general.Hidden = true; } //X1_WestmHub_grieving_Temp + var Lorath = world.ShowOnlyNumNPC(284530, 0) as ActorSystem.InteractiveNPC; }) @@ -197,14 +204,15 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 57, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { + var world = this.Game.GetWorld(WorldSno.x1_westm_intro); //Delete Monsters - foreach (var skeleton in this.Game.GetWorld(306549).GetActorsBySNO(276309)) skeleton.Destroy(); //x1_Skeleton_Westmarch_A - foreach (var skeleton in this.Game.GetWorld(306549).GetActorsBySNO(309114)) skeleton.Destroy(); //x1_Ghost_Dark_A - foreach (var skeleton in this.Game.GetWorld(306549).GetActorsBySNO(282027)) skeleton.Destroy(); //x1_Shield_Skeleton_Westmarch_A + foreach (var skeleton in world.GetActorsBySNO(276309)) skeleton.Destroy(); //x1_Skeleton_Westmarch_A + foreach (var skeleton in world.GetActorsBySNO(309114)) skeleton.Destroy(); //x1_Ghost_Dark_A + foreach (var skeleton in world.GetActorsBySNO(282027)) skeleton.Destroy(); //x1_Shield_Skeleton_Westmarch_A //Talk to Tyrael - var Tyrael = this.Game.GetWorld(306549).ShowOnlyNumNPC(289293, 0) as ActorSystem.InteractiveNPC; - var Lorath = this.Game.GetWorld(306549).ShowOnlyNumNPC(284530, 0) as ActorSystem.InteractiveNPC; + var Tyrael = world.ShowOnlyNumNPC(289293, 0) as ActorSystem.InteractiveNPC; + var Lorath = world.ShowOnlyNumNPC(284530, 0) as ActorSystem.InteractiveNPC; AddQuestConversation(Tyrael, 252089); @@ -221,17 +229,18 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //enter the church - var Tyrael = this.Game.GetWorld(306549).ShowOnlyNumNPC(289293, 0) as ActorSystem.InteractiveNPC; + var world = this.Game.GetWorld(WorldSno.x1_westm_intro); + var Tyrael = world.ShowOnlyNumNPC(289293, 0) as ActorSystem.InteractiveNPC; Tyrael.Conversations.Clear(); Tyrael.Attributes[GameAttribute.Conversation_Icon, 0] = 1; Tyrael.Attributes.BroadcastChangedIfRevealed(); - this.Game.AddOnLoadAction(306549, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_westm_intro, () => { - Open(this.Game.GetWorld(306549), 316548); + Open(world, 316548); }); - if (this.Game.GetWorld(304235).GetActorBySNO(316548) != null) - this.Game.GetWorld(304235).GetActorBySNO(316548).Destroy(); + if (world.GetActorBySNO(316548) != null) + world.GetActorBySNO(316548).Destroy(); ListenTeleport(309413, new Advance()); }) }); @@ -257,7 +266,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //talk to Tyrael UnlockTeleport(0); - var Tyrael = this.Game.GetWorld(304235).ShowOnlyNumNPC(289293, 0) as ActorSystem.InteractiveNPC; + var Tyrael = this.Game.GetWorld(WorldSno.x1_westmarch_hub).ShowOnlyNumNPC(289293, 0) as ActorSystem.InteractiveNPC; AddQuestConversation(Tyrael, 252100); //ListenInteract(289293, 1, new LaunchConversation(252100)); ListenConversation(252100, new Advance()); @@ -272,7 +281,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //leave the church - var Tyrael = this.Game.GetWorld(304235).ShowOnlyNumNPC(289293, 0) as ActorSystem.InteractiveNPC; + var Tyrael = this.Game.GetWorld(WorldSno.x1_westmarch_hub).ShowOnlyNumNPC(289293, 0) as ActorSystem.InteractiveNPC; if (Tyrael != null) { Tyrael.Conversations.Clear(); @@ -310,26 +319,28 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem }); this.Game.QuestManager.Quests[284683].Steps.Add(47, new QuestStep - { + { Completed = false, Saveable = false, NextStep = 62, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //OnTargetedActor ID: 315793, Name: x1_westm_Door_Cloister, NumInWorld: 0 - this.Game.AddOnLoadAction(304235, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_westmarch_hub, () => { if (Game.CurrentQuest == 284683 && Game.CurrentStep == -1 || Game.CurrentQuest == 284683 && Game.CurrentStep == 47) - ActiveArrow(this.Game.GetWorld(304235), 315793); + ActiveArrow(this.Game.GetWorld(WorldSno.x1_westmarch_hub), 315793); }); - //Enter Westmarch Commons - ListenTeleport(261758, new BackToCath()); - foreach (var Myst in this.Game.GetWorld(338891).GetActorsBySNO(339463)) //Mystic + //Enter Westmarch Commons + ListenTeleport(261758, new BackToCath()); + var world = this.Game.GetWorld(WorldSno.x1_westm_deathorb_gideonscourt); + // FIXME: incorrect snoId or possible code duplicate + foreach (var Myst in world.GetActorsBySNO(339463)) //Mystic { Myst.Hidden = true; Myst.SetVisible(false); } - foreach (var Myst in this.Game.GetWorld(338891).GetActorsBySNO(339463)) //Mystic_EnchanceEvent + foreach (var Myst in world.GetActorsBySNO(339463)) //Mystic_EnchanceEvent { Myst.Hidden = true; Myst.SetVisible(false); @@ -338,16 +349,17 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem }); this.Game.QuestManager.Quests[284683].Steps.Add(62, new QuestStep - { + { Completed = false, Saveable = false, NextStep = 57, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - //find orbs - var target = this.Game.GetWorld(304235).GetActorBySNO(315793, true); - DisableArrow(this.Game.GetWorld(304235), target); - ListenTeleport(338956, new BackToCath()); + //find orbs + var world = this.Game.GetWorld(WorldSno.x1_westmarch_hub); + var target = world.GetActorBySNO(315793, true); + DisableArrow(world, target); + ListenTeleport(338956, new BackToCath()); }) }); @@ -360,25 +372,26 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //destroy bodies + var world = this.Game.GetWorld(WorldSno.x1_westm_deathorb_gideonscourt); UnlockTeleport(1); - foreach (var Myst in this.Game.GetWorld(338891).GetActorsBySNO(175310)) //Mystic_NonGlobalFollower + foreach (var Myst in world.GetActorsBySNO(175310)) //Mystic_NonGlobalFollower { Myst.Hidden = true; Myst.SetVisible(false); } - foreach (var Myst in this.Game.GetWorld(338891).GetActorsBySNO(339463)) //Mystic_EnchanceEvent + foreach (var Myst in world.GetActorsBySNO(339463)) //Mystic_EnchanceEvent { Myst.Hidden = true; Myst.SetVisible(false); } ListenKill(316839, 4, new Advance()); - this.Game.AddOnLoadAction(338891, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_westm_deathorb_gideonscourt, () => { if (this.Game.CurrentQuest == 284683 && this.Game.CurrentStep == 57) { - setActorOperable(this.Game.GetWorld(338891), 319396, false); - setActorOperable(this.Game.GetWorld(338891), 375106, false); + setActorOperable(world, 319396, false); + setActorOperable(world, 375106, false); } }); }) @@ -392,9 +405,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //slay Drygha - this.Game.AddOnLoadAction(338891, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_westm_deathorb_gideonscourt, () => { - setActorOperable(this.Game.GetWorld(338891), 319396, true); + setActorOperable(this.Game.GetWorld(WorldSno.x1_westm_deathorb_gideonscourt), 319396, true); }); ListenKill(319396, 1, new Advance()); }) @@ -408,9 +421,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //destroy orb - this.Game.AddOnLoadAction(338891, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_westm_deathorb_gideonscourt, () => { - setActorOperable(this.Game.GetWorld(338891), 375106, true); + setActorOperable(this.Game.GetWorld(WorldSno.x1_westm_deathorb_gideonscourt), 375106, true); }); ListenKill(375106, 1, new Advance()); }) @@ -423,15 +436,16 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 30, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { + var world = this.Game.GetWorld(WorldSno.x1_westm_deathorb_gideonscourt); //destroy effects - foreach (var act in this.Game.GetWorld(338891).GetActorsBySNO(316810)) act.Destroy(); - foreach (var act in this.Game.GetWorld(338891).GetActorsBySNO(324508)) act.Destroy(); - foreach (var Myst in this.Game.GetWorld(338891).GetActorsBySNO(175310)) //Mystic_NonGlobalFollower + foreach (var act in world.GetActorsBySNO(316810)) act.Destroy(); + foreach (var act in world.GetActorsBySNO(324508)) act.Destroy(); + foreach (var Myst in world.GetActorsBySNO(175310)) //Mystic_NonGlobalFollower { Myst.Hidden = true; Myst.SetVisible(false); } - foreach (var Myst in this.Game.GetWorld(338891).GetActorsBySNO(339463)) //Mystic_EnchanceEvent + foreach (var Myst in world.GetActorsBySNO(339463)) //Mystic_EnchanceEvent { Myst.Hidden = true; Myst.SetVisible(false); @@ -451,19 +465,20 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk to Mystic - this.Game.AddOnLoadAction(338891, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_westm_deathorb_gideonscourt, () => { if (this.Game.CurrentQuest == 284683 && this.Game.CurrentStep == 30) { - var Mysts = this.Game.GetWorld(338891).GetActorsBySNO(61524); + var world = this.Game.GetWorld(WorldSno.x1_westm_deathorb_gideonscourt); + var Mysts = world.GetActorsBySNO(61524); if (Mysts.Count < 1) - Mysts.Add(this.Game.GetWorld(338891).SpawnMonster(61524, new Vector3D(385.6301f,289.3048f,-18.602905f))); + Mysts.Add(world.SpawnMonster(61524, new Vector3D(385.6301f,289.3048f,-18.602905f))); //foreach (var Myst in World.GetActorsBySNO(175310)) ;//175310 //StartConversation(this.Game.GetWorld(338891), 305750); foreach (var Myst in Mysts) //PT_Mystic_NoVendor { - this.Game.GetWorld(338891).BroadcastIfRevealed(plr => new MessageSystem.Message.Definitions.ACD.ACDTranslateFacingMessage + world.BroadcastIfRevealed(plr => new MessageSystem.Message.Definitions.ACD.ACDTranslateFacingMessage { ActorId = Myst.DynamicID(plr), Angle = ActorSystem.Movement.MovementHelpers.GetFacingAngle(Myst, plr), @@ -492,24 +507,25 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //exit alley - this.Game.AddOnLoadAction(338891, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_westm_deathorb_gideonscourt, () => { - foreach (var Myst in this.Game.GetWorld(338891).GetActorsBySNO(175310)) //Mystic_NonGlobalFollower + var world = this.Game.GetWorld(WorldSno.x1_westm_deathorb_gideonscourt); + foreach (var Myst in world.GetActorsBySNO(175310)) //Mystic_NonGlobalFollower { Myst.Hidden = true; Myst.SetVisible(false); } - foreach (var Myst in this.Game.GetWorld(338891).GetActorsBySNO(339463)) //Mystic_EnchanceEvent + foreach (var Myst in world.GetActorsBySNO(339463)) //Mystic_EnchanceEvent { Myst.Hidden = true; Myst.SetVisible(false); } - foreach (var Myst in this.Game.GetWorld(338891).GetActorsBySNO(61524)) //PT_Mystic_NoVendor + foreach (var Myst in world.GetActorsBySNO(61524)) //PT_Mystic_NoVendor { Myst.Hidden = true; Myst.SetVisible(false); } - foreach (var Malt in this.Game.GetWorld(338891).GetActorsBySNO(373456)) + foreach (var Malt in world.GetActorsBySNO(373456)) { bool Activated = false; @@ -521,8 +537,8 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Malt.Attributes[GameAttribute.Disabled] = !Activated; Malt.Attributes[GameAttribute.Immunity] = !Activated; } - Open(this.Game.GetWorld(338891), 319830); - AddFollower(this.Game.GetWorld(338891), 175310); + Open(world, 319830); + AddFollower(world, 175310); }); ListenTeleport(338946, new AdvanceWithNotify()); }) @@ -540,7 +556,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem if (!this.Game.Empty) { DestroyFollower(175310); - AddFollower(this.Game.GetWorld(338891), 175310); + AddFollower(this.Game.GetWorld(WorldSno.x1_westm_deathorb_gideonscourt), 175310); } }) }); @@ -554,19 +570,20 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //destroy bodies UnlockTeleport(2); - this.Game.AddOnLoadAction(339151, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_westm_deathorb_kerwinsrow, () => { if (this.Game.CurrentQuest == 284683 && this.Game.CurrentStep == 49) { - setActorOperable(this.Game.GetWorld(339151), 336383, false); - setActorOperable(this.Game.GetWorld(339151), 375111, false); + var world = this.Game.GetWorld(WorldSno.x1_westm_deathorb_kerwinsrow); + setActorOperable(world, 336383, false); + setActorOperable(world, 375111, false); } }); ListenKill(316839, 6, new Advance()); if (!this.Game.Empty) { DestroyFollower(175310); - AddFollower(this.Game.GetWorld(338891), 175310); + AddFollower(this.Game.GetWorld(WorldSno.x1_westm_deathorb_gideonscourt), 175310); } }) }); @@ -579,15 +596,15 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //slay guardian - this.Game.AddOnLoadAction(339151, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_westm_deathorb_kerwinsrow, () => { - setActorOperable(this.Game.GetWorld(339151), 336383, true); + setActorOperable(this.Game.GetWorld(WorldSno.x1_westm_deathorb_kerwinsrow), 336383, true); }); ListenKill(336383, 1, new Advance()); if (!this.Game.Empty) { DestroyFollower(175310); - AddFollower(this.Game.GetWorld(338891), 175310); + AddFollower(this.Game.GetWorld(WorldSno.x1_westm_deathorb_gideonscourt), 175310); } }) }); @@ -600,15 +617,15 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //destroy final orb - this.Game.AddOnLoadAction(339151, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_westm_deathorb_kerwinsrow, () => { - setActorOperable(this.Game.GetWorld(339151), 375111, true); + setActorOperable(this.Game.GetWorld(WorldSno.x1_westm_deathorb_kerwinsrow), 375111, true); }); ListenKill(375111, 1, new Advance()); if (!this.Game.Empty) { DestroyFollower(175310); - AddFollower(this.Game.GetWorld(338891), 175310); + AddFollower(this.Game.GetWorld(WorldSno.x1_westm_deathorb_gideonscourt), 175310); } }) }); @@ -626,7 +643,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem if (!this.Game.Empty) { DestroyFollower(175310); - AddFollower(this.Game.GetWorld(338891), 175310); + AddFollower(this.Game.GetWorld(WorldSno.x1_westm_deathorb_gideonscourt), 175310); } }) }); @@ -728,9 +745,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk to Malthael spirit - this.Game.AddOnLoadAction(308446, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_urzael_arena, () => { - var malthael = this.Game.GetWorld(308446).SpawnMonster(256248, new Vector3D { X = 97.65f, Y = 350.23f, Z = 0.1f }); + var malthael = this.Game.GetWorld(WorldSno.x1_urzael_arena).SpawnMonster(256248, new Vector3D { X = 97.65f, Y = 350.23f, Z = 0.1f }); malthael.NotifyConversation(1); }); this.Game.CurrentEncounter.activated = false; @@ -792,20 +809,21 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem }); this.Game.QuestManager.Quests[257120].Steps.Add(67, new QuestStep - { + { Completed = false, Saveable = false, NextStep = 65, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - //find entrance - //DisableArrow(this.Game.GetWorld(304235), target); - this.Game.AddOnLoadAction(304235, () => + //find entrance + //DisableArrow(this.Game.GetWorld(304235), target); + var westmarchWorld = this.Game.GetWorld(WorldSno.x1_westmarch_hub); + this.Game.AddOnLoadWorldAction(WorldSno.x1_westmarch_hub, () => { - this.Game.GetWorld(304235).BroadcastGlobal(plr => new MessageSystem.Message.Definitions.Map.MapMarkerInfoMessage() + westmarchWorld.BroadcastGlobal(plr => new MessageSystem.Message.Definitions.Map.MapMarkerInfoMessage() { HashedName = DiIiS_NA.Core.Helpers.Hash.StringHashHelper.HashItemName("QuestMarker"), - Place = new MessageSystem.Message.Fields.WorldPlace { Position = new Vector3D(435.1377f, 439.43f, -0.96f), WorldID = this.Game.GetWorld(304235).GlobalID }, + Place = new MessageSystem.Message.Fields.WorldPlace { Position = new Vector3D(435.1377f, 439.43f, -0.96f), WorldID = westmarchWorld.GlobalID }, ImageInfo = 81058, Label = -1, snoStringList = -1, @@ -819,17 +837,18 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem PlayerUseFlags = 0 }); }); - - ListenProximity(341337, new LaunchConversation(345820)); - ListenConversation(345820, new AdvanceWithNotify()); - AddFollower(this.Game.GetWorld(304235), 284530); - StartConversation(this.Game.GetWorld(304235), 305750); - this.Game.AddOnLoadAction(282460, () => + + ListenProximity(341337, new LaunchConversation(345820)); + ListenConversation(345820, new AdvanceWithNotify()); + AddFollower(westmarchWorld, 284530); + StartConversation(westmarchWorld, 305750); + this.Game.AddOnLoadWorldAction(WorldSno.x1_bog_adriaritual, () => { - this.Game.GetWorld(282460).BroadcastGlobal(plr => new MessageSystem.Message.Definitions.Map.MapMarkerInfoMessage() + var world = this.Game.GetWorld(WorldSno.x1_bog_adriaritual); + world.BroadcastGlobal(plr => new MessageSystem.Message.Definitions.Map.MapMarkerInfoMessage() { HashedName = DiIiS_NA.Core.Helpers.Hash.StringHashHelper.HashItemName("QuestMarker"), - Place = new MessageSystem.Message.Fields.WorldPlace { Position = new Vector3D(435.1377f, 439.43f, -0.96f), WorldID = this.Game.GetWorld(304235).GlobalID }, + Place = new MessageSystem.Message.Fields.WorldPlace { Position = new Vector3D(435.1377f, 439.43f, -0.96f), WorldID = westmarchWorld.GlobalID }, ImageInfo = 81058, Label = -1, snoStringList = -1, @@ -842,7 +861,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem IsPing = false, PlayerUseFlags = 0 }); - setActorOperable(this.Game.GetWorld(282460), 340914, false); + setActorOperable(world, 340914, false); }); }) }); @@ -855,14 +874,14 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill mobs - this.Game.AddOnLoadAction(282460, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_bog_adriaritual, () => { script = new WavedInvasion(new Vector3D { X = 101.62f, Y = 105.97f, Z = 0.1f }, 30f, new List { 356157, 356160 }, 356380); - script.Execute(this.Game.GetWorld(282460)); + script.Execute(this.Game.GetWorld(WorldSno.x1_bog_adriaritual)); }); ListenKill(356380, 1, new Advance()); DestroyFollower(284530); - AddFollower(this.Game.GetWorld(304235), 284530); + AddFollower(this.Game.GetWorld(WorldSno.x1_westmarch_hub), 284530); }) }); @@ -874,13 +893,13 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find Nephalem Guidestone - this.Game.AddOnLoadAction(282460, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_bog_adriaritual, () => { - Open(this.Game.GetWorld(282460), 340914); + Open(this.Game.GetWorld(WorldSno.x1_bog_adriaritual), 340914); }); ListenProximity(346878, new AdvanceWithNotify()); DestroyFollower(284530); - AddFollower(this.Game.GetWorld(304235), 284530); + AddFollower(this.Game.GetWorld(WorldSno.x1_westmarch_hub), 284530); }) }); @@ -895,7 +914,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem UnlockTeleport(4); ListenInteract(346878, 1, new Advance()); DestroyFollower(284530); - AddFollower(this.Game.GetWorld(304235), 284530); + AddFollower(this.Game.GetWorld(WorldSno.x1_westmarch_hub), 284530); }) }); @@ -907,16 +926,17 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find catacombs - + var world = this.Game.GetWorld(WorldSno.x1_bog_adriaritual); + Portal Dest = null; - foreach (Portal prtl in this.Game.GetWorld(282460).GetActorsBySNO(176007)) - if (prtl.Destination.WorldSNO == 283552) Dest = prtl; + foreach (Portal prtl in world.GetActorsBySNO(176007)) + if (prtl.Destination.WorldSNO == (int)WorldSno.x1_catacombs_level01) Dest = prtl; if (Dest != null) - this.Game.GetWorld(282460).BroadcastGlobal(plr => new MessageSystem.Message.Definitions.Map.MapMarkerInfoMessage() + world.BroadcastGlobal(plr => new MessageSystem.Message.Definitions.Map.MapMarkerInfoMessage() { HashedName = DiIiS_NA.Core.Helpers.Hash.StringHashHelper.HashItemName("QuestMarker"), - Place = new MessageSystem.Message.Fields.WorldPlace { Position = Dest.Position, WorldID = this.Game.GetWorld(282460).GlobalID }, + Place = new MessageSystem.Message.Fields.WorldPlace { Position = Dest.Position, WorldID = world.GlobalID }, ImageInfo = 81058, Label = -1, snoStringList = -1, @@ -942,16 +962,17 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //search tomb - + var world = this.Game.GetWorld(WorldSno.x1_bog_adriaritual); + Portal Dest = null; - foreach (Portal prtl in this.Game.GetWorld(282460).GetActorsBySNO(176007)) - if (prtl.Destination.WorldSNO == 283552) Dest = prtl; + foreach (Portal prtl in world.GetActorsBySNO(176007)) + if (prtl.Destination.WorldSNO == (int)WorldSno.x1_catacombs_level01) Dest = prtl; if (Dest != null) - this.Game.GetWorld(282460).BroadcastGlobal(plr => new MessageSystem.Message.Definitions.Map.MapMarkerInfoMessage() + world.BroadcastGlobal(plr => new MessageSystem.Message.Definitions.Map.MapMarkerInfoMessage() { HashedName = DiIiS_NA.Core.Helpers.Hash.StringHashHelper.HashItemName("QuestMarker"), - Place = new MessageSystem.Message.Fields.WorldPlace { Position = Dest.Position, WorldID = this.Game.GetWorld(282460).GlobalID }, + Place = new MessageSystem.Message.Fields.WorldPlace { Position = Dest.Position, WorldID = world.GlobalID }, ImageInfo = 81058, Label = -1, snoStringList = -1, @@ -1006,8 +1027,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //talk to Lorath this.Game.CurrentEncounter.activated = false; + var world = this.Game.GetWorld(WorldSno.x1_adria_boss_arena_02); - foreach (var Myst in this.Game.GetWorld(297771).GetActorsBySNO(284530)) //284530 + foreach (var Myst in world.GetActorsBySNO(284530)) //284530 { AddQuestConversation(Myst, 260191); (Myst as InteractiveNPC).Conversations.Clear(); @@ -1017,9 +1039,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem (Myst as InteractiveNPC).ForceConversationSNO = 260191; } - this.Game.AddOnLoadAction(297771, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_adria_boss_arena_02, () => { - this.Game.GetWorld(297771).GetActorBySNO(284530).NotifyConversation(1); + world.GetActorBySNO(284530).NotifyConversation(1); }); this.Game.CurrentEncounter.activated = false; @@ -1036,7 +1058,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk to Tyrael - foreach (var Myst in this.Game.GetWorld(297771).GetActorsBySNO(284530)) //284530 + foreach (var Myst in this.Game.GetWorld(WorldSno.x1_adria_boss_arena_02).GetActorsBySNO(284530)) //284530 { (Myst as InteractiveNPC).Conversations.Clear(); (Myst as InteractiveNPC).Attributes[GameAttribute.Conversation_Icon, 0] = 1; @@ -1106,9 +1128,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk to Imperius - this.Game.AddOnLoadAction(339160, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_heaven_pandemonium_portal, () => { - this.Game.GetWorld(339160).GetActorBySNO(368315).NotifyConversation(1); + this.Game.GetWorld(WorldSno.x1_heaven_pandemonium_portal).GetActorBySNO(368315).NotifyConversation(1); }); ListenInteract(368315, 1, new LaunchConversation(361192)); ListenConversation(361192, new Advance()); @@ -1161,31 +1183,32 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //cork for Imperius - this.Game.AddOnLoadAction(291941, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_pand_ext_gateoverlook, () => { if (this.Game.CurrentQuest == 273790 && this.Game.CurrentStep == 35) { script = new Advance(); - script.Execute(this.Game.GetWorld(291941)); + script.Execute(this.Game.GetWorld(WorldSno.x1_pand_ext_gateoverlook)); } }); }) }); this.Game.QuestManager.Quests[273790].Steps.Add(41, new QuestStep - { + { Completed = false, Saveable = true, NextStep = 1, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - //reach Imperius - ListenInteract(275409, 1, new LaunchConversation(361245)); - ListenConversation(361245, new Advance()); - this.Game.AddOnLoadAction(291941, () => + //reach Imperius + ListenInteract(275409, 1, new LaunchConversation(361245)); + ListenConversation(361245, new Advance()); + this.Game.AddOnLoadWorldAction(WorldSno.x1_pand_ext_gateoverlook, () => { - if (this.Game.GetWorld(291941).GetActorBySNO(275409, true) != null) - this.Game.GetWorld(291941).GetActorBySNO(275409, true).NotifyConversation(1); + var world = this.Game.GetWorld(WorldSno.x1_pand_ext_gateoverlook); + if (world.GetActorBySNO(275409, true) != null) + world.GetActorBySNO(275409, true).NotifyConversation(1); }); }) }); @@ -1215,20 +1238,21 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem }); this.Game.QuestManager.Quests[273790].Steps.Add(11, new QuestStep - { + { Completed = false, Saveable = true, NextStep = 43, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - //talk to Imperius - ListenInteract(275409, 1, new LaunchConversation(361252)); - ListenConversation(361252, new LaunchConversation(361275)); - ListenConversation(361275, new Advance()); - this.Game.AddOnLoadAction(291941, () => + //talk to Imperius + ListenInteract(275409, 1, new LaunchConversation(361252)); + ListenConversation(361252, new LaunchConversation(361275)); + ListenConversation(361275, new Advance()); + this.Game.AddOnLoadWorldAction(WorldSno.x1_pand_ext_gateoverlook, () => { - if (this.Game.GetWorld(291941).GetActorBySNO(275409, true) != null) - this.Game.GetWorld(291941).GetActorBySNO(275409, true).NotifyConversation(1); + var world = this.Game.GetWorld(WorldSno.x1_pand_ext_gateoverlook); + if (world.GetActorBySNO(275409, true) != null) + world.GetActorBySNO(275409, true).NotifyConversation(1); }); }) }); @@ -1280,9 +1304,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem //talk to Tyrael ListenInteract(290323, 1, new LaunchConversation(346540)); ListenConversation(346540, new Advance()); - this.Game.AddOnLoadAction(339254, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_pand_ext_batteringram_entrance_a, () => { - this.Game.GetWorld(339254).GetActorBySNO(290323).NotifyConversation(1); + this.Game.GetWorld(WorldSno.x1_pand_ext_batteringram_entrance_a).GetActorBySNO(290323).NotifyConversation(1); }); }) }); @@ -1323,14 +1347,14 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem //Board Ram UnlockTeleport(9); ListenTeleport(295228, new Advance()); - var RamWorld = this.Game.GetWorld(295225); + var RamWorld = this.Game.GetWorld(WorldSno.x1_pand_batteringram); RamWorld.GetActorBySNO(376686).Hidden = true; RamWorld.GetActorBySNO(376686).SetVisible(false); RamWorld.GetActorBySNO(345259).Hidden = true; RamWorld.GetActorBySNO(345259).SetVisible(false); RamWorld.GetActorBySNO(323353).Hidden = true; RamWorld.GetActorBySNO(323353).SetVisible(false); - this.Game.AddOnLoadAction(295225, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_pand_batteringram, () => { RamWorld.GetActorBySNO(176002).SetVisible(false); foreach (var plr in this.Game.Players.Values) @@ -1358,9 +1382,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //breach phase ListenKill(340920, 2, new Advance()); - this.Game.AddOnLoadAction(295225, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_pand_batteringram, () => { - setActorVisible(this.Game.GetWorld(295225), 358946, false); + setActorVisible(this.Game.GetWorld(WorldSno.x1_pand_batteringram), 358946, false); }); }) }); @@ -1374,10 +1398,10 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //Fight Ram Boss ListenKill(358946, 1, new Advance()); - this.Game.AddOnLoadAction(295225, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_pand_batteringram, () => { if (this.Game.CurrentQuest == 269552) - setActorVisible(this.Game.GetWorld(295225), 358946, true); + setActorVisible(this.Game.GetWorld(WorldSno.x1_pand_batteringram), 358946, true); }); }) }); @@ -1391,14 +1415,14 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //Finish the Gate - this.Game.AddOnLoadAction(295225, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_pand_batteringram, () => { if (this.Game.CurrentQuest == 269552) { //Должен быть Удар 1! //{ 70176 = 334746} //Удар 1 script = new FirstWaveRam(); - script.Execute(this.Game.GetWorld(295225)); + script.Execute(this.Game.GetWorld(WorldSno.x1_pand_batteringram)); } }); //После волны - Удар 2! @@ -1421,11 +1445,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //enter Breach - var RamWorld = this.Game.GetWorld(295225); + var RamWorld = this.Game.GetWorld(WorldSno.x1_pand_batteringram); this.Game.CurrentEncounter.activated = false; ListenTeleport(271234, new Advance()); - this.Game.AddOnLoadAction(295225, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_pand_batteringram, () => { RamWorld.GetActorBySNO(176002).SetVisible(true); foreach (var plr in this.Game.Players.Values) @@ -1436,7 +1460,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem RamWorld.GetActorBySNO(295438).SetIdleAnimation(360069); //RamWorld.GetActorBySNO(295438).PlayActionAnimation(299978); //Open(this.Game.GetWorld(295225), 345259); - Open(this.Game.GetWorld(295225), 295438); + Open(RamWorld, 295438); }); }) }); @@ -1469,22 +1493,25 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem }); this.Game.QuestManager.Quests[273408].Steps.Add(30, new QuestStep - { + { Completed = false, Saveable = true, NextStep = 12, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //FortressIntroTyrael + var world = this.Game.GetWorld(WorldSno.x1_fortress_level_01); - AddQuestConversation(this.Game.GetWorld(271233).GetActorBySNO(6353), 302646); - //ListenProximity(6353, new LaunchConversation(302646)); - ListenConversation(302646, new Advance()); - this.Game.AddOnLoadAction(271233, () => + AddQuestConversation(world.GetActorBySNO(6353), 302646); + //ListenProximity(6353, new LaunchConversation(302646)); + ListenConversation(302646, new Advance()); + this.Game.AddOnLoadWorldAction(WorldSno.x1_fortress_level_01, () => { if (this.Game.CurrentQuest == 273408 && this.Game.CurrentStep == 30) - this.Game.GetWorld(271233).GetActorBySNO(6353).NotifyConversation(1); - }); + { + world.GetActorBySNO(6353).NotifyConversation(1); + } + }); }) }); @@ -1496,7 +1523,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //Spirit Well 1 - RemoveConversations(this.Game.GetWorld(271233).GetActorBySNO(6353)); + RemoveConversations(this.Game.GetWorld(WorldSno.x1_fortress_level_01).GetActorBySNO(6353)); UnlockTeleport(10); ListenInteract(308737, 1, new LaunchConversation(335174)); ListenInteract(314802, 1, new LaunchConversation(336672)); @@ -1548,9 +1575,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem OnAdvance = new Action(() => { //Kill Death Maiden ListenKill(360241, 1, new Advance()); - this.Game.AddOnLoadAction(271235, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_fortress_level_02, () => { - setActorOperable(this.Game.GetWorld(271235), 347276, false); + setActorOperable(this.Game.GetWorld(WorldSno.x1_fortress_level_02), 347276, false); }); }) }); @@ -1565,9 +1592,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem //Destroy Soul Prison UnlockTeleport(11); ListenKill(347276, 1, new Advance()); - this.Game.AddOnLoadAction(271235, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_fortress_level_02, () => { - setActorOperable(this.Game.GetWorld(271235), 347276, true); + setActorOperable(this.Game.GetWorld(WorldSno.x1_fortress_level_02), 347276, true); }); }) }); @@ -1625,9 +1652,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem //plr.InGameClient.SendMessage(new AdventureModeUnlockedMessage()); } } - this.Game.AddOnLoadAction(328484, () => + this.Game.AddOnLoadWorldAction(WorldSno.x1_malthael_boss_arena, () => { - this.Game.GetWorld(328484).GetActorBySNO(6353).NotifyConversation(1); + this.Game.GetWorld(WorldSno.x1_malthael_boss_arena).GetActorBySNO(6353).NotifyConversation(1); }); }) }); diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/Events.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/Events.cs index e1cec93..0c756e8 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/Events.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/Events.cs @@ -2,6 +2,7 @@ using DiIiS_NA.Core.Helpers.Math; //Blizzless Project 2022 using DiIiS_NA.Core.Logging; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; //Blizzless Project 2022 using DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations; //Blizzless Project 2022 @@ -107,9 +108,10 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 4, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - StartConversation(this.Game.GetWorld(71150), 60182); - if (this.Game.Players.Count > 0) - this.Game.GetWorld(71150).SpawnMonster(260231, this.Game.Players.First().Value.Position); + var world = this.Game.GetWorld(WorldSno.trout_town); + StartConversation(world, 60182); + if (!Game.Players.IsEmpty) + world.SpawnMonster(260231, this.Game.Players.First().Value.Position); ListenKill(260231, 1, new SideAdvance()); }) }); @@ -120,7 +122,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = -1, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { - StartConversation(this.Game.GetWorld(71150), 60184); + StartConversation(this.Game.GetWorld(WorldSno.trout_town), 60184); }) }); #endregion @@ -147,8 +149,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 3, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //defend yourself - script = new Invasion(this.Game.GetWorld(71150).Players.First().Value.Position, 50f, new List { 5395, 5347 }, 30f, 112134, false); - script.Execute(this.Game.GetWorld(71150)); + var world = this.Game.GetWorld(WorldSno.trout_town); + script = new Invasion(world.Players.First().Value.Position, 50f, new List { 5395, 5347 }, 30f, 112134, false); + script.Execute(world); ListenKill(112134, 3, new SideAdvance()); //mob skeleton }) }); @@ -185,7 +188,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 3, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //escape to treasure room - SetQuestTimer(120396, 180f, this.Game.GetWorld(50596), new SideAbandon()); + SetQuestTimer(120396, 180f, this.Game.GetWorld(WorldSno.a2dun_zolt_timed01_level01), new SideAbandon()); ListenTeleport(168200, new SideAdvance()); }) }); @@ -236,8 +239,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 12, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill shamans - script = new Invasion(this.Game.GetWorld(71150).GetActorBySNO(223597).Position, 30f, new List { 81618, 81090 }, 15f, 81093, false); - script.Execute(this.Game.GetWorld(71150)); + var world = this.Game.GetWorld(WorldSno.trout_town); + script = new Invasion(world.GetActorBySNO(223597).Position, 30f, new List { 81618, 81090 }, 15f, 81093, false); + script.Execute(world); ListenKill(81093, 1, new SideAdvance()); //mob shaman }) }); @@ -260,7 +264,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 2, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //Kill gharbad - (this.Game.GetWorld(71150).GetActorBySNO(81068) as Gharbad).Resurrect(); + (this.Game.GetWorld(WorldSno.trout_town).GetActorBySNO(81068) as Gharbad).Resurrect(); ListenKill(81342, 1, new SideAdvance()); }) }); @@ -310,7 +314,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 17, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find Idol - AddFollower(this.Game.GetWorld(2812), 2935); + AddFollower(this.Game.GetWorld(WorldSno.a2c2dun_zolt_treasurehunter), 2935); ListenProximity(4522, new SideAdvance()); }) }); @@ -322,7 +326,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 19, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //get idol - StartConversation(this.Game.GetWorld(2812), 18038); + StartConversation(this.Game.GetWorld(WorldSno.a2c2dun_zolt_treasurehunter), 18038); ListenInteract(307, 1, new SideAdvance()); }) }); @@ -334,7 +338,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 2, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //stop ambush - foreach (var spawner in this.Game.GetWorld(2812).GetActorsBySNO(54571)) + foreach (var spawner in this.Game.GetWorld(WorldSno.a2c2dun_zolt_treasurehunter).GetActorsBySNO(54571)) { spawner.World.SpawnMonster(5367, spawner.Position); } @@ -376,9 +380,10 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 18, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find lever - setActorOperable(this.Game.GetWorld(158593), 207615, false); - var spots = this.Game.GetWorld(158593).GetActorsBySNO(3461); - this.Game.GetWorld(158593).SpawnMonster(219879, spots[FastRandom.Instance.Next(spots.Count())].Position); + var world = this.Game.GetWorld(WorldSno.a2dun_aqd_oasis_randomfacepuzzle_large); + setActorOperable(world, 207615, false); + var spots = world.GetActorsBySNO(3461); + world.SpawnMonster(219879, spots[FastRandom.Instance.Next(spots.Count)].Position); ListenInteract(219879, 1, new SideAdvance()); }) }); @@ -390,7 +395,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 20, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //enter vault - setActorOperable(this.Game.GetWorld(158593), 207615, true); + setActorOperable(this.Game.GetWorld(WorldSno.a2dun_aqd_oasis_randomfacepuzzle_large), 207615, true); ListenInteract(207615, 1, new SideAdvance()); }) }); @@ -407,18 +412,19 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem }); this.Game.QuestManager.SideQuests[158596].Steps.Add(22, new QuestStep - { + { Completed = false, Saveable = false, NextStep = 3, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill unique - foreach (var spawner in this.Game.GetWorld(158593).GetActorsBySNO(219919)) + var world = this.Game.GetWorld(WorldSno.a2dun_aqd_oasis_randomfacepuzzle_large); + foreach (var spawner in world.GetActorsBySNO(219919)) { spawner.World.SpawnMonster(4198, spawner.Position); } - this.Game.GetWorld(158593).SpawnMonster(207605, this.Game.GetWorld(158593).GetActorBySNO(219918).Position); - ListenKill(207605, 1, new SideAdvance()); + world.SpawnMonster(207605, world.GetActorBySNO(219918).Position); + ListenKill(207605, 1, new SideAdvance()); }) }); @@ -448,16 +454,17 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem }); this.Game.QuestManager.SideQuests[158377].Steps.Add(13, new QuestStep - { + { Completed = false, Saveable = false, NextStep = 17, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //find lever - setActorOperable(this.Game.GetWorld(157882), 153836, false); - var spots = this.Game.GetWorld(157882).GetActorsBySNO(3461); - this.Game.GetWorld(157882).SpawnMonster(219879, spots[FastRandom.Instance.Next(spots.Count())].Position); - ListenInteract(219879, 1, new SideAdvance()); + var world = this.Game.GetWorld(WorldSno.a2dun_aqd_oasis_randomfacepuzzle_small); + setActorOperable(world, 153836, false); + var spots = world.GetActorsBySNO(3461); + world.SpawnMonster(219879, spots[FastRandom.Instance.Next(spots.Count)].Position); + ListenInteract(219879, 1, new SideAdvance()); }) }); @@ -468,7 +475,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 22, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //enter vault - setActorOperable(this.Game.GetWorld(157882), 153836, true); + setActorOperable(this.Game.GetWorld(WorldSno.a2dun_aqd_oasis_randomfacepuzzle_small), 153836, true); ListenInteract(153836, 1, new SideAdvance()); }) }); @@ -491,11 +498,12 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 3, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //kill unique - foreach (var spawner in this.Game.GetWorld(157882).GetActorsBySNO(219901)) + var world = this.Game.GetWorld(WorldSno.a2dun_aqd_oasis_randomfacepuzzle_small); + foreach (var spawner in world.GetActorsBySNO(219901)) { spawner.World.SpawnMonster(4104, spawner.Position); } - this.Game.GetWorld(157882).SpawnMonster(203795, this.Game.GetWorld(157882).GetActorBySNO(219885).Position); + world.SpawnMonster(203795, world.GetActorBySNO(219885).Position); ListenKill(203795, 1, new SideAdvance()); }) }); @@ -822,7 +830,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 3, Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { //talk with Tyrael - var TristHab = this.Game.GetWorld(332336); + var TristHab = this.Game.GetWorld(WorldSno.x1_tristram_adventure_mode_hub); var Tyrael = TristHab.GetActorBySNO(114622) as ActorSystem.InteractiveNPC; if (Tyrael != null) { diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/OpenWorld.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/OpenWorld.cs index be444a3..89922fc 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/OpenWorld.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/OpenWorld.cs @@ -1,5 +1,6 @@ //Blizzless Project 2022 using DiIiS_NA.Core.Logging; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; //Blizzless Project 2022 using DiIiS_NA.GameServer.Core.Types.Math; //Blizzless Project 2022 @@ -46,21 +47,23 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem Objectives = new List { new Objective { Limit = 1, Counter = 0 } }, OnAdvance = new Action(() => { script = new CryptPortals(); - script.Execute(this.Game.GetWorld(71150)); - this.Game.AddOnLoadAction(182976, () => { this.Game.GetWorld(182976).SpawnMonster(51341, new Vector3D { X = 149.439f, Y = 121.452f, Z = 13.794f }); });//spawn spider queen - this.Game.AddOnLoadAction(78839, () => { this.Game.GetWorld(78839).SpawnMonster(3526, new Vector3D { X = 93.022f, Y = 89.86f, Z = 0.1f }); });//spawn Butcher - this.Game.AddOnLoadAction(214956, () => { this.Game.GetWorld(214956).SpawnMonster(148449, new Vector3D { X = 585.439f, Y = 560.823f, Z = 0.1f }); });//spawn Izual + script.Execute(this.Game.GetWorld(WorldSno.trout_town)); + this.Game.AddOnLoadWorldAction(WorldSno.a1dun_spidercave_02, () => { this.Game.GetWorld(WorldSno.a1dun_spidercave_02).SpawnMonster(51341, new Vector3D { X = 149.439f, Y = 121.452f, Z = 13.794f }); });//spawn spider queen + this.Game.AddOnLoadWorldAction(WorldSno.trdun_butcherslair_02, () => { this.Game.GetWorld(WorldSno.trdun_butcherslair_02).SpawnMonster(3526, new Vector3D { X = 93.022f, Y = 89.86f, Z = 0.1f }); });//spawn Butcher + this.Game.AddOnLoadWorldAction(WorldSno.a4dun_spire_exterior, () => { this.Game.GetWorld(WorldSno.a4dun_spire_exterior).SpawnMonster(148449, new Vector3D { X = 585.439f, Y = 560.823f, Z = 0.1f }); });//spawn Izual //this.Game.AddOnLoadAction(109984, () => { foreach (var giz in this.Game.GetWorld(109894).GetActorsBySNO(180254)) giz.Destroy(); });//destroy walls for Belial - this.Game.GetWorld(109513).SpawnMonster(6442, new Vector3D { X = 931.48f, Y = 1172.24f, Z = -14.7f }); //waypoint - this.Game.AddOnLoadAction(121214, () => + this.Game.GetWorld(WorldSno.a4dun_garden_of_hope_01).SpawnMonster(6442, new Vector3D { X = 931.48f, Y = 1172.24f, Z = -14.7f }); //waypoint + this.Game.AddOnLoadWorldAction(WorldSno.a3dun_azmodan_arena, () => { - try { this.Game.GetWorld(121214).GetActorBySNO(89690).Destroy(); } catch { }; - this.Game.GetWorld(121214).SpawnMonster(89690, new Vector3D { X = 395.553f, Y = 394.966f, Z = 0.1f }); + var world = this.Game.GetWorld(WorldSno.a3dun_azmodan_arena); + try { world.GetActorBySNO(89690).Destroy(); } catch { }; + world.SpawnMonster(89690, new Vector3D { X = 395.553f, Y = 394.966f, Z = 0.1f }); }); //spawn Azmodan - this.Game.AddOnLoadAction(226713, () => + this.Game.AddOnLoadWorldAction(WorldSno.a3_battlefields_03, () => { - try { this.Game.GetWorld(226713).GetActorBySNO(96192).Destroy(); } catch { } - this.Game.GetWorld(226713).SpawnMonster(96192, new Vector3D { X = 396.565f, Y = 366.167f, Z = 0.1f }); + var world = this.Game.GetWorld(WorldSno.a3_battlefields_03); + try { world.GetActorBySNO(96192).Destroy(); } catch { } + world.SpawnMonster(96192, new Vector3D { X = 396.565f, Y = 366.167f, Z = 0.1f }); }); //spawn Siegebreaker }) diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/AttackTownBoominHome.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/AttackTownBoominHome.cs index c8cd243..342042f 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/AttackTownBoominHome.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/AttackTownBoominHome.cs @@ -27,8 +27,6 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations.A public override void Execute(MapSystem.World world) { - var encWorld = world.Game.GetWorld(194933); - var Leah = world.GetActorBySNO(121208); Leah.Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f; diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/AttackTownKilled.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/AttackTownKilled.cs index c771b03..173ec3f 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/AttackTownKilled.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/AttackTownKilled.cs @@ -1,5 +1,6 @@ //Blizzless Project 2022 using DiIiS_NA.Core.Logging; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; //Blizzless Project 2022 using DiIiS_NA.GameServer.MessageSystem; //Blizzless Project 2022 @@ -27,9 +28,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations public override void Execute(MapSystem.World world) { - var encWorld = world.Game.GetWorld(194933); - - var AttackedTown = world.Game.GetWorld(72882); + var AttackedTown = world.Game.GetWorld(WorldSno.trout_townattack); var Maghda = AttackedTown.GetActorBySNO(129345); if (Maghda == null) Maghda = AttackedTown.SpawnMonster(129345, new Core.Types.Math.Vector3D(580f,563f,70f)); diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/CryptPortals.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/CryptPortals.cs index 6e4f713..63e2e73 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/CryptPortals.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/CryptPortals.cs @@ -30,6 +30,7 @@ using DiIiS_NA.GameServer.Core.Types.TagMap; using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Animation; //Blizzless Project 2022 using DiIiS_NA.GameServer.MessageSystem.Message.Fields; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations { @@ -50,9 +51,9 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations };*/ private static readonly List PortalDests = new List { - new ResolvedPortalDestination{ WorldSNO = 72636, DestLevelAreaSNO = 145182, StartingPointActorTag = 172 }, - new ResolvedPortalDestination{ WorldSNO = 72637, DestLevelAreaSNO = 145182, StartingPointActorTag = 172 }, - new ResolvedPortalDestination{ WorldSNO = 154587, DestLevelAreaSNO = 145182, StartingPointActorTag = 172 } + new ResolvedPortalDestination{ WorldSNO = (int)WorldSno.trdun_crypt_falsepassage_01, DestLevelAreaSNO = 145182, StartingPointActorTag = 172 }, + new ResolvedPortalDestination{ WorldSNO = (int)WorldSno.trdun_crypt_falsepassage_02, DestLevelAreaSNO = 145182, StartingPointActorTag = 172 }, + new ResolvedPortalDestination{ WorldSNO = (int)WorldSno.trdun_crypt_skeletonkingcrown_00, DestLevelAreaSNO = 145182, StartingPointActorTag = 172 } }; public override void Execute(MapSystem.World world) diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/DrownedTemple.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/DrownedTemple.cs index 91efc34..9b613bc 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/DrownedTemple.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/DrownedTemple.cs @@ -1,5 +1,6 @@ //Blizzless Project 2022 using DiIiS_NA.Core.Logging; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; //Blizzless Project 2022 using DiIiS_NA.GameServer.Core.Types.Math; //Blizzless Project 2022 @@ -33,7 +34,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations public override void Execute(MapSystem.World world) { - var DrownedTempleWorld = world.Game.GetWorld(60395); + var DrownedTempleWorld = world.Game.GetWorld(WorldSno.trdun_cave_nephalem_03); List SkeletonsList = new List { }; List Skeletons2List = new List { }; @@ -175,7 +176,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations public override void Execute(MapSystem.World world) { - var DrownedTempleWorld = world.Game.GetWorld(60395); + var DrownedTempleWorld = world.Game.GetWorld(WorldSno.trdun_cave_nephalem_03); List SkeletonsList = new List { }; List Skeletons2List = new List { }; diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/StartSceneinHome.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/StartSceneinHome.cs index fc5449e..59c949c 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/StartSceneinHome.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestEvents/Implementations/Act I/StartSceneinHome.cs @@ -1,5 +1,6 @@ //Blizzless Project 2022 using DiIiS_NA.Core.Logging; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; //Blizzless Project 2022 using DiIiS_NA.GameServer.MessageSystem; //Blizzless Project 2022 @@ -31,7 +32,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents.Implementations { //{[Actor] [Type: ServerProp] SNOId:176900 GlobalId: 1013202487 Position: x:107.497185 y:138.07204 z:7.088848 Name: camera_cainsHouse_leahCloseUp} //{[Actor] [Type: ServerProp] SNOId:175759 GlobalId: 1013202485 Position: x:122.59496 y:131.74234 z:-0.6 Name: emitter_camera} - var encWorld = world.Game.GetWorld(174449); + var encWorld = world.Game.GetWorld(WorldSno.trout_tristram_cainshouse_event); var Maghda = encWorld.GetActorBySNO(211014); Maghda.Attributes[GameAttribute.Hitpoints_Max] = 9000000f; diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestProgress.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestProgress.cs index d600b4d..29e2645 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestProgress.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestProgress.cs @@ -2,6 +2,7 @@ using DiIiS_NA.Core.Helpers.Hash; //Blizzless Project 2022 using DiIiS_NA.Core.Logging; +using DiIiS_NA.D3_GameServer.Core.Types.SNO; //Blizzless Project 2022 using DiIiS_NA.GameServer.GSSystem.ActorSystem; //Blizzless Project 2022 @@ -115,13 +116,13 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem new QuestTrigger { triggerType = DiIiS_NA.Core.MPQ.FileFormats.QuestStepObjectiveType.KillMonster, count = monsterCount, counter = 0, questEvent = qevent }); } - public void ActiveArrow(MapSystem.World world, int snoId, int destworld = -1) + public void ActiveArrow(World world, int snoId, WorldSno destworld = WorldSno.__NONE) { Actor target = null; - if (destworld != -1) + if (destworld != WorldSno.__NONE) { foreach (Portal tar in world.GetActorsBySNO(snoId)) - if (tar.Destination.WorldSNO == destworld) + if (tar.Destination.WorldSNO == (int)destworld) target = tar; } else