示例#1
0
        private void DropAllAction(InquirySQL.ActionSQL action, int npcId, int item = 0, int prob = 0)
        {
            var npc = new DataBase.sqlTable.Data.t_npc_drop_all();
            npc.a_npc_idx = npcId;
            npc.a_item_idx = item;
            npc.a_prob = prob;

            InquirySQL sql = new InquirySQL();
            if (action == InquirySQL.ActionSQL.DEL)
                sql.DellDropAll_NPC(npc, DBInfoConnection);
            else if (action == InquirySQL.ActionSQL.ADD)
                sql.DropAll_NPC_Add(npc, DBInfoConnection);
        }
示例#2
0
        private void DropAllAddSQL(ref List<DropAll> list)
        {
            if (!DBInfoConnection.TestConnection()) { ShowWindow("Нет подключения"); }
            foreach (var npc_list in DropAll)
            {
                if (npc_list.NpcID == list[0].NpcID)
                {
                    var npc = new DataBase.sqlTable.Data.t_npc_drop_all();
                    var db = new InquirySQL();

                    npc_list.Item = list[0].Item;
                    npc.a_npc_idx = npc_list.NpcID;

                    db.DellDropAll_NPC(npc, DBInfoConnection);
                    foreach (var item in npc_list.Item)
                    {
                        npc.a_npc_idx = npc_list.NpcID;
                        npc.a_item_idx = item.idx;
                        npc.a_prob = item.percent;
                        db.DropAll_NPC_Add(npc, DBInfoConnection);
                    }
                    break;
                }
            }
            ShowWindow("Готово");
        }
示例#3
0
        private void B_SQL_Update_Click(object sender, RoutedEventArgs e)
        {
            if (DBInfoConnection.TestConnection())
            {
                if (FileManager.SelectedForSQL.Count == 1)
                {
                    FileManager.SelectedForSQL[0].a_maxplus = Convert.ToInt32(T_Max.Text);
                    FileManager.SelectedForSQL[0].a_minplus = Convert.ToInt32(T_Min.Text);
                    FileManager.SelectedForSQL[0].a_probplus = Convert.ToInt32(T_Chance.Text);
                    FileManager.SelectedForSQL[0].a_prize = Convert.ToInt32(T_Gold.Text);
                    FileManager.SelectedForSQL[0].a_skill_point = Convert.ToInt32(T_OY.Text);
                    FileManager.SelectedForSQL[0].a_exp = Convert.ToInt32(T_Exp.Text);

                    FileManager.SelectedForSQL[0].a_item_0 = ItemAllInNpc[0].Idx;
                    FileManager.SelectedForSQL[0].a_item_1 = ItemAllInNpc[1].Idx;
                    FileManager.SelectedForSQL[0].a_item_2 = ItemAllInNpc[2].Idx;
                    FileManager.SelectedForSQL[0].a_item_3 = ItemAllInNpc[3].Idx;
                    FileManager.SelectedForSQL[0].a_item_4 = ItemAllInNpc[4].Idx;
                    FileManager.SelectedForSQL[0].a_item_5 = ItemAllInNpc[5].Idx;
                    FileManager.SelectedForSQL[0].a_item_6 = ItemAllInNpc[6].Idx;
                    FileManager.SelectedForSQL[0].a_item_7 = ItemAllInNpc[7].Idx;
                    FileManager.SelectedForSQL[0].a_item_8 = ItemAllInNpc[8].Idx;
                    FileManager.SelectedForSQL[0].a_item_9 = ItemAllInNpc[9].Idx;
                    FileManager.SelectedForSQL[0].a_item_10 = ItemAllInNpc[10].Idx;
                    FileManager.SelectedForSQL[0].a_item_11 = ItemAllInNpc[11].Idx;
                    FileManager.SelectedForSQL[0].a_item_12 = ItemAllInNpc[12].Idx;
                    FileManager.SelectedForSQL[0].a_item_13 = ItemAllInNpc[13].Idx;
                    FileManager.SelectedForSQL[0].a_item_14 = ItemAllInNpc[14].Idx;
                    FileManager.SelectedForSQL[0].a_item_15 = ItemAllInNpc[15].Idx;
                    FileManager.SelectedForSQL[0].a_item_16 = ItemAllInNpc[16].Idx;
                    FileManager.SelectedForSQL[0].a_item_17 = ItemAllInNpc[17].Idx;
                    FileManager.SelectedForSQL[0].a_item_18 = ItemAllInNpc[18].Idx;
                    FileManager.SelectedForSQL[0].a_item_19 = ItemAllInNpc[19].Idx;

                    FileManager.SelectedForSQL[0].a_item_percent_0 = ItemAllInNpc[0].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_1 = ItemAllInNpc[1].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_2 = ItemAllInNpc[2].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_3 = ItemAllInNpc[3].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_4 = ItemAllInNpc[4].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_5 = ItemAllInNpc[5].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_6 = ItemAllInNpc[6].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_7 = ItemAllInNpc[7].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_8 = ItemAllInNpc[8].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_9 = ItemAllInNpc[9].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_10 = ItemAllInNpc[10].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_11 = ItemAllInNpc[11].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_12 = ItemAllInNpc[12].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_13 = ItemAllInNpc[13].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_14 = ItemAllInNpc[14].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_15 = ItemAllInNpc[15].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_16 = ItemAllInNpc[16].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_17 = ItemAllInNpc[17].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_18 = ItemAllInNpc[18].Percent;
                    FileManager.SelectedForSQL[0].a_item_percent_19 = ItemAllInNpc[19].Percent;

                    InquirySQL sql = new InquirySQL();

                    if (sql.UpdateExtraInfo(FileManager.SelectedForSQL[0], DBInfoConnection))
                        ShowWindow("Данные обновлены");
                    else
                        ShowWindow("Ошибка обновления");
                }
            }
        }