コード例 #1
0
ファイル: Character.cs プロジェクト: devMextur/Tazqon
        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;
            }
        }
コード例 #2
0
ファイル: Achievement.cs プロジェクト: devMextur/Tazqon
        public Achievement(DataRow Row)
        {
            using (RowAdapter Adapter = new RowAdapter(Row))
            {
                Id = Adapter.PopInt32("id");
                CategoryId = Adapter.PopInt32("category_id");
                BadgeId = Adapter.PopInt32("badge_id");
                PixelReward = Adapter.PopInt32("pixel_reward");
                ScoreReward = Adapter.PopInt32("score_reward");
                PixelMultiply = Adapter.PopDouble("pixel_multiply");
                ScoreMultiply = Adapter.PopDouble("score_multiply");
                EnableBadgeBuilding = Adapter.PopBoolean("enable_bagde_building");
            }

            Limits = new Dictionary<int, int>();

            foreach (DataRow LimitRow in System.MySQLManager.GetObject(new AchievementLimitsQuery(Id)).GetOutput<DataTable>().Rows)
            {
                using (RowAdapter Adapter = new RowAdapter(LimitRow))
                {
                    int Level = Adapter.PopInt32("level");
                    int Limit = Adapter.PopInt32("required");

                    if (Limit < 0)
                    {
                        Limit = 1;
                    }

                    if (!Limits.ContainsKey(Level))
                    {
                        Limits.Add(Level, Limit);
                    }
                }
            }
        }
コード例 #3
0
ファイル: CharacterRank.cs プロジェクト: devMextur/Tazqon
 public CharacterRank(DataRow Row)
 {
     using (RowAdapter Adapter = new RowAdapter(Row))
     {
         this.Id = Adapter.PopInt32("id");
         this.Caption = Adapter.PopString("caption");
         this.ShowCaptionInGame = Adapter.PopBoolean("show_caption_ingame");
     }
 }