本文整理汇总了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" });
//.........这里部分代码省略.........