mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[10301] Init guild create date at create in same value in memory and DB.
This commit is contained in:
parent
4f19017872
commit
e082e29bcc
3 changed files with 5 additions and 5 deletions
|
|
@ -42,7 +42,7 @@ Guild::Guild()
|
|||
m_BackgroundColor = 0;
|
||||
m_accountsNumber = 0;
|
||||
|
||||
m_CreatedDate = time(0);
|
||||
m_CreatedDate = 0;
|
||||
|
||||
m_GuildBankMoney = 0;
|
||||
|
||||
|
|
@ -72,6 +72,7 @@ bool Guild::Create(Player* leader, std::string gname)
|
|||
MOTD = "No message set.";
|
||||
m_GuildBankMoney = 0;
|
||||
m_Id = sObjectMgr.GenerateGuildId();
|
||||
m_CreatedDate = time(0);
|
||||
|
||||
DEBUG_LOG("GUILD: creating guild %s to leader: %u", gname.c_str(), GUID_LOPART(m_LeaderGuid));
|
||||
|
||||
|
|
@ -87,8 +88,8 @@ bool Guild::Create(Player* leader, std::string gname)
|
|||
// CharacterDatabase.PExecute("DELETE FROM guild WHERE guildid='%u'", Id); - MAX(guildid)+1 not exist
|
||||
CharacterDatabase.PExecute("DELETE FROM guild_member WHERE guildid='%u'", m_Id);
|
||||
CharacterDatabase.PExecute("INSERT INTO guild (guildid,name,leaderguid,info,motd,createdate,EmblemStyle,EmblemColor,BorderStyle,BorderColor,BackgroundColor,BankMoney) "
|
||||
"VALUES('%u','%s','%u', '%s', '%s', UNIX_TIMESTAMP(NOW()),'%u','%u','%u','%u','%u','" UI64FMTD "')",
|
||||
m_Id, gname.c_str(), GUID_LOPART(m_LeaderGuid), dbGINFO.c_str(), dbMOTD.c_str(), m_EmblemStyle, m_EmblemColor, m_BorderStyle, m_BorderColor, m_BackgroundColor, m_GuildBankMoney);
|
||||
"VALUES('%u','%s','%u', '%s', '%s','" UI64FMTD "','%u','%u','%u','%u','%u','" UI64FMTD "')",
|
||||
m_Id, gname.c_str(), GUID_LOPART(m_LeaderGuid), dbGINFO.c_str(), dbMOTD.c_str(), uint64(m_CreatedDate), m_EmblemStyle, m_EmblemColor, m_BorderStyle, m_BorderColor, m_BackgroundColor, m_GuildBankMoney);
|
||||
CharacterDatabase.CommitTransaction();
|
||||
|
||||
CreateDefaultGuildRanks(lSession->GetSessionDbLocaleIndex());
|
||||
|
|
|
|||
|
|
@ -231,7 +231,6 @@ void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/)
|
|||
data << uint32(secsToTimeBitFields(guild->GetCreatedDate())); // 3.x (prev. day + month + year)
|
||||
data << uint32(guild->GetMemberSize()); // amount of chars
|
||||
data << uint32(guild->GetAccountsNumber()); // amount of accounts
|
||||
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10300"
|
||||
#define REVISION_NR "10301"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue