MRonlineGvrix
2019-08-06, 02:47 PM
ياريت مش اى حد يجيب اى حل ملوش لزمة يتحط برا تمت الاجابة
المشكلة الاولى اسكلة النينجا ToxicFog
عفواً لايمكن عرض الروابط في الإرشيف
مشكلة غريبة خالص شغالة تمام بس لما تضرب فيها فى اى لاعب مش بتنقص دمو نهائى با العكس بتزودو لو ناقص
case 6001:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
//suse.SpellLevelHu = client_Spell.LevelHu2;
if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Distance)
{
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj.MapObjType == MapObjectType.Entity || _obj.MapObjType == MapObjectType.Monster)
{
attacked = _obj as Entity;
if (attacked.MapObjType == MapObjectType.Monster)
if (attacked.MonsterInfo.Boss)
continue;
if (Kernel.GetDistance(X, Y, attacked.X, attacked.Y) <= spell.Range)
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
int potDifference = attacker.BattlePower - attacked.BattlePower;
int rate = spell.Percent + potDifference - 20;
if (Kernel.Rate(rate))
{
attacked.ToxicFogStamp = Time32.Now;
attacked.ToxicFogLeft = 20;
attacked.ToxicFogPercent = spell.PowerPercent;
attacked.AddFlag(Update.Flags.Poisoned);
suse.AddTarget(attacked, 1, null);
}
else
{
suse.AddTarget(attacked, 0, null);
suse.Targets[attacked.UID].Hit = false;
}
}
}
}
}
}
else
{
attacker.AttackPacket = null;
}
attacker.Owner.SendScreen(suse, true);
}
break;
}
المشكلة الثانيا اسكلة الواريور ManiacDance
بتضرب جامد اوى اوى بتقتل اى حد يلمسها
عفواً لايمكن عرض الروابط في الإرشيف
#region ManiacDance
case 12700:
{
if (attacker.ContainsFlag(Update.Flags.XPList))
{
attacker.RemoveFlag(Update.Flags.XPList);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
attacker.ManiacDanceStamp = Time32.Now;
attacker.AddFlag3(Update.Flags3.WaniacDance);
attacker.Owner.SendScreen(suse, true);
}
break;
}
#endregion
المشكلة الثالثة اسكلة ال windwalker بتضرب اى حد 1 هت برضو
عفواً لايمكن عرض الروابط في الإرشيف
#region ThunderCloud[Chaser]
case 12840:
{
if (CanUseSpell(spell, attacker.Owner))
{
attacker.GreenEffect = 10;
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.Attacker1 = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
var cl = new WindWalker.ThunderCloud(attacker.Owner, attack.X, attack.Y);
suse.AddTarget(cl.UID, 0, null);
attacker.Owner.SendScreen(suse, true);
}
break;
}
#endregion
المشكلة الاخيرة اسكلة القرصااان ScurvyBomb بتضرب اى حد 1 هت
عفواً لايمكن عرض الروابط في الإرشيف
#region ScurvyBomb
case 11040:
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
Map map;
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
//suse.SpellLevelHu = client_Spell.LevelHu2;
KhaledMohamed.Network.GamePackets.SpellUse.DamageC lass tar = new SpellUse.DamageClass();
int num = 0;
switch (spell.Level)
{
case 0:
case 1:
num = 3;
break;
case 2:
case 3:
num = 4;
break;
default:
num = 5;
break;
}
int i = 0;
Kernel.Maps.TryGetValue(attacker.Owner.Map.BaseID, out map);
foreach (var t in attacker.Owner.Screen.Objects)
{
if (t == null)
continue;
if (t.MapObjType == MapObjectType.Entity || t.MapObjType == MapObjectType.Monster)
{
var target = t as Entity;
if (Kernel.GetDistance(X, Y, target.X, target.Y) <= spell.Range)
{
if (CanAttack(attacker, target, spell, false))
{
tar.Damage = Calculate.Ranged(attacker, target, ref attack);
tar.Hit = true;
tar.newX = target.X;
tar.newY = target.Y;
Map.Pushback(ref tar.newX, ref tar.newY, attacker.Facing, 5);
if (map != null)
{
if (map.Floor[tar.newX, tar.newY, MapObjectType.Entity, attacker])
{
target.X = tar.newX;
target.Y = tar.newY;
}
else
{
tar.newX = target.X;
tar.newY = target.Y;
}
}
else
{
if (attacker.Owner.Map.Floor[tar.newX, tar.newY, MapObjectType.Entity, attacker])
{
target.X = tar.newX;
target.Y = tar.newY;
}
else
{
target.X = tar.newX;
target.Y = tar.newY;
}
}
suse.AddTarget(target, tar, attack);
ReceiveAttack(attacker, target, attack, ref tar.Damage, spell);
i++;
if (i > num) break;
}
}
}
}
if (attacker.EntityFlag == EntityFlag.Entity)
attacker.Owner.SendScreen(suse, true);
}
break;
#endregion
ياريت حد يتابع معاايا
المشكلة الاولى اسكلة النينجا ToxicFog
عفواً لايمكن عرض الروابط في الإرشيف
مشكلة غريبة خالص شغالة تمام بس لما تضرب فيها فى اى لاعب مش بتنقص دمو نهائى با العكس بتزودو لو ناقص
case 6001:
{
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
//suse.SpellLevelHu = client_Spell.LevelHu2;
if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= spell.Distance)
{
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
{
if (_obj.MapObjType == MapObjectType.Entity || _obj.MapObjType == MapObjectType.Monster)
{
attacked = _obj as Entity;
if (attacked.MapObjType == MapObjectType.Monster)
if (attacked.MonsterInfo.Boss)
continue;
if (Kernel.GetDistance(X, Y, attacked.X, attacked.Y) <= spell.Range)
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
int potDifference = attacker.BattlePower - attacked.BattlePower;
int rate = spell.Percent + potDifference - 20;
if (Kernel.Rate(rate))
{
attacked.ToxicFogStamp = Time32.Now;
attacked.ToxicFogLeft = 20;
attacked.ToxicFogPercent = spell.PowerPercent;
attacked.AddFlag(Update.Flags.Poisoned);
suse.AddTarget(attacked, 1, null);
}
else
{
suse.AddTarget(attacked, 0, null);
suse.Targets[attacked.UID].Hit = false;
}
}
}
}
}
}
else
{
attacker.AttackPacket = null;
}
attacker.Owner.SendScreen(suse, true);
}
break;
}
المشكلة الثانيا اسكلة الواريور ManiacDance
بتضرب جامد اوى اوى بتقتل اى حد يلمسها
عفواً لايمكن عرض الروابط في الإرشيف
#region ManiacDance
case 12700:
{
if (attacker.ContainsFlag(Update.Flags.XPList))
{
attacker.RemoveFlag(Update.Flags.XPList);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
attacker.ManiacDanceStamp = Time32.Now;
attacker.AddFlag3(Update.Flags3.WaniacDance);
attacker.Owner.SendScreen(suse, true);
}
break;
}
#endregion
المشكلة الثالثة اسكلة ال windwalker بتضرب اى حد 1 هت برضو
عفواً لايمكن عرض الروابط في الإرشيف
#region ThunderCloud[Chaser]
case 12840:
{
if (CanUseSpell(spell, attacker.Owner))
{
attacker.GreenEffect = 10;
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.Attacker1 = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
var cl = new WindWalker.ThunderCloud(attacker.Owner, attack.X, attack.Y);
suse.AddTarget(cl.UID, 0, null);
attacker.Owner.SendScreen(suse, true);
}
break;
}
#endregion
المشكلة الاخيرة اسكلة القرصااان ScurvyBomb بتضرب اى حد 1 هت
عفواً لايمكن عرض الروابط في الإرشيف
#region ScurvyBomb
case 11040:
if (CanUseSpell(spell, attacker.Owner))
{
PrepareSpell(spell, attacker.Owner);
Map map;
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
//suse.SpellLevelHu = client_Spell.LevelHu2;
KhaledMohamed.Network.GamePackets.SpellUse.DamageC lass tar = new SpellUse.DamageClass();
int num = 0;
switch (spell.Level)
{
case 0:
case 1:
num = 3;
break;
case 2:
case 3:
num = 4;
break;
default:
num = 5;
break;
}
int i = 0;
Kernel.Maps.TryGetValue(attacker.Owner.Map.BaseID, out map);
foreach (var t in attacker.Owner.Screen.Objects)
{
if (t == null)
continue;
if (t.MapObjType == MapObjectType.Entity || t.MapObjType == MapObjectType.Monster)
{
var target = t as Entity;
if (Kernel.GetDistance(X, Y, target.X, target.Y) <= spell.Range)
{
if (CanAttack(attacker, target, spell, false))
{
tar.Damage = Calculate.Ranged(attacker, target, ref attack);
tar.Hit = true;
tar.newX = target.X;
tar.newY = target.Y;
Map.Pushback(ref tar.newX, ref tar.newY, attacker.Facing, 5);
if (map != null)
{
if (map.Floor[tar.newX, tar.newY, MapObjectType.Entity, attacker])
{
target.X = tar.newX;
target.Y = tar.newY;
}
else
{
tar.newX = target.X;
tar.newY = target.Y;
}
}
else
{
if (attacker.Owner.Map.Floor[tar.newX, tar.newY, MapObjectType.Entity, attacker])
{
target.X = tar.newX;
target.Y = tar.newY;
}
else
{
target.X = tar.newX;
target.Y = tar.newY;
}
}
suse.AddTarget(target, tar, attack);
ReceiveAttack(attacker, target, attack, ref tar.Damage, spell);
i++;
if (i > num) break;
}
}
}
}
if (attacker.EntityFlag == EntityFlag.Entity)
attacker.Owner.SendScreen(suse, true);
}
break;
#endregion
ياريت حد يتابع معاايا