Core/Objects: Added GameObject type parameter to FindGameObjectOptions
Port From (https://github.com/TrinityCore/TrinityCore/commit/52102a6395bc6244bdcfa55e357425bd5c9aefc4)
This commit is contained in:
@@ -4088,5 +4088,6 @@ namespace Game.Entities
|
||||
|
||||
public ObjectGuid? OwnerGuid;
|
||||
public ObjectGuid? PrivateObjectOwnerGuid;
|
||||
public GameObjectTypes? GameObjectType;
|
||||
}
|
||||
}
|
||||
@@ -2525,6 +2525,9 @@ namespace Game.Maps
|
||||
if (_args.IgnoreNotOwnedPrivateObjects && !go.CheckPrivateObjectOwnerVisibility(_obj))
|
||||
return false;
|
||||
|
||||
if (_args.GameObjectType.HasValue && go.GetGoType() != _args.GameObjectType)
|
||||
return false;
|
||||
|
||||
_customizer.Update(go);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user