Ejemplo n.º 1
0
    public bool    IsActionFull(EAction type)
    {
        DAction actDB = ReadCfgAction.GetDataById(type);
        DItem   db    = ReadCfgItem.GetDataById(actDB.ItemID);
        int     count = GTDataManager.Instance.GetActionCountByType(type);

        return(count >= db.Data1);
    }
Ejemplo n.º 2
0
    public int     GetAllRemainSeconds(EAction actionType)
    {
        int index = 0;

        for (int i = 0; i < mActionKeyList.Count; i++)
        {
            int     key  = mActionKeyList[i];
            EAction type = GetActionType(key);
            if (type == actionType)
            {
                index = i;
                break;
            }
        }
        int     count = GTDataManager.Instance.GetActionCountByType(actionType);
        DAction actDB = ReadCfgAction.GetDataById(actionType);
        DItem   db    = ReadCfgItem.GetDataById(actDB.ItemID);

        return((int)((db.Data1 - count - 1) * db.Data2 + mActionNextTimes[index] - CurServerTime));
    }