Fix nullref exception in Notoriety, MobileNotoriety was being called with null master causing server crash,,, (#91)

This commit is contained in:
Reetus 2020-02-20 02:12:10 +08:00 committed by GitHub
parent 9fd8150131
commit d7f0227268
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -403,8 +403,8 @@ namespace Server.Misc
{
Mobile master = bc.GetMaster();
if (master != null && CheckAggressor(master.Aggressors, target) ||
MobileNotoriety(master, target) == Notoriety.CanBeAttacked || bcTarg != null)
if (master != null && (CheckAggressor(master.Aggressors, target) ||
MobileNotoriety(master, target) == Notoriety.CanBeAttacked || bcTarg != null))
return Notoriety.CanBeAttacked;
}