Esempio n. 1
0
        public EntityItemRandomOption(XMLHandler handler, XmlNode node, EntityItem item)
        {
            OptionList = new List <EntityOption>();
            this.xml   = node.InnerXml;
            this.ID    = Int32.Parse(node["id"].InnerText);
            this.Name  = node["name"].InnerText;

            this.Item = item;
            ViewName  = Item.ViewName;

            XmlNode groupNode = node.SelectSingleNode("random_attr_group_list");

            if (groupNode != null)
            {
                XmlNodeList optionList = groupNode.SelectNodes("data");
                foreach (XmlNode optionNode in optionList)
                {
                    EntityOption iro = new EntityOption(this, optionNode);
                    OptionList.Add(iro);
                    TotalProb += iro.Prob;
                }
            }
            if (this.Item != null)
            {
                this.Item.RandomOption = this;
            }
            else
            {
            }
        }
Esempio n. 2
0
        public EntityItem Clone()
        {
            EntityItem copy = new EntityItem();

            copy.xml      = this.xml;
            copy.ID       = this.ID;
            copy.Name     = this.Name;
            copy.Desc     = this.Desc;
            copy.ViewName = this.ViewName;

            copy.LevelOrCount        = this.LevelOrCount;
            copy.RandomOptionGroupID = this.RandomOptionGroupID;
            copy.Skill           = this.Skill;
            copy.SetItem         = this.SetItem;
            copy.NodeData        = this.NodeData;
            copy.RandomOption    = this.RandomOption;
            copy.TreeIndex       = this.TreeIndex;
            copy.Type            = this.Type;
            copy.MainOption      = this.MainOption;
            copy.BonusOption     = this.BonusOption;
            copy.BonusAOption    = this.BonusAOption;
            copy.BonusBOption    = this.BonusBOption;
            copy.EnchantOption   = this.EnchantOption;
            copy.MaxEnchantValue = this.MaxEnchantValue;
            copy.MaxEnchantBonus = this.MaxEnchantBonus;
            return(copy);
        }
Esempio n. 3
0
        public EntitySetItem(XMLHandler handler, XmlNode node)
        {
            NodeData = new Dictionary <string, string>();
            ItemList = new List <EntityItem>();
            //BonusList = new Dictionary<int, Dictionary<string, string>>();
            BonusList = new List <EntitySetItemOption>();

            this.xml      = node.InnerXml;
            this.ID       = Int32.Parse(node["id"].InnerText);
            this.Name     = (string)node["name"].InnerText.ToLower();
            this.Desc     = (string)node["desc"].InnerText.ToUpper();
            this.ViewName = (string)handler.StrHash[this.Desc];
            foreach (XmlNode child in node.ChildNodes)
            {
                string tagName = child.Name;
                string value   = child.InnerText.ToLower();
                this.NodeData.Add(tagName, value);
                if (tagName.Contains("item"))
                {
                    EntityItem i = null;
                    try
                    {
                        i = handler.ItemList[value];
                        ItemList.Add(i);
                        i.SetItem = this;
                    }
                    catch
                    { }
                }
                else if (tagName.Contains("bonus"))
                {
                    int key = -1;
                    Dictionary <string, string> attrList = new Dictionary <string, string>();
                    if (tagName.Contains("piece_bonus"))
                    {
                        try
                        {
                            key = Int32.Parse(tagName.Substring(11));
                        }
                        catch { }
                    }
                    else if (tagName == "fullset_bonus")
                    {
                        //key = ItemList.Count;
                        key = 0;
                    }
                    string[] attrs = value.Split(';');
                    foreach (string s in attrs)
                    {
                        string[] ss = s.Trim().Split(' ');
                        attrList.Add(ss[0], ss[1]);
                    }
                    //BonusList.Add(key, attrList);
                    EntitySetItemOption sio = new EntitySetItemOption(this, key);
                    sio.Option = attrList;
                    BonusList.Add(sio);
                }
            }
            // 2013-06-11
        }
Esempio n. 4
0
File: Info.cs Progetto: wnd2da/aion
 // 아이템 무기에 따라 패시브 수치를 전달한다.
 public static int GetPassiveValue(EntityItem item)
 {
     if (item.IsWeapon())
     {
         if (item.Is장검())
         {
             return(InfoWeaponPassiveValueList["장검"]);
         }
         else if (item.Is단검())
         {
             return(InfoWeaponPassiveValueList["단검"]);
         }
         else if (item.Is전곤())
         {
             return(InfoWeaponPassiveValueList["전곤"]);
         }
         else if (item.Is보주())
         {
             return(InfoWeaponPassiveValueList["보주"]);
         }
         else if (item.Is법서())
         {
             return(InfoWeaponPassiveValueList["법서"]);
         }
         else if (item.Is대검())
         {
             return(InfoWeaponPassiveValueList["대검"]);
         }
         else if (item.Is미늘창())
         {
             return(InfoWeaponPassiveValueList["미늘창"]);
         }
         else if (item.Is법봉())
         {
             return(InfoWeaponPassiveValueList["법봉"]);
         }
         else if (item.Is활())
         {
             return(InfoWeaponPassiveValueList["활"]);
         }
         else if (item.Is마력총())
         {
             return(InfoWeaponPassiveValueList["마력총"]);
         }
         else if (item.Is마력포())
         {
             return(InfoWeaponPassiveValueList["마력포"]);
         }
         else if (item.Is현악기())
         {
             return(InfoWeaponPassiveValueList["현악기"]);
         }
     }
     return(0);
 }
