2016-08-22 10:43:04 -04:00
|
|
|
|
|
|
|
|
|
using FFXIVClassic.Common;
|
2016-02-07 13:05:54 -05:00
|
|
|
|
using FFXIVClassic_Map_Server.Actors;
|
|
|
|
|
using FFXIVClassic_Map_Server.lua;
|
|
|
|
|
using FFXIVClassic_Map_Server.packets.send.actor;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace FFXIVClassic_Map_Server.actors.area
|
|
|
|
|
{
|
|
|
|
|
class PrivateArea : Area
|
|
|
|
|
{
|
|
|
|
|
private Zone parentZone;
|
|
|
|
|
private string privateAreaName;
|
2017-03-07 00:09:37 -05:00
|
|
|
|
private uint privateAreaType;
|
2016-02-07 13:05:54 -05:00
|
|
|
|
|
2017-04-29 20:30:54 -04:00
|
|
|
|
public PrivateArea(Zone parent, uint id, string classPath, string privateAreaName, uint privateAreaType, ushort bgmDay, ushort bgmNight, ushort bgmBattle)
|
|
|
|
|
: base(id, parent.zoneName, parent.regionId, classPath, bgmDay, bgmNight, bgmBattle, parent.isIsolated, parent.isInn, parent.canRideChocobo, parent.canStealth, true)
|
2016-02-07 13:05:54 -05:00
|
|
|
|
{
|
|
|
|
|
this.parentZone = parent;
|
2017-03-19 11:39:21 -04:00
|
|
|
|
this.zoneName = parent.zoneName;
|
2016-02-07 13:05:54 -05:00
|
|
|
|
this.privateAreaName = privateAreaName;
|
2017-03-07 00:09:37 -05:00
|
|
|
|
this.privateAreaType = privateAreaType;
|
2016-02-07 13:05:54 -05:00
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public string GetPrivateAreaName()
|
2016-03-20 19:29:38 -04:00
|
|
|
|
{
|
|
|
|
|
return privateAreaName;
|
|
|
|
|
}
|
|
|
|
|
|
2017-03-07 00:09:37 -05:00
|
|
|
|
public uint GetPrivateAreaType()
|
2016-05-29 15:14:09 -04:00
|
|
|
|
{
|
2017-03-07 00:09:37 -05:00
|
|
|
|
return privateAreaType;
|
2016-05-29 15:14:09 -04:00
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public Zone GetParentZone()
|
2016-03-20 19:29:38 -04:00
|
|
|
|
{
|
|
|
|
|
return parentZone;
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-27 16:55:14 -04:00
|
|
|
|
public override SubPacket CreateScriptBindPacket()
|
2016-02-07 13:05:54 -05:00
|
|
|
|
{
|
|
|
|
|
List<LuaParam> lParams;
|
2016-04-07 22:34:10 -04:00
|
|
|
|
|
|
|
|
|
string path = className;
|
|
|
|
|
|
2017-03-07 00:09:37 -05:00
|
|
|
|
string realClassName = className.Substring(className.LastIndexOf("/") + 1);
|
2016-04-07 22:34:10 -04:00
|
|
|
|
|
2017-04-29 20:30:54 -04:00
|
|
|
|
lParams = LuaUtils.CreateLuaParamList(classPath, false, true, zoneName, privateAreaName, privateAreaType, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, false, false, false);
|
2017-06-27 16:55:14 -04:00
|
|
|
|
ActorInstantiatePacket.BuildPacket(actorId, actorName, realClassName, lParams).DebugPrintSubPacket();
|
|
|
|
|
return ActorInstantiatePacket.BuildPacket(actorId, actorName, realClassName, lParams);
|
2016-02-07 13:05:54 -05:00
|
|
|
|
}
|
2016-05-29 15:14:09 -04:00
|
|
|
|
|
|
|
|
|
|
2016-06-14 22:54:02 +01:00
|
|
|
|
public void AddSpawnLocation(SpawnLocation spawn)
|
2016-05-29 15:14:09 -04:00
|
|
|
|
{
|
|
|
|
|
mSpawnLocations.Add(spawn);
|
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 22:54:02 +01:00
|
|
|
|
public void SpawnAllActors()
|
2016-05-29 15:14:09 -04:00
|
|
|
|
{
|
|
|
|
|
foreach (SpawnLocation spawn in mSpawnLocations)
|
2016-06-14 22:54:02 +01:00
|
|
|
|
SpawnActor(spawn);
|
2016-05-29 15:14:09 -04:00
|
|
|
|
}
|
2016-02-07 13:05:54 -05:00
|
|
|
|
}
|
|
|
|
|
}
|