### THIS IS A BREAKING CHANGE IF YOU ARE ALREADY USING CODEGEN. IF YOUR WORLD HAS ERRORS LOADING PLEASE CONTACT ME ON DISCORD. ORE MIGHT FAIL TO LOAD. ### Changes * Fixes Components from addons not marking dirty * Code gens BaseAddonContainer * Code gens Ingots * Fixes code gen deserialization for Ore * Code gens dyetubs * Code gens reagents * Code gens tailor commodities * Code gens fish
48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
using System;
|
|
|
|
namespace Server.Items
|
|
{
|
|
[Serializable(1, false)]
|
|
public partial class BigFish : Item, ICarvable
|
|
{
|
|
[InvalidateProperties]
|
|
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
|
|
[SerializableField(0)]
|
|
private Mobile _fisher;
|
|
|
|
[Constructible]
|
|
public BigFish() : base(0x09CC)
|
|
{
|
|
// TODO: Find correct formula. max on OSI currently 200, OSI dev says it's not 200 as max, and ~ 1/1,000,000 chance to get highest
|
|
Weight = Utility.RandomMinMax(3, 200);
|
|
Hue = Utility.RandomBool() ? 0x847 : 0x58C;
|
|
}
|
|
|
|
public override int LabelNumber => 1041112; // a big fish
|
|
|
|
public void Carve(Mobile from, Item item)
|
|
{
|
|
ScissorHelper(from, new RawFishSteak(), Math.Max(16, (int)Weight) / 4, false);
|
|
}
|
|
|
|
public override void GetProperties(ObjectPropertyList list)
|
|
{
|
|
base.GetProperties(list);
|
|
|
|
if (Weight >= 20)
|
|
{
|
|
if (_fisher != null)
|
|
{
|
|
list.Add(1070857, _fisher.Name); // Caught by ~1_fisherman~
|
|
}
|
|
|
|
list.Add(1070858, ((int)Weight).ToString()); // ~1_weight~ stones
|
|
}
|
|
}
|
|
|
|
private void Deserialize(IGenericReader reader, int version)
|
|
{
|
|
Weight = Utility.RandomMinMax(3, 200);
|
|
}
|
|
}
|
|
}
|