Esempio n. 5
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (xmlHandler.ItemList == null)
            {
                return;
            }
            this.dataGridView.CellValueChanged -= new DataGridViewCellEventHandler(dataGridView_CellValueChanged);
            RemoveRow();
            ClearRow();
            Stat test = new Stat();

            test.클래스 = Information.InfoClassDefaultList["살성"];
            test.오른손 = xmlHandler.ItemList["dagger_n_e1_pc_65a"];
            test.오른손.SetLevelOrCount(10);
            test.왼손 = xmlHandler.ItemList["sword_n_e1_pc_65a"];
            test.왼손.SetLevelOrCount(10);
            test.상의 = xmlHandler.ItemList["lt_torso_n_e1_pc_65a"];
            test.상의.SetLevelOrCount(1);
            test.어깨 = xmlHandler.ItemList["lt_shoulder_n_e1_pc_65a"];
            test.어깨.SetLevelOrCount(2);
            test.장갑 = xmlHandler.ItemList["lt_glove_n_e1_pc_65a"];
            test.장갑.SetLevelOrCount(1);
            test.하의 = xmlHandler.ItemList["lt_pants_n_e1_pc_65a"];
            test.하의.SetLevelOrCount(1);
            test.신발 = xmlHandler.ItemList["lt_shoes_n_e1_pc_65a"];
            test.신발.SetLevelOrCount(2);

            test.머리   = xmlHandler.ItemList["lt_head_n_e1_pc_65a_new"];
            test.목걸이  = xmlHandler.ItemList["necklac_n_e1_pc_65a_new"];
            test.귀고리1 = xmlHandler.ItemList["earring_n_e1_pc_65a_new"];
            test.귀고리2 = xmlHandler.ItemList["earring_n_e1_pc_65a_new"];
            test.반지1  = xmlHandler.ItemList["ring_n_e1_pc_65a_new"];
            test.반지2  = xmlHandler.ItemList["ring_n_e1_pc_65a_new"];
            test.허리띠  = xmlHandler.ItemList["belt_n_e1_pc_65a_new"];
            test.날개   = xmlHandler.ItemList["wing_n_e1_nq_60a"];
            test.이디안  = xmlHandler.ItemList["cash_phyatt_e_polish_enchant_01a"];
            test.이디안.RandomOptionGroupID = 7;
            test.타이틀 = xmlHandler.TitleList["all_title_266"];

            EntityItem matter = xmlHandler.ItemList["matter_option_r_physicalattack_50"];

            matter.SetLevelOrCount(28);
            test.마석목록.Add(matter);

            matter = xmlHandler.ItemList["special_matter_option_pattack_70c"];
            matter.SetLevelOrCount(7);
            test.마석목록.Add(matter);



            LoadStat(test);
            this.dataGridView.CellValueChanged += new DataGridViewCellEventHandler(dataGridView_CellValueChanged);
        }
Esempio n. 6
0
 //2013-09-08
 private void AddRandomOptionList(string key, EntityItem item)
 {
     if (this.ItemListKeyIsRandomOption.ContainsKey(key))
     {
         List <EntityItem> list = this.ItemListKeyIsRandomOption[key];
         list.Add(item);
     }
     else
     {
         List <EntityItem> list = new List <EntityItem>();
         list.Add(item);
         this.ItemListKeyIsRandomOption.Add(key, list);
     }
 }
Esempio n. 7
0
File: Info.cs Progetto: wnd2da/aion
 public void Clear()
 {
     클래스 = null;
     오른손 = 왼손 = null;
     상의  = 어깨 = 장갑 = 하의 = 신발 = null;
     머리  = 목걸이 = 귀고리1 = 귀고리2 = 반지1 = 반지2 = 허리띠 = 날개 = null;
     타이틀 = null;
     이디안 = 음식 = 캔디 = null;
     세트효과목록.Clear();
     마석목록.Clear();
     주문서목록.Clear();
     스킬목록.Clear();
     FullFileName = null;
     OnlyFileName = null;
     Desc         = null;
 }
