Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
 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);
     }
 }