- ServUO Version
- Publish 57
- Ultima Expansion
- Endless Journey
So been playing around with having items and weight in your backpack be scalable, weight based on strength, it works great I just have one issue with it I'm not sure how to solve. It doesn't change in real time, meaning when you gain stats the weight of the bag only changes when you move something or add something to the bag to update, is there a way this can be done on stat change?
C#:
public override int DefaultMaxWeight
{
get
{
if (Core.ML)
{
Mobile m = ParentEntity as Mobile;
if (m != null && m.Player && m.Backpack == this)
{
if (GetMultipliert() > 1)
return ((int)Math.Ceiling(Config.Get("CarryWeight.PlayerBackbackMax", 550) * GetMultipliert() / 10.0)) * 15;
return Config.Get("CarryWeight.PlayerBackbackMax", 550) + (int)(Config.Get("CarryWeight.CarryWeightPerStr", 3.5) * m.RawStr);
}
else
{
return base.DefaultMaxWeight;
}
}
else
{
return base.DefaultMaxWeight;
}
}
}