Esempio n. 8
0
        private void LoadItem()
        {
            ItemList = new Dictionary <string, EntityItem>();
            ItemListKeyIsRandomOption = new Dictionary <string, List <EntityItem> >();

            string[] urls = { GenerateDataFile.fileListItems[0], GenerateDataFile.fileListItems[1], GenerateDataFile.fileListItems[2] };
            //DataFilePath + "\\Items\\client_items_etc.xml", DataFilePath + "\\Items\\client_items_armor.xml", DataFilePath + "\\Items\\client_items_misc.xml" };

            for (int i = 0; i < urls.Length; i++)
            {
                XmlDocument xml = new XmlDocument();
                xml.Load(GenerateDataFile.dataPath + "\\" + urls[i]);
                XmlElement  root = xml.DocumentElement;
                XmlNodeList list = root.ChildNodes;
                foreach (XmlNode node in list)
                {
                    EntityItem item = new EntityItem(this, node);
                    if (item.ViewName == null)
                    {
                        //item.ViewName = item.Name;
                        continue;
                    }
                    if (item.NodeData.ContainsKey("random_option_set"))
                    {
                        string ros = item.NodeData["random_option_set"].ToLower();
                        AddRandomOptionList(ros, item);
                    }
                    if (item.NodeData.ContainsKey("polish_set_name"))
                    {
                        string psn = item.NodeData["polish_set_name"].ToLower();
                        AddRandomOptionList(psn, item);
                    }
                    this.ItemList.Add(item.Name, item);
                }
                XMLEventHandler(this, new XMLEventArgs(XMLEvent.아이템, urls[i]));
            }
        }
Esempio n. 9
0
        private void button6_Click(object sender, EventArgs e)
        {
            if (xmlHandler.ItemList == null)
            {
                return;
            }
            this.dataGridView.CellValueChanged -= new DataGridViewCellEventHandler(dataGridView_CellValueChanged);
            RemoveRow();
            ClearRow();
            Stat test = new Stat();

            test.클래스 = Information.InfoClassDefaultList["검성"];
            test.오른손 = xmlHandler.ItemList["dagger_d_d_u2_p_55a"];
            test.오른손.SetLevelOrCount(10);
            test.왼손 = xmlHandler.ItemList["shield_d_n_e1_pvp_pr_55b"];
            test.왼손.SetLevelOrCount(11);

            test.상의 = xmlHandler.ItemList["pl_torso_d_a_e2_60c"];
            test.상의.SetLevelOrCount(15);
            test.어깨 = xmlHandler.ItemList["pl_shoulder_d_a_e2_60c"];
            test.어깨.SetLevelOrCount(15);
            test.장갑 = xmlHandler.ItemList["pl_glove_d_a_e2_60c"];
            test.장갑.SetLevelOrCount(15);
            test.하의 = xmlHandler.ItemList["pl_pants_d_a_e2_60c"];
            test.하의.SetLevelOrCount(15);
            test.신발 = xmlHandler.ItemList["pl_shoes_d_a_e2_60c"];
            test.신발.SetLevelOrCount(15);

            test.머리   = xmlHandler.ItemList["pl_head_d_a_e2_60a"];
            test.목걸이  = xmlHandler.ItemList["necklace_d_a_e2_65a"];
            test.귀고리1 = xmlHandler.ItemList["earring_n_e1_pc_65a_new"];
            test.귀고리2 = xmlHandler.ItemList["earring_n_e1_pc_65a_new"];
            test.반지1  = xmlHandler.ItemList["ring_n_e1_pc_65a_new"];
            test.반지2  = xmlHandler.ItemList["ring_n_e1_pc_65a_new"];
            test.허리띠  = xmlHandler.ItemList["belt_n_e1_pc_65a_new"];
            test.날개   = xmlHandler.ItemList["event_wing_n_e2_60a"];
            test.타이틀  = xmlHandler.TitleList["light_title41"];

            EntityItem matter = xmlHandler.ItemList["matter_option_l_pcritical_accuracy_50"];

            matter.SetLevelOrCount(6);
            test.마석목록.Add(matter);

            matter = xmlHandler.ItemList["matter_option_l_pcritical_accuracy_60"];
            matter.SetLevelOrCount(6);
            test.마석목록.Add(matter);

            matter = xmlHandler.ItemList["matter_option_l_pattack_accuracy_50"];
            matter.SetLevelOrCount(7);
            test.마석목록.Add(matter);

            matter = xmlHandler.ItemList["matter_option_l_pattack_accuracy_60"];
            matter.SetLevelOrCount(6);
            test.마석목록.Add(matter);

            matter = xmlHandler.ItemList["matter_option_l_pattack_pcritical_50"];
            matter.SetLevelOrCount(3);
            test.마석목록.Add(matter);

            matter = xmlHandler.ItemList["matter_option_l_pcritical_pattack_50"];
            matter.SetLevelOrCount(2);
            test.마석목록.Add(matter);

            //matter = xmlHandler.ItemList["matter_option_r_physicalattack_50"];
            //matter.SetLevelOrCount(12);
            //test.마석목록.Add(matter);

            matter = xmlHandler.ItemList["matter_option_r_block_60"];
            matter.SetLevelOrCount(10);
            test.마석목록.Add(matter);

            LoadStat(test);
            this.dataGridView.CellValueChanged += new DataGridViewCellEventHandler(dataGridView_CellValueChanged);
        }
