本文整理汇总了C#中Packets.GetSkillID方法的典型用法代码示例。如果您正苦于以下问题:C# Packets.GetSkillID方法的具体用法?C# Packets.GetSkillID怎么用?C# Packets.GetSkillID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Packets
的用法示例。
在下文中一共展示了Packets.GetSkillID方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnRemoveSpecialSkill
//09 0E
public void OnRemoveSpecialSkill(Packets.Client.RemoveSpecialSkill p)
{
if (this.Char.SpecialSkills.ContainsKey(p.GetSkillID()))
{
uint id = p.GetSkillID();
SkillInfo info;
info = Char.SpecialSkills[id];
info.slot = 0;
Char.InactiveSkills.Add(id, info);
Char.SpecialSkills.Remove(id);
Packets.Server.RemoveSpecialSkill p1 = new SagaMap.Packets.Server.RemoveSpecialSkill();
p1.SetSkill(id);
this.netIO.SendPacket(p1, this.SessionID);
}
}
示例2: OnUseOffensiveSkill
public void OnUseOffensiveSkill(Packets.Client.UseOffensiveSkill p)
{
if (this.state != SESSION_STATE.MAP_LOADED) return;
// Attack
try
{
if (p.GetSkillType() != 9)
{
Map.SkillArgs sArgs;
Actor aActor = this.map.GetActor(p.GetTargetActorID());
Actor sActor = (Actor)this.Char;
sArgs = new Map.SkillArgs(p.GetSkillType(), 0, p.GetSkillID(), p.GetTargetActorID(), 0);
//cast skill
if (aActor == null)
{
sArgs.isCritical = Map.SkillArgs.AttackResult.Miss;
sArgs.failed = true;
this.map.SendEventToAllActorsWhoCanSeeActor(Map.EVENT_TYPE.SKILL, sArgs, this.Char, true);
return;
}
SkillHandler.CastSkill(ref sActor, ref aActor, ref sArgs);
if (aActor.type == ActorType.NPC)
{
Map.ActorSelArgs arg = new Map.ActorSelArgs(aActor.id);
this.map.SendEventToAllActorsWhoCanSeeActor(Map.EVENT_TYPE.ACTOR_SELECTION, arg, this.Char, true);
}
if (aActor.type == ActorType.PC && aActor.id != this.Char.id)
{
Map.ActorSelArgs arg = new Map.ActorSelArgs(aActor.id);
this.map.SendEventToAllActorsWhoCanSeeActor(Map.EVENT_TYPE.ACTOR_SELECTION, arg, this.Char, true);
}
this.map.SendEventToAllActorsWhoCanSeeActor(Map.EVENT_TYPE.SKILL, sArgs, this.Char, true);
}
// Emoticon
if (p.GetSkillType() == 9)
{
this.map.SendEventToAllActorsWhoCanSeeActor(Map.EVENT_TYPE.SKILL, new Map.SkillArgs(p.GetSkillType(), 0, p.GetSkillID(), p.GetTargetActorID(), (uint)Global.Random.Next()), this.Char, true);
}
}
catch (Exception ex)
{
Logger.ShowError(ex, null);
}
}
示例3: OnSkillCastCancel
public void OnSkillCastCancel(Packets.Client.SkillCastCancel p)
{
Map.SkillArgs sArgs;
sArgs = new Map.SkillArgs(p.GetSkillType(), 0, p.GetSkillID(), this.Char.id, 0);
sArgs.castcancel = true;
this.map.SendEventToAllActorsWhoCanSeeActor(Map.EVENT_TYPE.SKILL, sArgs, this.Char, true);
}
示例4: OnSkillToggle
public void OnSkillToggle(Packets.Client.SkillToggle p)
{
if (this.state != SESSION_STATE.MAP_LOADED) return;
// Attack
if (p.GetSkillType() != 9)
{
Map.SkillArgs sArgs;
Actor aActor = (Actor)this.Char;
Actor sActor = (Actor)this.Char;
sArgs = new Map.SkillArgs(p.GetSkillType(), 0, p.GetSkillID(), sActor.id, 0);
//cast skill
SkillHandler.CastSkill(ref sActor, ref aActor, ref sArgs);
Packets.Server.SkillToggle p1 = new SagaMap.Packets.Server.SkillToggle();
p1.SetSkillType(p.GetSkillType());
p1.SetSkillID(p.GetSkillID());
p1.SetToggle(sArgs.failed);
this.netIO.SendPacket(p1, this.SessionID);
sArgs.failed = false;
this.map.SendEventToAllActorsWhoCanSeeActor(Map.EVENT_TYPE.SKILL, sArgs, this.Char, true);
}
}
示例5: OnSkillCast
// 0x09 Packets =========================================
public void OnSkillCast(Packets.Client.SkillCast p)
{
if (this.state != SESSION_STATE.MAP_LOADED) return;
// Attack
if (p.GetSkillType() != 9)
{
Map.SkillArgs sArgs;
Actor aActor = this.map.GetActor(p.GetTargetActorID());
Actor sActor = (Actor)this.Char;
sArgs = new Map.SkillArgs(p.GetSkillType(), 0, p.GetSkillID(), p.GetTargetActorID(), 0);
sArgs.casting = true;
if (aActor == null)
{
sArgs.isCritical = Map.SkillArgs.AttackResult.Miss;
sArgs.failed = true;
this.map.SendEventToAllActorsWhoCanSeeActor(Map.EVENT_TYPE.SKILL, sArgs, this.Char, true);
return;
}
//cast skill
if (aActor.type == ActorType.NPC)
{
Map.ActorSelArgs arg = new Map.ActorSelArgs(aActor.id);
this.map.SendEventToAllActorsWhoCanSeeActor(Map.EVENT_TYPE.ACTOR_SELECTION, arg, this.Char, true);
}
if (aActor.type == ActorType.PC && aActor.id != this.Char.id)
{
Map.ActorSelArgs arg = new Map.ActorSelArgs(aActor.id);
this.map.SendEventToAllActorsWhoCanSeeActor(Map.EVENT_TYPE.ACTOR_SELECTION, arg, this.Char, true);
}
this.map.SendEventToAllActorsWhoCanSeeActor(Map.EVENT_TYPE.SKILL, sArgs, this.Char, true);
}
}