Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Konstruktor des AccountHandlers angefangen zu implementieren.

  • Loading branch information...
commit f0ec5131099dc38fa1876f1ed24ddd22b3d1ff83 1 parent 64a4e8a
@seeseekey seeseekey authored
Showing with 14 additions and 18 deletions.
  1. +14 −18 invertika-account/Account/AccountHandler.cs
View
32 invertika-account/Account/AccountHandler.cs
@@ -59,28 +59,24 @@ public class AccountHandler : ConnectionHandler
Dictionary<int, DateTime> mLastLoginAttemptForIP;
- /**
- * Token collector for connecting a client coming from a game server
- * without having to provide username and password a second time.
- */
+ //Token collector for connecting a client coming from a game server
+ //without having to provide username and password a second time.
public TokenCollector<AccountHandler, AccountClient, int> mTokenCollector;
public AccountHandler(string attributesFile)
- //mTokenCollector(this),
- //mStartingPoints(0),
- //mAttributeMinimum(0),
- //mAttributeMaximum(0),
- //mNumHairStyles(Configuration::getValue("char_numHairStyles", 17)),
- //mNumHairColors(Configuration::getValue("char_numHairColors", 11)),
- //mNumGenders(Configuration::getValue("char_numGenders", 2)),
- //mMinNameLength(Configuration::getValue("char_minNameLength", 4)),
- //mMaxNameLength(Configuration::getValue("char_maxNameLength", 25)),
- //mMaxCharacters(Configuration::getValue("account_maxCharacters", 3)),
- //mRegistrationAllowed(Configuration::getBoolValue("account_allowRegister", true)),
- //mUpdateHost(Configuration::getValue("net_defaultUpdateHost", std::string())),
- //mDataUrl(Configuration::getValue("net_clientDataUrl", std::string()))
{
+ mTokenCollector=new TokenCollector<AccountHandler, AccountClient, int>();
+ mNumHairStyles=Configuration.getValue("char_numHairStyles", 17);
+ mNumHairColors=Configuration.getValue("char_numHairColors", 11);
+ mNumGenders=Configuration.getValue("char_numGenders", 2);
+ mMinNameLength=(uint)Configuration.getValue("char_minNameLength", 4);
+ mMaxNameLength=(uint)Configuration.getValue("char_maxNameLength", 25);
+ mMaxCharacters=Configuration.getValue("account_maxCharacters", 3);
+ mRegistrationAllowed=Configuration.getBoolValue("account_allowRegister", true);
+ mUpdateHost=Configuration.getValue("net_defaultUpdateHost", "");
+ mDataUrl=Configuration.getValue("net_clientDataUrl", "");
+
//XML::Document doc(attributesFile);
//xmlNodePtr node = doc.rootNode();
@@ -856,7 +852,7 @@ void tokenMatched(AccountClient client, int accountID)
client.send(reply);
// Return information about available characters
- Dictionary<uint, Character> chars = acc.getCharacters();
+ Dictionary<uint, Character> chars=acc.getCharacters();
// Send characters list
foreach(Character character in chars.Values)
Please sign in to comment.
Something went wrong with that request. Please try again.