Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Handler.cs buscas case 6001: y lo reemplazas Por este :
- #region ToxicFog
- 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.Player || _obj.MapObjType == MapObjectType.Monster)
- {
- attacked = _obj as Entity;
- if (attacked.MapObjType == MapObjectType.Monster)
- if (attacked.Name == "TeratoDragon")//SnowBanshee
- continue;
- if (attacked.Name == "SnowBanshee")//SnowBanshee
- continue;
- if (attacked.Name == "ThrillingSpook")//SnowBanshee
- continue;
- if (attacked.Name == "SwordMaster")//SnowBanshee
- continue;
- if (attacked.Name == "LavaBeast")//SnowBanshee
- continue;
- if (attacked.Name == "Guard1")//SnowBanshee
- continue;
- if (attacked.Name == "NINJAMALIGNO")//SnowBanshee
- 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 = 20;
- attacked.ToxicFogPercent = 0.5f;
- 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;
- }
- #endregion
- ================================================
- World.cs buscas #region ToxicFog o ToxicFogPercent y reemplazas :
- #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((ulong)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((ulong)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((ulong)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.UID, damage, null);
- client.SendScreen(suse, true);
- if (client != null)
- client.UpdateQualifier(client.ArenaStatistic.PlayWith, client, damage);
- }
- }
- }
- else
- {
- if (client.Entity.ContainsFlag((ulong)Update.Flags.Poisoned))
- client.Entity.RemoveFlag((ulong)Update.Flags.Poisoned);
- }
- #endregion
- ========================================================
- Calculate.cs en caso de ser necesario o que no Existe dicha variable :
- public static void CreateAzureDMG(uint dmg, Entity attacker, Entity attacked)
- {
- Network.GamePackets.Attack attac = new Attack(true);
- attac.Attacker = attacker.UID;
- attac.Attacked = attacked.UID;
- attac.X = attacked.X;
- attac.Y = attacked.Y;
- attac.AttackType = 55;
- attac.Damage = dmg;
- attacked.Owner.SendScreen(attac, true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement