القنبلة بتاعت القرصان كاملة لاى سورس ما عدا سورس كيمو
بس اانشاء الله هبقى انزلها قريب
الاول دى الصور
شكرا
magd_adel علشان الصور
بس اانشاء الله هبقى انزلها قريب
الاول دى الصور
شكرا
magd_adel علشان الصور
نخش على طول فى اى الموضوع
************************************************** ************************
خش فى المسار دة Game/Attacking/Handle.cs
و دور على الايدى دة
كود:
case 11070
كود:
case 11070: // Gale Bomb
{
List<uint> OnTarg;
if (CanUseSpell(spell, this.attacker.Owner))
{
PrepareSpell(spell, this.attacker.Owner);
SpellUse suse = new SpellUse(true)
{
Attacker = this.attacker.UID,
SpellID = spell.ID,
SpellLevel = spell.Level,
X = X,
Y = Y
};
OnTarg = new List<uint>();
for (int c = 0; c < this.attacker.Owner.Screen.Objects.Length; c++)
{
if (c >= this.attacker.Owner.Screen.Objects.Length)
{
break;
}
Interfaces.IMapObject _obj = this.attacker.Owner.Screen.Objects[c];
if ((_obj != null) && ((_obj.MapObjType == MapObjectType.Monster) || (_obj.MapObjType == MapObjectType.Player)))
{
attacked = _obj as Entity;
if ((Kernel.GetDistance(attacked.X, attacked.Y, X, Y) <= 5) && CanAttack(this.attacker, attacked, spell, this.attack.AttackType == 2))
{
Enums.ConquerAngle direction = Kernel.GetAngle1(this.attacker.X, this.attacker.Y, attacked.X, attacked.Y);
if (CanAttack(this.attacker, attacked, spell, this.attack.AttackType == 2))
{
uint damage = Calculate.Melee(this.attacker, attacked);
this.attack = new Attack(true);
this.attack.AttackType = 0x1b;
this.attack.X = attacked.X;
this.attack.Y = attacked.Y;
this.attack.Attacker = this.attacker.UID;
this.attack.Attacked = attacked.UID;
this.attack.Damage = damage;
this.attack.ToArray()[0x1b] = (byte)direction;
attacked.Move(direction);
attacked.Move(direction);
this.ReceiveAttack(null, this.attacker, attacked, this.attack, damage, spell);
this.attacker.Owner.SendScreen(this.attack, true);
}
}
}
}
this.attacker.Owner.SendScreen(suse, true);
}
break;
}
#endregion
************************************************** ************************
و بعدين ادخل المسار دة
[ServerBase/Kernel.cs]
و دور على دة
ConquerAngle GetAngle
و انزل لاخر الكود و حط تحتية دة
************************************************** ************************
و بعدين ادخل المسار دة
[ServerBase/Kernel.cs]
و دور على دة
ConquerAngle GetAngle
و انزل لاخر الكود و حط تحتية دة
************************************************** ************************
كود:
public static Enums.ConquerAngle GetAngle1(ushort X, ushort Y, ushort X2, ushort Y2)
{
double direction = 0.0;
double AddX = X2 - X;
double AddY = Y2 - Y;
double r = Math.Atan2(AddY, AddX);
if (r < 0.0)
{
r += 628.31853071795865;
}
direction = 360.0 - ((r * 180.0) / 3.1415926535897931);
byte Dir = (byte)((7.0 - ((Math.Floor(direction) / 45.0) % 8.0)) - 1.0);
return (Enums.ConquerAngle)((byte)(Dir % 8));
}
************************************************** ************************
القنبلة دى اظن انها نزلت قبل كدة بس كانت بايظة و بتجيب ايرور دى بقى كاملة منى ليكو لان لقيت ان فى طلب عليها
0 التعليقات:
إرسال تعليق