Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas authored Nov 13, 2024
1 parent 561343d commit e7bab9f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/server/network/protocol/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4373,8 +4373,8 @@ void ProtocolGame::sendBlessingWindow() {

// Start at "The Wisdom Of Solitude"
uint8_t blessCount = 0;
for (int i = 2; i <= 8; i++) {
if (player->hasBlessing(i)) {
for (auto bless : magic_enum::enum_values<Blessings>()) {
if (player->hasBlessing(enumToValue(bless))) {
blessCount++;
}
}
Expand Down Expand Up @@ -4422,8 +4422,11 @@ void ProtocolGame::sendBlessStatus() {

// Ignore Twist of Fate (Id 1)
uint8_t blessCount = 0;
for (int i = 2; i <= 8; i++) {
if (player->hasBlessing(i)) {
for (auto bless : magic_enum::enum_values<Blessings>()) {
if (bless == Blessings::TwistOfFate) {
continue;
}
if (player->hasBlessing(enumToValue(bless))) {
blessCount++;
}
}
Expand Down

0 comments on commit e7bab9f

Please sign in to comment.