public void ChangeMap(uint mapid, short x, short y)
{
GameMap target_map = MapManager.Instance().GetGameMapToID(mapid);
if (target_map == null)
{
Log.Instance().WriteLog("传送地图失败,该地图id不存在," + mapid.ToString() + " x:" + x.ToString() + " y:" + y.ToString());
return;
}
this.GetGameMap().RemoveObj(this);
//召回所有幻兽-
this.GetEudemonSystem().Eudemon_ReCallAll(true);
target_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 = mapid;
this.SendJueweiNotice();
this.SetTransmitIng(true);
// this.GetEudemonSystem().FlyPlay();
}