Esempio n. 1
0
 /// <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); ;
 }
Esempio n. 2
0
 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());
         }
     }
 }