本文整理汇总了C#中GamePlayer.GetSpecList方法的典型用法代码示例。如果您正苦于以下问题:C# GamePlayer.GetSpecList方法的具体用法?C# GamePlayer.GetSpecList怎么用?C# GamePlayer.GetSpecList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GamePlayer
的用法示例。
在下文中一共展示了GamePlayer.GetSpecList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetPlayerMLLine
/// <summary>
/// Map ML Spec on ML Translate ID
/// </summary>
/// <param name="player"></param>
/// <returns></returns>
private int GetPlayerMLLine(GamePlayer player)
{
var mlspec = player.GetSpecList().FirstOrDefault(spec => spec is IMasterLevelsSpecialization);
if(mlspec != null)
{
switch(mlspec.KeyName)
{
case "Banelord":
return 1;
case "Battlemaster":
return 2;
case "Convoker":
return 3;
case "Perfecter":
return 4;
case "Sojourner":
return 5;
case "Spymaster":
return 6;
case "Stormlord":
return 7;
case "Warlord":
return 8;
default:
return 0;
}
}
return 0;
}
示例2: Show_Info
//.........这里部分代码省略.........
}
if ((player.ActiveSaddleBags & (byte)GamePlayer.eHorseSaddleBag.RightRear) > 0)
{
if (activeBags != "")
activeBags += ", ";
activeBags += "RightRear";
}
}
}
text.Add(string.Format(" - ActiveSaddleBags : {0} (0x{1:X2})", activeBags, player.ActiveSaddleBags));
}
else
{
text.Add(" - Champion : Not Started");
}
if (player.MLGranted)
{
text.Add(" - Master Levels : ML " + player.MLLevel + ", " + player.MLExperience + " mlxp , MLLine " + player.MLLine);
}
else
{
text.Add(" - Master Levels : Not Started");
}
text.Add(" - Craftingskill : " + player.CraftingPrimarySkill + "");
text.Add(" - Money : " + Money.GetString(player.GetCurrentMoney()) + "");
text.Add(" - Model ID : " + player.Model);
text.Add(" - AFK Message: " + player.TempProperties.getProperty<string>(GamePlayer.AFK_MESSAGE) + "");
text.Add(" ");
text.Add("HOUSE INFORMATION ");
text.Add(" - Personal House : " + HouseMgr.GetHouseNumberByPlayer(player));
if (player.CurrentHouse != null && player.CurrentHouse.HouseNumber > 0)
text.Add(" - Current House : " + player.CurrentHouse.HouseNumber);
text.Add(" - In House : " + player.InHouse);
text.Add(" ");
text.Add("ACCOUNT INFORMATION ");
text.Add(" - Account Name & IP : " + player.Client.Account.Name + " from " + player.Client.Account.LastLoginIP);
text.Add(" - Priv. Level : " + player.Client.Account.PrivLevel);
text.Add(" - Client Version: " + player.Client.Account.LastClientVersion);
text.Add(" ");
text.Add("CHARACTER STATS ");
String sCurrent = "";
String sTitle = "";
int cnt = 0;
for (eProperty stat = eProperty.Stat_First; stat <= eProperty.Stat_Last; stat++, cnt++)
{
sTitle += GlobalConstants.PropertyToName(stat) + "/";
sCurrent += player.GetModified(stat) + "/";
if (cnt == 3)
{
text.Add(" - Current stats " + sTitle + " : " + sCurrent);
sTitle = "";
sCurrent = "";
}
}
text.Add(" - Current stats " + sTitle + " : " + sCurrent);
sCurrent = "";
sTitle = "";
cnt = 0;
for (eProperty res = eProperty.Resist_First; res <= eProperty.Resist_Last; res++, cnt++)
{
sTitle += GlobalConstants.PropertyToName(res) + "/";
sCurrent += player.GetModified(res) + "/";
if (cnt == 2)
{
text.Add(" - Current " + sTitle + " : " + sCurrent);
sCurrent = "";
sTitle = "";
}
if (cnt == 5)
{
text.Add(" - Current " + sTitle + " : " + sCurrent);
sCurrent = "";
sTitle = "";
}
}
text.Add(" - Current " + sTitle + " : " + sCurrent);
text.Add(" - Maximum Health : " + player.MaxHealth);
text.Add(" - Current AF and ABS : " + player.GetModified(eProperty.ArmorFactor) + " AF, " +
player.GetModified(eProperty.ArmorAbsorption) + " ABS");
text.Add(" ");
text.Add("SPECCING INFORMATIONS ");
text.Add(" - Respecs availables : " + player.RespecAmountDOL + " dol, " + player.RespecAmountSingleSkill +
" single, " + player.RespecAmountAllSkill + " full");
text.Add(" - Remaining spec. points : " + player.SkillSpecialtyPoints);
sTitle = " - Player specialisations : ";
sCurrent = "";
foreach (Specialization spec in player.GetSpecList())
{
sCurrent += spec.Name + " = " + spec.Level + " ; ";
}
text.Add(sTitle + sCurrent);
client.Out.SendCustomTextWindow("PLAYER & ACCOUNT INFORMATION", text);
}