created callback in Root and changed CheckMultiLogin() to use the DoWithPlayer function at Root instead of World.
This commit is contained in:
parent
6de07d4a39
commit
e28cc876c4
|
@ -1807,7 +1807,7 @@ bool cClientHandle::CheckMultiLogin(const AString & a_Username)
|
||||||
}
|
}
|
||||||
} Callback;
|
} Callback;
|
||||||
|
|
||||||
if (cRoot::Get()->GetDefaultWorld()->DoWithPlayer(a_Username, Callback))
|
if (cRoot::Get()->DoWithPlayer(a_Username, Callback))
|
||||||
{
|
{
|
||||||
Kick("A player of the username is already logged in");
|
Kick("A player of the username is already logged in");
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -651,7 +651,14 @@ bool cRoot::DoWithPlayerByUUID(const AString & a_PlayerUUID, cPlayerListCallback
|
||||||
|
|
||||||
bool cRoot::DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback)
|
bool cRoot::DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback)
|
||||||
{
|
{
|
||||||
|
for (WorldMap::iterator itr = m_WorldsByName.begin(); itr != m_WorldsByName.end(); itr++)
|
||||||
|
{
|
||||||
|
if (itr->second->DoWithPlayer(a_PlayerName, a_Callback))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user