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.5a][Hunter] Core/Spell: Cobra strikes #754
Comments
Author: signfinder |
confirmed |
This is a bit imblalanced bug then, no? Did anyone test tibbi fix based on tobmaps initial work? |
Was https://github.com/gc/TrinityCore/commit/a43b5f1148ec28763d1140d247bf6c440ddbee68 a valid fix, and/or is this still an issue ? |
this should/can be done with a spellscript |
Im using this fix, and still works |
@Frytiks : are you using tobmaps' version ekserver/ekcore@62550f8 or tibbi's version https://github.com/gc/TrinityCore/commit/a43b5f1148ec28763d1140d247bf6c440ddbee68 ? |
Tibbi |
OK, thanks for confirming. Are you using the code unchanged, like this? diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index e42f66c..6f61546 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -342,6 +342,14 @@ m_isRemoved(false), m_isSingleTarget(false), m_isUsingCharges(false), m_dropEven
if (m_spellInfo->ManaPerSecond || m_spellInfo->ManaPerSecondPerLevel)
m_timeCla = 1 * IN_MILLISECONDS;
+ switch (m_spellInfo->Id)
+ {
+ // some auras should have max stacks at applying
+ case 53257: // Cobra Strikes
+ m_stackAmount = spellproto->StackAmount;
+ break;
+ }
+
m_maxDuration = CalcMaxDuration(caster);
m_duration = m_maxDuration;
m_procCharges = CalcMaxCharges(caster); diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index e1302d4..958e18f 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2401,6 +2401,12 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
caster->ToPlayer()->CastItemCombatSpell(unitTarget, m_attackType, procVictim, procEx);
}
+ // Reduce amount of Cobra Strikes aura stacks by 1 for each crit
+ if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellInfo->SpellFamilyFlags[1] & 0x10000000)
+ if (Unit * owner = caster->GetOwner())
+ if (Aura* pAura = owner->GetAura(53257))
+ pAura->ModStackAmount(-1);
+
m_damage = damageInfo.damage;
caster->DealSpellDamage(&damageInfo, true); Or have you made any practical changes, based on the current 3.3.5 source code? In the diff from Spell.cpp, the order is reversed for the last 2 visible lines compared to the 2012 source: m_damage = damageInfo.damage;
caster->DealSpellDamage(&damageInfo, true); In tibbi's commit, these 2 lines were arranged the opposite way because of source code from 2012, so I was a bit uncertain where the correct insertion point would be for the fix. (I just took a chance.) I also noticed the aura spell ID should be replaced with an enum in a commit. Any other improvements? Edit: since this issue is so old (pre-github), it deserves some attention towards fixing it. |
no i mean a spellscript like in spell_taldaram_ball_of_inferno_flame |
that's not a fix, it's a hack |
OK, so this issue really needs a SpellScript like you said last year. I will check with one of my contacts if he would be interested in creating a spellscript for this. |
Just for references: 0c59f2f |
…tacked. Fixes TrinityCore#754 (cherry picked from commit 65d0a94)
…tacked. Fixes TrinityCore#754 (cherry picked from commit 65d0a94)
trinitiycore rev 10160+ release hash 675235637ce4+ (unix-little endian)
http://www.wowwiki.com/Cobra_Strikes
''You have a X% chance when you critically hit with Arcane Shot, Steady Shot or Kill Shot to cause your pet's next 2 special attacks to critically hit.''
'''problem'''-charges dont disapear after pet make critical..
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: