Class CastleHeartService
Service for managing and querying castle heart entities in the game.
public class CastleHeartService
- Inheritance
-
CastleHeartService
- Inherited Members
Constructors
CastleHeartService()
Initializes a new instance of the CastleHeartService class. Sets up the entity query for castle hearts with required components. VAMP Core will perform this method on startup.
public CastleHeartService()
Fields
CastleHeartQuery
Query for filtering castle heart entities.
public static EntityQuery CastleHeartQuery
Field Value
- EntityQuery
Methods
TryGetByID(NetworkId, out Entity)
Attempts to find a castle heart entity by its network ID.
public static bool TryGetByID(NetworkId castleId, out Entity castle)
Parameters
castleId
NetworkIdThe network ID of the castle to find.
castle
EntityWhen this method returns, contains the castle entity if found; otherwise, Entity.Null.
Returns
- bool
True if the castle was found; otherwise, false.
TryGetByOwnerUser(User, out Entity)
Attempts to find a castle heart entity owned by a specific user.
public static bool TryGetByOwnerUser(User user, out Entity castle)
Parameters
user
UserThe user whose castle heart should be found.
castle
EntityWhen this method returns, contains the castle entity if found; otherwise, Entity.Null.
Returns
- bool
True if the castle was found; otherwise, false.