[6865] Improve db access in guild and arena team code.

Note: Using SetUInt32ValueInDB() is still not safe, because it's executed async.
Three possible solutions:
1) remove data field
2) get rid of SetUInt32ValueInDB() calls (probably not possible)
3) make SaveValuesArrayInDB() executed directly
This commit is contained in:
hunuza 2008-11-30 13:15:05 +01:00
parent d0ea9cbb23
commit 1ad9adc467
4 changed files with 29 additions and 16 deletions

View file

@ -567,8 +567,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
{
// remove wrong guild data
sLog.outError("Player %s (GUID: %u) marked as member not existed guild (id: %u), removing guild membership for player.",pCurrChar->GetName(),pCurrChar->GetGUIDLow(),pCurrChar->GetGuildId());
pCurrChar->SetUInt32Value(PLAYER_GUILDID,0);
pCurrChar->SetUInt32ValueInDB(PLAYER_GUILDID,0,pCurrChar->GetGUID());
pCurrChar->SetInGuild(0);
}
}