diff options
Diffstat (limited to 'src/server/game/Spells')
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 12 | ||||
| -rw-r--r-- | src/server/game/Spells/Spell.h | 4 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 22 |
3 files changed, 9 insertions, 29 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index f9edb30ec30..60e3cb3808f 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4160,7 +4160,7 @@ void Spell::SendSpellGo() castFlags |= CAST_FLAG_PENDING; if (m_spellInfo->HasAttribute(SPELL_ATTR0_REQ_AMMO) || m_spellInfo->HasAttribute(SPELL_ATTR0_CU_NEEDS_AMMO_DATA)) - castFlags |= CAST_FLAG_AMMO; // arrows/bullets visual + castFlags |= CAST_FLAG_AMMO; // arrows/bullets visual if ((m_caster->GetTypeId() == TYPEID_PLAYER || (m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->IsPet())) @@ -4173,12 +4173,12 @@ void Spell::SendSpellGo() && m_spellInfo->PowerType == POWER_RUNE && !(_triggeredCastFlags & TRIGGERED_IGNORE_POWER_AND_REAGENT_COST)) { - castFlags |= CAST_FLAG_NO_GCD; // not needed, but Blizzard sends it - castFlags |= CAST_FLAG_RUNE_LIST; // rune cooldowns list + castFlags |= CAST_FLAG_NO_GCD; // not needed, but Blizzard sends it + castFlags |= CAST_FLAG_RUNE_LIST; // rune cooldowns list } if (m_spellInfo->HasEffect(SPELL_EFFECT_ACTIVATE_RUNE)) - castFlags |= CAST_FLAG_RUNE_LIST; // rune cooldowns list + castFlags |= CAST_FLAG_RUNE_LIST; // rune cooldowns list if (m_targets.HasTraj()) castFlags |= CAST_FLAG_ADJUST_MISSILE; @@ -4207,12 +4207,12 @@ void Spell::SendSpellGo() if (castFlags & CAST_FLAG_POWER_LEFT_SELF) castData.RemainingPower = ASSERT_NOTNULL(m_caster->ToUnit())->GetPower(m_spellInfo->PowerType); - if (castFlags & CAST_FLAG_RUNE_LIST) // rune cooldowns list + if (castFlags & CAST_FLAG_RUNE_LIST && !m_spellInfo->HasAura(SPELL_AURA_CONVERT_RUNE)) // rune cooldowns list { castData.RemainingRunes = boost::in_place(); /// @todo There is a crash caused by a spell with CAST_FLAG_RUNE_LIST cast by a creature - //The creature is the mover of a player, so HandleCastSpellOpcode uses it as the caster + // The creature is the mover of a player, so HandleCastSpellOpcode uses it as the caster if (Player* player = m_caster->ToPlayer()) { uint8 runeMaskInitial = m_runesState; diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h index 08c80d8518e..13d15773e3d 100644 --- a/src/server/game/Spells/Spell.h +++ b/src/server/game/Spells/Spell.h @@ -540,6 +540,8 @@ class TC_GAME_API Spell uint64 GetDelayMoment() const { return m_delayMoment; } uint64 CalculateDelayMomentForDst() const; void RecalculateDelayMomentForDst(); + uint8 GetRuneState() const { return m_runesState; } + void SetRuneState(uint8 value) { m_runesState = value; } bool IsNeedSendToClient() const; @@ -577,7 +579,7 @@ class TC_GAME_API Spell // e.g. damage around area spell trigered by victim aura and damage enemies of aura caster Unit* m_originalCaster; // cached pointer for m_originalCaster, updated at Spell::UpdatePointers() - //Spell data + // Spell data SpellSchoolMask m_spellSchoolMask; // Spell school (can be overwrite for some spells (wand shoot for example) WeaponAttackType m_attackType; // For weapon based attack int32 m_powerCost; // Calculated spell cost initialized only in Spell::prepare diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 701c503f8dd..4b68744fc0a 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -5036,28 +5036,6 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex) if (count == 0) count = 1; - // Blood Tap - if (m_spellInfo->Id == 45529 && count > 0) - { - for (uint32 l = 0; l + 1 < MAX_RUNES && count > 0; ++l) - { - // Check if both runes are on cd as that is the only time when this needs to come into effect - if ((player->GetRuneCooldown(l) && player->GetBaseRune(l) == RUNE_BLOOD) && (player->GetRuneCooldown(l + 1) && player->GetBaseRune(l + 1) == RUNE_BLOOD)) - { - // Should always update the rune with the lowest cd - if (l + 1 < MAX_RUNES && player->GetRuneCooldown(l) >= player->GetRuneCooldown(l + 1)) - ++l; - - player->SetRuneCooldown(l, 0); - --count; - // is needed to push through to the client that the rune is active - player->ResyncRunes(MAX_RUNES); - } - else - break; - } - } - for (uint32 j = 0; j < MAX_RUNES && count > 0; ++j) { if (player->GetRuneCooldown(j) && player->GetCurrentRune(j) == RuneType(m_spellInfo->Effects[effIndex].MiscValue)) |
