コード例 #1
0
        public Pathfinder(Room Room, RoomUser User)
        {
            this.Room = Room;
            this.Model = Room.Model;
            this.User = User;

            if (Room == null || Model == null || User == null)
            {
                return;
            }

            InitMovements(4);

            mapSizeX = Model.MapSizeX;
            mapSizeY = Model.MapSizeY;

            Squares = new CompleteSquare[mapSizeX, mapSizeY];

            for (int x = 0; x < mapSizeX; x++)
            {
                for (int y = 0; y < mapSizeY; y++)
                {
                    Squares[x, y] = new CompleteSquare(x, y);
                }
            }
        }
コード例 #2
0
ファイル: ShowMessage.cs プロジェクト: BjkGkh/R106
 public bool WiredConditionsMet(RoomUser user, Room theRoom)
 {
     if (handler.conditionHandler != null)
     {
         return handler.conditionHandler.AllowsHandling(item.GetX, item.GetY, user, theRoom);
     }
     return true;
 }
コード例 #3
0
ファイル: RoomData.cs プロジェクト: habb0/uberEmu-stabilized
 public void Fill(Room Room)
 {
     this.Id = Room.RoomId;
     this.Name = Room.Name;
     this.Description = Room.Description;
     this.Type = Room.Type;
     this.Owner = Room.Owner;
     this.Category = Room.Category;
     this.State = Room.State;
     this.UsersNow = Room.UsersNow;
     this.UsersMax = Room.UsersMax;
     this.ModelName = Room.ModelName;
     this.CCTs = Room.CCTs;
     this.Score = Room.Score;
     this.Tags = Room.Tags;
     this.AllowPets = Room.AllowPets;
     this.AllowPetsEating = Room.AllowPetsEating;
     this.AllowWalkthrough = Room.AllowWalkthrough;
     this.Hidewall = Room.Hidewall;
     this.myIcon = Room.Icon;
     this.Password = Room.Password;
     this.Event = Room.Event;
     this.Wallpaper = Room.Wallpaper;
     this.Floor = Room.Floor;
     this.Landscape = Room.Landscape;
 }
コード例 #4
0
        public void LoadRoom(uint Id)
        {
            if (IsRoomLoaded(Id))
            {
                return;
            }

            RoomData Data = GenerateRoomData(Id);

            if (Data == null)
            {
                return;
            }

            Room Room = new Room(Data.Id, Data.Name, Data.Description, Data.Type, Data.Owner, Data.Category, Data.State,
                Data.UsersMax, Data.ModelName, Data.CCTs, Data.Score, Data.Tags, Data.AllowPets, Data.AllowPetsEating,
                Data.AllowWalkthrough, Data.Hidewall, Data.Icon, Data.Password, Data.Wallpaper, Data.Floor, Data.Landscape);

            Rooms.Add(Room.RoomId, Room);

            Room.InitBots();
            Room.InitPets();

            UberEnvironment.GetLogging().WriteLine("[RoomMgr] Loaded room: \"" + Room.Name + "\" (ID: " + Id + ")", Uber.Core.LogLevel.Information);
        }