Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case (ushort)Role.Flags.SpellID.AngerofStomper:
- {
- MsgSpellAnimation MsgSpell = new MsgSpellAnimation(user.Player.UID
- , 0, Attack.X, Attack.Y, ClientSpell.ID
- , ClientSpell.Level, ClientSpell.UseSpellSoul);
- uint Experience = 0;
- foreach (Role.IMapObj target in user.Player.View.Roles(Role.MapObjectType.Monster))
- {
- MsgMonster.MonsterRole attacked = target as MsgMonster.MonsterRole;
- if (Calculate.Base.GetDistance(user.Player.X, user.Player.Y, attacked.X, attacked.Y) < DBSpell.Range / 2)
- {
- if (CheckAttack.CanAttackMonster.Verified(user, attacked, DBSpell))
- {
- MsgSpellAnimation.SpellObj AnimationObj;
- Calculate.Physical.OnMonster(user.Player, attacked, DBSpell, out AnimationObj);
- AnimationObj.Damage = Calculate.Base.CalculateSoul(AnimationObj.Damage, ClientSpell.UseSpellSoul);
- Experience += ReceiveAttack.Monster.Execute(stream, AnimationObj, user, attacked);
- MsgSpell.Targets.Enqueue(AnimationObj);
- }
- }
- }
- foreach (Role.IMapObj targer in user.Player.View.Roles(Role.MapObjectType.Player))
- {
- var attacked = targer as Role.Player;
- if (Calculate.Base.GetDistance(user.Player.X, user.Player.Y, attacked.X, attacked.Y) < DBSpell.Range / 2)
- {
- if (CheckAttack.CanAttackPlayer.Verified(user, attacked, DBSpell))
- {
- MsgSpellAnimation.SpellObj AnimationObj;
- Calculate.Physical.OnPlayer(user.Player, attacked, DBSpell, out AnimationObj);
- AnimationObj.Damage = AnimationObj.Damage * 86 / 100;
- AnimationObj.Damage = Calculate.Base.CalculateSoul(AnimationObj.Damage, ClientSpell.UseSpellSoul);
- ReceiveAttack.Player.Execute(AnimationObj, user, attacked);
- MsgSpell.Targets.Enqueue(AnimationObj);
- }
- }
- }
- foreach (Role.IMapObj targer in user.Player.View.Roles(Role.MapObjectType.SobNpc))
- {
- var attacked = targer as Role.SobNpc;
- if (Calculate.Base.GetDistance(user.Player.X, user.Player.Y, attacked.X, attacked.Y) < DBSpell.Range / 2)
- {
- if (CheckAttack.CanAttackNpc.Verified(user, attacked, DBSpell))
- {
- MsgSpellAnimation.SpellObj AnimationObj;
- Calculate.Physical.OnNpcs(user.Player, attacked, DBSpell, out AnimationObj);
- AnimationObj.Damage = Calculate.Base.CalculateSoul(AnimationObj.Damage, ClientSpell.UseSpellSoul);
- Experience += ReceiveAttack.Npc.Execute(stream, AnimationObj, user, attacked);
- MsgSpell.Targets.Enqueue(AnimationObj);
- }
- }
- }
- Updates.IncreaseExperience.Up(stream, user, Experience);
- Updates.UpdateSpell.CheckUpdate(stream, user, Attack, Experience, DBSpells);
- MsgSpell.SetStream(stream); MsgSpell.Send(user);
- break;
- }
- case (ushort)Role.Flags.SpellID.FireofHell:
- case (ushort)Role.Flags.SpellID.FireCircle:
- {
- MsgSpellAnimation MsgSpell = new MsgSpellAnimation(user.Player.UID
- , 0, Attack.X, Attack.Y, ClientSpell.ID
- , ClientSpell.Level, ClientSpell.UseSpellSoul);
- uint Experience = 0;
- foreach (Role.IMapObj target in user.Player.View.Roles(Role.MapObjectType.Monster))
- {
- MsgMonster.MonsterRole attacked = target as MsgMonster.MonsterRole;
- if (CheckAttack.CanAttackMonster.Verified(user, attacked, DBSpell))
- {
- if (Calculate.Base.GetDistance(user.Player.X, user.Player.Y, attacked.X, attacked.Y) < DBSpell.Range)
- {
- MsgSpellAnimation.SpellObj AnimationObj;
- Calculate.Magic.OnMonster(user.Player, attacked, DBSpell, out AnimationObj);
- AnimationObj.Damage = Calculate.Base.CalculateSoul(AnimationObj.Damage, ClientSpell.UseSpellSoul);
- Experience += ReceiveAttack.Monster.Execute(stream, AnimationObj, user, attacked);
- MsgSpell.Targets.Enqueue(AnimationObj);
- }
- }
- }
- foreach (Role.IMapObj targer in user.Player.View.Roles(Role.MapObjectType.Player))
- {
- var attacked = targer as Role.Player;
- if (CheckAttack.CanAttackPlayer.Verified(user, attacked, DBSpell))
- {
- if (Calculate.Base.GetDistance(user.Player.X, user.Player.Y, attacked.X, attacked.Y) < DBSpell.Range)
- {
- MsgSpellAnimation.SpellObj AnimationObj;
- Calculate.Magic.OnPlayer(user.Player, attacked, DBSpell, out AnimationObj);
- AnimationObj.Damage = Calculate.Base.CalculateSoul(AnimationObj.Damage, ClientSpell.UseSpellSoul);
- ReceiveAttack.Player.Execute(AnimationObj, user, attacked);
- MsgSpell.Targets.Enqueue(AnimationObj);
- Sering.Proces(user, attacked, stream);
- }
- }
- }
- foreach (Role.IMapObj targer in user.Player.View.Roles(Role.MapObjectType.SobNpc))
- {
- var attacked = targer as Role.SobNpc;
- if (CheckAttack.CanAttackNpc.Verified(user, attacked, DBSpell))
- {
- if (Calculate.Base.GetDistance(user.Player.X, user.Player.Y, attacked.X, attacked.Y) < DBSpell.Range)
- {
- MsgSpellAnimation.SpellObj AnimationObj;
- Calculate.Magic.OnNpcs(user.Player, attacked, DBSpell, out AnimationObj);
- AnimationObj.Damage = Calculate.Base.CalculateSoul(AnimationObj.Damage, ClientSpell.UseSpellSoul);
- Experience += ReceiveAttack.Npc.Execute(stream, AnimationObj, user, attacked);
- MsgSpell.Targets.Enqueue(AnimationObj);
- }
- }
- }
- Updates.IncreaseExperience.Up(stream, user, Experience);
- Updates.UpdateSpell.CheckUpdate(stream, user, Attack, Experience, DBSpells);
- MsgSpell.SetStream(stream); MsgSpell.Send(user);
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement