reformat some files after clang-format option change
This commit is contained in:
+1
-2
@@ -423,8 +423,7 @@ void ItemCreator::clear_item_if_restricted(ItemData& item) const {
|
|||||||
// Note: PSO GC doesn't check for 0x61 or 0x62 here since those items
|
// Note: PSO GC doesn't check for 0x61 or 0x62 here since those items
|
||||||
// (HP/Resurrection and TP/Resurrection) only exist on BB.
|
// (HP/Resurrection and TP/Resurrection) only exist on BB.
|
||||||
if (item.data1[0] == 1) {
|
if (item.data1[0] == 1) {
|
||||||
if ((item.data1[1] == 3) && (((item.data1[2] >= 0x33) && (item.data1[2] <= 0x38)) ||
|
if ((item.data1[1] == 3) && (((item.data1[2] >= 0x33) && (item.data1[2] <= 0x38)) || (item.data1[2] == 0x61) || (item.data1[2] == 0x62))) {
|
||||||
(item.data1[2] == 0x61) || (item.data1[2] == 0x62))) {
|
|
||||||
this->log.info("Restricted: restore items not allowed in Challenge mode");
|
this->log.info("Restricted: restore items not allowed in Challenge mode");
|
||||||
item.clear();
|
item.clear();
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-3
@@ -10,7 +10,10 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
License::License() : serial_number(0), privileges(0), ban_end_time(0) {}
|
License::License()
|
||||||
|
: serial_number(0),
|
||||||
|
privileges(0),
|
||||||
|
ban_end_time(0) {}
|
||||||
|
|
||||||
string License::str() const {
|
string License::str() const {
|
||||||
string ret = string_printf("License(serial_number=%" PRIu32, this->serial_number);
|
string ret = string_printf("License(serial_number=%" PRIu32, this->serial_number);
|
||||||
@@ -37,10 +40,13 @@ string License::str() const {
|
|||||||
return ret + ")";
|
return ret + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
LicenseManager::LicenseManager() : filename(""), autosave(false) {}
|
LicenseManager::LicenseManager()
|
||||||
|
: filename(""),
|
||||||
|
autosave(false) {}
|
||||||
|
|
||||||
LicenseManager::LicenseManager(const string& filename)
|
LicenseManager::LicenseManager(const string& filename)
|
||||||
: filename(filename), autosave(true) {
|
: filename(filename),
|
||||||
|
autosave(true) {
|
||||||
try {
|
try {
|
||||||
auto licenses = load_vector_file<License>(this->filename);
|
auto licenses = load_vector_file<License>(this->filename);
|
||||||
for (const auto& read_license : licenses) {
|
for (const auto& read_license : licenses) {
|
||||||
|
|||||||
+2
-2
@@ -214,8 +214,8 @@ void Lobby::move_client_to_lobby(
|
|||||||
dest_lobby->add_client(c, required_client_id);
|
dest_lobby->add_client(c, required_client_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
shared_ptr<Client> Lobby::find_client(const u16string* identifier,
|
shared_ptr<Client> Lobby::find_client(
|
||||||
uint64_t serial_number) {
|
const u16string* identifier, uint64_t serial_number) {
|
||||||
for (size_t x = 0; x < this->max_clients; x++) {
|
for (size_t x = 0; x < this->max_clients; x++) {
|
||||||
if (!this->clients[x]) {
|
if (!this->clients[x]) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
+1
-2
@@ -747,8 +747,7 @@ void ServerState::parse_config(shared_ptr<const JSONObject> config_json) {
|
|||||||
for (const auto& it : d.at("CardAuctionPool")->as_dict()) {
|
for (const auto& it : d.at("CardAuctionPool")->as_dict()) {
|
||||||
const auto& card_name = it.first;
|
const auto& card_name = it.first;
|
||||||
const auto& card_cfg_json = it.second->as_list();
|
const auto& card_cfg_json = it.second->as_list();
|
||||||
this->ep3_card_auction_pool.emplace(card_name, make_pair(
|
this->ep3_card_auction_pool.emplace(card_name, make_pair(card_cfg_json.at(0)->as_int(), card_cfg_json.at(1)->as_int()));
|
||||||
card_cfg_json.at(0)->as_int(), card_cfg_json.at(1)->as_int()));
|
|
||||||
}
|
}
|
||||||
} catch (const out_of_range&) {
|
} catch (const out_of_range&) {
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user