Core/Players: apply feedback from 554eb584b0

This commit is contained in:
Ovahlord committed 2022-12-08 19:49:24 +01:00
1 parent d27fc92558
commit 39a2a0c80b
1 file changed
+1 -4
+1 -4
View File
@@ -6756,10 +6756,7 @@ void Player::ModifyCurrency(uint32 currencyId, int32 amount, bool supressChatLog
PlayerCurrency* playerCurrency = nullptr;
PlayerCurrenciesMap::iterator itr = _currencyStorage.find(currencyId);
if (itr == _currencyStorage.end())
{
_currencyStorage.insert(PlayerCurrenciesMap::value_type(currencyId, PlayerCurrency()));
itr = _currencyStorage.find(currencyId);
}
itr = _currencyStorage.insert(PlayerCurrenciesMap::value_type(currencyId, PlayerCurrency())).first;
playerCurrency = &itr->second;