MapServer.BaseObject.GetTypeId C# (CSharp) Method

GetTypeId() public method

public GetTypeId ( ) : uint
return uint
        public uint GetTypeId()
        {
            return typeid;
        }

Usage Example

Exemplo n.º 1
0
        //刷新可视对象列表
        public virtual void RefreshVisibleObject()
        {
            //在地图被销毁的怪物啊-- 掉落物品啊..刷新的时候找不到了就删除掉!
            uint        id       = 0;
            List <uint> templist = null;

            foreach (RefreshObject refobj in mVisibleList.Values)
            {
                BaseObject obj = refobj.obj;
                if (obj.type == OBJECTTYPE.MONSTER ||
                    obj.type == OBJECTTYPE.GUARDKNIGHT)
                {
                    id = obj.GetTypeId();
                }
                else
                {
                    id = obj.GetGameID();
                }
                if (GetGameMap().GetObject(id) == null)
                {
                    if (templist == null)
                    {
                        templist = new List <uint>();
                    }
                    templist.Add(id);
                }
            }
            if (templist != null)
            {
                for (int i = 0; i < templist.Count; i++)
                {
                    mVisibleList.Remove(templist[i]);
                }
            }
        }
All Usage Examples Of MapServer.BaseObject::GetTypeId