Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.3.5][6.x] Core/AuraApplication: Limitation to 64 aura slots. #17051

Closed
ccrs opened this issue Apr 27, 2016 · 14 comments
Closed

[3.3.5][6.x] Core/AuraApplication: Limitation to 64 aura slots. #17051

ccrs opened this issue Apr 27, 2016 · 14 comments

Comments

@ccrs
Copy link
Member

ccrs commented Apr 27, 2016

Description:
There is a limit to 64 maximum visible auras for each unit.
At least for 3.3.5, the limit should be at 255.

Branch(es): 335/6x

TC hash/commit: b82ffb8

TDB version: TDB 335.61

Linking model: static

@Aokromes
Copy link
Member

According comments on code no. Unless you have proff for it.

@ccrs
Copy link
Member Author

ccrs commented Apr 27, 2016

@ccrs
Copy link
Member Author

ccrs commented Apr 27, 2016

Players can't see their owned auras on their targets, making something easy as updating DoTs really hard.

@sirikfoll
Copy link
Contributor

Players can't see their owned auras on their targets, making something easy as updating DoTs really hard.

That's true and really annoying(easily seen in Deathbringer Saurfang fight).
I haven't saw any proof that this bug existed in retail.

@DDuarte
Copy link
Contributor

DDuarte commented Apr 27, 2016

Conversation on IRC regarding this issue few days ago:

