Fix SMSG_GUILD_INFO (/guildinfo command)

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-03-19 14:47:08 +01:00
parent 9d5049da94
commit a77ba0bf56
3 changed files with 5 additions and 18 deletions
+2 -9
View File
@@ -44,9 +44,7 @@ Guild::Guild()
m_BorderColor = 0;
m_BackgroundColor = 0;
m_CreatedYear = 0;
m_CreatedMonth = 0;
m_CreatedDay = 0;
m_CreatedDate = time(NULL);
m_GuildBankMoney = 0;
m_PurchasedTabs = 0;
@@ -232,12 +230,7 @@ bool Guild::LoadGuildFromDB(QueryResult_AutoPtr guildDataResult)
m_PurchasedTabs = GUILD_BANK_MAX_TABS;
if (time > 0)
{
tm local = *(localtime(&time)); // dereference and assign
m_CreatedDay = local.tm_mday;
m_CreatedMonth = local.tm_mon + 1;
m_CreatedYear = local.tm_year + 1900;
}
m_CreatedDate = time;
return true;
}
+2 -6
View File
@@ -302,9 +302,7 @@ class Guild
std::string const& GetMOTD() const { return MOTD; }
std::string const& GetGINFO() const { return GINFO; }
uint32 GetCreatedYear() const { return m_CreatedYear; }
uint32 GetCreatedMonth() const { return m_CreatedMonth; }
uint32 GetCreatedDay() const { return m_CreatedDay; }
time_t GetCreatedDate() const { return m_CreatedDate; }
uint32 GetEmblemStyle() const { return m_EmblemStyle; }
uint32 GetEmblemColor() const { return m_EmblemColor; }
@@ -437,9 +435,7 @@ class Guild
uint64 m_LeaderGuid;
std::string MOTD;
std::string GINFO;
uint32 m_CreatedYear;
uint32 m_CreatedMonth;
uint32 m_CreatedDay;
time_t m_CreatedDate;
uint32 m_EmblemStyle;
uint32 m_EmblemColor;
+1 -3
View File
@@ -242,9 +242,7 @@ void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/)
WorldPacket data(SMSG_GUILD_INFO, (5*4 + guild->GetName().size() + 1));
data << guild->GetName();
data << guild->GetCreatedDay();
data << guild->GetCreatedMonth();
data << guild->GetCreatedYear();
data << secsToTimeBitFields(guild->GetCreatedDate());
data << guild->GetMemberSize();
data << guild->GetMemberSize();