private bool ChangePartsImageCode(eBeyond beyond, eParts parts, eOption opt, out int code) { code = 0; if (beyond == eBeyond.Ancient) { if (true == m_ancientItems.ContainsKey(parts)) { if (true == m_ancientItems[parts].ContainsKey(opt)) { code = m_ancientItems[parts][opt].Code; return(true); } } } else if (beyond == eBeyond.Mythic) { if (true == m_mythicItems.ContainsKey(parts)) { if (true == m_mythicItems[parts].ContainsKey(opt)) { code = m_mythicItems[parts][opt].Code; return(true); } } } return(false); }
private int GetOptionCount(eGrade grade, eBeyond beyond = eBeyond.None) { if (beyond == eBeyond.Mythic) { return(5); } else { switch (grade) { case eGrade.None: return(0); case eGrade.Normal: return(1); case eGrade.Magic: return(2); case eGrade.Rare: return(3); case eGrade.Epic: return(4); case eGrade.Legend: return(4); case eGrade.Set: return(4); default: return(0); } } }
public override void Read(ref Packet p) { Slot = p.ReadInt(); Lv = p.ReadInt(); Grade = (eGrade)p.ReadInt(); Parts = (eParts)p.ReadInt(); Code = p.ReadInt(); Equip = p.ReadBool(); if (null == BaseOpt) { BaseOpt = new List <rdOption>(); } BaseOpt.Read(ref p); if (null == AddOpts) { AddOpts = new List <rdOption>(); } AddOpts.Read(ref p); //Ancient = p.ReadBool(); Beyond = (eBeyond)p.ReadInt(); }
public override void LoadExcelSheet(DataRow rowData) { fmDataOption data = m_fmData as fmDataOption; data.m_nCode = GetInt(rowData, "nCode"); { string str = GetString(rowData, "eOption"); data.m_eOption = (eOption)Enum.Parse(typeof(eOption), str); } data.m_nAppearLv = GetInt(rowData, "nAppearLv"); { string[] strParts = GetStrArray(rowData, "eParts"); List <int> list = new List <int>(); foreach (var node in strParts) { if (false == string.IsNullOrEmpty(node)) { eParts parts = (eParts)Enum.Parse(typeof(eParts), node); list.Add((int)parts); } } data.m_nArrParts = list.ToArray(); } { string[] strBeyond = GetStrArray(rowData, "eBeyond"); List <int> list = new List <int>(); foreach (var node in strBeyond) { if (false == string.IsNullOrEmpty(node)) { eBeyond parts = (eBeyond)Enum.Parse(typeof(eBeyond), node); list.Add((int)parts); } } data.m_nArrBeyond = list.ToArray(); } //data.m_nWorld = GetInt(rowData, "nWorld"); //data.m_nInDun = GetInt(rowData, "nIndun"); }
private bool ChangeWeaponImageCode(eBeyond beyond, int oriCode, out int outCode) { outCode = 0; if (true == m_dataItems.ContainsKey(oriCode)) { eWeapon type = m_dataItems[oriCode].m_eWeapon; if (true == m_weapons.ContainsKey(beyond)) { if (true == m_weapons[beyond].ContainsKey(type)) { outCode = m_weapons[beyond][type].Code; return(true); } } } return(false); }
private eGrade GetGradeByAddOptCnt(int cnt, eBeyond beyond = eBeyond.None) { if (beyond == eBeyond.Mythic) { switch (cnt) { case 0: return(eGrade.None); case 1: return(eGrade.Normal); case 2: return(eGrade.Normal); case 3: return(eGrade.Magic); case 4: return(eGrade.Rare); case 5: return(eGrade.Epic); default: return(eGrade.None); } } else { switch (cnt) { case 0: return(eGrade.None); case 1: return(eGrade.Normal); case 2: return(eGrade.Magic); case 3: return(eGrade.Rare); case 4: return(eGrade.Epic); default: return(eGrade.None); } } }