Core/Guild: Handle changing the leader in one db transaction

This commit is contained in:
hondacrx
2018-04-22 16:00:48 -04:00
parent 783ad9b9e1
commit f36bb5767a
3 changed files with 32 additions and 32 deletions
+2 -6
View File
@@ -676,7 +676,7 @@ namespace Game
if (!resultGuild.IsEmpty())
{
pCurrChar.SetInGuild(resultGuild.Read<uint>(0));
pCurrChar.SetRank(resultGuild.Read<byte>(1));
pCurrChar.SetGuildRank(resultGuild.Read<byte>(1));
Guild guild = Global.GuildMgr.GetGuildById(pCurrChar.GetGuildId());
if (guild)
pCurrChar.SetGuildLevel(guild.GetLevel());
@@ -684,14 +684,10 @@ namespace Game
else if (pCurrChar.GetGuildId() != 0)
{
pCurrChar.SetInGuild(0);
pCurrChar.SetRank(0);
pCurrChar.SetGuildRank(0);
pCurrChar.SetGuildLevel(0);
}
//WorldPacket data = new WorldPacket(ServerOpcodes.LearnedDanceMoves);
//data.WriteUInt64(0);
//SendPacket(data);
// TODO: Move this to BattlePetMgr::SendJournalLock() just to have all packets in one file
SendPacket(new BattlePetJournalLockAcquired());