FlamingWooma.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using Server.MirDatabase;
  2. using S = ServerPackets;
  3. namespace Server.MirObjects.Monsters
  4. {
  5. public class FlamingWooma : MonsterObject
  6. {
  7. protected internal FlamingWooma(MonsterInfo info) : base(info)
  8. {
  9. }
  10. protected override void Attack()
  11. {
  12. if (!Target.IsAttackTarget(this))
  13. {
  14. Target = null;
  15. return;
  16. }
  17. ShockTime = 0;
  18. Direction = Functions.DirectionFromPoint(CurrentLocation, Target.CurrentLocation);
  19. Broadcast(new S.ObjectAttack {ObjectID = ObjectID, Direction = Direction, Location = CurrentLocation});
  20. ActionTime = Envir.Time + 300;
  21. AttackTime = Envir.Time + AttackSpeed;
  22. int damage = GetAttackPower(Stats[Stat.MinDC], Stats[Stat.MaxDC]);
  23. if (damage == 0) return;
  24. DelayedAction action = new DelayedAction(DelayedType.Damage, Envir.Time + 300, Target, damage, DefenceType.MACAgility);
  25. ActionList.Add(action);
  26. }
  27. }
  28. }