Skip to content

Commit

Permalink
fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel committed Dec 17, 2023
1 parent 5f5064d commit b00d7b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions data-otservbr-global/npc/jeronimo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ local function creatureSayCallback(npc, creature, type, message)
npcHandler:setTopic("selected", {})
npcHandler:setTopic("outfit", {})
npcHandler:setTopic("mount", {})
return true
end

local descCharge = ""
Expand Down
8 changes: 3 additions & 5 deletions src/lua/functions/creatures/player/player_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2671,11 +2671,9 @@ int PlayerFunctions::luaPlayerUpdateTournamentCoins(lua_State* L) {
lua_pushnil(L);
return 1;
} else if (action == "remove" && player->account->removeCoins(account::CoinType::TOURNAMENT, amount) != account::ERROR_NO) {
if (player->account->removeCoins(account::CoinType::COIN, getNumber<uint32_t>(L, 2)) != account::ERROR_NO) {
reportErrorFunc(fmt::format("Failed to update (remove) {}", tournamentCoinName));
lua_pushnil(L);
return 1;
}
reportErrorFunc(fmt::format("Failed to update (remove) {}", tournamentCoinName));
lua_pushnil(L);
return 1;
}

if (player->getAccount()->save() != account::ERROR_NO) {
Expand Down

0 comments on commit b00d7b9

Please sign in to comment.