Core/Guilds: fixed small logical error when counting total loaded guilds

--HG--
branch : trunk
This commit is contained in:
azazel
2010-10-19 18:50:50 +06:00
parent b7b65eacf2
commit db04f13777
+8 -5
View File
@@ -3739,13 +3739,16 @@ void ObjectMgr::LoadGuilds()
{ {
barGuilds.step(); barGuilds.step();
Guild* pGuild = *itr; Guild* pGuild = *itr;
if (pGuild && !pGuild->Validate()) if (pGuild)
{ {
RemoveGuild(pGuild->GetId()); if (!pGuild->Validate())
delete pGuild; {
RemoveGuild(pGuild->GetId());
delete pGuild;
}
else
++totalGuilds;
} }
else
++totalGuilds;
} }
// Cleanup // Cleanup
// Delete orphan guild ranks // Delete orphan guild ranks