| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- using System.Drawing;
- using Server.MirEnvir;
- using S = ServerPackets;
- namespace Server.MirObjects
- {
- public sealed class DecoObject : MapObject
- {
- public override ObjectType Race
- {
- get { return ObjectType.Deco; }
- }
- public override string Name { get; set; }
- public override int CurrentMapIndex { get; set; }
- public override Point CurrentLocation { get; set; }
- public override MirDirection Direction { get; set; }
- public override ushort Level { get; set; }
- public override bool Blocking
- {
- get
- {
- return false;
- }
- }
- public int Image;
- public override int Health
- {
- get { throw new NotSupportedException(); }
- }
- public override int MaxHealth
- {
- get { throw new NotSupportedException(); }
- }
- public override void Process()
- {
- //Cell cell = CurrentMap.GetCell(CurrentLocation);
- //for (int i = 0; i < cell.Objects.Count; i++)
- // ProcessDeco(cell.Objects[i]);
- }
- public override void SetOperateTime()
- {
- long time = Envir.Time + 2000;
- //if (TickTime < time && TickTime > Envir.Time)
- // time = TickTime;
- if (OwnerTime < time && OwnerTime > Envir.Time)
- time = OwnerTime;
- if (ExpireTime < time && ExpireTime > Envir.Time)
- time = ExpireTime;
- if (PKPointTime < time && PKPointTime > Envir.Time)
- time = PKPointTime;
- if (LastHitTime < time && LastHitTime > Envir.Time)
- time = LastHitTime;
- if (EXPOwnerTime < time && EXPOwnerTime > Envir.Time)
- time = EXPOwnerTime;
- if (BrownTime < time && BrownTime > Envir.Time)
- time = BrownTime;
- for (int i = 0; i < ActionList.Count; i++)
- {
- if (ActionList[i].Time >= time && ActionList[i].Time > Envir.Time) continue;
- time = ActionList[i].Time;
- }
- for (int i = 0; i < PoisonList.Count; i++)
- {
- if (PoisonList[i].TickTime >= time && PoisonList[i].TickTime > Envir.Time) continue;
- time = PoisonList[i].TickTime;
- }
- for (int i = 0; i < Buffs.Count; i++)
- {
- if (Buffs[i].NextTime >= time && Buffs[i].NextTime > Envir.Time) continue;
- time = Buffs[i].NextTime;
- }
- if (OperateTime <= Envir.Time || time < OperateTime)
- OperateTime = time;
- }
- public override void Process(DelayedAction action)
- {
- throw new NotSupportedException();
- }
- public override bool IsAttackTarget(HumanObject attacker)
- {
- throw new NotSupportedException();
- }
- public override bool IsAttackTarget(MonsterObject attacker)
- {
- throw new NotSupportedException();
- }
- public override int Attacked(HumanObject attacker, int damage, DefenceType type = DefenceType.ACAgility, bool damageWeapon = true)
- {
- throw new NotSupportedException();
- }
- public override int Attacked(MonsterObject attacker, int damage, DefenceType type = DefenceType.ACAgility)
- {
- throw new NotSupportedException();
- }
- public override int Struck(int damage, DefenceType type = DefenceType.ACAgility)
- {
- throw new NotSupportedException();
- }
- public override bool IsFriendlyTarget(HumanObject ally)
- {
- throw new NotSupportedException();
- }
- public override bool IsFriendlyTarget(MonsterObject ally)
- {
- throw new NotSupportedException();
- }
- public override void ReceiveChat(string text, ChatType type)
- {
- throw new NotSupportedException();
- }
- public override Packet GetInfo()
- {
- return new S.ObjectDeco
- {
- ObjectID = ObjectID,
- Location = CurrentLocation,
- Image = Image
- };
- }
- public override void ApplyPoison(Poison p, MapObject Caster = null, bool NoResist = false, bool ignoreDefence = true)
- {
- throw new NotSupportedException();
- }
- public override void Die()
- {
- throw new NotSupportedException();
- }
- public override int Pushed(MapObject pusher, MirDirection dir, int distance)
- {
- throw new NotSupportedException();
- }
- public override void SendHealth(HumanObject player)
- {
- throw new NotSupportedException();
- }
- public override void Despawn()
- {
- base.Despawn();
- }
- }
- }
|