fix: Fixes NPE with setting stats in-game (#1390)
This commit is contained in:
parent
5ce657a842
commit
fea7aef95f
1 changed files with 3 additions and 3 deletions
|
|
@ -1847,7 +1847,7 @@ public class Mobile : IHued, IComparable<Mobile>, ISpawnable, IObjectPropertyLis
|
||||||
get => Math.Clamp(m_Str + GetStatOffset(StatType.Str), 1, 65000);
|
get => Math.Clamp(m_Str + GetStatOffset(StatType.Str), 1, 65000);
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (_statMods.Count == 0)
|
if (_statMods == null || _statMods.Count == 0)
|
||||||
{
|
{
|
||||||
RawStr = value;
|
RawStr = value;
|
||||||
}
|
}
|
||||||
|
|
@ -1905,7 +1905,7 @@ public class Mobile : IHued, IComparable<Mobile>, ISpawnable, IObjectPropertyLis
|
||||||
get => Math.Clamp(m_Dex + GetStatOffset(StatType.Dex), 0, 65000);
|
get => Math.Clamp(m_Dex + GetStatOffset(StatType.Dex), 0, 65000);
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (_statMods.Count == 0)
|
if (_statMods == null || _statMods.Count == 0)
|
||||||
{
|
{
|
||||||
RawDex = value;
|
RawDex = value;
|
||||||
}
|
}
|
||||||
|
|
@ -1963,7 +1963,7 @@ public class Mobile : IHued, IComparable<Mobile>, ISpawnable, IObjectPropertyLis
|
||||||
get => Math.Clamp(m_Int + GetStatOffset(StatType.Int), 0, 65000);
|
get => Math.Clamp(m_Int + GetStatOffset(StatType.Int), 0, 65000);
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (_statMods.Count == 0)
|
if (_statMods == null || _statMods.Count == 0)
|
||||||
{
|
{
|
||||||
RawInt = value;
|
RawInt = value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue