mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-04-27 17:16:31 +00:00
Update DestroyableComponent.cpp
This commit is contained in:
parent
19be0a61b2
commit
203a150a56
@ -764,9 +764,8 @@ void DestroyableComponent::Smash(const LWOOBJID source, const eKillType killType
|
|||||||
if (dZoneManager::Instance()->GetPlayerLoseCoinOnDeath()) {
|
if (dZoneManager::Instance()->GetPlayerLoseCoinOnDeath()) {
|
||||||
auto* character = m_Parent->GetCharacter();
|
auto* character = m_Parent->GetCharacter();
|
||||||
uint64_t coinsTotal = character->GetCoins();
|
uint64_t coinsTotal = character->GetCoins();
|
||||||
|
const uint64_t minCoinsToLose = dZoneManager::Instance()->GetWorldConfig()->coinsLostOnDeathMin;
|
||||||
if (coinsTotal > 0) {
|
if (coinsTotal >= minCoinsToLose) {
|
||||||
const uint64_t minCoinsToLose = dZoneManager::Instance()->GetWorldConfig()->coinsLostOnDeathMin;
|
|
||||||
const uint64_t maxCoinsToLose = dZoneManager::Instance()->GetWorldConfig()->coinsLostOnDeathMax;
|
const uint64_t maxCoinsToLose = dZoneManager::Instance()->GetWorldConfig()->coinsLostOnDeathMax;
|
||||||
const float coinPercentageToLose = dZoneManager::Instance()->GetWorldConfig()->coinsLostOnDeathPercent;
|
const float coinPercentageToLose = dZoneManager::Instance()->GetWorldConfig()->coinsLostOnDeathPercent;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user