Skip to content

Commit

Permalink
improve: fix circular dependencies on weapons.hpp (#3094)
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas authored Nov 9, 2024
1 parent 4367cd1 commit d13c445
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/creatures/combat/combat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "lua/callbacks/events_callbacks.hpp"
#include "lua/creature/events.hpp"
#include "map/spectators.hpp"
#include "creatures/players/player.hpp"

int32_t Combat::getLevelFormula(const std::shared_ptr<Player> &player, const std::shared_ptr<Spell> &wheelSpell, const CombatDamage &damage) const {
if (!player) {
Expand Down
2 changes: 1 addition & 1 deletion src/items/weapons/weapons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include "creatures/combat/combat.hpp"
#include "game/game.hpp"
#include "lua/creature/events.hpp"

#include "lua/global/lua_variant.hpp"
#include "creatures/players/player.hpp"

Weapons::Weapons() = default;
Weapons::~Weapons() = default;
Expand Down
1 change: 0 additions & 1 deletion src/items/weapons/weapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#pragma once

#include "lua/scripts/luascript.hpp"
#include "creatures/players/player.hpp"
#include "lua/scripts/scripts.hpp"
#include "creatures/combat/combat.hpp"
#include "utils/utils_definitions.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/lua/functions/core/game/game_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "lua/functions/events/event_callback_functions.hpp"
#include "lua/scripts/lua_environment.hpp"
#include "map/spectators.hpp"
#include "creatures/players/player.hpp"

// Game
int GameFunctions::luaGameCreateMonsterType(lua_State* L) {
Expand Down
1 change: 1 addition & 0 deletions src/lua/functions/core/game/global_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "lua/scripts/lua_environment.hpp"
#include "lua/scripts/script_environment.hpp"
#include "server/network/protocol/protocolstatus.hpp"
#include "creatures/players/player.hpp"

void GlobalFunctions::init(lua_State* L) {
lua_register(L, "addEvent", GlobalFunctions::luaAddEvent);
Expand Down
1 change: 1 addition & 0 deletions src/lua/functions/creatures/combat/combat_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "game/game.hpp"
#include "lua/global/lua_variant.hpp"
#include "lua/scripts/lua_environment.hpp"
#include "creatures/players/player.hpp"

int CombatFunctions::luaCombatCreate(lua_State* L) {
// Combat()
Expand Down

0 comments on commit d13c445

Please sign in to comment.