public void FlyMap(uint mapid, short x, short y, byte dir)
{
GameMap map = MapManager.Instance().GetGameMapToID(mapid);
if (map == null)
{
Log.Instance().WriteLog("未找到游戏地图id:" + mapid.ToString());
return;
}
if (GetGameMap() != null)
{
GetGameMap().RemoveObj(this);
}
this.mGameMap = map;
this.GetBaseAttr().mapid = mapid;
this.SetPoint(x, y);
this.SetDir(dir);
map.AddObject(this, this.GetGameSession());
//重新刷新可视列表
GameStruct.Action act = new GameStruct.Action(GameStruct.Action.MOVE);
this.PushAction(act);
//发给玩家
NetMsg.MsgMapInfo mapinfo = new NetMsg.MsgMapInfo();
mapinfo.Create(null, GetGamePackKeyEx());
mapinfo.Init(mapid, x, y, NetMsg.MsgMapInfo.ENTERMAP);
this.SendData(mapinfo.GetBuffer());
//发送天气信息
this.GetGameMap().SendWeatherInfo(this);
}