From 9253bd60eedaa7c027e35fcde7c0c14d00bfb0d7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 5 Mar 2019 04:32:12 +0300 Subject: Fix code style --- src/net/eathena/guildrecv.cpp | 10 +++++----- src/net/eathena/inventoryrecv.cpp | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/net/eathena/guildrecv.cpp b/src/net/eathena/guildrecv.cpp index 62577e7b8..4bfea0cf9 100644 --- a/src/net/eathena/guildrecv.cpp +++ b/src/net/eathena/guildrecv.cpp @@ -202,6 +202,9 @@ void GuildRecv::processGuildAlianceInfo(Net::MessageIn &msg) void GuildRecv::processGuildMemberList(Net::MessageIn &msg) { + if (actorManager == nullptr) + return; + const int length = msg.readInt16("len"); if (length < 4) return; @@ -285,11 +288,8 @@ void GuildRecv::processGuildMemberList(Net::MessageIn &msg) } } taGuild->sort(); - if (actorManager != nullptr) - { - actorManager->updatePlayerGuild(); - actorManager->updatePlayerColors(); - } + actorManager->updatePlayerGuild(); + actorManager->updatePlayerColors(); if (socialWindow != nullptr) socialWindow->updateGuildCounter(onlineNum, totalNum); } diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp index bb2a129b3..eaeb72109 100644 --- a/src/net/eathena/inventoryrecv.cpp +++ b/src/net/eathena/inventoryrecv.cpp @@ -1711,7 +1711,7 @@ void InventoryRecv::processInventoryContinue(Net::MessageIn &msg, items = &Ea::InventoryRecv::mStorageItems; break; default: - reportAlways("Unknown inventory type %d", CAST_S32(invType)); + reportAlways("Unknown inventory type %d", CAST_S32(invType)) return; } @@ -1800,7 +1800,7 @@ void InventoryRecv::processEquipmentContinue(Net::MessageIn &msg, items = &Ea::InventoryRecv::mStorageItems; break; default: - reportAlways("Unknown inventory type %d", CAST_S32(invType)); + reportAlways("Unknown inventory type %d", CAST_S32(invType)) return; } @@ -1819,7 +1819,8 @@ void InventoryRecv::processEquipmentContinue(Net::MessageIn &msg, msg.readInt32("hire expire date (?)"); msg.readInt16("equip type"); msg.readInt16("item sprite number"); - ItemOptionsList *options = new ItemOptionsList(msg.readUInt8("option count")); + ItemOptionsList *options = new ItemOptionsList( + msg.readUInt8("option count")); for (int f = 0; f < 5; f ++) { const uint16_t idx = msg.readInt16("option index"); -- cgit v1.2.3-70-g09d2