本文整理汇总了C#中GameClient.LearnProfiency方法的典型用法代码示例。如果您正苦于以下问题:C# GameClient.LearnProfiency方法的具体用法?C# GameClient.LearnProfiency怎么用?C# GameClient.LearnProfiency使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameClient
的用法示例。
在下文中一共展示了GameClient.LearnProfiency方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadProfiencys
public void LoadProfiencys(GameClient Client)
{
SQLiteCommand Command = GetConnection().CreateCommand();
Command.CommandText = "SELECT * FROM Profiencys WHERE ClientID = @UID;";
Command.Parameters.Add("@UID", DbType.Int32).Value = Client.UID;
LearnProfiency Profiency;
SQLiteDataReader Reader = Command.ExecuteReader();
while (Reader.Read())
{
Profiency = LearnProfiency.Create();
Profiency.ID = Convert.ToUInt16(Reader["ID"]);
Profiency.Level = Convert.ToUInt16(Reader["Level"]);
Client.LearnProfiency(Profiency);
}
Reader.Close();
}
示例2: Process
public CommandAction Process(GameClient Client, string[] Input)
{
string From = Input[0];
string To = Input[1];
string Message = Input[3];
string[] Command = Message.Split(' ');
CommandAction Action = CommandAction.None;
if (Command[0].StartsWith("@"))
Action = CommandAction.Processed;
try
{
switch (Command[0])
{
case "@quit":
{
Client.Disconnect();
} break;
case "@mm":
{
ushort MapID = ushort.Parse(Command[1]);
ushort X = ushort.Parse(Command[2]);
ushort Y = ushort.Parse(Command[3]);
Client.Teleport(MapID, X, Y);
} break;
case "@gold":
{
Client.Entity.Money = uint.Parse(Command[1]);
} break;
case "@item":
{
if (Command.Length > 2)
{
ConquerItem Item = new ConquerItem(Client, Database.GetItemDetail(Command[1], Command[2]));
Item.Position = ItemPosition.Inventory;
if (Command.Length > 3)
{
Item.Plus = byte.Parse(Command[3]);
if (Command.Length > 4)
{
Item.SocketOne = byte.Parse(Command[4]);
if (Command.Length > 5)
{
Item.SocketTwo = byte.Parse(Command[5]);
}
}
}
Client.AddInventory(Item);
}
} break;
case "@prof":
{
LearnProfiency Profiency = LearnProfiency.Create();
Profiency.ID = uint.Parse(Command[1]);
Profiency.Level = uint.Parse(Command[2]);
Client.LearnProfiency(Profiency);
} break;
case "@spell":
{
LearnSpell Spell = LearnSpell.Create();
Spell.ID = ushort.Parse(Command[1]);
Spell.Level = ushort.Parse(Command[2]);
Client.LearnSpell(Spell);
} break;
case "@job":
{
Client.Entity.Class = byte.Parse(Command[1]);
Client.Entity.BeginStatusUpdates();
Client.Entity.AddStatusUpdate(StatusUpdateEntry.Create(ConquerStatusIDs.Job, Client.Entity.Class));
Client.Entity.EndStatusUpdates();
} break;
case "@str":
{
byte Strength = byte.Parse(Command[1]);
if (Strength <= Client.Entity.StatusPoints.Free)
{
Client.Entity.StatusPoints.Strength += Strength;
Client.Entity.StatusPoints.Free -= Strength;
Client.Entity.BeginStatusUpdates();
Client.Entity.AddStatusUpdate(StatusUpdateEntry.Create(ConquerStatusIDs.StatPoints, Client.Entity.StatusPoints.Free));
Client.Entity.AddStatusUpdate(StatusUpdateEntry.Create(ConquerStatusIDs.Strength, Client.Entity.StatusPoints.Strength));
Client.Entity.EndStatusUpdates();
}
} break;
case "@vit":
{
byte Vitality = byte.Parse(Command[1]);
if (Vitality <= Client.Entity.StatusPoints.Free)
{
Client.Entity.StatusPoints.Vitality += Vitality;
Client.Entity.StatusPoints.Free -= Vitality;
Client.Entity.BeginStatusUpdates();
Client.Entity.AddStatusUpdate(StatusUpdateEntry.Create(ConquerStatusIDs.StatPoints, Client.Entity.StatusPoints.Free));
//.........这里部分代码省略.........