Fix: Double imaginite issue resolved on mini survival games (#1801)

* Add checkcost as replacement for just inventory checks

* Create headers for cost methods

* clean comments
This commit is contained in:
ElectScholar
2025-05-23 03:42:39 +00:00
committed by GitHub
parent 32487dcd5f
commit 34665f6f5c
2 changed files with 20 additions and 5 deletions

View File

@@ -234,10 +234,17 @@ public:
*/
bool IsPlayedBy(LWOOBJID playerID) const;
/**
* Checks if the entity has enough cost to play this activity
* @param player the entity to check
* @return true if the entity has enough cost to play this activity, false otherwise
*/
bool CheckCost(Entity* player) const;
/**
* Removes the cost of the activity (e.g. green imaginate) for the entity that plays this activity
* @param player the entity to take cost for
* @return true if the cost was successfully deducted, false otherwise
* @return true if the cost was taken, false otherwise
*/
bool TakeCost(Entity* player) const;