本文整理汇总了C#中Packets.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# Packets.GetValue方法的具体用法?C# Packets.GetValue怎么用?C# Packets.GetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Packets
的用法示例。
在下文中一共展示了Packets.GetValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnSendFall
/// <summary>
/// Receive the fall from the client.
/// Damage the client for an 8th of the units fallen?
/// Send the client the result of the fall.
/// </summary>
public void OnSendFall(Packets.Client.SendFall p)
{
uint value = p.GetValue();
value /= 8;
Actor pc = (Actor)this.Char;
SagaMap.Map.SkillArgs args = new Map.SkillArgs();
Skills.SkillHandler.PhysicalAttack(ref pc, ref pc, value, SkillHandler.AttackElements.NEUTRAL, ref args);
this.SendCharStatus(0);
Packets.Server.TakeDamage p1 = new SagaMap.Packets.Server.TakeDamage();
if (this.Char.HP == 0)
p1.SetReason(SagaMap.Packets.Server.TakeDamage.REASON.FALLING_DEAD);
else if (this.Char.HP < (this.Char.maxHP / 10))
p1.SetReason(SagaMap.Packets.Server.TakeDamage.REASON.FALLING_SURVIVE);
else
p1.SetReason(SagaMap.Packets.Server.TakeDamage.REASON.FALLING);
p1.SetDamage(value);
this.netIO.SendPacket(p1, this.SessionID); ;
}
示例2: OnPersonalRequest
public void OnPersonalRequest(Packets.Client.NPCPersonalRequest p)
{
if (this.Char.CurTarget == null) return;
Npc npc = (Npc)this.Char.CurTarget.e;
Npc.QuestReqirement quest = npc.GetAvaluablePersonalQuest(this.Char);
if (quest != null)
{
if (npc.Functable.ContainsKey((byte)Npc.Functions.AcceptPersonalRequest))
{
npc.Functable[(byte)Npc.Functions.AcceptPersonalRequest].DynamicInvoke(this.Char, quest.QID, p.GetValue());
}
}
}