mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-21 21:17:25 +00:00
replace the other double cast
This commit is contained in:
parent
6427b097ab
commit
94e32a5773
@ -1658,9 +1658,10 @@ bool Entity::CanPickupCoins(uint64_t count) { // bool because we are returning w
|
||||
|
||||
void Entity::RegisterCoinDrop(uint64_t count) {
|
||||
if (!IsPlayer()) return;
|
||||
auto droppedcoins = static_cast<Player*>(this)->GetDroppedCoins();
|
||||
auto * player = static_cast<Player*>(this);
|
||||
auto droppedcoins = player->GetDroppedCoins();
|
||||
droppedcoins += count;
|
||||
static_cast<Player*>(this)->SetDroppedCoins(droppedcoins);
|
||||
player->SetDroppedCoins(droppedcoins);
|
||||
}
|
||||
|
||||
void Entity::AddChild(Entity* child) {
|
||||
|
Loading…
Reference in New Issue
Block a user