summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-05-06 15:11:30 +0300
committerAndrei Karas <akaras@inbox.ru>2012-05-06 15:11:30 +0300
commitf7c9165e0f59a33404a486c0b154a2c21ed9a9fa (patch)
tree4b2ed9168a0459bc1d0a06c0db0fe5df73e0a19e
parentc53f4620bdaa1ae3fe0a15aa237ea88d28da0954 (diff)
downloadmanaverse-f7c9165e0f59a33404a486c0b154a2c21ed9a9fa.tar.gz
manaverse-f7c9165e0f59a33404a486c0b154a2c21ed9a9fa.tar.bz2
manaverse-f7c9165e0f59a33404a486c0b154a2c21ed9a9fa.tar.xz
manaverse-f7c9165e0f59a33404a486c0b154a2c21ed9a9fa.zip
Move specials window to manaserv only code.
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--src/Makefile.am10
-rw-r--r--src/client.cpp4
-rw-r--r--src/game.cpp9
-rw-r--r--src/gui/windowmenu.cpp4
5 files changed, 26 insertions, 9 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 604484dde..58a62ddc8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -339,8 +339,6 @@ SET(SRCS
gui/socialwindow.h
gui/speechbubble.cpp
gui/speechbubble.h
- gui/specialswindow.cpp
- gui/specialswindow.h
gui/statuswindow.cpp
gui/statuswindow.h
gui/textdialog.cpp
@@ -435,8 +433,6 @@ SET(SRCS
resources/resourcemanager.h
resources/soundeffect.h
resources/soundeffect.cpp
- resources/specialdb.cpp
- resources/specialdb.h
resources/spritedef.h
resources/spritedef.cpp
resources/wallpaper.cpp
@@ -827,6 +823,8 @@ SET(SRCS_MANASERV
enet/utility.h
enet/win32.c
enet/win32.h
+ gui/specialswindow.cpp
+ gui/specialswindow.h
utils/sha256.cpp
utils/sha256.h
net/manaserv/attributes.cpp
@@ -879,6 +877,8 @@ SET(SRCS_MANASERV
net/manaserv/specialhandler.h
net/manaserv/tradehandler.cpp
net/manaserv/tradehandler.h
+ resources/specialdb.cpp
+ resources/specialdb.h
)
IF (WIN32)
diff --git a/src/Makefile.am b/src/Makefile.am
index 295391096..d476c1d56 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -353,8 +353,6 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/socialwindow.h \
gui/speechbubble.cpp \
gui/speechbubble.h \
- gui/specialswindow.cpp \
- gui/specialswindow.h \
gui/statuswindow.cpp \
gui/statuswindow.h \
gui/textdialog.cpp \
@@ -451,8 +449,6 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
resources/resourcemanager.h \
resources/soundeffect.h \
resources/soundeffect.cpp \
- resources/specialdb.cpp \
- resources/specialdb.h \
resources/spritedef.h \
resources/spritedef.cpp \
resources/wallpaper.cpp \
@@ -664,6 +660,8 @@ manaplus_SOURCES += enet/callbacks.c \
enet/unix.h \
enet/utility.h \
enet/win32.h \
+ gui/specialswindow.cpp \
+ gui/specialswindow.h \
utils/sha256.cpp \
utils/sha256.h \
net/manaserv/attributes.cpp \
@@ -715,7 +713,9 @@ manaplus_SOURCES += enet/callbacks.c \
net/manaserv/specialhandler.cpp \
net/manaserv/specialhandler.h \
net/manaserv/tradehandler.cpp \
- net/manaserv/tradehandler.h
+ net/manaserv/tradehandler.h \
+ resources/specialdb.cpp \
+ resources/specialdb.h
endif
manaplus_SOURCES += \
diff --git a/src/client.cpp b/src/client.cpp
index 05860592b..6425bb1d5 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -92,7 +92,9 @@
#include "resources/itemdb.h"
#include "resources/mapdb.h"
#include "resources/monsterdb.h"
+#ifdef MANASERV_SUPPORT
#include "resources/specialdb.h"
+#endif
#include "resources/npcdb.h"
#include "resources/resourcemanager.h"
@@ -1209,7 +1211,9 @@ int Client::gameExec()
ItemDB::load();
Being::load(); // Hairstyles
MonsterDB::load();
+#ifdef MANASERV_SUPPORT
SpecialDB::load();
+#endif
NPCDB::load();
EmoteDB::load();
StatusEffect::load();
diff --git a/src/game.cpp b/src/game.cpp
index a564cd4b2..77a95120d 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -35,6 +35,7 @@
#include "localplayer.h"
#include "logger.h"
#include "particle.h"
+#include "playerinfo.h"
#include "sound.h"
#include "spellshortcut.h"
@@ -54,7 +55,9 @@
#include "gui/shopwindow.h"
#include "gui/shortcutwindow.h"
#include "gui/socialwindow.h"
+#ifdef MANASERV_SUPPORT
#include "gui/specialswindow.h"
+#endif
#include "gui/skilldialog.h"
#include "gui/statuswindow.h"
#include "gui/textdialog.h"
@@ -123,7 +126,9 @@ DebugWindow *debugWindow = nullptr;
ShortcutWindow *itemShortcutWindow = nullptr;
ShortcutWindow *emoteShortcutWindow = nullptr;
OutfitWindow *outfitWindow = nullptr;
+#ifdef MANASERV_SUPPORT
SpecialsWindow *specialsWindow = nullptr;
+#endif
ShortcutWindow *dropShortcutWindow = nullptr;
ShortcutWindow *spellShortcutWindow = nullptr;
WhoIsOnline *whoIsOnline = nullptr;
@@ -226,7 +231,9 @@ static void createGuiWindows()
emoteShortcutWindow = new ShortcutWindow("EmoteShortcut",
new EmoteShortcutContainer, "emotes.xml");
outfitWindow = new OutfitWindow();
+#ifdef MANASERV_SUPPORT
specialsWindow = new SpecialsWindow();
+#endif
dropShortcutWindow = new ShortcutWindow("DropShortcut",
new DropShortcutContainer, "drops.xml");
@@ -328,7 +335,9 @@ static void destroyGuiWindows()
del_0(itemShortcutWindow)
del_0(emoteShortcutWindow)
del_0(outfitWindow)
+#ifdef MANASERV_SUPPORT
del_0(specialsWindow)
+#endif
del_0(socialWindow)
del_0(dropShortcutWindow);
del_0(spellShortcutWindow);
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp
index 6a9166219..6359df7cd 100644
--- a/src/gui/windowmenu.cpp
+++ b/src/gui/windowmenu.cpp
@@ -30,7 +30,9 @@
#include "gui/didyouknowwindow.h"
#include "gui/emotepopup.h"
#include "gui/skilldialog.h"
+#ifdef MANASERV_SUPPORT
#include "gui/specialswindow.h"
+#endif
#include "gui/textpopup.h"
#include "gui/viewport.h"
@@ -189,10 +191,12 @@ void WindowMenu::action(const gcn::ActionEvent &event)
{
window = skillDialog;
}
+#ifdef MANASERV_SUPPORT
else if (event.getId() == "SPE")
{
window = specialsWindow;
}
+#endif
else if (event.getId() == "SH")
{
window = itemShortcutWindow;