Added two callbacks to the Director; onTalked and onCommand. Split the command and event starts and keep track of them separately.

This commit is contained in:
Filip Maj 2016-04-14 08:30:21 -04:00
parent 108f5aa677
commit d989ec2a58
12 changed files with 227 additions and 53 deletions

View file

@ -1,5 +1,6 @@
using FFXIVClassic_Lobby_Server.packets;
using FFXIVClassic_Map_Server.Actors;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor;
using System;
using System.Collections.Generic;
@ -10,10 +11,12 @@ using System.Threading.Tasks;
namespace FFXIVClassic_Map_Server.actors.director
{
class Director : Actor
{
public Director(uint id) : base(id)
{
{
Player owner;
public Director(Player owner, uint id) : base(id)
{
this.owner = owner;
}
public virtual BasePacket getSpawnPackets(uint playerActorId, uint spawnType)
@ -37,5 +40,15 @@ namespace FFXIVClassic_Map_Server.actors.director
return BasePacket.createPacket(initProperties.buildPacket(playerActorId, actorId), true, false);
}
public void onTalked(Npc npc)
{
LuaEngine.doDirectorOnTalked(this, owner, npc);
}
public void onCommand(Command command)
{
LuaEngine.doDirectorOnCommand(this, owner, command);
}
}
}