using System.Collections.Generic; using LuaInterface; namespace MoleMole { public class LDEvtOnMultiMonsterKilled : BaseLDEvent { private List _monsterActorList = new List(); public LDEvtOnMultiMonsterKilled(LuaTable monsterIDTable) { foreach (object value in monsterIDTable.Values) { _monsterActorList.Add(Singleton.Instance.GetActor((uint)(double)value)); } } public override void OnEvent(BaseEvent evt) { if (_monsterActorList.Count <= 0) { return; } if (evt is EvtKilled) { for (int i = 0; i < _monsterActorList.Count; i++) { if (_monsterActorList[i].runtimeID == evt.targetID) { _monsterActorList.RemoveAt(i); } } } if (_monsterActorList.Count == 0) { Done(); } } } }