mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-09-28 18:57:35 +00:00
Rewrote DB to use ORM, added all remaining features to LoginServer and refactored it
This commit is contained in:
@@ -686,4 +686,28 @@ WarpLocation PlayerManager::getRespawnPoint(Player *plr) {
|
||||
|
||||
return best;
|
||||
}
|
||||
bool PlayerManager::isAccountInUse(int accountId) {
|
||||
std::map<CNSocket*, PlayerView>::iterator it;
|
||||
for (it = PlayerManager::players.begin(); it != PlayerManager::players.end(); it++)
|
||||
{
|
||||
if (it->second.plr->accountId == accountId)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void PlayerManager::exitDuplicate(int accountId) {
|
||||
std::map<CNSocket*, PlayerView>::iterator it;
|
||||
for (it = PlayerManager::players.begin(); it != PlayerManager::players.end(); it++)
|
||||
{
|
||||
if (it->second.plr->accountId == accountId)
|
||||
{
|
||||
CNSocket* sock = it->first;
|
||||
INITSTRUCT(sP_FE2CL_REP_PC_EXIT_DUPLICATE, resp);
|
||||
resp.iErrorCode = 0;
|
||||
sock->sendPacket((void*)&resp, P_FE2CL_REP_PC_EXIT_DUPLICATE, sizeof(sP_FE2CL_REP_PC_EXIT_DUPLICATE));
|
||||
sock->kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma endregion
|
||||
|
Reference in New Issue
Block a user