diff options
Diffstat (limited to 'src/gui')
38 files changed, 18 insertions, 92 deletions
diff --git a/src/gui/dialogsmanager.cpp b/src/gui/dialogsmanager.cpp index 28c3ae616..0b515c2f3 100644 --- a/src/gui/dialogsmanager.cpp +++ b/src/gui/dialogsmanager.cpp @@ -37,7 +37,6 @@ #include "gui/windows/updaterwindow.h" #include "net/inventoryhandler.h" -#include "net/net.h" #include "utils/gettext.h" diff --git a/src/gui/models/typelistmodel.h b/src/gui/models/typelistmodel.h index bd27fce39..7a50c6905 100644 --- a/src/gui/models/typelistmodel.h +++ b/src/gui/models/typelistmodel.h @@ -60,13 +60,14 @@ class TypeListModel final : public ListModel else if (elementIndex == 2) return "eAthena"; #endif // EATHENA_SUPPORT + else #else // TMWA_SUPPORT #ifdef EATHENA_SUPPORT if (elementIndex == 0) return "eAthena"; + else #endif // EATHENA_SUPPORT #endif // TMWA_SUPPORT - else return "Unknown"; } }; diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp index cf471ba3e..b241a057f 100644 --- a/src/gui/popups/itempopup.cpp +++ b/src/gui/popups/itempopup.cpp @@ -41,7 +41,6 @@ #include "resources/iteminfo.h" #include "resources/resourcemanager.h" -#include "net/net.h" #include "net/serverfeatures.h" #include "debug.h" diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 91c09002b..4771e4209 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -73,7 +73,6 @@ #include "net/homunculushandler.h" #include "net/inventoryhandler.h" #include "net/mercenaryhandler.h" -#include "net/net.h" #include "net/npchandler.h" #include "net/partyhandler.h" #include "net/pethandler.h" diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 73cb5b884..ed717af4f 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -816,14 +816,12 @@ void Viewport::mouseMoved(MouseEvent &event A_UNUSED) switch (type) { case ActorType::Npc: - gui->setCursorType(mHoverBeing->getHoverCursor()); - break; - case ActorType::Monster: - gui->setCursorType(mHoverBeing->getHoverCursor()); - break; - case ActorType::Portal: + case ActorType::LocalPet: + case ActorType::Pet: + case ActorType::Mercenary: + case ActorType::Homunculus: gui->setCursorType(mHoverBeing->getHoverCursor()); break; @@ -831,7 +829,6 @@ void Viewport::mouseMoved(MouseEvent &event A_UNUSED) case ActorType::FloorItem: case ActorType::Unknown: case ActorType::Player: - case ActorType::LocalPet: default: gui->setCursorType(Cursor::CURSOR_POINTER); break; diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 1d18c3e2e..0ea19ea59 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -41,11 +41,11 @@ #include "gui/windows/shopwindow.h" #include "gui/windows/shortcutwindow.h" -#include "net/net.h" #include "net/inventoryhandler.h" #include "net/tradehandler.h" #include "utils/gettext.h" +#include "utils/stringutils.h" #include "resources/image.h" #include "resources/iteminfo.h" diff --git a/src/gui/widgets/selldialog.cpp b/src/gui/widgets/selldialog.cpp index 611850398..2d45c39f8 100644 --- a/src/gui/widgets/selldialog.cpp +++ b/src/gui/widgets/selldialog.cpp @@ -25,11 +25,7 @@ #include "shopitem.h" #include "units.h" -#include "being/playerinfo.h" - -#include "gui/windows/confirmdialog.h" #include "gui/windows/setupwindow.h" -#include "gui/windows/tradewindow.h" #include "gui/models/shopitems.h" @@ -42,14 +38,9 @@ #include "gui/widgets/shoplistbox.h" #include "gui/widgets/slider.h" -#include "net/buysellhandler.h" -#include "net/net.h" -#include "net/npchandler.h" - -#include "resources/iteminfo.h" - #include "utils/delete2.h" #include "utils/gettext.h" +#include "utils/stringutils.h" #include "debug.h" diff --git a/src/gui/widgets/tabs/chattab.cpp b/src/gui/widgets/tabs/chattab.cpp index 54d675a85..fe4bd9187 100644 --- a/src/gui/widgets/tabs/chattab.cpp +++ b/src/gui/widgets/tabs/chattab.cpp @@ -45,7 +45,6 @@ #include "input/inputmanager.h" #include "net/chathandler.h" -#include "net/net.h" #include "resources/iteminfo.h" diff --git a/src/gui/widgets/tabs/whispertab.cpp b/src/gui/widgets/tabs/whispertab.cpp index 6c89a887b..03b90ca18 100644 --- a/src/gui/widgets/tabs/whispertab.cpp +++ b/src/gui/widgets/tabs/whispertab.cpp @@ -27,12 +27,13 @@ #include "being/localplayer.h" #include "net/chathandler.h" -#include "net/net.h" #include "gui/windows/chatwindow.h" #include "gui/widgets/windowcontainer.h" +#include "utils/stringutils.h" + #include "debug.h" WhisperTab::WhisperTab(const Widget2 *const widget, diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp index 0bd452c1b..dbc6dd59b 100644 --- a/src/gui/windows/buydialog.cpp +++ b/src/gui/windows/buydialog.cpp @@ -45,7 +45,6 @@ #include "net/adminhandler.h" #include "net/buysellhandler.h" -#include "net/net.h" #include "net/npchandler.h" #include "resources/iteminfo.h" diff --git a/src/gui/windows/buyselldialog.cpp b/src/gui/windows/buyselldialog.cpp index 701eb96bc..2de5841bc 100644 --- a/src/gui/windows/buyselldialog.cpp +++ b/src/gui/windows/buyselldialog.cpp @@ -23,7 +23,6 @@ #include "gui/windows/buyselldialog.h" #include "net/buysellhandler.h" -#include "net/net.h" #include "net/npchandler.h" #include "gui/windows/setupwindow.h" diff --git a/src/gui/windows/changeemaildialog.cpp b/src/gui/windows/changeemaildialog.cpp index 408fdf9d4..d099c73fe 100644 --- a/src/gui/windows/changeemaildialog.cpp +++ b/src/gui/windows/changeemaildialog.cpp @@ -36,7 +36,6 @@ #include "net/logindata.h" #include "net/loginhandler.h" -#include "net/net.h" #include "utils/delete2.h" #include "utils/gettext.h" diff --git a/src/gui/windows/changepassworddialog.cpp b/src/gui/windows/changepassworddialog.cpp index a5f97becb..cc8ca77a6 100644 --- a/src/gui/windows/changepassworddialog.cpp +++ b/src/gui/windows/changepassworddialog.cpp @@ -37,7 +37,6 @@ #include "net/logindata.h" #include "net/loginhandler.h" -#include "net/net.h" #include "utils/delete2.h" #include "utils/gettext.h" diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index def290047..b34f8f50a 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -40,7 +40,6 @@ #include "gui/widgets/slider.h" #include "gui/widgets/textfield.h" -#include "net/net.h" #include "net/serverfeatures.h" #include "resources/iteminfo.h" @@ -51,6 +50,7 @@ #include "utils/delete2.h" #include "utils/gettext.h" +#include "utils/stringutils.h" #include "debug.h" diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp index e2211d3fb..b9d8e4cd6 100644 --- a/src/gui/windows/charselectdialog.cpp +++ b/src/gui/windows/charselectdialog.cpp @@ -52,7 +52,6 @@ #include "net/character.h" #include "net/logindata.h" #include "net/loginhandler.h" -#include "net/net.h" #include "net/registrationoptions.h" #include "debug.h" diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index bf839e058..7b497e747 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -68,7 +68,6 @@ #include "net/chathandler.h" #include "net/playerhandler.h" -#include "net/net.h" #include "utils/copynpaste.h" #include "utils/delete2.h" diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp index 3dd7dd72b..5e5997985 100644 --- a/src/gui/windows/editserverdialog.cpp +++ b/src/gui/windows/editserverdialog.cpp @@ -223,6 +223,7 @@ void EditServerDialog::action(const ActionEvent &event) mPortField->getText().c_str())); mServer.persistentIp = mPersistentIp->isSelected(); +#if defined(TMWA_SUPPORT) || defined(EATHENA_SUPPORT) if (mTypeField) { switch (mTypeField->getSelected()) @@ -252,6 +253,7 @@ void EditServerDialog::action(const ActionEvent &event) } } else +#endif // defined(TMWA_SUPPORT) || defined(EATHENA_SUPPORT) { mServer.type = ServerInfo::TMWATHENA; } diff --git a/src/gui/windows/eggselectiondialog.cpp b/src/gui/windows/eggselectiondialog.cpp index b4149b6b3..0f3ad1c0b 100644 --- a/src/gui/windows/eggselectiondialog.cpp +++ b/src/gui/windows/eggselectiondialog.cpp @@ -23,24 +23,11 @@ #include "gui/windows/eggselectiondialog.h" #include "shopitem.h" -#include "units.h" - -#include "being/playerinfo.h" - -#include "gui/windows/confirmdialog.h" -#include "gui/windows/setupwindow.h" -#include "gui/windows/tradewindow.h" #include "gui/models/shopitems.h" #include "gui/widgets/button.h" -#include "gui/widgets/containerplacer.h" -#include "gui/widgets/label.h" -#include "gui/widgets/layout.h" -#include "gui/widgets/layouttype.h" -#include "gui/widgets/scrollarea.h" #include "gui/widgets/shoplistbox.h" -#include "gui/widgets/slider.h" #include "net/inventoryhandler.h" @@ -72,7 +59,7 @@ void EggSelectionDialog::sellAction(const ActionEvent &event A_UNUSED) return; const int selectedItem = mShopItemList->getSelected(); - ShopItem *const item = mShopItems->at(selectedItem); + const ShopItem *const item = mShopItems->at(selectedItem); if (!item) return; inventoryHandler->selectEgg(item); diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index e44f9e087..390b0400b 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -58,7 +58,6 @@ #include "gui/widgets/textfield.h" #include "net/inventoryhandler.h" -#include "net/net.h" #include "resources/iteminfo.h" diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index 86cfd973c..03bb4feb1 100644 --- a/src/gui/windows/itemamountwindow.cpp +++ b/src/gui/windows/itemamountwindow.cpp @@ -30,7 +30,6 @@ #include "input/keyboardconfig.h" #include "net/inventoryhandler.h" -#include "net/net.h" #include "gui/viewport.h" #include "gui/models/itemsmodel.h" diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp index 0b642f224..8f6256616 100644 --- a/src/gui/windows/logindialog.cpp +++ b/src/gui/windows/logindialog.cpp @@ -45,7 +45,6 @@ #include "net/charserverhandler.h" #include "net/loginhandler.h" -#include "net/net.h" #include "utils/delete2.h" #include "utils/paths.h" diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp index e242b7401..815639e67 100644 --- a/src/gui/windows/minimap.cpp +++ b/src/gui/windows/minimap.cpp @@ -333,6 +333,9 @@ void Minimap::draw(Graphics *graphics) case ActorType::FloorItem: case ActorType::Portal: case ActorType::LocalPet: + case ActorType::Pet: + case ActorType::Mercenary: + case ActorType::Homunculus: default: continue; } diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index a02ea3f1e..dcf60d021 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -41,7 +41,6 @@ #include "gui/widgets/progressbar.h" -#include "net/net.h" #include "net/playerhandler.h" #include "net/gamehandler.h" diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp index b9917461b..cca950a66 100644 --- a/src/gui/windows/npcdialog.cpp +++ b/src/gui/windows/npcdialog.cpp @@ -57,7 +57,6 @@ #include "resources/db/avatardb.h" #include "resources/db/npcdb.h" -#include "net/net.h" #include "net/npchandler.h" #include "net/packetlimiter.h" diff --git a/src/gui/windows/npcpostdialog.cpp b/src/gui/windows/npcpostdialog.cpp index b037c718e..dfd8b7041 100644 --- a/src/gui/windows/npcpostdialog.cpp +++ b/src/gui/windows/npcpostdialog.cpp @@ -32,7 +32,6 @@ #include "gui/widgets/tabs/chattab.h" -#include "net/net.h" #include "net/npchandler.h" #include "utils/gettext.h" diff --git a/src/gui/windows/npcselldialog.cpp b/src/gui/windows/npcselldialog.cpp index 2e4cd6d07..517c97320 100644 --- a/src/gui/windows/npcselldialog.cpp +++ b/src/gui/windows/npcselldialog.cpp @@ -23,33 +23,22 @@ #include "gui/windows/npcselldialog.h" #include "shopitem.h" -#include "units.h" #include "being/playerinfo.h" #include "gui/windows/confirmdialog.h" -#include "gui/windows/setupwindow.h" -#include "gui/windows/tradewindow.h" #include "gui/models/shopitems.h" -#include "gui/widgets/button.h" -#include "gui/widgets/containerplacer.h" -#include "gui/widgets/label.h" -#include "gui/widgets/layout.h" -#include "gui/widgets/layouttype.h" -#include "gui/widgets/scrollarea.h" #include "gui/widgets/shoplistbox.h" #include "gui/widgets/slider.h" -#include "net/buysellhandler.h" -#include "net/net.h" #include "net/npchandler.h" #include "resources/iteminfo.h" -#include "utils/delete2.h" #include "utils/gettext.h" +#include "utils/stringutils.h" #include "debug.h" diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp index f5481070a..c5cd311a3 100644 --- a/src/gui/windows/quitdialog.cpp +++ b/src/gui/windows/quitdialog.cpp @@ -40,7 +40,6 @@ #include "net/charserverhandler.h" #include "net/gamehandler.h" -#include "net/net.h" #include "resources/map/map.h" diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp index 4c582d9f2..3b4ee0539 100644 --- a/src/gui/windows/registerdialog.cpp +++ b/src/gui/windows/registerdialog.cpp @@ -43,7 +43,6 @@ #include "net/logindata.h" #include "net/loginhandler.h" -#include "net/net.h" #include "net/registrationoptions.h" #include "net/serverfeatures.h" diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp index 23a066ade..30b4e600e 100644 --- a/src/gui/windows/serverdialog.cpp +++ b/src/gui/windows/serverdialog.cpp @@ -28,8 +28,6 @@ #include "main.h" #include "settings.h" -#include "events/keyevent.h" - #include "input/inputaction.h" #include "net/download.h" diff --git a/src/gui/windows/shopselldialog.cpp b/src/gui/windows/shopselldialog.cpp index a48a83b75..c988c2418 100644 --- a/src/gui/windows/shopselldialog.cpp +++ b/src/gui/windows/shopselldialog.cpp @@ -23,33 +23,16 @@ #include "gui/windows/shopselldialog.h" #include "shopitem.h" -#include "units.h" #include "being/playerinfo.h" -#include "gui/windows/confirmdialog.h" -#include "gui/windows/setupwindow.h" #include "gui/windows/tradewindow.h" #include "gui/models/shopitems.h" -#include "gui/widgets/button.h" -#include "gui/widgets/containerplacer.h" -#include "gui/widgets/label.h" -#include "gui/widgets/layout.h" -#include "gui/widgets/layouttype.h" -#include "gui/widgets/scrollarea.h" #include "gui/widgets/shoplistbox.h" -#include "gui/widgets/slider.h" #include "net/buysellhandler.h" -#include "net/net.h" -#include "net/npchandler.h" - -#include "resources/iteminfo.h" - -#include "utils/delete2.h" -#include "utils/gettext.h" #include "debug.h" diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp index 8e5a847c0..540d5f65a 100644 --- a/src/gui/windows/shopwindow.cpp +++ b/src/gui/windows/shopwindow.cpp @@ -57,7 +57,6 @@ #include "being/playerinfo.h" #include "being/playerrelations.h" -#include "net/net.h" #include "net/chathandler.h" #include "net/tradehandler.h" diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index 0fa3e6bbb..5ae89301a 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -42,7 +42,6 @@ #include "gui/widgets/tabs/skilltab.h" -#include "net/net.h" #include "net/playerhandler.h" #include "net/skillhandler.h" diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp index 6407e8fa6..513337767 100644 --- a/src/gui/windows/socialwindow.cpp +++ b/src/gui/windows/socialwindow.cpp @@ -52,7 +52,6 @@ #include "gui/popups/createpartypopup.h" -#include "net/net.h" #include "net/serverfeatures.h" #include "debug.h" diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index 072e915ee..b2825c1e7 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -50,7 +50,6 @@ #include "gui/widgets/vertcontainer.h" #include "gui/widgets/windowcontainer.h" -#include "net/net.h" #include "net/playerhandler.h" #include "net/gamehandler.h" diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp index 7f6e78a9b..857ace024 100644 --- a/src/gui/windows/tradewindow.cpp +++ b/src/gui/windows/tradewindow.cpp @@ -51,7 +51,6 @@ #include "gui/widgets/tabs/chattab.h" -#include "net/net.h" #include "net/tradehandler.h" #include "utils/gettext.h" diff --git a/src/gui/windows/unregisterdialog.cpp b/src/gui/windows/unregisterdialog.cpp index 018b583fa..c4e8c8167 100644 --- a/src/gui/windows/unregisterdialog.cpp +++ b/src/gui/windows/unregisterdialog.cpp @@ -36,7 +36,6 @@ #include "net/logindata.h" #include "net/loginhandler.h" -#include "net/net.h" #include "utils/delete2.h" #include "utils/gettext.h" diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp index 4216303e5..12d1297d5 100644 --- a/src/gui/windows/whoisonline.cpp +++ b/src/gui/windows/whoisonline.cpp @@ -47,7 +47,6 @@ #include "being/playerrelations.h" #include "net/download.h" -#include "net/net.h" #include "net/packetlimiter.h" #include "net/playerhandler.h" #include "net/serverfeatures.h" diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp index 7cfb0319b..61bff8987 100644 --- a/src/gui/windows/worldselectdialog.cpp +++ b/src/gui/windows/worldselectdialog.cpp @@ -35,7 +35,6 @@ #include "gui/models/worldlistmodel.h" #include "net/loginhandler.h" -#include "net/net.h" #include "utils/delete2.h" #include "utils/gettext.h" |