|
المشاركات 483 |
+التقييم 0.24 |
تاريخ التسجيل May 2019 |
الاقامة |
نظام التشغيل |
رقم العضوية 145 |
case 6001://toxicfog
{
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;
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 = 7;
attacked.ToxicFogPercent = spell.PowerPercent;
attacked.AddFlag(Update.Flags.Poisoned);
suse.AddTarget(attacked.UID, 1, null);
}
else
{
suse.AddTarget(attacked.UID, 0, null);
suse.Targets[attacked.UID].Hit = false;
}
}
}
}
}
}
else
{
attacker.AttackPacket = null;
}
attacker.Owner.SendScreen(suse, true);
}
break;
}
suse.AddTarget(client.Player, damage, null);
#region ToxicFog
if (client.Player.ToxicFogLeft > 0)
{
if (Now >= client.Player.ToxicFogStamp.AddSeconds(2))
{
float Percent = client.Player.ToxicFogPercent;
if (client.Player.Detoxication != 0)
{
float immu = 1 - client.Player.Detoxication / 100F;
Percent = Percent * immu;
}
client.Player.ToxicFogLeft--;
if (client.Player.ToxicFogLeft == 0)
{
client.Player.RemoveFlag(Update.Flags.Poisoned);
return;
}
client.Player.ToxicFogStamp = Now;
if (client.Player.Hitpoints > 1)
{
uint damage = Game.Attacking.Calculate.Percent(client.Player, Percent);
if (client.Player.ContainsFlag2(Network.GamePackets.Update.Flags2.AzureShield))
{
if (damage > client.Player.AzureShieldDefence)
{
damage -= client.Player.AzureShieldDefence;
Game.Attacking.Calculate.CreateAzureDMG(client.Player.AzureShieldDefence, client.Player, client.Player);
client.Player.RemoveFlag2(Network.GamePackets.Update.Flags2.AzureShield);
}
else
{
Game.Attacking.Calculate.CreateAzureDMG((uint)damage, client.Player, client.Player);
client.Player.AzureShieldDefence -= (ushort)damage;
client.Player.AzureShieldPacket();
damage = 1;
}
}
else
client.Player.Hitpoints -= damage;
Network.GamePackets.SpellUse suse = new Network.GamePackets.SpellUse(true);
suse.Attacker = client.Player.UID;
suse.SpellID = 10010;
suse.AddTarget(client.Player, damage, null);
client.SendScreen(suse, true);
// if (client != null)
// client.UpdateQualifier(client.ArenaStatistic.PlayWith, client, damage);//
}
}
}
else
{
if (client.Player.ContainsFlag(Update.Flags.Poisoned))
client.Player.RemoveFlag(Update.Flags.Poisoned);
}
#endregion
private void BuffersCallback(
#region ToxicFog
if (client.Entity.ToxicFogLeft > 0)
{
if (Now >= client.Entity.ToxicFogStamp.AddSeconds(2))
{
float Percent = client.Entity.ToxicFogPercent;
if (client.Entity.Detoxication != 0)
{
float immu = 1 - client.Entity.Detoxication / 100F;
Percent = Percent * immu;
}
client.Entity.ToxicFogLeft--;
if (client.Entity.ToxicFogLeft == 0)
{
client.Entity.RemoveFlag(Update.Flags.Poisoned);
return;
}
client.Entity.ToxicFogStamp = Now;
if (client.Entity.Hitpoints > 1)
{
uint damage = Game.Attacking.Calculate.Percent(client.Entity, Percent);
if (client.Entity.ContainsFlag2(Network.GamePackets.Update.Flags2.AzureShield))
{
if (damage > client.Entity.AzureShieldDefence)
{
damage -= client.Entity.AzureShieldDefence;
Game.Attacking.Calculate.CreateAzureDMG(client.Entity.AzureShieldDefence, client.Entity, client.Entity);
client.Entity.RemoveFlag2(Network.GamePackets.Update.Flags2.AzureShield);
}
else
{
Game.Attacking.Calculate.CreateAzureDMG((uint)damage, client.Entity, client.Entity);
client.Entity.AzureShieldDefence -= (ushort)damage;
client.Entity.AzureShieldPacket();
damage = 1;
}
}
else
client.Entity.Hitpoints -= damage;
Network.GamePackets.SpellUse suse = new Network.GamePackets.SpellUse(true);
suse.Attacker = client.Entity.UID;
suse.SpellID = 10010;
suse.AddTarget(client.Entity, damage, null);
client.SendScreen(suse, true);
if (client != null)
client.UpdateQualifier(damage, true);
}
}
}
else
{
if (client.Entity.ContainsFlag(Update.Flags.Poisoned))
client.Entity.RemoveFlag(Update.Flags.Poisoned);
}
#endregion
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
مشكلة في النينجا | ElSaher | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2020-04-01 03:21 AM |
اسكلة النينجا الى بتطلع من الارض عالية اوي فى الضرب | lofyCo | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2020-03-25 02:17 PM |
اسكلة النينجا اديك فى الارض تفحر عاوز اشوفلها حل | MRonlineGvrix | مشكلات السيرفيرات كونكر الشخصيه | 4 | 2020-02-05 05:55 PM |
مشكلة فى رون بتاع النينجا | nova | مشكلات السيرفيرات كونكر الشخصيه | 6 | 2019-11-27 08:17 PM |
مشكلة بخصوص اسكلة الويند ولكر thundercloud | ابو مروان | مشكلات السيرفيرات كونكر الشخصيه | 21 | 2019-08-21 10:43 PM |