summaryrefslogtreecommitdiff
path: root/src/gui/charselectdialog.h
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-12-16 16:36:03 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-12-16 18:33:44 +0100
commit555862b34ccbbdbcd44241a00ec168a6a2716411 (patch)
tree78fb2393f1a7c66a9670227cf28605250cc0edd9 /src/gui/charselectdialog.h
parente78ed334abc80578346dbef8a8b995c99dcfee7b (diff)
downloadMana-555862b34ccbbdbcd44241a00ec168a6a2716411.tar.gz
Mana-555862b34ccbbdbcd44241a00ec168a6a2716411.tar.bz2
Mana-555862b34ccbbdbcd44241a00ec168a6a2716411.tar.xz
Mana-555862b34ccbbdbcd44241a00ec168a6a2716411.zip
Made the client handle the number of slots given by the server.
I turned the CharacterEntries into a vector. As for now, it's basically working but I discovered bugs about slots handling mainly for Manaserv that were already present before that patch. Hence, there are three remaining issues: - Under ManaServ, the character's slots numbers aren't handled when loading the characters but used when sending selection or deletion attempts. For instance, if you delete the character at slot 1, you won't be able to select or delete characters at slots 2 and 3, since the server believes that the characters are now in slots 1 and 2, even thought the client still displays them at the former slots. - Also under manaserv, you won't be able to create a character at slot 1 and 3, the server will automatically add the new one to the next slot, which is not corresponding to where you clicked to the 'Create' button. I propose to make Manaserv send again the character slots numbers and store them in database since we used them in creation, selection, and deletion attempts. It would make more sense IMHO. - The last remaining issue found is that when switching between different servers, the loginData don't get cleaned up, make the characterSelect dialog look crazy when the number of slots is different between two servers. If this one is accepted, my next patch will make the logindata be cleaned up between each login attempts (as for the slot number, and maybe other sensible data) and the next ones will readd character slot handling server and client side. Reviewed-by: Jaxad0127.
Diffstat (limited to 'src/gui/charselectdialog.h')
-rw-r--r--src/gui/charselectdialog.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/charselectdialog.h b/src/gui/charselectdialog.h
index 2c0444bf..455ec2df 100644
--- a/src/gui/charselectdialog.h
+++ b/src/gui/charselectdialog.h
@@ -96,8 +96,8 @@ class CharSelectDialog : public Window, public gcn::ActionListener,
gcn::Button *mUnregisterButton;
gcn::Button *mChangeEmailButton;
- enum { MAX_CHARACTER_COUNT = 3 };
- CharacterDisplay *mCharacterEntries[MAX_CHARACTER_COUNT];
+ /** The player boxes */
+ std::vector<CharacterDisplay*> mCharacterEntries;
LoginData *mLoginData;