Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Handler.cs
- #region WrathoftheEmperor
- case 12570:
- {
- if (CanUseSpell(spell, attacker.Owner))
- {
- PrepareSpell(spell, attacker.Owner);
- SpellUse suse = new SpellUse(true);
- suse.Attacker = attacker.UID;
- suse.SpellID = SpellID;
- suse.SpellLevel = attacker.Owner.Spells[SpellID].Level;
- suse.X = X;
- suse.Y = Y;
- suse.SpellEffect = 1;
- foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
- {
- if (_obj == null) continue;
- if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
- {
- attacked = _obj as Entity;
- if (Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= 2)
- {
- if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
- {
- attack.Effect = Attack.AttackEffects.None;
- uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
- damage = (uint)(damage * 1.2);
- // damage = (uint)MathHelper.AdjustDataEx((int)damage / 3, (int)spell.Power / 100);
- attack.Damage = damage;
- attacker.WrathoftheEmperor = true;
- attacker.WrathoftheEmperorStamp = DateTime.Now;
- suse.Effect = attack.Effect;
- ReceiveAttack(attacker, attacked, attack, ref damage, spell);
- suse.AddTarget(attacked.UID, damage, attack);
- }
- }
- }
- else if (_obj.MapObjType == MapObjectType.SobNpc)
- {
- attackedsob = _obj as SobNpcSpawn;
- if (Kernel.GetDistance(attacker.X, attacker.Y, attackedsob.X, attackedsob.Y) <= 2)
- {
- if (CanAttack(attacker, attackedsob, spell))
- {
- attack.Effect = Attack.AttackEffects.None;
- uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
- suse.Effect = attack.Effect;
- ReceiveAttack(attacker, attackedsob, attack, damage, spell);
- suse.AddTarget(attackedsob.UID, damage, attack);
- }
- }
- }
- }
- attacker.Owner.SendScreen(suse, true);
- }
- break;
- }
- #endregion
- #region Single target
- case 11140://WindStorm
- case 10490://TripleAtaque Monje
- {
- if (CanUseSpell(spell, attacker.Owner))
- {
- PrepareSpell(spell, attacker.Owner);
- TryTrip suse = new TryTrip(true);
- suse.Attacker = attacker.UID;
- suse.SpellID = spell.ID;
- suse.SpellLevel = spell.Level;
- if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange + 1)
- {
- if (attackedsob != null)
- {
- if (CanAttack(attacker, attackedsob, spell))
- {
- suse.Attacked = attackedsob.UID;
- PrepareSpell(spell, attacker.Owner);
- attack.Effect = Attack.AttackEffects.None;
- uint AllDamage = 0;
- uint damage1 = 0;
- uint damage2 = 0;
- uint damage = 0;
- Network.GamePackets.Attack.AttackEffects Eff1 = 0;
- Network.GamePackets.Attack.AttackEffects Eff2 = 0;
- Network.GamePackets.Attack.AttackEffects Eff3 = 0;
- damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
- AllDamage += damage;
- Eff1 = attack.Effect;
- attack.Effect = Attack.AttackEffects.None;
- if (attackedsob.Hitpoints <= AllDamage)
- {
- suse.Eff1 = Eff1;
- suse.Damage += damage;
- suse.Count = 1;
- }
- else
- {
- damage1 = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
- Eff2 = attack.Effect;
- attack.Effect = Attack.AttackEffects.None;
- AllDamage += damage1;
- if (attackedsob.Hitpoints <= AllDamage)
- {
- suse.Eff1 = Eff1;
- suse.Eff2 = Eff2;
- suse.Damage += damage;
- suse.Damage1 += damage1;
- suse.Count = 2;
- }
- else
- {
- damage2 = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
- Eff3 = attack.Effect;
- attack.Effect = Attack.AttackEffects.None;
- AllDamage += damage2;
- suse.Eff1 = Eff1;
- suse.Eff2 = Eff2;
- suse.Eff3 = Eff3;
- suse.Damage = damage;
- suse.Damage1 = damage1;
- suse.Damage2 = damage2;
- suse.Count = 3;
- }
- }
- if (spellID == 10490)
- {
- if (attacker.EpicMonk())
- {
- if (attacker.Owner.Spells.ContainsKey(12570))
- {
- attacker.WrathoftheEmperor = true;
- attacker.WrathoftheEmperorStamp = DateTime.Now;
- }
- }
- }
- ReceiveAttack(attacker, attackedsob, attack, AllDamage, spell);
- }
- }
- else
- {
- if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
- {
- suse.Attacked = attacked.UID;
- PrepareSpell(spell, attacker.Owner);
- attack.Effect = Attack.AttackEffects.None;
- uint AllDamage = 0;
- uint damage1 = 0;
- uint damage2 = 0;
- uint damage = 0;
- Network.GamePackets.Attack.AttackEffects Eff1 = 0;
- Network.GamePackets.Attack.AttackEffects Eff2 = 0;
- Network.GamePackets.Attack.AttackEffects Eff3 = 0;
- damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack, spell);
- damage = (uint)(damage / 2);
- Eff1 = attack.Effect;
- attack.Effect = Attack.AttackEffects.None;
- if (attacked.MaxHitpoints <= AllDamage)
- {
- suse.Eff1 = Eff1;
- suse.Damage += damage;
- suse.Count = 1;
- }
- else
- {
- damage1 = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack, spell);
- damage1 = (uint)(damage1 / 2);
- Eff2 = attack.Effect;
- attack.Effect = Attack.AttackEffects.None;
- AllDamage += damage1;
- attack.Damage = AllDamage;
- if (attacked.MaxHitpoints <= AllDamage)
- {
- suse.Eff1 = Eff1;
- suse.Eff2 = Eff2;
- suse.Damage += damage;
- suse.Damage1 += damage1;
- suse.Count = 2;
- }
- else
- {
- damage2 = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack, spell);
- damage2 = (uint)(damage2 / 2);
- Eff3 = attack.Effect;
- attack.Effect = Attack.AttackEffects.None;
- AllDamage += damage2;
- suse.Eff1 = Eff1;
- suse.Eff2 = Eff2;
- suse.Eff3 = Eff3;
- suse.Damage = damage;
- suse.Damage1 = damage1;
- suse.Damage2 = damage2;
- suse.Count = 3;
- }
- }
- if (spellID == 10490)
- {
- if (attacker.EpicMonk())
- {
- if (attacker.Owner.Spells.ContainsKey(12570))
- {
- attacker.WrathoftheEmperor = true;
- attacker.WrathoftheEmperorStamp = DateTime.Now;
- }
- }
- }
- ReceiveAttack(attacker, attacked, attack, ref AllDamage, spell);
- }
- }
- attacker.AttackPacket = null;
- }
- else
- {
- attacker.AttackPacket = null;
- }
- attacker.Owner.SendScreen(suse, true);
- }
- attacker.AttackPacket = null;
- break;
- }
- case 1290:
- case 5030:
- case 5040:
- case 7000:
- case 7010:
- case 7030:
- case 7040:
- {
- 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;
- //suse.SoulLevel = client_Spell.SoulLevel;
- if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange + 1)
- {
- if (attackedsob != null)
- {
- if (CanAttack(attacker, attackedsob, spell))
- {
- PrepareSpell(spell, attacker.Owner);
- attack.Effect = Attack.AttackEffects.None;
- uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
- ReceiveAttack(attacker, attackedsob, attack, damage, spell);
- suse.AddTarget(attackedsob.UID, damage, attack);
- }
- }
- else
- {
- if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
- {
- PrepareSpell(spell, attacker.Owner);
- attack.Effect = Attack.AttackEffects.None;
- uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack, spell);
- suse.Effect = attack.Effect;
- ReceiveAttack(attacker, attacked, attack, ref damage, spell);
- suse.AddTarget(attacked.UID, damage, attack);
- }
- }
- }
- else
- {
- attacker.AttackPacket = null;
- }
- attacker.Owner.SendScreen(suse, true);
- }
- break;
- }
- #endregion
- en Region Melee busca algo asi
- if (attacked.EntityFlag == EntityFlag.Player && wep1spellid == 10490)
- y fijate donde dice el Rate le mandas 35
- =============================
- SpellTable.cs al Final del todo agregas el case 12570
- en la parte de switch (information.ID)
- {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement