2016-02-07 13:05:54 -05:00
|
|
|
|
using FFXIVClassic_Lobby_Server.packets;
|
|
|
|
|
using FFXIVClassic_Map_Server.Actors;
|
2016-01-16 23:03:04 -05:00
|
|
|
|
using FFXIVClassic_Map_Server.lua;
|
|
|
|
|
using FFXIVClassic_Map_Server.packets.send.actor;
|
2015-10-05 19:36:15 -04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2016-02-07 13:05:54 -05:00
|
|
|
|
namespace FFXIVClassic_Map_Server.actors.area
|
2015-10-05 19:36:15 -04:00
|
|
|
|
{
|
2016-02-07 13:05:54 -05:00
|
|
|
|
class Zone : Area
|
2015-10-05 19:36:15 -04:00
|
|
|
|
{
|
2016-02-07 13:05:54 -05:00
|
|
|
|
Dictionary<string, Dictionary<uint, PrivateArea>> privateAreas = new Dictionary<string, Dictionary<uint, PrivateArea>>();
|
2016-01-17 23:36:34 -05:00
|
|
|
|
|
2016-02-07 13:05:54 -05:00
|
|
|
|
public Zone(uint id, string zoneName, ushort regionId, string className, ushort bgmDay, ushort bgmNight, ushort bgmBattle, bool isIsolated, bool isInn, bool canRideChocobo, bool canStealth, bool isInstanceRaid)
|
|
|
|
|
: base(id, zoneName, regionId, className, bgmDay, bgmNight, bgmBattle, isIsolated, isInn, canRideChocobo, canStealth, isInstanceRaid)
|
2015-10-13 19:15:44 -04:00
|
|
|
|
{
|
|
|
|
|
|
2016-01-24 17:11:35 -05:00
|
|
|
|
}
|
|
|
|
|
|
2016-02-07 13:05:54 -05:00
|
|
|
|
public PrivateArea getPrivateArea(string type, uint number)
|
2016-01-17 23:36:34 -05:00
|
|
|
|
{
|
2016-02-07 13:05:54 -05:00
|
|
|
|
if (privateAreas.ContainsKey(type))
|
2016-01-17 23:36:34 -05:00
|
|
|
|
{
|
2016-02-07 13:05:54 -05:00
|
|
|
|
Dictionary<uint, PrivateArea> instances = privateAreas[type];
|
|
|
|
|
if (instances.ContainsKey(number))
|
|
|
|
|
return instances[number];
|
|
|
|
|
else
|
|
|
|
|
return null;
|
2016-01-17 23:36:34 -05:00
|
|
|
|
}
|
2016-02-07 13:05:54 -05:00
|
|
|
|
else
|
2016-01-17 23:36:34 -05:00
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
2016-02-07 13:05:54 -05:00
|
|
|
|
public override SubPacket createScriptBindPacket(uint playerActorId)
|
2016-01-24 03:10:17 -05:00
|
|
|
|
{
|
2016-02-07 13:05:54 -05:00
|
|
|
|
bool isEntranceDesion = false;
|
2016-01-24 03:10:17 -05:00
|
|
|
|
|
2016-02-07 13:05:54 -05:00
|
|
|
|
List<LuaParam> lParams;
|
|
|
|
|
lParams = LuaUtils.createLuaParamList("/Area/Zone/" + className, false, true, zoneName, "", -1, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, true, isInstanceRaid, isEntranceDesion);
|
|
|
|
|
return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams);
|
2016-02-02 00:02:06 -05:00
|
|
|
|
}
|
|
|
|
|
|
2015-10-05 19:36:15 -04:00
|
|
|
|
}
|
|
|
|
|
}
|