|
المشاركات 82 |
+التقييم 0.04 |
تاريخ التسجيل May 2019 |
الاقامة |
نظام التشغيل |
رقم العضوية 238 |
case 10381:
{
//if (CanUseSpell(spell, attacker.Owner) && Time32.Now > attacker.SpellStamp.AddMilliseconds(500))
{
attacker.SpellStamp = Time32.Now;
ushort Xx, Yx;
if (attacked != null)
{
Xx = attacked.X;
Yx = attacked.Y;
}
else
{
Xx = attackedsob.X;
Yx = attackedsob.Y;
}
if (Kernel.GetDistance(attacker.X, attacker.Y, Xx, Yx) <= 7)
{
if (attackedsob == null)
if (attacked.ContainsFlag(Update.Flags.Fly))
return;
if (attacker.ContainsFlag(Update.Flags.Fly))
return;
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
attacker.Stamina -= spell.UseStamina;
suse.Attacker = attacker.UID;
// attacker.Stamina -= 9;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
bool send = false;
if (attackedsob == null)
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * 1.4);
suse.Effect1 = attack.Effect1;
//double dmg = (double)damage * 0.9;
//damage = (uint)dmg;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
send = true;
}
}
else
{
if (CanAttack(attacker, attackedsob, spell))
{
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
damage = (uint)(damage * 180 / 100);
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.Effect1 = attack.Effect1;
suse.AddTarget(attackedsob, damage, attack);
send = true;
}
}
if (send)
attacker.Owner.SendScreen(suse, true);
}
else
{
attacker.AttackPacket = null;
}
}
break;
}
case 10381:
{
if (CanUseSpell(spell, attacker.Owner) && Time32.Now > attacker.SpellStamp.AddMilliseconds(600))
{
attacker.SpellStamp = Time32.Now;
ushort Xx, Yx;
if (attacked != null)
{
Xx = attacked.X;
Yx = attacked.Y;
}
else
{
Xx = attackedsob.X;
Yx = attackedsob.Y;
}
if (Kernel.GetDistance(attacker.X, attacker.Y, Xx, Yx) <= 7)
{
if (attackedsob == null)
if (attacked.ContainsFlag(Update.Flags.Fly))
return;
if (attacker.ContainsFlag(Update.Flags.Fly))
return;
PrepareSpell(spell, attacker.Owner);
SpellUse suse = new SpellUse(true);
attacker.Stamina -= spell.UseStamina;
suse.Attacker = attacker.UID;
// attacker.Stamina -= 9;
suse.SpellID = spell.ID;
suse.SpellLevel = spell.Level;
suse.X = X;
suse.Y = Y;
bool send = false;
if (attackedsob == null)
{
if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
{
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack, client_Spell.LevelHu2);
damage = (uint)(damage * 1.4);
suse.Effect1 = attack.Effect1;
//double dmg = (double)damage * 0.9;
//damage = (uint)dmg;
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
suse.AddTarget(attacked, damage, attack);
send = true;
}
}
else
{
if (CanAttack(attacker, attackedsob, spell))
{
attack.Effect1 = Attack.AttackEffects1.None;
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
damage = (uint)(damage * 180 / 100);
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
suse.Effect1 = attack.Effect1;
suse.AddTarget(attackedsob, damage, attack);
send = true;
}
}
if (send)
attacker.Owner.SendScreen(suse, true);
}
else
{
attacker.AttackPacket = null;
}
}
break;
}
if (!pass && attack.AttackType == Attack.Magic)
{
if (!(doWep1Spell || doWep2Spell))
{
if (SpellID == 11960 || SpellID == 1045 || SpellID == 1046 || SpellID == 11005 || SpellID == 11000 || SpellID == 1100 || SpellID == 1002 || SpellID == 11070 || SpellID == 12080 || SpellID == 10381 || SpellID == 1095 || SpellID == 1090 || SpellID == 12110 || SpellID == 12350) // FB and SS
{
//do checks
}
else
{
int milliSeconds = 1000 - decrease;
if (milliSeconds < 0 || milliSeconds > 5000)
milliSeconds = 0;
if (Time32.Now < attacker.AttackStamp.AddMilliseconds(milliSeconds))
return;
}
attacker.AttackStamp = Time32.Now;
}
}
if (!pass && attack.attacktype == attack.magic)
{
if (!(dowep1spell || dowep2spell))
{
if (spellid == 11960 || spellid == 1045 || spellid == 1046 || spellid == 11005 || spellid == 11000 || spellid == 1100 || spellid == 1002 || spellid == 11070 || spellid == 12080 || spellid == 10381 || spellid == 1095 || spellid == 1090 || spellid == 12110 || spellid == 12350) // fb and ss
{
//do checks
}
else
{
int milliseconds = 1000 - decrease;
if (milliseconds < 0 || milliseconds > 5000)
milliseconds = 0;
if (time32.now < attacker.attackstamp.addmilliseconds(milliseconds))
return;
}
attacker.attackstamp = time32.now;
}
}
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
محتاج حل ل سرعة الضربة | xHazem | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2020-05-04 05:15 PM |
مشكلة في سرعة ضربة الاسكلة | youssefabdelmanam | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2019-12-02 10:10 PM |
مشكلة بخصوص سرعة الضربة | osama | مشكلات السيرفيرات كونكر الشخصيه | 12 | 2019-07-11 09:31 PM |