diff --git a/Data/scripts/base/chara/npc/object/aetheryte/AetheryteChild.lua b/Data/scripts/base/chara/npc/object/aetheryte/AetheryteChild.lua index ff1548ec..560b4aec 100644 --- a/Data/scripts/base/chara/npc/object/aetheryte/AetheryteChild.lua +++ b/Data/scripts/base/chara/npc/object/aetheryte/AetheryteChild.lua @@ -107,7 +107,7 @@ function doLevequestInit(player, aetheryte) player:SendGameMessage(worldMaster, 50036, 0x20, glId, player); player:PlayAnimation(getGLStartAnimationFromSheet(guildleveData.borderId, guildleveData.plateId, true)); - director = player:GetZone():CreateGuildleveDirector(glId, difficulty, player); + director = player.CurrentArea:CreateGuildleveDirector(glId, difficulty, player); player:AddDirector(director); director:StartDirector(true, glId) diff --git a/Data/scripts/base/chara/npc/object/aetheryte/AetheryteParent.lua b/Data/scripts/base/chara/npc/object/aetheryte/AetheryteParent.lua index 63fee49d..544f1ff8 100644 --- a/Data/scripts/base/chara/npc/object/aetheryte/AetheryteParent.lua +++ b/Data/scripts/base/chara/npc/object/aetheryte/AetheryteParent.lua @@ -142,7 +142,7 @@ function doLevequestInit(player, aetheryte) player:SendGameMessage(worldMaster, 50036, 0x20, glId, player); player:PlayAnimation(getGLStartAnimationFromSheet(guildleveData.borderId, guildleveData.plateId, true)); - director = player:GetZone():CreateGuildleveDirector(glId, difficulty, player); + director = player.CurrentArea:CreateGuildleveDirector(glId, difficulty, player); player:AddDirector(director); director:StartDirector(true, glId); diff --git a/Data/scripts/battlenpc.lua b/Data/scripts/battlenpc.lua index ee4b526c..aade63ba 100644 --- a/Data/scripts/battlenpc.lua +++ b/Data/scripts/battlenpc.lua @@ -19,7 +19,7 @@ function onBeginLogin(player) end --For Opening. Set Director and reset position incase d/c - if (player:HasQuest(110001) == true and player:GetZoneID() == 193) then + if (player:HasQuest(110001) == true and player.CurrentArea.ZoneId == 193) then director = player:GetZone():CreateDirector("OpeningDirector", false); player:AddDirector(director); director:StartDirector(true); @@ -32,7 +32,7 @@ function onBeginLogin(player) player.rotation = 0.025; player:GetQuest(110001):ClearQuestData(); player:GetQuest(110001):ClearQuestFlags(); - elseif (player:HasQuest(110005) == true and player:GetZoneID() == 166) then + elseif (player:HasQuest(110005) == true and player.CurrentArea.ZoneId == 166) then director = player:GetZone():CreateDirector("OpeningDirector", false); player:AddDirector(director); director:StartDirector(false); @@ -45,7 +45,7 @@ function onBeginLogin(player) player.rotation = -1.26721; player:GetQuest(110005):ClearQuestData(); player:GetQuest(110005):ClearQuestFlags(); - elseif (player:HasQuest(110009) == true and player:GetZoneID() == 184) then + elseif (player:HasQuest(110009) == true and player.CurrentArea.ZoneId == 184) then --director = player:GetZone():CreateDirector("OpeningDirector", false); --player:AddDirector(director); --director:StartDirector(false); diff --git a/Data/scripts/commands/BazaarCheckCommand.lua b/Data/scripts/commands/BazaarCheckCommand.lua index 1dd99b5e..14ca7a84 100644 --- a/Data/scripts/commands/BazaarCheckCommand.lua +++ b/Data/scripts/commands/BazaarCheckCommand.lua @@ -13,9 +13,9 @@ function onEventStarted(player, actor, triggerName, name, arg1, arg2, arg3, baza local bazaarActor = nil; if (name ~= nil) then - bazaarActor = player:GetZone():FindPCInZone(name); + bazaarActor = player.CurrentArea:FindPCInZone(name); elseif (bazaarActorId ~= nil) then - bazaarActor = player:GetZone():FindActorInArea(bazaarActorId); + bazaarActor = player.CurrentArea:FindActorInArea(bazaarActorId); end if (bazaarActor ~= nil) then diff --git a/Data/scripts/commands/ChocoboRideCommand.lua b/Data/scripts/commands/ChocoboRideCommand.lua index 59bb989d..c43dc830 100644 --- a/Data/scripts/commands/ChocoboRideCommand.lua +++ b/Data/scripts/commands/ChocoboRideCommand.lua @@ -25,7 +25,7 @@ function onEventStarted(player, actor, triggerName, isGoobbue) player:ChangeSpeed(0.0, 5.0, 10.0, 10.0); player:ChangeState(15); else - player:ChangeMusic(player:GetZone().bgmDay); + player:ChangeMusic(player.CurrentArea.bgmDay); worldMaster = GetWorldMaster(); diff --git a/Data/scripts/commands/TradeOfferCommand.lua b/Data/scripts/commands/TradeOfferCommand.lua index 75eaedff..3661de0c 100644 --- a/Data/scripts/commands/TradeOfferCommand.lua +++ b/Data/scripts/commands/TradeOfferCommand.lua @@ -12,10 +12,10 @@ function onEventStarted(player, actor, triggerName, name, arg1, arg2, arg3, acto --ActorID Search if (actorId ~= nil) then - otherActor = player:GetZone():FindActorInArea(actorId); + otherActor = player.CurrentArea):FindActorInArea(actorId); --Name Search elseif (name ~= nil) then - otherActor = player:GetZone():FindPCInZone(name); + otherActor = player.CurrentArea:FindPCInZone(name); end if (otherActor ~= nil) then diff --git a/Data/scripts/commands/gm/despawn.lua b/Data/scripts/commands/gm/despawn.lua index 0d502ffd..b0736922 100644 --- a/Data/scripts/commands/gm/despawn.lua +++ b/Data/scripts/commands/gm/despawn.lua @@ -8,9 +8,8 @@ properties = { function onTrigger(player, argc, actorName) - if (actorName ~= nil) then - zone = player:GetZone(); - actor = zone:DespawnActor(actorName); + if (actorName ~= nil) then + actor = player.CurrentArea:DespawnActor(actorName); end end; \ No newline at end of file diff --git a/Data/scripts/commands/gm/reloadzone.lua b/Data/scripts/commands/gm/reloadzone.lua index 3c233c7b..ae222a25 100644 --- a/Data/scripts/commands/gm/reloadzone.lua +++ b/Data/scripts/commands/gm/reloadzone.lua @@ -18,11 +18,11 @@ function onTrigger(player, argc, zone) if player then local messageID = MESSAGE_TYPE_SYSTEM_ERROR; - zone = zone or player:GetZoneID(); + zone = zone or player.CurrentArea.ZoneId; player:SendMessage(messageID, "[reloadzones] ", string.format("Reloading zone: %u", zone)); --[[ todo: get this working legit - player:GetZone():Clear(); - player:GetZone():AddActorToZone(player); + player.CurrentArea:Clear(); + player.CurrentArea:AddActorToZone(player); player:SendInstanceUpdate(); ]] end; diff --git a/Data/scripts/commands/gm/spawn.lua b/Data/scripts/commands/gm/spawn.lua index 1f3f1852..716faffe 100644 --- a/Data/scripts/commands/gm/spawn.lua +++ b/Data/scripts/commands/gm/spawn.lua @@ -14,23 +14,22 @@ function onTrigger(player, argc, actorClassId, width, height) end local pos = player:GetPos(); - local x = pos[0]; - local y = pos[1]; - local z = pos[2]; - local rot = pos[3]; - local zone = pos[4]; + local x = pos[1]; + local y = pos[2]; + local z = pos[3]; + local rot = pos[4]; + local zone = pos[5]; actorClassId = tonumber(actorClassId); - if (actorClassId ~= nil) then - zone = player:GetZone(); + if (actorClassId ~= nil) then local w = tonumber(width) or 0; local h = tonumber(height) or 0; printf("%f %f %f", x, y, z); --local x, y, z = player.GetPos(); for i = 0, w do for j = 0, h do - actor = zone:SpawnActor(actorClassId, "test", pos[0] + (i - (w / 2) * 3), pos[1], pos[2] + (j - (h / 2) * 3), pos[3]); + actor = player.CurrentArea:SpawnActor(actorClassId, "test", pos[0] + (i - (w / 2) * 3), pos[1], pos[2] + (j - (h / 2) * 3), pos[3]); actor.SetAppearance(1001149) end end diff --git a/Data/scripts/commands/gm/spawnnpc.lua b/Data/scripts/commands/gm/spawnnpc.lua index e17295fc..19f73cc9 100644 --- a/Data/scripts/commands/gm/spawnnpc.lua +++ b/Data/scripts/commands/gm/spawnnpc.lua @@ -108,7 +108,7 @@ function onTrigger(player, argc, name, width, height, blockCount) for b = 0, blocks do for i = 0, w do for j = 0, h do - local actor = player.GetZone().SpawnActor(2104001, 'ass', x + (i * 1), y, z + (j * 1), rot, 0, 0, true); + local actor = player.CurrentArea:SpawnActor(2104001, 'ass', x + (i * 1), y, z + (j * 1), rot, 0, 0, true); actor.ChangeNpcAppearance(modelIds[name]); actor.SetMaxHP(5000); actor.SetHP(5000); diff --git a/Data/scripts/commands/gm/test.lua b/Data/scripts/commands/gm/test.lua index 8416f432..d4332143 100644 --- a/Data/scripts/commands/gm/test.lua +++ b/Data/scripts/commands/gm/test.lua @@ -18,7 +18,7 @@ function onTrigger(player, argc) player:SendGameMessage(player, worldMaster, 34108, 0x20); player:SendGameMessage(player, worldMaster, 50011, 0x20); - director = player:GetZone():CreateDirector("Quest/QuestDirectorMan0l001"); + director = player.CurrentArea:CreateDirector("Quest/QuestDirectorMan0l001"); player:AddDirector(director); player:SetLoginDirector(director); diff --git a/Data/scripts/commands/gm/testmapobj.lua b/Data/scripts/commands/gm/testmapobj.lua index cdc74c3d..d8f6f2f9 100644 --- a/Data/scripts/commands/gm/testmapobj.lua +++ b/Data/scripts/commands/gm/testmapobj.lua @@ -31,7 +31,7 @@ function onTrigger(player, argc, animation, regionId, layoutId, maxLayoutId) actorClassId = tonumber(actorClassId); if (actorClassId ~= nil) then - zone = player:GetZone(); + zone = player.CurrentArea; actor = zone:SpawnActor(actorClassId, "mapobj", pos[1], pos[2], pos[3], tonumber(regionId), tonumber(layoutId)); print("test"); diff --git a/Data/scripts/commands/gm/weather.lua b/Data/scripts/commands/gm/weather.lua index 7ae5656d..5bfae4da 100644 --- a/Data/scripts/commands/gm/weather.lua +++ b/Data/scripts/commands/gm/weather.lua @@ -24,13 +24,13 @@ function onTrigger(player, argc, weather, updateTime, zonewide) message = string.format("changed weather to %u ", weather); if zonewide ~= 0 then - message = string.format(message.."for zone %u", player:GetZoneID()); + message = string.format(message.."for zone %u", player.CurrentArea.ZoneId); else message = message..player:GetName(); end; -- weatherid, updateTime - player:GetZone():ChangeWeather(weather, updateTime, player, zonewide ~= 0); + player.CurrentArea:ChangeWeather(weather, updateTime, player, zonewide ~= 0); player:SendMessage(messageID, sender, message); end; print(sender..message); diff --git a/Data/scripts/commands/gm/yolo.lua b/Data/scripts/commands/gm/yolo.lua index 22b13f56..24f9b2a4 100644 --- a/Data/scripts/commands/gm/yolo.lua +++ b/Data/scripts/commands/gm/yolo.lua @@ -159,7 +159,7 @@ function onTrigger(player, argc, width, height, blockCount) for b = 0, blocks do for i = 0, w do for j = 0, h do - local actor = player.GetZone().SpawnActor(2104001, 'ass', x + (i * 1), y, z + (j * 1), rot, 0, 0, true); + local actor = player.CurrentArea.SpawnActor(2104001, 'ass', x + (i * 1), y, z + (j * 1), rot, 0, 0, true); --actor.ChangeNpcAppearance(2200905); actor.SetMaxHP(500); actor.SetHP(500); diff --git a/Data/scripts/directors/Quest/QuestDirectorMan0g001.lua b/Data/scripts/directors/Quest/QuestDirectorMan0g001.lua index 934e48be..79f765cb 100644 --- a/Data/scripts/directors/Quest/QuestDirectorMan0g001.lua +++ b/Data/scripts/directors/Quest/QuestDirectorMan0g001.lua @@ -88,7 +88,7 @@ function onEventStarted(player, actor, triggerName) wait(5); player:SendMessage(0x20, "", "ContentFinished"); - player:GetZone():ContentFinished(); + player.CurrentArea:ContentFinished(); wait(5); player:SendMessage(0x20, "", "Remove from party"); player:RemoveFromCurrentPartyAndCleanup(); @@ -136,5 +136,5 @@ function onCommand(player, command) end function main(director, contentGroup) - onCreateContentArea(director:GetPlayerMembers(), director, director:GetZone(), contentGroup); + onCreateContentArea(director:GetPlayerMembers(), director, director.CurrentArea, contentGroup); end; \ No newline at end of file diff --git a/Data/scripts/directors/Quest/QuestDirectorMan0l001.lua b/Data/scripts/directors/Quest/QuestDirectorMan0l001.lua index 11522b72..a149a048 100644 --- a/Data/scripts/directors/Quest/QuestDirectorMan0l001.lua +++ b/Data/scripts/directors/Quest/QuestDirectorMan0l001.lua @@ -73,7 +73,7 @@ function onEventStarted(player, director, triggerName) ]] man0l0Quest:StartSequence(10); - player:GetZone():ContentFinished(); + player.CurrentArea:ContentFinished(); GetWorldManager():DoZoneChange(player, 230, "PrivateAreaMasterPast", 1, 15, -826.868469, 6, 193.745865, -0.008368492); player:EndEvent(); end diff --git a/Data/scripts/directors/Quest/QuestDirectorMan0u001.lua b/Data/scripts/directors/Quest/QuestDirectorMan0u001.lua index 04b4c864..c5c71b7c 100644 --- a/Data/scripts/directors/Quest/QuestDirectorMan0u001.lua +++ b/Data/scripts/directors/Quest/QuestDirectorMan0u001.lua @@ -59,6 +59,6 @@ function onEventStarted(player, actor, triggerName) man0u0Quest:NextPhase(10); player:EndEvent(); - player:GetZone():ContentFinished(); + player.CurrentArea:ContentFinished(); GetWorldManager():DoZoneChange(player, 175, "PrivateAreaMasterPast", 3, 15, -22.81, 196, 87.82, 2.98); end diff --git a/Data/scripts/quests/man/man0l0.lua b/Data/scripts/quests/man/man0l0.lua index 8f7d9515..daa6669d 100644 --- a/Data/scripts/quests/man/man0l0.lua +++ b/Data/scripts/quests/man/man0l0.lua @@ -263,7 +263,7 @@ function doExitDoor(player, quest, npc) quest:StartSequence(SEQ_005); - contentArea = player:GetZone():CreateContentArea(player, "/Area/PrivateArea/Content/PrivateAreaMasterSimpleContent", "man0l01", "SimpleContent30002", "Quest/QuestDirectorMan0l001"); + contentArea = player.CurrentArea:CreateContentArea(player, "/Area/PrivateArea/Content/PrivateAreaMasterSimpleContent", "man0l01", "SimpleContent30002", "Quest/QuestDirectorMan0l001"); if (contentArea == nil) then return;