Esempio n. 10
0
        private void button4_Click(object sender, EventArgs e)
        {
            if (xmlHandler.ItemList == null)
            {
                return;
            }
            this.dataGridView.CellValueChanged -= new DataGridViewCellEventHandler(dataGridView_CellValueChanged);
            RemoveRow();
            ClearRow();
            Stat test = new Stat();

            test.클래스 = Information.InfoClassDefaultList["검성"];
            test.오른손 = xmlHandler.ItemList["polearm_n_m_idunderrune_65a"];
            test.오른손.SetLevelOrCount(15);
            test.오른손.RandomOptionGroupID = 7;
            test.왼손  = xmlHandler.ItemList["polearm_n_e1_pc_65a_new"];
            test.이디안 = xmlHandler.ItemList["gacha_phyatt_e_polish_enchant_01a"];
            test.이디안.RandomOptionGroupID = 10;

            test.상의 = xmlHandler.ItemList["pl_torso_d_a_e2_60c"];
            test.상의.SetLevelOrCount(15);
            test.어깨 = xmlHandler.ItemList["pl_shoulder_d_a_e2_60c"];
            test.어깨.SetLevelOrCount(15);
            test.장갑 = xmlHandler.ItemList["pl_glove_d_a_e2_60c"];
            test.장갑.SetLevelOrCount(15);
            test.하의 = xmlHandler.ItemList["pl_pants_d_a_e2_60c"];
            test.하의.SetLevelOrCount(15);
            test.신발 = xmlHandler.ItemList["pl_shoes_d_a_e2_60c"];
            test.신발.SetLevelOrCount(15);

            test.머리   = xmlHandler.ItemList["pl_head_d_a_e2_60a"];
            test.목걸이  = xmlHandler.ItemList["necklace_d_a_e2_65a"];
            test.귀고리1 = xmlHandler.ItemList["earring_n_e1_pc_65a_new"];
            test.귀고리2 = xmlHandler.ItemList["earring_n_e1_pc_65a_new"];
            test.반지1  = xmlHandler.ItemList["ring_n_e1_pc_65a_new"];
            test.반지2  = xmlHandler.ItemList["ring_n_e1_pc_65a_new"];
            test.허리띠  = xmlHandler.ItemList["belt_n_e1_pc_65a_new"];
            test.날개   = xmlHandler.ItemList["event_wing_n_e2_60a"];
            test.타이틀  = xmlHandler.TitleList["light_title41"];

            EntityItem matter = xmlHandler.ItemList["special_matter_option_pcritical_70"];

            matter.SetLevelOrCount(2);
            test.마석목록.Add(matter);

            matter = xmlHandler.ItemList["matter_option_l_pcritical_accuracy_50"];
            matter.SetLevelOrCount(12);
            test.마석목록.Add(matter);

            matter = xmlHandler.ItemList["matter_option_l_pcritical_accuracy_60"];
            matter.SetLevelOrCount(8);
            test.마석목록.Add(matter);

            matter = xmlHandler.ItemList["matter_option_l_pattack_accuracy_50"];
            matter.SetLevelOrCount(7);
            test.마석목록.Add(matter);

            matter = xmlHandler.ItemList["matter_option_l_pattack_accuracy_60"];
            matter.SetLevelOrCount(6);
            test.마석목록.Add(matter);

            matter = xmlHandler.ItemList["matter_option_l_pattack_pcritical_50"];
            matter.SetLevelOrCount(3);
            test.마석목록.Add(matter);

            matter = xmlHandler.ItemList["matter_option_l_pcritical_pattack_50"];
            matter.SetLevelOrCount(2);
            test.마석목록.Add(matter);



            LoadStat(test);
            this.dataGridView.CellValueChanged += new DataGridViewCellEventHandler(dataGridView_CellValueChanged);
        }
