ProjectSkyfire / SkyFire.406a

SkyFireEMU is a full featured F/OSS World of Warcraft: Cataclysm emulator written in C++. || Compatible with World of Warcraft client 4.0.6a (Build:13623) || Public DB is located on forum
http://www.projectskyfire.org
GNU General Public License v3.0
343 stars 218 forks source link

warrior - shockwave #393

Open nvbk opened 12 years ago

nvbk commented 12 years ago

This ability/talent:

http://www.wowhead.com/spell=46968

This ability deals only stun, not damage...

Skyfire - compiled new revision today and still doesn'r deal damage.

nvbk commented 12 years ago

ok my fix: src/server/scripts/spell/warrrior.cpp

look line with this: "int32 bp2 = caster->CalculateSpellDamage(GetHitUnit(), GetSpellInfo(), EFFECT_2);" and mark this line as note. And next line change to this: SetHitDamage(caster->GetTotalAttackPowerValue(BASE_ATTACK)*75/100);

This fix calculate only 75%AP (formula from wowhead), its only base quick fix... Skyfire team in future release better fix than me.

nvbk commented 12 years ago

forgot previous post here is new fix for shockwave with bonus damage from thunderstruck

// Shockwave // Spell Id: 46968 class spell_warr_shockwave : public SpellScriptLoader { public: spell_warr_shockwave() : SpellScriptLoader("spell_warr_shockwave") { }

    class spell_warr_shockwave_SpellScript : public SpellScript
    {
        PrepareSpellScript(spell_warr_shockwave_SpellScript);

        void CalculateDamage(SpellEffIndex effect)
        {
            // Formula: [Effect2BasePoints] / 100 * AttackPower
            if (Unit* caster = GetCaster())
            {
                int32 rank1 = caster->GetAuraCount(87095);
                int32 rank2 = caster->GetAuraCount(87096);
                int32 modify = rank1*5 + rank2*10 + 100;
                //int32 bp2 = caster->CalculateSpellDamage(GetHitUnit(), GetSpellInfo(), EFFECT_2);
                SetHitDamage((caster->GetTotalAttackPowerValue(BASE_ATTACK)*75/100) * modify / 100);
            }
        }

        void Register()
        {
            OnEffectHitTarget += SpellEffectFn(spell_warr_shockwave::spell_warr_shockwave_SpellScript::CalculateDamage, EFFECT_1, SPELL_EFFECT_SCHOOL_DAMAGE);
        }
    };

    SpellScript* GetSpellScript() const
    {
        return new spell_warr_shockwave_SpellScript();
    }

};