magdy
2020-03-12, 03:11 AM
دا كود اسكلة ال FatalSpin بتاعت النينجا تمام... دلوقتي الاسكله دي قويه فشخ فشخ عاوز اعرف بقى فين المكان اللي هعدل فيه هنا عشان اقللها شويه بعد اذنكوا
ونفس الحال عندي اسكلة الفيزيكال ل windwalker ضعيفه برضو مش عارف اعدل على ايه
case (ushort)Enums.SpellID.FatalSpin:
{
try
{
user.SendScreen(stream.InteractionCreate(&Attack), true);
MsgSpellAnimation MsgSpell = new MsgSpellAnimation(user.Entity.UID, 0, Attack.X, Attack.Y, ClientSpell.ID, ClientSpell.Level, ClientSpell.UseSpellSoul);
Algoritms.InLineAlgorithm Line = new Algoritms.InLineAlgorithm(user.Entity.X, Attack.X, user.Entity.Y, Attack.Y, user.Map, DBSpell.Range, 0, ClientSpell.ID);
byte LineRange = 2;
uint Experience = 0;
foreach (Interfaces.IMapObject target in user.Screen.Objects)
{
Game.Entity attacked = target as Game.Entity;
if (target.MapObjType == MapObjectType.Monster)
{
if (Kernel.GetDistance(user.Entity.X, user.Entity.Y, attacked.X, attacked.Y) < DBSpell.Range)
{
if (Line.InLine(attacked.X, attacked.Y, LineRange))
{
if (CheckAttack.CanAttackMonster.Verified(user, attacked, DBSpell))
{
MsgSpellAnimation.SpellObj AnimationObj;
Calculate.Physical.OnMonster(user.Entity, attacked, DBSpell, out AnimationObj);
AnimationObj.Damage = Calculate.Base.CalculateSoul(AnimationObj.Damage, ClientSpell.UseSpellSoul);
Experience += ReceiveAttack.Monster.Execute(stream, AnimationObj, user, attacked);
MsgSpell.Targets.Enqueue(AnimationObj);
}
}
}
}
}
foreach (Interfaces.IMapObject targer in user.Screen.Objects)
{
var attacked = targer as Game.Entity;
if (targer.MapObjType == MapObjectType.Entity && user.Entity.UID != targer.UID)
{
if (Kernel.GetDistance(user.Entity.X, user.Entity.Y, targer.X, targer.Y) < DBSpell.Range)
{
if (Line.InLine(attacked.X, attacked.Y, LineRange))
{
if (CheckAttack.CanAttackPlayer.Verified(user, attacked, DBSpell))
{
MsgSpellAnimation.SpellObj AnimationObj;
Calculate.Physical.OnPlayer(user.Entity, attacked, DBSpell, out AnimationObj);
AnimationObj.Damage = Calculate.Base.CalculateSoul(AnimationObj.Damage, ClientSpell.UseSpellSoul);
ReceiveAttack.Player.Execute(stream,AnimationObj, user, attacked);
MsgSpell.Targets.Enqueue(AnimationObj);
}
}
}
}
}
foreach (Interfaces.IMapObject targer in user.Screen.Objects)
{
var attacked = targer as Network.GamePackets.SobNpcSpawn;
if (targer.MapObjType == MapObjectType.SobNpc)
{
if (Kernel.GetDistance(user.Entity.X, user.Entity.Y, targer.X, targer.Y) < DBSpell.Range)
{
if (Line.InLine(attacked.X, attacked.Y, LineRange))
{
if (CheckAttack.CanAttackNpc.Verified(user, attacked, DBSpell))
{
MsgSpellAnimation.SpellObj AnimationObj;
Calculate.Physical.OnNpcs(user.Entity, attacked, DBSpell, out AnimationObj);
AnimationObj.Damage = Calculate.Base.CalculateSoul(AnimationObj.Damage, ClientSpell.UseSpellSoul);
Experience += ReceiveAttack.Npc.Execute(stream, AnimationObj, user, attacked);
MsgSpell.Targets.Enqueue(AnimationObj);
}
}
}
}
}
Updates.IncreaseExperience.Up(stream, user, Experience);
Updates.UpdateSpell.CheckUpdate(stream, user, Attack, Experience, DBSpells);
MsgSpell.SetStream(stream); MsgSpell.Send(user);
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
break;
}
ونفس الحال عندي اسكلة الفيزيكال ل windwalker ضعيفه برضو مش عارف اعدل على ايه
case (ushort)Enums.SpellID.FatalSpin:
{
try
{
user.SendScreen(stream.InteractionCreate(&Attack), true);
MsgSpellAnimation MsgSpell = new MsgSpellAnimation(user.Entity.UID, 0, Attack.X, Attack.Y, ClientSpell.ID, ClientSpell.Level, ClientSpell.UseSpellSoul);
Algoritms.InLineAlgorithm Line = new Algoritms.InLineAlgorithm(user.Entity.X, Attack.X, user.Entity.Y, Attack.Y, user.Map, DBSpell.Range, 0, ClientSpell.ID);
byte LineRange = 2;
uint Experience = 0;
foreach (Interfaces.IMapObject target in user.Screen.Objects)
{
Game.Entity attacked = target as Game.Entity;
if (target.MapObjType == MapObjectType.Monster)
{
if (Kernel.GetDistance(user.Entity.X, user.Entity.Y, attacked.X, attacked.Y) < DBSpell.Range)
{
if (Line.InLine(attacked.X, attacked.Y, LineRange))
{
if (CheckAttack.CanAttackMonster.Verified(user, attacked, DBSpell))
{
MsgSpellAnimation.SpellObj AnimationObj;
Calculate.Physical.OnMonster(user.Entity, attacked, DBSpell, out AnimationObj);
AnimationObj.Damage = Calculate.Base.CalculateSoul(AnimationObj.Damage, ClientSpell.UseSpellSoul);
Experience += ReceiveAttack.Monster.Execute(stream, AnimationObj, user, attacked);
MsgSpell.Targets.Enqueue(AnimationObj);
}
}
}
}
}
foreach (Interfaces.IMapObject targer in user.Screen.Objects)
{
var attacked = targer as Game.Entity;
if (targer.MapObjType == MapObjectType.Entity && user.Entity.UID != targer.UID)
{
if (Kernel.GetDistance(user.Entity.X, user.Entity.Y, targer.X, targer.Y) < DBSpell.Range)
{
if (Line.InLine(attacked.X, attacked.Y, LineRange))
{
if (CheckAttack.CanAttackPlayer.Verified(user, attacked, DBSpell))
{
MsgSpellAnimation.SpellObj AnimationObj;
Calculate.Physical.OnPlayer(user.Entity, attacked, DBSpell, out AnimationObj);
AnimationObj.Damage = Calculate.Base.CalculateSoul(AnimationObj.Damage, ClientSpell.UseSpellSoul);
ReceiveAttack.Player.Execute(stream,AnimationObj, user, attacked);
MsgSpell.Targets.Enqueue(AnimationObj);
}
}
}
}
}
foreach (Interfaces.IMapObject targer in user.Screen.Objects)
{
var attacked = targer as Network.GamePackets.SobNpcSpawn;
if (targer.MapObjType == MapObjectType.SobNpc)
{
if (Kernel.GetDistance(user.Entity.X, user.Entity.Y, targer.X, targer.Y) < DBSpell.Range)
{
if (Line.InLine(attacked.X, attacked.Y, LineRange))
{
if (CheckAttack.CanAttackNpc.Verified(user, attacked, DBSpell))
{
MsgSpellAnimation.SpellObj AnimationObj;
Calculate.Physical.OnNpcs(user.Entity, attacked, DBSpell, out AnimationObj);
AnimationObj.Damage = Calculate.Base.CalculateSoul(AnimationObj.Damage, ClientSpell.UseSpellSoul);
Experience += ReceiveAttack.Npc.Execute(stream, AnimationObj, user, attacked);
MsgSpell.Targets.Enqueue(AnimationObj);
}
}
}
}
}
Updates.IncreaseExperience.Up(stream, user, Experience);
Updates.UpdateSpell.CheckUpdate(stream, user, Attack, Experience, DBSpells);
MsgSpell.SetStream(stream); MsgSpell.Send(user);
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
break;
}