aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Guilds/Guild.cpp
diff options
context:
space:
mode:
authorKittnz <Kittnz@users.noreply.github.com>2018-09-16 13:17:03 +0200
committerjackpoz <giacomopoz@gmail.com>2018-09-16 13:17:03 +0200
commit9f945d2f426d66a7081b6b0efce6eece3a315181 (patch)
tree767ccfa7f72abf01ede9126db2a5115d5ccf2c4d /src/server/game/Guilds/Guild.cpp
parent0d1eed5dabdc86e4a7ae2d5dfc8f5c17636f69a1 (diff)
Core/Guild: Implement character gender and send in packet. (#22436)
Closes #22433 Credit xvwyh
Diffstat (limited to 'src/server/game/Guilds/Guild.cpp')
-rw-r--r--src/server/game/Guilds/Guild.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp
index 80aad9478ea..d2ab24bea8f 100644
--- a/src/server/game/Guilds/Guild.cpp
+++ b/src/server/game/Guilds/Guild.cpp
@@ -614,6 +614,7 @@ Guild::Member::Member(ObjectGuid::LowType guildId, ObjectGuid guid, uint8 rankId
m_zoneId(0),
m_level(0),
m_class(0),
+ m_gender(0),
m_flags(GUILDMEMBER_STATUS_NONE),
m_logoutTime(GameTime::GetGameTime()),
m_accountId(0),
@@ -627,15 +628,17 @@ void Guild::Member::SetStats(Player* player)
m_name = player->GetName();
m_level = player->getLevel();
m_class = player->getClass();
+ m_gender = player->getGender();
m_zoneId = player->GetZoneId();
m_accountId = player->GetSession()->GetAccountId();
}
-void Guild::Member::SetStats(std::string const& name, uint8 level, uint8 _class, uint32 zoneId, uint32 accountId)
+void Guild::Member::SetStats(std::string const& name, uint8 level, uint8 _class, uint8 gender, uint32 zoneId, uint32 accountId)
{
m_name = name;
m_level = level;
m_class = _class;
+ m_gender = gender;
m_zoneId = zoneId;
m_accountId = accountId;
}
@@ -710,9 +713,10 @@ bool Guild::Member::LoadFromDB(Field* fields)
SetStats(fields[12].GetString(),
fields[13].GetUInt8(), // characters.level
fields[14].GetUInt8(), // characters.class
- fields[15].GetUInt16(), // characters.zone
- fields[16].GetUInt32()); // characters.account
- m_logoutTime = fields[17].GetUInt32(); // characters.logout_time
+ fields[15].GetUInt8(), // characters.gender
+ fields[16].GetUInt16(), // characters.zone
+ fields[17].GetUInt32()); // characters.account
+ m_logoutTime = fields[18].GetUInt32(); // characters.logout_time
if (!CheckStats())
return false;
@@ -752,7 +756,7 @@ void Guild::Member::WritePacket(WorldPacket& data, bool sendOfficerNote) const
<< uint32(m_rankId)
<< uint8(m_level)
<< uint8(m_class)
- << uint8(0)
+ << uint8(m_gender)
<< uint32(m_zoneId);
if (!m_flags)
@@ -2325,8 +2329,9 @@ bool Guild::AddMember(SQLTransaction& trans, ObjectGuid guid, uint8 rankId)
name,
fields[1].GetUInt8(),
fields[2].GetUInt8(),
- fields[3].GetUInt16(),
- fields[4].GetUInt32());
+ fields[3].GetUInt8(),
+ fields[4].GetUInt16(),
+ fields[5].GetUInt32());
ok = member->CheckStats();
}