public override void OnGotMeleeAttack(Mobile attacker) { base.OnGotMeleeAttack(attacker); if (!m_BloodDiseaseTable.ContainsKey(attacker) && this.InRange(attacker, 1) && 0.25 > Utility.RandomDouble() && !FontOfFortune.HasBlessing(attacker, FontOfFortune.BlessingType.Protection)) { // The rotworm has infected you with blood disease!! attacker.SendLocalizedMessage(1111672, "", 0x25); attacker.PlaySound(0x213); Effects.SendTargetParticles(attacker, 0x373A, 1, 15, 0x26B9, EffectLayer.Head); BloodDiseaseTimer timer = new BloodDiseaseTimer(attacker); timer.Start(); m_BloodDiseaseTable.Add(attacker, timer); } }
private void TryInfect(Mobile attacker) { if (!m_BloodDiseaseTable.ContainsKey(attacker) && this.InRange(attacker, 1) && 0.25 > Utility.RandomDouble() && !FountainOfFortune.UnderProtection(attacker)) { // The rotworm has infected you with blood disease!! attacker.SendLocalizedMessage(1111672, "", 0x25); attacker.PlaySound(0x213); Effects.SendTargetParticles(attacker, 0x373A, 1, 15, 0x26B9, EffectLayer.Head); BloodDiseaseTimer timer = new BloodDiseaseTimer(attacker); timer.Start(); // TODO: 2nd cliloc BuffInfo.AddBuff(attacker, new BuffInfo(BuffIcon.RotwormBloodDisease, 1153798, 1153798)); m_BloodDiseaseTable.Add(attacker, timer); } }
public override void OnGotMeleeAttack( Mobile attacker ) { base.OnGotMeleeAttack( attacker ); if ( !m_BloodDiseaseTable.ContainsKey( attacker ) && this.InRange( attacker, 1 ) && 0.25 > Utility.RandomDouble()/* && !FontOfFortune.HasBlessing( attacker, FontOfFortune.BlessingType.Protection )*/ ) { // The rotworm has infected you with blood disease!! attacker.SendLocalizedMessage( 1111672, "", 0x25 ); attacker.PlaySound( 0x213 ); Effects.SendTargetParticles( attacker, 0x373A, 1, 15, 0x26B9, EffectLayer.Head ); BloodDiseaseTimer timer = new BloodDiseaseTimer( attacker ); timer.Start(); m_BloodDiseaseTable.Add( attacker, timer ); } }