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


C# Database.GetLockeds方法代码示例

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


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

示例2: 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;
            if (psr.Account.Tag != "")
            {
                Name = "[" + psr.Account.Tag + "] " + psr.Account.Name;
            }
            else
            {
                Name = psr.Account.Name;
            }
            Level = psr.Character.Level;
            Experience = psr.Character.Exp;
            ExperienceGoal = GetExpGoal(psr.Character.Level);
            if (psr.Account.Name == "Lucifer" || psr.Account.Name == "Luciferus" || psr.Account.Name == "Amaymon")
                Stars = 666;
            else if (psr.Account.Rank > 2)
                Stars = 100;
            else if (psr.Account.Rank > 1)
                Stars = 95;
            else
                Stars = GetStars(); //Temporary (until pub server)
            Texture1 = psr.Character.Tex1;
            Texture2 = psr.Character.Tex2;
            Credits = psr.Account.Credits;
            zTokens = psr.Account.zTokens;
            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;
            price = new Prices();

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

                    dbx.Dispose();
                }
            }
            catch
            {
            }

            Inventory =
                psr.Character.Equipment.Select(
                    _ => _ == -1 ? null : (XmlDatas.ItemDescs.ContainsKey(_) ? XmlDatas.ItemDescs[_] : null)).ToArray();
            SlotTypes = Utils.FromCommaSepString32(XmlDatas.TypeToElement[ObjectType].Element("SlotTypes").Value);
            Stats = new[]
            {
                psr.Character.MaxHitPoints,
                psr.Character.MaxMagicPoints,
                psr.Character.Attack,
                psr.Character.Defense,
                psr.Character.Speed,
                psr.Character.HpRegen,
                psr.Character.MpRegen,
                psr.Character.Dexterity
            };

            Pet = null;
        }
开发者ID:RoxyLalonde,项目名称:Phoenix-Realms,代码行数:86,代码来源:Player.cs

示例3: Player


//.........这里部分代码省略.........
                case 15:
                    Name = "[Swag] " + psr.Account.Name; break;
                case 16:
                    Name = "[Super Donator] " + psr.Account.Name; break;
                case 17:
                    Name = "[Epic VIP] " + psr.Account.Name; break;
                case 18:
                    Name = "[Head-Admin] " + psr.Account.Name; break;
                case 19:
                    Name = "[CM] " + psr.Account.Name; break;
                case 20:
                    Name = "[Co-Owner]" + psr.Account.Name; break;
                case 21:
                    Name = "[Owner] " + psr.Account.Name; break;
                case 22:
                    Name = "[Super-Founder] " + psr.Account.Name; break;
                case 23:
                    Name = "[Head-Owner] " + psr.Account.Name; break;
            }
            //            if (psr.Account.Name == "Lucifer" || psr.Account.Name == "Luciferus" || psr.Account.Name == "HaseoAura")
            if (psr.Account.Name == "HAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
            {
                Name = "[Super Founder] " + psr.Account.Name;
            }
            if (AccountId == 1)
            {
                Name = "[Owner] " + psr.Account.Name;
            }
            Level = psr.Character.Level;
            Experience = psr.Character.Exp;
            ExperienceGoal = GetExpGoal(psr.Character.Level);
            //            if (psr.Account.Name == "Dragonlord3344" || psr.Account.Name == "HaseoAura" || psr.Account.Name == "Lucifer")
            if (psr.Account.Name == "NOOOOOOOOOOOOOOOOOOOOO" || psr.Account.Name == "REJECTEDDDDDDDDDDDDDDDDDD")
                Stars = 1337;
            else if (psr.Account.Rank > 14)
                Stars = 666;
            else if (psr.Account.Rank > 12)
                Stars = 69;
            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 = true;
            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>();
            try
            {
                using (var dbx = new Database())
                {
                    Locked = dbx.GetLockeds(AccountId);
                    Ignored = dbx.GetIgnoreds(AccountId);

                    dbx.Dispose();
                }
            }
            catch
            {
            }

            Inventory =
                psr.Character.Equipment.Select(
                    _ => _ == -1 ? null : (XmlDatas.ItemDescs.ContainsKey(_) ? XmlDatas.ItemDescs[_] : null)).ToArray();
            SlotTypes = Utils.FromCommaSepString32(XmlDatas.TypeToElement[ObjectType].Element("SlotTypes").Value);
            Stats = new[]
            {
                psr.Character.MaxHitPoints,
                psr.Character.MaxMagicPoints,
                psr.Character.Attack,
                psr.Character.Defense,
                psr.Character.Speed,
                psr.Character.HpRegen,
                psr.Character.MpRegen,
                psr.Character.Dexterity
            };

            Pet = null;
        }
开发者ID:RiiggedMPGH,项目名称:Owl-Realms-Source,代码行数:101,代码来源:Player.cs


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