Example #1
0
        private List <IMapleMapObject> GetObjectsInRange(MapleMonster monster, MapleMapObjectType objectType)
        {
            var bounds      = CalculateBoundingBox(monster.Position, monster.IsFacingLeft);
            var objectTypes = new List <MapleMapObjectType>();

            objectTypes.Add(objectType);
            return(monster.Map.GetMapObjectsInRect(bounds, objectTypes));
        }
Example #2
0
        /// <summary>
        /// 获取地图对象
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="mapObject"></param>
        /// <returns></returns>
        public static CMapleMapObject GetObjec(MapleMapObjectType type, int Uid)
        {
            //Liqn语句查询对象.
            var ret = (from s in m_MapList[type]
                       where s.Key == Uid
                       select s.Value).First();

            return(ret);
        }