Characters are working correctly again

This commit is contained in:
Kayne Ruse
2014-06-14 23:13:11 +10:00
parent c021032512
commit a23fbbfb38
5 changed files with 14 additions and 19 deletions
-8
View File
@@ -29,9 +29,6 @@
#include <iostream>
#include <string>
using std::cout;
using std::endl;
//-------------------------
//public methods
//-------------------------
@@ -244,8 +241,6 @@ void ServerApplication::HandleBroadcastRequest(SerialPacket* const argPacket) {
}
void ServerApplication::HandleJoinRequest(ClientPacket* const argPacket) {
cout << "Attempting connection: " << argPacket->username << endl;
//create the new client
ClientData newClient;
newClient.address = argPacket->srcAddress;
@@ -273,7 +268,6 @@ void ServerApplication::HandleJoinRequest(ClientPacket* const argPacket) {
}
void ServerApplication::HandleDisconnect(ClientPacket* const argPacket) {
cout << "Trying to disconnect account " << argPacket->accountIndex << endl;
//TODO: authenticate who is disconnecting/kicking
//forward to the specified client
@@ -287,10 +281,8 @@ void ServerApplication::HandleDisconnect(ClientPacket* const argPacket) {
characterMgr.UnloadCharacterIf([&](std::map<int, CharacterData>::iterator it) -> bool {
if (argPacket->accountIndex == it->second.owner) {
PumpCharacterUnload(it->first);
cout << "Deleting character " << it->first << endl;
return true;
}
cout << "Not deleting character " << it->first << endl;
return false;
});