Skip to content

Commit f16662f

Browse files
github-actions[bot]murilo09
authored andcommitted
Code format - (Clang-format)
1 parent fef5579 commit f16662f

File tree

7 files changed

+30
-45
lines changed

7 files changed

+30
-45
lines changed

src/creatures/players/player.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8256,7 +8256,7 @@ BidErrorMessage Player::canBidHouse(uint32_t houseId) {
82568256
}
82578257

82588258
if (house->isGuildhall()) {
8259-
if (getGuildRank() && getGuildRank()->level != 3) {
8259+
if (getGuildRank() && getGuildRank()->level != 3) {
82608260
return BidErrorMessage::Guildhall;
82618261
}
82628262

@@ -8266,4 +8266,4 @@ BidErrorMessage Player::canBidHouse(uint32_t houseId) {
82668266
}
82678267

82688268
return BidErrorMessage::NoError;
8269-
}
8269+
}

src/enums/player_cyclopedia.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ enum class BidErrorMessage : uint8_t {
8080
NotEnoughMoney = 17,
8181
NotEnoughGuildMoney = 21,
8282
Internal = 24,
83-
};
83+
};

src/game/game.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10242,7 +10242,7 @@ bool Game::removeFiendishMonster(uint32_t id, bool create /* = true*/) {
1024210242

1024310243
void Game::updateForgeableMonsters() {
1024410244
if (auto influencedLimit = g_configManager().getNumber(FORGE_INFLUENCED_CREATURES_LIMIT, __FUNCTION__);
10245-
forgeableMonsters.size() < influencedLimit * 2) {
10245+
forgeableMonsters.size() < influencedLimit * 2) {
1024610246
forgeableMonsters.clear();
1024710247
for (const auto &[monsterId, monster] : monsters) {
1024810248
auto monsterTile = monster->getTile();
@@ -10748,10 +10748,10 @@ void Game::playerCyclopediaHousesByTown(uint32_t playerId, const std::string tow
1074810748

1074910749
HouseMap houses;
1075010750
if (!townName.empty()) {
10751-
const auto& housesList = g_game().map.houses.getHouses();
10752-
for (const auto& it : housesList) {
10753-
const auto& house = it.second;
10754-
const auto& town = g_game().map.towns.getTown(house->getTownId());
10751+
const auto &housesList = g_game().map.houses.getHouses();
10752+
for (const auto &it : housesList) {
10753+
const auto &house = it.second;
10754+
const auto &town = g_game().map.towns.getTown(house->getTownId());
1075510755
if (!town) {
1075610756
return;
1075710757
}
@@ -10802,7 +10802,7 @@ void Game::playerCyclopediaHouseBid(uint32_t playerId, uint32_t houseId, uint64_
1080210802
ret = BidErrorMessage::NotEnoughMoney;
1080310803
auto retSuccess = BidSuccessMessage::BidSuccess;
1080410804

10805-
if(house->getBidderName().empty()) {
10805+
if (house->getBidderName().empty()) {
1080610806
if (!processBankAuction(player, house, bidValue)) {
1080710807
player->sendHouseAuctionMessage(houseId, HouseAuctionType::Bid, enumToValue(ret));
1080810808
return;
@@ -10835,7 +10835,7 @@ void Game::playerCyclopediaHouseBid(uint32_t playerId, uint32_t houseId, uint64_
1083510835
house->setBidder(player->getGUID());
1083610836
}
1083710837

10838-
const auto& town = g_game().map.towns.getTown(house->getTownId());
10838+
const auto &town = g_game().map.towns.getTown(house->getTownId());
1083910839
if (!town) {
1084010840
return;
1084110841
}

src/io/iomapserialize.cpp

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -363,22 +363,7 @@ bool IOMapSerialize::SaveHouseInfoGuard() {
363363
houseUpdate.upsert({ "owner", "paid", "warnings", "name", "town_id", "rent", "size", "beds", "bidder", "bidder_name", "highest_bid", "internal_bid", "bid_end_date", "state" });
364364

365365
for (const auto &[key, house] : g_game().map.houses.getHouses()) {
366-
std::string values = fmt::format("{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}",
367-
house->getId(),
368-
house->getOwner(),
369-
house->getPaidUntil(),
370-
house->getPayRentWarnings(),
371-
db.escapeString(house->getName()),
372-
house->getTownId(), house->getRent(),
373-
house->getSize(),
374-
house->getBedCount(),
375-
house->getBidder(),
376-
db.escapeString(house->getBidderName()),
377-
house->getHighestBid(),
378-
house->getInternalBid(),
379-
house->getBidEndDate(),
380-
house->getState()
381-
);
366+
std::string values = fmt::format("{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}", house->getId(), house->getOwner(), house->getPaidUntil(), house->getPayRentWarnings(), db.escapeString(house->getName()), house->getTownId(), house->getRent(), house->getSize(), house->getBedCount(), house->getBidder(), db.escapeString(house->getBidderName()), house->getHighestBid(), house->getInternalBid(), house->getBidEndDate(), house->getState());
382367

383368
if (!houseUpdate.addRow(values)) {
384369
return false;

src/map/house/house.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -482,11 +482,11 @@ void House::resetTransferItem() {
482482
}
483483

484484
void House::calculateBidEndDate(uint8_t daysToEnd) {
485-
auto currentTimeMs = std::chrono::system_clock::now().time_since_epoch();
486-
487-
std::chrono::system_clock::time_point now = std::chrono::system_clock::time_point(
488-
std::chrono::duration_cast<std::chrono::milliseconds>(currentTimeMs)
489-
);
485+
auto currentTimeMs = std::chrono::system_clock::now().time_since_epoch();
486+
487+
std::chrono::system_clock::time_point now = std::chrono::system_clock::time_point(
488+
std::chrono::duration_cast<std::chrono::milliseconds>(currentTimeMs)
489+
);
490490

491491
// Truncate to whole days since epoch
492492
days daysSinceEpoch = std::chrono::duration_cast<days>(now.time_since_epoch());
@@ -784,13 +784,13 @@ std::shared_ptr<House> Houses::getHouseByBidderName(std::string bidderName) {
784784
}
785785

786786
uint16_t Houses::getHouseCountByAccount(uint32_t accountId) {
787-
uint16_t count = 0;
788-
for (const auto& it : houseMap) {
789-
if (it.second->getOwnerAccountId() == accountId) {
790-
++count;
791-
}
792-
}
793-
return count;
787+
uint16_t count = 0;
788+
for (const auto &it : houseMap) {
789+
if (it.second->getOwnerAccountId() == accountId) {
790+
++count;
791+
}
792+
}
793+
return count;
794794
}
795795

796796
bool Houses::loadHousesXML(const std::string &filename) {

src/server/network/protocol/protocolgame.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9261,7 +9261,7 @@ void ProtocolGame::sendTakeScreenshot(Screenshot_t screenshotType) {
92619261
writeToOutputBuffer(msg);
92629262
}
92639263

9264-
void ProtocolGame::parseCyclopediaHouseAuction(NetworkMessage& msg) {
9264+
void ProtocolGame::parseCyclopediaHouseAuction(NetworkMessage &msg) {
92659265
if (oldProtocol) {
92669266
return;
92679267
}
@@ -9295,9 +9295,9 @@ void ProtocolGame::sendCyclopediaHouseList(HouseMap houses) {
92959295
NetworkMessage msg;
92969296
msg.addByte(0xC7);
92979297
msg.add<uint16_t>(houses.size());
9298-
for (const auto& house : houses) {
9298+
for (const auto &house : houses) {
92999299
const auto clientId = house.first;
9300-
const auto& houseData = house.second;
9300+
const auto &houseData = house.second;
93019301

93029302
msg.add<uint32_t>(clientId);
93039303
msg.addByte(0x01); // 0x00 = Renovation; 0x01 = Available
@@ -9375,11 +9375,11 @@ void ProtocolGame::sendHousesInfo() {
93759375
msg.addByte(0x01);
93769376
msg.add<uint32_t>(houseClientId);
93779377

9378-
const auto& housesList = g_game().map.houses.getHouses();
9378+
const auto &housesList = g_game().map.houses.getHouses();
93799379
msg.add<uint16_t>(housesList.size());
9380-
for (const auto& it : housesList) {
9380+
for (const auto &it : housesList) {
93819381
msg.add<uint32_t>(it.second->getClientId());
93829382
}
93839383

93849384
writeToOutputBuffer(msg);
9385-
}
9385+
}

src/server/network/protocol/protocolgame.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ class ProtocolGame final : public Protocol {
331331
void sendCyclopediaCharacterTitles();
332332

333333
void sendHousesInfo();
334-
void parseCyclopediaHouseAuction(NetworkMessage& msg);
334+
void parseCyclopediaHouseAuction(NetworkMessage &msg);
335335
void sendCyclopediaHouseList(HouseMap houses);
336336
void sendHouseAuctionMessage(uint32_t houseId, HouseAuctionType type, uint8_t index, bool bidSuccess);
337337

0 commit comments

Comments
 (0)