Advertisement
MOHAMEDELKASSER

حصريا حل مشكلة تانى ايرور فى سورس المايسترو لما يزيد عدد اون

Feb 28th, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.13 KB | None | 0 0
  1.  حصريا حل مشكلة تانى ايرور فى سورس المايسترو لما يزيد عدد اونلاين يظهر ايرور فى القونصول
  2. هتعمل بحث فى ملف الورلدوتبدله بى كود ده
  3. private void AutoAttackCallback(GameClient client, int time)
  4.         {
  5.             if (!Valid(client)) return;
  6.             Time64 Now = new Time64(time);
  7.             if (client.Entity.AttackPacket != null || client.Entity.VortexPacket != null)
  8.             {
  9.                 try
  10.                 {
  11.                     if (client.Entity.ContainsFlag(Network.GamePackets.Update.Flags.ShurikenVortex))
  12.                     {
  13.                         if (client.Entity.VortexPacket != null && client.Entity.VortexPacket.ToArray() != null)
  14.                         {
  15.                             if (Now > client.Entity.VortexAttackStamp.AddMilliseconds(1400))
  16.                             {
  17.                                 client.Entity.VortexAttackStamp = Now;
  18.                                 client.Entity.VortexPacket.AttackType = Attack.Magic;
  19.                                 new Game.Attacking.Handle(client.Entity.VortexPacket, client.Entity, null);
  20.                             }
  21.                         }
  22.                     }
  23.                     else
  24.                     {
  25.                         var AttackPacket = client.Entity.AttackPacket;
  26.                         if (AttackPacket != null && AttackPacket.ToArray() != null)
  27.                         {
  28.                             uint AttackType = AttackPacket.AttackType;
  29.                             if (AttackType == Network.GamePackets.Attack.Magic || AttackType == Network.GamePackets.Attack.Melee || AttackType == Network.GamePackets.Attack.Ranged)
  30.                             {
  31.                                 if (AttackType == Network.GamePackets.Attack.Magic)
  32.                                 {
  33.                                     if (Now > client.Entity.AttackStamp.AddSeconds(1))
  34.                                     {
  35.                                         if (AttackPacket.Damage != 12160 &&
  36.                                             AttackPacket.Damage != 12170 &&
  37.                                             AttackPacket.Damage != 12120 &&
  38.                                             AttackPacket.Damage != 12130 &&
  39.                                             AttackPacket.Damage != 12140 &&
  40.                                             AttackPacket.Damage != 12320 &&
  41.                                             AttackPacket.Damage != 12330 &&
  42.                                             AttackPacket.Damage != 12340 &&
  43.                                             AttackPacket.Damage != 12570 &&
  44.                                             AttackPacket.Damage != 12210)
  45.                                         {
  46.                                             new Game.Attacking.Handle(AttackPacket, client.Entity, null);
  47.                                         }
  48.                                     }
  49.                                 }
  50.  
  51.                                 else
  52.                                 {
  53.                                     int decrease = -300;
  54.                                     if (client.Entity.OnCyclone())
  55.                                         decrease = 700;
  56.                                     if (client.Entity.OnSuperman())
  57.                                         decrease = 200;
  58.                                     if (Now > client.Entity.AttackStamp.AddMilliseconds((1000 - client.Entity.Agility - decrease) * (int)(AttackType == Network.GamePackets.Attack.Ranged ? 1 : 1)))
  59.                                     {
  60.                                         new Game.Attacking.Handle(AttackPacket, client.Entity, null);
  61.                                     }
  62.                                 }
  63.                             }
  64.                         }
  65.                     }
  66.                 }
  67.                 catch (Exception e)
  68.                 {
  69.                     Program.SaveException(e);
  70.                     client.Entity.AttackPacket = null;
  71.                     client.Entity.VortexPacket = null;
  72.                 }
  73.             }
  74.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement