2016-06-08 22:29:04 +01:00
|
|
|
|
using FFXIVClassic_Map_Server.packets;
|
2016-03-28 11:31:21 -04:00
|
|
|
|
using FFXIVClassic_Map_Server.Actors;
|
2016-04-14 08:30:21 -04:00
|
|
|
|
using FFXIVClassic_Map_Server.lua;
|
2016-03-28 11:31:21 -04:00
|
|
|
|
using FFXIVClassic_Map_Server.packets.send.actor;
|
2016-03-23 01:27:12 -04:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace FFXIVClassic_Map_Server.actors.director
|
|
|
|
|
{
|
|
|
|
|
class Director : Actor
|
2016-04-14 08:30:21 -04:00
|
|
|
|
{
|
|
|
|
|
Player owner;
|
2016-03-23 01:27:12 -04:00
|
|
|
|
|
2016-04-14 08:30:21 -04:00
|
|
|
|
public Director(Player owner, uint id) : base(id)
|
|
|
|
|
{
|
|
|
|
|
this.owner = owner;
|
2016-03-23 01:27:12 -04:00
|
|
|
|
}
|
2016-03-28 11:31:21 -04:00
|
|
|
|
|
|
|
|
|
public virtual BasePacket getSpawnPackets(uint playerActorId, uint spawnType)
|
|
|
|
|
{
|
|
|
|
|
List<SubPacket> subpackets = new List<SubPacket>();
|
|
|
|
|
subpackets.Add(createAddActorPacket(playerActorId, 0));
|
|
|
|
|
subpackets.AddRange(getEventConditionPackets(playerActorId));
|
|
|
|
|
subpackets.Add(createSpeedPacket(playerActorId));
|
|
|
|
|
subpackets.Add(createSpawnPositonPacket(playerActorId, 0));
|
|
|
|
|
subpackets.Add(createNamePacket(playerActorId));
|
|
|
|
|
subpackets.Add(createStatePacket(playerActorId));
|
|
|
|
|
subpackets.Add(createIsZoneingPacket(playerActorId));
|
|
|
|
|
subpackets.Add(createScriptBindPacket(playerActorId));
|
|
|
|
|
return BasePacket.createPacket(subpackets, true, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override BasePacket getInitPackets(uint playerActorId)
|
|
|
|
|
{
|
|
|
|
|
SetActorPropetyPacket initProperties = new SetActorPropetyPacket("/_init");
|
|
|
|
|
initProperties.addTarget();
|
|
|
|
|
return BasePacket.createPacket(initProperties.buildPacket(playerActorId, actorId), true, false);
|
|
|
|
|
}
|
|
|
|
|
|
2016-04-14 08:30:21 -04:00
|
|
|
|
public void onTalked(Npc npc)
|
|
|
|
|
{
|
|
|
|
|
LuaEngine.doDirectorOnTalked(this, owner, npc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onCommand(Command command)
|
|
|
|
|
{
|
|
|
|
|
LuaEngine.doDirectorOnCommand(this, owner, command);
|
|
|
|
|
}
|
|
|
|
|
|
2016-03-23 01:27:12 -04:00
|
|
|
|
}
|
|
|
|
|
}
|