public PositionReset(List <RoomItem> items, int delay, string data, Dictionary <uint, OriginalItemLocation> originalItemlocation, RoomItemHandling roomItemHandler, WiredHandler handler, RoomItem itemID) { this.items = items; this.originalItemLocation = originalItemlocation; if (originalItemlocation.Count <= 0 && this.items.Count > 0) { foreach (RoomItem nItem in items) { this.originalItemLocation.Add(nItem.Id, new OriginalItemLocation(nItem.Id, nItem.GetX, nItem.GetY, nItem.TotalHeight, nItem.Rot, nItem.ExtraData)); } } this.delay = delay; this.roomItemHandler = roomItemHandler; this.cycles = 0; this.itemID = itemID; this.handler = handler; this.disposed = false; if (data.Length > 0 && data.Contains(",")) { this.FurniState = int.Parse(data.Split(',')[0]); this.FurniDirection = int.Parse(data.Split(',')[1]); this.FurniPosition = int.Parse(data.Split(',')[2]); } }
public PositionReset(List <Item> items, int delay, RoomItemHandling roomItemHandler, WiredHandler handler, int itemID, int etatActuel, int directionActuel, int positionActuel) { this.Delay = delay; this.roomItemHandler = roomItemHandler; this.itemID = itemID; this.handler = handler; this.disposed = false; this.EtatActuel = etatActuel; this.DirectionActuel = directionActuel; this.PositionActuel = positionActuel; this.items = new ConcurrentDictionary <int, ItemsPosReset>(); foreach (Item roomItem in items) { if (!this.items.ContainsKey(roomItem.Id)) { this.items.TryAdd(roomItem.Id, new ItemsPosReset(roomItem, roomItem.GetX, roomItem.GetY, roomItem.GetZ, roomItem.Rotation, roomItem.ExtraData)); } else { ItemsPosReset RemoveItem = null; this.items.TryRemove(roomItem.Id, out RemoveItem); this.items.TryAdd(roomItem.Id, new ItemsPosReset(roomItem, roomItem.GetX, roomItem.GetY, roomItem.GetZ, roomItem.Rotation, roomItem.ExtraData)); } } }
public RoomItemHandling GetRoomItemHandler() { if (_roomItemHandling == null) { _roomItemHandling = new RoomItemHandling(this); } return(_roomItemHandling); }
public void Dispose() { disposed = true; roomItemHandler = null; handler = null; if (items != null) items.Clear(); items = null; }
public PositionReset(List <RoomItem> items, int delay, RoomItemHandling roomItemHandler, WiredHandler handler, uint itemID) { this.items = items; this.delay = delay; this.roomItemHandler = roomItemHandler; this.cycles = 0; this.itemID = itemID; this.handler = handler; this.disposed = false; }
public PositionReset(List<RoomItem> items, int delay, RoomItemHandling roomItemHandler, WiredHandler handler, uint itemID) { this.items = items; this.delay = delay; this.roomItemHandler = roomItemHandler; this.cycles = 0; this.itemID = itemID; this.handler = handler; this.disposed = false; }
public void Dispose() { disposed = true; roomItemHandler = null; handler = null; if (items != null) { items.Clear(); } items = null; }
public void Dispose() { this.disposed = true; this.roomItemHandler = (RoomItemHandling)null; this.handler = (WiredHandler)null; if (this.items != null) { this.items.Clear(); } this.items = null; }
public PositionReset(List<RoomItem> items, int delay, RoomItemHandling roomItemHandler, WiredHandler handler, RoomItem item) { this.items = items; originalItemLocation = new Dictionary<uint, OriginalItemLocation>(items.Count); foreach (RoomItem nItem in items) { this.originalItemLocation.Add(nItem.Id, new OriginalItemLocation(nItem.Id, nItem.GetX, nItem.GetY, nItem.Height, nItem.Rot, nItem.ExtraData)); } this.delay = delay; this.roomItemHandler = roomItemHandler; this.cycles = 0; this.item = item; this.handler = handler; this.disposed = false; AttatchListenersToItems(); }
public PositionReset(List<RoomItem> items, int delay, RoomItemHandling roomItemHandler, WiredHandler handler, uint itemID, int pos, int rot, int state) { this.items = items; this.delay = delay; this.roomItemHandler = roomItemHandler; this.cycles = 0; this.MatchPos = pos; this.MatchRot = rot; this.MatchState = state; this.itemID = itemID; this.handler = handler; this.disposed = false; this.State = new Dictionary<RoomItem, string>(); this.Rot = new Dictionary<RoomItem, int>(); this.Pos = new Dictionary<RoomItem, Point>(); }
public void Dispose() { disposed = true; roomItemHandler = null; handler = null; DetatchFromListeners(); if (items != null) items.Clear(); items = null; }
//public RoomTraxManager traxManager; //private ProcessComponent _process = null; public Room(RoomData Data) { this.IsLagging = 0; this.IdleTime = 0; this._roomData = Data; RoomMuted = false; mDisposed = false; muteSignalEnabled = false; this.Id = Data.Id; this.Name = Data.Name; this.Description = Data.Description; this.OwnerName = Data.OwnerName; this.OwnerId = Data.OwnerId; this.WiredScoreBordDay = Data.WiredScoreBordDay; this.WiredScoreBordWeek = Data.WiredScoreBordWeek; this.WiredScoreBordMonth = Data.WiredScoreBordMonth; this.WiredScoreFirstBordInformation = Data.WiredScoreFirstBordInformation; this._hideWired = Data.HideWired; this.ForSale = false; this.SalePrice = 0; this.Category = Data.Category; this.Type = Data.Type; this.Access = Data.Access; this.UsersNow = 0; this.UsersMax = Data.UsersMax; this.ModelName = Data.ModelName; this.Score = Data.Score; this.Tags = new List <string>(); foreach (string tag in Data.Tags) { Tags.Add(tag); } this.AllowPets = Data.AllowPets; this.AllowPetsEating = Data.AllowPetsEating; this.RoomBlockingEnabled = Data.RoomBlockingEnabled; this.Hidewall = Data.Hidewall; this.Group = Data.Group; this.Password = Data.Password; this.Wallpaper = Data.Wallpaper; this.Floor = Data.Floor; this.Landscape = Data.Landscape; this.WallThickness = Data.WallThickness; this.FloorThickness = Data.FloorThickness; this.chatMode = Data.chatMode; this.chatSize = Data.chatSize; this.chatSpeed = Data.chatSpeed; this.chatDistance = Data.chatDistance; this.extraFlood = Data.extraFlood; this.TradeSettings = Data.TradeSettings; this.WhoCanBan = Data.WhoCanBan; this.WhoCanKick = Data.WhoCanKick; this.WhoCanBan = Data.WhoCanBan; this.PushEnabled = Data.PushEnabled; this.PullEnabled = Data.PullEnabled; this.SPullEnabled = Data.SPullEnabled; this.SPushEnabled = Data.SPushEnabled; this.EnablesEnabled = Data.EnablesEnabled; this.RespectNotificationsEnabled = Data.RespectNotificationsEnabled; this.PetMorphsAllowed = Data.PetMorphsAllowed; this.Shoot = Data.Shoot; this.poolQuestion = string.Empty; this.yesPoolAnswers = new List <int>(); this.noPoolAnswers = new List <int>(); this.ActiveTrades = new ArrayList(); this.Bans = new Dictionary <int, double>(); this.MutedUsers = new Dictionary <int, double>(); this.Tents = new Dictionary <int, List <RoomUser> >(); _gamemap = new Gamemap(this); if (_roomItemHandling == null) { _roomItemHandling = new RoomItemHandling(this); } _roomUserManager = new RoomUserManager(this); this._filterComponent = new FilterComponent(this); this._wiredComponent = new WiredComponent(this); _roomMusicManager = new MusicManager(); GetRoomItemHandler().LoadFurniture(); GetGameMap().GenerateMaps(); this.LoadPromotions(); this.LoadRights(); this.LoadBans(); this.LoadFilter(); this.InitBots(); this.InitPets(); Data.UsersNow = 1; }
private void Initialize(uint Id, string Name, string Description, string Type, string Owner, int OwnerId, int Category, int State, int TradeState, int UsersMax, string ModelName, int Score, List <string> pTags, int AllowPets, int AllowPetsEating, int AllowWalkthrough, int Hidewall, string Password, string Wallpaper, string Floor, string Landscape, RoomData RoomData, bool RightOverride, int walltickness, int floorthickness, Guild group, int GameId, int chattype, int chatballoon, int chatspeed, int chatmaxdis, int chatprotection, int whomute, int whokick, int whoban, uint groupid, HashSet <Chatlog> Chat, List <string> WordFilter, int WallHeight) { this.mDisposed = false; this.Id = Id; this.Name = Name; this.Description = Description; this.Owner = Owner; this.OwnerId = OwnerId; this.Category = Category; this.Type = Type; this.State = State; this.TradeState = TradeState; this.UsersNow = 0; this.UsersMax = UsersMax; this.ModelName = ModelName; this.Score = Score; this.tagCount = 0; this.Tags = new ArrayList(); foreach (string current in pTags) { this.tagCount++; this.Tags.Add(current); } this.ChatType = chattype; this.ChatBalloon = chatballoon; this.ChatSpeed = chatspeed; this.ChatMaxDistance = chatmaxdis; this.ChatFloodProtection = chatprotection; this.AllowPets = AllowPets; this.AllowPetsEating = AllowPetsEating; this.AllowWalkthrough = AllowWalkthrough; this.Hidewall = Hidewall; this.Group = group; this.Password = Password; this.Bans = new Dictionary <long, double>(); this.MutedUsers = new Dictionary <uint, uint>(); this.Wallpaper = Wallpaper; this.Floor = Floor; this.Landscape = Landscape; this.ActiveTrades = new ArrayList(); this.MutedBots = false; this.mCycleEnded = false; this.mRoomData = RoomData; this.EveryoneGotRights = RightOverride; this.LoadedGroups = new Dictionary <uint, string>(); this.roomKick = new Queue(); this.IdleTime = 0; this.RoomMuted = false; this.WallThickness = walltickness; this.FloorThickness = floorthickness; this.WallHeight = WallHeight; this.gamemap = new Gamemap(this); this.roomItemHandling = new RoomItemHandling(this); this.roomUserManager = new RoomUserManager(this); this.RoomChat = Chat; this.WordFilter = WordFilter; this.Event = CyberEnvironment.GetGame().GetRoomEvents().GetEvent(Id); this.WhoCanBan = whoban; this.WhoCanKick = whokick; this.WhoCanBan = whoban; this.GroupId = groupid; this.LoadRights(); this.LoadMusic(); this.LoadBans(); this.InitUserBots(); this.RoomThread = new Thread(new ThreadStart(StartRoomProcessing)); this.RoomThread.Start(); CyberEnvironment.GetGame().GetRoomManager().QueueActiveRoomAdd(this.mRoomData); }