fix(Core/SpellAuras): Show auras to client limit (#3193)

Co-authored-by: Pascal Bachor <gerhood@users.noreply.github.com>
This commit is contained in:
Kitzunu
2020-08-22 10:34:12 +02:00
committed by GitHub
parent 5a5ece6d98
commit dd40e2e844
3 changed files with 7 additions and 7 deletions

View File

@@ -866,7 +866,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player* player, WorldPacke
{
uint64 auramask = player->GetAuraUpdateMaskForRaid();
*data << uint64(auramask);
for (uint32 i = 0; i < MAX_AURAS; ++i)
for (uint32 i = 0; i < MAX_AURAS_GROUP_UPDATE; ++i)
{
if (auramask & (uint64(1) << i))
{
@@ -948,7 +948,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player* player, WorldPacke
{
uint64 auramask = pet->GetAuraUpdateMaskForRaid();
*data << uint64(auramask);
for (uint32 i = 0; i < MAX_AURAS; ++i)
for (uint32 i = 0; i < MAX_AURAS_GROUP_UPDATE; ++i)
{
if (auramask & (uint64(1) << i))
{
@@ -1050,7 +1050,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recvData)
uint64 auraMask = 0;
size_t maskPos = data.wpos();
data << uint64(auraMask); // placeholder
for (uint8 i = 0; i < MAX_AURAS; ++i)
for (uint8 i = 0; i < MAX_AURAS_GROUP_UPDATE; ++i)
{
if (AuraApplication const* aurApp = player->GetVisibleAura(i))
{
@@ -1088,7 +1088,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recvData)
data << uint64(petAuraMask); // placeholder
if (pet)
{
for (uint8 i = 0; i < MAX_AURAS; ++i)
for (uint8 i = 0; i < MAX_AURAS_GROUP_UPDATE; ++i)
{
if (AuraApplication const* aurApp = pet->GetVisibleAura(i))
{

View File

@@ -6,7 +6,8 @@
#ifndef ACORE_SPELLAURADEFINES_H
#define ACORE_SPELLAURADEFINES_H
#define MAX_AURAS 64 // client support up to 255, but it will cause problems with group auras updating
#define MAX_AURAS 255 // Client Limit
#define MAX_AURAS_GROUP_UPDATE 64 // Limit of SMSG_PARY_MEMBER_STATS_FULL and SMSG_PARTY_MEMBER_STATS
enum AURA_FLAGS
{

View File

@@ -71,11 +71,10 @@ _flags(AFLAG_NONE), _effectsToApply(effMask), _needClientUpdate(false), _disable
}
else {
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask());
sLog->outError(LOG_FILTER_SPELLS_AURAS, "Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask());
#endif
}
}
_InitFlags(caster, effMask);
}