Exemplo n.º 1
0
 public override bool ParseDataFromNDT(TsDataReader dr)
 {
     foreach (TsDataReader.Row data in dr)
     {
         ITEMSKILLREINFORCE iTEMSKILLREINFORCE = new ITEMSKILLREINFORCE();
         iTEMSKILLREINFORCE.SetData(data);
         NrTSingleton <ITEMSKILLREINFORCE_Manager> .Instance.SetItemSkillReinforceData(iTEMSKILLREINFORCE);
     }
     return(true);
 }
Exemplo n.º 2
0
 public ITEMSKILLREINFORCE GetItemskillReinforceData(int GroupUnique, int ItemSkillLevel)
 {
     if (this.mHash_ItemSkillReinforceData.ContainsKey(GroupUnique))
     {
         foreach (KeyValuePair <int, ITEMSKILLREINFORCE> current in this.mHash_ItemSkillReinforceData[GroupUnique])
         {
             ITEMSKILLREINFORCE value = current.Value;
             if (value.nItemSkillLevel == ItemSkillLevel)
             {
                 return(value);
             }
         }
     }
     return(null);
 }
 public void Add(int skillLevel, ITEMSKILLREINFORCE pkNowItemSkillReinforceData)
 {
     if (pkNowItemSkillReinforceData != null && pkNowItemSkillReinforceData.nGroupUnique == this.nGroupUnique)
     {
         this.nItemSkillLevel = skillLevel;
         this.nRestoreGold   += pkNowItemSkillReinforceData.nRestoreGold;
         this.nFailrate      += pkNowItemSkillReinforceData.nFailrate;
         this.nNeedGold      += pkNowItemSkillReinforceData.nNeedGold;
         for (int i = 0; i < 2; i++)
         {
             this.nNeedItem_num[i] += pkNowItemSkillReinforceData.nNeedItem_num[i];
         }
         this.nProtectitem_num += pkNowItemSkillReinforceData.nProtectitem_num;
     }
 }
 public void Set(ITEMSKILLREINFORCE pkNowItemSkillReinforceData)
 {
     if (pkNowItemSkillReinforceData != null)
     {
         this.nGroupUnique    = pkNowItemSkillReinforceData.nGroupUnique;
         this.nItemSkillLevel = pkNowItemSkillReinforceData.nItemSkillLevel;
         this.nRestoreGold    = pkNowItemSkillReinforceData.nRestoreGold;
         this.nFailrate       = pkNowItemSkillReinforceData.nFailrate;
         this.nNeedGold       = pkNowItemSkillReinforceData.nNeedGold;
         for (int i = 0; i < 2; i++)
         {
             this.nNeedItem_Unique[i] = pkNowItemSkillReinforceData.nNeedItem_Unique[i];
             this.nNeedItem_num[i]    = pkNowItemSkillReinforceData.nNeedItem_num[i];
         }
         this.nProtectitem_Unique = pkNowItemSkillReinforceData.nProtectitem_Unique;
         this.nProtectitem_num    = pkNowItemSkillReinforceData.nProtectitem_num;
     }
 }
Exemplo n.º 5
0
    public void AddItemSkillReinforceData(ITEMSKILLREINFORCE skillReinforceData, int SkillLevelIndex)
    {
        ITEMSKILLREINFORCE itemskillReinforceData = this.GetItemskillReinforceData(skillReinforceData.nGroupUnique, SkillLevelIndex - 1);

        if (itemskillReinforceData != null)
        {
            ITEMSKILLREINFORCE itemskillReinforceData2 = this.GetItemskillReinforceData(skillReinforceData.nGroupUnique, SkillLevelIndex);
            ITEMSKILLREINFORCE iTEMSKILLREINFORCE      = new ITEMSKILLREINFORCE();
            iTEMSKILLREINFORCE.Set(itemskillReinforceData);
            iTEMSKILLREINFORCE.Add(SkillLevelIndex, skillReinforceData);
            if (itemskillReinforceData2 == null)
            {
                this.mHash_ItemSkillReinforceData[skillReinforceData.nGroupUnique].Add(SkillLevelIndex, iTEMSKILLREINFORCE);
            }
            else
            {
                itemskillReinforceData2.Set(iTEMSKILLREINFORCE);
            }
        }
    }
Exemplo n.º 6
0
 public void SetItemSkillReinforceData(ITEMSKILLREINFORCE skillReinforceData)
 {
     if (!this.mHash_ItemSkillReinforceData.ContainsKey(skillReinforceData.nGroupUnique))
     {
         this.mHash_ItemSkillReinforceData.Add(skillReinforceData.nGroupUnique, new Dictionary <int, ITEMSKILLREINFORCE>());
         if (!this.mHash_ItemSkillReinforceData[skillReinforceData.nGroupUnique].ContainsKey(skillReinforceData.nItemSkillLevel))
         {
             this.mHash_ItemSkillReinforceData[skillReinforceData.nGroupUnique].Add(skillReinforceData.nItemSkillLevel, skillReinforceData);
             return;
         }
     }
     for (int i = skillReinforceData.nItemSkillLevel; i < 30; i++)
     {
         ITEMSKILLREINFORCE itemskillReinforceData = this.GetItemskillReinforceData(skillReinforceData.nGroupUnique, i - 1);
         if (itemskillReinforceData != null)
         {
             this.AddItemSkillReinforceData(skillReinforceData, i);
         }
     }
 }