Skip to content

Commit

Permalink
Merge branch 'feature/cyclopedia' of https://github.com/elsongabriel/…
Browse files Browse the repository at this point in the history
…canary into feature/cyclopedia
  • Loading branch information
elsongabriel committed Jun 25, 2024
2 parents 0c93647 + 319d62d commit 14f6c21
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/creatures/players/cyclopedia/player_cyclopedia.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class PlayerCyclopedia {

Summary getSummary() {
return { getAmount(Summary_t::PREY_CARDS),
getAmount(Summary_t::INSTANT_REWARDS),
getAmount(Summary_t::HIRELINGS) };
getAmount(Summary_t::INSTANT_REWARDS),
getAmount(Summary_t::HIRELINGS) };
}

void loadSummaryData();
Expand Down
16 changes: 8 additions & 8 deletions src/server/network/protocol/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3965,12 +3965,12 @@ void ProtocolGame::sendCyclopediaCharacterStoreSummary() {
uint8_t preySlotsUnlocked = 0;
// Prey third slot unlocked
if (const auto &slotP = player->getPreySlotById(PreySlot_Three);
slotP && slotP->state != PreyDataState_Locked) {
slotP && slotP->state != PreyDataState_Locked) {
preySlotsUnlocked++;
}
// Task hunting third slot unlocked
if (const auto &slotH = player->getTaskHuntingSlotById(PreySlot_Three);
slotH && slotH->state != PreyTaskDataState_Locked) {
slotH && slotH->state != PreyTaskDataState_Locked) {
preySlotsUnlocked++;
}
msg.addByte(preySlotsUnlocked); // getPreySlotById + getTaskHuntingSlotById
Expand All @@ -3994,14 +3994,14 @@ void ProtocolGame::sendCyclopediaCharacterStoreSummary() {

/*std::vector<uint16_t> m_hOutfits;
for (const auto &it : g_game().getHirelingOutfits()) {
if (player->kv()->scoped("hireling-outfits")->get(it.second)) {
m_hOutfits.emplace_back(it.first);
g_logger().debug("outfit id: {}, name: {}", it.first, it.second);
}
if (player->kv()->scoped("hireling-outfits")->get(it.second)) {
m_hOutfits.emplace_back(it.first);
g_logger().debug("outfit id: {}, name: {}", it.first, it.second);
}
}
msg.addByte(m_hOutfits.size());
for (const auto &id : m_hOutfits) {
msg.addByte(0x01); // TODO need to get the correct id from hireling outfit
msg.addByte(0x01); // TODO need to get the correct id from hireling outfit
}*/
msg.addByte(0x00); // hireling outfit size

Expand Down Expand Up @@ -4108,7 +4108,7 @@ void ProtocolGame::sendCyclopediaCharacterInspection() {
// Prey description
for (uint8_t slotId = PreySlot_First; slotId <= PreySlot_Last; slotId++) {
if (const auto &slot = player->getPreySlotById(static_cast<PreySlot_t>(slotId));
slot && slot->isOccupied()) {
slot && slot->isOccupied()) {
playerDescriptionSize++;
std::string desc = fmt::format("Active Prey {}", slotId + 1);
msg.addString(desc, "ProtocolGame::sendCyclopediaCharacterInspection - active prey");
Expand Down

0 comments on commit 14f6c21

Please sign in to comment.