summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-01-12 03:28:11 +0200
committerAndrei Karas <akaras@inbox.ru>2011-01-12 03:28:11 +0200
commitbb030b5e646c0cd3fd973a412d0b875049e8e98e (patch)
treefb05187e2c0bb9b145e30cca96858e6f3e4abe16 /src/net
parent1e0e3d54319f14859c09e41cb7ae640f76d41f1e (diff)
downloadmv-bb030b5e646c0cd3fd973a412d0b875049e8e98e.tar.gz
mv-bb030b5e646c0cd3fd973a412d0b875049e8e98e.tar.bz2
mv-bb030b5e646c0cd3fd973a412d0b875049e8e98e.tar.xz
mv-bb030b5e646c0cd3fd973a412d0b875049e8e98e.zip
Increase default chat slots number for tAthena/evol from 3 to 9.
Add reading real slots number from server (evol).
Diffstat (limited to 'src/net')
-rw-r--r--src/net/logindata.h2
-rw-r--r--src/net/tmwa/charserverhandler.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/net/logindata.h b/src/net/logindata.h
index 5617cea32..385ef9beb 100644
--- a/src/net/logindata.h
+++ b/src/net/logindata.h
@@ -88,7 +88,7 @@ class LoginData
*/
void resetCharacterSlots()
{
- characterSlots = 3; // Default value, used for TmwAthena.
+ characterSlots = 9; // Default value, used for TmwAthena.
}
};
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index bda67da21..500f6b36a 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -78,7 +78,10 @@ void CharServerHandler::handleMessage(Net::MessageIn &msg)
case SMSG_CHAR_LOGIN:
{
msg.skip(2); // Length word
- msg.skip(20); // Unused
+ int slots = msg.readInt16();
+ if (slots > 0 && slots < 30)
+ loginData.characterSlots = slots;
+ msg.skip(18); // Unused
delete_all(mCharacters);
mCharacters.clear();