Esempio n. 11
0
        public Stat Load(string filename)
        {
            Stat stat = new Stat();

            stat.FullFileName = filename;
            stat.OnlyFileName = new FileInfo(stat.FullFileName).Name;
            XmlDocument xml = new XmlDocument();

            xml.Load(filename);
            XmlElement  root     = xml.DocumentElement;
            XmlNodeList nodeList = root.ChildNodes;

            foreach (XmlNode node in nodeList)
            {
                string s     = node.InnerText;
                int    level = -1;
                int    gid   = 0;
                XmlAttributeCollection xac = node.Attributes;
                if (xac.Count > 0)
                {
                    XmlAttribute att = xac["enchant_count"];
                    if (att != null)
                    {
                        level = Int32.Parse(att.Value);
                    }
                    att = xac["random_option_id"];
                    if (att != null)
                    {
                        gid = Int32.Parse(att.Value);
                    }
                }

                switch (node.Name)
                {
                case "desc": stat.Desc = s; break;

                case "version": stat.Version = s; break;

                case "클래스": stat.SetClass(s); break;

                case "오른손":
                    stat.오른손 = this.main.xmlHandler.ItemList[s].Clone();
                    if (level > -1)
                    {
                        stat.오른손.SetLevelOrCount(level);
                    }
                    stat.오른손.RandomOptionGroupID = gid;
                    break;

                case "왼손":
                    stat.왼손 = this.main.xmlHandler.ItemList[s].Clone();
                    if (level > -1)
                    {
                        stat.왼손.SetLevelOrCount(level);
                    }
                    stat.왼손.RandomOptionGroupID = gid;
                    break;

                case "상의":
                    stat.상의 = this.main.xmlHandler.ItemList[s].Clone();
                    if (level > -1)
                    {
                        stat.상의.SetLevelOrCount(level);
                    }
                    stat.상의.RandomOptionGroupID = gid;
                    break;

                case "어깨":
                    stat.어깨 = this.main.xmlHandler.ItemList[s].Clone();
                    if (level > -1)
                    {
                        stat.어깨.SetLevelOrCount(level);
                    }
                    stat.어깨.RandomOptionGroupID = gid;
                    break;

                case "장갑":
                    stat.장갑 = this.main.xmlHandler.ItemList[s].Clone();
                    if (level > -1)
                    {
                        stat.장갑.SetLevelOrCount(level);
                    }
                    stat.장갑.RandomOptionGroupID = gid;
                    break;

                case "하의":
                    stat.하의 = this.main.xmlHandler.ItemList[s].Clone();
                    if (level > -1)
                    {
                        stat.하의.SetLevelOrCount(level);
                    }
                    stat.하의.RandomOptionGroupID = gid;
                    break;

                case "신발":
                    stat.신발 = this.main.xmlHandler.ItemList[s].Clone();
                    if (level > -1)
                    {
                        stat.신발.SetLevelOrCount(level);
                    }
                    stat.신발.RandomOptionGroupID = gid;
                    break;

                case "머리": stat.머리 = this.main.xmlHandler.ItemList[s].Clone(); stat.머리.RandomOptionGroupID = gid; break;

                case "목걸이": stat.목걸이 = this.main.xmlHandler.ItemList[s].Clone(); stat.목걸이.RandomOptionGroupID = gid; break;

                case "귀고리1": stat.귀고리1 = this.main.xmlHandler.ItemList[s].Clone(); stat.귀고리1.RandomOptionGroupID = gid; break;

                case "귀고리2": stat.귀고리2 = this.main.xmlHandler.ItemList[s].Clone(); stat.귀고리2.RandomOptionGroupID = gid; break;

                case "반지1": stat.반지1 = this.main.xmlHandler.ItemList[s].Clone(); stat.반지1.RandomOptionGroupID = gid; break;

                case "반지2": stat.반지2 = this.main.xmlHandler.ItemList[s].Clone(); stat.반지2.RandomOptionGroupID = gid; break;

                case "허리띠": stat.허리띠 = this.main.xmlHandler.ItemList[s].Clone(); stat.허리띠.RandomOptionGroupID = gid; break;

                case "날개": stat.날개 = this.main.xmlHandler.ItemList[s].Clone(); stat.날개.RandomOptionGroupID = gid; break;

                case "이디안": stat.이디안 = this.main.xmlHandler.ItemList[s].Clone(); stat.이디안.RandomOptionGroupID = gid; break;

                case "음식": stat.음식 = this.main.xmlHandler.ItemList[s].Clone(); break;

                case "캔디": stat.캔디 = this.main.xmlHandler.ItemList[s].Clone(); break;

                case "타이틀": stat.타이틀 = this.main.xmlHandler.TitleList[s]; break;

                case "마석":
                    EntityItem matter = this.main.xmlHandler.ItemList[s].Clone();
                    matter.SetLevelOrCount(level);
                    stat.마석목록.Add(matter);
                    break;

                case "주문서":
                    EntityItem scroll = this.main.xmlHandler.ItemList[s].Clone();
                    stat.주문서목록.Add(scroll);
                    break;

                case "스킬":
                    EntitySkill skill = this.main.xmlHandler.SkillList[s];
                    stat.스킬목록.Add(skill);
                    break;
                }
            }
            return(stat);
        }
