1
0

renamed FindAndDoWithUUID to DoWithPlayerByUUID, fixed style and comments, added description to APIDump

This commit is contained in:
Lukas Pioch
2014-11-05 21:57:38 +01:00
parent 269d76a208
commit 13b20d6fe2
6 changed files with 13 additions and 10 deletions

View File

@@ -2729,12 +2729,13 @@ bool cWorld::FindAndDoWithPlayer(const AString & a_PlayerNameHint, cPlayerListCa
bool cWorld::FindAndDoWithUUID(const AString & a_PlayerUUID, cPlayerListCallback & a_Callback)
bool cWorld::DoWithPlayerByUUID(const AString & a_PlayerUUID, cPlayerListCallback & a_Callback)
{
cCSLock Lock(m_CSPlayers);
for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
if ((*itr)->GetUUID() == a_PlayerUUID) { // Match found and exit
if ((*itr)->GetUUID() == a_PlayerUUID)
{
return a_Callback.Item (*itr);
}
}