|
المشاركات 2,515 |
+التقييم 1.29 |
تاريخ التسجيل Jul 2019 |
الاقامة |
نظام التشغيل |
رقم العضوية 358 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Rayzo.Game.MsgServer.AttackHandler
{
public class FatalSpin
{
public unsafe static void Execute(Client.GameState user, InteractQuery Attack, ServerSockets.Packet stream, Dictionary<ushort, Database.MagicType.Magic> DBSpells)
{
Database.MagicType.Magic DBSpell;
MsgSpell ClientSpell;
if (CheckAttack.CanUseSpell.Verified(Attack, user, DBSpells, out ClientSpell, out DBSpell))
{
switch (ClientSpell.ID)
{
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);
AnimationObj.Damage = (uint)(AnimationObj.Damage / 2.4);
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;
}
case (ushort)Enums.SpellID.DragonPunch:
{
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 = 0;
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);
AnimationObj.Damage = (uint)(AnimationObj.Damage / 2.4);
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;
}
}
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Rayzo.Game.MsgServer.AttackHandler
{
public class FatalSpin
{
public unsafe static void Execute(Client.GameState user, InteractQuery Attack, ServerSockets.Packet stream, Dictionary<ushort, Database.MagicType.Magic> DBSpells)
{
Database.MagicType.Magic DBSpell;
MsgSpell ClientSpell;
if (CheckAttack.CanUseSpell.Verified(Attack, user, DBSpells, out ClientSpell, out DBSpell))
{
switch (ClientSpell.ID)
{
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);
AnimationObj.Damage = (uint)(AnimationObj.Damage / 2.4);
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;
}
case (ushort)Enums.SpellID.DragonPunch:
{
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 = 0;
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);
AnimationObj.Damage = (uint)(AnimationObj.Damage / 2.4);
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;
}
}
}
}
}
}
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
مشكلة في ضربة الاكونت الفيزيكال | Omar | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2019-12-18 09:44 PM |
مشكلة في ضربة الاكونت ف الاتكات | Omar | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2019-12-17 05:12 AM |
مشكلة في فيزيكال الننجا وتربل المونك والبيرت [Source khaled v5] | youssefabdelmanam | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2019-12-01 12:14 AM |
حل مشكلة الجواز[RayzoV3] | Tefa | تطوير سيرفرات كونكر | 7 | 2019-11-24 10:20 AM |
حل مشكلة ايرور قنصل الي بيجيلك لما الاكونت بينزل ريبورن[Rayzov3] | Tefa | تطوير سيرفرات كونكر | 2 | 2019-11-22 05:45 PM |