/* * public override void OnDeath( Container c ) * { * if ( Utility.Random( 95 ) < 1 ) * c.DropItem( new WerewolfTooth( ToothType.Normal ) ); * * base.OnDeath( c ); * } */ public override bool OnBeforeDeath() { Werewolf rm = new Werewolf(); rm.Team = this.Team; rm.Combatant = this.Combatant; rm.NoKillAwards = true; if (rm.Backpack == null) { Backpack pack = new Backpack(); pack.Movable = false; rm.AddItem(pack); } for (int i = 0; i < 2; i++) { LootPack.FilthyRich.Generate(this, rm.Backpack, true, LootPack.GetLuckChanceForKiller(this)); LootPack.FilthyRich.Generate(this, rm.Backpack, false, LootPack.GetLuckChanceForKiller(this)); } Effects.PlaySound(this, Map, GetDeathSound()); Effects.SendLocationEffect(Location, Map, 0x3709, 30, 10, 0x496, 0); Effects.SendLocationEffect(Location, Map, 0x375A, 30, 10, 0x496, 0); rm.MoveToWorld(Location, Map); Delete(); return(false); //OnDeath will not trigger }
/* public override void OnDeath( Container c ) { if ( Utility.Random( 95 ) < 1 ) c.DropItem( new WerewolfTooth( ToothType.Normal ) ); base.OnDeath( c ); } */ public override bool OnBeforeDeath() { Werewolf rm = new Werewolf(); rm.Team = this.Team; rm.Combatant = this.Combatant; rm.NoKillAwards = true; if ( rm.Backpack == null ) { Backpack pack = new Backpack(); pack.Movable = false; rm.AddItem( pack ); } for ( int i = 0; i < 2; i++ ) { LootPack.FilthyRich.Generate( this, rm.Backpack, true, LootPack.GetLuckChanceForKiller( this ) ); LootPack.FilthyRich.Generate( this, rm.Backpack, false, LootPack.GetLuckChanceForKiller( this ) ); } Effects.PlaySound(this, Map, GetDeathSound()); Effects.SendLocationEffect( Location, Map, 0x3709, 30, 10, 0x496, 0 ); Effects.SendLocationEffect( Location, Map, 0x375A, 30, 10, 0x496, 0 ); rm.MoveToWorld( Location, Map ); Delete(); return false; //OnDeath will not trigger }