Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook Follow us on Twitter Watch us on YouTube


MMOCoin

Likes Likes:  0
Results 1 to 1 of 1
  1. #1
    Dr.Core
    Guest

    Warryor 4.3.4 Spellfixxes (Not sure if is that correct)


    Register to remove this ad
    File: \src\server\scripts\Spells\spell_warrior.cpp
    Version: 4.3.4

    enum WarriorSpells
    {


    SPELL_WARRIOR_VICTORY_RUSH = 34428,
    SPELL_WARRIOR_CLEAVE = 845,


    // Victory Rush
    // Spell Id: 34428
    class spell_warr_victory_rush : public SpellScriptLoader
    {
    public:
    spell_warr_victory_rush() : SpellScriptLoader("spell_warr_victory_rush") { }


    class spell_warr_victory_rush_SpellScript : public SpellScript
    {
    PrepareSpellScript(spell_warr_victory_rush_SpellSc ript);


    bool Validate(SpellInfo const* /*spellInfo*/)
    {
    if (!sSpellMgr->GetSpellInfo(SPELL_WARRIOR_VICTORY_RUSH))
    return false;
    return true;
    }


    void CalculateDamage(SpellEffIndex /*effect*/)
    {
    // Formula: AttackPower * BasePoints / 100
    if (Unit* caster = GetCaster())
    SetHitDamage(int32(GetHitDamage() * caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100));
    }




    void HandleAfterHit()
    {
    if (Unit* caster = GetCaster())
    caster->RemoveAurasDueToSpell(32216); // Remove Victorious aura
    }


    void Register()
    {
    AfterHit += SpellHitFn(spell_warr_victory_rush::spell_warr_vic tory_rush_SpellScript::HandleAfterHit);
    OnEffectHitTarget += SpellEffectFn(spell_warr_victory_rush::spell_warr_ victory_rush_SpellScript::CalculateDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
    }
    };


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




    // Cleave
    // Spell Id: 845
    class spell_warr_cleave : public SpellScriptLoader
    {
    public:
    spell_warr_cleave() : SpellScriptLoader("spell_warr_cleave") { }


    class spell_warr_cleave_SpellScript : public SpellScript
    {
    PrepareSpellScript(spell_warr_cleave_SpellScript);


    bool Validate(SpellInfo const* /*spellInfo*/)
    {
    if (!sSpellMgr->GetSpellInfo(SPELL_WARRIOR_CLEAVE))
    return false;
    return true;
    }


    void CalculateDamage(SpellEffIndex /*effect*/)
    {
    if (Unit* caster = GetCaster())
    SetHitDamage(int32(6 + caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.45f));
    }


    void Register()
    {
    OnEffectHitTarget += SpellEffectFn(spell_warr_cleave::spell_warr_cleave _SpellScript::CalculateDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
    }
    };


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


    In end of Script declare Spell

    C++ Code

    PHP Code:
    void AddSC_warrior_spell_scripts(){
    ......    
    new 
    spell_warr_victory_rush();
    new 
    spell_warr_cleave(); 

    Database Part

    Code:
    INSERT INTO `spell_script_names` VALUES ('845', 'spell_warr_cleave');
    INSERT INTO `spell_script_names` VALUES ('34428', 'spell_warr_victory_rush');


    I have test it and for me works fine !!!



    › See More: Warryor 4.3.4 Spellfixxes (Not sure if is that correct)
    Last edited by Dr.Core; 13-07-13 at 04:19 PM.



  2. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

 

 

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!
SEO Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -5. The time now is 03:36 PM.
Powered by vBulletin® Copyright ©2000-2024, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org