2017-06-12 20:13:26 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using FFXIVClassic_Map_Server.Actors;
|
2017-09-10 03:41:58 +01:00
|
|
|
|
using FFXIVClassic_Map_Server.lua;
|
2017-06-12 20:13:26 +01:00
|
|
|
|
|
|
|
|
|
namespace FFXIVClassic_Map_Server.actors.chara.ai
|
|
|
|
|
{
|
|
|
|
|
class Action
|
|
|
|
|
{
|
|
|
|
|
public DateTime startTime;
|
|
|
|
|
public uint durationMs;
|
|
|
|
|
public bool checkState;
|
|
|
|
|
// todo: lua function
|
2017-09-10 03:41:58 +01:00
|
|
|
|
LuaScript script;
|
2017-06-12 20:13:26 +01:00
|
|
|
|
}
|
2017-09-10 03:41:58 +01:00
|
|
|
|
|
2017-06-12 20:13:26 +01:00
|
|
|
|
class ActionQueue
|
|
|
|
|
{
|
|
|
|
|
private Character owner;
|
|
|
|
|
private Queue<Action> actionQueue;
|
|
|
|
|
private Queue<Action> timerQueue;
|
|
|
|
|
|
|
|
|
|
public bool IsEmpty { get { return actionQueue.Count > 0 || timerQueue.Count > 0; } }
|
|
|
|
|
|
|
|
|
|
public ActionQueue(Character owner)
|
|
|
|
|
{
|
2017-09-10 03:41:58 +01:00
|
|
|
|
this.owner = owner;
|
|
|
|
|
actionQueue = new Queue<Action>();
|
|
|
|
|
timerQueue = new Queue<Action>();
|
2017-06-12 20:13:26 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void PushAction(Action action)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Update(DateTime tick)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void HandleAction(Action action)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-10 03:41:58 +01:00
|
|
|
|
public void CheckAction(DateTime tick)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
2017-06-12 20:13:26 +01:00
|
|
|
|
}
|
|
|
|
|
}
|