Skip to content

Commit

Permalink
dw cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Joelrau committed Aug 10, 2024
1 parent 391fd83 commit e2a766b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
14 changes: 1 addition & 13 deletions src/client/game/demonware/loot/loot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ namespace demonware
case 70005: // ZombieRareCardPack
return get_random_loot_ZombieRareCardPack();
default:
printf("[DW]: Missing LootCrate logic for %d, using CommonCrate\n", lootbox_id);
printf("[DW]: Missing LootCrate logic for %d\n", lootbox_id);
return {};
}
}
Expand Down Expand Up @@ -539,18 +539,6 @@ namespace demonware
field = value;
}

template <typename T> void json_add(nlohmann::json& field, T value)
{
if (!field.is_null())
{
field = field.get<T>();
}
else
{
field = value;
}
}

template <typename T> T json_read(nlohmann::json& field)
{
if (!field.is_null())
Expand Down
5 changes: 0 additions & 5 deletions src/client/game/demonware/reply.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,6 @@ namespace demonware
this->objects_.emplace_back(std::move(object));
}

void set_error(uint32_t err)
{
this->error_ = err;
}

private:
uint8_t type_;
uint32_t error_;
Expand Down
7 changes: 4 additions & 3 deletions src/client/game/demonware/services/bdReward.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ namespace demonware
buffer->read_uint16(&numEvents);
buffer->read_int32(&rewardEventType); // none 0, json 1

assert(rewardEventType == 1);
assert(numEvents == 1);

buffer->read_string(&json_buffer);
Expand Down Expand Up @@ -205,7 +206,7 @@ namespace demonware

send(json_reply);
}
else if (action == "StartMission")
/*else if (action == "StartMission")
{
printf("%s\n", json_buffer.data());
//const auto match_id = json["MatchId"].get<int>();
Expand All @@ -227,10 +228,10 @@ namespace demonware
else if (action == "ResetMissions")
{
printf("%s\n", json_buffer.data());
}
}*/
else
{
printf("[DW]: unhandled reward action \"%s\"...\n", action.data());
//printf("[DW]: unhandled reward action \"%s\"...\n", action.data());
}

server->create_reply(this->task_id(), BD_NO_ERROR).send();
Expand Down

0 comments on commit e2a766b

Please sign in to comment.