diff options
Diffstat (limited to 'src/net/ea')
-rw-r--r-- | src/net/ea/adminhandler.h | 6 | ||||
-rw-r--r-- | src/net/ea/beinghandler.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/beinghandler.h | 6 | ||||
-rw-r--r-- | src/net/ea/charserverhandler.cpp | 21 | ||||
-rw-r--r-- | src/net/ea/charserverhandler.h | 8 | ||||
-rw-r--r-- | src/net/ea/chathandler.h | 6 | ||||
-rw-r--r-- | src/net/ea/gamehandler.h | 6 | ||||
-rw-r--r-- | src/net/ea/guildhandler.h | 6 | ||||
-rw-r--r-- | src/net/ea/inventoryhandler.h | 6 | ||||
-rw-r--r-- | src/net/ea/loginhandler.h | 6 | ||||
-rw-r--r-- | src/net/ea/npchandler.h | 6 | ||||
-rw-r--r-- | src/net/ea/partyhandler.cpp | 1 | ||||
-rw-r--r-- | src/net/ea/partyhandler.h | 6 | ||||
-rw-r--r-- | src/net/ea/playerhandler.h | 6 | ||||
-rw-r--r-- | src/net/ea/specialhandler.h | 6 | ||||
-rw-r--r-- | src/net/ea/tradehandler.h | 6 |
16 files changed, 24 insertions, 80 deletions
diff --git a/src/net/ea/adminhandler.h b/src/net/ea/adminhandler.h index 2e311881f..5d1b7aa14 100644 --- a/src/net/ea/adminhandler.h +++ b/src/net/ea/adminhandler.h @@ -26,12 +26,6 @@ #include "net/adminhandler.h" #include "net/net.h" -#ifdef __GNUC__ -#define A_UNUSED __attribute__ ((unused)) -#else -#define A_UNUSED -#endif - namespace Ea { diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index 5c3c694b3..1c2983137 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -215,10 +215,10 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg, bool visible) int maxHP = msg.readInt32(); if (hp && maxHP) { + dstBeing->setMaxHP(maxHP); int oldHP = dstBeing->getHP(); if (!oldHP || oldHP > hp) dstBeing->setHP(hp); - dstBeing->setMaxHP(maxHP); } } else diff --git a/src/net/ea/beinghandler.h b/src/net/ea/beinghandler.h index f3769943d..f47385a61 100644 --- a/src/net/ea/beinghandler.h +++ b/src/net/ea/beinghandler.h @@ -26,12 +26,6 @@ #include "net/beinghandler.h" #include "net/net.h" -#ifdef __GNUC__ -#define A_UNUSED __attribute__ ((unused)) -#else -#define A_UNUSED -#endif - namespace Ea { diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp index 0c01959f2..63e267584 100644 --- a/src/net/ea/charserverhandler.cpp +++ b/src/net/ea/charserverhandler.cpp @@ -33,8 +33,11 @@ #include "net/ea/loginhandler.h" #include "net/ea/eaprotocol.h" +#include "utils/dtor.h" #include "utils/gettext.h" +#include "resources/chardb.h" + #include "debug.h" extern Net::CharHandler *charHandler; @@ -70,7 +73,17 @@ void CharServerHandler::setCharCreateDialog(CharCreateDialog *window) const Token &token = static_cast<LoginHandler*>(Net::getLoginHandler())->getToken(); - mCharCreateDialog->setAttributes(attributes, 30, 1, 9); + int minStat = CharDB::getMinStat(); + if (!minStat) + minStat = 1; + int maxStat = CharDB::getMaxStat(); + if (!maxStat) + maxStat = 9; + int sumStat = CharDB::getSumStat(); + if (!sumStat) + sumStat = 30; + + mCharCreateDialog->setAttributes(attributes, sumStat, minStat, maxStat); mCharCreateDialog->setFixedGender(true, token.sex); } @@ -172,4 +185,10 @@ void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg A_UNUSED) new OkDialog(_("Error"), _("Failed to delete character.")); } +void CharServerHandler::clear() +{ + delete_all(mCharacters); + mCharacters.clear(); +} + } // namespace Ea diff --git a/src/net/ea/charserverhandler.h b/src/net/ea/charserverhandler.h index bd39781cd..bacde67b6 100644 --- a/src/net/ea/charserverhandler.h +++ b/src/net/ea/charserverhandler.h @@ -28,12 +28,6 @@ #include "net/net.h" #include "net/serverinfo.h" -#ifdef __GNUC__ -#define A_UNUSED __attribute__ ((unused)) -#else -#define A_UNUSED -#endif - class LoginData; namespace Ea @@ -78,6 +72,8 @@ class CharServerHandler : public Net::CharHandler virtual void processCharDeleteFailed(Net::MessageIn &msg); + virtual void clear(); + protected: virtual void readPlayerData(Net::MessageIn &msg, Net::Character *character, diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h index cff9bf589..d39e6788a 100644 --- a/src/net/ea/chathandler.h +++ b/src/net/ea/chathandler.h @@ -30,12 +30,6 @@ #include <queue> -#ifdef __GNUC__ -#define A_UNUSED __attribute__ ((unused)) -#else -#define A_UNUSED -#endif - namespace Ea { diff --git a/src/net/ea/gamehandler.h b/src/net/ea/gamehandler.h index 6d8b88bd4..511efe357 100644 --- a/src/net/ea/gamehandler.h +++ b/src/net/ea/gamehandler.h @@ -29,12 +29,6 @@ #include "net/messagein.h" #include "net/net.h" -#ifdef __GNUC__ -#define A_UNUSED __attribute__ ((unused)) -#else -#define A_UNUSED -#endif - namespace Ea { diff --git a/src/net/ea/guildhandler.h b/src/net/ea/guildhandler.h index 06edb2e89..5b090ec41 100644 --- a/src/net/ea/guildhandler.h +++ b/src/net/ea/guildhandler.h @@ -27,12 +27,6 @@ #include "net/ea/gui/guildtab.h" -#ifdef __GNUC__ -#define A_UNUSED __attribute__ ((unused)) -#else -#define A_UNUSED -#endif - namespace Ea { diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h index d99e34fc6..6db6b18ed 100644 --- a/src/net/ea/inventoryhandler.h +++ b/src/net/ea/inventoryhandler.h @@ -38,12 +38,6 @@ #include <vector> #include <queue> -#ifdef __GNUC__ -#define A_UNUSED __attribute__ ((unused)) -#else -#define A_UNUSED -#endif - namespace Ea { diff --git a/src/net/ea/loginhandler.h b/src/net/ea/loginhandler.h index 06c47ad5d..62ace31c8 100644 --- a/src/net/ea/loginhandler.h +++ b/src/net/ea/loginhandler.h @@ -31,12 +31,6 @@ #include <string> -#ifdef __GNUC__ -#define A_UNUSED __attribute__ ((unused)) -#else -#define A_UNUSED -#endif - class LoginData; namespace Ea diff --git a/src/net/ea/npchandler.h b/src/net/ea/npchandler.h index 44c1c5fb3..3e68c2321 100644 --- a/src/net/ea/npchandler.h +++ b/src/net/ea/npchandler.h @@ -29,12 +29,6 @@ #include <map> -#ifdef __GNUC__ -#define A_UNUSED __attribute__ ((unused)) -#else -#define A_UNUSED -#endif - class NpcDialog; namespace Ea diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index 5fa0df29b..8373cb1c4 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -225,6 +225,7 @@ void PartyHandler::processPartySettings(Net::MessageIn &msg) return; Ea::partyTab = new PartyTab(); + Ea::partyTab->loadFromLogFile("#Party"); } // These seem to indicate the sharing mode for exp and items diff --git a/src/net/ea/partyhandler.h b/src/net/ea/partyhandler.h index 6ba0d0b82..596fda4f7 100644 --- a/src/net/ea/partyhandler.h +++ b/src/net/ea/partyhandler.h @@ -29,12 +29,6 @@ #include "party.h" -#ifdef __GNUC__ -#define A_UNUSED __attribute__ ((unused)) -#else -#define A_UNUSED -#endif - namespace Ea { diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h index 57bcbdcd5..ceb4aba0b 100644 --- a/src/net/ea/playerhandler.h +++ b/src/net/ea/playerhandler.h @@ -27,12 +27,6 @@ #include "net/net.h" #include "net/playerhandler.h" -#ifdef __GNUC__ -#define A_UNUSED __attribute__ ((unused)) -#else -#define A_UNUSED -#endif - namespace Ea { diff --git a/src/net/ea/specialhandler.h b/src/net/ea/specialhandler.h index 06e8f8893..47b412f3e 100644 --- a/src/net/ea/specialhandler.h +++ b/src/net/ea/specialhandler.h @@ -27,12 +27,6 @@ #include "net/net.h" #include "net/specialhandler.h" -#ifdef __GNUC__ -#define A_UNUSED __attribute__ ((unused)) -#else -#define A_UNUSED -#endif - namespace Ea { diff --git a/src/net/ea/tradehandler.h b/src/net/ea/tradehandler.h index 2a27f8c31..6d623f60d 100644 --- a/src/net/ea/tradehandler.h +++ b/src/net/ea/tradehandler.h @@ -27,12 +27,6 @@ #include "net/net.h" #include "net/tradehandler.h" -#ifdef __GNUC__ -#define A_UNUSED __attribute__ ((unused)) -#else -#define A_UNUSED -#endif - namespace Ea { |