Ejemplo n.º 1
0
    public void UpdateItem(t_ObjectProto item)
    {
        int index = mItemList.FindIndex((t_ObjectProto si) => { return(si.qwThisID == item.qwThisID); });

        if (index != -1)
        {
            mItemList.RemoveAt(index);
            mItemList.Add(item);
        }
        else
        {
            string error = "道具不存在: " + item.dwObjectID.ToString() + " X:" + item.pos.x.ToString();
            ALog.logWarning(error);
        }
    }
Ejemplo n.º 2
0
    public GeneralInfo GetGeneralInfo(int idx)
    {
        int         index = generals.FindIndex((info) => info.id == idx);
        GeneralInfo inf   = null;

        try
        {
            inf = generals[index];
        }
        catch (Exception)
        {
            ALog.logWarning("DungeonMgr=> Error General ID: " + idx.ToString());
        }
        return(inf);
    }