Skip to content

Commit d13c445

Browse files
authored
improve: fix circular dependencies on weapons.hpp (#3094)
1 parent 4367cd1 commit d13c445

6 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/creatures/combat/combat.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "lua/callbacks/events_callbacks.hpp"
2828
#include "lua/creature/events.hpp"
2929
#include "map/spectators.hpp"
30+
#include "creatures/players/player.hpp"
3031

3132
int32_t Combat::getLevelFormula(const std::shared_ptr<Player> &player, const std::shared_ptr<Spell> &wheelSpell, const CombatDamage &damage) const {
3233
if (!player) {

src/items/weapons/weapons.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#include "creatures/combat/combat.hpp"
1414
#include "game/game.hpp"
1515
#include "lua/creature/events.hpp"
16-
1716
#include "lua/global/lua_variant.hpp"
17+
#include "creatures/players/player.hpp"
1818

1919
Weapons::Weapons() = default;
2020
Weapons::~Weapons() = default;

src/items/weapons/weapons.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#pragma once
1111

1212
#include "lua/scripts/luascript.hpp"
13-
#include "creatures/players/player.hpp"
1413
#include "lua/scripts/scripts.hpp"
1514
#include "creatures/combat/combat.hpp"
1615
#include "utils/utils_definitions.hpp"

src/lua/functions/core/game/game_functions.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "lua/functions/events/event_callback_functions.hpp"
2929
#include "lua/scripts/lua_environment.hpp"
3030
#include "map/spectators.hpp"
31+
#include "creatures/players/player.hpp"
3132

3233
// Game
3334
int GameFunctions::luaGameCreateMonsterType(lua_State* L) {

src/lua/functions/core/game/global_functions.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "lua/scripts/lua_environment.hpp"
2323
#include "lua/scripts/script_environment.hpp"
2424
#include "server/network/protocol/protocolstatus.hpp"
25+
#include "creatures/players/player.hpp"
2526

2627
void GlobalFunctions::init(lua_State* L) {
2728
lua_register(L, "addEvent", GlobalFunctions::luaAddEvent);

src/lua/functions/creatures/combat/combat_functions.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "game/game.hpp"
1515
#include "lua/global/lua_variant.hpp"
1616
#include "lua/scripts/lua_environment.hpp"
17+
#include "creatures/players/player.hpp"
1718

1819
int CombatFunctions::luaCombatCreate(lua_State* L) {
1920
// Combat()

0 commit comments

Comments
 (0)