|
case 2812:
case 2812:
{
var attackd = BitConverter.ReadUint(packet, 4);
var clonecount = packet[8];
for (int i = 0; i < clonecount; i++)
{
var attackr = BitConverter.ReadUint(packet, 9 + (i * 4));
if (client.Player.MyClones.Count < clonecount)
return;
var attack = client.Player.AttackPacket;
if (attack == null)
attack = new GamePackets.Attack(true);
attack.Attacker = attackr;
attack.Attacked = attackd;
if (client.Player.MyClones.Count == 0)
return;
if (attackd == client.Player.UID || client.Player.MyClones.ContainsKey(attackd))
return;
ahmedfathy.Database.SpellInformation MySpell = null;
try
{
MySpell = Database.SpellTable.GetSpell(client.Spells[12090].ID, client.Spells[12090].Level);
}
catch { MySpell = Database.SpellTable.GetSpell(12090, 4); }
Entity Clone = null;
if (client.Player.MyClones.TryGetValue(attackr, out Clone))
{
Entity attacked = null;
SobNpcSpawn attackedsob = null;
if (client.Screen.TryGetValue(attackd, out attacked))
{
uint damage = 0;
var spell = Database.SpellTable.GetSpell(attack.MagicType, (byte)attack.MagicLevel);
if (spell == null)
spell = Database.SpellTable.GetSpell(12080, 0);
if (attack.AttackType == GamePackets.Attack.Melee)
{
if (Game.Attacking.Handle.CanAttack(client.Player, attacked, spell, true))
{
damage = Game.Attacking.Calculate.Melee(client.Player, attacked, spell, ref attack);
double power = (0.5);
damage = (uint)((double)damage * power / 8);
Game.Attacking.Handle.ReceiveAttack(Clone, attacked, attack, ref damage, spell);
attack.Damage = damage;
client.SendScreen(attack);
}
}
else
{
if (Game.Attacking.Handle.CanAttack(client.Player, attacked, spell, false))
{
damage = Game.Attacking.Calculate.Magic(client.Player, attacked, spell, ref attack);
double power = (0.5);
damage = (uint)((double)damage * power / 8);
Game.Attacking.Handle.ReceiveAttack(Clone, attacked, attack, ref damage, spell);
attack.Damage = damage;
client.SendScreen(attack);
}
}
SpellUse suse = new SpellUse(true);
suse.Attacker = Clone.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = attacked.X;
suse.Y = attacked.Y;
suse.Effect1 = attack.Effect1;
suse.AddTarget(attacked, damage, attack);
client.SendScreen(suse, true);
if (client.Account.State == ahmedfathy.Database.AccountTable.AccountState.ProjectManager)
client.Send(new Message("Clone Attack With Skill: " + spell.Name, System.Drawing.Color.CadetBlue, Message.Talk));
}
else if (client.Screen.TryGetSob(attackd, out attackedsob))
{
uint damage = 0;
var spell = Database.SpellTable.GetSpell(attack.MagicType, (byte)attack.MagicLevel);
if (spell == null)
spell = Database.SpellTable.GetSpell(12080, 0);
if (attack.AttackType == GamePackets.Attack.Melee)
{
if (Game.Attacking.Handle.CanAttack(client.Player, attackedsob, null))
{
damage = Game.Attacking.Calculate.Melee(client.Player, attackedsob, ref attack);
double power = ((MySpell.Power / 100.0) / 100.0);
damage = (uint)((double)damage * power);
Game.Attacking.Handle.ReceiveAttack(Clone, attackedsob, attack, damage, null);
attack.Damage = damage;
client.SendScreen(attack);
}
}
else
{
if (Game.Attacking.Handle.CanAttack(client.Player, attackedsob, spell))
{
damage = Game.Attacking.Calculate.Magic(client.Player, attackedsob, spell, ref attack);
double power = ((MySpell.Power / 100.0) / 100.0);
damage = (uint)((double)damage * power);
Game.Attacking.Handle.ReceiveAttack(Clone, attackedsob, attack, damage, spell);
attack.Damage = damage;
client.SendScreen(attack);
}
}
SpellUse suse = new SpellUse(true);
suse.Attacker = Clone.UID;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = attackedsob.X;
suse.Y = attackedsob.Y;
suse.Effect1 = attack.Effect1;
suse.AddTarget(attackedsob, damage, attack);
client.SendScreen(suse, true);
if (client.Account.State == ahmedfathy.Database.AccountTable.AccountState.ProjectManager)
client.Send(new Message("Clone Attack With Skill: " + spell.Name, System.Drawing.Color.CadetBlue, Message.Talk));
}
}
}
break;
}
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
حلول لمشكله الموقع مش امن | محمد ياسر | صفحات التسجيل كونكر اونلاين | 12 | 2024-06-24 09:13 PM |
حل لمشكله الوحوش يشباب مش بتتحرك من مكانها | uncelsam | مشكلات السيرفيرات كونكر الشخصيه | 4 | 2020-02-17 12:57 PM |
نقدم لكم Liver-Conquer 3D بنظام الريلك والرونز والشخصية الجديدة Thunder Striker | مجدى | اعلانات السيرفيرات الشخصية | 0 | 2019-11-14 03:59 PM |
حل لمشكله فى سورس اللى الاستاذ احمد الاسيوطى منزلو | MrCroSon | مشكلات السيرفيرات كونكر الشخصيه | 6 | 2019-08-19 01:03 PM |
مطلوب حل لمشكله ف سورس rayzo | zonfor | مشكلات السيرفيرات كونكر الشخصيه | 9 | 2019-08-17 11:34 PM |