Implement banned_addons (#647)

This commit is contained in:
barncastle
2017-09-17 16:13:43 +01:00
committed by Francesco Borzì
parent cf627d8327
commit 2c9b2542d6
5 changed files with 108 additions and 2 deletions

View File

@@ -1077,7 +1077,16 @@ void WorldSession::SendAddonsInfo()
m_addonsList.clear();
data << uint32(0); // count for an unknown for loop
AddonMgr::BannedAddonList const* bannedAddons = AddonMgr::GetBannedAddons();
data << uint32(bannedAddons->size());
for (AddonMgr::BannedAddonList::const_iterator itr = bannedAddons->begin(); itr != bannedAddons->end(); ++itr)
{
data << uint32(itr->Id);
data.append(itr->NameMD5, sizeof(itr->NameMD5));
data.append(itr->VersionMD5, sizeof(itr->VersionMD5));
data << uint32(itr->Timestamp);
data << uint32(1); // IsBanned
}
SendPacket(&data);
}