public AddCarvedItem ( Item carved, Server.Mobile carver ) : void | ||
carved | Item | |
carver | Server.Mobile | |
리턴 | void |
public virtual void OnCarve( Mobile from, Corpse corpse, Item with ) { int feathers = Feathers; int wool = Wool; int meat = Meat; int hides = Hides; int scales = Scales; if ( (feathers == 0 && wool == 0 && meat == 0 && hides == 0 && scales == 0) || Summoned || IsBonded || corpse.Animated ) { if ( corpse.Animated ) corpse.SendLocalizedMessageTo( from, 500464 ); // Use this on corpses to carve away meat and hide else from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse. } else { if( Core.ML && from.Race == Race.Human ) { hides = (int)Math.Ceiling( hides * 1.1 ); //10% Bonus Only applies to Hides, Ore & Logs } if ( corpse.Map == Map.Felucca ) { feathers *= 2; wool *= 2; hides *= 2; if (Core.ML) { meat *= 2; scales *= 2; } } new Blood( 0x122D ).MoveToWorld( corpse.Location, corpse.Map ); if ( feathers != 0 ) { corpse.AddCarvedItem( new Feather( feathers ), from ); from.SendLocalizedMessage( 500479 ); // You pluck the bird. The feathers are now on the corpse. } if ( wool != 0 ) { corpse.AddCarvedItem( new TaintedWool( wool ), from ); from.SendLocalizedMessage( 500483 ); // You shear it, and the wool is now on the corpse. } if ( meat != 0 ) { if ( MeatType == MeatType.Ribs ) corpse.AddCarvedItem( new RawRibs( meat ), from ); else if ( MeatType == MeatType.Bird ) corpse.AddCarvedItem( new RawBird( meat ), from ); else if ( MeatType == MeatType.LambLeg ) corpse.AddCarvedItem( new RawLambLeg( meat ), from ); from.SendLocalizedMessage( 500467 ); // You carve some meat, which remains on the corpse. } if ( hides != 0 ) { Item holding = from.Weapon as Item; if ( Core.AOS && ( holding is SkinningKnife /* TODO: || holding is ButcherWarCleaver || with is ButcherWarCleaver */ ) ) { Item leather = null; switch ( HideType ) { case HideType.Regular: leather = new Leather( hides ); break; case HideType.Spined: leather = new SpinedLeather( hides ); break; case HideType.Horned: leather = new HornedLeather( hides ); break; case HideType.Barbed: leather = new BarbedLeather( hides ); break; } if ( leather != null ) { if ( !from.PlaceInBackpack( leather ) ) { corpse.DropItem( leather ); from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse. } else from.SendLocalizedMessage( 1073555 ); // You skin it and place the cut-up hides in your backpack. } } else { if ( HideType == HideType.Regular ) corpse.DropItem( new Hides( hides ) ); else if ( HideType == HideType.Spined ) corpse.DropItem( new SpinedHides( hides ) ); else if ( HideType == HideType.Horned ) corpse.DropItem( new HornedHides( hides ) ); else if ( HideType == HideType.Barbed ) corpse.DropItem( new BarbedHides( hides ) ); from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse. } } if ( scales != 0 ) { ScaleType sc = this.ScaleType; switch ( sc ) { case ScaleType.Red: corpse.AddCarvedItem( new RedScales( scales ), from ); break; case ScaleType.Yellow: corpse.AddCarvedItem( new YellowScales( scales ), from ); break; case ScaleType.Black: corpse.AddCarvedItem( new BlackScales( scales ), from ); break; case ScaleType.Green: corpse.AddCarvedItem( new GreenScales( scales ), from ); break; case ScaleType.White: corpse.AddCarvedItem( new WhiteScales( scales ), from ); break; case ScaleType.Blue: corpse.AddCarvedItem( new BlueScales( scales ), from ); break; case ScaleType.All: { corpse.AddCarvedItem( new RedScales( scales ), from ); corpse.AddCarvedItem( new YellowScales( scales ), from ); corpse.AddCarvedItem( new BlackScales( scales ), from ); corpse.AddCarvedItem( new GreenScales( scales ), from ); corpse.AddCarvedItem( new WhiteScales( scales ), from ); corpse.AddCarvedItem( new BlueScales( scales ), from ); break; } } from.SendMessage( "You cut away some scales, but they remain on the corpse." ); } corpse.Carved = true; if ( corpse.IsCriminalAction( from ) ) from.CriminalAction( true ); } }
public virtual void OnCarve( Mobile from, Corpse corpse, bool butcher ) { int feathers = Feathers; int wool = Wool; int meat = Meat; int hides = Hides; int scales = Scales; int blood = Blood; int fur = Fur; if ( ( feathers == 0 && wool == 0 && meat == 0 && hides == 0 && scales == 0 && blood == 0 && fur == 0 ) || Summoned || IsBonded ) { from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse. } else { if ( from.Race == Race.Human ) hides = (int) Math.Ceiling( hides * 1.1 ); // 10% Bonus Only applies to Hides, Ore & Logs if ( corpse.Map == Map.Felucca ) { feathers *= 2; wool *= 2; meat *= 2; hides *= 2; scales *= 2; blood *= 2; fur *= 2; } new Blood( 0x122D ).MoveToWorld( corpse.Location, corpse.Map ); if ( feathers != 0 ) { corpse.AddCarvedItem( new Feather( feathers ), from ); from.SendLocalizedMessage( 500479 ); // You pluck the bird. The feathers are now on the corpse. } if ( wool != 0 ) { corpse.AddCarvedItem( new Wool( wool ), from ); from.SendLocalizedMessage( 500483 ); // You shear it, and the wool is now on the corpse. } if ( meat != 0 ) { if ( MeatType == MeatType.Ribs ) corpse.AddCarvedItem( new RawRibs( meat ), from ); else if ( MeatType == MeatType.Bird ) corpse.AddCarvedItem( new RawBird( meat ), from ); else if ( MeatType == MeatType.LambLeg ) corpse.AddCarvedItem( new RawLambLeg( meat ), from ); else if ( MeatType == MeatType.Rotworm ) corpse.AddCarvedItem( new RawRotwormMeat( meat ), from ); from.SendLocalizedMessage( 500467 ); // You carve some meat, which remains on the corpse. } if ( hides != 0 ) { if ( butcher ) { Item item = null; if ( HideType == HideType.Regular ) item = new Leather( hides ); else if ( HideType == HideType.Spined ) item = new SpinedLeather( hides ); else if ( HideType == HideType.Horned ) item = new HornedLeather( hides ); else if ( HideType == HideType.Barbed ) item = new BarbedLeather( hides ); if ( item != null ) { if ( from.AddToBackpack( item ) ) { from.SendLocalizedMessage( 1073555 ); // You skin it and place the cut-up hides in your backpack. } else { corpse.AddCarvedItem( item, from ); from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse. } } } else { if ( HideType == HideType.Regular ) corpse.AddCarvedItem( new Hides( hides ), from ); else if ( HideType == HideType.Spined ) corpse.AddCarvedItem( new SpinedHides( hides ), from ); else if ( HideType == HideType.Horned ) corpse.AddCarvedItem( new HornedHides( hides ), from ); else if ( HideType == HideType.Barbed ) corpse.AddCarvedItem( new BarbedHides( hides ), from ); from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse. } } if ( scales != 0 ) { ScaleType sc = this.ScaleType; switch ( sc ) { case ScaleType.Red: corpse.AddCarvedItem( new RedScales( scales ), from ); break; case ScaleType.Yellow: corpse.AddCarvedItem( new YellowScales( scales ), from ); break; case ScaleType.Black: corpse.AddCarvedItem( new BlackScales( scales ), from ); break; case ScaleType.Green: corpse.AddCarvedItem( new GreenScales( scales ), from ); break; case ScaleType.White: corpse.AddCarvedItem( new WhiteScales( scales ), from ); break; case ScaleType.Blue: corpse.AddCarvedItem( new BlueScales( scales ), from ); break; case ScaleType.All: { corpse.AddCarvedItem( new RedScales( scales ), from ); corpse.AddCarvedItem( new YellowScales( scales ), from ); corpse.AddCarvedItem( new BlackScales( scales ), from ); corpse.AddCarvedItem( new GreenScales( scales ), from ); corpse.AddCarvedItem( new WhiteScales( scales ), from ); corpse.AddCarvedItem( new BlueScales( scales ), from ); break; } } from.SendLocalizedMessage( 1079284 ); // You cut away some scales, but they remain on the corpse. } if ( blood != 0 ) { corpse.AddCarvedItem( new DragonsBlood( blood ), from ); from.SendLocalizedMessage( 1094946 ); // Some blood is left on the corpse. } if ( fur != 0 ) { if ( FurType == FurType.Green ) corpse.AddCarvedItem( new GreenFur( fur ), from ); else if ( FurType == FurType.Red ) corpse.AddCarvedItem( new RedFur( fur ), from ); else if ( FurType == FurType.Yellow ) corpse.AddCarvedItem( new YellowFur( fur ), from ); else if ( FurType == FurType.DarkGreen ) corpse.AddCarvedItem( new DarkGreenFur( fur ), from ); from.SendLocalizedMessage( 1112765 ); // You shear it, and the fur is now on the corpse. } corpse.Carved = true; if ( corpse.IsCriminalAction( from ) ) from.CriminalAction( true ); } }
public void Carve(Mobile from, Item item) { if (IsCriminalAction(from) && this.Map != null && (this.Map.Rules & MapRules.HarmfulRestrictions) != 0) { if (m_Owner == null || !m_Owner.Player) { from.SendLocalizedMessage(1005035); // You did not earn the right to loot this creature! } else { from.SendLocalizedMessage(1010049); // You may not loot this corpse. } return; } Mobile dead = m_Owner; string world = Server.Misc.Worlds.GetMyWorld(from.Map, from.Location, from.X, from.Y); bool HumanLands = false; if (world == "the Bottle World of Kuldar" || world == "the Land of Sosaria") { HumanLands = true; } if (GetFlag(CorpseFlag.Carved) || dead == null) { from.SendLocalizedMessage(500485); // You see nothing useful to carve from the corpse. } else if (((Body)Amount).IsHuman && ItemID == 0x2006 && ( // DON'T WANT TO CARVE ORKS AND ELVES dead is EvilMage || dead is EvilMageLord || dead is Brigand || dead is Executioner || dead is Savage || dead is SavageRider || dead is Bandit || dead is Mangar || dead is ZuluuNative || dead is ZuluuArcher || dead is NativeWitchDoctor || dead is NativeArcher || dead is Native || dead is Rogue || dead is ZuluuWitchDoctor || dead is PirateLand || dead is PirateCrew || dead is Monks || dead is PirateCaptain || dead is EvilSailorArcher || dead is EvilSailorWizard || dead is Minstrel || dead is EvilSailorMinstrel || dead is SailorArcher || dead is SailorWizard || dead is Berserker || dead is SailorMinstrel || dead is BlackKnight || dead is BloodAssassin || dead is Archmage || dead is BombWorshipper || dead is Psionicist || dead is SavageAlien || (HumanLands == true && dead is BaseVendor) || (HumanLands == true && dead is BaseHealer) || (HumanLands == true && dead is BasePerson) )) { new Blood(0x122D).MoveToWorld(Location, Map); Corpse bodyBag = (Corpse)this; bodyBag.AddCarvedItem(new Torso(), from); bodyBag.AddCarvedItem(new LeftLeg(), from); bodyBag.AddCarvedItem(new LeftArm(), from); bodyBag.AddCarvedItem(new RightLeg(), from); bodyBag.AddCarvedItem(new RightArm(), from); bodyBag.AddCarvedItem(new TastyHeart(dead.Name), from); string myWork = ""; bool CriminalCarve = true; if (m_CorpseName != null && m_CorpseName != "") { if (m_CorpseName.Contains(" the assassin")) { myWork = "Assassin"; dead.Name = (dead.Name).Replace(" the assassin", ""); CriminalCarve = false; } else if (m_CorpseName.Contains(" the thief")) { myWork = "Thief"; dead.Name = (dead.Name).Replace(" the thief", ""); CriminalCarve = false; } else if (m_CorpseName.Contains(" the pirate")) { myWork = "Pirate"; dead.Name = (dead.Name).Replace(" the pirate", ""); CriminalCarve = false; } else if (m_CorpseName.Contains(" the bandit")) { myWork = "Bandit"; dead.Name = (dead.Name).Replace(" the bandit", ""); CriminalCarve = false; } else if (m_CorpseName.Contains(" the brigand")) { myWork = "Brigand"; dead.Name = (dead.Name).Replace(" the brigand", ""); CriminalCarve = false; } } if (CriminalCarve == true) { if (IsCriminalAction(from)) { from.CriminalAction(true); } Misc.Titles.AwardKarma(from, -50, true); } Head head = new Head(dead.Name); if (myWork != "") { head.m_Job = myWork; } bodyBag.AddCarvedItem(head, from); SetFlag(CorpseFlag.Carved, true); ProcessDelta(); SendRemovePacket(); ItemID = Utility.Random(0xECA, 9); // bone graphic Hue = 0; ProcessDelta(); } else if ( dead is ElfEvilSailorMinstrel || dead is ElfEvilSailorArcher || dead is ElfEvilSailorWizard || dead is ElfPirateCaptain || dead is ElfPirateCrew || dead is OrkRogue || dead is ElfRogue ) { string myWork = ""; if (m_CorpseName != null && m_CorpseName != "") { if (m_CorpseName.Contains(" the assassin")) { myWork = "Assassin"; dead.Name = (dead.Name).Replace(" the assassin", ""); } else if (m_CorpseName.Contains(" the thief")) { myWork = "Thief"; dead.Name = (dead.Name).Replace(" the thief", ""); } else if (m_CorpseName.Contains(" the pirate")) { myWork = "Pirate"; dead.Name = (dead.Name).Replace(" the pirate", ""); } else if (m_CorpseName.Contains(" the bandit")) { myWork = "Bandit"; dead.Name = (dead.Name).Replace(" the bandit", ""); } else if (m_CorpseName.Contains(" the brigand")) { myWork = "Brigand"; dead.Name = (dead.Name).Replace(" the brigand", ""); } } if (myWork != "") // ONLY ADD A HEAD FOR ORKS AND ELVES...ROGUES & PIRATES { Head head = new Head(dead.Name); head.Hue = dead.Hue; if (myWork != "") { head.m_Job = myWork; } Corpse bodyBag = (Corpse)this; bodyBag.AddCarvedItem(head, from); } ((BaseCreature)dead).OnCarve(from, this, item); } else if (dead is BaseCreature) { ((BaseCreature)dead).OnCarve(from, this, item); } else { from.SendLocalizedMessage(500485); // You see nothing useful to carve from the corpse. } }
public override void OnCarve(Mobile from, Corpse corpse, Item with) { base.OnCarve(from, corpse, with); if (!GatheredFur) { from.SendLocalizedMessage(1112765); // You shear it, and the fur is now on the corpse. corpse.AddCarvedItem(new BouraFur(15), from); GatheredFur = true; } }
public virtual void OnCarve( Mobile from, Corpse corpse, Item with ) { int feathers = Feathers; int wool = Wool; int meat = Meat; int hides = Hides; if ( ( feathers == 0 && wool == 0 && meat == 0 && hides == 0 ) || Summoned || IsBonded || corpse.Animated ) { if ( corpse.Animated ) corpse.SendLocalizedMessageTo( from, 500464 ); // Use this on corpses to carve away meat and hide else from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse. } else { if ( corpse.Map == Map.Felucca ) { feathers *= 2; wool *= 2; hides *= 2; } new Blood( 0x122D ).MoveToWorld( corpse.Location, corpse.Map ); if ( feathers != 0 ) { corpse.AddCarvedItem( new Feather( feathers ), from ); from.SendLocalizedMessage( 500479 ); // You pluck the bird. The feathers are now on the corpse. } if ( wool != 0 ) { corpse.AddCarvedItem( new TaintedWool( wool ), from ); from.SendLocalizedMessage( 500483 ); // You shear it, and the wool is now on the corpse. } if ( meat != 0 ) { if ( MeatType == MeatType.Ribs ) corpse.AddCarvedItem( new RawRibs( meat ), from ); else if ( MeatType == MeatType.Bird ) corpse.AddCarvedItem( new RawBird( meat ), from ); else if ( MeatType == MeatType.LambLeg ) corpse.AddCarvedItem( new RawLambLeg( meat ), from ); from.SendLocalizedMessage( 500467 ); // You carve some meat, which remains on the corpse. } if ( hides != 0 ) { Item holding = from.Weapon as Item; if ( false && ( holding is SkinningKnife /* TODO: || holding is ButcherWarCleaver || with is ButcherWarCleaver */ ) ) { Item leather = null; switch ( HideType ) { case HideType.Regular: leather = new Leather( hides ); break; case HideType.Spined: leather = new SpinedLeather( hides ); break; case HideType.Horned: leather = new HornedLeather( hides ); break; case HideType.Barbed: leather = new BarbedLeather( hides ); break; } if ( leather != null ) { if ( !from.PlaceInBackpack( leather ) ) { corpse.DropItem( leather ); from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse. } else { from.SendLocalizedMessage( 1073555 ); // You skin it and place the cut-up hides in your backpack. } } } else { if ( HideType == HideType.Regular ) corpse.DropItem( new Hides( hides ) ); else if ( HideType == HideType.Spined ) corpse.DropItem( new SpinedHides( hides ) ); else if ( HideType == HideType.Horned ) corpse.DropItem( new HornedHides( hides ) ); else if ( HideType == HideType.Barbed ) corpse.DropItem( new BarbedHides( hides ) ); from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse. } } corpse.Carved = true; if ( corpse.IsCriminalAction( from ) ) from.CriminalAction( true ); } }