GetMapInfo() публичный Метод

public GetMapInfo ( ) : MapInfo
Результат GameStruct.MapInfo
Пример #1
0
        //加入副本地图
        public GameMap AddFubenMap(uint mapid)
        {
            GameMap map    = this.GetGameMapToID(mapid);
            GameMap fb_map = null;

            if (map == null)
            {
                Log.Instance().WriteLog("创建副本地图失败,地图ID:" + mapid.ToString());
                return(null);;
            }
            FubenGameMap fuben_map = null;

            if (m_DicFubenMap.ContainsKey(map.GetMapInfo().id))
            {
                fuben_map = m_DicFubenMap[map.GetMapInfo().id];
            }

            if (fuben_map == null)
            {
                fuben_map = new FubenGameMap(map.GetMapInfo().id);
                m_DicFubenMap[map.GetMapInfo().id] = fuben_map;
            }//从现有的副本中取出
            else
            {
            }
            fb_map = fuben_map.GetFubenMap();
            if (fb_map == null)
            {
                fb_map = map.Clone();
            }

            return(fb_map);
        }
Пример #2
0
        //更换地图 用于副本场景
        public void ChangeFubenMap(GameMap map, short x, short y)
        {
            if (map == null) return;
            this.GetGameMap().RemoveObj(this);
            //召回所有幻兽-
            this.GetEudemonSystem().Eudemon_ReCallAll(true);
            map.AddObject(this, this.GetGameSession());

            //先清除自身对象
            this.ClearThis();

            this.SetPoint(x, y);
            //要发二个包
            NetMsg.MsgReCall1 msg = new NetMsg.MsgReCall1();
            msg.Create(null, GetGamePackKeyEx());
            msg.roleid = this.GetTypeId();
            msg.mapid = (int)this.GetGameMap().GetMapInfo().id;
            msg.x = this.GetCurrentX();
            msg.y = this.GetCurrentY();
            this.SendData(msg.GetBuffer());

            NetMsg.MsgReCall2 msg1 = new NetMsg.MsgReCall2();
            msg1.Create(null, GetGamePackKeyEx());
            msg1.roleid = this.GetTypeId();
            msg1.x = this.GetCurrentX();
            msg1.y = this.GetCurrentY();
            this.SendData(msg1.GetBuffer());

            this.GetVisibleList().Clear();

            GameStruct.Action act = new GameStruct.Action(GameStruct.Action.MOVE);
            this.PushAction(act);

            GetBaseAttr().mapid = map.GetMapInfo().id;

            this.SendJueweiNotice();
            this.SetTransmitIng(true);
        }