mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[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:
parent
d0ea9cbb23
commit
1ad9adc467
4 changed files with 29 additions and 16 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue