Пример #1
0
        public void SaveToDatabase(IQueryAdapter dbClient)
        {
            WiredUtillity.SaveTriggerItem(dbClient, (int)itemID, "integer", string.Empty, delay.ToString(), false);

            if (dbClient.dbType == Pici.Storage.Database.DatabaseType.MSSQL)
            {
                dbClient.runFastQuery("DELETE FROM trigger_rotation WHERE item_id = " + itemID);
                dbClient.setQuery("INSERT INTO trigger_rotation(item_id,rotation_status,movement_status) VALUES (@id,@rot_id,@mov_id)");
            }
            else
            {
                dbClient.setQuery("REPLACE INTO trigger_rotation SET item_id = @id, rotation_status = @rot_id,  movement_status = @mov_id");
            }
            dbClient.addParameter("id", (int)itemID);
            dbClient.addParameter("rot_id", (int)this.rotation);
            dbClient.addParameter("mov_id", (int)this.movement);
            dbClient.runQuery();

            lock (items)
            {
                dbClient.runFastQuery("DELETE FROM trigger_in_place WHERE original_trigger = '" + this.itemID + "'");
                foreach (RoomItem i in items)
                {
                    WiredUtillity.SaveTrigger(dbClient, (int)itemID, (int)i.Id);
                }
            }
        }
Пример #2
0
 public void SaveToDatabase(IQueryAdapter dbClient)
 {
     WiredUtillity.SaveTriggerItem(dbClient, (int)itemID, "integer", string.Empty, delay.ToString(), false);
     lock (items)
     {
         dbClient.runFastQuery("DELETE FROM trigger_in_place WHERE original_trigger = '" + this.itemID + "'");
         foreach (RoomItem i in items)
         {
             WiredUtillity.SaveTrigger(dbClient, (int)itemID, (int)i.Id);
         }
     }
 }
Пример #3
0
 public void SaveToDatabase(IQueryAdapter dbClient)
 {
     WiredUtillity.SaveTriggerItem(dbClient, (int)item.Id, "integer", string.Empty, delay.ToString(), false);
     lock (items)
     {
         dbClient.runFastQuery("DELETE FROM trigger_in_place WHERE original_trigger = '" + this.item.Id + "'");
         foreach (RoomItem i in items)
         {
             WiredUtillity.SaveTrigger(dbClient, (int)item.Id, (int)i.Id);
         }
         //Logging.WriteLine("save trigger 'updatestate' items: " + items.Count);
     }
 }
Пример #4
0
        public void SaveToDatabase(IQueryAdapter dbClient)
        {
            string triggerdata = "";

            int i = 0;

            foreach (KeyValuePair <string, int> score in this.item.Scores.OrderByDescending(x => x.Value).Take(20))
            {
                if (i != 0)
                {
                    triggerdata += ";";
                }

                triggerdata += score.Key + ":" + score.Value;

                i++;
            }

            WiredUtillity.SaveTriggerItem(dbClient, this.item.Id, string.Empty, triggerdata, false, null);
        }
Пример #5
0
        public void SaveToDatabase(IQueryAdapter dbClient)
        {
            string rotationandmove = (int)this.rotation + ";" + (int)this.movement;

            WiredUtillity.SaveTriggerItem(dbClient, this.itemID, rotationandmove, this.Delay.ToString(), false, this.items);
        }
Пример #6
0
 public void SaveToDatabase(IQueryAdapter dbClient)
 {
     WiredUtillity.SaveTriggerItem(dbClient, this.itemID, string.Empty, this.NameBot + '\t' + this.Look, false, null);
 }
Пример #7
0
 public void SaveToDatabase(IQueryAdapter dbClient)
 {
     WiredUtillity.SaveTriggerItem(dbClient, (int)item.Id, "string", string.Empty, triggerMessage, isOwnerOnly);
 }
Пример #8
0
 public void SaveToDatabase(IQueryAdapter dbClient)
 {
     WiredUtillity.SaveTriggerItem(dbClient, (int)item.Id, "integer", string.Empty, scoreLevel.ToString(), false);
 }
Пример #9
0
 public void SaveToDatabase(IQueryAdapter dbClient)
 {
     WiredUtillity.SaveTriggerItem(dbClient, this.itemID, this.scoreToGive.ToString(), this.maxCountPerGame.ToString(), false, null);
 }
Пример #10
0
 public void SaveToDatabase(IQueryAdapter dbClient)
 {
     WiredUtillity.SaveTriggerItem(dbClient, this.itemID, string.Empty, string.Empty, false, this.items);
 }
Пример #11
0
 public void SaveToDatabase(IQueryAdapter dbClient)
 {
     WiredUtillity.SaveTriggerItem(dbClient, (int)itemID, "integer", string.Empty, message, false);
 }
Пример #12
0
 public void SaveToDatabase(IQueryAdapter dbClient)
 {
     WiredUtillity.SaveTriggerItem(dbClient, this.itemID, string.Empty, this.NomBot + '\t' + this.message, this.IsMurmur, null);
 }
Пример #13
0
 public void SaveToDatabase(IQueryAdapter dbClient)
 {
     WiredUtillity.SaveTriggerItem(dbClient, (int)itemID, "integer", scoreToGive.ToString(), maxCountPerGame.ToString(), false);
 }
Пример #14
0
 public void SaveToDatabase(IQueryAdapter dbClient)
 {
     WiredUtillity.SaveTriggerItem(dbClient, this.item.Id, string.Empty, this.triggerMessage, this.isOwnerOnly, null);
 }
Пример #15
0
 public void SaveToDatabase(IQueryAdapter dbClient)
 {
     WiredUtillity.SaveTriggerItem(dbClient, this.item.Id, string.Empty, this.userName, false, null);
 }
Пример #16
0
        public void SaveToDatabase(IQueryAdapter dbClient)
        {
            string SaveRoomCount = this.RoomCountMin + ":" + this.RoomCountMax;

            WiredUtillity.SaveTriggerItem(dbClient, this.Item.Id, string.Empty, SaveRoomCount, false, null);
        }
Пример #17
0
 public void SaveToDatabase(IQueryAdapter dbClient)
 {
     WiredUtillity.SaveTriggerItem(dbClient, this.item.Id, string.Empty, this.Delay.ToString(), false, this.items);
 }
Пример #18
0
 public void SaveToDatabase(IQueryAdapter dbClient)
 {
     WiredUtillity.SaveTriggerItem(dbClient, this.itemID, this.Delay.ToString(), this.message, false, null);
 }
Пример #19
0
 public void SaveToDatabase(IQueryAdapter dbClient)
 {
     WiredUtillity.SaveTriggerItem(dbClient, this.itemID, string.Empty, ((int)this.team).ToString(), false, null);
 }
Пример #20
0
 public void SaveToDatabase(IQueryAdapter dbClient)
 {
     WiredUtillity.SaveTriggerItem(dbClient, this.itemID, string.Empty, this.NameBot, this.IsFollow, null);
 }