public Trigger CreateNewTrigger(eSlotAonTypeObj typeObj)
        {
            Trigger trigger = null;
            int     idGen   = -1;

            if (typeObj == eSlotAonTypeObj.Warps)
            {
                idGen = WarpsData.Count;
                WarpsData.Add(new Warps());
                trigger = WarpsData[idGen];
            }
            else if (typeObj == eSlotAonTypeObj.Signposts)
            {
                idGen = SignpostsData.Count;
                SignpostsData.Add(new Signposts());
                trigger = SignpostsData[idGen];
            }
            else if (typeObj == eSlotAonTypeObj.Person)
            {
                idGen = NPCData.Count;
                NPCData.Add(new NPC());
                trigger = NPCData[idGen];
                // ComboBoxHelper.Instance.ResetDataNPCList();
            }
            else if (typeObj == eSlotAonTypeObj.Script)
            {
                idGen = ScriptData.Count;
                ScriptData.Add(new Script());
                trigger = ScriptData[idGen];
                // ComboBoxHelper.Instance.ResetDataScriptList();
            }
            return(trigger);
        }
 public void ClearData()
 {
     // TileData.Clear();
     StartX      = TileMapWidth / 2;
     StartY      = TileMapHeight / 2;
     TriggerLink = null;
     WarpsData.Clear();
     SignpostsData.Clear();
     NPCData.Clear();
     ScriptData.Clear();
     OverlayLink = null;
     HouseData.Clear();
     High    = null;
     FlagMap = new Flags();
     // RawFlagMap = new SerializableFlag();
     ListFlagAction = new List <FlagAction>();
     RawFlagAction  = new List <FlagAction.SerializableFlagAction>();
 }
        public Trigger CreateNewTrigger(int x, int y, eSlotAonTypeObj typeObj)
        {
            Trigger trigger = null;
            int     idGen   = -1;

            if (typeObj == eSlotAonTypeObj.Warps)
            {
                idGen = WarpsData.Count;
                WarpsData.Add(new Warps());
                trigger = WarpsData[idGen];
            }
            else if (typeObj == eSlotAonTypeObj.Signposts)
            {
                idGen = SignpostsData.Count;
                SignpostsData.Add(new Signposts());
                trigger = SignpostsData[idGen];
            }
            else if (typeObj == eSlotAonTypeObj.Person)
            {
                idGen = NPCData.Count;
                NPCData.Add(new NPC());
                trigger = NPCData[idGen];
                // ComboBoxHelper.Instance.ResetDataNPCList();
            }
            else if (typeObj == eSlotAonTypeObj.Script)
            {
                idGen = ScriptData.Count;
                ScriptData.Add(new Script());
                trigger = ScriptData[idGen];
                // ComboBoxHelper.Instance.ResetDataScriptList();
            }
            if (trigger != null)
            {
                // CheckInitArray(ref TriggerLink, TileMapWidth, TileMapHeight, -1);
                ComboBoxHelper.Instance.ResetTypeObj(typeObj);
                TriggerLink[x, y] = idGen;
            }
            return(trigger);
        }