Esempio n. 1
0
        protected override void OnPlacementUpdatePosition(ref SlimDX.Vector3 pos)
        {
            if (!this.HostMap.IsNullMap)
            {
                var mapCell = this.HostMap.GetMapCell(pos.X, pos.Z);
                if (mapCell != null)
                {
                    if (this.HostMapCell != mapCell)
                    {
                        mapCell.AddRole(this);

                        //// 向玩家发送周围格NPC
                        //this.HostMap.UpdateNPCsToClient(this);
                        //// 向玩家发送周围格玩家
                        //this.HostMap.UpdatePlayersToClient(this);
                    }
                }
            }


            if (!this.HostMap.IsNullMap && HostMap.IsSavePos(this))
            {
                SetRoleDetailPos(pos.X, pos.Z);
                PlayerData.RoleDetail.Direction = this.Placement.GetDirection();
            }
        }