Battlegrounds/Buffs: Rework using areatriggers

Port From (https://github.com/TrinityCore/TrinityCore/commit/f5461a1161a5a9dfabe7a142ad84f8c900776c92)
This commit is contained in:
hondacrx
2023-09-12 15:52:46 -04:00
parent 6f387e563f
commit 543411beec
4 changed files with 44 additions and 74 deletions
+3 -3
View File
@@ -1683,7 +1683,7 @@ namespace Game.Entities
return searcher.GetTarget();
}
GameObject FindNearestGameObjectWithOptions(float range, FindGameObjectOptions options)
public GameObject FindNearestGameObjectWithOptions(float range, FindGameObjectOptions options)
{
NearestCheckCustomizer checkCustomizer = new(this, range);
GameObjectWithOptionsInObjectRangeCheck<NearestCheckCustomizer> checker = new(this, checkCustomizer, options);
@@ -4062,13 +4062,13 @@ namespace Game.Entities
public ObjectGuid? PrivateObjectOwnerGuid;
}
class FindGameObjectOptions
public class FindGameObjectOptions
{
public uint? GameObjectId;
public string StringId;
public bool? IsSummon;
public bool? IsSpawned;
public bool? IsSpawned = true; // most searches should be for spawned objects only, to search for "any" just clear this field at call site
public bool IgnorePhases;
public bool IgnoreNotOwnedPrivateObjects = true;