diff --git a/scripts/actions/abilities/pets/automaton/arcuballista.lua b/scripts/actions/abilities/pets/automaton/arcuballista.lua index 858ca956379..770f5a6934d 100644 --- a/scripts/actions/abilities/pets/automaton/arcuballista.lua +++ b/scripts/actions/abilities/pets/automaton/arcuballista.lua @@ -6,7 +6,6 @@ local abilityObject = {} abilityObject.onAutomatonAbilityCheck = function(target, automaton, skill) local master = automaton:getMaster() - if not master then return end diff --git a/scripts/actions/abilities/pets/automaton/armor_piercer.lua b/scripts/actions/abilities/pets/automaton/armor_piercer.lua index be2bf6aa5a0..792268bb21d 100644 --- a/scripts/actions/abilities/pets/automaton/armor_piercer.lua +++ b/scripts/actions/abilities/pets/automaton/armor_piercer.lua @@ -6,7 +6,6 @@ local abilityObject = {} abilityObject.onAutomatonAbilityCheck = function(target, automaton, skill) local master = automaton:getMaster() - if not master then return end diff --git a/scripts/actions/abilities/pets/automaton/armor_shatterer.lua b/scripts/actions/abilities/pets/automaton/armor_shatterer.lua index f181823477b..3be58d66d37 100644 --- a/scripts/actions/abilities/pets/automaton/armor_shatterer.lua +++ b/scripts/actions/abilities/pets/automaton/armor_shatterer.lua @@ -6,7 +6,6 @@ local abilityObject = {} abilityObject.onAutomatonAbilityCheck = function(target, automaton, skill) local master = automaton:getMaster() - if not master then return end diff --git a/scripts/actions/abilities/pets/automaton/bone_crusher.lua b/scripts/actions/abilities/pets/automaton/bone_crusher.lua index 269f4aa2b20..8895f72435a 100644 --- a/scripts/actions/abilities/pets/automaton/bone_crusher.lua +++ b/scripts/actions/abilities/pets/automaton/bone_crusher.lua @@ -6,7 +6,6 @@ local abilityObject = {} abilityObject.onAutomatonAbilityCheck = function(target, automaton, skill) local master = automaton:getMaster() - if not master then return end diff --git a/scripts/actions/abilities/pets/automaton/cannibal_blade.lua b/scripts/actions/abilities/pets/automaton/cannibal_blade.lua index fd4fd6f6a1d..e045fe951a2 100644 --- a/scripts/actions/abilities/pets/automaton/cannibal_blade.lua +++ b/scripts/actions/abilities/pets/automaton/cannibal_blade.lua @@ -6,7 +6,6 @@ local abilityObject = {} abilityObject.onAutomatonAbilityCheck = function(target, automaton, skill) local master = automaton:getMaster() - if not master then return end diff --git a/scripts/actions/abilities/pets/automaton/chimera_ripper.lua b/scripts/actions/abilities/pets/automaton/chimera_ripper.lua index 6df878006e8..6053fc177e9 100644 --- a/scripts/actions/abilities/pets/automaton/chimera_ripper.lua +++ b/scripts/actions/abilities/pets/automaton/chimera_ripper.lua @@ -6,7 +6,6 @@ local abilityObject = {} abilityObject.onAutomatonAbilityCheck = function(target, automaton, skill) local master = automaton:getMaster() - if not master then return end diff --git a/scripts/actions/abilities/pets/automaton/daze.lua b/scripts/actions/abilities/pets/automaton/daze.lua index 313ae2fc3bb..fe340c65278 100644 --- a/scripts/actions/abilities/pets/automaton/daze.lua +++ b/scripts/actions/abilities/pets/automaton/daze.lua @@ -6,7 +6,6 @@ local abilityObject = {} abilityObject.onAutomatonAbilityCheck = function(target, automaton, skill) local master = automaton:getMaster() - if not master then return end diff --git a/scripts/actions/abilities/pets/automaton/knockout.lua b/scripts/actions/abilities/pets/automaton/knockout.lua index 74fbedb8658..c89d82b4694 100644 --- a/scripts/actions/abilities/pets/automaton/knockout.lua +++ b/scripts/actions/abilities/pets/automaton/knockout.lua @@ -6,7 +6,6 @@ local abilityObject = {} abilityObject.onAutomatonAbilityCheck = function(target, automaton, skill) local master = automaton:getMaster() - if not master then return end diff --git a/scripts/actions/abilities/pets/automaton/magic_mortar.lua b/scripts/actions/abilities/pets/automaton/magic_mortar.lua index 5ae7701b2c8..09776b19ed4 100644 --- a/scripts/actions/abilities/pets/automaton/magic_mortar.lua +++ b/scripts/actions/abilities/pets/automaton/magic_mortar.lua @@ -6,7 +6,6 @@ local abilityObject = {} abilityObject.onAutomatonAbilityCheck = function(target, automaton, skill) local master = automaton:getMaster() - if not master then return end diff --git a/scripts/actions/abilities/pets/automaton/slapstick.lua b/scripts/actions/abilities/pets/automaton/slapstick.lua index a6ab4de4c64..7d46c6d1c4b 100644 --- a/scripts/actions/abilities/pets/automaton/slapstick.lua +++ b/scripts/actions/abilities/pets/automaton/slapstick.lua @@ -6,7 +6,6 @@ local abilityObject = {} abilityObject.onAutomatonAbilityCheck = function(target, automaton, skill) local master = automaton:getMaster() - if not master then return end diff --git a/scripts/actions/abilities/pets/automaton/string_clipper.lua b/scripts/actions/abilities/pets/automaton/string_clipper.lua index e7cb3a840eb..8b94fc23c85 100644 --- a/scripts/actions/abilities/pets/automaton/string_clipper.lua +++ b/scripts/actions/abilities/pets/automaton/string_clipper.lua @@ -6,7 +6,6 @@ local abilityObject = {} abilityObject.onAutomatonAbilityCheck = function(target, automaton, skill) local master = automaton:getMaster() - if not master then return end diff --git a/scripts/actions/abilities/pets/automaton/string_shredder.lua b/scripts/actions/abilities/pets/automaton/string_shredder.lua index c291e217abf..40f344248bb 100644 --- a/scripts/actions/abilities/pets/automaton/string_shredder.lua +++ b/scripts/actions/abilities/pets/automaton/string_shredder.lua @@ -6,7 +6,6 @@ local abilityObject = {} abilityObject.onAutomatonAbilityCheck = function(target, automaton, skill) local master = automaton:getMaster() - if not master then return end diff --git a/scripts/actions/abilities/pets/concentric_pulse.lua b/scripts/actions/abilities/pets/concentric_pulse.lua index 0159a96e111..c68c14f9595 100644 --- a/scripts/actions/abilities/pets/concentric_pulse.lua +++ b/scripts/actions/abilities/pets/concentric_pulse.lua @@ -9,8 +9,7 @@ abilityObject.onAbilityCheck = function(player, target, ability) end abilityObject.onPetAbility = function(target, pet, skill) - local master = pet:getMaster() - + local master = pet:getMaster() if not master then return end diff --git a/scripts/actions/abilities/repair.lua b/scripts/actions/abilities/repair.lua index ee741f19550..9ed1b6cb66f 100644 --- a/scripts/actions/abilities/repair.lua +++ b/scripts/actions/abilities/repair.lua @@ -64,8 +64,7 @@ abilityObject.onAbilityCheck = function(player, target, ability) end abilityObject.onUseAbility = function(player, target, ability) - local pet = player:getPet() - + local pet = player:getPet() if not pet then return end diff --git a/scripts/actions/abilities/role_reversal.lua b/scripts/actions/abilities/role_reversal.lua index 067f9ba3184..46ad39ccf4c 100644 --- a/scripts/actions/abilities/role_reversal.lua +++ b/scripts/actions/abilities/role_reversal.lua @@ -22,7 +22,6 @@ end abilityObject.onUseAbility = function(player, target, ability) local pet = player:getPet() - if pet then local bonus = 1 + (player:getMerit(xi.merit.ROLE_REVERSAL) - 5) / 100 local playerHP = player:getHP() diff --git a/scripts/actions/abilities/ventriloquy.lua b/scripts/actions/abilities/ventriloquy.lua index 3823752b2d4..c53825d9139 100644 --- a/scripts/actions/abilities/ventriloquy.lua +++ b/scripts/actions/abilities/ventriloquy.lua @@ -22,7 +22,6 @@ end abilityObject.onUseAbility = function(player, target, ability) local pet = player:getPet() - if pet then local enmitylist = target:getEnmityList() local playerfound, petfound = false, false diff --git a/scripts/actions/mobskills/astral_flow_pet.lua b/scripts/actions/mobskills/astral_flow_pet.lua index a1f57c8d6ac..ca1876b4d83 100644 --- a/scripts/actions/mobskills/astral_flow_pet.lua +++ b/scripts/actions/mobskills/astral_flow_pet.lua @@ -45,7 +45,6 @@ local petAstralFlowAbility = mobskillObject.onMobWeaponSkill = function(target, mob, skill) local pet = mob:getPet() - if not pet then return end diff --git a/scripts/actions/mobskills/eald2_warp_out.lua b/scripts/actions/mobskills/eald2_warp_out.lua index cae1dd4f1c1..39e359d7f64 100644 --- a/scripts/actions/mobskills/eald2_warp_out.lua +++ b/scripts/actions/mobskills/eald2_warp_out.lua @@ -11,7 +11,6 @@ end mobskillObject.onMobWeaponSkill = function(target, mob, skill) local battletarget = mob:getTarget() - if not battletarget then return end diff --git a/scripts/actions/spells/trust/sylvie_uc.lua b/scripts/actions/spells/trust/sylvie_uc.lua index 95e10084fc0..2e855f7659c 100644 --- a/scripts/actions/spells/trust/sylvie_uc.lua +++ b/scripts/actions/spells/trust/sylvie_uc.lua @@ -14,8 +14,8 @@ end spellObject.onMobSpawn = function(mob) xi.trust.message(mob, xi.trust.messageOffset.SPAWN) - local master = mob:getMaster() + local master = mob:getMaster() if not master then return end diff --git a/scripts/commands/checklocalvar.lua b/scripts/commands/checklocalvar.lua index d1586feec91..4b0f32df8ad 100644 --- a/scripts/commands/checklocalvar.lua +++ b/scripts/commands/checklocalvar.lua @@ -34,7 +34,6 @@ commandObj.onTrigger = function(player, arg1, arg2, arg3) arg3 = tonumber(arg3) if zone and zone:getTypeMask() == xi.zoneType.INSTANCED then local instance = player:getInstance() - if not instance then return end diff --git a/scripts/globals/battlefield.lua b/scripts/globals/battlefield.lua index f7fcbf76120..0a60aed7f34 100644 --- a/scripts/globals/battlefield.lua +++ b/scripts/globals/battlefield.lua @@ -708,7 +708,6 @@ function Battlefield.onEntryTrigger(player, npc) local status = player:getStatusEffect(xi.effect.BATTLEFIELD) local id = status:getPower() local content = xi.battlefield.contents[id] - if not content then return end diff --git a/scripts/globals/beastmentreasure.lua b/scripts/globals/beastmentreasure.lua index 2e27b9db772..57cfb469a94 100644 --- a/scripts/globals/beastmentreasure.lua +++ b/scripts/globals/beastmentreasure.lua @@ -240,7 +240,6 @@ xi.beastmentreasure.updatePeddlestox = function(zone, peddlestoxID) and once at the start of each new game day. Since Peddlestox is disabled in the db by default, we only need to enable her on the appropriate day and disable her on the following day. ]]-- local peddlestox = GetNPCByID(peddlestoxID) - if not peddlestox then return end diff --git a/scripts/globals/chocobo_raising.lua b/scripts/globals/chocobo_raising.lua index 8750ab71e05..b30c39898f8 100644 --- a/scripts/globals/chocobo_raising.lua +++ b/scripts/globals/chocobo_raising.lua @@ -1062,7 +1062,6 @@ end xi.chocoboRaising.initChocoboData = function(player) local chocoState = player:getChocoboRaisingInfo() - if not chocoState then return chocoState end diff --git a/scripts/globals/follow.lua b/scripts/globals/follow.lua index 5e34328b050..15a1f529261 100644 --- a/scripts/globals/follow.lua +++ b/scripts/globals/follow.lua @@ -40,7 +40,6 @@ end xi.follow.clearFollowers = function(leader) local followers = xi.follow.getFollowers(leader) - if not followers then return end diff --git a/scripts/globals/job_utils/summoner.lua b/scripts/globals/job_utils/summoner.lua index bee92167812..9915361e696 100644 --- a/scripts/globals/job_utils/summoner.lua +++ b/scripts/globals/job_utils/summoner.lua @@ -221,7 +221,6 @@ end xi.job_utils.summoner.onUseBloodPact = function(target, petskill, summoner, action) local bloodPactAbility = GetAbility(petskill:getID()) -- Player abilities and Avatar abilities are mapped 1:1 - if not bloodPactAbility then return end diff --git a/scripts/globals/magian.lua b/scripts/globals/magian.lua index 2ed40f0a089..12ca59a0d45 100644 --- a/scripts/globals/magian.lua +++ b/scripts/globals/magian.lua @@ -918,7 +918,6 @@ xi.magian.onItemEquip = function(player, itemObj) end local trialData = xi.magian.trials[itemTrialId] - if not trialData then return end diff --git a/scripts/globals/npc_util.lua b/scripts/globals/npc_util.lua index 6c70d260c1f..b6f2dc5e760 100644 --- a/scripts/globals/npc_util.lua +++ b/scripts/globals/npc_util.lua @@ -925,7 +925,6 @@ end function npcUtil.UpdateNPCSpawnPoint(id, minTime, maxTime, posTable, serverVar) local npc = GetNPCByID(id) - if not npc then return end diff --git a/scripts/globals/pets/avatar.lua b/scripts/globals/pets/avatar.lua index 174d46caee0..515f5780597 100644 --- a/scripts/globals/pets/avatar.lua +++ b/scripts/globals/pets/avatar.lua @@ -385,7 +385,6 @@ end xi.pets.avatar.getLightSpiritSpell = function(pet) -- returns the spirit's preferred target based on positioning local master = pet:getMaster() - if not master then return 0, nil end diff --git a/scripts/globals/regimes.lua b/scripts/globals/regimes.lua index 36305cc6dd0..5a4fee556ef 100644 --- a/scripts/globals/regimes.lua +++ b/scripts/globals/regimes.lua @@ -1108,7 +1108,6 @@ xi.regime.bookOnEventUpdate = function(player, option, regimeType) -- check valid option local opts = getUpdateOpts(regimeType) local opt = opts[option] - if not opt then return end @@ -1154,7 +1153,6 @@ xi.regime.bookOnEventFinish = function(player, option, regimeType) -- check valid option local opts = getFinishOpts(regimeType) local opt = opts[option] - if not opt then return end diff --git a/scripts/items/astral_pot.lua b/scripts/items/astral_pot.lua index 732b5158f81..dc57c2a5481 100644 --- a/scripts/items/astral_pot.lua +++ b/scripts/items/astral_pot.lua @@ -25,7 +25,6 @@ end itemObject.onEffectGain = function(target, effect) local pet = target:getPet() - if not pet then return end diff --git a/scripts/items/bag_of_wyvern_feed.lua b/scripts/items/bag_of_wyvern_feed.lua index 2f5a3b4f375..9cbb6f97574 100644 --- a/scripts/items/bag_of_wyvern_feed.lua +++ b/scripts/items/bag_of_wyvern_feed.lua @@ -9,7 +9,8 @@ local itemObject = {} itemObject.onItemCheck = function(target, item, param, caster) local effect = target:getStatusEffect(xi.effect.ENCHANTMENT) - local pet = target:getPet() + local pet = target:getPet() + if not pet then return xi.msg.basic.REQUIRES_A_PET, 0 elseif effect ~= nil and effect:getSubType() == 18242 then @@ -25,7 +26,6 @@ end itemObject.onEffectGain = function(target, effect) local pet = target:getPet() - if not pet then return end diff --git a/scripts/items/bottle_of_dawn_mulsum.lua b/scripts/items/bottle_of_dawn_mulsum.lua index c60e71dcec5..7359476fae5 100644 --- a/scripts/items/bottle_of_dawn_mulsum.lua +++ b/scripts/items/bottle_of_dawn_mulsum.lua @@ -15,13 +15,12 @@ itemObject.onItemCheck = function(target, item, param, caster) end itemObject.onItemUse = function(target) - local percent = math.random(20, 35) * xi.settings.main.ITEM_POWER local pet = target:getPet() - if not pet then return end + local percent = math.random(20, 35) * xi.settings.main.ITEM_POWER local totalHP = (pet:getMaxHP() / 100) * percent pet:addHP(totalHP) pet:messageBasic(xi.msg.basic.RECOVERS_HP, 0, totalHP) diff --git a/scripts/items/chunk_of_smelling_salts.lua b/scripts/items/chunk_of_smelling_salts.lua index edf3823742e..471eb6165e5 100644 --- a/scripts/items/chunk_of_smelling_salts.lua +++ b/scripts/items/chunk_of_smelling_salts.lua @@ -9,7 +9,8 @@ local itemObject = {} itemObject.onItemCheck = function(target, item, param, caster) local pet = target:getPet() - if pet == nil then + + if not pet then return xi.msg.basic.REQUIRES_A_PET elseif pet:hasStatusEffect(xi.effect.MEDICINE) then return xi.msg.basic.ITEM_NO_USE_MEDICATED @@ -21,7 +22,6 @@ end itemObject.onItemUse = function(target) if target:addStatusEffect(xi.effect.MEDICINE, 0, 0, 180, 5320) then local pet = target:getPet() - if not pet then return end diff --git a/scripts/items/cirrocumulus_cell.lua b/scripts/items/cirrocumulus_cell.lua index 54a7bf09f96..b3d9d85f581 100644 --- a/scripts/items/cirrocumulus_cell.lua +++ b/scripts/items/cirrocumulus_cell.lua @@ -20,7 +20,6 @@ end itemObject.onItemUse = function(target) local encumbrance = target:getStatusEffect(xi.effect.ENCUMBRANCE_I) - if not encumbrance then return end diff --git a/scripts/items/qiqirn_mine.lua b/scripts/items/qiqirn_mine.lua index 50bac1d7d5f..b470f7cad4a 100644 --- a/scripts/items/qiqirn_mine.lua +++ b/scripts/items/qiqirn_mine.lua @@ -17,13 +17,11 @@ end itemObject.onItemUse = function(target) local instance = target:getInstance() - if not instance then return end local bomb = instance:insertAlly(100) - if not bomb then return end diff --git a/scripts/items/scapegoat.lua b/scripts/items/scapegoat.lua index 2d4cf865783..178ce4f18fa 100644 --- a/scripts/items/scapegoat.lua +++ b/scripts/items/scapegoat.lua @@ -15,7 +15,6 @@ itemObject.onItemUse = function(target) if target:hasStatusEffect(xi.effect.RERAISE) then local effect = target:getStatusEffect(xi.effect.RERAISE) - if not effect then return end diff --git a/scripts/items/scroll_of_instant_reraise.lua b/scripts/items/scroll_of_instant_reraise.lua index fe7a4d73035..579063beb6a 100644 --- a/scripts/items/scroll_of_instant_reraise.lua +++ b/scripts/items/scroll_of_instant_reraise.lua @@ -15,7 +15,6 @@ itemObject.onItemUse = function(target) local duration = 1800 if target:hasStatusEffect(xi.effect.RERAISE) then local effect = target:getStatusEffect(xi.effect.RERAISE) - if not effect then return end diff --git a/scripts/items/tube_of_healing_salve_i.lua b/scripts/items/tube_of_healing_salve_i.lua index e343d37cc9c..664c3ce42c2 100644 --- a/scripts/items/tube_of_healing_salve_i.lua +++ b/scripts/items/tube_of_healing_salve_i.lua @@ -16,7 +16,6 @@ end itemObject.onItemUse = function(target) local pet = target:getPet() - if not pet then return end diff --git a/scripts/items/tube_of_healing_salve_ii.lua b/scripts/items/tube_of_healing_salve_ii.lua index a65fed758e2..61eb0c8251f 100644 --- a/scripts/items/tube_of_healing_salve_ii.lua +++ b/scripts/items/tube_of_healing_salve_ii.lua @@ -16,7 +16,6 @@ end itemObject.onItemUse = function(target) local pet = target:getPet() - if not pet then return end diff --git a/scripts/missions/wotg/19_Betrayal_at_Beaucedine.lua b/scripts/missions/wotg/19_Betrayal_at_Beaucedine.lua index 0d67cc509bc..d2b87608eaf 100644 --- a/scripts/missions/wotg/19_Betrayal_at_Beaucedine.lua +++ b/scripts/missions/wotg/19_Betrayal_at_Beaucedine.lua @@ -32,8 +32,7 @@ mission.sections = if missionStatus == 0 then return mission:progressEvent(15, 136, 300, 200, 100, 0, 9306122, 0, 0) elseif missionStatus == 1 then - local zoneObj = player:getZone() - + local zoneObj = player:getZone() if not zoneObj then return end diff --git a/scripts/quests/outlands/Forge_Your_Destiny.lua b/scripts/quests/outlands/Forge_Your_Destiny.lua index 1ab1e567d12..a72aae156fa 100644 --- a/scripts/quests/outlands/Forge_Your_Destiny.lua +++ b/scripts/quests/outlands/Forge_Your_Destiny.lua @@ -65,7 +65,6 @@ quest.sections = return quest:messageSpecial(konschtatID.text.BLACKENED_NOTHING_HAPPENS, xi.item.LUMP_OF_ORIENTAL_STEEL) else local forgerMob = SpawnMob(konschtatID.mob.FORGER) - if not forgerMob then return quest:noAction() end @@ -246,7 +245,6 @@ quest.sections = return quest:messageSpecial(zitahID.text.STRANGE_FORCE_PREVENTS) else local treantMob = SpawnMob(zitahID.mob.GUARDIAN_TREANT) - if not treantMob then return quest:noAction() end diff --git a/scripts/specs/types/Container.lua b/scripts/specs/types/Container.lua index 951b309c328..f0f8b0ebb30 100644 --- a/scripts/specs/types/Container.lua +++ b/scripts/specs/types/Container.lua @@ -14,7 +14,7 @@ ---@alias onZoneHandler fun(player: CBaseEntity): TAction? ---@class onTriggerAreaHandler ----@field [integer] fun(player: CBaseEntity, triggerArea: CTriggerArea): TAction? +---@field [integer] fun(player: CBaseEntity, triggerArea: CTriggerArea, optInstance: CInstance?): TAction? ---@class EntitySection ---@field onTrade? TAction|fun(player: CBaseEntity, npc: CBaseEntity, trade: CTradeContainer): TAction? diff --git a/scripts/specs/types/Zone.lua b/scripts/specs/types/Zone.lua new file mode 100644 index 00000000000..1047d8195de --- /dev/null +++ b/scripts/specs/types/Zone.lua @@ -0,0 +1,21 @@ +---@meta + +---@class TZone +---@field onZoneIn? fun(player: CBaseEntity, prevZone: xi.zone): integer|table? +---@field afterZoneIn? fun(player: CBaseEntity) +---@field onZoneOut? fun(player: CBaseEntity) +---@field onTriggerAreaEnter? fun(player: CBaseEntity, triggerArea: CTriggerArea, optInstance: CInstance?) +---@field onTriggerAreaLeave? fun(player: CBaseEntity, triggerArea: CTriggerArea, optInstance: CInstance?) +---@field onInitialize? fun(zone: CZone) +---@field onEventUpdate? fun(player: CBaseEntity, csid: integer, option: integer, npc: CBaseEntity) +---@field onEventFinish? fun(player: CBaseEntity, csid: integer, option: integer, npc: CBaseEntity) +---@field onTransportEvent? fun(player: CBaseEntity, transportId: integer) +---@field onConquestUpdate? fun(zone: CZone, type: integer, influence: integer, owner: integer, ranking: integer, isConquestAlliance: boolean) +---@field onGameDay? fun() +---@field onGameHour? fun(zone: CZone) +---@field onZoneWeatherChange? fun(weather: integer) +---@field onTOTDChange? fun(TOTD: integer) +---@field onInstanceZoneIn? fun(player: CBaseEntity, instance: CInstance) +---@field afterInstanceRegister? fun(player: CBaseEntity) +---@field onInstanceLoadFailed? fun(): xi.zone? Return value is zone ID to exit the player to. +---@field onZoneTick? fun(zone: CZone) diff --git a/scripts/zones/Abdhaljs_Isle-Purgonorgo/Zone.lua b/scripts/zones/Abdhaljs_Isle-Purgonorgo/Zone.lua index 4bbe5d7c189..9fb254bedf4 100644 --- a/scripts/zones/Abdhaljs_Isle-Purgonorgo/Zone.lua +++ b/scripts/zones/Abdhaljs_Isle-Purgonorgo/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Abdhaljs_Isle-Purgonorgo ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Abyssea-Altepa/Zone.lua b/scripts/zones/Abyssea-Altepa/Zone.lua index 1b8cec5347f..308e48b2a88 100644 --- a/scripts/zones/Abyssea-Altepa/Zone.lua +++ b/scripts/zones/Abyssea-Altepa/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Abyssea - Altepa ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Abyssea-Attohwa/Zone.lua b/scripts/zones/Abyssea-Attohwa/Zone.lua index 3df6e09831a..f57eb01d06e 100644 --- a/scripts/zones/Abyssea-Attohwa/Zone.lua +++ b/scripts/zones/Abyssea-Attohwa/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Abyssea - Attohwa ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Abyssea-Empyreal_Paradox/Zone.lua b/scripts/zones/Abyssea-Empyreal_Paradox/Zone.lua index f7b43307298..a6b83aa7a2f 100644 --- a/scripts/zones/Abyssea-Empyreal_Paradox/Zone.lua +++ b/scripts/zones/Abyssea-Empyreal_Paradox/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Abyssea - Empyreal_Paradox ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Abyssea-Grauberg/Zone.lua b/scripts/zones/Abyssea-Grauberg/Zone.lua index 3fe8d2f2587..c8993b21ff1 100644 --- a/scripts/zones/Abyssea-Grauberg/Zone.lua +++ b/scripts/zones/Abyssea-Grauberg/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Abyssea - Grauberg ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Abyssea-Konschtat/Zone.lua b/scripts/zones/Abyssea-Konschtat/Zone.lua index b64a4251ece..e41cf50ad3d 100644 --- a/scripts/zones/Abyssea-Konschtat/Zone.lua +++ b/scripts/zones/Abyssea-Konschtat/Zone.lua @@ -7,6 +7,7 @@ -- EventID 2180 Teleport? -- EventID 2181 DEBUG Menu ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Abyssea-La_Theine/Zone.lua b/scripts/zones/Abyssea-La_Theine/Zone.lua index 10536d56c7a..6cc84c3ccb1 100644 --- a/scripts/zones/Abyssea-La_Theine/Zone.lua +++ b/scripts/zones/Abyssea-La_Theine/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Abyssea - La_Theine ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Abyssea-Misareaux/Zone.lua b/scripts/zones/Abyssea-Misareaux/Zone.lua index 75d24281868..b1605914849 100644 --- a/scripts/zones/Abyssea-Misareaux/Zone.lua +++ b/scripts/zones/Abyssea-Misareaux/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Abyssea - Misareaux ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Abyssea-Tahrongi/Zone.lua b/scripts/zones/Abyssea-Tahrongi/Zone.lua index 24132869ae4..43acd5a50f5 100644 --- a/scripts/zones/Abyssea-Tahrongi/Zone.lua +++ b/scripts/zones/Abyssea-Tahrongi/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Abyssea - Tahrongi ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Abyssea-Uleguerand/Zone.lua b/scripts/zones/Abyssea-Uleguerand/Zone.lua index 5186f76ab6c..ad90fe0c112 100644 --- a/scripts/zones/Abyssea-Uleguerand/Zone.lua +++ b/scripts/zones/Abyssea-Uleguerand/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Abyssea - Uleguerand ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Abyssea-Vunkerl/Zone.lua b/scripts/zones/Abyssea-Vunkerl/Zone.lua index d0bbb693d8a..eb3e4231cc7 100644 --- a/scripts/zones/Abyssea-Vunkerl/Zone.lua +++ b/scripts/zones/Abyssea-Vunkerl/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Abyssea - Vunkerl ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Aht_Urhgan_Whitegate/Zone.lua b/scripts/zones/Aht_Urhgan_Whitegate/Zone.lua index 549d2733484..3806217b179 100644 --- a/scripts/zones/Aht_Urhgan_Whitegate/Zone.lua +++ b/scripts/zones/Aht_Urhgan_Whitegate/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.AHT_URHGAN_WHITEGATE] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Aht_Urhgan_Whitegate/npcs/Zasshal.lua b/scripts/zones/Aht_Urhgan_Whitegate/npcs/Zasshal.lua index 0a184cc9db4..d44115c9a03 100644 --- a/scripts/zones/Aht_Urhgan_Whitegate/npcs/Zasshal.lua +++ b/scripts/zones/Aht_Urhgan_Whitegate/npcs/Zasshal.lua @@ -69,7 +69,6 @@ end entity.onEventFinish = function(player, csid, option, npc) local currentday = tonumber(os.date('%j')) - if not currentday then return end diff --git a/scripts/zones/AlTaieu/Zone.lua b/scripts/zones/AlTaieu/Zone.lua index 5e002243e67..e501d0d2c4c 100644 --- a/scripts/zones/AlTaieu/Zone.lua +++ b/scripts/zones/AlTaieu/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: AlTaieu (33) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Al_Zahbi/Zone.lua b/scripts/zones/Al_Zahbi/Zone.lua index ee72dee8ba7..573bcb67c31 100644 --- a/scripts/zones/Al_Zahbi/Zone.lua +++ b/scripts/zones/Al_Zahbi/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Al_Zahbi (48) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Altar_Room/Zone.lua b/scripts/zones/Altar_Room/Zone.lua index 11206d5cb04..062a1bcd0b5 100644 --- a/scripts/zones/Altar_Room/Zone.lua +++ b/scripts/zones/Altar_Room/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Altar_Room (152) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Alzadaal_Undersea_Ruins/Zone.lua b/scripts/zones/Alzadaal_Undersea_Ruins/Zone.lua index 2ba4c7934a9..77a72134139 100644 --- a/scripts/zones/Alzadaal_Undersea_Ruins/Zone.lua +++ b/scripts/zones/Alzadaal_Undersea_Ruins/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Alzadaal_Undersea_Ruins (72) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Apollyon/Zone.lua b/scripts/zones/Apollyon/Zone.lua index 0bd7f0c4dc0..c40dd9195d8 100644 --- a/scripts/zones/Apollyon/Zone.lua +++ b/scripts/zones/Apollyon/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.APOLLYON] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Arrapago_Reef/Zone.lua b/scripts/zones/Arrapago_Reef/Zone.lua index e4e5c589034..2f89f580866 100644 --- a/scripts/zones/Arrapago_Reef/Zone.lua +++ b/scripts/zones/Arrapago_Reef/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Arrapago_Reef (54) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Arrapago_Remnants/Zone.lua b/scripts/zones/Arrapago_Remnants/Zone.lua index daba4c4ecd5..657b2950556 100644 --- a/scripts/zones/Arrapago_Remnants/Zone.lua +++ b/scripts/zones/Arrapago_Remnants/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Arrapago Remnants ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) @@ -18,12 +19,10 @@ zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, xi.zone.ALZADAAL_UNDERSEA_RUINS) - return cs + return end local pos = player:getPos() @@ -39,8 +38,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) end player:addTempItem(5399) - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -51,6 +48,10 @@ end zoneObject.onEventFinish = function(player, csid, option, npc) local instance = player:getInstance() + if not instance then + return + end + local chars = instance:getChars() if csid == 1 then diff --git a/scripts/zones/Arrapago_Remnants/mobs/Archaic_Rampart_1.lua b/scripts/zones/Arrapago_Remnants/mobs/Archaic_Rampart_1.lua index 84ff3b02993..964dbd59fc5 100644 --- a/scripts/zones/Arrapago_Remnants/mobs/Archaic_Rampart_1.lua +++ b/scripts/zones/Arrapago_Remnants/mobs/Archaic_Rampart_1.lua @@ -12,7 +12,6 @@ end entity.onMobFight = function(mob, target) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/mobs/Archaic_Rampart_2.lua b/scripts/zones/Arrapago_Remnants/mobs/Archaic_Rampart_2.lua index de347a371be..44fc997e908 100644 --- a/scripts/zones/Arrapago_Remnants/mobs/Archaic_Rampart_2.lua +++ b/scripts/zones/Arrapago_Remnants/mobs/Archaic_Rampart_2.lua @@ -47,7 +47,6 @@ end entity.onMobDeath = function(mob, player, optParams) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/mobs/Archaic_Rampart_3.lua b/scripts/zones/Arrapago_Remnants/mobs/Archaic_Rampart_3.lua index 335f3dcd381..a7c38725b89 100644 --- a/scripts/zones/Arrapago_Remnants/mobs/Archaic_Rampart_3.lua +++ b/scripts/zones/Arrapago_Remnants/mobs/Archaic_Rampart_3.lua @@ -11,8 +11,7 @@ entity.onMobSpawn = function(mob) end entity.onMobFight = function(mob, target) - local instance = mob:getInstance() - + local instance = mob:getInstance() if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/mobs/Princess_Pudding.lua b/scripts/zones/Arrapago_Remnants/mobs/Princess_Pudding.lua index f891bb80772..3a403d04748 100644 --- a/scripts/zones/Arrapago_Remnants/mobs/Princess_Pudding.lua +++ b/scripts/zones/Arrapago_Remnants/mobs/Princess_Pudding.lua @@ -9,7 +9,6 @@ local entity = {} entity.onMobSpawn = function(mob) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/mobs/Qiqirn_Astrologer.lua b/scripts/zones/Arrapago_Remnants/mobs/Qiqirn_Astrologer.lua index 111651a6096..6890881c07e 100644 --- a/scripts/zones/Arrapago_Remnants/mobs/Qiqirn_Astrologer.lua +++ b/scripts/zones/Arrapago_Remnants/mobs/Qiqirn_Astrologer.lua @@ -12,15 +12,14 @@ entity.onMobSpawn = function(mob) end entity.onMobDisengage = function(mob) - local run = mob:getLocalVar('run') local instance = mob:getInstance() - if not instance then return end + local run = mob:getLocalVar('run') local stage = instance:getStage() - local prog = instance:getProgress() + local prog = instance:getProgress() if run == 1 then mob:pathThrough(ID.points[stage][prog - 1].point1, 9) @@ -48,17 +47,16 @@ entity.onMobEngage = function(mob) end entity.onMobFight = function(mob, target) - local act = mob:getCurrentAction() - local isBusy = false - local runTime = mob:getLocalVar('runTime') local instance = mob:getInstance() - if not instance then return end - local stage = instance:getStage() - local prog = instance:getProgress() + local act = mob:getCurrentAction() + local isBusy = false + local runTime = mob:getLocalVar('runTime') + local stage = instance:getStage() + local prog = instance:getProgress() if act == xi.act.MOBABILITY_START or diff --git a/scripts/zones/Arrapago_Remnants/mobs/Qiqirn_Treasure_Hunter.lua b/scripts/zones/Arrapago_Remnants/mobs/Qiqirn_Treasure_Hunter.lua index 79e0e430776..9139c702729 100644 --- a/scripts/zones/Arrapago_Remnants/mobs/Qiqirn_Treasure_Hunter.lua +++ b/scripts/zones/Arrapago_Remnants/mobs/Qiqirn_Treasure_Hunter.lua @@ -9,7 +9,6 @@ local entity = {} entity.onMobRoamAction = function(mob) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/mobs/Vile_Wahzil.lua b/scripts/zones/Arrapago_Remnants/mobs/Vile_Wahzil.lua index c3c55da5440..41b891aee7d 100644 --- a/scripts/zones/Arrapago_Remnants/mobs/Vile_Wahzil.lua +++ b/scripts/zones/Arrapago_Remnants/mobs/Vile_Wahzil.lua @@ -9,7 +9,6 @@ local entity = {} entity.onMobSpawn = function(mob) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/Armoury_Crate.lua b/scripts/zones/Arrapago_Remnants/npcs/Armoury_Crate.lua index 47ba4b6712e..ad6a1a7e96b 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/Armoury_Crate.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/Armoury_Crate.lua @@ -7,7 +7,6 @@ local entity = {} entity.onTrigger = function(player, npc) local instance = npc:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/Socket.lua b/scripts/zones/Arrapago_Remnants/npcs/Socket.lua index b536b750350..d8607b5e773 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/Socket.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/Socket.lua @@ -10,8 +10,7 @@ local ID = zones[xi.zone.ARRAPAGO_REMNANTS] local entity = {} entity.onTrade = function(player, npc, trade) - local instance = npc:getInstance() - + local instance = npc:getInstance() if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_220.lua b/scripts/zones/Arrapago_Remnants/npcs/_220.lua index 791279404f5..9da6b179613 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_220.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_220.lua @@ -13,8 +13,8 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then door:setAnimation(8) - local instance = door:getInstance() + local instance = door:getInstance() if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_221.lua b/scripts/zones/Arrapago_Remnants/npcs/_221.lua index 0b097c58fdc..abcfbb07766 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_221.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_221.lua @@ -18,7 +18,6 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then local instance = door:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_222.lua b/scripts/zones/Arrapago_Remnants/npcs/_222.lua index 0b097c58fdc..abcfbb07766 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_222.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_222.lua @@ -18,7 +18,6 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then local instance = door:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_223.lua b/scripts/zones/Arrapago_Remnants/npcs/_223.lua index 0b097c58fdc..abcfbb07766 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_223.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_223.lua @@ -18,7 +18,6 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then local instance = door:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_224.lua b/scripts/zones/Arrapago_Remnants/npcs/_224.lua index 0b097c58fdc..abcfbb07766 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_224.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_224.lua @@ -18,7 +18,6 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then local instance = door:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_225.lua b/scripts/zones/Arrapago_Remnants/npcs/_225.lua index c4ffd17eda5..0f438fa60b1 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_225.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_225.lua @@ -18,7 +18,6 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then local instance = door:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_226.lua b/scripts/zones/Arrapago_Remnants/npcs/_226.lua index c4ffd17eda5..0f438fa60b1 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_226.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_226.lua @@ -18,7 +18,6 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then local instance = door:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_227.lua b/scripts/zones/Arrapago_Remnants/npcs/_227.lua index c4ffd17eda5..0f438fa60b1 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_227.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_227.lua @@ -18,7 +18,6 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then local instance = door:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_228.lua b/scripts/zones/Arrapago_Remnants/npcs/_228.lua index c4ffd17eda5..0f438fa60b1 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_228.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_228.lua @@ -18,7 +18,6 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then local instance = door:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_229.lua b/scripts/zones/Arrapago_Remnants/npcs/_229.lua index f7bf1cbfa11..1a1f633215f 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_229.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_229.lua @@ -18,7 +18,6 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then local instance = door:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_22a.lua b/scripts/zones/Arrapago_Remnants/npcs/_22a.lua index a7089ea30d8..d67bb11e04e 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_22a.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_22a.lua @@ -18,7 +18,6 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then local instance = door:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_22b.lua b/scripts/zones/Arrapago_Remnants/npcs/_22b.lua index cb4345520db..7a32ea9dc9c 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_22b.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_22b.lua @@ -18,7 +18,6 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then local instance = door:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_22c.lua b/scripts/zones/Arrapago_Remnants/npcs/_22c.lua index 352638f0db1..a16de69bf79 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_22c.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_22c.lua @@ -18,7 +18,6 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then local instance = door:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_22d.lua b/scripts/zones/Arrapago_Remnants/npcs/_22d.lua index b87e7ac55dd..c8d62d5d162 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_22d.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_22d.lua @@ -18,7 +18,6 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then local instance = door:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_22e.lua b/scripts/zones/Arrapago_Remnants/npcs/_22e.lua index 62b49c19752..6b054b4f110 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_22e.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_22e.lua @@ -18,7 +18,6 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then local instance = door:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_22f.lua b/scripts/zones/Arrapago_Remnants/npcs/_22f.lua index ed0dd417ce3..249f9fa8875 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_22f.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_22f.lua @@ -21,7 +21,6 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then local instance = door:getInstance() - if not instance then return end diff --git a/scripts/zones/Arrapago_Remnants/npcs/_22g.lua b/scripts/zones/Arrapago_Remnants/npcs/_22g.lua index 64a67f080c4..910b8bbafed 100644 --- a/scripts/zones/Arrapago_Remnants/npcs/_22g.lua +++ b/scripts/zones/Arrapago_Remnants/npcs/_22g.lua @@ -18,7 +18,6 @@ end entity.onEventFinish = function(player, csid, option, door) if csid == 300 and option == 1 then local instance = door:getInstance() - if not instance then return end diff --git a/scripts/zones/Attohwa_Chasm/Zone.lua b/scripts/zones/Attohwa_Chasm/Zone.lua index 9c10d9e9a13..c3986a65661 100644 --- a/scripts/zones/Attohwa_Chasm/Zone.lua +++ b/scripts/zones/Attohwa_Chasm/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.ATTOHWA_CHASM] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) @@ -83,7 +84,7 @@ end zoneObject.onTriggerAreaLeave = function(player, triggerArea) end -zoneObject.onGameHour = function(zone) +zoneObject.onGameHour = function() --[[ the hard-coded id that was here was wrong. there are 22 miasmas in attohwa chasm starting at ID.npc.MIASMA_OFFSET. some are supposed to toggle open, but need retail test diff --git a/scripts/zones/Aydeewa_Subterrane/Zone.lua b/scripts/zones/Aydeewa_Subterrane/Zone.lua index 918e3b61131..b113f840e98 100644 --- a/scripts/zones/Aydeewa_Subterrane/Zone.lua +++ b/scripts/zones/Aydeewa_Subterrane/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Aydeewa_Subterrane (68) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Balgas_Dais/Zone.lua b/scripts/zones/Balgas_Dais/Zone.lua index f581577605c..258b2afb1ca 100644 --- a/scripts/zones/Balgas_Dais/Zone.lua +++ b/scripts/zones/Balgas_Dais/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Balgas_Dais (146) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Bastok-Jeuno_Airship/Zone.lua b/scripts/zones/Bastok-Jeuno_Airship/Zone.lua index e61577d18cf..209d3a99d39 100644 --- a/scripts/zones/Bastok-Jeuno_Airship/Zone.lua +++ b/scripts/zones/Bastok-Jeuno_Airship/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Bastok-Jeuno_Airship ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Bastok_Markets/Zone.lua b/scripts/zones/Bastok_Markets/Zone.lua index 100fedd257c..8bd5b45af53 100644 --- a/scripts/zones/Bastok_Markets/Zone.lua +++ b/scripts/zones/Bastok_Markets/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Bastok_Markets (235) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Bastok_Markets_[S]/Zone.lua b/scripts/zones/Bastok_Markets_[S]/Zone.lua index 13236dd148c..5b54ada4809 100644 --- a/scripts/zones/Bastok_Markets_[S]/Zone.lua +++ b/scripts/zones/Bastok_Markets_[S]/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.BASTOK_MARKETS_S] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Bastok_Mines/Zone.lua b/scripts/zones/Bastok_Mines/Zone.lua index 84dd4d7c89b..34eb92ca0fc 100644 --- a/scripts/zones/Bastok_Mines/Zone.lua +++ b/scripts/zones/Bastok_Mines/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.BASTOK_MINES] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Batallia_Downs/Zone.lua b/scripts/zones/Batallia_Downs/Zone.lua index 97470d48135..dfa94003897 100644 --- a/scripts/zones/Batallia_Downs/Zone.lua +++ b/scripts/zones/Batallia_Downs/Zone.lua @@ -5,11 +5,11 @@ local ID = zones[xi.zone.BATALLIA_DOWNS] require('scripts/quests/full_speed_ahead') require('scripts/quests/i_can_hear_a_rainbow') ----------------------------------- +---@type TZone local zoneObject = {} local function registerRegionAroundNPC(zone, NPCID, zoneID) - local npc = GetNPCByID(NPCID) - + local npc = GetNPCByID(NPCID) if not npc then return end diff --git a/scripts/zones/Batallia_Downs_[S]/Zone.lua b/scripts/zones/Batallia_Downs_[S]/Zone.lua index ea1c1b1d9cc..558dd48aed2 100644 --- a/scripts/zones/Batallia_Downs_[S]/Zone.lua +++ b/scripts/zones/Batallia_Downs_[S]/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- require('scripts/globals/dark_ixion') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Beadeaux/Zone.lua b/scripts/zones/Beadeaux/Zone.lua index a586d87e88d..6a6a03dd030 100644 --- a/scripts/zones/Beadeaux/Zone.lua +++ b/scripts/zones/Beadeaux/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.BEADEAUX] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Beadeaux_[S]/Zone.lua b/scripts/zones/Beadeaux_[S]/Zone.lua index e8024f88689..9672331f0dc 100644 --- a/scripts/zones/Beadeaux_[S]/Zone.lua +++ b/scripts/zones/Beadeaux_[S]/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Beadeaux_[S] (92) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Bearclaw_Pinnacle/Zone.lua b/scripts/zones/Bearclaw_Pinnacle/Zone.lua index 161a635bd30..375c8f8ed13 100644 --- a/scripts/zones/Bearclaw_Pinnacle/Zone.lua +++ b/scripts/zones/Bearclaw_Pinnacle/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Bearclaw_Pinnacle (6) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Beaucedine_Glacier/Zone.lua b/scripts/zones/Beaucedine_Glacier/Zone.lua index 5113417526e..151534c5faf 100644 --- a/scripts/zones/Beaucedine_Glacier/Zone.lua +++ b/scripts/zones/Beaucedine_Glacier/Zone.lua @@ -4,6 +4,7 @@ local ID = zones[xi.zone.BEAUCEDINE_GLACIER] require('scripts/quests/i_can_hear_a_rainbow') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Beaucedine_Glacier_[S]/Zone.lua b/scripts/zones/Beaucedine_Glacier_[S]/Zone.lua index 76df3b7050a..00710da559f 100644 --- a/scripts/zones/Beaucedine_Glacier_[S]/Zone.lua +++ b/scripts/zones/Beaucedine_Glacier_[S]/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Beaucedine_Glacier_[S] (136) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Behemoths_Dominion/Zone.lua b/scripts/zones/Behemoths_Dominion/Zone.lua index b8a94080525..548e18f640b 100644 --- a/scripts/zones/Behemoths_Dominion/Zone.lua +++ b/scripts/zones/Behemoths_Dominion/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Behemoths_Dominion (127) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Bhaflau_Remnants/Zone.lua b/scripts/zones/Bhaflau_Remnants/Zone.lua index 4f4b05d15a2..c47c40d04ae 100644 --- a/scripts/zones/Bhaflau_Remnants/Zone.lua +++ b/scripts/zones/Bhaflau_Remnants/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Bhaflau_Remnants ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 72) - return cs + return end local pos = player:getPos() @@ -21,8 +20,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) end player:addTempItem(5400) - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -35,7 +32,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 72 + return xi.zone.ALZADAAL_UNDERSEA_RUINS end return zoneObject diff --git a/scripts/zones/Bhaflau_Thickets/Zone.lua b/scripts/zones/Bhaflau_Thickets/Zone.lua index f127421f613..c9a4c2e628c 100644 --- a/scripts/zones/Bhaflau_Thickets/Zone.lua +++ b/scripts/zones/Bhaflau_Thickets/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.BHAFLAU_THICKETS] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Bibiki_Bay/Zone.lua b/scripts/zones/Bibiki_Bay/Zone.lua index 0463b20d010..a0fc4c277ec 100644 --- a/scripts/zones/Bibiki_Bay/Zone.lua +++ b/scripts/zones/Bibiki_Bay/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Bibiki_Bay (4) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Bibiki_Bay/mobs/Shen.lua b/scripts/zones/Bibiki_Bay/mobs/Shen.lua index 2f55bc90dae..f79aa81d1f4 100644 --- a/scripts/zones/Bibiki_Bay/mobs/Shen.lua +++ b/scripts/zones/Bibiki_Bay/mobs/Shen.lua @@ -94,7 +94,6 @@ end entity.onSpellPrecast = function(mob, spell) local target = mob:getTarget() - if not target then return end diff --git a/scripts/zones/Boneyard_Gully/Zone.lua b/scripts/zones/Boneyard_Gully/Zone.lua index fa2a9ff96f5..754deb54f74 100644 --- a/scripts/zones/Boneyard_Gully/Zone.lua +++ b/scripts/zones/Boneyard_Gully/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Boneyard_Gully (8) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Boneyard_Gully/mobs/Bladmall.lua b/scripts/zones/Boneyard_Gully/mobs/Bladmall.lua index 20f1bfc8e68..820906aa4ef 100644 --- a/scripts/zones/Boneyard_Gully/mobs/Bladmall.lua +++ b/scripts/zones/Boneyard_Gully/mobs/Bladmall.lua @@ -14,7 +14,6 @@ end entity.onMobFight = function(mob, target) local hpp = mob:getHPP() local battlefield = mob:getBattlefield() - if not battlefield then return end diff --git a/scripts/zones/Boneyard_Gully/mobs/Parata.lua b/scripts/zones/Boneyard_Gully/mobs/Parata.lua index f8a3ef7c57e..e7960d099ef 100644 --- a/scripts/zones/Boneyard_Gully/mobs/Parata.lua +++ b/scripts/zones/Boneyard_Gully/mobs/Parata.lua @@ -14,7 +14,6 @@ end entity.onMobFight = function(mob, target) local hpp = mob:getHPP() local battlefield = mob:getBattlefield() - if not battlefield then return end diff --git a/scripts/zones/Bostaunieux_Oubliette/Zone.lua b/scripts/zones/Bostaunieux_Oubliette/Zone.lua index 3f0d639331b..aabc1cd2e4c 100644 --- a/scripts/zones/Bostaunieux_Oubliette/Zone.lua +++ b/scripts/zones/Bostaunieux_Oubliette/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.BOSTAUNIEUX_OUBLIETTE] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Buburimu_Peninsula/Zone.lua b/scripts/zones/Buburimu_Peninsula/Zone.lua index abe61f9a129..03decd5ef72 100644 --- a/scripts/zones/Buburimu_Peninsula/Zone.lua +++ b/scripts/zones/Buburimu_Peninsula/Zone.lua @@ -5,6 +5,7 @@ local ID = zones[xi.zone.BUBURIMU_PENINSULA] require('scripts/quests/i_can_hear_a_rainbow') require('scripts/missions/amk/helpers') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Caedarva_Mire/Zone.lua b/scripts/zones/Caedarva_Mire/Zone.lua index e3752f78c01..65b3ac7e9ab 100644 --- a/scripts/zones/Caedarva_Mire/Zone.lua +++ b/scripts/zones/Caedarva_Mire/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.CAEDARVA_MIRE] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Cape_Teriggan/Zone.lua b/scripts/zones/Cape_Teriggan/Zone.lua index 0252724ec21..6cd4da05933 100644 --- a/scripts/zones/Cape_Teriggan/Zone.lua +++ b/scripts/zones/Cape_Teriggan/Zone.lua @@ -5,6 +5,7 @@ local ID = zones[xi.zone.CAPE_TERIGGAN] ----------------------------------- require('scripts/quests/i_can_hear_a_rainbow') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Carpenters_Landing/Zone.lua b/scripts/zones/Carpenters_Landing/Zone.lua index 9efe6870181..f12fd7615db 100644 --- a/scripts/zones/Carpenters_Landing/Zone.lua +++ b/scripts/zones/Carpenters_Landing/Zone.lua @@ -4,6 +4,7 @@ local func = require('scripts/zones/Carpenters_Landing/globals') local ID = zones[xi.zone.CARPENTERS_LANDING] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Castle_Oztroja/Zone.lua b/scripts/zones/Castle_Oztroja/Zone.lua index 446fdea8983..29c1c689c04 100644 --- a/scripts/zones/Castle_Oztroja/Zone.lua +++ b/scripts/zones/Castle_Oztroja/Zone.lua @@ -4,6 +4,7 @@ local oztrojaGlobal = require('scripts/zones/Castle_Oztroja/globals') local ID = zones[xi.zone.CASTLE_OZTROJA] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Castle_Oztroja_[S]/Zone.lua b/scripts/zones/Castle_Oztroja_[S]/Zone.lua index 19a647c3942..62a57864d4b 100644 --- a/scripts/zones/Castle_Oztroja_[S]/Zone.lua +++ b/scripts/zones/Castle_Oztroja_[S]/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.CASTLE_OZTROJA_S] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Castle_Zvahl_Baileys/Zone.lua b/scripts/zones/Castle_Zvahl_Baileys/Zone.lua index bdff7f844d9..387cc203782 100644 --- a/scripts/zones/Castle_Zvahl_Baileys/Zone.lua +++ b/scripts/zones/Castle_Zvahl_Baileys/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.CASTLE_ZVAHL_BAILEYS] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Castle_Zvahl_Baileys_[S]/Zone.lua b/scripts/zones/Castle_Zvahl_Baileys_[S]/Zone.lua index 6bbdf9290be..dae6aba0cbd 100644 --- a/scripts/zones/Castle_Zvahl_Baileys_[S]/Zone.lua +++ b/scripts/zones/Castle_Zvahl_Baileys_[S]/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Castle_Zvahl_Baileys_[S] (138) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Castle_Zvahl_Keep/Zone.lua b/scripts/zones/Castle_Zvahl_Keep/Zone.lua index b1d4f3f9890..698223e854b 100644 --- a/scripts/zones/Castle_Zvahl_Keep/Zone.lua +++ b/scripts/zones/Castle_Zvahl_Keep/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Castle_Zvahl_Keep (162) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Castle_Zvahl_Keep_[S]/Zone.lua b/scripts/zones/Castle_Zvahl_Keep_[S]/Zone.lua index c96aec91864..f289e2db843 100644 --- a/scripts/zones/Castle_Zvahl_Keep_[S]/Zone.lua +++ b/scripts/zones/Castle_Zvahl_Keep_[S]/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Castle_Zvahl_Keep_[S] (155) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Ceizak_Battlegrounds/Zone.lua b/scripts/zones/Ceizak_Battlegrounds/Zone.lua index 8bdbfb4f787..fa94ae495a6 100644 --- a/scripts/zones/Ceizak_Battlegrounds/Zone.lua +++ b/scripts/zones/Ceizak_Battlegrounds/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.CEIZAK_BATTLEGROUNDS] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Celennia_Memorial_Library/Zone.lua b/scripts/zones/Celennia_Memorial_Library/Zone.lua index e6a959622a6..5da8ab53245 100644 --- a/scripts/zones/Celennia_Memorial_Library/Zone.lua +++ b/scripts/zones/Celennia_Memorial_Library/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Celennia Memorial Library (284) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Chamber_of_Oracles/Zone.lua b/scripts/zones/Chamber_of_Oracles/Zone.lua index ba10b005511..5815041b3cb 100644 --- a/scripts/zones/Chamber_of_Oracles/Zone.lua +++ b/scripts/zones/Chamber_of_Oracles/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Chamber_of_Oracles (168) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Chateau_dOraguille/Zone.lua b/scripts/zones/Chateau_dOraguille/Zone.lua index fa07d4afe29..e494b5d4181 100644 --- a/scripts/zones/Chateau_dOraguille/Zone.lua +++ b/scripts/zones/Chateau_dOraguille/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Chateau_dOraguille (233) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Chocobo_Circuit/Zone.lua b/scripts/zones/Chocobo_Circuit/Zone.lua index ab7b28d657c..8db9650f0bc 100644 --- a/scripts/zones/Chocobo_Circuit/Zone.lua +++ b/scripts/zones/Chocobo_Circuit/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Chocobo_Circuit ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Cirdas_Caverns/Zone.lua b/scripts/zones/Cirdas_Caverns/Zone.lua index dea642dddf6..1a08e42aa39 100644 --- a/scripts/zones/Cirdas_Caverns/Zone.lua +++ b/scripts/zones/Cirdas_Caverns/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Cirdas Caverns ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Cirdas_Caverns_U/Zone.lua b/scripts/zones/Cirdas_Caverns_U/Zone.lua index 92284424b60..47a0aea93f2 100644 --- a/scripts/zones/Cirdas_Caverns_U/Zone.lua +++ b/scripts/zones/Cirdas_Caverns_U/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Cirdas Caverns U ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 72) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -33,7 +30,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 72 + return xi.zone.ALZADAAL_UNDERSEA_RUINS end return zoneObject diff --git a/scripts/zones/Cloister_of_Flames/Zone.lua b/scripts/zones/Cloister_of_Flames/Zone.lua index 3dc05fec9e3..d90c9293e66 100644 --- a/scripts/zones/Cloister_of_Flames/Zone.lua +++ b/scripts/zones/Cloister_of_Flames/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Cloister_of_Flames (207) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Cloister_of_Frost/Zone.lua b/scripts/zones/Cloister_of_Frost/Zone.lua index aecc0e76e44..3d9f4ab20bc 100644 --- a/scripts/zones/Cloister_of_Frost/Zone.lua +++ b/scripts/zones/Cloister_of_Frost/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Cloister_of_Frost (203) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Cloister_of_Gales/Zone.lua b/scripts/zones/Cloister_of_Gales/Zone.lua index ebb47113319..f7874092cf7 100644 --- a/scripts/zones/Cloister_of_Gales/Zone.lua +++ b/scripts/zones/Cloister_of_Gales/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Cloister_of_Gales (201) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Cloister_of_Storms/Zone.lua b/scripts/zones/Cloister_of_Storms/Zone.lua index 9191a4e1d0f..e1029e1733b 100644 --- a/scripts/zones/Cloister_of_Storms/Zone.lua +++ b/scripts/zones/Cloister_of_Storms/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Cloister_of_Storms (202) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Cloister_of_Tides/Zone.lua b/scripts/zones/Cloister_of_Tides/Zone.lua index da7c69beb6a..9ae4b70582a 100644 --- a/scripts/zones/Cloister_of_Tides/Zone.lua +++ b/scripts/zones/Cloister_of_Tides/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Cloister_of_Tides (211) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Cloister_of_Tremors/Zone.lua b/scripts/zones/Cloister_of_Tremors/Zone.lua index 5ea9704c7d1..d30b80b32c8 100644 --- a/scripts/zones/Cloister_of_Tremors/Zone.lua +++ b/scripts/zones/Cloister_of_Tremors/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Cloister_of_Tremors (209) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Crawlers_Nest/Zone.lua b/scripts/zones/Crawlers_Nest/Zone.lua index 3f073b0b58e..34406f21815 100644 --- a/scripts/zones/Crawlers_Nest/Zone.lua +++ b/scripts/zones/Crawlers_Nest/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.CRAWLERS_NEST] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Crawlers_Nest_[S]/Zone.lua b/scripts/zones/Crawlers_Nest_[S]/Zone.lua index a6b55bcb6d3..15975f2f464 100644 --- a/scripts/zones/Crawlers_Nest_[S]/Zone.lua +++ b/scripts/zones/Crawlers_Nest_[S]/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Crawlers_Nest_[S] (171) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Dangruf_Wadi/Zone.lua b/scripts/zones/Dangruf_Wadi/Zone.lua index b718b90623f..99b0a2a57ff 100644 --- a/scripts/zones/Dangruf_Wadi/Zone.lua +++ b/scripts/zones/Dangruf_Wadi/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.DANGRUF_WADI] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) @@ -62,7 +63,6 @@ end zoneObject.onGameHour = function(zone) local nm = GetMobByID(ID.mob.GEYSER_LIZARD) - if not nm then return end diff --git a/scripts/zones/Davoi/Zone.lua b/scripts/zones/Davoi/Zone.lua index 8df831cf62a..8951e60861a 100644 --- a/scripts/zones/Davoi/Zone.lua +++ b/scripts/zones/Davoi/Zone.lua @@ -4,6 +4,7 @@ local ID = zones[xi.zone.DAVOI] require('scripts/quests/otherAreas/helpers') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Den_of_Rancor/Zone.lua b/scripts/zones/Den_of_Rancor/Zone.lua index 80e0dd0deff..3cdc1815424 100644 --- a/scripts/zones/Den_of_Rancor/Zone.lua +++ b/scripts/zones/Den_of_Rancor/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Den_of_Rancor (160) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Desuetia_Empyreal_Paradox/Zone.lua b/scripts/zones/Desuetia_Empyreal_Paradox/Zone.lua index 7d860ffd741..62dae5505b5 100644 --- a/scripts/zones/Desuetia_Empyreal_Paradox/Zone.lua +++ b/scripts/zones/Desuetia_Empyreal_Paradox/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Desuetia Empyreal Paradox (290) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Dho_Gates/Zone.lua b/scripts/zones/Dho_Gates/Zone.lua index 89b5ef14b80..4e989e42bf2 100644 --- a/scripts/zones/Dho_Gates/Zone.lua +++ b/scripts/zones/Dho_Gates/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Dho Gates ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Diorama_Abdhaljs-Ghelsba/Zone.lua b/scripts/zones/Diorama_Abdhaljs-Ghelsba/Zone.lua index ab7b56474c3..b40667e9f94 100644 --- a/scripts/zones/Diorama_Abdhaljs-Ghelsba/Zone.lua +++ b/scripts/zones/Diorama_Abdhaljs-Ghelsba/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Diorama_Abdhaljs-Ghelsba ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Dragons_Aery/Zone.lua b/scripts/zones/Dragons_Aery/Zone.lua index 7580beb496f..aedf6ebfcf3 100644 --- a/scripts/zones/Dragons_Aery/Zone.lua +++ b/scripts/zones/Dragons_Aery/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Dragons_Aery (154) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Dynamis-Bastok/Zone.lua b/scripts/zones/Dynamis-Bastok/Zone.lua index 12d785e850e..7c2aa3cc206 100644 --- a/scripts/zones/Dynamis-Bastok/Zone.lua +++ b/scripts/zones/Dynamis-Bastok/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Dynamis-Bastok ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Dynamis-Bastok_[D]/Zone.lua b/scripts/zones/Dynamis-Bastok_[D]/Zone.lua index c82a5eec97e..b3505bdd97f 100644 --- a/scripts/zones/Dynamis-Bastok_[D]/Zone.lua +++ b/scripts/zones/Dynamis-Bastok_[D]/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Dynamis-Bastok [D] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 72) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -33,7 +30,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 72 + return xi.zone.BASTOK_MINES end return zoneObject diff --git a/scripts/zones/Dynamis-Beaucedine/Zone.lua b/scripts/zones/Dynamis-Beaucedine/Zone.lua index 3e607cb6062..426b96146dc 100644 --- a/scripts/zones/Dynamis-Beaucedine/Zone.lua +++ b/scripts/zones/Dynamis-Beaucedine/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Dynamis-Beaucedine ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Dynamis-Buburimu/Zone.lua b/scripts/zones/Dynamis-Buburimu/Zone.lua index e25b2fc38e8..8b01941b7a4 100644 --- a/scripts/zones/Dynamis-Buburimu/Zone.lua +++ b/scripts/zones/Dynamis-Buburimu/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Dynamis-Buburimu ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Dynamis-Jeuno/Zone.lua b/scripts/zones/Dynamis-Jeuno/Zone.lua index 83dbffb3ae5..eb7ff28623e 100644 --- a/scripts/zones/Dynamis-Jeuno/Zone.lua +++ b/scripts/zones/Dynamis-Jeuno/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Dynamis-Jeuno ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Dynamis-Jeuno_[D]/Zone.lua b/scripts/zones/Dynamis-Jeuno_[D]/Zone.lua index 658425fbcfa..dc2fe9807c0 100644 --- a/scripts/zones/Dynamis-Jeuno_[D]/Zone.lua +++ b/scripts/zones/Dynamis-Jeuno_[D]/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Dynamis-Jeuno [D] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 72) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -33,7 +30,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 72 + return xi.zone.RULUDE_GARDENS end return zoneObject diff --git a/scripts/zones/Dynamis-Qufim/Zone.lua b/scripts/zones/Dynamis-Qufim/Zone.lua index c0a5cf5eaf0..e74e3707546 100644 --- a/scripts/zones/Dynamis-Qufim/Zone.lua +++ b/scripts/zones/Dynamis-Qufim/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Dynamis-Qufim ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Dynamis-San_dOria/Zone.lua b/scripts/zones/Dynamis-San_dOria/Zone.lua index 2691fe4e4f7..828e30d0bad 100644 --- a/scripts/zones/Dynamis-San_dOria/Zone.lua +++ b/scripts/zones/Dynamis-San_dOria/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Dynamis-San_dOria ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Dynamis-San_dOria_[D]/Zone.lua b/scripts/zones/Dynamis-San_dOria_[D]/Zone.lua index b7b93d53ea8..fcefe72a239 100644 --- a/scripts/zones/Dynamis-San_dOria_[D]/Zone.lua +++ b/scripts/zones/Dynamis-San_dOria_[D]/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Dynamis-San_dOria [D] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 72) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -33,7 +30,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 72 + return xi.zone.SOUTHERN_SAN_DORIA end return zoneObject diff --git a/scripts/zones/Dynamis-Tavnazia/Zone.lua b/scripts/zones/Dynamis-Tavnazia/Zone.lua index f036cacdb30..93374609496 100644 --- a/scripts/zones/Dynamis-Tavnazia/Zone.lua +++ b/scripts/zones/Dynamis-Tavnazia/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Dynamis-Tavnazia ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Dynamis-Valkurm/Zone.lua b/scripts/zones/Dynamis-Valkurm/Zone.lua index e06893bfc29..f7ac12666e5 100644 --- a/scripts/zones/Dynamis-Valkurm/Zone.lua +++ b/scripts/zones/Dynamis-Valkurm/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Dynamis-Valkurm ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Dynamis-Windurst/Zone.lua b/scripts/zones/Dynamis-Windurst/Zone.lua index 0aa90eae5fd..97f8eef18b0 100644 --- a/scripts/zones/Dynamis-Windurst/Zone.lua +++ b/scripts/zones/Dynamis-Windurst/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Dynamis-Windurst ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Dynamis-Windurst_[D]/Zone.lua b/scripts/zones/Dynamis-Windurst_[D]/Zone.lua index 20615873612..d2236c4f01c 100644 --- a/scripts/zones/Dynamis-Windurst_[D]/Zone.lua +++ b/scripts/zones/Dynamis-Windurst_[D]/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Dynamis-Windurst [D] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 72) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -33,7 +30,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 72 + return xi.zone.WINDURST_WALLS end return zoneObject diff --git a/scripts/zones/Dynamis-Xarcabard/Zone.lua b/scripts/zones/Dynamis-Xarcabard/Zone.lua index 89a7b334f7d..89e7597ef1e 100644 --- a/scripts/zones/Dynamis-Xarcabard/Zone.lua +++ b/scripts/zones/Dynamis-Xarcabard/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Dynamis-Xarcabard ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/East_Ronfaure/Zone.lua b/scripts/zones/East_Ronfaure/Zone.lua index 1ddea2369ef..0c02b0b556c 100644 --- a/scripts/zones/East_Ronfaure/Zone.lua +++ b/scripts/zones/East_Ronfaure/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- require('scripts/quests/i_can_hear_a_rainbow') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/East_Ronfaure_[S]/Zone.lua b/scripts/zones/East_Ronfaure_[S]/Zone.lua index f365b78a992..7a57cbdcc2d 100644 --- a/scripts/zones/East_Ronfaure_[S]/Zone.lua +++ b/scripts/zones/East_Ronfaure_[S]/Zone.lua @@ -5,6 +5,7 @@ require('scripts/globals/dark_ixion') ----------------------------------- local ID = zones[xi.zone.EAST_RONFAURE_S] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/East_Sarutabaruta/Zone.lua b/scripts/zones/East_Sarutabaruta/Zone.lua index 5ea59f83b0f..79dce7c4caf 100644 --- a/scripts/zones/East_Sarutabaruta/Zone.lua +++ b/scripts/zones/East_Sarutabaruta/Zone.lua @@ -4,6 +4,7 @@ local ID = zones[xi.zone.EAST_SARUTABARUTA] require('scripts/quests/i_can_hear_a_rainbow') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Eastern_Adoulin/Zone.lua b/scripts/zones/Eastern_Adoulin/Zone.lua index 3c72fb9a06e..b3bb23231e9 100644 --- a/scripts/zones/Eastern_Adoulin/Zone.lua +++ b/scripts/zones/Eastern_Adoulin/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Eastern Adoulin (257) ----------------------------------- +---@type TZone local zoneObject = {} local defineZoneAroundXYZ = function(zone, id, x, y, z, distance) diff --git a/scripts/zones/Eastern_Altepa_Desert/Zone.lua b/scripts/zones/Eastern_Altepa_Desert/Zone.lua index 295a52184c3..a93d02f6438 100644 --- a/scripts/zones/Eastern_Altepa_Desert/Zone.lua +++ b/scripts/zones/Eastern_Altepa_Desert/Zone.lua @@ -5,6 +5,7 @@ local ID = zones[xi.zone.EASTERN_ALTEPA_DESERT] require('scripts/quests/i_can_hear_a_rainbow') require('scripts/missions/amk/helpers') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Empyreal_Paradox/Zone.lua b/scripts/zones/Empyreal_Paradox/Zone.lua index 89a8c2a6046..edd3afd4a52 100644 --- a/scripts/zones/Empyreal_Paradox/Zone.lua +++ b/scripts/zones/Empyreal_Paradox/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Empyreal_Paradox ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Empyreal_Paradox/mobs/Promathia_2.lua b/scripts/zones/Empyreal_Paradox/mobs/Promathia_2.lua index 76149fcf7cc..37b0a9a6068 100644 --- a/scripts/zones/Empyreal_Paradox/mobs/Promathia_2.lua +++ b/scripts/zones/Empyreal_Paradox/mobs/Promathia_2.lua @@ -16,7 +16,6 @@ end entity.onMobSpawn = function(mob) local battlefield = mob:getBattlefield() - if not battlefield then return end diff --git a/scripts/zones/Escha_RuAun/Zone.lua b/scripts/zones/Escha_RuAun/Zone.lua index 9e6a16700f5..5eca9a4726e 100644 --- a/scripts/zones/Escha_RuAun/Zone.lua +++ b/scripts/zones/Escha_RuAun/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Escha_RuAun (289) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Escha_ZiTah/Zone.lua b/scripts/zones/Escha_ZiTah/Zone.lua index 6e581ea0915..3c47507e85c 100644 --- a/scripts/zones/Escha_ZiTah/Zone.lua +++ b/scripts/zones/Escha_ZiTah/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Escha - Zi'Tah (288) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Everbloom_Hollow/Zone.lua b/scripts/zones/Everbloom_Hollow/Zone.lua index f43fb73b6c1..87d51c75ca5 100644 --- a/scripts/zones/Everbloom_Hollow/Zone.lua +++ b/scripts/zones/Everbloom_Hollow/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Everbloom_Hollow ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 72) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -33,7 +30,8 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 72 + -- NOTE: This instance zone has multiple connection points, and once + -- utilized needs to return the appropriate exit on load fail. end return zoneObject diff --git a/scripts/zones/FeiYin/Zone.lua b/scripts/zones/FeiYin/Zone.lua index 9b68a1376f4..16a80166821 100644 --- a/scripts/zones/FeiYin/Zone.lua +++ b/scripts/zones/FeiYin/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.FEIYIN] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Feretory/Zone.lua b/scripts/zones/Feretory/Zone.lua index 70316be4be8..389e99dcd32 100644 --- a/scripts/zones/Feretory/Zone.lua +++ b/scripts/zones/Feretory/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- require('scripts/globals/monstrosity') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Foret_de_Hennetiel/Zone.lua b/scripts/zones/Foret_de_Hennetiel/Zone.lua index 182e82285dd..6e4fae9b96a 100644 --- a/scripts/zones/Foret_de_Hennetiel/Zone.lua +++ b/scripts/zones/Foret_de_Hennetiel/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Foret de Hennetiel ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Fort_Ghelsba/Zone.lua b/scripts/zones/Fort_Ghelsba/Zone.lua index 699f86304ff..95dfda5987a 100644 --- a/scripts/zones/Fort_Ghelsba/Zone.lua +++ b/scripts/zones/Fort_Ghelsba/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Fort_Ghelsba (141) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Fort_Karugo-Narugo_[S]/Zone.lua b/scripts/zones/Fort_Karugo-Narugo_[S]/Zone.lua index badb9d0fe47..5d3543fea2e 100644 --- a/scripts/zones/Fort_Karugo-Narugo_[S]/Zone.lua +++ b/scripts/zones/Fort_Karugo-Narugo_[S]/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- require('scripts/globals/dark_ixion') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Full_Moon_Fountain/Zone.lua b/scripts/zones/Full_Moon_Fountain/Zone.lua index ba760cc753c..8e5c582bfd8 100644 --- a/scripts/zones/Full_Moon_Fountain/Zone.lua +++ b/scripts/zones/Full_Moon_Fountain/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Full_Moon_Fountain (170) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/GM_Home/Zone.lua b/scripts/zones/GM_Home/Zone.lua index 27531085014..dd727e63fda 100644 --- a/scripts/zones/GM_Home/Zone.lua +++ b/scripts/zones/GM_Home/Zone.lua @@ -10,6 +10,7 @@ -- 140 = Camera test. -- 141 = "Press confirm button to proceed" nonworking test. ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Garlaige_Citadel/Zone.lua b/scripts/zones/Garlaige_Citadel/Zone.lua index 7bb3d5dd3f9..4ed9bcab1ab 100644 --- a/scripts/zones/Garlaige_Citadel/Zone.lua +++ b/scripts/zones/Garlaige_Citadel/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.GARLAIGE_CITADEL] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Garlaige_Citadel_[S]/Zone.lua b/scripts/zones/Garlaige_Citadel_[S]/Zone.lua index e2769380940..2944218e72c 100644 --- a/scripts/zones/Garlaige_Citadel_[S]/Zone.lua +++ b/scripts/zones/Garlaige_Citadel_[S]/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Garlaige_Citadel_[S] (164) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Ghelsba_Outpost/Zone.lua b/scripts/zones/Ghelsba_Outpost/Zone.lua index b7d95e45b62..fc6e515ac04 100644 --- a/scripts/zones/Ghelsba_Outpost/Zone.lua +++ b/scripts/zones/Ghelsba_Outpost/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Ghelsba_Outpost (140) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Ghoyus_Reverie/Zone.lua b/scripts/zones/Ghoyus_Reverie/Zone.lua index 348d6bc3a61..4c44f3b9000 100644 --- a/scripts/zones/Ghoyus_Reverie/Zone.lua +++ b/scripts/zones/Ghoyus_Reverie/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Ghoyus_Reverie ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 72) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -33,7 +30,8 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 72 + -- NOTE: This instance zone has multiple connection points, and once + -- utilized needs to return the appropriate exit on load fail. end return zoneObject diff --git a/scripts/zones/Giddeus/Zone.lua b/scripts/zones/Giddeus/Zone.lua index 5fbd682108b..ff69da0f639 100644 --- a/scripts/zones/Giddeus/Zone.lua +++ b/scripts/zones/Giddeus/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Giddeus (145) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Grand_Palace_of_HuXzoi/Zone.lua b/scripts/zones/Grand_Palace_of_HuXzoi/Zone.lua index 5b365f5cf09..15042eee596 100644 --- a/scripts/zones/Grand_Palace_of_HuXzoi/Zone.lua +++ b/scripts/zones/Grand_Palace_of_HuXzoi/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local huxzoiGlobal = require('scripts/zones/Grand_Palace_of_HuXzoi/globals') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Grauberg_[S]/Zone.lua b/scripts/zones/Grauberg_[S]/Zone.lua index de2aa859761..4a858906ab8 100644 --- a/scripts/zones/Grauberg_[S]/Zone.lua +++ b/scripts/zones/Grauberg_[S]/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- require('scripts/globals/dark_ixion') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Gusgen_Mines/Zone.lua b/scripts/zones/Gusgen_Mines/Zone.lua index c2241cae9bf..e7d73bf07c9 100644 --- a/scripts/zones/Gusgen_Mines/Zone.lua +++ b/scripts/zones/Gusgen_Mines/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.GUSGEN_MINES] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Gustav_Tunnel/Zone.lua b/scripts/zones/Gustav_Tunnel/Zone.lua index c991f729475..022622f7e47 100644 --- a/scripts/zones/Gustav_Tunnel/Zone.lua +++ b/scripts/zones/Gustav_Tunnel/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.GUSTAV_TUNNEL] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Gwora-Corridor/Zone.lua b/scripts/zones/Gwora-Corridor/Zone.lua index 6c685ea59d2..b3d0c8cce1a 100644 --- a/scripts/zones/Gwora-Corridor/Zone.lua +++ b/scripts/zones/Gwora-Corridor/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Gwora-Corridor (278) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Gwora-Throne_Room/Zone.lua b/scripts/zones/Gwora-Throne_Room/Zone.lua index eb1b2f529bc..6cc2208b816 100644 --- a/scripts/zones/Gwora-Throne_Room/Zone.lua +++ b/scripts/zones/Gwora-Throne_Room/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Gwora-Throne_Room (299) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Hall_of_Transference/Zone.lua b/scripts/zones/Hall_of_Transference/Zone.lua index f32db888839..c3e7fa9925c 100644 --- a/scripts/zones/Hall_of_Transference/Zone.lua +++ b/scripts/zones/Hall_of_Transference/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Hall_of_Transference ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Hall_of_the_Gods/Zone.lua b/scripts/zones/Hall_of_the_Gods/Zone.lua index 280b743cffc..90c6dc95e75 100644 --- a/scripts/zones/Hall_of_the_Gods/Zone.lua +++ b/scripts/zones/Hall_of_the_Gods/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Hall_of_the_Gods (251) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Halvung/Zone.lua b/scripts/zones/Halvung/Zone.lua index 551831c220e..3a54f24211a 100644 --- a/scripts/zones/Halvung/Zone.lua +++ b/scripts/zones/Halvung/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Halvung (62) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Hazhalm_Testing_Grounds/Zone.lua b/scripts/zones/Hazhalm_Testing_Grounds/Zone.lua index 187f1791031..decd9ccf211 100644 --- a/scripts/zones/Hazhalm_Testing_Grounds/Zone.lua +++ b/scripts/zones/Hazhalm_Testing_Grounds/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Hazhalm_Testing_Grounds (78) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Heavens_Tower/Zone.lua b/scripts/zones/Heavens_Tower/Zone.lua index 9c079c798d9..7ce8bab7dc1 100644 --- a/scripts/zones/Heavens_Tower/Zone.lua +++ b/scripts/zones/Heavens_Tower/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Heavens_Tower ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Horlais_Peak/Zone.lua b/scripts/zones/Horlais_Peak/Zone.lua index 74b01a6da32..536313cfe0a 100644 --- a/scripts/zones/Horlais_Peak/Zone.lua +++ b/scripts/zones/Horlais_Peak/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Horlais_Peak (139) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Ifrits_Cauldron/Zone.lua b/scripts/zones/Ifrits_Cauldron/Zone.lua index 60d2d9675e6..0f73902728b 100644 --- a/scripts/zones/Ifrits_Cauldron/Zone.lua +++ b/scripts/zones/Ifrits_Cauldron/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.IFRITS_CAULDRON] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Ifrits_Cauldron/mobs/Bomb_Queen.lua b/scripts/zones/Ifrits_Cauldron/mobs/Bomb_Queen.lua index 6b5b9dec6d8..ee80082cd1d 100644 --- a/scripts/zones/Ifrits_Cauldron/mobs/Bomb_Queen.lua +++ b/scripts/zones/Ifrits_Cauldron/mobs/Bomb_Queen.lua @@ -61,7 +61,6 @@ entity.onMobFight = function(mob, target) end local pet = GetMobByID(petId) - if not pet then return end diff --git a/scripts/zones/Ilrusi_Atoll/Zone.lua b/scripts/zones/Ilrusi_Atoll/Zone.lua index ce2e00dfa46..4297c8429ff 100644 --- a/scripts/zones/Ilrusi_Atoll/Zone.lua +++ b/scripts/zones/Ilrusi_Atoll/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Ilrusi_Atoll (55) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 79) - return cs + return end local pos = player:getPos() @@ -21,8 +20,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) end player:addTempItem(5347) - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -38,7 +35,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 79 + return xi.zone.ARRAPAGO_REEF end return zoneObject diff --git a/scripts/zones/Ilrusi_Atoll/mobs/Carrion_Crab.lua b/scripts/zones/Ilrusi_Atoll/mobs/Carrion_Crab.lua index 0ca16bd5dd4..69b48cae8f1 100644 --- a/scripts/zones/Ilrusi_Atoll/mobs/Carrion_Crab.lua +++ b/scripts/zones/Ilrusi_Atoll/mobs/Carrion_Crab.lua @@ -12,7 +12,6 @@ end entity.onMobDespawn = function(mob) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Ilrusi_Atoll/mobs/Carrion_Leech.lua b/scripts/zones/Ilrusi_Atoll/mobs/Carrion_Leech.lua index e71e58bc5f1..28b0cfe7859 100644 --- a/scripts/zones/Ilrusi_Atoll/mobs/Carrion_Leech.lua +++ b/scripts/zones/Ilrusi_Atoll/mobs/Carrion_Leech.lua @@ -12,7 +12,6 @@ end entity.onMobDespawn = function(mob) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Ilrusi_Atoll/mobs/Carrion_Slime.lua b/scripts/zones/Ilrusi_Atoll/mobs/Carrion_Slime.lua index b0aa644e659..6e0690d1a82 100644 --- a/scripts/zones/Ilrusi_Atoll/mobs/Carrion_Slime.lua +++ b/scripts/zones/Ilrusi_Atoll/mobs/Carrion_Slime.lua @@ -12,7 +12,6 @@ end entity.onMobDespawn = function(mob) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Ilrusi_Atoll/mobs/Carrion_Toad.lua b/scripts/zones/Ilrusi_Atoll/mobs/Carrion_Toad.lua index 5271a7c18b9..a535fb777df 100644 --- a/scripts/zones/Ilrusi_Atoll/mobs/Carrion_Toad.lua +++ b/scripts/zones/Ilrusi_Atoll/mobs/Carrion_Toad.lua @@ -12,7 +12,6 @@ end entity.onMobDespawn = function(mob) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Ilrusi_Atoll/mobs/Undead_Crab.lua b/scripts/zones/Ilrusi_Atoll/mobs/Undead_Crab.lua index 84dd2c0c1ff..13786d7d86a 100644 --- a/scripts/zones/Ilrusi_Atoll/mobs/Undead_Crab.lua +++ b/scripts/zones/Ilrusi_Atoll/mobs/Undead_Crab.lua @@ -10,7 +10,6 @@ end entity.onMobDespawn = function(mob) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Ilrusi_Atoll/mobs/Undead_Leech.lua b/scripts/zones/Ilrusi_Atoll/mobs/Undead_Leech.lua index 8cb06c5f2d6..431432f0135 100644 --- a/scripts/zones/Ilrusi_Atoll/mobs/Undead_Leech.lua +++ b/scripts/zones/Ilrusi_Atoll/mobs/Undead_Leech.lua @@ -10,7 +10,6 @@ end entity.onMobDespawn = function(mob) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Ilrusi_Atoll/mobs/Undead_Slime.lua b/scripts/zones/Ilrusi_Atoll/mobs/Undead_Slime.lua index e53e4732ae1..48c8ca0c806 100644 --- a/scripts/zones/Ilrusi_Atoll/mobs/Undead_Slime.lua +++ b/scripts/zones/Ilrusi_Atoll/mobs/Undead_Slime.lua @@ -10,7 +10,6 @@ end entity.onMobDespawn = function(mob) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Ilrusi_Atoll/mobs/Undead_Toad.lua b/scripts/zones/Ilrusi_Atoll/mobs/Undead_Toad.lua index 67a9437b1a4..11ff02c82b7 100644 --- a/scripts/zones/Ilrusi_Atoll/mobs/Undead_Toad.lua +++ b/scripts/zones/Ilrusi_Atoll/mobs/Undead_Toad.lua @@ -10,7 +10,6 @@ end entity.onMobDespawn = function(mob) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Ilrusi_Atoll/npcs/Cursed_Chest.lua b/scripts/zones/Ilrusi_Atoll/npcs/Cursed_Chest.lua index c150c53d542..a1e4898a1f1 100644 --- a/scripts/zones/Ilrusi_Atoll/npcs/Cursed_Chest.lua +++ b/scripts/zones/Ilrusi_Atoll/npcs/Cursed_Chest.lua @@ -13,9 +13,8 @@ end entity.onTrigger = function(player, npc) player:messageSpecial(ID.text.CHEST) - local npcID = npc:getID() + local npcID = npc:getID() local instance = npc:getInstance() - if not instance then return end diff --git a/scripts/zones/Inner_Horutoto_Ruins/Zone.lua b/scripts/zones/Inner_Horutoto_Ruins/Zone.lua index 9905729b91a..8ad78783d26 100644 --- a/scripts/zones/Inner_Horutoto_Ruins/Zone.lua +++ b/scripts/zones/Inner_Horutoto_Ruins/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.INNER_HORUTOTO_RUINS] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Jade_Sepulcher/Zone.lua b/scripts/zones/Jade_Sepulcher/Zone.lua index 05b4daf1a8a..26d9a153335 100644 --- a/scripts/zones/Jade_Sepulcher/Zone.lua +++ b/scripts/zones/Jade_Sepulcher/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Jade_Sepulcher (67) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Jugner_Forest/Zone.lua b/scripts/zones/Jugner_Forest/Zone.lua index c8510be0201..493e40ef873 100644 --- a/scripts/zones/Jugner_Forest/Zone.lua +++ b/scripts/zones/Jugner_Forest/Zone.lua @@ -5,6 +5,7 @@ local ID = zones[xi.zone.JUGNER_FOREST] require('scripts/quests/i_can_hear_a_rainbow') require('scripts/missions/amk/helpers') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Jugner_Forest/mobs/Knight_Crab.lua b/scripts/zones/Jugner_Forest/mobs/Knight_Crab.lua index 31f1b6d6942..00bc6e04fab 100644 --- a/scripts/zones/Jugner_Forest/mobs/Knight_Crab.lua +++ b/scripts/zones/Jugner_Forest/mobs/Knight_Crab.lua @@ -24,7 +24,6 @@ end entity.onMobDespawn = function(mob) local kingArthro = GetMobByID(ID.mob.KING_ARTHRO) - if not kingArthro then return end diff --git a/scripts/zones/Jugner_Forest_[S]/Zone.lua b/scripts/zones/Jugner_Forest_[S]/Zone.lua index 6da03410af5..74a7baa7757 100644 --- a/scripts/zones/Jugner_Forest_[S]/Zone.lua +++ b/scripts/zones/Jugner_Forest_[S]/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- require('scripts/globals/dark_ixion') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Kamihr_Drifts/Zone.lua b/scripts/zones/Kamihr_Drifts/Zone.lua index 937b0c49be6..bb85e386514 100644 --- a/scripts/zones/Kamihr_Drifts/Zone.lua +++ b/scripts/zones/Kamihr_Drifts/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Kamihr Drifts ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Kazham-Jeuno_Airship/Zone.lua b/scripts/zones/Kazham-Jeuno_Airship/Zone.lua index 5a706934d9f..37b13276b31 100644 --- a/scripts/zones/Kazham-Jeuno_Airship/Zone.lua +++ b/scripts/zones/Kazham-Jeuno_Airship/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Kazham-Jeuno_Airship ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Kazham/Zone.lua b/scripts/zones/Kazham/Zone.lua index 96068ede8de..4e52ee2caca 100644 --- a/scripts/zones/Kazham/Zone.lua +++ b/scripts/zones/Kazham/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Kazham (250) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/King_Ranperres_Tomb/Zone.lua b/scripts/zones/King_Ranperres_Tomb/Zone.lua index 1645cd84fea..4954634ed63 100644 --- a/scripts/zones/King_Ranperres_Tomb/Zone.lua +++ b/scripts/zones/King_Ranperres_Tomb/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.KING_RANPERRES_TOMB] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Konschtat_Highlands/Zone.lua b/scripts/zones/Konschtat_Highlands/Zone.lua index 287c9cf7b6e..b5708a0aadb 100644 --- a/scripts/zones/Konschtat_Highlands/Zone.lua +++ b/scripts/zones/Konschtat_Highlands/Zone.lua @@ -5,6 +5,7 @@ local ID = zones[xi.zone.KONSCHTAT_HIGHLANDS] require('scripts/quests/i_can_hear_a_rainbow') require('scripts/missions/amk/helpers') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Korroloka_Tunnel/Zone.lua b/scripts/zones/Korroloka_Tunnel/Zone.lua index 94ef43bfd8b..30857d7f43a 100644 --- a/scripts/zones/Korroloka_Tunnel/Zone.lua +++ b/scripts/zones/Korroloka_Tunnel/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.KORROLOKA_TUNNEL] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Korroloka_Tunnel/globals.lua b/scripts/zones/Korroloka_Tunnel/globals.lua index c34ab756500..2b4aa24d582 100644 --- a/scripts/zones/Korroloka_Tunnel/globals.lua +++ b/scripts/zones/Korroloka_Tunnel/globals.lua @@ -11,7 +11,6 @@ local korrolokaGlobal = {} local moveMorionWormQM moveMorionWormQM = function() local npc = GetNPCByID(ID.npc.MORION_WORM_QM) - if not npc then return end diff --git a/scripts/zones/Kuftal_Tunnel/Zone.lua b/scripts/zones/Kuftal_Tunnel/Zone.lua index f9f7f499d03..058cbae01d2 100644 --- a/scripts/zones/Kuftal_Tunnel/Zone.lua +++ b/scripts/zones/Kuftal_Tunnel/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.KUFTAL_TUNNEL] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Kuftal_Tunnel/globals.lua b/scripts/zones/Kuftal_Tunnel/globals.lua index c26b4bfcf56..017c66b59eb 100644 --- a/scripts/zones/Kuftal_Tunnel/globals.lua +++ b/scripts/zones/Kuftal_Tunnel/globals.lua @@ -10,7 +10,6 @@ local kuftalGlobal = {} local movePhantomWormQM movePhantomWormQM = function() local npc = GetNPCByID(ID.npc.PHANTOM_WORM_QM) - if not npc then return end diff --git a/scripts/zones/LaLoff_Amphitheater/Zone.lua b/scripts/zones/LaLoff_Amphitheater/Zone.lua index d6d4a400f1d..82371ddd55c 100644 --- a/scripts/zones/LaLoff_Amphitheater/Zone.lua +++ b/scripts/zones/LaLoff_Amphitheater/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: LaLoff_Amphitheater (180) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/LaLoff_Amphitheater/mobs/Ark_Angel_MR.lua b/scripts/zones/LaLoff_Amphitheater/mobs/Ark_Angel_MR.lua index b982a06f736..a0a51f3d0da 100644 --- a/scripts/zones/LaLoff_Amphitheater/mobs/Ark_Angel_MR.lua +++ b/scripts/zones/LaLoff_Amphitheater/mobs/Ark_Angel_MR.lua @@ -62,7 +62,6 @@ entity.onMobFight = function(mob, target) end local battlefield = mob:getBattlefield() - if not battlefield then return end diff --git a/scripts/zones/La_Theine_Plateau/Zone.lua b/scripts/zones/La_Theine_Plateau/Zone.lua index 5bec7316a49..9e024eb5376 100644 --- a/scripts/zones/La_Theine_Plateau/Zone.lua +++ b/scripts/zones/La_Theine_Plateau/Zone.lua @@ -5,6 +5,7 @@ local ID = zones[xi.zone.LA_THEINE_PLATEAU] local laTheineGlobal = require('scripts/zones/La_Theine_Plateau/globals') require('scripts/quests/i_can_hear_a_rainbow') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) @@ -49,13 +50,12 @@ end zoneObject.onZoneWeatherChange = function(weather) local rainbow = GetNPCByID(ID.npc.RAINBOW) - local timeOfTheDay = VanadielTOTD() - if not rainbow then return end - local setRainbow = rainbow:getLocalVar('setRainbow') + local timeOfTheDay = VanadielTOTD() + local setRainbow = rainbow:getLocalVar('setRainbow') if setRainbow == 1 and weather ~= xi.weather.RAIN and @@ -76,7 +76,6 @@ end zoneObject.onTOTDChange = function(timeOfTheDay) local rainbow = GetNPCByID(ID.npc.RAINBOW) - if not rainbow then return end diff --git a/scripts/zones/La_Theine_Plateau/globals.lua b/scripts/zones/La_Theine_Plateau/globals.lua index 97c52242ad2..752135752e4 100644 --- a/scripts/zones/La_Theine_Plateau/globals.lua +++ b/scripts/zones/La_Theine_Plateau/globals.lua @@ -77,7 +77,6 @@ local laTheineGlobal = } local fallenEgg = GetNPCByID(ID.npc.FALLEN_EGG) - if not fallenEgg then return end diff --git a/scripts/zones/La_Vaule_[S]/Zone.lua b/scripts/zones/La_Vaule_[S]/Zone.lua index 969e3c41c07..571c1b73f1b 100644 --- a/scripts/zones/La_Vaule_[S]/Zone.lua +++ b/scripts/zones/La_Vaule_[S]/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: La_Vaule_[S] (85) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Labyrinth_of_Onzozo/Zone.lua b/scripts/zones/Labyrinth_of_Onzozo/Zone.lua index ac0db0343cb..7c211dd6c51 100644 --- a/scripts/zones/Labyrinth_of_Onzozo/Zone.lua +++ b/scripts/zones/Labyrinth_of_Onzozo/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.LABYRINTH_OF_ONZOZO] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Leafallia/Zone.lua b/scripts/zones/Leafallia/Zone.lua index 966131445b9..77b0b064c93 100644 --- a/scripts/zones/Leafallia/Zone.lua +++ b/scripts/zones/Leafallia/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Leafallia ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Lebros_Cavern/Zone.lua b/scripts/zones/Lebros_Cavern/Zone.lua index a534d6b5d2b..49f83caa727 100644 --- a/scripts/zones/Lebros_Cavern/Zone.lua +++ b/scripts/zones/Lebros_Cavern/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Lebros_Cavern ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, xi.zone.MOUNT_ZHAYOLM) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -32,6 +29,10 @@ end zoneObject.onEventFinish = function(player, csid, option, npc) if csid == 102 then local instance = player:getInstance() + if not instance then + return + end + local chars = instance:getChars() for _, entity in pairs(chars) do @@ -41,7 +42,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 61 + return xi.zone.MOUNT_ZHAYOLM end return zoneObject diff --git a/scripts/zones/Lebros_Cavern/mobs/Brittle_Rock.lua b/scripts/zones/Lebros_Cavern/mobs/Brittle_Rock.lua index 221d79ac78a..afdee5eada6 100644 --- a/scripts/zones/Lebros_Cavern/mobs/Brittle_Rock.lua +++ b/scripts/zones/Lebros_Cavern/mobs/Brittle_Rock.lua @@ -31,9 +31,8 @@ end entity.onMobDeath = function(mob, player, optParams) if mob:getLocalVar('dead') == 0 then mob:setLocalVar('dead', 1) - local mobID = mob:getID() + local mobID = mob:getID() local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Lebros_Cavern/mobs/Broken_Troll_Soldier.lua b/scripts/zones/Lebros_Cavern/mobs/Broken_Troll_Soldier.lua index 390df7b6cf7..5990da14655 100644 --- a/scripts/zones/Lebros_Cavern/mobs/Broken_Troll_Soldier.lua +++ b/scripts/zones/Lebros_Cavern/mobs/Broken_Troll_Soldier.lua @@ -19,7 +19,6 @@ end entity.onMobDespawn = function(mob) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Lebros_Cavern/mobs/Qiqirn_Mine.lua b/scripts/zones/Lebros_Cavern/mobs/Qiqirn_Mine.lua index 6908d91fd5c..53e09ac3881 100644 --- a/scripts/zones/Lebros_Cavern/mobs/Qiqirn_Mine.lua +++ b/scripts/zones/Lebros_Cavern/mobs/Qiqirn_Mine.lua @@ -9,7 +9,6 @@ local entity = {} entity.onMobSpawn = function(mob) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Lebros_Cavern/mobs/Ranch_Wamoura.lua b/scripts/zones/Lebros_Cavern/mobs/Ranch_Wamoura.lua index e65e405168a..c690baedcc7 100644 --- a/scripts/zones/Lebros_Cavern/mobs/Ranch_Wamoura.lua +++ b/scripts/zones/Lebros_Cavern/mobs/Ranch_Wamoura.lua @@ -13,7 +13,6 @@ end entity.onMobDespawn = function(mob) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Lebros_Cavern/mobs/Ranch_Wamouracampa.lua b/scripts/zones/Lebros_Cavern/mobs/Ranch_Wamouracampa.lua index c5c09b8da4a..6c784fd8b75 100644 --- a/scripts/zones/Lebros_Cavern/mobs/Ranch_Wamouracampa.lua +++ b/scripts/zones/Lebros_Cavern/mobs/Ranch_Wamouracampa.lua @@ -38,7 +38,6 @@ entity.onMobDespawn = function(mob) end local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Leujaoam_Sanctum/Zone.lua b/scripts/zones/Leujaoam_Sanctum/Zone.lua index fff93dc7153..d1db15e6525 100644 --- a/scripts/zones/Leujaoam_Sanctum/Zone.lua +++ b/scripts/zones/Leujaoam_Sanctum/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Leujaoam_Sanctum ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, xi.zone.CAEDARVA_MIRE) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -32,6 +29,10 @@ end zoneObject.onEventFinish = function(player, csid, option, npc) if csid == 102 then local instance = player:getInstance() + if not instance then + return + end + local chars = instance:getChars() for _, entity in pairs(chars) do @@ -41,7 +42,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 79 + return xi.zone.CAEDARVA_MIRE end return zoneObject diff --git a/scripts/zones/Leujaoam_Sanctum/mobs/Leujaoam_Worm.lua b/scripts/zones/Leujaoam_Sanctum/mobs/Leujaoam_Worm.lua index 549b29fb46c..464cb4e7b9b 100644 --- a/scripts/zones/Leujaoam_Sanctum/mobs/Leujaoam_Worm.lua +++ b/scripts/zones/Leujaoam_Sanctum/mobs/Leujaoam_Worm.lua @@ -13,7 +13,6 @@ end entity.onMobDeath = function(mob, player, optParams) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Lower_Delkfutts_Tower/Zone.lua b/scripts/zones/Lower_Delkfutts_Tower/Zone.lua index 1eee1c7da25..58f195e2f42 100644 --- a/scripts/zones/Lower_Delkfutts_Tower/Zone.lua +++ b/scripts/zones/Lower_Delkfutts_Tower/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Lower_Delkfutts_Tower (184) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Lower_Jeuno/Zone.lua b/scripts/zones/Lower_Jeuno/Zone.lua index d689334aa54..46978f32e98 100644 --- a/scripts/zones/Lower_Jeuno/Zone.lua +++ b/scripts/zones/Lower_Jeuno/Zone.lua @@ -4,6 +4,7 @@ local ID = zones[xi.zone.LOWER_JEUNO] local lowerJeunoGlobal = require('scripts/zones/Lower_Jeuno/globals') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) @@ -85,7 +86,6 @@ zoneObject.onGameHour = function(zone) elseif vanadielHour == 1 then if playerOnQuestId == 0 then local npc = GetNPCByID(ID.npc.VHANA_EHGAKLYWHA) - if not npc then return end diff --git a/scripts/zones/Lufaise_Meadows/Zone.lua b/scripts/zones/Lufaise_Meadows/Zone.lua index 39c3280035b..25baadc3340 100644 --- a/scripts/zones/Lufaise_Meadows/Zone.lua +++ b/scripts/zones/Lufaise_Meadows/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.LUFAISE_MEADOWS] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Mamook/Zone.lua b/scripts/zones/Mamook/Zone.lua index 6900131521a..e7514b61ba0 100644 --- a/scripts/zones/Mamook/Zone.lua +++ b/scripts/zones/Mamook/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Mamook (65) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Mamool_Ja_Training_Grounds/Zone.lua b/scripts/zones/Mamool_Ja_Training_Grounds/Zone.lua index df0c6e94e52..e2a8ec7bf6e 100644 --- a/scripts/zones/Mamool_Ja_Training_Grounds/Zone.lua +++ b/scripts/zones/Mamool_Ja_Training_Grounds/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Mamool_Ja_Training_Grounds ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, xi.zone.BHAFLAU_THICKETS) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -32,6 +29,10 @@ end zoneObject.onEventFinish = function(player, csid, option, npc) if csid == 102 then local instance = player:getInstance() + if not instance then + return + end + local chars = instance:getChars() for _, entity in pairs(chars) do entity:setPos(0, 0, 0, 0, xi.zone.BHAFLAU_THICKETS) @@ -40,7 +41,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 79 + return xi.zone.BHAFLAU_THICKETS end return zoneObject diff --git a/scripts/zones/Mamool_Ja_Training_Grounds/globals/zoneUtil.lua b/scripts/zones/Mamool_Ja_Training_Grounds/globals/zoneUtil.lua index bb008b67a1d..0ab8ac1f948 100644 --- a/scripts/zones/Mamool_Ja_Training_Grounds/globals/zoneUtil.lua +++ b/scripts/zones/Mamool_Ja_Training_Grounds/globals/zoneUtil.lua @@ -15,7 +15,6 @@ xi.zoneUtil.ImperialAgent_PotHatch = function(player, npc, posX, posZ, posR) if npc:getID() == instance:getProgress() then local ally = GetNPCByID(ID.npc.BRUJEEL, instance) - if not ally then return end diff --git a/scripts/zones/Mamool_Ja_Training_Grounds/mobs/Mamool_Ja_Executioner.lua b/scripts/zones/Mamool_Ja_Training_Grounds/mobs/Mamool_Ja_Executioner.lua index 03492db7c66..dc29388e736 100644 --- a/scripts/zones/Mamool_Ja_Training_Grounds/mobs/Mamool_Ja_Executioner.lua +++ b/scripts/zones/Mamool_Ja_Training_Grounds/mobs/Mamool_Ja_Executioner.lua @@ -10,7 +10,6 @@ end entity.onMobDespawn = function(mob) local instance = mob:getInstance() - if not instance then return end diff --git a/scripts/zones/Manaclipper/Zone.lua b/scripts/zones/Manaclipper/Zone.lua index 26defc009b5..7e1a9bfd518 100644 --- a/scripts/zones/Manaclipper/Zone.lua +++ b/scripts/zones/Manaclipper/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.MANACLIPPER] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Maquette_Abdhaljs-Legion_A/Zone.lua b/scripts/zones/Maquette_Abdhaljs-Legion_A/Zone.lua index ec98b7ac835..6b93cd2db59 100644 --- a/scripts/zones/Maquette_Abdhaljs-Legion_A/Zone.lua +++ b/scripts/zones/Maquette_Abdhaljs-Legion_A/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Maquette Abdhaljs-Legion A ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 249) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -33,7 +30,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 249 + return xi.zone.MHAURA end return zoneObject diff --git a/scripts/zones/Maquette_Abdhaljs-Legion_B/Zone.lua b/scripts/zones/Maquette_Abdhaljs-Legion_B/Zone.lua index a98137f25ed..aa4853abd8d 100644 --- a/scripts/zones/Maquette_Abdhaljs-Legion_B/Zone.lua +++ b/scripts/zones/Maquette_Abdhaljs-Legion_B/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Maquette Abdhaljs-Legion B (287) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 249) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -33,7 +30,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 249 + return xi.zone.MHAURA end return zoneObject diff --git a/scripts/zones/Marjami_Ravine/Zone.lua b/scripts/zones/Marjami_Ravine/Zone.lua index af09be49467..6fab9dd51c6 100644 --- a/scripts/zones/Marjami_Ravine/Zone.lua +++ b/scripts/zones/Marjami_Ravine/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Marjami Ravine ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Maze_of_Shakhrami/Zone.lua b/scripts/zones/Maze_of_Shakhrami/Zone.lua index c96be9f7cd3..db67893fcaa 100644 --- a/scripts/zones/Maze_of_Shakhrami/Zone.lua +++ b/scripts/zones/Maze_of_Shakhrami/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.MAZE_OF_SHAKHRAMI] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Meriphataud_Mountains/Zone.lua b/scripts/zones/Meriphataud_Mountains/Zone.lua index 437f06d8cdd..0d6a55b3565 100644 --- a/scripts/zones/Meriphataud_Mountains/Zone.lua +++ b/scripts/zones/Meriphataud_Mountains/Zone.lua @@ -5,6 +5,7 @@ local ID = zones[xi.zone.MERIPHATAUD_MOUNTAINS] require('scripts/quests/i_can_hear_a_rainbow') require('scripts/missions/amk/helpers') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Meriphataud_Mountains_[S]/Zone.lua b/scripts/zones/Meriphataud_Mountains_[S]/Zone.lua index 0ba8a6cde71..6e41738e67e 100644 --- a/scripts/zones/Meriphataud_Mountains_[S]/Zone.lua +++ b/scripts/zones/Meriphataud_Mountains_[S]/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.MERIPHATAUD_MOUNTAINS_S] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Metalworks/Zone.lua b/scripts/zones/Metalworks/Zone.lua index 64686f8ee5b..71bddf7071a 100644 --- a/scripts/zones/Metalworks/Zone.lua +++ b/scripts/zones/Metalworks/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Metalworks (237) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Mhaura/Zone.lua b/scripts/zones/Mhaura/Zone.lua index 5801934f38b..05cc2f235f7 100644 --- a/scripts/zones/Mhaura/Zone.lua +++ b/scripts/zones/Mhaura/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.MHAURA] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onGameHour = function(zone) diff --git a/scripts/zones/Middle_Delkfutts_Tower/Zone.lua b/scripts/zones/Middle_Delkfutts_Tower/Zone.lua index 888d26b32f1..d3e9bd5ffc1 100644 --- a/scripts/zones/Middle_Delkfutts_Tower/Zone.lua +++ b/scripts/zones/Middle_Delkfutts_Tower/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Middle_Delkfutts_Tower ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Mine_Shaft_2716/Zone.lua b/scripts/zones/Mine_Shaft_2716/Zone.lua index f41efa72523..a68d5a54b57 100644 --- a/scripts/zones/Mine_Shaft_2716/Zone.lua +++ b/scripts/zones/Mine_Shaft_2716/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Mine_Shaft_2716 (13) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Misareaux_Coast/Zone.lua b/scripts/zones/Misareaux_Coast/Zone.lua index 48732edd58f..124e8615091 100644 --- a/scripts/zones/Misareaux_Coast/Zone.lua +++ b/scripts/zones/Misareaux_Coast/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local misareauxGlobal = require('scripts/zones/Misareaux_Coast/globals') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Mog_Garden/Zone.lua b/scripts/zones/Mog_Garden/Zone.lua index 9d4529a6674..aa8c6536e30 100644 --- a/scripts/zones/Mog_Garden/Zone.lua +++ b/scripts/zones/Mog_Garden/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Mog Garden (280) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Moh_Gates/Zone.lua b/scripts/zones/Moh_Gates/Zone.lua index 85f81d5b727..cf411f560b9 100644 --- a/scripts/zones/Moh_Gates/Zone.lua +++ b/scripts/zones/Moh_Gates/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Moh Gates ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Monarch_Linn/Zone.lua b/scripts/zones/Monarch_Linn/Zone.lua index 126684b70ac..1227d06b4e3 100644 --- a/scripts/zones/Monarch_Linn/Zone.lua +++ b/scripts/zones/Monarch_Linn/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Monarch_Linn ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Monastic_Cavern/Zone.lua b/scripts/zones/Monastic_Cavern/Zone.lua index 9e15a229eea..8130dc3835c 100644 --- a/scripts/zones/Monastic_Cavern/Zone.lua +++ b/scripts/zones/Monastic_Cavern/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.MONASTIC_CAVERN] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Mordion_Gaol/Zone.lua b/scripts/zones/Mordion_Gaol/Zone.lua index f44e6ead90f..dc41e86d594 100644 --- a/scripts/zones/Mordion_Gaol/Zone.lua +++ b/scripts/zones/Mordion_Gaol/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Mordion_Gaol ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Morimar_Basalt_Fields/Zone.lua b/scripts/zones/Morimar_Basalt_Fields/Zone.lua index a76e4893a3e..4d1944e12fe 100644 --- a/scripts/zones/Morimar_Basalt_Fields/Zone.lua +++ b/scripts/zones/Morimar_Basalt_Fields/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Morimar Basalt Fields ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Mount_Kamihr/Zone.lua b/scripts/zones/Mount_Kamihr/Zone.lua index f967b36566f..f9cea473798 100644 --- a/scripts/zones/Mount_Kamihr/Zone.lua +++ b/scripts/zones/Mount_Kamihr/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Mount Kamihr ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Mount_Zhayolm/Zone.lua b/scripts/zones/Mount_Zhayolm/Zone.lua index d49f4770ec6..06597291b52 100644 --- a/scripts/zones/Mount_Zhayolm/Zone.lua +++ b/scripts/zones/Mount_Zhayolm/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.MOUNT_ZHAYOLM] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Nashmau/Zone.lua b/scripts/zones/Nashmau/Zone.lua index 1f26eaff023..8500fc7c9f5 100644 --- a/scripts/zones/Nashmau/Zone.lua +++ b/scripts/zones/Nashmau/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Nashmau (53) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Navukgo_Execution_Chamber/Zone.lua b/scripts/zones/Navukgo_Execution_Chamber/Zone.lua index f0480d94092..09453bcb4af 100644 --- a/scripts/zones/Navukgo_Execution_Chamber/Zone.lua +++ b/scripts/zones/Navukgo_Execution_Chamber/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Navukgo_Execution_Chamber (64) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Newton_Movalpolos/Zone.lua b/scripts/zones/Newton_Movalpolos/Zone.lua index 0615cc42c58..15431418408 100644 --- a/scripts/zones/Newton_Movalpolos/Zone.lua +++ b/scripts/zones/Newton_Movalpolos/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Newton_Movalpolos (12) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Norg/Zone.lua b/scripts/zones/Norg/Zone.lua index 7651976d235..677edd2b709 100644 --- a/scripts/zones/Norg/Zone.lua +++ b/scripts/zones/Norg/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Norg (252) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/North_Gustaberg/Zone.lua b/scripts/zones/North_Gustaberg/Zone.lua index a21f38df4b3..bc029f5153b 100644 --- a/scripts/zones/North_Gustaberg/Zone.lua +++ b/scripts/zones/North_Gustaberg/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- require('scripts/quests/i_can_hear_a_rainbow') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/North_Gustaberg_[S]/Zone.lua b/scripts/zones/North_Gustaberg_[S]/Zone.lua index c3e02bd40a5..ed0d251edb4 100644 --- a/scripts/zones/North_Gustaberg_[S]/Zone.lua +++ b/scripts/zones/North_Gustaberg_[S]/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.NORTH_GUSTABERG_S] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Northern_San_dOria/Zone.lua b/scripts/zones/Northern_San_dOria/Zone.lua index 4f82b5f258d..cf079fa1f26 100644 --- a/scripts/zones/Northern_San_dOria/Zone.lua +++ b/scripts/zones/Northern_San_dOria/Zone.lua @@ -4,6 +4,7 @@ local ID = zones[xi.zone.NORTHERN_SAN_DORIA] require('scripts/quests/flyers_for_regine') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Nyzul_Isle/Zone.lua b/scripts/zones/Nyzul_Isle/Zone.lua index 0ebd08d6275..7653e051f94 100644 --- a/scripts/zones/Nyzul_Isle/Zone.lua +++ b/scripts/zones/Nyzul_Isle/Zone.lua @@ -1,18 +1,17 @@ ----------------------------------- -- Zone: Nyzul_Isle ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, xi.zone.ALZADAAL_UNDERSEA_RUINS) - return cs + return end local pos = player:getPos() @@ -30,8 +29,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) player:entityVisualPacket('1pa1') player:entityVisualPacket('1pb1') player:entityVisualPacket('2pb1') - - return cs end -- NOTE: This is called after onInstanceZoneIn for the fade in cutscene. diff --git a/scripts/zones/Nyzul_Isle/mobs/Gem_Heister_Roorooroon.lua b/scripts/zones/Nyzul_Isle/mobs/Gem_Heister_Roorooroon.lua index d7b13c21452..1b2d482d819 100644 --- a/scripts/zones/Nyzul_Isle/mobs/Gem_Heister_Roorooroon.lua +++ b/scripts/zones/Nyzul_Isle/mobs/Gem_Heister_Roorooroon.lua @@ -44,13 +44,13 @@ end local function dropBomb(mob) local instance = mob:getInstance() local bombMob = GetMobByID(mob:getID() + 1, instance) - local target = mob:getTarget() - local pos = mob:getPos() - if not bombMob then return end + local target = mob:getTarget() + local pos = mob:getPos() + bombMob:setPos(pos.x, pos.y, pos.z, pos.rot) bombMob:setStatus(xi.status.UPDATE) diff --git a/scripts/zones/Nyzul_Isle/mobs/Stealth_Bomber_Gagaroon.lua b/scripts/zones/Nyzul_Isle/mobs/Stealth_Bomber_Gagaroon.lua index db419b1c352..e1a60cc6f64 100644 --- a/scripts/zones/Nyzul_Isle/mobs/Stealth_Bomber_Gagaroon.lua +++ b/scripts/zones/Nyzul_Isle/mobs/Stealth_Bomber_Gagaroon.lua @@ -44,13 +44,13 @@ end local function dropBomb(mob) local instance = mob:getInstance() local bombMob = GetMobByID(mob:getID() - 1, instance) - local target = mob:getTarget() - local pos = mob:getPos() - if not bombMob then return end + local target = mob:getTarget() + local pos = mob:getPos() + bombMob:setPos(pos.x, pos.y, pos.z, pos.rot) bombMob:setStatus(xi.status.UPDATE) diff --git a/scripts/zones/Nyzul_Isle/npcs/Rune_of_Transfer.lua b/scripts/zones/Nyzul_Isle/npcs/Rune_of_Transfer.lua index 5b4e28aa31f..cd3d797d530 100644 --- a/scripts/zones/Nyzul_Isle/npcs/Rune_of_Transfer.lua +++ b/scripts/zones/Nyzul_Isle/npcs/Rune_of_Transfer.lua @@ -11,7 +11,6 @@ local entity = {} entity.onTrigger = function(player, npc) local instance = npc:getInstance() - if not instance then return end @@ -54,7 +53,6 @@ end entity.onEventFinish = function(player, csid, option, npc) local instance = npc:getInstance() - if not instance then return end diff --git a/scripts/zones/Nyzul_Isle/npcs/Rune_of_Transfer_Start.lua b/scripts/zones/Nyzul_Isle/npcs/Rune_of_Transfer_Start.lua index 47b68377571..d2c198d491f 100644 --- a/scripts/zones/Nyzul_Isle/npcs/Rune_of_Transfer_Start.lua +++ b/scripts/zones/Nyzul_Isle/npcs/Rune_of_Transfer_Start.lua @@ -12,7 +12,6 @@ local entity = {} entity.onTrigger = function(player, npc) local instance = player:getInstance() - if not instance then return end @@ -37,7 +36,6 @@ end entity.onEventFinish = function(player, csid, option, npc) local instance = npc:getInstance() - if not instance then return end diff --git a/scripts/zones/Nyzul_Isle/npcs/Runic_Lamp.lua b/scripts/zones/Nyzul_Isle/npcs/Runic_Lamp.lua index 7561863f298..d5dac69b355 100644 --- a/scripts/zones/Nyzul_Isle/npcs/Runic_Lamp.lua +++ b/scripts/zones/Nyzul_Isle/npcs/Runic_Lamp.lua @@ -10,7 +10,6 @@ local entity = {} entity.onTrigger = function(player, npc) local instance = npc:getInstance() - if not instance then return end @@ -72,7 +71,6 @@ end -- luacheck: ignore 561 entity.onEventFinish = function(player, csid, option, npc) local instance = npc:getInstance() - if not instance then return end diff --git a/scripts/zones/Oldton_Movalpolos/Zone.lua b/scripts/zones/Oldton_Movalpolos/Zone.lua index eecf89c4aeb..4f64d6601d6 100644 --- a/scripts/zones/Oldton_Movalpolos/Zone.lua +++ b/scripts/zones/Oldton_Movalpolos/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Oldton_Movalpolos (11) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Oldton_Movalpolos/npcs/_0b0.lua b/scripts/zones/Oldton_Movalpolos/npcs/_0b0.lua index 4c057bdf9cb..fb928b23dcf 100644 --- a/scripts/zones/Oldton_Movalpolos/npcs/_0b0.lua +++ b/scripts/zones/Oldton_Movalpolos/npcs/_0b0.lua @@ -8,7 +8,6 @@ local entity = {} entity.onTrigger = function(player, npc) local gate = GetNPCByID(npc:getID() + 3) - if not gate then return end diff --git a/scripts/zones/Oldton_Movalpolos/npcs/_0b1.lua b/scripts/zones/Oldton_Movalpolos/npcs/_0b1.lua index 50109639478..6fbf5e2673a 100644 --- a/scripts/zones/Oldton_Movalpolos/npcs/_0b1.lua +++ b/scripts/zones/Oldton_Movalpolos/npcs/_0b1.lua @@ -8,7 +8,6 @@ local entity = {} entity.onTrigger = function(player, npc) local gate = GetNPCByID(npc:getID() + 4) - if not gate then return end diff --git a/scripts/zones/Oldton_Movalpolos/npcs/_0b2.lua b/scripts/zones/Oldton_Movalpolos/npcs/_0b2.lua index fe8eddeca72..36509de8bad 100644 --- a/scripts/zones/Oldton_Movalpolos/npcs/_0b2.lua +++ b/scripts/zones/Oldton_Movalpolos/npcs/_0b2.lua @@ -8,7 +8,6 @@ local entity = {} entity.onTrigger = function(player, npc) local gate = GetNPCByID(npc:getID() + 5) - if not gate then return end diff --git a/scripts/zones/Open_sea_route_to_Al_Zahbi/Zone.lua b/scripts/zones/Open_sea_route_to_Al_Zahbi/Zone.lua index d84e850905c..6c60154cc8c 100644 --- a/scripts/zones/Open_sea_route_to_Al_Zahbi/Zone.lua +++ b/scripts/zones/Open_sea_route_to_Al_Zahbi/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.OPEN_SEA_ROUTE_TO_AL_ZAHBI] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Open_sea_route_to_Mhaura/Zone.lua b/scripts/zones/Open_sea_route_to_Mhaura/Zone.lua index b6bd1dc77e0..5b0f7973b17 100644 --- a/scripts/zones/Open_sea_route_to_Mhaura/Zone.lua +++ b/scripts/zones/Open_sea_route_to_Mhaura/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.OPEN_SEA_ROUTE_TO_MHAURA] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Ordelles_Caves/Zone.lua b/scripts/zones/Ordelles_Caves/Zone.lua index 0838a18a6fd..72f7e79f1d8 100644 --- a/scripts/zones/Ordelles_Caves/Zone.lua +++ b/scripts/zones/Ordelles_Caves/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.ORDELLES_CAVES] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Outer_Horutoto_Ruins/Zone.lua b/scripts/zones/Outer_Horutoto_Ruins/Zone.lua index 054e6a91317..53476f05e70 100644 --- a/scripts/zones/Outer_Horutoto_Ruins/Zone.lua +++ b/scripts/zones/Outer_Horutoto_Ruins/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Outer_Horutoto_Ruins (194) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Outer_Horutoto_Ruins/globals.lua b/scripts/zones/Outer_Horutoto_Ruins/globals.lua index 5723b63aab5..2a707566db4 100644 --- a/scripts/zones/Outer_Horutoto_Ruins/globals.lua +++ b/scripts/zones/Outer_Horutoto_Ruins/globals.lua @@ -48,7 +48,6 @@ local outerHorutotoGlobal = then local nmId = ID.mob.BALLOON_NM_OFFSET + math.random(1, 3) local nm = GetMobByID(nmId) - if not nm then return end diff --git a/scripts/zones/Outer_RaKaznar/Zone.lua b/scripts/zones/Outer_RaKaznar/Zone.lua index 5f8c166421e..f2d5d7f86b9 100644 --- a/scripts/zones/Outer_RaKaznar/Zone.lua +++ b/scripts/zones/Outer_RaKaznar/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Outer Ra’Kanzar (274) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Outer_RaKaznar_[U1]/Zone.lua b/scripts/zones/Outer_RaKaznar_[U1]/Zone.lua index 21a16325f7d..5054436f0ea 100644 --- a/scripts/zones/Outer_RaKaznar_[U1]/Zone.lua +++ b/scripts/zones/Outer_RaKaznar_[U1]/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Outer Ra’Kanzar [U1] (275) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 72) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -33,7 +30,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 72 + return xi.zone.OUTER_RAKAZNAR end return zoneObject diff --git a/scripts/zones/Outer_RaKaznar_[U2]/Zone.lua b/scripts/zones/Outer_RaKaznar_[U2]/Zone.lua index d9d335dbecf..d84b9290da0 100644 --- a/scripts/zones/Outer_RaKaznar_[U2]/Zone.lua +++ b/scripts/zones/Outer_RaKaznar_[U2]/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Outer Ra'Kanzar [U2] (133) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Outer_RaKaznar_[U3]/Zone.lua b/scripts/zones/Outer_RaKaznar_[U3]/Zone.lua index f0375dd0708..2ed696e29fa 100644 --- a/scripts/zones/Outer_RaKaznar_[U3]/Zone.lua +++ b/scripts/zones/Outer_RaKaznar_[U3]/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Outer Ra'Kanzar [U3] (189) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Palborough_Mines/Zone.lua b/scripts/zones/Palborough_Mines/Zone.lua index adfc3917e69..72fec14263c 100644 --- a/scripts/zones/Palborough_Mines/Zone.lua +++ b/scripts/zones/Palborough_Mines/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Palborough Mines (143) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Pashhow_Marshlands/Zone.lua b/scripts/zones/Pashhow_Marshlands/Zone.lua index dd5f37b0198..ff4641cdfca 100644 --- a/scripts/zones/Pashhow_Marshlands/Zone.lua +++ b/scripts/zones/Pashhow_Marshlands/Zone.lua @@ -5,6 +5,7 @@ local ID = zones[xi.zone.PASHHOW_MARSHLANDS] require('scripts/quests/i_can_hear_a_rainbow') require('scripts/missions/amk/helpers') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) @@ -47,7 +48,6 @@ end zoneObject.onZoneWeatherChange = function(weather) local toxicTamlyn = GetMobByID(ID.mob.TOXIC_TAMLYN) - if not toxicTamlyn then return end diff --git a/scripts/zones/Pashhow_Marshlands_[S]/Zone.lua b/scripts/zones/Pashhow_Marshlands_[S]/Zone.lua index 0a6ca371e56..81e91cd42fa 100644 --- a/scripts/zones/Pashhow_Marshlands_[S]/Zone.lua +++ b/scripts/zones/Pashhow_Marshlands_[S]/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Pashhow_Marshlands_[S] (90) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Periqia/Zone.lua b/scripts/zones/Periqia/Zone.lua index 301d6420cf2..b214cdce89c 100644 --- a/scripts/zones/Periqia/Zone.lua +++ b/scripts/zones/Periqia/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Periqia ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 79) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -32,6 +29,10 @@ end zoneObject.onEventFinish = function(player, csid, option, npc) if csid == 102 then local instance = player:getInstance() + if not instance then + return + end + local chars = instance:getChars() for _, entity in pairs(chars) do entity:setPos(0, 0, 0, 0, xi.zone.CAEDARVA_MIRE) @@ -40,7 +41,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 79 + return xi.zone.CAEDARVA_MIRE end return zoneObject diff --git a/scripts/zones/Periqia/instances/seagull_grounded.lua b/scripts/zones/Periqia/instances/seagull_grounded.lua index e31396f49d7..cd8b2ba2850 100644 --- a/scripts/zones/Periqia/instances/seagull_grounded.lua +++ b/scripts/zones/Periqia/instances/seagull_grounded.lua @@ -318,7 +318,6 @@ instanceObject.onTrack = function(instance) } local mob = GetMobByID(ID.mob[xi.assault.mission.SEAGULL_GROUNDED].MOBS_START.EXCALIAC, instance) - if not mob then return end diff --git a/scripts/zones/Phanauet_Channel/Zone.lua b/scripts/zones/Phanauet_Channel/Zone.lua index e6802e84890..2384deb625e 100644 --- a/scripts/zones/Phanauet_Channel/Zone.lua +++ b/scripts/zones/Phanauet_Channel/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Phanauet_Channel ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Phomiuna_Aqueducts/Zone.lua b/scripts/zones/Phomiuna_Aqueducts/Zone.lua index efb81ba87fc..7d4ec2e01b9 100644 --- a/scripts/zones/Phomiuna_Aqueducts/Zone.lua +++ b/scripts/zones/Phomiuna_Aqueducts/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Phomiuna_Aqueducts (27) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Port_Bastok/Zone.lua b/scripts/zones/Port_Bastok/Zone.lua index 58e597570ef..9b7defccaba 100644 --- a/scripts/zones/Port_Bastok/Zone.lua +++ b/scripts/zones/Port_Bastok/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Port_Bastok (236) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Port_Jeuno/Zone.lua b/scripts/zones/Port_Jeuno/Zone.lua index 9c2c2e28ec0..c25c44ef292 100644 --- a/scripts/zones/Port_Jeuno/Zone.lua +++ b/scripts/zones/Port_Jeuno/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Port_Jeuno (246) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Port_San_dOria/Zone.lua b/scripts/zones/Port_San_dOria/Zone.lua index 1e8a3579751..85e7cf20dd2 100644 --- a/scripts/zones/Port_San_dOria/Zone.lua +++ b/scripts/zones/Port_San_dOria/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- require('scripts/quests/flyers_for_regine') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Port_Windurst/Zone.lua b/scripts/zones/Port_Windurst/Zone.lua index 4813efa8541..c67c8a513ba 100644 --- a/scripts/zones/Port_Windurst/Zone.lua +++ b/scripts/zones/Port_Windurst/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.PORT_WINDURST] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Promyvion-Dem/Zone.lua b/scripts/zones/Promyvion-Dem/Zone.lua index af58f9e45ab..33b374fa8e8 100644 --- a/scripts/zones/Promyvion-Dem/Zone.lua +++ b/scripts/zones/Promyvion-Dem/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.PROMYVION_DEM] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Promyvion-Holla/Zone.lua b/scripts/zones/Promyvion-Holla/Zone.lua index 365eb49b209..d07985603d4 100644 --- a/scripts/zones/Promyvion-Holla/Zone.lua +++ b/scripts/zones/Promyvion-Holla/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.PROMYVION_HOLLA] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Promyvion-Mea/Zone.lua b/scripts/zones/Promyvion-Mea/Zone.lua index e5fbd711cf8..35e7e1e573d 100644 --- a/scripts/zones/Promyvion-Mea/Zone.lua +++ b/scripts/zones/Promyvion-Mea/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.PROMYVION_MEA] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Promyvion-Vahzl/Zone.lua b/scripts/zones/Promyvion-Vahzl/Zone.lua index f95651a5042..f45af925cfb 100644 --- a/scripts/zones/Promyvion-Vahzl/Zone.lua +++ b/scripts/zones/Promyvion-Vahzl/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.PROMYVION_VAHZL] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Provenance/Zone.lua b/scripts/zones/Provenance/Zone.lua index b76751ed429..73f27423eca 100644 --- a/scripts/zones/Provenance/Zone.lua +++ b/scripts/zones/Provenance/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Provenance (222) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/PsoXja/Zone.lua b/scripts/zones/PsoXja/Zone.lua index 9c78ee84e9c..47fca024f6b 100644 --- a/scripts/zones/PsoXja/Zone.lua +++ b/scripts/zones/PsoXja/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: PsoXja (9) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/QuBia_Arena/Zone.lua b/scripts/zones/QuBia_Arena/Zone.lua index 381c0d14e16..ffbd63a01bd 100644 --- a/scripts/zones/QuBia_Arena/Zone.lua +++ b/scripts/zones/QuBia_Arena/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Qu'Bia Arena (206) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Qufim_Island/Zone.lua b/scripts/zones/Qufim_Island/Zone.lua index c97e8a79fa7..f3be49938cc 100644 --- a/scripts/zones/Qufim_Island/Zone.lua +++ b/scripts/zones/Qufim_Island/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Qufim_Island (126) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Quicksand_Caves/Zone.lua b/scripts/zones/Quicksand_Caves/Zone.lua index 0ce6ca3947c..00d632e6742 100644 --- a/scripts/zones/Quicksand_Caves/Zone.lua +++ b/scripts/zones/Quicksand_Caves/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.QUICKSAND_CAVES] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) @@ -129,6 +130,8 @@ zoneObject.onTriggerAreaEnter = function(player, triggerArea) -- retrigger if weight is still enough to do so if plateArg:getLocalVar('weight') >= 3 then -- retrigger, with nil as player arg, player is not necessary to re-open the door if weight is >= 3. + -- TODO: Separate nil-based logic out of function call + ---@diagnostic disable-next-line param-type-mismatch zoneObject.onTriggerAreaEnter(nil, triggerArea) end end) @@ -141,7 +144,6 @@ zoneObject.onTriggerAreaLeave = function(player, triggerArea) if triggerAreaID < 30 then local plate = GetNPCByID(ID.npc.ORNATE_DOOR_OFFSET + triggerAreaID) - if not plate then return end diff --git a/scripts/zones/Qulun_Dome/Zone.lua b/scripts/zones/Qulun_Dome/Zone.lua index 44cfcf7d6ea..9084ae6e966 100644 --- a/scripts/zones/Qulun_Dome/Zone.lua +++ b/scripts/zones/Qulun_Dome/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.QULUN_DOME] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/RaKaznar_Inner_Court/Zone.lua b/scripts/zones/RaKaznar_Inner_Court/Zone.lua index 043bc0f3adf..cafa8aafc33 100644 --- a/scripts/zones/RaKaznar_Inner_Court/Zone.lua +++ b/scripts/zones/RaKaznar_Inner_Court/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Ra'Kaznar Inner Court (276) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/RaKaznar_Turris/Zone.lua b/scripts/zones/RaKaznar_Turris/Zone.lua index 7ab46053e93..49636ef07b2 100644 --- a/scripts/zones/RaKaznar_Turris/Zone.lua +++ b/scripts/zones/RaKaznar_Turris/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Ra'Kaznar Turris (277) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Rabao/Zone.lua b/scripts/zones/Rabao/Zone.lua index e52cedcb84d..23ddba85578 100644 --- a/scripts/zones/Rabao/Zone.lua +++ b/scripts/zones/Rabao/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Rabao (247) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Rala_Waterways/Zone.lua b/scripts/zones/Rala_Waterways/Zone.lua index deb10696a21..022ecd15e4a 100644 --- a/scripts/zones/Rala_Waterways/Zone.lua +++ b/scripts/zones/Rala_Waterways/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Rala Waterways (258) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Rala_Waterways/npcs/Sluice_Gate_2.lua b/scripts/zones/Rala_Waterways/npcs/Sluice_Gate_2.lua index 3c6c3ebb92d..1269f99b96a 100644 --- a/scripts/zones/Rala_Waterways/npcs/Sluice_Gate_2.lua +++ b/scripts/zones/Rala_Waterways/npcs/Sluice_Gate_2.lua @@ -10,7 +10,6 @@ end entity.onTrigger = function(player, npc) local zone = npc:getZone() - if not zone then return end diff --git a/scripts/zones/Rala_Waterways_U/Zone.lua b/scripts/zones/Rala_Waterways_U/Zone.lua index 5a4d199cb16..fc172bab4c8 100644 --- a/scripts/zones/Rala_Waterways_U/Zone.lua +++ b/scripts/zones/Rala_Waterways_U/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Rala Waterways U ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 72) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -36,7 +33,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 258 -- Rala Waterways + return xi.zone.RALA_WATERWAYS end return zoneObject diff --git a/scripts/zones/Ranguemont_Pass/Zone.lua b/scripts/zones/Ranguemont_Pass/Zone.lua index 87743933ce2..58bd8727cc0 100644 --- a/scripts/zones/Ranguemont_Pass/Zone.lua +++ b/scripts/zones/Ranguemont_Pass/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.RANGUEMONT_PASS] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Reisenjima/Zone.lua b/scripts/zones/Reisenjima/Zone.lua index 8f3e62808e9..dd50d5690c8 100644 --- a/scripts/zones/Reisenjima/Zone.lua +++ b/scripts/zones/Reisenjima/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Reisenjima (291) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Reisenjima_Henge/Zone.lua b/scripts/zones/Reisenjima_Henge/Zone.lua index b35040fb60d..767b7438462 100644 --- a/scripts/zones/Reisenjima_Henge/Zone.lua +++ b/scripts/zones/Reisenjima_Henge/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Reisenjima_Henge (292) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Reisenjima_Sanctorium/Zone.lua b/scripts/zones/Reisenjima_Sanctorium/Zone.lua index 5a137839e9b..2e5f3bbb64e 100644 --- a/scripts/zones/Reisenjima_Sanctorium/Zone.lua +++ b/scripts/zones/Reisenjima_Sanctorium/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Reisenjima Sanctorium (293) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Residential_Area/Zone.lua b/scripts/zones/Residential_Area/Zone.lua index 085dac51e6d..323f86ed40e 100644 --- a/scripts/zones/Residential_Area/Zone.lua +++ b/scripts/zones/Residential_Area/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Residential_Area ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Riverne-Site_A01/Zone.lua b/scripts/zones/Riverne-Site_A01/Zone.lua index 97e4b7c79cf..641234f6823 100644 --- a/scripts/zones/Riverne-Site_A01/Zone.lua +++ b/scripts/zones/Riverne-Site_A01/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Riverne-Site_A01 ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Riverne-Site_B01/Zone.lua b/scripts/zones/Riverne-Site_B01/Zone.lua index 1fb7d82a825..04559f0b188 100644 --- a/scripts/zones/Riverne-Site_B01/Zone.lua +++ b/scripts/zones/Riverne-Site_B01/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Riverne-Site_B01 ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/RoMaeve/Zone.lua b/scripts/zones/RoMaeve/Zone.lua index ae7e15f501d..8300013b18d 100644 --- a/scripts/zones/RoMaeve/Zone.lua +++ b/scripts/zones/RoMaeve/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.ROMAEVE] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Rolanberry_Fields/Zone.lua b/scripts/zones/Rolanberry_Fields/Zone.lua index 16fe186b6f1..0efab2cf276 100644 --- a/scripts/zones/Rolanberry_Fields/Zone.lua +++ b/scripts/zones/Rolanberry_Fields/Zone.lua @@ -4,6 +4,7 @@ local ID = zones[xi.zone.ROLANBERRY_FIELDS] require('scripts/quests/i_can_hear_a_rainbow') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Rolanberry_Fields_[S]/Zone.lua b/scripts/zones/Rolanberry_Fields_[S]/Zone.lua index fe608dc69b6..223fefc0ef9 100644 --- a/scripts/zones/Rolanberry_Fields_[S]/Zone.lua +++ b/scripts/zones/Rolanberry_Fields_[S]/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- require('scripts/globals/dark_ixion') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/RuAun_Gardens/Zone.lua b/scripts/zones/RuAun_Gardens/Zone.lua index 7642f3c6e89..438ebcad5ea 100644 --- a/scripts/zones/RuAun_Gardens/Zone.lua +++ b/scripts/zones/RuAun_Gardens/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.RUAUN_GARDENS] ----------------------------------- +---@type TZone local zoneObject = {} local function handleClosingPortal(player, eventId, npcId) diff --git a/scripts/zones/RuLude_Gardens/Zone.lua b/scripts/zones/RuLude_Gardens/Zone.lua index 001077a43f2..fd17ddad3b5 100644 --- a/scripts/zones/RuLude_Gardens/Zone.lua +++ b/scripts/zones/RuLude_Gardens/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: RuLude_Gardens (243) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Ruhotz_Silvermines/Zone.lua b/scripts/zones/Ruhotz_Silvermines/Zone.lua index dbd86d1dc3b..8df1f48f9a2 100644 --- a/scripts/zones/Ruhotz_Silvermines/Zone.lua +++ b/scripts/zones/Ruhotz_Silvermines/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Ruhotz_Silvermines ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 90) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -36,7 +33,8 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 90 + -- NOTE: This instance has several connection points, and once + -- utilized should send the the appropriate area on load fail. end return zoneObject diff --git a/scripts/zones/Sacrarium/Zone.lua b/scripts/zones/Sacrarium/Zone.lua index 6ad55e9e3ad..95370fc0ad5 100644 --- a/scripts/zones/Sacrarium/Zone.lua +++ b/scripts/zones/Sacrarium/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.SACRARIUM] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Sacrificial_Chamber/Zone.lua b/scripts/zones/Sacrificial_Chamber/Zone.lua index 0a5c0bb6931..68eac8bd71a 100644 --- a/scripts/zones/Sacrificial_Chamber/Zone.lua +++ b/scripts/zones/Sacrificial_Chamber/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Sacrificial_Chamber (163) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/San_dOria-Jeuno_Airship/Zone.lua b/scripts/zones/San_dOria-Jeuno_Airship/Zone.lua index 261db90e868..7ac91fe2f65 100644 --- a/scripts/zones/San_dOria-Jeuno_Airship/Zone.lua +++ b/scripts/zones/San_dOria-Jeuno_Airship/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: San_dOria-Jeuno_Airship ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Sauromugue_Champaign/Zone.lua b/scripts/zones/Sauromugue_Champaign/Zone.lua index 1c2ae1897fb..cc32e3682d7 100644 --- a/scripts/zones/Sauromugue_Champaign/Zone.lua +++ b/scripts/zones/Sauromugue_Champaign/Zone.lua @@ -4,6 +4,7 @@ local ID = zones[xi.zone.SAUROMUGUE_CHAMPAIGN] require('scripts/quests/i_can_hear_a_rainbow') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) @@ -38,7 +39,7 @@ end zoneObject.onTriggerAreaEnter = function(player, triggerArea) end -zoneObject.onGameDay = function(zone) +zoneObject.onGameDay = function() for i = ID.npc.QM2, ID.npc.QM2 + 5 do GetNPCByID(i):resetLocalVars() end diff --git a/scripts/zones/Sauromugue_Champaign_[S]/Zone.lua b/scripts/zones/Sauromugue_Champaign_[S]/Zone.lua index 78aa423d091..ca48d38437d 100644 --- a/scripts/zones/Sauromugue_Champaign_[S]/Zone.lua +++ b/scripts/zones/Sauromugue_Champaign_[S]/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.SAUROMUGUE_CHAMPAIGN_S] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Sea_Serpent_Grotto/Zone.lua b/scripts/zones/Sea_Serpent_Grotto/Zone.lua index 9660fd7b4ed..0dd32b5fade 100644 --- a/scripts/zones/Sea_Serpent_Grotto/Zone.lua +++ b/scripts/zones/Sea_Serpent_Grotto/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.SEA_SERPENT_GROTTO] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Sealions_Den/Zone.lua b/scripts/zones/Sealions_Den/Zone.lua index 59eba9e3cf7..a4cae78b92b 100644 --- a/scripts/zones/Sealions_Den/Zone.lua +++ b/scripts/zones/Sealions_Den/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Sealions_Den (32) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Selbina/Zone.lua b/scripts/zones/Selbina/Zone.lua index c3a2c426dbd..4b57b4bb1a8 100644 --- a/scripts/zones/Selbina/Zone.lua +++ b/scripts/zones/Selbina/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.SELBINA] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Ship_bound_for_Mhaura/Zone.lua b/scripts/zones/Ship_bound_for_Mhaura/Zone.lua index de26f7e83c6..2bf0eb2e9d1 100644 --- a/scripts/zones/Ship_bound_for_Mhaura/Zone.lua +++ b/scripts/zones/Ship_bound_for_Mhaura/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Ship_bound_for_Mhaura (221) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Ship_bound_for_Mhaura_Pirates/Zone.lua b/scripts/zones/Ship_bound_for_Mhaura_Pirates/Zone.lua index b50bc865afb..de7790c0ce8 100644 --- a/scripts/zones/Ship_bound_for_Mhaura_Pirates/Zone.lua +++ b/scripts/zones/Ship_bound_for_Mhaura_Pirates/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Ship_bound_for_Mhaura_Pirates (228) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Ship_bound_for_Selbina/Zone.lua b/scripts/zones/Ship_bound_for_Selbina/Zone.lua index dac68096e84..7128b86d178 100644 --- a/scripts/zones/Ship_bound_for_Selbina/Zone.lua +++ b/scripts/zones/Ship_bound_for_Selbina/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.SHIP_BOUND_FOR_SELBINA] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Ship_bound_for_Selbina_Pirates/Zone.lua b/scripts/zones/Ship_bound_for_Selbina_Pirates/Zone.lua index 4f8cf2cdd58..0589b0a6684 100644 --- a/scripts/zones/Ship_bound_for_Selbina_Pirates/Zone.lua +++ b/scripts/zones/Ship_bound_for_Selbina_Pirates/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Ship bound for Selbina Pirates (227) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Sih_Gates/Zone.lua b/scripts/zones/Sih_Gates/Zone.lua index 8d5b8d347ee..34b3e4f9c14 100644 --- a/scripts/zones/Sih_Gates/Zone.lua +++ b/scripts/zones/Sih_Gates/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Sih Gates ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Silver_Knife/Zone.lua b/scripts/zones/Silver_Knife/Zone.lua index 2ca91471537..fe8694ca757 100644 --- a/scripts/zones/Silver_Knife/Zone.lua +++ b/scripts/zones/Silver_Knife/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Silver Knife ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Silver_Sea_Remnants/Zone.lua b/scripts/zones/Silver_Sea_Remnants/Zone.lua index 47363d33dbc..eff0b81197e 100644 --- a/scripts/zones/Silver_Sea_Remnants/Zone.lua +++ b/scripts/zones/Silver_Sea_Remnants/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Silver_Sea_Remnants ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 72) - return cs + return end local pos = player:getPos() @@ -21,8 +20,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) end player:addTempItem(5401) - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -35,7 +32,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 72 + return xi.zone.ALZADAAL_UNDERSEA_RUINS end return zoneObject diff --git a/scripts/zones/Silver_Sea_route_to_Al_Zahbi/Zone.lua b/scripts/zones/Silver_Sea_route_to_Al_Zahbi/Zone.lua index 2643c8fbfd3..8db2b55e3ba 100644 --- a/scripts/zones/Silver_Sea_route_to_Al_Zahbi/Zone.lua +++ b/scripts/zones/Silver_Sea_route_to_Al_Zahbi/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Silver_Sea_route_to_Al_Zahbi ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Silver_Sea_route_to_Nashmau/Zone.lua b/scripts/zones/Silver_Sea_route_to_Nashmau/Zone.lua index b20888ae158..596dd6a3b74 100644 --- a/scripts/zones/Silver_Sea_route_to_Nashmau/Zone.lua +++ b/scripts/zones/Silver_Sea_route_to_Nashmau/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Silver_Sea_route_to_Nashmau ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/South_Gustaberg/Zone.lua b/scripts/zones/South_Gustaberg/Zone.lua index 23966b8b4ce..fad0eecdd1f 100644 --- a/scripts/zones/South_Gustaberg/Zone.lua +++ b/scripts/zones/South_Gustaberg/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- require('scripts/quests/i_can_hear_a_rainbow') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Southern_San_dOria/Zone.lua b/scripts/zones/Southern_San_dOria/Zone.lua index ababd93dbc7..dfafa48350b 100644 --- a/scripts/zones/Southern_San_dOria/Zone.lua +++ b/scripts/zones/Southern_San_dOria/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- require('scripts/quests/flyers_for_regine') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Southern_San_dOria_[S]/Zone.lua b/scripts/zones/Southern_San_dOria_[S]/Zone.lua index f2f774ec735..bae66b90737 100644 --- a/scripts/zones/Southern_San_dOria_[S]/Zone.lua +++ b/scripts/zones/Southern_San_dOria_[S]/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.SOUTHERN_SAN_DORIA_S] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Spire_of_Dem/Zone.lua b/scripts/zones/Spire_of_Dem/Zone.lua index 147785eaa5e..c984b26e2b7 100644 --- a/scripts/zones/Spire_of_Dem/Zone.lua +++ b/scripts/zones/Spire_of_Dem/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Spire_of_Dem (19) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Spire_of_Holla/Zone.lua b/scripts/zones/Spire_of_Holla/Zone.lua index a845aec57c6..855e19f5e86 100644 --- a/scripts/zones/Spire_of_Holla/Zone.lua +++ b/scripts/zones/Spire_of_Holla/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Spire_of_Holla (17) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Spire_of_Mea/Zone.lua b/scripts/zones/Spire_of_Mea/Zone.lua index f925604f57d..825304f2de7 100644 --- a/scripts/zones/Spire_of_Mea/Zone.lua +++ b/scripts/zones/Spire_of_Mea/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Spire_of_Mea (21) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Spire_of_Vahzl/Zone.lua b/scripts/zones/Spire_of_Vahzl/Zone.lua index fdab42c43e2..8c006171976 100644 --- a/scripts/zones/Spire_of_Vahzl/Zone.lua +++ b/scripts/zones/Spire_of_Vahzl/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Spire_of_Vahzl (23) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Stellar_Fulcrum/Zone.lua b/scripts/zones/Stellar_Fulcrum/Zone.lua index 1ff657a5ce4..881bf13b342 100644 --- a/scripts/zones/Stellar_Fulcrum/Zone.lua +++ b/scripts/zones/Stellar_Fulcrum/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Stellar_Fulcrum ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Tahrongi_Canyon/Zone.lua b/scripts/zones/Tahrongi_Canyon/Zone.lua index e316c2327b5..9be9274759c 100644 --- a/scripts/zones/Tahrongi_Canyon/Zone.lua +++ b/scripts/zones/Tahrongi_Canyon/Zone.lua @@ -5,6 +5,7 @@ local ID = zones[xi.zone.TAHRONGI_CANYON] require('scripts/quests/i_can_hear_a_rainbow') require('scripts/missions/amk/helpers') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Talacca_Cove/Zone.lua b/scripts/zones/Talacca_Cove/Zone.lua index d5632dfa791..ca206f0f4b4 100644 --- a/scripts/zones/Talacca_Cove/Zone.lua +++ b/scripts/zones/Talacca_Cove/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Talacca_Cove (57) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Tavnazian_Safehold/Zone.lua b/scripts/zones/Tavnazian_Safehold/Zone.lua index 654389e40b6..30b42722b85 100644 --- a/scripts/zones/Tavnazian_Safehold/Zone.lua +++ b/scripts/zones/Tavnazian_Safehold/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Tavnazian_Safehold (26) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Temenos/Zone.lua b/scripts/zones/Temenos/Zone.lua index 6920e7fa90e..84d99beda00 100644 --- a/scripts/zones/Temenos/Zone.lua +++ b/scripts/zones/Temenos/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.TEMENOS] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Temple_of_Uggalepih/Zone.lua b/scripts/zones/Temple_of_Uggalepih/Zone.lua index 9ee5a186b60..579a39bbcfd 100644 --- a/scripts/zones/Temple_of_Uggalepih/Zone.lua +++ b/scripts/zones/Temple_of_Uggalepih/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Temple_of_Uggalepih (159) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/The_Ashu_Talif/Zone.lua b/scripts/zones/The_Ashu_Talif/Zone.lua index ce615b00fb9..fe9cccaf1c5 100644 --- a/scripts/zones/The_Ashu_Talif/Zone.lua +++ b/scripts/zones/The_Ashu_Talif/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: The_Ashu_Talif (60) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 54) - return cs + return end local pos = player:getPos() @@ -21,8 +20,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) end player:addTempItem(5349) - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -38,7 +35,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 54 + return xi.zone.ARRAPAGO_REEF end return zoneObject diff --git a/scripts/zones/The_Boyahda_Tree/Zone.lua b/scripts/zones/The_Boyahda_Tree/Zone.lua index 0567a365e41..d65c0b7c561 100644 --- a/scripts/zones/The_Boyahda_Tree/Zone.lua +++ b/scripts/zones/The_Boyahda_Tree/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: The_Boyahda_Tree (153) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/The_Celestial_Nexus/Zone.lua b/scripts/zones/The_Celestial_Nexus/Zone.lua index 516c4473e3d..f6121448b07 100644 --- a/scripts/zones/The_Celestial_Nexus/Zone.lua +++ b/scripts/zones/The_Celestial_Nexus/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: The_Celestial_Nexus (181) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/The_Colosseum/Zone.lua b/scripts/zones/The_Colosseum/Zone.lua index cef8b6325ee..377a0379e80 100644 --- a/scripts/zones/The_Colosseum/Zone.lua +++ b/scripts/zones/The_Colosseum/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: The_Colosseum ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/The_Eldieme_Necropolis/Zone.lua b/scripts/zones/The_Eldieme_Necropolis/Zone.lua index 8ab86b3aeba..987f9652cec 100644 --- a/scripts/zones/The_Eldieme_Necropolis/Zone.lua +++ b/scripts/zones/The_Eldieme_Necropolis/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: The Eldieme Necropolis (195) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/The_Eldieme_Necropolis_[S]/Zone.lua b/scripts/zones/The_Eldieme_Necropolis_[S]/Zone.lua index a2fdca068bb..bc7810bbb87 100644 --- a/scripts/zones/The_Eldieme_Necropolis_[S]/Zone.lua +++ b/scripts/zones/The_Eldieme_Necropolis_[S]/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: The_Eldieme_Necropolis_[S] (175) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/The_Garden_of_RuHmet/Zone.lua b/scripts/zones/The_Garden_of_RuHmet/Zone.lua index 365b468a6da..4787f5eafe6 100644 --- a/scripts/zones/The_Garden_of_RuHmet/Zone.lua +++ b/scripts/zones/The_Garden_of_RuHmet/Zone.lua @@ -4,6 +4,7 @@ local ID = zones[xi.zone.THE_GARDEN_OF_RUHMET] local gardenGlobal = require('scripts/zones/The_Garden_of_RuHmet/globals') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/The_Sanctuary_of_ZiTah/Zone.lua b/scripts/zones/The_Sanctuary_of_ZiTah/Zone.lua index 5d6fa362408..f40c7e1ab03 100644 --- a/scripts/zones/The_Sanctuary_of_ZiTah/Zone.lua +++ b/scripts/zones/The_Sanctuary_of_ZiTah/Zone.lua @@ -5,6 +5,7 @@ local ID = zones[xi.zone.THE_SANCTUARY_OF_ZITAH] require('scripts/quests/i_can_hear_a_rainbow') require('scripts/missions/amk/helpers') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/The_Shrine_of_RuAvitau/Zone.lua b/scripts/zones/The_Shrine_of_RuAvitau/Zone.lua index 0c2499b9699..590c8f1b613 100644 --- a/scripts/zones/The_Shrine_of_RuAvitau/Zone.lua +++ b/scripts/zones/The_Shrine_of_RuAvitau/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: The_Shrine_of_RuAvitau (178) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/The_Shrine_of_RuAvitau/mobs/Defender.lua b/scripts/zones/The_Shrine_of_RuAvitau/mobs/Defender.lua index b9994576415..069dedb34d6 100644 --- a/scripts/zones/The_Shrine_of_RuAvitau/mobs/Defender.lua +++ b/scripts/zones/The_Shrine_of_RuAvitau/mobs/Defender.lua @@ -11,7 +11,6 @@ end entity.onMobFight = function(mob, target) local auraGear = GetMobByID(mob:getID() + 1) - if not auraGear then return end diff --git a/scripts/zones/The_Shrouded_Maw/Zone.lua b/scripts/zones/The_Shrouded_Maw/Zone.lua index 9b3a8d258ba..825ac57af8b 100644 --- a/scripts/zones/The_Shrouded_Maw/Zone.lua +++ b/scripts/zones/The_Shrouded_Maw/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: The_Shrouded_Maw (10) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Throne_Room/Zone.lua b/scripts/zones/Throne_Room/Zone.lua index 9764c24aa61..7ac4a4b8557 100644 --- a/scripts/zones/Throne_Room/Zone.lua +++ b/scripts/zones/Throne_Room/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Throne_Room (165) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Throne_Room_[S]/Zone.lua b/scripts/zones/Throne_Room_[S]/Zone.lua index 46639842d99..38c8c6b7e76 100644 --- a/scripts/zones/Throne_Room_[S]/Zone.lua +++ b/scripts/zones/Throne_Room_[S]/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Throne_Room_[S] (156) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Throne_Room_[V]/Zone.lua b/scripts/zones/Throne_Room_[V]/Zone.lua index 09e2713a640..26553b7562b 100644 --- a/scripts/zones/Throne_Room_[V]/Zone.lua +++ b/scripts/zones/Throne_Room_[V]/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Throne_Room_[V] (229) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Toraimarai_Canal/Zone.lua b/scripts/zones/Toraimarai_Canal/Zone.lua index b7aa7ea427e..630131b4b2b 100644 --- a/scripts/zones/Toraimarai_Canal/Zone.lua +++ b/scripts/zones/Toraimarai_Canal/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Toraimarai Canal (169) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Uleguerand_Range/Zone.lua b/scripts/zones/Uleguerand_Range/Zone.lua index 4d36b5cd4c0..a83fb5b1440 100644 --- a/scripts/zones/Uleguerand_Range/Zone.lua +++ b/scripts/zones/Uleguerand_Range/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.ULEGUERAND_RANGE] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Upper_Delkfutts_Tower/Zone.lua b/scripts/zones/Upper_Delkfutts_Tower/Zone.lua index c98d82cfb30..6b2e7a5016d 100644 --- a/scripts/zones/Upper_Delkfutts_Tower/Zone.lua +++ b/scripts/zones/Upper_Delkfutts_Tower/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Upper_Delkfutts_Tower (158) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Upper_Jeuno/Zone.lua b/scripts/zones/Upper_Jeuno/Zone.lua index 9bef4dcdaf0..665b7d0c98b 100644 --- a/scripts/zones/Upper_Jeuno/Zone.lua +++ b/scripts/zones/Upper_Jeuno/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Upper_Jeuno (244) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Valkurm_Dunes/Zone.lua b/scripts/zones/Valkurm_Dunes/Zone.lua index a33a4355dd2..eba932ee400 100644 --- a/scripts/zones/Valkurm_Dunes/Zone.lua +++ b/scripts/zones/Valkurm_Dunes/Zone.lua @@ -5,6 +5,7 @@ local ID = zones[xi.zone.VALKURM_DUNES] require('scripts/quests/i_can_hear_a_rainbow') require('scripts/missions/amk/helpers') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Valley_of_Sorrows/Zone.lua b/scripts/zones/Valley_of_Sorrows/Zone.lua index f258c243344..d80a0b6e2e6 100644 --- a/scripts/zones/Valley_of_Sorrows/Zone.lua +++ b/scripts/zones/Valley_of_Sorrows/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Valley_of_Sorrows (128) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/VeLugannon_Palace/Zone.lua b/scripts/zones/VeLugannon_Palace/Zone.lua index ad98c3dbcfc..7d67416835f 100644 --- a/scripts/zones/VeLugannon_Palace/Zone.lua +++ b/scripts/zones/VeLugannon_Palace/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: VeLugannon_Palace (177) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Vunkerl_Inlet_[S]/Zone.lua b/scripts/zones/Vunkerl_Inlet_[S]/Zone.lua index 3f135f61af3..44f434485f2 100644 --- a/scripts/zones/Vunkerl_Inlet_[S]/Zone.lua +++ b/scripts/zones/Vunkerl_Inlet_[S]/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.VUNKERL_INLET_S] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Wajaom_Woodlands/Zone.lua b/scripts/zones/Wajaom_Woodlands/Zone.lua index d71901a4e03..00afc660a9a 100644 --- a/scripts/zones/Wajaom_Woodlands/Zone.lua +++ b/scripts/zones/Wajaom_Woodlands/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Wajaom_Woodlands (51) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Walk_of_Echoes/Zone.lua b/scripts/zones/Walk_of_Echoes/Zone.lua index aaae1d9cb7e..b7c2e851411 100644 --- a/scripts/zones/Walk_of_Echoes/Zone.lua +++ b/scripts/zones/Walk_of_Echoes/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Walk_of_Echoes ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Walk_of_Echoes_[P1]/Zone.lua b/scripts/zones/Walk_of_Echoes_[P1]/Zone.lua index f32664b5e2e..f40d50c759e 100644 --- a/scripts/zones/Walk_of_Echoes_[P1]/Zone.lua +++ b/scripts/zones/Walk_of_Echoes_[P1]/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Walk_of_Echoes_P1 ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Walk_of_Echoes_[P2]/Zone.lua b/scripts/zones/Walk_of_Echoes_[P2]/Zone.lua index c7a5ba9f9d9..5473b11f694 100644 --- a/scripts/zones/Walk_of_Echoes_[P2]/Zone.lua +++ b/scripts/zones/Walk_of_Echoes_[P2]/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Walk_of_Echoes_P2 ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Waughroon_Shrine/Zone.lua b/scripts/zones/Waughroon_Shrine/Zone.lua index 6f7240f69fc..0f352b70426 100644 --- a/scripts/zones/Waughroon_Shrine/Zone.lua +++ b/scripts/zones/Waughroon_Shrine/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Waughroon_Shrine (144) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Waughroon_Shrine/mobs/Platoon_Scorpion.lua b/scripts/zones/Waughroon_Shrine/mobs/Platoon_Scorpion.lua index 53c167ed9e1..d781a3bedc6 100644 --- a/scripts/zones/Waughroon_Shrine/mobs/Platoon_Scorpion.lua +++ b/scripts/zones/Waughroon_Shrine/mobs/Platoon_Scorpion.lua @@ -66,7 +66,6 @@ entity.onMobDeath = function(mob, player, optParams) if optParams.isKiller then -- This is used to increase the strength of Wild Rage as scorps die local bf = mob:getBattlefield() - if not bf then return end diff --git a/scripts/zones/West_Ronfaure/Zone.lua b/scripts/zones/West_Ronfaure/Zone.lua index 4ecbbb47655..ba355c39127 100644 --- a/scripts/zones/West_Ronfaure/Zone.lua +++ b/scripts/zones/West_Ronfaure/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- require('scripts/quests/i_can_hear_a_rainbow') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/West_Sarutabaruta/Zone.lua b/scripts/zones/West_Sarutabaruta/Zone.lua index de3e3303649..405f002baaf 100644 --- a/scripts/zones/West_Sarutabaruta/Zone.lua +++ b/scripts/zones/West_Sarutabaruta/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- require('scripts/quests/i_can_hear_a_rainbow') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/West_Sarutabaruta_[S]/Zone.lua b/scripts/zones/West_Sarutabaruta_[S]/Zone.lua index 20047ce6139..676be689679 100644 --- a/scripts/zones/West_Sarutabaruta_[S]/Zone.lua +++ b/scripts/zones/West_Sarutabaruta_[S]/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- require('scripts/globals/dark_ixion') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Western_Adoulin/Zone.lua b/scripts/zones/Western_Adoulin/Zone.lua index 4900827db1f..3ece217859c 100644 --- a/scripts/zones/Western_Adoulin/Zone.lua +++ b/scripts/zones/Western_Adoulin/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Western Adoulin ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Western_Adoulin/npcs/Westerly_Breeze.lua b/scripts/zones/Western_Adoulin/npcs/Westerly_Breeze.lua index a9bad64f6aa..c9991f20fdb 100644 --- a/scripts/zones/Western_Adoulin/npcs/Westerly_Breeze.lua +++ b/scripts/zones/Western_Adoulin/npcs/Westerly_Breeze.lua @@ -13,7 +13,6 @@ entity.onTrade = function(player, npc, trade) if trade:getItemCount() == 1 and trade:getGil() == 0 then local item = trade:getItem(0) - if not item then return end diff --git a/scripts/zones/Western_Altepa_Desert/Zone.lua b/scripts/zones/Western_Altepa_Desert/Zone.lua index 9db8f8819bb..f92ad2f1e90 100644 --- a/scripts/zones/Western_Altepa_Desert/Zone.lua +++ b/scripts/zones/Western_Altepa_Desert/Zone.lua @@ -5,6 +5,7 @@ local ID = zones[xi.zone.WESTERN_ALTEPA_DESERT] require('scripts/quests/i_can_hear_a_rainbow') require('scripts/missions/amk/helpers') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) @@ -59,7 +60,6 @@ end zoneObject.onZoneWeatherChange = function(weather) local kvMob = GetMobByID(ID.mob.KING_VINEGARROON) - if not kvMob then return end @@ -82,8 +82,12 @@ zoneObject.afterZoneIn = function(player) -- Send players who zone in an update for the Altepa Gate "doors" so you can see the state from further away -- TODO: these NPCs should be "permanently" in the NPC spawn list for all players -- there's a bug if you get too close and move away they revert to the "needs to be opened" state. -- This currently acts as a small QoL from a long distance, better than nothing, but closer to retail. - for i = ID.npc.ALTEPA_GATE, ID.npc.ALTEPA_GATE + 8 do - player:sendEntityUpdateToPlayer(GetNPCByID(i), xi.entityUpdate.ENTITY_UPDATE, xi.updateType.UPDATE_COMBAT) + for gateId = ID.npc.ALTEPA_GATE, ID.npc.ALTEPA_GATE + 8 do + local gateObj = GetNPCByID(gateId) + + if gateObj then + player:sendEntityUpdateToPlayer(gateObj, xi.entityUpdate.ENTITY_UPDATE, xi.updateType.UPDATE_COMBAT) + end end end diff --git a/scripts/zones/Windurst-Jeuno_Airship/Zone.lua b/scripts/zones/Windurst-Jeuno_Airship/Zone.lua index 171bd80c4c3..e5374f3cf55 100644 --- a/scripts/zones/Windurst-Jeuno_Airship/Zone.lua +++ b/scripts/zones/Windurst-Jeuno_Airship/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Windurst-Jeuno_Airship ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Windurst_Walls/Zone.lua b/scripts/zones/Windurst_Walls/Zone.lua index fa2453d4e97..b37df76fd77 100644 --- a/scripts/zones/Windurst_Walls/Zone.lua +++ b/scripts/zones/Windurst_Walls/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Windurst_Walls (239) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Windurst_Waters/Zone.lua b/scripts/zones/Windurst_Waters/Zone.lua index 23aa753ce87..79fcd75a1f4 100644 --- a/scripts/zones/Windurst_Waters/Zone.lua +++ b/scripts/zones/Windurst_Waters/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Windurst_Waters (238) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Windurst_Waters_[S]/Zone.lua b/scripts/zones/Windurst_Waters_[S]/Zone.lua index fdca0584d86..07c30d698dc 100644 --- a/scripts/zones/Windurst_Waters_[S]/Zone.lua +++ b/scripts/zones/Windurst_Waters_[S]/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.WINDURST_WATERS_S] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Windurst_Woods/Zone.lua b/scripts/zones/Windurst_Woods/Zone.lua index 75508b3c401..e35da5ddabd 100644 --- a/scripts/zones/Windurst_Woods/Zone.lua +++ b/scripts/zones/Windurst_Woods/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Windurst_Woods (241) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Woh_Gates/Zone.lua b/scripts/zones/Woh_Gates/Zone.lua index 6831d79d343..cc69e279b18 100644 --- a/scripts/zones/Woh_Gates/Zone.lua +++ b/scripts/zones/Woh_Gates/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Woh Gates ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Xarcabard/Zone.lua b/scripts/zones/Xarcabard/Zone.lua index 3e699447864..b84c4ab965a 100644 --- a/scripts/zones/Xarcabard/Zone.lua +++ b/scripts/zones/Xarcabard/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- require('scripts/quests/i_can_hear_a_rainbow') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Xarcabard_[S]/Zone.lua b/scripts/zones/Xarcabard_[S]/Zone.lua index 0182918a60b..8509cdbae8d 100644 --- a/scripts/zones/Xarcabard_[S]/Zone.lua +++ b/scripts/zones/Xarcabard_[S]/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.XARCABARD_S] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Yahse_Hunting_Grounds/Zone.lua b/scripts/zones/Yahse_Hunting_Grounds/Zone.lua index 33d31e8f6ea..c197e1d8995 100644 --- a/scripts/zones/Yahse_Hunting_Grounds/Zone.lua +++ b/scripts/zones/Yahse_Hunting_Grounds/Zone.lua @@ -3,6 +3,7 @@ ----------------------------------- local ID = zones[xi.zone.YAHSE_HUNTING_GROUNDS] ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Yhoator_Jungle/Zone.lua b/scripts/zones/Yhoator_Jungle/Zone.lua index d2d5ca5b04e..2c60653fc6d 100644 --- a/scripts/zones/Yhoator_Jungle/Zone.lua +++ b/scripts/zones/Yhoator_Jungle/Zone.lua @@ -5,6 +5,7 @@ local ID = zones[xi.zone.YHOATOR_JUNGLE] require('scripts/quests/i_can_hear_a_rainbow') require('scripts/missions/amk/helpers') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Yorcia_Weald/Zone.lua b/scripts/zones/Yorcia_Weald/Zone.lua index 4f4abaaa8b3..c452caeb9e8 100644 --- a/scripts/zones/Yorcia_Weald/Zone.lua +++ b/scripts/zones/Yorcia_Weald/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Yorcia Weald ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Yorcia_Weald_U/Zone.lua b/scripts/zones/Yorcia_Weald_U/Zone.lua index a5e36e2e49c..0f1c553596b 100644 --- a/scripts/zones/Yorcia_Weald_U/Zone.lua +++ b/scripts/zones/Yorcia_Weald_U/Zone.lua @@ -1,17 +1,16 @@ ----------------------------------- -- Zone: Yorcia Weald U ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 79) - return cs + return end local pos = player:getPos() @@ -19,8 +18,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -33,7 +30,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 72 + return xi.zone.YORCIA_WEALD end return zoneObject diff --git a/scripts/zones/Yughott_Grotto/Zone.lua b/scripts/zones/Yughott_Grotto/Zone.lua index 3f14a6263a0..2d6bf0cbebe 100644 --- a/scripts/zones/Yughott_Grotto/Zone.lua +++ b/scripts/zones/Yughott_Grotto/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Yughott_Grotto (142) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Yuhtunga_Jungle/Zone.lua b/scripts/zones/Yuhtunga_Jungle/Zone.lua index 9590f11a60e..76ad12c0153 100644 --- a/scripts/zones/Yuhtunga_Jungle/Zone.lua +++ b/scripts/zones/Yuhtunga_Jungle/Zone.lua @@ -5,6 +5,7 @@ local ID = zones[xi.zone.YUHTUNGA_JUNGLE] require('scripts/quests/i_can_hear_a_rainbow') require('scripts/missions/amk/helpers') ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Zeruhn_Mines/Zone.lua b/scripts/zones/Zeruhn_Mines/Zone.lua index c742741311c..4c26c6393d3 100644 --- a/scripts/zones/Zeruhn_Mines/Zone.lua +++ b/scripts/zones/Zeruhn_Mines/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Zeruhn_Mines (172) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/Zhayolm_Remnants/Zone.lua b/scripts/zones/Zhayolm_Remnants/Zone.lua index 44fbaf5d94e..2d9e4a130b6 100644 --- a/scripts/zones/Zhayolm_Remnants/Zone.lua +++ b/scripts/zones/Zhayolm_Remnants/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: Zhayolm_Remnants ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) @@ -13,11 +14,9 @@ zoneObject.onZoneIn = function(player, prevZone) end zoneObject.onInstanceZoneIn = function(player, instance) - local cs = -1 - if player:getInstance() == nil then player:setPos(0, 0, 0, 0, 79) - return cs + return end local pos = player:getPos() @@ -25,8 +24,6 @@ zoneObject.onInstanceZoneIn = function(player, instance) local entrypos = instance:getEntryPos() player:setPos(entrypos.x, entrypos.y, entrypos.z, entrypos.rot) end - - return cs end zoneObject.onTriggerAreaEnter = function(player, triggerArea) @@ -39,7 +36,7 @@ zoneObject.onEventFinish = function(player, csid, option, npc) end zoneObject.onInstanceLoadFailed = function() - return 79 + return xi.zone.ALZADAAL_UNDERSEA_RUINS end return zoneObject diff --git a/scripts/zones/none/Zone.lua b/scripts/zones/none/Zone.lua index cc701b76a09..8ead855142b 100644 --- a/scripts/zones/none/Zone.lua +++ b/scripts/zones/none/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: none (49) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone) diff --git a/scripts/zones/unknown/Zone.lua b/scripts/zones/unknown/Zone.lua index 30e0c6dce87..9fc8b43967b 100644 --- a/scripts/zones/unknown/Zone.lua +++ b/scripts/zones/unknown/Zone.lua @@ -1,6 +1,7 @@ ----------------------------------- -- Zone: unknown (0) ----------------------------------- +---@type TZone local zoneObject = {} zoneObject.onInitialize = function(zone)