fix(Core/Guild): Implement gender in guild (#4017)

This commit is contained in:
Kitzunu
2020-12-24 22:38:56 +01:00
committed by GitHub
parent 6a95e61801
commit 1ed80e9596
4 changed files with 17 additions and 11 deletions

View File

@@ -592,15 +592,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;
}
@@ -670,9 +672,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;
@@ -711,7 +714,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)
@@ -2257,8 +2260,9 @@ bool Guild::AddMember(uint64 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();
}