HOTFIX: Patched the stupid auto& for loop with the jenky pattern
This commit is contained in:
@@ -92,9 +92,13 @@ void ServerApplication::FullClientUnload(int index) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//unload associated accounts
|
//unload associated accounts
|
||||||
for (auto& it : *accountMgr.GetContainer()) {
|
for (std::map<int, AccountData>::iterator it = accountMgr.GetContainer()->begin(); it != accountMgr.GetContainer()->end(); /* EMPTY */) {
|
||||||
if (it.second.GetClientIndex() == index) {
|
if (it->second.GetClientIndex() == index) {
|
||||||
FullAccountUnload(it.first);
|
FullAccountUnload(it->first);
|
||||||
|
it = accountMgr.GetContainer()->begin();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
++it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,9 +115,13 @@ void ServerApplication::FullAccountUnload(int index) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//unload associated characters
|
//unload associated characters
|
||||||
for (auto& it : *characterMgr.GetContainer()) {
|
for (std::map<int, CharacterData>::iterator it = characterMgr.GetContainer()->begin(); it != characterMgr.GetContainer()->end(); /* EMPTY */) {
|
||||||
if (it.second.GetOwner() == index) {
|
if (it->second.GetOwner() == index) {
|
||||||
FullCharacterUnload(it.first);
|
FullCharacterUnload(it->first);
|
||||||
|
it = characterMgr.GetContainer()->begin();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
++it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user