Skip to content

Commit

Permalink
improvements and fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel committed May 25, 2024
1 parent 8a5e581 commit 5beab64
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/creatures/players/cyclopedia/player_cyclopedia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,5 @@ void PlayerCyclopedia::insertValue(uint8_t type, uint16_t amount, const std::str
auto oldAmount = (it != result.end() ? it->second : 0);
auto newAmount = oldAmount + amount;
m_player.kv()->scoped("summary")->scoped(g_game().getSummaryKeyByType(type))->scoped(id)->set("amount", newAmount);
g_logger().debug("type: {}, id: {}, old amount: {}, added amount: {}, new amount: {}", type, id, oldAmount, amount, newAmount);
g_logger().debug("[{}] type: {}, id: {}, old amount: {}, added amount: {}, new amount: {}", __FUNCTION__, type, id, oldAmount, amount, newAmount);
}
1 change: 0 additions & 1 deletion src/lua/functions/creatures/player/player_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4374,7 +4374,6 @@ int PlayerFunctions::luaPlayerCreateTransactionSummary(lua_State* L) {
auto amount = getNumber<uint16_t>(L, 3, 1);
auto id = getString(L, 4, "");

g_logger().info("type: {}, amount: {}, id: {}", type, amount, id);
player->cyclopedia()->updateStoreSummary(type, amount, id);
pushBoolean(L, true);
return 1;
Expand Down
9 changes: 5 additions & 4 deletions src/server/network/protocol/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4024,10 +4024,11 @@ void ProtocolGame::sendCyclopediaCharacterStoreSummary() {
}
}
msg.addByte(m_hOutfits.size());
for (const auto &id : m_hOutfits) {
msg.add<uint16_t>(id - 2000);
// msg.addByte(id - 2000);
}
// for (const auto &id : m_hOutfits) {
// // msg.add<uint16_t>(id);
// msg.addByte(id);
// }
msg.addByte(0x00);

auto houseItems = player->cyclopedia()->getResult(static_cast<uint8_t>(Summary_t::HOUSE_ITEMS));
msg.add<uint16_t>(houseItems.size());
Expand Down

0 comments on commit 5beab64

Please sign in to comment.