Core/Guilds: Implemented basic guild leveling (no player statistics/reputation)

This commit is contained in:
Shauren
2012-09-07 14:39:19 +02:00
parent 19b400761d
commit 6ca7a7b78d
21 changed files with 464 additions and 103 deletions

View File

@@ -928,12 +928,13 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
pCurrChar->SetInGuild(fields[0].GetUInt32());
pCurrChar->SetRank(fields[1].GetUInt8());
if (Guild* guild = sGuildMgr->GetGuildById(pCurrChar->GetGuildId()))
pCurrChar->SetUInt32Value(PLAYER_GUILDLEVEL, guild->GetLevel());
pCurrChar->SetGuildLevel(guild->GetLevel());
}
else if (pCurrChar->GetGuildId()) // clear guild related fields in case wrong data about non existed membership
{
pCurrChar->SetInGuild(0);
pCurrChar->SetRank(0);
pCurrChar->SetGuildLevel(0);
}
data.Initialize(SMSG_LEARNED_DANCE_MOVES, 4+4);