[2016-04-21 19:36:19] <WishToDie> Shauren: any way to increase aura's shown on npcs?
[2016-04-21 19:36:24] <WishToDie> seems 64 is too small?
[2016-04-21 19:38:45] <WishToDie> this: https://github.com/TrinityCore/TrinityCore/blob/6.x/src/server/game/Spells/Auras/SpellAuraDefines.h#L21
[2016-04-21 19:39:05] <WishToDie> just changint it to 128 will cause bad packets being sent to players
[2016-04-21 19:39:07] <WishToDie> i tested
[2016-04-21 19:39:54] <Aokromes> iirc that 64 comes from wikipedia
[2016-04-21 19:40:09] <Aokromes> err wowwiki
[2016-04-21 19:41:03] <vincent_michael> [20:36:41] <%WishToDie> Shauren: any way to increase aura's shown on npcs?
[2016-04-21 19:41:03] <vincent_michael> i think auras need order
[2016-04-21 19:46:09] <WishToDie> Aokromes: got a link pls?
[2016-04-21 19:46:26] <Aokromes> WishToDie i am searching
[2016-04-21 19:46:31] <WishToDie> kk
[2016-04-21 19:52:22] <Shauren> WishToDie: branch?
[2016-04-21 19:52:26] <WishToDie> 335
[2016-04-21 19:52:38] <Shauren> you cant
[2016-04-21 19:53:11] <WishToDie> :(
[2016-04-21 19:53:24] <Shauren> right here
[2016-04-21 19:53:25] <Shauren> https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Handlers/GroupHandler.cpp#L793
[2016-04-21 19:53:28] <Shauren> limit comes from this
[2016-04-21 19:59:20] <Aokromes> https://github.com/cmangos/mangos-wotlk/commit/f4d6fe324bc4bcf72071ccfdc469bf064f09d890#diff-2980f5813abe413db035fdeb5a6c175bL19
[2016-04-21 19:59:26] <Aokromes> but no word on source
[2016-04-21 20:06:42] <WishToDie> VM has a good idea
[2016-04-21 20:06:49] <WishToDie> is it possible to order them?
[2016-04-21 20:06:59] <WishToDie> so each player can see his auras first?
[2016-04-21 20:07:24] <Shauren> not a good idea
[2016-04-21 20:07:36] <Shauren> you would need to keep track which player sees which slot
[2016-04-21 20:07:44] <Shauren> in every aura.
[2016-04-21 20:08:36] <WishToDie> damn :(
[2016-04-21 20:13:34] <Shauren> but
[2016-04-21 20:13:41] <Shauren> i think we should sort auras
[2016-04-21 20:13:56] <Nayd> by what? spell id?
[2016-04-21 20:14:02] <Shauren> by attributes
[2016-04-21 20:14:19] <Nayd> there are attributes that define the order?
[2016-04-21 20:14:29] <Shauren> auras not passing "show client icon" check should get slots > 64
[2016-04-21 20:14:45] <Shauren> since the lua function UnitAura is limited to 64 slots
[2016-04-21 20:15:02] <Shauren> hidden_clientside is not the only attrib used
[2016-04-21 20:15:21] <Nayd> oh, visual auras aren't shown if there are more than X auras of any type before them?
[2016-04-21 20:15:54] <Nayd> I thought it would simply stack auras with visible icon until full
[2016-04-21 20:17:33] <Shauren> actually
[2016-04-21 20:17:39] <Shauren> i dont know whats the problem here
[2016-04-21 20:18:08] <Nayd> maybe that's a good place to start =D
[2016-04-21 20:19:02] <Nayd> is it about visibility or some auras have to be dropped because the player/creature already has more than 64 auras?
[2016-04-21 20:31:05] <Shauren> ok no
[2016-04-21 20:31:21] <Shauren> the hard cap is 256 auras (thats how large array is allocated on stack)
[2016-04-21 20:32:51] <Shauren> 64 is the limit for UnitAura name filtering (it can output > 1 aura)
[2016-04-21 20:33:17] <Shauren> not "look up to 64 auras" but "output max 64 auras"
[2016-04-21 20:33:41] <Shauren> but group packet still caps at 64 due to uint64 aura mask
[2016-04-21 20:33:55] <WishToDie> thing is for the players to be able to see their debuffs on npcs(as in a player complains that he cannot track hsi auras in a raid on bosses...like rake from feral i think)
[2016-04-21 20:34:31] <WishToDie> even with aura tarcking addons a player cannot see all his auras on a npc
[2016-04-21 20:34:43] <Nayd> so it's a thing of target auras only?
[2016-04-21 20:36:38] <WishToDie> seems so...all info i got is related to player not being able to see his debuffs on bosses
[2016-04-21 20:38:04] <Shauren> btw
[2016-04-21 20:38:24] <Shauren> clientside aura visibility filter in 3.3.5: 0x53D580
[2016-04-21 20:38:53] <Shauren> if ( (a1->Attributes & 0x80u) != 0 || a1->AttributesEx & 0x10000000 )
[2016-04-21 20:38:55] <Shauren> not visible.
[2016-04-21 20:39:19] <WishToDie> Nayd: for example: "I will have a DoT not display on the target, even though I can see it ticking (for example, no Corruption DoT showing on boss, but I'm still receiving the healing from Siphon Life from it)"
[2016-04-21 20:40:13] <Nayd> in that case putting self auras first solves the issue?
[2016-04-21 20:40:20] <Nayd> per player
[2016-04-21 20:41:11] <WishToDie> dunno..all i was able to test is to increase the limit to 128..but that caused malformed packets...leading to client crashes
[2016-04-21 20:41:48] <WishToDie> or having random text on screen from unexisting npcs...or invites....usually named raidpet :)
[2016-04-21 20:42:06] <Nayd> ahm, you can't blindly change the types in the packets
[2016-04-21 20:58:38] <WishToDie> so the sorting thing on attribute would be a solution?
[2016-04-21 21:08:06] <Shauren> no
[2016-04-21 21:41:08] <Shauren> me no like
[2016-04-21 21:41:52] <Shauren> because it reintroduces the situation "hey i called SetFlying(false) but forgot to MoveFall"
[2016-04-21 21:43:04] <Kittnz> well i just doubt joschiwald will do much with it

TL;DR No fucking idea what to do.

@Demonid
Copy link
Contributor

Demonid commented Apr 27, 2016

I been using 128 for auras since 3 years, haven't had any issues yet.

#define MAX_AURAS 128 // client support up to 255, but it will cause problems with group auras updating

@Rushor
Copy link
Contributor

Rushor commented Apr 27, 2016

i always get wow errors if it's increased to 128, like WishToDie already said :/

@Goatform
Copy link
Contributor

Goatform commented Apr 28, 2016

This is what I'm using and it works for me:

---
 src/server/game/Spells/Auras/SpellAuraDefines.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/server/game/Spells/Auras/SpellAuraDefines.h b/src/server/game/Spells/Auras/SpellAuraDefines.h
index 3969dfb..bed6553 100644
--- a/src/server/game/Spells/Auras/SpellAuraDefines.h
+++ b/src/server/game/Spells/Auras/SpellAuraDefines.h
@@ -18,7 +18,7 @@
 #ifndef TRINITY_SPELLAURADEFINES_H
 #define TRINITY_SPELLAURADEFINES_H

-#define MAX_AURAS 64                                        // client support up to 255, but it will cause problems with group auras updating
+#define MAX_AURAS 128                                       // client support up to 255, but it will cause problems with group auras updating

 enum AURA_FLAGS
 {
-- 

@Rushor
Copy link
Contributor

Rushor commented Apr 28, 2016

[2016-04-21 20:41:11] dunno..all i was able to test is to increase the limit to 128..but that caused malformed packets...leading to client crashes
[2016-04-21 20:41:48] or having random text on screen from unexisting npcs...or invites....usually named raidpet :)

Maybe that issue only occures with more player. i can definitely say, that player will get errors if you have around 2 k players online

@Shauren
Copy link
Member

Shauren commented Apr 28, 2016

Going to repeat what I said on IRC (that you have log of above)
https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Handlers/GroupHandler.cpp#L781
This packet (group update) is the reason for the limit, auramask field.

@MrSmite
Copy link
Contributor

MrSmite commented May 13, 2016

While I can't find an exact number of allowed buffs, I don't see how it could be 255.

According to the Blue post at the end of This wikia entry, there are approx. 30 categories that buffs / debuffs fit into. Given the rules governing stacking, I don't see how you could manage to get 255 buffs on a Unit.

There are thirty or so different categories into which buffs and debuffs fit. Here you will find a comprehensive list of the changes made broken down by category and which spells/talents are in that category.

In each category, you can only benefit from the most powerful spell granting that effect. For example, Fel Intelligence grants spirit and intellect, both weaker than Arcane Intellect and Divine Spirit. If a player has Fel Intelligence and receives a stronger Arcane Intellect buff, he will gain the intellect value from Arcane Intellect and the spirit value from Fel Intelligence.

@Gerhood
Copy link
Contributor

Gerhood commented Jul 1, 2016

For everything except SMSG_PARTY_MEMBER_STATS_FULL and SMSG_PARTY_MEMBER_STATS we can safely send more than 64 auras. This should cover > 99% of cases where players cant see all auras. Tested and working on higher pop server for several weeks now.

diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp
index 4b9c913..18ccbf0 100644
--- a/src/server/game/Handlers/GroupHandler.cpp
+++ b/src/server/game/Handlers/GroupHandler.cpp
@@ -808,7 +808,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))
             {
@@ -890,7 +890,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))
                 {
@@ -992,7 +992,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))
         {
@@ -1030,7 +1030,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))
             {
diff --git a/src/server/game/Spells/Auras/SpellAuraDefines.h b/src/server/game/Spells/Auras/SpellAuraDefines.h
index 7a2032a..7e58d1f 100644
--- a/src/server/game/Spells/Auras/SpellAuraDefines.h
+++ b/src/server/game/Spells/Auras/SpellAuraDefines.h
@@ -18,7 +18,8 @@
 #ifndef TRINITY_SPELLAURADEFINES_H
 #define TRINITY_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-side limit
+#define MAX_AURAS_GROUP_UPDATE 64             // Limit of SMSG_PARTY_MEMBER_STATS_FULL and SMSG_PARTY_MEMBER_STATS

 enum AURA_FLAGS
 {
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index 8b4fc50..ce7b9b1 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -77,7 +77,7 @@ _flags(AFLAG_NONE), _effectsToApply(effMask), _needClientUpdate(false)
             TC_LOG_DEBUG("spells", "Aura: %u Effect: %d put to unit visible auras slot: %u", GetBase()->GetId(), GetEffectMask(), slot);
         }
         else
-            TC_LOG_DEBUG("spells", "Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask());
+            TC_LOG_ERROR("spells", "Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask());
     }

     _InitFlags(caster, effMask);

@Aokromes
Copy link
Member

@Gerhood can you create one pull request for this?

@Aokromes
Copy link
Member

4a38773

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants