diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/actormanager.cpp | 161 | ||||
-rw-r--r-- | src/actormanager.h | 14 | ||||
-rw-r--r-- | src/being/actorsprite.cpp | 43 | ||||
-rw-r--r-- | src/gui/onlineplayer.h | 2 | ||||
-rw-r--r-- | src/gui/windows/buydialog.cpp | 30 | ||||
-rw-r--r-- | src/gui/windows/buydialog.h | 2 | ||||
-rw-r--r-- | src/net/eathena/adminrecv.cpp | 12 | ||||
-rw-r--r-- | src/net/eathena/adminrecv.h | 1 | ||||
-rw-r--r-- | src/net/eathena/network.cpp | 1 | ||||
-rw-r--r-- | src/net/eathena/packetsin.inc | 2 | ||||
-rw-r--r-- | src/net/tmwa/adminrecv.cpp (renamed from src/net/ea/adminrecv.cpp) | 8 | ||||
-rw-r--r-- | src/net/tmwa/adminrecv.h (renamed from src/net/ea/adminrecv.h) | 10 | ||||
-rw-r--r-- | src/net/tmwa/network.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/packetsin.inc | 2 | ||||
-rw-r--r-- | src/utils/checkutils.h | 9 |
17 files changed, 169 insertions, 138 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9f5a22e0f..6195f9260 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2010,8 +2010,6 @@ SET(DYE_CMD_SRCS ) SET(SRCS_EVOL - net/ea/adminrecv.cpp - net/ea/adminrecv.h net/ea/adminhandler.cpp net/ea/adminhandler.h net/ea/beingrecv.cpp @@ -2082,6 +2080,8 @@ SET(SRCS_TMWA gui/windows/shopselldialog.h net/tmwa/adminhandler.cpp net/tmwa/adminhandler.h + net/tmwa/adminrecv.cpp + net/tmwa/adminrecv.h net/tmwa/achievementhandler.cpp net/tmwa/achievementhandler.h net/tmwa/attendancehandler.cpp diff --git a/src/Makefile.am b/src/Makefile.am index f11d310e4..394a7bd45 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1639,8 +1639,6 @@ SRC = ${BASE_SRC} \ net/protocoloutdefine.h \ net/protocoloutinclude.h \ net/protocoloutupdate.h \ - net/ea/adminrecv.cpp \ - net/ea/adminrecv.h \ net/ea/adminhandler.cpp \ net/ea/adminhandler.h \ net/ea/beingrecv.cpp \ @@ -1728,6 +1726,8 @@ SRC += \ gui/windows/shopselldialog.h \ net/tmwa/adminhandler.cpp \ net/tmwa/adminhandler.h \ + net/tmwa/adminrecv.cpp \ + net/tmwa/adminrecv.h \ net/tmwa/achievementhandler.cpp \ net/tmwa/achievementhandler.h \ net/tmwa/attendancehandler.cpp \ diff --git a/src/actormanager.cpp b/src/actormanager.cpp index 80dc6e25d..e33798bab 100644 --- a/src/actormanager.cpp +++ b/src/actormanager.cpp @@ -1130,7 +1130,7 @@ Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing, } Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing, - int maxDist, + const int maxDist, const ActorTypeT &type, const int x, const int y, const Being *const excluded, @@ -1155,7 +1155,7 @@ Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing, specialDistance = true; } - maxDist = maxDist * maxDist; + const int maxDistSq = maxDist * maxDist; const bool cycleSelect = allowSort == AllowSort_true && ((mCyclePlayers && type == ActorType::Player) @@ -1288,9 +1288,9 @@ Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing, return *i; } - int dist = 0; - int index = defaultPriorityIndex; Being *closestBeing = nullptr; + int closestDistSq = maxDistSq + 1; + int closestPriority = defaultPriorityIndex; FOR_EACH (ActorSprites::iterator, i, mActors) { @@ -1305,96 +1305,77 @@ Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing, } Being *const being = static_cast<Being*>(*i); - if (filtered) - { - if (ignoreAttackMobs.find(being->getName()) - != ignoreAttackMobs.end()) - { - continue; - } - if (ignoreDefault && attackMobs.find(being->getName()) - == attackMobs.end() && priorityMobs.find(being->getName()) - == priorityMobs.end()) - { - continue; - } - } - if ((being->getInfo() != nullptr) && !(being->getInfo()->isTargetSelection() || modActive)) { continue; } - const bool valid = validateBeing(aroundBeing, being, - type, excluded, 50); - int d = being->getDistance(); - if (being->getType() != ActorType::Monster - || !mTargetOnlyReachable) - { // if distance not calculated, use old distance - const int dx = being->getTileX() - x; - const int dy = being->getTileY() - y; - d = dx*dx + dy*dy; - } - - if (!valid) + // Cheap bounding box check, first, before engaging the pathfinder + // (in validateBeing call). Target is _at minimum_ distSq away + const int dx = being->getTileX() - x; + const int dy = being->getTileY() - y; + int distSq = dx*dx + dy*dy; + if (distSq > maxDistSq) continue; - if (specialDistance && being->getDistance() <= 2 - && being->getType() == type) + // Check if target is too close + if (specialDistance + && (distSq <= 2*2) + && (being->getType() == type)) { continue; } -// logger->log("being name:" + being->getName()); -// logger->log("index:" + toString(index)); -// logger->log("d:" + toString(d)); - - if (!filtered && (d <= dist || (closestBeing == nullptr))) - { - dist = d; - closestBeing = being; - } - else if (filtered) + int priority = defaultPriorityIndex; + if (filtered) { - int w2 = defaultPriorityIndex; - if (closestBeing != nullptr) + // Skip ignored + if (ignoreAttackMobs.find(being->getName()) != + ignoreAttackMobs.end()) { - const StringIntMapCIter it2 = priorityMobsMap.find( - being->getName()); - if (it2 != priorityMobsMap.end()) - w2 = (*it2).second; - - if (w2 < index) - { - dist = d; - closestBeing = being; - index = w2; - continue; - } - if (w2 == index && d <= dist) - { - dist = d; - closestBeing = being; - index = w2; - continue; - } + continue; } - if (closestBeing == nullptr) + const StringIntMapCIter prioIter + = priorityMobsMap.find(being->getName()); + + if (prioIter != priorityMobsMap.end()) + priority = prioIter->second; + + // if (default) is in ignore list, then only attack + // those in priority or general attack list. + if (ignoreDefault + && attackMobs.find(being->getName()) == attackMobs.end() + && prioIter == priorityMobsMap.end()) { - dist = d; - closestBeing = being; - const StringIntMapCIter it1 = priorityMobsMap.find( - being->getName()); - if (it1 != priorityMobsMap.end()) - index = (*it1).second; - else - index = defaultPriorityIndex; + continue; } } + + if (!validateBeing(aroundBeing, being, type, excluded, 50)) + continue; + + // see validateBeing for when real distance is valid + if (mTargetOnlyReachable && being->getType() == ActorType::Monster) + { + const int d = being->getDistance(); + distSq = d*d; + } + + //logger->log("being prio:%3d, dist^2:%3d, name: '%s'", + // priority, distSq, being->getName().c_str()); + + // without filtering, priority and closestPriority are always the same + if ((priority == closestPriority && distSq < closestDistSq) || + (priority < closestPriority && distSq <= maxDistSq)) + { + closestDistSq = distSq; + closestBeing = being; + closestPriority = priority; + } } - return (maxDist >= dist) ? closestBeing : nullptr; + return closestBeing; } bool ActorManager::validateBeing(const Being *const aroundBeing, @@ -1405,12 +1386,32 @@ bool ActorManager::validateBeing(const Being *const aroundBeing, { if (localPlayer == nullptr) return false; - return (being != nullptr) && ((being->getType() == type - || type == ActorType::Unknown) && (being->isAlive() - || (mTargetDeadPlayers && type == ActorType::Player)) - && being != aroundBeing) && being != excluded - && (type != ActorType::Monster || !mTargetOnlyReachable - || localPlayer->isReachable(being, maxCost)); + + if (being == nullptr) + return false; + + if (being == aroundBeing) + return false; + + if (being == excluded) + return false; + + // If specific being type is given, it must match. + if (!(being->getType() == type || type == ActorType::Unknown)) + return false; + + if (!being->isAlive()) + if (!mTargetDeadPlayers || type != ActorType::Player) + return false; + + // Why are we ignoring real reachability checks for non-monsters? + if (type != ActorType::Monster) + return true; + + if (!mTargetOnlyReachable) + return true; + + return localPlayer->isReachable(being, maxCost); } #ifdef TMWA_SUPPORT diff --git a/src/actormanager.h b/src/actormanager.h index 43b9341b9..15841f61d 100644 --- a/src/actormanager.h +++ b/src/actormanager.h @@ -393,6 +393,20 @@ class ActorManager final : public ConfigListener #ifndef UNITTESTS protected: #endif // UNITTESTS + /* + * General checks if a being is valid for selection. + * Additionally, localPlayer is checked to exist + * + * @param aroundBeing being must not equal this one + * @param being being under scrutiny. Nullptr check performed + * it must be alive unless a player and + * mTargetDeadPlayers is true. + * @param type pass ActorType::Unknown if no matching desired + * @param exluded being must not equal this one + * @param maxCost allowed max pathfinder distance, if applicable + * (only if being is a monster and + * mTargetOnlyReachable is true) + */ bool validateBeing(const Being *const aroundBeing, Being *const being, const ActorTypeT &type, diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp index 3beb5b9d2..25a118f88 100644 --- a/src/being/actorsprite.cpp +++ b/src/being/actorsprite.cpp @@ -124,9 +124,7 @@ void ActorSprite::logic() if (effect != nullptr && effect->mIsPersistent) { - updateStatusEffect(*it, - Enable_true, - IsStart_false); + updateStatusEffect(*it, Enable_true, IsStart_false); } } } @@ -228,9 +226,7 @@ static void applyEffectByOption(ActorSprite *const actor, const Enable enable = (opt & option) != 0 ? Enable_true : Enable_false; option |= opt; option ^= opt; - actor->setStatusEffect(id, - enable, - IsStart_false); + actor->setStatusEffect(id, enable, IsStart_false); } if (option != 0U && config.getBoolValue("unimplimentedLog")) @@ -240,8 +236,8 @@ static void applyEffectByOption(ActorSprite *const actor, "Left value: %u", name, option); - logger->log(str); - DebugMessageListener::distributeEvent(str); + logger->log(str); + DebugMessageListener::distributeEvent(str); } } @@ -256,16 +252,12 @@ static void applyEffectByOption1(ActorSprite *const actor, const int32_t id = (*it).second; if (opt == option) { - actor->setStatusEffect(id, - Enable_true, - IsStart_false); + actor->setStatusEffect(id, Enable_true, IsStart_false); option = 0U; } else { - actor->setStatusEffect(id, - Enable_false, - IsStart_false); + actor->setStatusEffect(id, Enable_false, IsStart_false); } } if (option != 0 && @@ -276,8 +268,8 @@ static void applyEffectByOption1(ActorSprite *const actor, "Left value: %u", name, option); - logger->log(str); - DebugMessageListener::distributeEvent(str); + logger->log(str); + DebugMessageListener::distributeEvent(str); } } @@ -318,8 +310,9 @@ void ActorSprite::updateStatusEffect(const int32_t index, const Enable newStatus, const IsStart start) { - StatusEffect *const effect = StatusEffectDB::getStatusEffect( - index, newStatus); + StatusEffect *const effect + = StatusEffectDB::getStatusEffect(index, newStatus); + if (effect == nullptr) return; if (effect->mIsPoison && getType() == ActorType::Player) @@ -385,9 +378,10 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display, { if (display.image.empty()) { - addSprite(AnimatedSprite::delayedLoad(pathJoin( - paths.getStringValue("sprites"), - paths.getStringValue("spriteErrorFile")), + addSprite(AnimatedSprite::delayedLoad( + pathJoin( + paths.getStringValue("sprites"), + paths.getStringValue("spriteErrorFile")), 0)); } else @@ -524,10 +518,9 @@ std::string ActorSprite::getStatusEffectsString() const { FOR_EACH (std::set<int32_t>::const_iterator, it, mStatusEffects) { - const StatusEffect *const effect = - StatusEffectDB::getStatusEffect( - *it, - Enable_true); + const StatusEffect *const effect + = StatusEffectDB::getStatusEffect(*it, Enable_true); + if (effect == nullptr) continue; if (!effectsStr.empty()) diff --git a/src/gui/onlineplayer.h b/src/gui/onlineplayer.h index 64ab76abd..b38960c56 100644 --- a/src/gui/onlineplayer.h +++ b/src/gui/onlineplayer.h @@ -54,7 +54,7 @@ class OnlinePlayer final const std::string getNick() const noexcept2 A_WARN_UNUSED { return mNick; } - unsigned char getStaus() const noexcept2 A_WARN_UNUSED + unsigned char getStatus() const noexcept2 A_WARN_UNUSED { return mStatus; } void setIsGM(const bool b) diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp index f30fb92e4..038ddb3ac 100644 --- a/src/gui/windows/buydialog.cpp +++ b/src/gui/windows/buydialog.cpp @@ -226,6 +226,7 @@ BuyDialog::BuyDialog() : mMoney(0), mAmountItems(0), mMaxItems(0), + mTotalPurchaseWeight(0), mAdvanced(false) { init(); @@ -248,6 +249,7 @@ BuyDialog::BuyDialog(const BeingId npcId, mMoney(0), mAmountItems(0), mMaxItems(0), + mTotalPurchaseWeight(0), mAdvanced(Net::getNetworkType() != ServerType::TMWATHENA) { init(); @@ -272,6 +274,7 @@ BuyDialog::BuyDialog(const std::string &nick, mMoney(0), mAmountItems(0), mMaxItems(0), + mTotalPurchaseWeight(0), mAdvanced(false) { init(); @@ -296,6 +299,7 @@ BuyDialog::BuyDialog(const Being *const being, mMoney(0), mAmountItems(0), mMaxItems(0), + mTotalPurchaseWeight(0), mAdvanced(true) { init(); @@ -338,8 +342,8 @@ void BuyDialog::init() "%d / %d", mAmountItems, mMaxItems)); mQuantityLabel->setAlignment(Graphics::CENTER); mMoneyLabel = new Label(this, strprintf( - // TRANSLATORS: buy dialog label - _("Price: %s / Total: %s"), "", "")); + // TRANSLATORS: buy dialog label, price, remaining money & free weight + _("Price: %s, Remaining: %s & %s"), "", "", "")); mAmountField = new IntTextField(this, 1, 1, 123, Enable_true, 0); mAmountField->setActionEventId("amount"); @@ -473,6 +477,7 @@ void BuyDialog::reset() mShopItemList->setSelected(-1); mSlider->setValue(0); + mTotalPurchaseWeight = 0; setMoney(0); } @@ -637,6 +642,8 @@ void BuyDialog::action(const ActionEvent &event) else if (mNpcId == fromInt(Vending, BeingId)) { item->increaseUsedQuantity(mAmountItems); + const int itemWeight = item->getInfo().getWeight(); + mTotalPurchaseWeight += mAmountItems * itemWeight; item->update(); if (mConfirmButton != nullptr) mConfirmButton->setEnabled(true); @@ -650,6 +657,8 @@ void BuyDialog::action(const ActionEvent &event) if (mAdvanced) { item->increaseUsedQuantity(mAmountItems); + const int itemWeight = item->getInfo().getWeight(); + mTotalPurchaseWeight += mAmountItems * itemWeight; item->update(); if (mConfirmButton != nullptr) mConfirmButton->setEnabled(true); @@ -745,6 +754,10 @@ void BuyDialog::updateButtonsAndLabels() { const int selectedItem = mShopItemList->getSelected(); int price = 0; + int freeWeight + = PlayerInfo::getAttribute(Attributes::MAX_WEIGHT) + - PlayerInfo::getAttribute(Attributes::TOTAL_WEIGHT) + - mTotalPurchaseWeight; if (selectedItem > -1) { @@ -765,10 +778,7 @@ void BuyDialog::updateButtonsAndLabels() const int itemWeight = item->getInfo().getWeight(); if (itemWeight != 0) { - const int myFreeWeight - = PlayerInfo::getAttribute(Attributes::MAX_WEIGHT) - - PlayerInfo::getAttribute(Attributes::TOTAL_WEIGHT); - const int canCarry = myFreeWeight / itemWeight; + const int canCarry = freeWeight / itemWeight; mMaxItems = std::min(mMaxItems, canCarry); } @@ -786,6 +796,7 @@ void BuyDialog::updateButtonsAndLabels() if (mAmountItems > mMaxItems) mAmountItems = mMaxItems; + freeWeight -= mAmountItems * itemWeight; price = mAmountItems * itemPrice; } } @@ -802,10 +813,11 @@ void BuyDialog::updateButtonsAndLabels() mAmountField->setEnabled(mAmountItems > 0); mQuantityLabel->setCaption(strprintf("%d / %d", mAmountItems, mMaxItems)); - // TRANSLATORS: buy dialog label - mMoneyLabel->setCaption(strprintf(_("Price: %s / Total: %s"), + // TRANSLATORS: buy dialog label, price, remaining money & free weight + mMoneyLabel->setCaption(strprintf(_("Price: %s, Remaining: %s & %s"), UnitsDb::formatCurrency(mCurrency, price).c_str(), - UnitsDb::formatCurrency(mCurrency, mMoney - price).c_str())); + UnitsDb::formatCurrency(mCurrency, mMoney - price).c_str(), + UnitsDb::formatWeight(freeWeight).c_str())); } void BuyDialog::setVisible(Visible visible) diff --git a/src/gui/windows/buydialog.h b/src/gui/windows/buydialog.h index 4535e1201..969734aec 100644 --- a/src/gui/windows/buydialog.h +++ b/src/gui/windows/buydialog.h @@ -202,6 +202,8 @@ class BuyDialog final : public Window, int mMoney; int mAmountItems; int mMaxItems; + // combined weight of all items added to shopping list + int mTotalPurchaseWeight; bool mAdvanced; }; diff --git a/src/net/eathena/adminrecv.cpp b/src/net/eathena/adminrecv.cpp index 19895924d..fc9cb606b 100644 --- a/src/net/eathena/adminrecv.cpp +++ b/src/net/eathena/adminrecv.cpp @@ -19,8 +19,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ + #include "net/eathena/adminrecv.h" +#include "enums/resources/notifytypes.h" +#include "notifymanager.h" + #include "logger.h" #include "net/messagein.h" @@ -79,4 +83,12 @@ void AdminRecv::processAccountStats(Net::MessageIn &msg) msg.readInt16("zero"); } +void AdminRecv::processKickAck(Net::MessageIn &msg) +{ + if (msg.readInt8("flag") == 0) + NotifyManager::notify(NotifyTypes::KICK_FAIL); + else + NotifyManager::notify(NotifyTypes::KICK_SUCCEED); +} + } // namespace EAthena diff --git a/src/net/eathena/adminrecv.h b/src/net/eathena/adminrecv.h index 1dc2b13b5..6a660b18a 100644 --- a/src/net/eathena/adminrecv.h +++ b/src/net/eathena/adminrecv.h @@ -32,6 +32,7 @@ namespace EAthena namespace AdminRecv { void processAdminGetLoginAck(Net::MessageIn &msg); + void processKickAck(Net::MessageIn &msg); void processSetTileType(Net::MessageIn &msg); void processAccountStats(Net::MessageIn &msg); } // namespace AdminRecv diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp index 94290cb3f..f52402c9d 100644 --- a/src/net/eathena/network.cpp +++ b/src/net/eathena/network.cpp @@ -25,7 +25,6 @@ #include "net/packetinfo.h" -#include "net/ea/adminrecv.h" #include "net/ea/beingrecv.h" #include "net/ea/buysellrecv.h" #include "net/ea/charserverrecv.h" diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index 2a8e26264..b93e9d09d 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -94,7 +94,7 @@ packet(SMSG_MAP_NOT_FOUND, 0x0840, -1, &GeneralRecv::processMap // map server, unknown versions packet(SMSG_ADMIN_GET_LOGIN_ACK, 0x01e0, 30, &AdminRecv::processAdminGetLoginAck, 0); -packet(SMSG_ADMIN_KICK_ACK, 0x00cd, 3, &Ea::AdminRecv::processKickAck, 0); +packet(SMSG_ADMIN_KICK_ACK, 0x00cd, 3, &AdminRecv::processKickAck, 0); packet(SMSG_ADMIN_SET_TILE_TYPE, 0x0192, 24, &AdminRecv::processSetTileType, 0); packet(SMSG_BATTLE_BEGINS, 0x08df, 50, &BattleGroundRecv::processBattleBegins, 0); packet(SMSG_BATTLE_JOINED, 0x08d9, 30, &BattleGroundRecv::processBattleJoined, 0); diff --git a/src/net/ea/adminrecv.cpp b/src/net/tmwa/adminrecv.cpp index efc55762f..58ee1b175 100644 --- a/src/net/ea/adminrecv.cpp +++ b/src/net/tmwa/adminrecv.cpp @@ -21,7 +21,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "net/ea/adminrecv.h" +#include "net/tmwa/adminrecv.h" #include "notifymanager.h" @@ -31,15 +31,15 @@ #include "debug.h" -namespace Ea +namespace TmwAthena { void AdminRecv::processKickAck(Net::MessageIn &msg) { - if (msg.readInt32("flag") == 0) + if (msg.readInt32("account id") == 0) NotifyManager::notify(NotifyTypes::KICK_FAIL); else NotifyManager::notify(NotifyTypes::KICK_SUCCEED); } -} // namespace Ea +} // namespace TmwAthena diff --git a/src/net/ea/adminrecv.h b/src/net/tmwa/adminrecv.h index 41f8121d3..616e786e1 100644 --- a/src/net/ea/adminrecv.h +++ b/src/net/tmwa/adminrecv.h @@ -21,8 +21,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_EA_ADMINRECV_H -#define NET_EA_ADMINRECV_H +#ifndef NET_TMWA_ADMINRECV_H +#define NET_TMWA_ADMINRECV_H #include "localconsts.h" @@ -31,12 +31,12 @@ namespace Net class MessageIn; } // namespace Net -namespace Ea +namespace TmwAthena { namespace AdminRecv { void processKickAck(Net::MessageIn &msg); } // namespace AdminRecv -} // namespace Ea +} // namespace TmwAthena -#endif // NET_EA_ADMINRECV_H +#endif // NET_TMWA_ADMINRECV_H diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp index 0fec580a6..f070e1cf3 100644 --- a/src/net/tmwa/network.cpp +++ b/src/net/tmwa/network.cpp @@ -27,7 +27,6 @@ #include "net/packetinfo.h" -#include "net/ea/adminrecv.h" #include "net/ea/beingrecv.h" #include "net/ea/buysellrecv.h" #include "net/ea/charserverrecv.h" @@ -43,6 +42,7 @@ #include "net/ea/skillrecv.h" #include "net/ea/traderecv.h" +#include "net/tmwa/adminrecv.h" #include "net/tmwa/beingrecv.h" #include "net/tmwa/buysellrecv.h" #include "net/tmwa/charserverrecv.h" diff --git a/src/net/tmwa/packetsin.inc b/src/net/tmwa/packetsin.inc index dbfdbd494..47f87c768 100644 --- a/src/net/tmwa/packetsin.inc +++ b/src/net/tmwa/packetsin.inc @@ -21,7 +21,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -packet(SMSG_ADMIN_KICK_ACK, 0x00cd, 6, &Ea::AdminRecv::processKickAck, 0); +packet(SMSG_ADMIN_KICK_ACK, 0x00cd, 6, &AdminRecv::processKickAck, 0); packet(SMSG_BEING_ACTION, 0x008a, 29, &Ea::BeingRecv::processBeingAction, 0); packet(SMSG_BEING_CHANGE_DIRECTION, 0x009c, 9, &BeingRecv::processBeingChangeDirection, 0); packet(SMSG_BEING_CHANGE_LOOKS, 0x00c3, 8, &BeingRecv::processBeingChangeLook, 0); diff --git a/src/utils/checkutils.h b/src/utils/checkutils.h index 0d20673b8..5ef46110d 100644 --- a/src/utils/checkutils.h +++ b/src/utils/checkutils.h @@ -38,8 +38,7 @@ LOGGER_H #define reportAlwaysReal(...) \ { \ logger->log("Assert:"); \ - logger->assertLog( \ - __VA_ARGS__); \ + logger->assertLog(__VA_ARGS__); \ reportLogStack(__FILE__, __LINE__, __func__); \ } @@ -152,8 +151,7 @@ LOGGER_H #define failAlways(...) \ { \ logger->log("Assert:"); \ - logger->assertLog( \ - __VA_ARGS__); \ + logger->assertLog(__VA_ARGS__); \ reportLogStack(__FILE__, __LINE__, __func__); \ throw new std::exception(); \ } @@ -178,8 +176,7 @@ void reportStack(); #define reportAlwaysReal(...) \ { \ logger->log("Error:"); \ - logger->log( \ - __VA_ARGS__); \ + logger->log(__VA_ARGS__); \ } #define returnFalseVReal(val) \ |