Esempio n. 12
0
File: Info.cs Progetto: wnd2da/aion
        public void SetNull(int rowIndex)
        {
            switch (rowIndex)
            {
            case 2: 오른손 = null; return;

            case 3: 왼손 = null; return;

            case 4: 상의 = null; return;

            case 5: 어깨 = null; return;

            case 6: 장갑 = null; return;

            case 7: 하의 = null; return;

            case 8: 신발 = null; return;

            case 9: 머리 = null; return;

            case 10: 목걸이 = null; return;

            case 11: 귀고리1 = null; return;

            case 12: 귀고리2 = null; return;

            case 13: 반지1 = null; return;

            case 14: 반지2 = null; return;

            case 15: 허리띠 = null; return;

            case 16: 날개 = null; return;

            case 17: 타이틀 = null; return;

            case 18: 이디안 = null; return;

            case 19: 음식 = null; return;

            case 20: 캔디 = null; return;
            }

            int count세트효과목록     = 세트효과목록.Count;
            int count마석목록       = 마석목록.Count;
            int count주문서목록      = 주문서목록.Count;
            int count스킬목록       = 스킬목록.Count;
            int start세트효과목록     = Information.RowIndex세트효과;
            int startIndex마석목록  = 0;
            int startIndex주문서목록 = 0;
            int startIndex스킬목록  = 0;

            if (count세트효과목록 == 0 || count세트효과목록 == 1)
            {
                startIndex마석목록 = start세트효과목록 + 1; // 22
            }
            else
            {
                startIndex마석목록 = start세트효과목록 + 1 + (count세트효과목록 - 1);
            }

            if (count마석목록 == 0 || count마석목록 == 1)
            {
                startIndex주문서목록 = startIndex마석목록 + 1;
            }
            else
            {
                startIndex주문서목록 = startIndex마석목록 + 1 + (count마석목록 - 1);
            }


            if (count주문서목록 == 0 || count주문서목록 == 1)
            {
                startIndex스킬목록 = startIndex주문서목록 + 1;
            }
            else
            {
                startIndex스킬목록 = startIndex주문서목록 + 1 + (count주문서목록 - 1);
            }

            if (rowIndex >= start세트효과목록 && rowIndex < startIndex마석목록)
            {
            }
            else if (rowIndex >= startIndex마석목록 && rowIndex < startIndex주문서목록)
            {
                //마석
                int index = rowIndex - startIndex마석목록;
                if (마석목록.Count > 0)
                {
                    마석목록.RemoveAt(index);
                }
            }
            else if (rowIndex >= startIndex주문서목록 && rowIndex < startIndex스킬목록)
            {
                //주문서
                int index = rowIndex - startIndex주문서목록;
                if (주문서목록.Count > 0)
                {
                    주문서목록.RemoveAt(index);
                }
            }
            else if (rowIndex >= startIndex스킬목록)
            {
                //주문서
                int index = rowIndex - startIndex스킬목록;
                if (스킬목록.Count > 0)
                {
                    스킬목록.RemoveAt(index);
                }
            }
        }
