diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Player.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellAuras.h | 1 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 25 |
4 files changed, 19 insertions, 11 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 01ca893b6e3..2bfe2dadc33 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -18682,7 +18682,7 @@ void Player::SendAurasForTarget(Unit *target) // level data << aura->m_auraLevel; // charges - data << uint8(aura->GetStackAmount() ? aura->GetStackAmount() : aura->GetAuraCharges()); + data << uint8(aura->GetStackAmount()>1 ? aura->GetStackAmount() : aura->GetAuraCharges()); if(!(aura->m_auraFlags & AFLAG_CASTER)) { diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 96738c22bfa..5c41dc22d9e 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -904,7 +904,7 @@ void Aura::SendAuraUpdate() data << uint32(GetId()); data << uint8(m_auraFlags); data << uint8(m_auraLevel); - data << uint8(m_stackAmount ? m_stackAmount : m_procCharges); + data << uint8(m_stackAmount>1 ? m_stackAmount : m_procCharges); if(!(m_auraFlags & AFLAG_CASTER)) { diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index dcf429d85fd..fb8120a01e6 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -332,6 +332,7 @@ class TRINITY_DLL_SPEC AuraEffect uint32 GetId() const { return m_spellProto->Id; } uint32 GetEffIndex() const { return m_effIndex; } int32 GetBasePoints() const { return m_currentBasePoints; } + int32 GetAuraAmplitude(){return m_amplitude;} void Update(uint32 diff); bool IsAreaAura() const { return m_isAreaAura; } diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 7d5fe3d8116..d860d548d7f 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -500,11 +500,6 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx) { damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.08f); } - // Faerie Fire (Feral) - else if(m_spellInfo->Id == 60089) - { - damage += int32((m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 5 / 100) + 1); - } //Mangle Bonus for the initial damage of Lacerate and Rake if((m_spellInfo->SpellFamilyFlags.IsEqual(0x1000,0,0) && m_spellInfo->SpellIconID==494) || (m_spellInfo->SpellFamilyFlags.IsEqual(0,0x100,0) && m_spellInfo->SpellIconID==2246)) @@ -2003,6 +1998,7 @@ void Spell::EffectTriggerSpell(uint32 i) // get highest rank of the Stealth spell uint32 spellId = 0; + SpellEntry const *spellInfo; const PlayerSpellMap& sp_list = ((Player*)m_caster)->GetSpellMap(); for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr) { @@ -2010,7 +2006,7 @@ void Spell::EffectTriggerSpell(uint32 i) if(!itr->second->active || itr->second->disabled || itr->second->state == PLAYERSPELL_REMOVED) continue; - SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first); + spellInfo = sSpellStore.LookupEntry(itr->first); if (!spellInfo) continue; @@ -2029,7 +2025,8 @@ void Spell::EffectTriggerSpell(uint32 i) if(((Player*)m_caster)->HasSpellCooldown(spellId)) ((Player*)m_caster)->RemoveSpellCooldown(spellId); - m_caster->CastSpell(m_caster, spellId, true); + // Push stealth to list because it must be handled after combat remove + m_TriggerSpells.push_back(spellInfo); return; } // just skip @@ -4908,8 +4905,14 @@ void Spell::EffectScriptEffect(uint32 effIndex) // Viper Sting - Instantly restores mana to you equal to 60% of the total amount drained by your Viper Sting. if (familyFlag[1] & 0x00000080) { + int32 tickCount = (aura->GetAuraMaxDuration() - aura->GetAuraDuration()) / aura->GetPartAura(0)->GetAuraAmplitude(); spellId = 53358; // 53358 Chimera Shot - Viper - basePoint = aura->GetPartAura(0)->GetAmount() * 4 * 60 / 100; + // Amount of one aura tick + basePoint = aura->GetPartAura(0)->GetAmount() * aura->GetTarget()->GetMaxPower(POWER_MANA) / 100 ; + int32 casterBasePoint = aura->GetPartAura(0)->GetAmount() * unitTarget->GetMaxPower(POWER_MANA) / 50 ; + if (basePoint > casterBasePoint) + basePoint = casterBasePoint; + basePoint = basePoint * tickCount * 60 / 100; } // Scorpid Sting - Attempts to Disarm the target for 10 sec. This effect cannot occur more than once per 1 minute. if (familyFlag[0] & 0x00008000) @@ -5898,10 +5901,14 @@ void Spell::EffectDestroyAllTotems(uint32 /*i*/) uint32 spell_id = totem->GetUInt32Value(UNIT_CREATED_BY_SPELL); SpellEntry const* spellInfo = sSpellStore.LookupEntry(spell_id); if(spellInfo) - mana += spellInfo->manaCost * damage / 100; + { + mana += spellInfo->manaCost; + mana += spellInfo->ManaCostPercentage * m_caster->GetCreateMana() / 100; + } ((Totem*)totem)->UnSummon(); } } + mana = mana * damage / 100; int32 gain = m_caster->ModifyPower(POWER_MANA,int32(mana)); m_caster->SendEnergizeSpellLog(m_caster, m_spellInfo->Id, gain, POWER_MANA); |