From 8e939e5f21620ec3d5fba1a703b08b7b141440b1 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 7 Nov 2024 19:41:06 +0000 Subject: [PATCH] Code format - (Clang-format) --- src/creatures/players/player.cpp | 4 --- src/game/game.cpp | 2 +- .../functions/core/game/game_functions.cpp | 34 +++++++++---------- src/server/network/protocol/protocolgame.cpp | 4 +-- 4 files changed, 20 insertions(+), 24 deletions(-) diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index b4c0e6ed129..f79ecc75b80 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -7184,8 +7184,6 @@ void Player::diswing() { defaultOutfit.lookWing = 0; } - - // Auras uint8_t Player::getLastAura() const { @@ -7356,7 +7354,6 @@ void Player::disaura() { defaultOutfit.lookAura = 0; } - // Effects uint8_t Player::getLastEffect() const { @@ -7411,7 +7408,6 @@ bool Player::toggleEffect(bool effect) { return false; } - const auto &playerOutfit = Outfits::getInstance().getOutfitByLookType(getPlayer(), defaultOutfit.lookType); if (!playerOutfit) { return false; diff --git a/src/game/game.cpp b/src/game/game.cpp index 065484d07a2..3ada9bb4245 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -6132,7 +6132,7 @@ void Game::playerChangeOutfit(uint32_t playerId, Outfit_t outfit, uint8_t isMoun internalCreatureChangeOutfit(player, outfit); } - // @ wings + // @ wings if (outfit.lookWing != 0) { const auto wing = attachedeffects->getWingByID(outfit.lookWing); if (!wing) { diff --git a/src/lua/functions/core/game/game_functions.cpp b/src/lua/functions/core/game/game_functions.cpp index 2490f0c71df..87920d0f5f2 100644 --- a/src/lua/functions/core/game/game_functions.cpp +++ b/src/lua/functions/core/game/game_functions.cpp @@ -920,57 +920,57 @@ int GameFunctions::luaGameGetAchievements(lua_State* L) { int GameFunctions::getAllAttachedeffects(lua_State* L) { // delete before push // Game.getAllAttachedeffects(type) - const std::string type = luaL_checkstring(L, 1); + const std::string type = luaL_checkstring(L, 1); - lua_newtable(L); + lua_newtable(L); if (type == "aura") { const auto &auras = g_game().attachedeffects->getAuras(); int index = 1; for (const auto &aura : auras) { - lua_newtable(L); + lua_newtable(L); lua_pushinteger(L, aura->id); lua_setfield(L, -2, "id"); - lua_pushstring(L, aura->name.c_str()); + lua_pushstring(L, aura->name.c_str()); lua_setfield(L, -2, "name"); - lua_rawseti(L, -2, index++); + lua_rawseti(L, -2, index++); } } else if (type == "wing") { const auto &wings = g_game().attachedeffects->getWings(); int index = 1; for (const auto &wing : wings) { - lua_newtable(L); + lua_newtable(L); lua_pushinteger(L, wing->id); lua_setfield(L, -2, "id"); - lua_pushstring(L, wing->name.c_str()); + lua_pushstring(L, wing->name.c_str()); lua_setfield(L, -2, "name"); - lua_rawseti(L, -2, index++); + lua_rawseti(L, -2, index++); } } else if (type == "effect") { const auto &wings = g_game().attachedeffects->getEffects(); int index = 1; for (const auto &wing : wings) { - lua_newtable(L); - lua_pushinteger(L, wing->id); + lua_newtable(L); + lua_pushinteger(L, wing->id); lua_setfield(L, -2, "id"); - lua_pushstring(L, wing->name.c_str()); + lua_pushstring(L, wing->name.c_str()); lua_setfield(L, -2, "name"); - lua_rawseti(L, -2, index++); + lua_rawseti(L, -2, index++); } } else if (type == "shader") { const auto &shaders = g_game().attachedeffects->getShaders(); int index = 1; for (const auto &shader : shaders) { - lua_newtable(L); - lua_pushinteger(L, shader->id); + lua_newtable(L); + lua_pushinteger(L, shader->id); lua_setfield(L, -2, "id"); - lua_pushstring(L, shader->name.c_str()); + lua_pushstring(L, shader->name.c_str()); lua_setfield(L, -2, "name"); - lua_rawseti(L, -2, index++); + lua_rawseti(L, -2, index++); } } else { lua_pushnil(L); } - return 1; + return 1; } diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 86ce4f32729..5bb85a64e45 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -504,7 +504,7 @@ void ProtocolGame::login(const std::string &name, uint32_t accountId, OperatingS if (operatingSystem >= CLIENTOS_OTCLIENT_LINUX) { isOTC = true; if (isOTC && otclientV8 == 0) { - sendOTCRFeatures(); + sendOTCRFeatures(); } NetworkMessage opcodeMessage; opcodeMessage.addByte(0x32); @@ -9432,7 +9432,7 @@ void ProtocolGame::sendOutfitWindowCustomOTCR(NetworkMessage &msg) { if (!isOTCR) { return; } - // wings + // wings auto startWings = msg.getBufferPosition(); uint16_t limitWings = std::numeric_limits::max(); uint16_t wingSize = 0;