-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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] Spell: Trinket PVP/Human Racial can not be used under incapacitation effects #18798
Comments
hmmmm confirmed, big problem here. |
yeh , confirm , again important problem :( |
Try this diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index eeb6dd6..a40d61a 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -5764,16 +5764,17 @@ SpellCastResult Spell::CheckCasterAuras(uint32* param1) const
// spell is usable while stunned, check if caster has allowed stun auras, another stun types must prevent cast spell
if (usableWhileStunned)
{
- static uint32 const allowedStunMask =
- 1 << MECHANIC_STUN
- | 1 << MECHANIC_SLEEP;
-
+ uint32 mask = 1 << MECHANIC_STUN;
+ // spell with these auras is usable if caster has different stun types
+ bool usable = m_spellInfo->HasAura(SPELL_AURA_MECHANIC_IMMUNITY) || m_spellInfo->HasAura(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN);
bool foundNotStun = false;
Unit::AuraEffectList const& stunAuras = m_caster->GetAuraEffectsByType(SPELL_AURA_MOD_STUN);
+
for (AuraEffect const* stunEff : stunAuras)
{
uint32 const stunMechanicMask = stunEff->GetSpellInfo()->GetAllEffectsMechanicMask();
- if (stunMechanicMask && !(stunMechanicMask & allowedStunMask))
+
+ if (stunMechanicMask && !(stunMechanicMask & mask))
{
foundNotStun = true;
@@ -5781,14 +5782,16 @@ SpellCastResult Spell::CheckCasterAuras(uint32* param1) const
if (param1)
{
*param1 = stunEff->GetSpellInfo()->Effects[stunEff->GetEffIndex()].Mechanic;
+
if (!*param1)
*param1 = stunEff->GetSpellInfo()->Mechanic;
}
+
break;
}
}
- if (foundNotStun)
+ if (foundNotStun && !usable)
result = SPELL_FAILED_STUNNED; p.s it also fix alot of issues about spells which usable if caster has different stun types. |
@Eliminationzx please post when you finish, i can not follow you with so many post updates :) |
Sorry. I finished. |
With your patch the trinket pvp can be used again. it require to be checked by @ariel- because he wrote the last code about this.
? |
@noryad, it fix spells like - hand of freedom, barkskin, lichborne, pain suppression(with glyph), PvP trinkets, human racial and etc, they are usable while different stun types (MECHANIC_STUN, MECHANIC_SAPPED, MECHANIC_FREEZE, MECHANIC_SLEEP, MECHANIC_CHARM, MECHANIC_HORROR, MECHANIC_BANISH). The reason for that:
I came to this conclusion after comparing all spells with these aura types and attribute SPELL_ATTR5_USABLE_WHILE_STUNNED. |
@ariel- solve this please, pvp does not make sense with this problem :( |
Allowed mechanic mask is calculated on startup and auras checked against those mechanics Closes #18798
Allowed mechanic mask is calculated on startup and auras checked against those mechanics Closes TrinityCore#18798 (cherrypicked from 3544577) (cherrypicked from 53eb6ec) (cherry picked from commit 2b0c739) # Conflicts: # src/server/game/Spells/Spell.cpp
Allowed mechanic mask is calculated on startup and auras checked against those mechanics Closes TrinityCore#18798 (cherrypicked from 3544577) (cherrypicked from 53eb6ec) (cherry picked from commit 2b0c739) # Conflicts: # src/server/game/Spells/Spell.cpp
Description:
Trinket PVP/Every Man for Himself can not be used under the following incapacitation effects:
Maybe there are more spells with the same problem.
Current behaviour:
Trinket PVP can not be used under incapacitation effects.
Expected behaviour:
Trinket PVP should remove incapacitation effects.
Steps to reproduce the problem:
Branch(es): 3.3.5
TC rev. hash/commit: 151a067
TDB version: TDB_full_world_335.62_2016_10_17 + updates
Operating system: Windows
The text was updated successfully, but these errors were encountered: