public RoomModel(DataRow Row) { using (RowAdapter Adapter = new RowAdapter(Row)) { this.Id = Adapter.PopInt32("id"); this.Caption = Adapter.PopString("caption"); this.Map = Adapter.PopString("map").Replace(((char)10).ToString(),string.Empty); this.LocationDoorX = Adapter.PopInt32("location_door_x"); this.LocationDoorY = Adapter.PopInt32("location_door_y"); this.LocationDoorZ = Adapter.PopInt32("location_door_z"); this.LocationDoorRotation = Adapter.PopInt32("location_door_rotation"); this.MaximalUnits = Adapter.PopInt32("maximal_units"); this.RequiredMembership = Adapter.PopEnum<Membership>("required_membership"); } this.Nodes = new List<TileNode>(); for (int y = 0; y < this.Map.Split((char)13).Length; y++) { var Line = this.Map.Split((char)13)[y]; for (int x = 0; x < Line.Length; x++) { char Item = Line[x]; TileNode Node = new TileNode(Item, x, y); Nodes.Add(Node); } } this.ParametersWithDoor = GetParametersWithDoor(); this.ParametersWithOutDoor = GetParametersWithOutDoor(); }
public Character(DataRow Row) { using (RowAdapter Adapter = new RowAdapter(Row)) { this.Id = Adapter.PopInt32("id"); this.Username = Adapter.PopString("username"); this.Motto = Adapter.PopString("motto"); this.Figure = Adapter.PopString("figure"); this.Registered = Adapter.PopString("registered_stamp"); this.LastSeen = Adapter.PopString("last_seen"); this.Gender = Adapter.PopEnum<Gender>("gender"); this.Muted = Adapter.PopBoolean("muted"); this.AllowNewFriends = Adapter.PopBoolean("allow_new_friends"); this.Rank = System.HabboSystem.CharacterManager.GetRank(Adapter.PopInt32("rank")); this.Credits = Adapter.PopInt32("credits"); this.ActivityPoints = Adapter.PopInt32("activity_points"); this.SoundSettings = Adapter.PopInt32("sound_settings"); this.TimeOnline = Adapter.PopInt32("time_online"); this.HomeRoom = Adapter.PopInt32("home_room"); this.RespectEarned = Adapter.PopInt32("respect_earned"); this.RespectGiven = Adapter.PopInt32("respect_given"); this.RespectLeftHuman = Adapter.PopInt32("respect_left_human"); this.RespectLeftAnimal = Adapter.PopInt32("respect_left_animal"); this.LoadingRoom = 0; this.ConnectedRoom = 0; } }
public Room(DataRow Row) { using (RowAdapter Adapter = new RowAdapter(Row)) { this.Id = Adapter.PopInt32("id"); this.Caption = Adapter.PopString("caption"); this.Description = Adapter.PopString("description"); this.CharacterId = Adapter.PopInt32("character_id"); this.ModelId = Adapter.PopInt32("model_id"); this.DoorState = Adapter.PopEnum<DoorState>("door_state"); this.Password = Adapter.PopString("password"); } }