当前位置: 首页>>代码示例>>C#>>正文


C# Database.GetCommands方法代码示例

本文整理汇总了C#中db.Database.GetCommands方法的典型用法代码示例。如果您正苦于以下问题:C# Database.GetCommands方法的具体用法?C# Database.GetCommands怎么用?C# Database.GetCommands使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在db.Database的用法示例。


在下文中一共展示了Database.GetCommands方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Player

        public Player(ClientProcessor psr)
            : base((short)psr.Character.ObjectType, psr.Random)
        {
            this.psr = psr;
            statsMgr = new StatsManager(this);
            nName = psr.Account.Name;
            AccountId = psr.Account.AccountId;
            switch (psr.Account.Rank)
            {
                case 0:
                    Name = psr.Account.Tags + " " + psr.Account.Name;
                    break;
                case 1:
                    Name = "[Donator] " + psr.Account.Tags + " " + psr.Account.Name;
                    break;
                case 2:
                    Name = "[VIP] " + psr.Account.Tags + " " + psr.Account.Name;
                    break;
                case 3:
                    Name = "[Trial GM] " + psr.Account.Tags + " " + psr.Account.Name;
                    break;
                case 4:
                    Name = "[Tester] " + psr.Account.Tags + " " + psr.Account.Name;
                    break;
                case 5:
                    Name = "[GM] " + psr.Account.Tags + " " + psr.Account.Name;
                    break;
                case 6:
                    Name = "[QA] " + psr.Account.Tags + " " + psr.Account.Name;
                    break;
                case 7:
                    Name = "[Dev] " + psr.Account.Tags + " " + psr.Account.Name;
                    break;
                case 8:
                    Name = "[CM] " + psr.Account.Tags + " " + psr.Account.Name;
                    break;
                case 9:
                    Name = "[Head QA] " + psr.Account.Tags + " " + psr.Account.Name;
                    break;
                case 10:
                    Name = "[Head Dev] " + psr.Account.Tags + " " + psr.Account.Name;
                    break;
                case 11:
                    Name = "[Founder] " + psr.Account.Tags + " " + psr.Account.Name;
                    break;
            }
            Level = psr.Character.Level;
            Experience = psr.Character.Exp;
            ExperienceGoal = GetExpGoal(psr.Character.Level);
            if (psr.Account.Rank > 2)
                Stars = 95;
            else if (psr.Account.Rank > 1)
                Stars = 90;
            else
                Stars = GetStars(); //Temporary (until pub server)
            Texture1 = psr.Character.Tex1;
            Texture2 = psr.Character.Tex2;
            Credits = psr.Account.Credits;
            NameChosen = psr.Account.NameChosen;
            CurrentFame = psr.Account.Stats.Fame;
            Fame = psr.Character.CurrentFame;
            var state = psr.Account.Stats.ClassStates.SingleOrDefault(_ => _.ObjectType == ObjectType);
            FameGoal = GetFameGoal(state != null ? state.BestFame : 0);
            Glowing = false;
            Guild = psr.Account.Guild.Name;
            GuildRank = psr.Account.Guild.Rank;
            if (psr.Character.HitPoints <= 0)
            {
                HP = psr.Character.MaxHitPoints;
                psr.Character.HitPoints = psr.Character.MaxHitPoints;
            }
            else
                HP = psr.Character.HitPoints;
            MP = psr.Character.MagicPoints;
            ConditionEffects = 0;
            OxygenBar = 100;

            Decision = 0;
            combs = new Combinations();
            price = new Prices();

            Locked = psr.Account.Locked ?? new List<int>();
            Ignored = psr.Account.Ignored ?? new List<int>();
            Commands = psr.Account.Commands ?? new List<string>();
            try
            {
                using (var dbx = new Database())
                {
                    Locked = dbx.GetLockeds(AccountId);
                    Ignored = dbx.GetIgnoreds(AccountId);
                    Commands = dbx.GetCommands(AccountId);

                    dbx.Dispose();
                }

                List<string> BrokenCommands = new List<string>(new string[] { "vanish" });

                List<string> TestingCommands = new List<string>(new string[] { "" });

                List<string> BuySellCommands = new List<string>(new string[] { "buy", "sell" });
//.........这里部分代码省略.........
开发者ID:C453,项目名称:OryxKingdom,代码行数:101,代码来源:Player.cs


注:本文中的db.Database.GetCommands方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。