fix: Fixes weight problem with dupe. Fixes mobile base weight. (#938)

This commit is contained in:
Kamron Batman 2022-02-18 22:11:57 -08:00 • committed by GitHub
parent 699478425f
commit 6593abf418
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 20 deletions

View file

@ -1872,7 +1872,7 @@ namespace Server
public static bool DisableDismountInWarmode { get; set; }
public static int BodyWeight { get; set; } = 14;
public static int BodyWeight { get; set; } = 11; // 11 + 3 for the backpack
[CommandProperty(AccessLevel.GameMaster)]
public IMount Mount
@ -4107,19 +4107,25 @@ namespace Server
switch (type)
{
default:
m_TotalGold += delta;
Delta(MobileDelta.Gold);
break;
{
m_TotalGold += delta;
Delta(MobileDelta.Gold);
break;
}
case TotalType.Items:
m_TotalItems += delta;
break;
{
m_TotalItems += delta;
break;
}
case TotalType.Weight:
m_TotalWeight += delta;
Delta(MobileDelta.Weight);
OnWeightChange(m_TotalWeight - delta);
break;
{
m_TotalWeight += delta;
Delta(MobileDelta.Weight);
OnWeightChange(m_TotalWeight - delta);
break;
}
}
}