Esempio n. 13
0
File: Info.cs Progetto: wnd2da/aion
        public static int[] GetItemType(EntityItem item)
        {
            int[]  ret     = null;
            String id      = item.NodeData["id"];
            string quality = null;

            if (item.NodeData.ContainsKey("quality"))
            {
                quality = (string)item.NodeData["quality"];
            }
            string name  = (string)item.NodeData["name"];
            int    level = -1;

            if (item.NodeData.ContainsKey("level"))
            {
                string tmp = (string)item.NodeData["level"];
                try
                {
                    level = Int32.Parse(tmp);
                }
                catch { }
            }

            if (id.StartsWith("10"))
            {
                if (id.StartsWith("1000")) // sword 장검
                {
                    item.Type = 1000; ret = new int[] { 0, 0, -1 };
                }
                else if (id.StartsWith("1002")) // dagger 단검
                {
                    item.Type = 1002; ret = new int[] { 0, 1, -1 };
                }
                else if (id.StartsWith("1001")) // mace 전곤
                {
                    item.Type = 1001; ret = new int[] { 0, 2, -1 };
                }
                else if (id.StartsWith("1005")) // orb 보주
                {
                    item.Type = 1005; ret = new int[] { 0, 3, -1 };
                }
                else if (id.StartsWith("1006")) // book 법서
                {
                    item.Type = 1006; ret = new int[] { 0, 4, -1 };
                }
                else if (id.StartsWith("1009")) // 2hsword 대검
                {
                    item.Type = 1009; ret = new int[] { 0, 5, -1 };
                }
                else if (id.StartsWith("1013")) // polearm 미늘창
                {
                    item.Type = 1013; ret = new int[] { 0, 6, -1 };
                }
                else if (id.StartsWith("1015")) // staff 지팡이
                {
                    item.Type = 1015; ret = new int[] { 0, 7, -1 };
                }
                else if (id.StartsWith("1017")) // bow 활
                {
                    item.Type = 1017; ret = new int[] { 0, 8, -1 };
                }
                else if (id.StartsWith("1018")) // gun 총
                {
                    item.Type = 1018; ret = new int[] { 0, 9, -1 };
                }
                else if (id.StartsWith("1019")) // cannon 마력포
                {
                    item.Type = 1019; ret = new int[] { 0, 10, -1 };
                }
                else if (id.StartsWith("1020")) // harp 현악기
                {
                    item.Type = 1020; ret = new int[] { 0, 11, -1 };
                }
                else if (id.StartsWith("1021"))
                {
                    item.Type = 1020; ret = new int[] { 0, 12, -1 };
                }
                else
                {
                }
            }
            else if (id.StartsWith("11"))  // 방어구
            {
                if (id.StartsWith("1101")) // 로브 상의
                {
                    item.Type = 1101; ret = new int[] { 1, 0, 0 };
                }
                else if (id.StartsWith("1121")) // 로브 어깨
                {
                    item.Type = 1121; ret = new int[] { 1, 0, 1 };
                }

                else if (id.StartsWith("1111")) // 로브 장갑
                {
                    item.Type = 1111; ret = new int[] { 1, 0, 2 };
                }
                else if (id.StartsWith("1131")) // 로브 하의
                {
                    item.Type = 1131; ret = new int[] { 1, 0, 3 };
                }
                else if (id.StartsWith("1141")) // 로브 신발
                {
                    item.Type = 1141; ret = new int[] { 1, 0, 4 };
                }
                else if (id.StartsWith("1103")) // 가죽 상의
                {
                    item.Type = 1103; ret = new int[] { 1, 1, 0 };
                }
                else if (id.StartsWith("1123")) // 가죽 어깨
                {
                    item.Type = 1123; ret = new int[] { 1, 1, 1 };
                }
                else if (id.StartsWith("1113")) // 가죽 장갑
                {
                    item.Type = 1113; ret = new int[] { 1, 1, 2 };
                }
                else if (id.StartsWith("1133")) // 가죽 하의
                {
                    item.Type = 1133; ret = new int[] { 1, 1, 3 };
                }
                else if (id.StartsWith("1143")) // 가죽 신발
                {
                    item.Type = 1143; ret = new int[] { 1, 1, 4 };
                }
                else if (id.StartsWith("1105")) // 사슬 상의
                {
                    item.Type = 1105; ret = new int[] { 1, 2, 0 };
                }
                else if (id.StartsWith("1125")) // 사슬 어깨
                {
                    item.Type = 1125; ret = new int[] { 1, 2, 1 };
                }
                else if (id.StartsWith("1115")) // 사슬 장갑
                {
                    item.Type = 1115; ret = new int[] { 1, 2, 2 };
                }
                else if (id.StartsWith("1135")) // 사슬 하의
                {
                    item.Type = 1135; ret = new int[] { 1, 2, 3 };
                }
                else if (id.StartsWith("1145")) // 사슬 신발
                {
                    item.Type = 1145; ret = new int[] { 1, 2, 4 };
                }
                else if (id.StartsWith("1106")) // 판금 상의
                {
                    item.Type = 1106; ret = new int[] { 1, 3, 0 };
                }
                else if (id.StartsWith("1126")) // 판금 어깨
                {
                    item.Type = 1126; ret = new int[] { 1, 3, 1 };
                }
                else if (id.StartsWith("1116")) // 판금 장갑
                {
                    item.Type = 1116; ret = new int[] { 1, 3, 2 };
                }
                else if (id.StartsWith("1136")) // 판금 하의
                {
                    item.Type = 1136; ret = new int[] { 1, 3, 3 };
                }
                else if (id.StartsWith("1146")) // 판금 신발
                {
                    item.Type = 1146; ret = new int[] { 1, 3, 4 };
                }
                else if (id.StartsWith("1150")) // 방패
                {
                    item.Type = 1150; ret = new int[] { 1, 4, -1 };
                }
            }
            else if (id.StartsWith("12"))
            {
                if (id.StartsWith("120")) // 귀고리
                {
                    item.Type = 1200; ret = new int[] { 2, 0, -1 };
                }
                else if (id.StartsWith("121")) // 목걸이
                {
                    item.Type = 1210; ret = new int[] { 2, 1, -1 };
                }
                else if (id.StartsWith("122")) // 반지
                {
                    item.Type = 1220; ret = new int[] { 2, 2, -1 };
                }
                else if (id.StartsWith("123")) // 허리띠
                {
                    item.Type = 1230; ret = new int[] { 2, 3, -1 };
                }
                else if (id.StartsWith("125")) // 머리
                {
                    item.Type = 1250; ret = new int[] { 2, 4, -1 };
                }
            }
            else if (id.StartsWith("1870")) // 날개
            {
                item.Type = 1260; ret = new int[] { 2, 5, -1 };
            }
            else if (id.StartsWith("167000")) // 마석 16701:이벤트 마석
            {
                item.Type = 1670; ret = new int[] { 3, 0, -1 };
            }
            else if (id.StartsWith("16702")) // 고대마석
            {
                item.Type = 1672; ret = new int[] { 3, 1, -1 };
            }
            else if (id.StartsWith("16605")) //이디안
            {
                item.Type = 1665; ret = new int[] { 4, -1, -1 };
            }
            else if (id.StartsWith("16000")) // 음식
            {
                item.Type = 1600; ret = new int[] { 5, 0, -1 };
            }
            else if (id.StartsWith("16001")) // 캔디
            {
                item.Type = 1601; ret = new int[] { 5, 2, -1 };
            }
            else if (id.StartsWith("164") && name.StartsWith("scroll_")) // 주문서
            {
                item.Type = 1640; ret = new int[] { 5, 1, -1 };
            }
            else if (id.StartsWith("16961"))
            {
            }
            else if (id.StartsWith("102") || id.StartsWith("103") || id.StartsWith("1400") || id.StartsWith("15") || id.StartsWith("165") || id.StartsWith("1660") || id.StartsWith("1661") || id.StartsWith("1662") || id.StartsWith("16701") || id.StartsWith("16704") || id.StartsWith("168") || id.StartsWith("169") || id.StartsWith("17") || id.StartsWith("18") || id.StartsWith("19"))
            {
                // 102 : 키블레이드
                // 103 : 호기/곡괭이
                // 1400 : 스티그마
                // 15 : 제작
                // 16500 : 어비스템 제련
                // 16501 : 합성도구 한개
                // 1660 : 강화석
                // 1661 : 강화보조제
                // 1662 : 장비용 재감별 테스트 아이템. 조율주문서
                // 16701 : 이벤트 복합 마석
                // 16704 : 멀티마석?
                // 168 : 신석 , 신성부여
                // 1690 : 봉혼석
                // 1691 : 도색제
                // 1692 : 염색제
                // 1695 : 스킬북
                // 17 : 가구
                // 182 : 퀘스트
                // 19 : 펫
            }
            else if (id.StartsWith("11"))
            {
                // 1109 : 외변 상의
                // 1100 1110 1120 1130 1140
            }
            else if (id.StartsWith("141") || id.StartsWith("16"))
            {
                // 14100001 샤드
                // 162 물약
            }
            else
            {
            }
            if (name.Contains("test"))
            {
                return(null);
            }
            if (name.Contains("npc"))
            {
                return(null);
            }
            if (item.ViewName != null && item.ViewName.Contains("NPC"))
            {
                return(null);
            }

            int m = item.Type / 100;

            if (m == 10 || m == 11 || m == 12)
            {
                //if (quality == null || quality.CompareTo("common") == 0 || quality.CompareTo("rare") == 0 || quality.CompareTo("legend") == 0) return null;
                //if (level < LEVEL) return null;
                //if (quality == null || quality.CompareTo("common") == 0 || quality.CompareTo("rare") == 0 || quality.CompareTo("legend") == 0) return null;
                //|| quality.CompareTo("unique") == 0

                //영웅(epic/주황), 신화(mythic/보라)
                //if (level < 55) return null;
            }
            if (item.Is음식())
            {
                if (item.Skill == null)
                {
                    return(null);
                }
                if (item.Skill.NodeData.ContainsKey("conflict_id") == false)
                {
                    return(null);
                }
                if (item.Skill.NodeData["conflict_id"] != "22")
                {
                    return(null);
                }
            }
            if (item.Is캔디())
            {
                // effect1_type : ShapeChange
                if (item.Skill == null)
                {
                    return(null);
                }
                if (item.Skill.NodeData.ContainsKey("effect1_type") == false)
                {
                    return(null);
                }
                if (item.Skill.NodeData["effect1_type"].ToLower() != "shapechange")
                {
                    return(null);
                }
            }
            if (item.Is음식() || item.Is주문서() || item.Is캔디())
            {
                if (item.Skill == null)
                {
                    return(null);
                }
                // dp 스킬같이 stat 영향이 없다면 걍 널
                if (item.Skill.MainOption.Count == 0 && item.Skill.BonusOption.Count == 0)
                {
                    return(null);
                }
            }
            //if (item.Is이디안())
            {
//                if (item.RandomOption == null) return null;
            }

            return(ret);
        }