fix: Fixes NPE from AddStatMod (#1252)

This commit is contained in:
Kamron Batman 2022-11-15 15:53:41 -08:00 committed by GitHub
parent 32c15f214b
commit ff79d3db40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8469,6 +8469,7 @@ public class Mobile : IHued, IComparable<Mobile>, ISpawnable, IObjectPropertyLis
return; return;
} }
_statMods ??= new List<StatMod>();
_statMods.Add(mod); _statMods.Add(mod);
Delta(MobileDelta.Stat | GetStatDelta(mod.Type)); Delta(MobileDelta.Stat | GetStatDelta(mod.Type));
CheckStatTimers(); CheckStatTimers();