public void OnTargetDamaged(Mobile from, int amount) { if (this.m_FirstHit == FirstHit.NotDelivered) { this.m_FirstHit = FirstHit.Delivered; } if (this.m_Poisoned) { this.m_HonorDamage += amount * 0.8; this.m_Poisoned = false; // Reset the flag return; } this.m_TotalDamage += amount; if (from == this.m_Source) { if (this.m_Target.CanSee(this.m_Source) && this.m_Target.InLOS(this.m_Source) && (this.m_Source.InRange(this.m_Target, 1) || (this.m_Source.Location == this.m_InitialLocation && this.m_Source.Map == this.m_InitialMap))) { this.m_HonorDamage += amount; } else { this.m_HonorDamage += amount * 0.8; } } else if (from is BaseCreature && ((BaseCreature)from).GetMaster() == this.m_Source) { this.m_HonorDamage += amount * 0.8; } }
public HonorContext(PlayerMobile source, Mobile target) { this.m_Source = source; this.m_Target = target; this.m_FirstHit = FirstHit.NotDelivered; this.m_Poisoned = false; this.m_InitialLocation = source.Location; this.m_InitialMap = source.Map; source.SentHonorContext = this; ((IHonorTarget)target).ReceivedHonorContext = this; this.m_Timer = new InternalTimer(this); this.m_Timer.Start(); source.m_hontime = (DateTime.UtcNow + TimeSpan.FromMinutes(40)); Timer.DelayCall(TimeSpan.FromMinutes(40), delegate() { if (source.m_hontime < DateTime.UtcNow && source.SentHonorContext != null) { this.Cancel(); } }); }
public void OnTargetDamaged(Mobile from, int amount) { if (m_FirstHit == FirstHit.NotDelivered) { m_FirstHit = FirstHit.Delivered; } if (m_Poisoned) { m_HonorDamage += amount * 0.8; m_Poisoned = false; // Reset the flag return; } m_TotalDamage += amount; if (from == Source) { if (Target.CanSee(Source) && Target.InLOS(Source) && (Source.InRange(Target, 1) || (Source.Location == m_InitialLocation && Source.Map == m_InitialMap))) { m_HonorDamage += amount; } else { m_HonorDamage += amount * 0.8; } } else if (from is BaseCreature creature && creature.GetMaster() == Source) { m_HonorDamage += amount * 0.8; } }
public HonorContext(PlayerMobile source, Mobile target) { Source = source; Target = target; m_FirstHit = FirstHit.NotDelivered; m_Poisoned = false; m_InitialLocation = source.Location; m_InitialMap = source.Map; source.SentHonorContext = this; ((IHonorTarget)target).ReceivedHonorContext = this; m_Timer = new InternalTimer(this); m_Timer.Start(); source.m_hontime = Core.Now + TimeSpan.FromMinutes(40); Timer.StartTimer( TimeSpan.FromMinutes(40), () => { if (source.m_hontime < Core.Now && source.SentHonorContext != null) { Cancel(); } } ); }
public HonorContext(PlayerMobile source, Mobile target) { this.m_Source = source; this.m_Target = target; this.m_FirstHit = FirstHit.NotDelivered; this.m_Poisoned = false; this.m_InitialLocation = source.Location; this.m_InitialMap = source.Map; source.SentHonorContext = this; ((IHonorTarget)target).ReceivedHonorContext = this; this.m_Timer = new InternalTimer(this); this.m_Timer.Start(); source.m_hontime = (DateTime.Now + TimeSpan.FromMinutes(40)); Timer.DelayCall(TimeSpan.FromMinutes(40), delegate() { if (source.m_hontime < DateTime.Now && source.SentHonorContext != null) { this.Cancel(); } }); }
public void OnSourceDamaged(Mobile from, int amount) { if (from != this.m_Target) { return; } if (this.m_FirstHit == FirstHit.NotDelivered) { this.m_FirstHit = FirstHit.Granted; } }
public HonorContext(PlayerMobile source, Mobile target) { m_Source = source; m_Target = target; m_FirstHit = FirstHit.NotDelivered; m_Poisoned = false; m_InitialLocation = source.Location; m_InitialMap = source.Map; source.SentHonorContext = this; ((IHonorTarget)target).ReceivedHonorContext = this; m_Timer = new InternalTimer(this); m_Timer.Start(); }
public HonorContext( PlayerMobile source, Mobile target ) { m_Source = source; m_Target = target; m_FirstHit = FirstHit.NotDelivered; m_Poisoned = false; m_InitialLocation = source.Location; m_InitialMap = source.Map; source.SentHonorContext = this; ( (IHonorTarget) target ).ReceivedHonorContext = this; m_Timer = new InternalTimer( this ); m_Timer.Start(); }
public void OnTargetDamaged( Mobile from, int amount ) { if ( m_FirstHit == FirstHit.NotDelivered ) m_FirstHit = FirstHit.Delivered; if ( m_Poisoned ) { m_HonorDamage += amount * 0.8; m_Poisoned = false; // Reset the flag return; } m_TotalDamage += amount; if ( from == m_Source ) { if ( m_Target.CanSee( m_Source ) && m_Target.InLOS( m_Source ) && ( m_Source.InRange( m_Target, 1 ) || ( m_Source.Location == m_InitialLocation && m_Source.Map == m_InitialMap ) ) ) { m_HonorDamage += amount; } else { m_HonorDamage += amount * 0.8; } } else if ( from is BaseCreature && ((BaseCreature)from).GetMaster() == m_Source ) { m_HonorDamage += amount * 0.8; } }
public void OnSourceDamaged( Mobile from, int amount ) { if ( from != m_Target ) return; if ( m_FirstHit == FirstHit.NotDelivered ) m_FirstHit = FirstHit.Granted; }