public void SetData(SETITEM_DATA info)
 {
     if (info != null)
     {
         this.m_ItemSetDataList.Add(info.m_Idx, info);
     }
 }
    public void Check(ITEM_SET pData, ref int Def, ref int mdef, ref int addHP, ref int STR, ref int DEX, ref int INT, ref int VIT, ref int CRIT, ref int Damage_p, ref int Damage)
    {
        if (this.m_ItemSetDataList.ContainsKey(pData.m_SetUnique))
        {
            SETITEM_DATA sETITEM_DATA = this.m_ItemSetDataList[pData.m_SetUnique];
            for (int i = 0; i < 6; i++)
            {
                if (i <= pData.m_nSetCount)
                {
                    switch (sETITEM_DATA.m_nSetEffectCode[i])
                    {
                    case 1:
                        Def += sETITEM_DATA.m_nValue[i];
                        break;

                    case 2:
                        mdef += sETITEM_DATA.m_nValue[i];
                        break;

                    case 3:
                        addHP += sETITEM_DATA.m_nValue[i];
                        break;

                    case 4:
                        STR += sETITEM_DATA.m_nValue[i];
                        break;

                    case 5:
                        DEX += sETITEM_DATA.m_nValue[i];
                        break;

                    case 6:
                        INT += sETITEM_DATA.m_nValue[i];
                        break;

                    case 7:
                        VIT += sETITEM_DATA.m_nValue[i];
                        break;

                    case 8:
                        CRIT += sETITEM_DATA.m_nValue[i];
                        break;

                    case 9:
                        Damage_p += sETITEM_DATA.m_nValue[i];
                        break;

                    case 10:
                        Damage += sETITEM_DATA.m_nValue[i];
                        break;
                    }
                }
            }
        }
    }
Exemplo n.º 3
0
 public override bool ParseDataFromNDT(TsDataReader dr)
 {
     foreach (TsDataReader.Row data in dr)
     {
         SETITEM_DATA sETITEM_DATA = new SETITEM_DATA();
         sETITEM_DATA.SetData(data);
         for (int i = 0; i < 6; i++)
         {
             sETITEM_DATA.m_nSetEffectCode[i] = NrTSingleton <NrSetItemDataManager> .Instance.GetOptionType(sETITEM_DATA.m_strSetEffectCode[i]);
         }
         NrTSingleton <NrSetItemDataManager> .Instance.SetData(sETITEM_DATA);
     }
     return(true);
 }
    private eSETITEM_OPTION_TYPE GetType(int SetItemUnique, int Count)
    {
        eSETITEM_OPTION_TYPE result = eSETITEM_OPTION_TYPE.eSETITEM_OPTION_TYPE_NONE;

        if (this.m_ItemSetDataList.ContainsKey(SetItemUnique))
        {
            SETITEM_DATA sETITEM_DATA = this.m_ItemSetDataList[SetItemUnique];
            if (Count < sETITEM_DATA.m_nSetEffectCode.Length)
            {
                result = (eSETITEM_OPTION_TYPE)sETITEM_DATA.m_nSetEffectCode[Count];
            }
        }
        return(result);
    }
    public int GetSetData(Dictionary <int, ITEM_SET> _ItemSets, eSETITEM_OPTION_TYPE _type)
    {
        if (_ItemSets == null)
        {
            return(0);
        }
        int num = 0;

        foreach (ITEM_SET current in _ItemSets.Values)
        {
            SETITEM_DATA sETITEM_DATA = this.m_ItemSetDataList[current.m_SetUnique];
            for (int i = 0; i < 6; i++)
            {
                if (i <= current.m_nSetCount && sETITEM_DATA.m_nSetEffectCode[i] == (int)_type)
                {
                    num += sETITEM_DATA.m_nValue[i];
                }
            }
        }
        return(num);
    }