diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-07-28 16:03:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-07-28 16:34:59 +0300 |
commit | b96e6eeba6e1511568c8291bd8cb6a6d3706635c (patch) | |
tree | d021843c88d856f86f018547c30f1181290ffcbe /src/actions | |
parent | 60859a71dd9794b0216cc7a60146d417e06dbbad (diff) | |
download | manaplus-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.tar.gz manaplus-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.tar.bz2 manaplus-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.tar.xz manaplus-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.zip |
Remove define EATHENA_SUPPORT from all code.
Now eathena like support enabled always.
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/actiondef.h | 5 | ||||
-rw-r--r-- | src/actions/actions.cpp | 32 | ||||
-rw-r--r-- | src/actions/commands.cpp | 45 | ||||
-rw-r--r-- | src/actions/pets.cpp | 4 | ||||
-rw-r--r-- | src/actions/target.cpp | 12 | ||||
-rw-r--r-- | src/actions/windows.cpp | 18 |
6 files changed, 3 insertions, 113 deletions
diff --git a/src/actions/actiondef.h b/src/actions/actiondef.h index 02dc6ab05..18c276e3c 100644 --- a/src/actions/actiondef.h +++ b/src/actions/actiondef.h @@ -30,12 +30,7 @@ SETTINGS_H INPUT_INPUTMANAGER_H #define impHandler(name) bool name(InputEvent &event) - -#ifdef EATHENA_SUPPORT #define impHandlerE(name) bool name(InputEvent &event) -#else // EATHENA_SUPPORT -#define impHandlerE(name) bool name(InputEvent &event A_UNUSED) -#endif // EATHENA_SUPPORT #define impHandler0(name) bool name(InputEvent &event A_UNUSED) #define impHandlerVoid(name) bool name(InputEvent &event A_UNUSED) \ diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 615c081b3..6ad192223 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -78,20 +78,16 @@ #include "net/adminhandler.h" #include "net/beinghandler.h" -#ifdef EATHENA_SUPPORT #include "net/buyingstorehandler.h" -#endif #include "net/buysellhandler.h" #include "net/chathandler.h" #include "net/download.h" #include "net/gamehandler.h" #include "net/inventoryhandler.h" #include "net/ipc.h" -#ifdef EATHENA_SUPPORT #include "net/mercenaryhandler.h" #include "net/net.h" #include "net/vendinghandler.h" -#endif #include "net/npchandler.h" #include "net/playerhandler.h" #include "net/serverfeatures.h" @@ -261,12 +257,10 @@ static Item *getItemByInvIndex(const InputEvent &event, break; case InventoryType::Trade: case InventoryType::Npc: -#ifdef EATHENA_SUPPORT case InventoryType::Cart: case InventoryType::Vending: case InventoryType::Mail: case InventoryType::Craft: -#endif case InventoryType::TypeEnd: default: break; @@ -507,10 +501,8 @@ impHandler(dropItemInvAll) impHandler(heal) { -#ifdef EATHENA_SUPPORT if (Net::getNetworkType() != ServerType::TMWATHENA) return false; -#endif if (actorManager && localPlayer) { std::string args = event.args; @@ -560,10 +552,8 @@ impHandler(heal) impHandler0(healmd) { -#ifdef EATHENA_SUPPORT if (Net::getNetworkType() != ServerType::TMWATHENA) return false; -#endif if (actorManager) { const int matk = PlayerInfo::getStatEffective(Attributes::PLAYER_MATK); @@ -593,10 +583,8 @@ impHandler0(healmd) impHandler0(itenplz) { -#ifdef EATHENA_SUPPORT if (Net::getNetworkType() != ServerType::TMWATHENA) return false; -#endif if (actorManager) { if (playerHandler && @@ -622,10 +610,8 @@ impHandler0(setHome) impHandler0(magicAttack) { -#ifdef EATHENA_SUPPORT if (Net::getNetworkType() != ServerType::TMWATHENA) return false; -#endif if (localPlayer) { localPlayer->magicAttack(); @@ -729,12 +715,9 @@ impHandler(buy) } else if (being->getType() == ActorType::Player) { -#ifdef EATHENA_SUPPORT if (vendingHandler && serverFeatures->haveVending()) vendingHandler->open(being); - else -#endif - if (buySellHandler) + else if (buySellHandler) buySellHandler->requestSellList(being->getName()); return true; } @@ -778,12 +761,9 @@ impHandler(sell) } else if (being->getType() == ActorType::Player) { -#ifdef EATHENA_SUPPORT if (buyingStoreHandler && serverFeatures->haveVending()) buyingStoreHandler->open(being); - else -#endif - if (buySellHandler) + else if (buySellHandler) buySellHandler->requestBuyList(being->getName()); return true; } @@ -1529,13 +1509,9 @@ impHandler(uploadLog) impHandler0(mercenaryFire) { -#ifdef EATHENA_SUPPORT if (mercenaryHandler) mercenaryHandler->fire(); return true; -#else - return false; -#endif } impHandler(useItem) @@ -1703,7 +1679,6 @@ impHandler0(testInfo) impHandlerE(craftKey) { -#ifdef EATHENA_SUPPORT const int slot = (event.action - InputAction::CRAFT_1); if (slot >= 0 && slot < 9) { @@ -1711,7 +1686,6 @@ impHandlerE(craftKey) inventoryWindow->moveItemToCraft(slot); return true; } -#endif return false; } @@ -1805,7 +1779,6 @@ impHandler(setEmoteType) { settings.emoteType = EmoteType::Pet; } -#ifdef EATHENA_SUPPORT else if (args == "homun" || args == "homunculus") { settings.emoteType = EmoteType::Homunculus; @@ -1814,7 +1787,6 @@ impHandler(setEmoteType) { settings.emoteType = EmoteType::Mercenary; } -#endif return true; } diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 98db8d57f..4699aabd7 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -30,20 +30,16 @@ #include "being/flooritem.h" #include "being/localplayer.h" #include "being/playerrelations.h" -#ifdef EATHENA_SUPPORT #include "being/homunculusinfo.h" #include "being/playerinfo.h" -#endif #include "gui/viewport.h" #include "gui/popups/popupmenu.h" -#ifdef EATHENA_SUPPORT #include "gui/shortcut/emoteshortcut.h" #include "gui/windows/mailwindow.h" -#endif #include "gui/windows/chatwindow.h" #include "gui/windows/inventorywindow.h" @@ -56,19 +52,15 @@ #include "input/inputactionoperators.h" -#ifdef EATHENA_SUPPORT #include "listeners/inputactionreplaylistener.h" -#endif #include "net/adminhandler.h" #include "net/chathandler.h" #include "net/guildhandler.h" -#ifdef EATHENA_SUPPORT #include "net/familyhandler.h" #include "net/homunculushandler.h" #include "net/mailhandler.h" #include "net/net.h" -#endif #include "net/npchandler.h" #include "net/partyhandler.h" #include "net/serverfeatures.h" @@ -556,7 +548,6 @@ impHandler(imitation) impHandler(sendMail) { -#ifdef EATHENA_SUPPORT const ServerTypeT type = Net::getNetworkType(); if (type == ServerType::EATHENA || type == ServerType::EVOL2) { @@ -569,9 +560,7 @@ impHandler(sendMail) mailHandler->send(name, _("Quick message"), text); } } - else -#endif - if (serverConfig.getBoolValue("enableManaMarketBot")) + else if (serverConfig.getBoolValue("enableManaMarketBot")) { chatHandler->privateMessage("ManaMarket", "!mail " + event.args); return true; @@ -909,7 +898,6 @@ impHandler(serverUnIgnoreWhisper) impHandlerE(setHomunculusName) { -#ifdef EATHENA_SUPPORT const std::string args = event.args; if (args.empty()) { @@ -929,19 +917,16 @@ impHandlerE(setHomunculusName) homunculusHandler->setName(args); return true; } -#endif return false; } impHandler0(fireHomunculus) { -#ifdef EATHENA_SUPPORT if (homunculusHandler) { homunculusHandler->fire(); return true; } -#endif return false; } @@ -973,7 +958,6 @@ impHandler(warp) impHandlerE(homunTalk) { -#ifdef EATHENA_SUPPORT if (!serverFeatures || !serverFeatures->haveTalkPet()) return false; @@ -985,13 +969,11 @@ impHandlerE(homunTalk) homunculusHandler->talk(args); return true; } -#endif return false; } impHandlerE(homunEmote) { -#ifdef EATHENA_SUPPORT if (!serverFeatures || !serverFeatures->haveTalkPet()) return false; @@ -1006,14 +988,12 @@ impHandlerE(homunEmote) Game::instance()->setValidSpeed(); return true; } -#endif return false; } impHandlerE(commandHomunEmote) { -#ifdef EATHENA_SUPPORT if (!serverFeatures || !serverFeatures->haveTalkPet()) return false; @@ -1023,25 +1003,19 @@ impHandlerE(commandHomunEmote) atoi(event.args.c_str()))); return true; } -#endif return false; } impHandlerE(createPublicChatRoom) { -#ifdef EATHENA_SUPPORT if (!chatHandler || event.args.empty()) return false; chatHandler->createChatRoom(event.args, "", 100, true); return true; -#else - return false; -#endif } impHandlerE(joinChatRoom) { -#ifdef EATHENA_SUPPORT if (!chatHandler) return false; const std::string args = event.args; @@ -1052,20 +1026,15 @@ impHandlerE(joinChatRoom) return false; chatHandler->joinChat(chat, ""); return true; -#else - return false; -#endif } impHandler0(leaveChatRoom) { -#ifdef EATHENA_SUPPORT if (chatHandler) { chatHandler->leaveChatRoom(); return true; } -#endif return false; } @@ -1187,16 +1156,12 @@ impHandler(skill) impHandlerE(craft) { -#ifdef EATHENA_SUPPORT const std::string args = event.args; if (args.empty() || !inventoryWindow) return false; inventoryWindow->moveItemToCraft(atoi(args.c_str())); return true; -#else - return false; -#endif } impHandler(npcClipboard) @@ -1597,19 +1562,14 @@ impHandler(commandGuildRecall) impHandlerE(mailTo) { -#ifdef EATHENA_SUPPORT if (!mailWindow) return false; mailWindow->createMail(event.args); return true; -#else - return false; -#endif } impHandlerE(adoptChild) { -#ifdef EATHENA_SUPPORT const std::string nick = getNick(event); Being *const being = actorManager->findBeingByName( nick, ActorType::Player); @@ -1617,9 +1577,6 @@ impHandlerE(adoptChild) return true; familyHandler->askForChild(being); return true; -#else - return false; -#endif } impHandler(showSkillLevels) diff --git a/src/actions/pets.cpp b/src/actions/pets.cpp index 512ef00d0..0aa0f29be 100644 --- a/src/actions/pets.cpp +++ b/src/actions/pets.cpp @@ -68,14 +68,10 @@ static const Being *getPet() return *pets.begin(); } #endif -#ifdef EATHENA_SUPPORT const BeingId id = PlayerInfo::getPetBeingId(); if (id == BeingId_zero) return nullptr; return actorManager->findBeing(id); -#else - return nullptr; -#endif } impHandler(commandEmotePet) diff --git a/src/actions/target.cpp b/src/actions/target.cpp index 4e0b46cd3..483fdffcb 100644 --- a/src/actions/target.cpp +++ b/src/actions/target.cpp @@ -60,29 +60,17 @@ impHandler0(targetNPC) impHandler0(targetMercenary) { -#ifdef EATHENA_SUPPORT return setTarget(ActorType::Mercenary, AllowSort_true); -#else - return false; -#endif } impHandler0(targetSkillUnit) { -#ifdef EATHENA_SUPPORT return setTarget(ActorType::SkillUnit, AllowSort_true); -#else - return false; -#endif } impHandler0(targetPet) { -#ifdef EATHENA_SUPPORT return setTarget(ActorType::Pet, AllowSort_true); -#else - return false; -#endif } impHandler0(contextMenu) diff --git a/src/actions/windows.cpp b/src/actions/windows.cpp index 508f17105..4febc871a 100644 --- a/src/actions/windows.cpp +++ b/src/actions/windows.cpp @@ -22,15 +22,11 @@ #include "actions/actiondef.h" -#ifdef EATHENA_SUPPORT #include "being/localplayer.h" -#endif #include "gui/dialogsmanager.h" -#ifdef EATHENA_SUPPORT #include "gui/windows/bankwindow.h" -#endif #include "gui/windows/skilldialog.h" #include "gui/windows/socialwindow.h" #include "gui/windows/statuswindow.h" @@ -55,9 +51,7 @@ #include "utils/gettext.h" -#ifdef EATHENA_SUPPORT #include "net/serverfeatures.h" -#endif #include "debug.h" @@ -272,20 +266,15 @@ impHandler0(questsWindowShow) impHandler0(bankWindowShow) { -#ifdef EATHENA_SUPPORT if (!serverFeatures || !serverFeatures->haveBankApi()) return false; showHideWindow(bankWindow); return true; -#else - return false; -#endif } impHandler0(cartWindowShow) { -#ifdef EATHENA_SUPPORT if (!serverFeatures || !serverFeatures->haveCart() || !localPlayer || @@ -298,9 +287,6 @@ impHandler0(cartWindowShow) if (inventoryWindow) inventoryWindow->updateDropButton(); return true; -#else - return false; -#endif } impHandler0(updaterWindowShow) @@ -329,12 +315,8 @@ impHandler0(quickWindowShow) impHandler0(mailWindowShow) { -#ifdef EATHENA_SUPPORT showHideWindow(mailWindow); return true; -#else - return false; -#endif } } // namespace Actions |