diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index fcf83ccdecb..0b54f3f0bac 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -9,6 +9,7 @@ #include "creatures/players/player.hpp" +#include "account/account.hpp" #include "config/configmanager.hpp" #include "core.hpp" #include "creatures/appearance/mounts/mounts.hpp" @@ -1773,8 +1774,8 @@ std::shared_ptr Player::getDepotLocker(uint32_t depotId) { depotLocker->internalAddThing(marketItem); depotLocker->internalAddThing(inbox); if (createSupplyStash) { - const auto &supplyStash = Item::CreateItem(ITEM_SUPPLY_STASH); - depotLocker->internalAddThing(supplyStash); + const auto &supplyStashPtr = Item::CreateItem(ITEM_SUPPLY_STASH); + depotLocker->internalAddThing(supplyStashPtr); } const auto &depotChest = Item::CreateItemAsContainer(ITEM_DEPOT, static_cast(g_configManager().getNumber(DEPOT_BOXES))); for (uint32_t i = g_configManager().getNumber(DEPOT_BOXES); i > 0; i--) { diff --git a/src/creatures/players/vip/player_vip.cpp b/src/creatures/players/vip/player_vip.cpp index 195480ca5fd..8a64aebcf85 100644 --- a/src/creatures/players/vip/player_vip.cpp +++ b/src/creatures/players/vip/player_vip.cpp @@ -9,6 +9,7 @@ #include "creatures/players/vip/player_vip.hpp" +#include "account/account.hpp" #include "creatures/players/grouping/groups.hpp" #include "creatures/players/player.hpp" #include "io/iologindata.hpp" diff --git a/src/game/scheduling/save_manager.cpp b/src/game/scheduling/save_manager.cpp index 9cccc4052a7..45cd9392194 100644 --- a/src/game/scheduling/save_manager.cpp +++ b/src/game/scheduling/save_manager.cpp @@ -16,6 +16,7 @@ #include "io/iologindata.hpp" #include "kv/kv.hpp" #include "lib/di/container.hpp" +#include "creatures/players/player.hpp" SaveManager::SaveManager(ThreadPool &threadPool, KVStore &kvStore, Logger &logger, Game &game) : threadPool(threadPool), kv(kvStore), logger(logger), game(game) { } diff --git a/src/io/functions/iologindata_load_player.cpp b/src/io/functions/iologindata_load_player.cpp index 477572dfbc8..7cb08a7b9a6 100644 --- a/src/io/functions/iologindata_load_player.cpp +++ b/src/io/functions/iologindata_load_player.cpp @@ -9,8 +9,10 @@ #include "io/functions/iologindata_load_player.hpp" +#include "account/account.hpp" #include "config/configmanager.hpp" #include "creatures/combat/condition.hpp" +#include "database/database.hpp" #include "creatures/monsters/monsters.hpp" #include "creatures/players/achievement/player_achievement.hpp" #include "creatures/players/cyclopedia/player_badge.hpp" @@ -29,6 +31,7 @@ #include "items/containers/inbox/inbox.hpp" #include "items/containers/rewards/reward.hpp" #include "items/containers/rewards/rewardchest.hpp" +#include "creatures/players/player.hpp" #include "utils/tools.hpp" void IOLoginDataLoad::loadItems(ItemsMap &itemsMap, const DBResult_ptr &result, const std::shared_ptr &player) { diff --git a/src/io/functions/iologindata_load_player.hpp b/src/io/functions/iologindata_load_player.hpp index 2d1a4305cf3..ca05bdcb1b8 100644 --- a/src/io/functions/iologindata_load_player.hpp +++ b/src/io/functions/iologindata_load_player.hpp @@ -11,6 +11,10 @@ #include "io/iologindata.hpp" +class Player; +class DBResult; +using DBResult_ptr = std::shared_ptr; + class IOLoginDataLoad : public IOLoginData { public: static bool loadPlayerBasicInfo(const std::shared_ptr &player, const DBResult_ptr &result); diff --git a/src/io/functions/iologindata_save_player.cpp b/src/io/functions/iologindata_save_player.cpp index b38e6e2b84c..613fdac1cb0 100644 --- a/src/io/functions/iologindata_save_player.cpp +++ b/src/io/functions/iologindata_save_player.cpp @@ -17,6 +17,7 @@ #include "items/containers/depot/depotchest.hpp" #include "items/containers/inbox/inbox.hpp" #include "items/containers/rewards/reward.hpp" +#include "creatures/players/player.hpp" bool IOLoginDataSave::saveItems(const std::shared_ptr &player, const ItemBlockList &itemList, DBInsert &query_insert, PropWriteStream &propWriteStream) { if (!player) { diff --git a/src/io/functions/iologindata_save_player.hpp b/src/io/functions/iologindata_save_player.hpp index abafc2c186a..1f871a3b5db 100644 --- a/src/io/functions/iologindata_save_player.hpp +++ b/src/io/functions/iologindata_save_player.hpp @@ -12,6 +12,7 @@ #include "io/iologindata.hpp" class PropWriteStream; +class DBInsert; class IOLoginDataSave : public IOLoginData { public: diff --git a/src/io/iologindata.cpp b/src/io/iologindata.cpp index 0249d70a517..c0a6a13f363 100644 --- a/src/io/iologindata.cpp +++ b/src/io/iologindata.cpp @@ -9,12 +9,15 @@ #include "io/iologindata.hpp" +#include "account/account.hpp" #include "config/configmanager.hpp" +#include "database/database.hpp" #include "io/functions/iologindata_load_player.hpp" #include "io/functions/iologindata_save_player.hpp" #include "game/game.hpp" #include "creatures/monsters/monster.hpp" #include "creatures/players/wheel/player_wheel.hpp" +#include "creatures/players/player.hpp" #include "lib/metrics/metrics.hpp" #include "enums/account_type.hpp" #include "enums/account_errors.hpp" diff --git a/src/io/iologindata.hpp b/src/io/iologindata.hpp index 29eac0c812f..d379031cd55 100644 --- a/src/io/iologindata.hpp +++ b/src/io/iologindata.hpp @@ -9,9 +9,12 @@ #pragma once -#include "account/account.hpp" -#include "creatures/players/player.hpp" -#include "database/database.hpp" +class Player; +class Item; +class DBResult; + +struct VIPEntry; +struct VIPGroupEntry; using ItemBlockList = std::list>>; @@ -21,7 +24,7 @@ class IOLoginData { static uint8_t getAccountType(uint32_t accountId); static bool loadPlayerById(const std::shared_ptr &player, uint32_t id, bool disableIrrelevantInfo = true); static bool loadPlayerByName(const std::shared_ptr &player, const std::string &name, bool disableIrrelevantInfo = true); - static bool loadPlayer(const std::shared_ptr &player, const DBResult_ptr &result, bool disableIrrelevantInfo = false); + static bool loadPlayer(const std::shared_ptr &player, const std::shared_ptr &result, bool disableIrrelevantInfo = false); static bool savePlayer(const std::shared_ptr &player); static uint32_t getGuidByName(const std::string &name); static bool getGuidByNameEx(uint32_t &guid, bool &specialVip, std::string &name); diff --git a/src/io/iomarket.cpp b/src/io/iomarket.cpp index 3332ffab1c3..ff2f9595d46 100644 --- a/src/io/iomarket.cpp +++ b/src/io/iomarket.cpp @@ -16,6 +16,7 @@ #include "game/scheduling/save_manager.hpp" #include "io/iologindata.hpp" #include "items/containers/inbox/inbox.hpp" +#include "creatures/players/player.hpp" uint8_t IOMarket::getTierFromDatabaseTable(const std::string &string) { auto tier = static_cast(std::atoi(string.c_str())); diff --git a/src/items/bed.cpp b/src/items/bed.cpp index 25e95318e74..527f052e2d0 100644 --- a/src/items/bed.cpp +++ b/src/items/bed.cpp @@ -16,6 +16,7 @@ #include "game/scheduling/save_manager.hpp" #include "io/iologindata.hpp" #include "server/network/protocol/protocolgame.hpp" +#include "creatures/players/player.hpp" BedItem::BedItem(uint16_t id) : Item(id) { diff --git a/src/lua/functions/creatures/player/player_functions.cpp b/src/lua/functions/creatures/player/player_functions.cpp index c4c2faa8cee..7ef2be62ca4 100644 --- a/src/lua/functions/creatures/player/player_functions.cpp +++ b/src/lua/functions/creatures/player/player_functions.cpp @@ -9,6 +9,7 @@ #include "lua/functions/creatures/player/player_functions.hpp" +#include "account/account.hpp" #include "creatures/appearance/mounts/mounts.hpp" #include "creatures/combat/spells.hpp" #include "creatures/creature.hpp" diff --git a/src/lua/functions/map/house_functions.cpp b/src/lua/functions/map/house_functions.cpp index 708b9233a3a..52ca752587b 100644 --- a/src/lua/functions/map/house_functions.cpp +++ b/src/lua/functions/map/house_functions.cpp @@ -15,6 +15,7 @@ #include "game/movement/position.hpp" #include "io/iologindata.hpp" #include "map/house/house.hpp" +#include "creatures/players/player.hpp" int HouseFunctions::luaHouseCreate(lua_State* L) { // House(id) diff --git a/src/map/house/house.cpp b/src/map/house/house.cpp index 334144cfbd1..f519e9a46c8 100644 --- a/src/map/house/house.cpp +++ b/src/map/house/house.cpp @@ -18,6 +18,7 @@ #include "items/containers/inbox/inbox.hpp" #include "lib/metrics/metrics.hpp" #include "utils/pugicast.hpp" +#include "creatures/players/player.hpp" House::House(uint32_t houseId) : id(houseId) { } diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index abb2316905d..15b435087bd 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -9,6 +9,7 @@ #include "server/network/protocol/protocolgame.hpp" +#include "account/account.hpp" #include "config/configmanager.hpp" #include "core.hpp" #include "creatures/appearance/mounts/mounts.hpp"