Advertisement
XConquer

Fix SwirlingStorm[Wind Ranged by Pezzi]

Sep 26th, 2019
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 5.92 KB | None | 0 0
  1. Si Usas Normal / Emulator con uso de PvP Normales:
  2.   #region SwirlingStorm[Chaser]
  3.                              
  4.                                 case 12890:
  5.                                     {
  6.                                      if (CanUseSpell(spell, attacker.Owner))
  7.                                         {
  8.                                            
  9.                                             PrepareSpell(spell, attacker.Owner);
  10.                                             SpellUse suse = new SpellUse(true);
  11.                                             suse.Attacker = attacker.UID;
  12.                                             suse.SpellID = spell.ID;
  13.                                             suse.SpellLevel = spell.Level;
  14.                                             suse.X = X;
  15.                                             suse.Y = Y;
  16.                                             Fan sector = new Fan(attacker.X, attacker.Y, X, Y, spell.Range + 7, spell.Sector);//Pezzi Pro
  17.                                             if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Distance + 1)
  18.                                             {
  19.                                                 foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
  20.                                                 {
  21.                                                     if (_obj == null) continue;
  22.                                                     if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
  23.                                                     {
  24.                                                         attacked = _obj as Entity;
  25.                                                         if (sector.IsInFan(attacked.X, attacked.Y))
  26.                                                         {
  27.                                                             if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
  28.                                                             {
  29.                                                                 attack.Effect1 = Attack.AttackEffects1.None;
  30.                                                                 uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked,spell, ref attack) / 2;
  31.                                                                 damage = damage - (uint)(damage * .10);
  32.                                                                 double dmg = (double)damage * 1.10;
  33.                                                                 damage = (uint)dmg;
  34.                                                                 suse.Effect1 = attack.Effect1;
  35.                                                              
  36.                                                                 ReceiveAttack(attacker, attacked, attack, ref damage, spell);
  37.                                                                 suse.AddTarget(attacked.UID, damage, attack);
  38.                                                             }
  39.                                                         }
  40.                                                     }
  41.                                                     else if (_obj.MapObjType == MapObjectType.SobNpc)
  42.                                                     {
  43.                                                         attackedsob = _obj as SobNpcSpawn;
  44.  
  45.                                                         if (sector.IsInFan(attackedsob.X, attackedsob.Y))
  46.                                                         {
  47.                                                             if (CanAttack(attacker, attackedsob, spell))
  48.                                                             {
  49.                                                                 attack.Effect1 = Attack.AttackEffects1.None;
  50.                                                                 uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
  51.                                                                
  52.                                                                 suse.Effect1 = attack.Effect1;
  53.                                                                 ReceiveAttack(attacker, attackedsob, attack, damage, spell);
  54.                                                                 suse.AddTarget(attackedsob.UID, damage, attack);
  55.                                                             }
  56.                                                         }
  57.                                                     }
  58.                                                 }
  59.                                                 attacker.Owner.SendScreen(suse, true);
  60.                                             }
  61.                                         }
  62.                                         break;
  63.                                     }
  64. #endregion
  65. --------------------------------------------------------------
  66. Si Usas Otro estilo de Skills como las 3D con runas y reliquias publicadas solo aunmentan la Distancia a + 9 en MsgSpell.Dist o MsgSpell.Distance
  67. --------------------------------------------------------------
  68. SpellTable.cs (solo si usas el read MagicType)
  69.       if (information.ID == 12890)
  70.             {
  71.                 if (information.Distance >= 13)
  72.                 {
  73.                     information.Distance = (ushort)(information.Distance - 1);
  74.                 }
  75.             }
  76.             else
  77.             {
  78.                 if (information.Distance >= 4)
  79.                 {
  80.                     information.Distance = (ushort)(information.Distance - 1);
  81.                 }
  82.             }
  83. Para que Lea la Distancia Correcta ya que muchas sourcers solo tienen un maximo de 4 de distancia.. y pues les aplica a todas y eso esta Mal!!!!!
  84.  
  85. si usan el read sql solo buscan la Spell 12890 y le suben su distancia a 13 y Listo.!
  86. -----------------------------------------------------
  87. Todos los Derechos Reservados (C) Pezzi Tomas 2019 - 2020
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement