示例#1
0
 public override bool ParseDataFromNDT(TsDataReader dr)
 {
     foreach (TsDataReader.Row data in dr)
     {
         PLUNDER_SUPPORT_GOLD pLUNDER_SUPPORT_GOLD = new PLUNDER_SUPPORT_GOLD();
         pLUNDER_SUPPORT_GOLD.SetData(data);
         NrTSingleton <NrTable_SupportGold_Manager> .Instance.Set_Value(pLUNDER_SUPPORT_GOLD);
     }
     return(true);
 }
示例#2
0
 public void Set_Value(PLUNDER_SUPPORT_GOLD a_cValue)
 {
     if (this.m_sdCollection.ContainsKey(a_cValue.m_nCharLevel))
     {
         this.m_sdCollection[a_cValue.m_nCharLevel] = a_cValue;
     }
     else
     {
         this.m_sdCollection.Add(a_cValue.m_nCharLevel, a_cValue);
     }
 }
示例#3
0
    public long GetReceiveGold(int nCharLevel, long nPastTime)
    {
        PLUNDER_SUPPORT_GOLD pLUNDER_SUPPORT_GOLD = this.Get_Value(nCharLevel);

        if (pLUNDER_SUPPORT_GOLD == null)
        {
            return(0L);
        }
        long nSupportGold = pLUNDER_SUPPORT_GOLD.m_nSupportGold;
        long nMaxGold     = pLUNDER_SUPPORT_GOLD.m_nMaxGold;
        int  value        = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PLUNDER_SUPPORTTIME);
        int  num          = (int)(nPastTime / 60L / (long)value);
        long val          = (long)num * nSupportGold;

        return(Math.Min(val, nMaxGold));
    }