mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-02-28 13:49:48 +00:00
fix: imaginite on racing minigames and add null checks (#1958)
This commit is contained in:
@@ -325,9 +325,8 @@ bool ActivityComponent::CheckCost(Entity* player) const {
|
||||
}
|
||||
|
||||
bool ActivityComponent::TakeCost(Entity* player) const {
|
||||
|
||||
auto* inventoryComponent = player->GetComponent<InventoryComponent>();
|
||||
return CheckCost(player) && inventoryComponent->RemoveItem(m_ActivityInfo.optionalCostLOT, m_ActivityInfo.optionalCostCount, eInventoryType::ALL);
|
||||
return CheckCost(player) && inventoryComponent && inventoryComponent->RemoveItem(m_ActivityInfo.optionalCostLOT, m_ActivityInfo.optionalCostCount, eInventoryType::ALL);
|
||||
}
|
||||
|
||||
void ActivityComponent::PlayerReady(Entity* player, bool bReady) {
|
||||
|
||||
Reference in New Issue
Block a user