SkyFire_548 icon indicating copy to clipboard operation
SkyFire_548 copied to clipboard

Trying to fix some spells.

Open ghost opened this issue 9 years ago • 27 comments

Hello all community, I am trying to fix some spells. Prior to that, do not ever engage in such. Note: I am not have english dbc files for spellwork, only ruRU. http://www.wowhead.com/spell=102351/cenarion-ward

ID - 102351 Щит Кенария
=================================================
Description: Укрывает дружественную цель щитом. При получении урона на цель будет наложен эффект исцеления, который будет восстанавливать ей $102352s1 ед. здоровья раз в $102352t сек. в течение $102352d. Срабатывание исцеляющего заклинания снимает с цели эффект "Щита Кенария". Можно применять в любом облике. Время действия – $d.

ToolTip: Полученный урон восстановит $102352s1 ед. здоровья раз в $102352t сек. в течение $102352d.
Category = 0, SpellIconID = 2250, activeIconID = 0, SpellVisual = (26676,0)
Family SPELLFAMILY_DRUID, flag [0] 0x00000000 [1] 0x00000000 [2] 0x00000000

SpellSchoolMask = 1 (SPELL_SCHOOL_MASK_NORMAL)
DamageClass = 0 (SPELL_DAMAGE_CLASS_NONE)
PreventionType = 4 (4)
=================================================
Attributes: 0x00000810 (SPELL_ATTR0_ABILITY, SPELL_ATTR0_UNK11)
AttributesEx3: 0x04000000 (SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED)
AttributesEx7: 0x40000000 (SPELL_ATTR7_UNK30)
=================================================
Stances Not: FORM_FLIGHT_EPIC, FORM_FLIGHT
Spell Level = 0, base 0, max 0

Category = 0
DispelType = 0 (DISPEL_NONE)
Mechanic = 0 (MECHANIC_NONE)
SpellRange: (Id 5) "Long Range":
    MinRangeNegative = 0, MinRangePositive = 0
    MaxRangeNegative = 40, MaxRangePositive = 40

Cast time (Id 1) = 0,00
RecoveryTime: 30000 ms, CategoryRecoveryTime: 0 ms
StartRecoveryCategory = 133, StartRecoveryTime = 1500,00 ms
Duration: ID (9)  30000, 0, 30000
Power POWER_MANA, Cost 14,8 %
Interrupt Flags: 0x00000000, AuraIF 0x00000000, ChannelIF 0x00000000
Proc flag 0x000A22A8, chance = 100, charges - 1
=================================================
  03 Taken damage from melee strike hit
  05 Taken damage by Spell that use melee weapon
  07 Taken damage from ranged attack
  09 Taken damage by Spell that use ranged weapon
  13 Taken negative spell hit
  17 Taken magic spell damage
  19 Taken periodic damage
=================================================
Effect 0: Id 6 (SPELL_EFFECT_APPLY_AURA) RegularDifficulty
BasePoints = 100
Targets (21, 0) (TARGET_UNIT_TARGET_ALLY, NO_TARGET)
Aura Id 4 (SPELL_AURA_DUMMY), value = 100, misc = 0 (0), miscB = 0, periodic = 0
   Trigger spell (102352) Щит Кенария. Chance = 100
   Description: Description: Восстанавливает цели $m1 ед. здоровья раз в $t1 сек. в течение $d.

   ToolTip: Восстановление $w1 ед. здоровья раз в $t1 сек.
// 102351 - Cenarion Ward
class spell_dru_cenarion_ward : public SpellScriptLoader
{
    public:
        spell_dru_cenarion_ward() : SpellScriptLoader("spell_dru_cenarion_ward") { }

        class spell_dru_cenarion_ward_AuraScript : public AuraScript
        {
            PrepareAuraScript(spell_dru_cenarion_ward_AuraScript);

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

            void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
            {
                PreventDefaultAction();
                int32 basePoints0 = CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount());

                GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_CENARIOUS_WARD_HEALING, &basePoints0, NULL, NULL, true);
            }

            void Register() OVERRIDE
            {
                OnEffectProc += AuraEffectProcFn(spell_dru_cenarion_ward_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
            }
        };

        AuraScript* GetAuraScript() const OVERRIDE
        {
            return new spell_dru_cenarion_ward_AuraScript();
        }
};

Juggernaut trinket lifesteal - in WoD convert in new stat. But this is MoP. Something:

ID - 146346 Вытягивание жизни (Level 90)
=================================================
Description: Превращает ${$m1/100}.2% наносимого вами урона в самоисцеление.

Category = 0, SpellIconID = 2027, activeIconID = 0, SpellVisual = (0,0)
Family SPELLFAMILY_GENERIC, flag [0] 0x00000000 [1] 0x00000000 [2] 0x00000000

SpellSchoolMask = 1 (SPELL_SCHOOL_MASK_NORMAL)
DamageClass = 0 (SPELL_DAMAGE_CLASS_NONE)
PreventionType = 0 (SPELL_PREVENTION_TYPE_NONE)
=================================================
Attributes: 0x00000040 (SPELL_ATTR0_PASSIVE)
AttributesEx3: 0x04000000 (SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED)
AttributesEx11: 0x00000004 (SPELL_ATTR11_UNK2)
=================================================
Spell Level = 0, base 0, max 0

Category = 0
DispelType = 0 (DISPEL_NONE)
Mechanic = 0 (MECHANIC_NONE)
SpellRange: (Id 1) "Self Only":
    MinRangeNegative = 0, MinRangePositive = 0
    MaxRangeNegative = 0, MaxRangePositive = 0



Interrupt Flags: 0x00000000, AuraIF 0x00000000, ChannelIF 0x00000000
Proc flag 0x00051154, chance = 100, charges - 0
=================================================
  02 Successful melee attack
  04 Successful attack by Spell that use melee weapon
  06 Successful Ranged attack(and wand spell cast)
  08 Successful Ranged attack by Spell that use ranged weapon
  12 Successful negative spell cast
  16 Successful damage from harmful magic spell cast
  18 Deal periodic damage
=================================================
Effect 0: Id 6 (SPELL_EFFECT_APPLY_AURA) RegularDifficulty
AveragePoints = 53600,00
Targets (1, 0) (TARGET_UNIT_CASTER, NO_TARGET)
Aura Id 4 (SPELL_AURA_DUMMY), value = 0, misc = 0 (0), miscB = 0, periodic = 0

=================================================
Items using this spell:
   102297: Juggernaut's Focusing Crystal 
   104518: Juggernaut's Focusing Crystal 
   104767: Juggernaut's Focusing Crystal 
   105016: Juggernaut's Focusing Crystal 
   105265: Juggernaut's Focusing Crystal 
   105514: Juggernaut's Focusing Crystal 
enum LifeStealJuggernaut
{
    SPELL_LIFESTEAL_JUGGERNAUT_HEAL  = 146347
};

// 146346 - Life Steal - Iron Juggernaut item.
class spell_gen_lifesteal_juggernaut : public SpellScriptLoader
{
    public:
        spell_gen_lifesteal_juggernaut() : SpellScriptLoader("spell_gen_lifesteal_juggernaut") { }

        class spell_gen_lifesteal_juggernaut_AuraScript : public AuraScript
        {
            PrepareAuraScript(spell_gen_lifesteal_juggernaut_AuraScript);

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

            bool CheckProc(ProcEventInfo& eventInfo)
            {
                return eventInfo.GetProcTarget();
            }

            void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();

                int32 heal = CalculatePct(int32(eventInfo.GetDamageInfo()->GetDamage()), aurEff->GetAmount());
                GetTarget()->CastCustomSpell(SPELL_LIFESTEAL_JUGGERNAUT_HEAL, SPELLVALUE_BASE_POINT0, heal, (Unit*)NULL, true, NULL, aurEff);
            }

            void Register() OVERRIDE
            {
                DoCheckProc += AuraCheckProcFn(spell_gen_lifesteal_juggernaut_AuraScript::CheckProc);
                OnEffectProc += AuraEffectProcFn(spell_gen_lifesteal_juggernaut_AuraScript::OnProc, EFFECT_0, SPELL_AURA_DUMMY);
            }
        };

        AuraScript* GetAuraScript() const OVERRIDE
        {
            return new spell_gen_lifesteal_juggernaut_AuraScript();
        }
};
INSERT INTO spell_script_names VALUES 
(102351, "spell_dru_cenarion_ward"),
(146346, "spell_gen_lifesteal_juggernaut");

http://www.wowhead.com/spell=124974/natures-vigil Don't have idea, how fixing. Sorry.

ghost avatar Apr 26 '16 16:04 ghost

https://gist.github.com/JunkyBulgaria/1e70e3347521092a9d096a15ad57d36c

INSERT INTO spell_script_names VALUES (124974, "spell_druid_natures_vigil");

FALL1N1 avatar May 02 '16 19:05 FALL1N1

Thank you, all of this is interesting. One question - why only player? None of the spells natures vigil has no attribute. I saw that the same friendly npc healed too.

ghost avatar May 03 '16 03:05 ghost

it's not completed

FALL1N1 avatar May 03 '16 17:05 FALL1N1

Okay, thanks. Then another spell associated with Ra-den.

ID - 138333 Murderous Strike
=================================================
Description: An unerringly accurate strike that turns the life force of the target against them, inflicting Shadow damage every 2 sec for 10 sec. The damage dealt is equal to the health of the target at the time of the attack. This damage ignores most damage-reducing effects.

ToolTip: Suffering 1 Shadow damage every 2 sec.
Category = 0, SpellIconID = 6119, activeIconID = 0, SpellVisual = (31299,0)
Family SPELLFAMILY_GENERIC, flag [0] 0x00000000 [1] 0x00000000 [2] 0x00000000

SpellSchoolMask = 32 (SPELL_SCHOOL_MASK_SHADOW)
DamageClass = 0 (SPELL_DAMAGE_CLASS_NONE)
PreventionType = 0 (SPELL_PREVENTION_TYPE_NONE)
=================================================
Attributes: 0x20000000 (SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY)
AttributesEx3: 0x00040000 (SPELL_ATTR3_IGNORE_HIT_RESULT)
AttributesEx4: 0x00000100 (SPELL_ATTR4_FIXED_DAMAGE)
AttributesEx6: 0x20000000 (SPELL_ATTR6_NO_DONE_PCT_DAMAGE_MODS)
AttributesEx8: 0x00001000 (SPELL_ATTR8_AURA_SEND_AMOUNT)
=================================================
Spell Level = 0, base 0, max 0

Category = 0
DispelType = 0 (DISPEL_NONE)
Mechanic = 0 (MECHANIC_NONE)
SpellRange: (Id 2) "Combat Range":
    MinRangeNegative = 0, MinRangePositive = 0
    MaxRangeNegative = 5, MaxRangePositive = 5

Cast time (Id 1) = 0,00
Duration: ID (1)  10000, 0, 10000
Power POWER_MANA, Cost 100
Interrupt Flags: 0x00000000, AuraIF 0x00000000, ChannelIF 0x00000000
  Caster Aura Spell (138331) Imbued with Anima
Chance = 0, charges - 0
=================================================
Effect 0: Id 2 (SPELL_EFFECT_SCHOOL_DAMAGE) RegularDifficulty
BasePoints = 0
Targets (6, 0) (TARGET_UNIT_TARGET_ENEMY, NO_TARGET)

Effect 1: Id 6 (SPELL_EFFECT_APPLY_AURA) RegularDifficulty
BasePoints = 1
Targets (6, 0) (TARGET_UNIT_TARGET_ENEMY, NO_TARGET)
Aura Id 3 (SPELL_AURA_PERIODIC_DAMAGE), value = 1, misc = 0 (0), miscB = 0, periodic = 2000

Spell can be scaled and have attribute SPELL_ATTR8_AURA_SEND_AMOUNT.

// 138333 - Murderous Strike - should damage from max target health percent and apply dot from max pct.
class spell_gen_raden_murderous_strike : public SpellScriptLoader
{
    public:
        spell_gen_raden_murderous_strike() : SpellScriptLoader("spell_gen_raden_murderous_strike") { }

        class spell_gen_raden_murderous_strike_SpellScript : public SpellScript
        {
            PrepareSpellScript(spell_gen_raden_murderous_strike_SpellScript);

            void CalcDamage()
            {
                if (Unit* target = GetHitUnit())
                    SetHitDamage(target->CountPctFromMaxHealth(100)); 
            }

            void Register() OVERRIDE
            {
                OnHit += SpellHitFn(spell_gen_raden_murderous_strike_SpellScript::CalcDamage);
            }
        };

        SpellScript* GetSpellScript() const OVERRIDE
        {
            return new spell_gen_raden_murderous_strike_SpellScript();
        }
};

Example - if you have 500000 health point, damage = 500000 and apply periodic damage aura = 500000. If you have safe spell. Example -20 on attack moment, damage = 400000 and aura damage = 400000. Need recalculate or script write true?

ghost avatar May 03 '16 17:05 ghost

Angelic Bulwark - priest talent case.

DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=24 AND `SourceGroup`=0 AND `SourceEntry`=108945;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(24,0,108945,0,0,38,0,30,4,0,28,"","Angelic Bulwark - proc only if Actor health pct below or equal 30 percent."),
(24,0,108945,0,1,114216,0,0,0,0,28,"","Angelic Bulwark - proc only if Actor not have Angelic Bulwark Debuff");

INSERT INTO spell_script_names VALUES 
(108945, "spell_priest_angelic_bulwark");

In priest spell enum.

    SPELL_PRIEST_ANGELIC_BULWARK                    = 108945,
    SPELL_PRIEST_ANGELIC_BULWARK_ABSORB             = 114214,
    SPELL_PRIEST_ANGELIC_BULWARK_DEBUFF             = 114216,
// 108945 - Priest Angelic Bulwark Aura.
class spell_priest_angelic_bulwark : public SpellScriptLoader
{
    public:
        spell_priest_angelic_bulwark() : SpellScriptLoader("spell_priest_angelic_bulwark") { }

        class spell_priest_angelic_bulwark_AuraScript : public AuraScript
        {
            PrepareAuraScript(spell_priest_angelic_bulwark_AuraScript);

            void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
            {
                PreventDefaultAction();
                int32 basePoints0 = GetTarget()->CountPctFromMaxHealth(aurEff->GetAmount());

                GetTarget()->CastCustomSpell(GetTarget(), SPELL_PRIEST_ANGELIC_BULWARK_ABSORB, &basePoints0, NULL, NULL, true);
                GetTarget()->CastSpell(GetTarget(), SPELL_PRIEST_ANGELIC_BULWARK_DEBUFF, true);
            }

            void Register() OVERRIDE
            {
                OnEffectProc += AuraEffectProcFn(spell_priest_angelic_bulwark_AuraScript::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
            }
        };

        AuraScript* GetAuraScript() const OVERRIDE
        {
            return new spell_priest_angelic_bulwark_AuraScript();
        }
};

Unfortunately nowhere I found a similar example, but was worth a try. Need Feedback!

ghost avatar May 08 '16 05:05 ghost

spell_gen_lifesteal_juggernaut and spell_dru_cenarion_ward working. spell_priest_angelic_bulwark_AuraScript need correct.

ghost avatar May 09 '16 18:05 ghost

Angelic Bulwark: i dislike the debuff condition cause the debuff duration is 60 secounds only but the proc can occur once evry 90 secounds so there is a 30 secound gap where it will be able to proc, in other words it will proc more often then intended.

AriDEV avatar May 11 '16 18:05 AriDEV

spell_priest_angelic_bulwark_AuraScript
need correct

@AriDEV I wrote that the needed correction!

int32 basePoints0 = GetTarget()->CountPctFromMaxHealth(aurEff->GetAmount());

GetTarget i think need replace on GetHitUnit or GetCaster. Your suggestions? I was looking at github, but did not find any script to spell at least in the public domain. Maybe some "private" it is have.

ghost avatar May 11 '16 18:05 ghost

first the packet for spells arent 100% done if u update the spell packets most of them should work and dont need any custom script. auras are handled in src/server/game/Spells/Auras/

AriDEV avatar May 11 '16 19:05 AriDEV

Note: i have only ruRu dbc.

ID - 108945 Божественный оплот
=================================================
Description: Если в результате полученного удара уровень вашего здоровья падает ниже $108945s1%, вы создаете щит, поглощающий наносимый вам урон в размере $108945s2% от вашего максимального запаса здоровья. Время действия – $114214d.

Эффект срабатывает не чаще чем раз в $108945s3 сек.

Category = 0, SpellIconID = 6468, activeIconID = 0, SpellVisual = (0,0)
Family SPELLFAMILY_PRIEST, flag [0] 0x00000000 [1] 0x00000000 [2] 0x00000000

SpellSchoolMask = 1 (SPELL_SCHOOL_MASK_NORMAL)
DamageClass = 0 (SPELL_DAMAGE_CLASS_NONE)
PreventionType = 0 (SPELL_PREVENTION_TYPE_NONE)
=================================================
Attributes: 0x00000150 (SPELL_ATTR0_ABILITY, SPELL_ATTR0_PASSIVE, SPELL_ATTR0_HIDE_IN_COMBAT_LOG)
AttributesEx4: 0x00080000 (SPELL_ATTR4_UNK19)
=================================================
Spell Level = 0, base 0, max 0

Category = 0
DispelType = 0 (DISPEL_NONE)
Mechanic = 0 (MECHANIC_NONE)
SpellRange: (Id 1) "Self Only":
    MinRangeNegative = 0, MinRangePositive = 0
    MaxRangeNegative = 0, MaxRangePositive = 0

Cast time (Id 1) = 0,00

Interrupt Flags: 0x00000000, AuraIF 0x00000000, ChannelIF 0x00000000
Proc flag 0x000A22A8, chance = 100, charges - 0
=================================================
  03 Taken damage from melee strike hit
  05 Taken damage by Spell that use melee weapon
  07 Taken damage from ranged attack
  09 Taken damage by Spell that use ranged weapon
  13 Taken negative spell hit
  17 Taken magic spell damage
  19 Taken periodic damage
=================================================
Effect 0: Id 6 (SPELL_EFFECT_APPLY_AURA) RegularDifficulty
BasePoints = 30
Targets (1, 0) (TARGET_UNIT_CASTER, NO_TARGET)
Aura Id 42 (SPELL_AURA_PROC_TRIGGER_SPELL), value = 30, misc = 11 (11), miscB = 0, periodic = 0
SpellClassMask = 00200000 00000000 00000000
    - 27636 - Звездные осколки
    - 88625 - Слово Света: Воздаяние
    - 88684 - Слово Света: Безмятежность
    - 88685 - Слово Света: Святилище
    + 88686 - Слово Света: Святилище
Trigger spell (18350) Not found, Chance = 100

Effect 1: Id 0 (NO_SPELL_EFFECT) RegularDifficulty
BasePoints = 20
Targets (0, 0) (NO_TARGET, NO_TARGET)

Effect 2: Id 0 (NO_SPELL_EFFECT) RegularDifficulty
BasePoints = 90
Targets (0, 0) (NO_TARGET, NO_TARGET)

In this case, the script all the same is required. Or through a spell script, or in Spell Auras.

ghost avatar May 11 '16 19:05 ghost

Aura 42 SPELL_AURA_PROC_TRIGGER_SPELL is implemented in Unit::ProcDamageAndSpellFor and Unit::HandleProcTriggerSpell

AriDEV avatar May 11 '16 19:05 AriDEV

Yes, i read this file! I can add condition in Unit.cpp

        case 108945:
        {
            // When your health drops below 30%
            if (HealthBelowPctDamaged(30, damage) || HealthBelowPct(30) || HasAura(114216))
                return false;
            break;
        }

@AriDEV You please do not misunderstand, I just seen similar examples in spellscript, here and decided to write a script.

ghost avatar May 11 '16 19:05 ghost

so maybe i missunderstood im sorry, tell me what u trying to do with the spell. what is the issue with the spell, is it not procing? is it not apply debuff? is it not apply shield? what is not working with the spell.

for some examples u can check this: https://github.com/ProjectSkyfire/SkyFire.548/blob/master/src/server/scripts/Examples/example_spell.cpp

AriDEV avatar May 11 '16 20:05 AriDEV

Spell should apply shield = GetEffectValue base point percent. Spell scenario here the is a must.

ID - 114214 Божественный оплот
=================================================
Description: Если в результате полученного удара уровень вашего здоровья падает ниже $108945s1%, вы создаете щит, поглощающий наносимый вам урон в размере $108945s2% от вашего максимального запаса здоровья. Время действия – $d.

Эффект срабатывает не чаще чем раз в 90 сек.

ToolTip: Поглощение $w1 ед. урона.
Category = 0, SpellIconID = 6468, activeIconID = 0, SpellVisual = (25225,0)
Family SPELLFAMILY_PRIEST, flag [0] 0x00000000 [1] 0x01000000 [2] 0x00000000

SpellSchoolMask = 2 (SPELL_SCHOOL_MASK_HOLY)
DamageClass = 0 (SPELL_DAMAGE_CLASS_NONE)
PreventionType = 1 (SPELL_PREVENTION_TYPE_SILENCE)
=================================================
Attributes: 0x08050000 (SPELL_ATTR0_NOT_SHAPESHIFT, SPELL_ATTR0_DONT_AFFECT_SHEATH_STATE, SPELL_ATTR0_CASTABLE_WHILE_SITTING)
AttributesEx1: 0x00000400 (SPELL_ATTR1_NO_THREAT)
AttributesEx2: 0x00280000 (SPELL_ATTR2_NOT_NEED_SHAPESHIFT, SPELL_ATTR2_DAMAGE_REDUCED_SHIELD)
AttributesEx3: 0x04000000 (SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED)
AttributesEx4: 0x00100000 (SPELL_ATTR4_NOT_CHECK_SELFCAST_POWER)
AttributesEx8: 0x00001000 (SPELL_ATTR8_AURA_SEND_AMOUNT)
=================================================
Spell Level = 1, base 1, max 0

Category = 0
DispelType = 0 (DISPEL_NONE)
Mechanic = 0 (MECHANIC_NONE)
SpellRange: (Id 1) "Self Only":
    MinRangeNegative = 0, MinRangePositive = 0
    MaxRangeNegative = 0, MaxRangePositive = 0

Cast time (Id 1) = 0,00
Duration: ID (18)  20000, 0, 20000
Interrupt Flags: 0x00000008, AuraIF 0x00000000, ChannelIF 0x00000000
Chance = 0, charges - 0
=================================================
Effect 0: Id 6 (SPELL_EFFECT_APPLY_AURA) RegularDifficulty
BasePoints = 1
Targets (21, 0) (TARGET_UNIT_TARGET_ALLY, NO_TARGET)
Aura Id 69 (SPELL_AURA_SCHOOL_ABSORB), value = 1, misc = 127 (127), miscB = 0, periodic = 0

Effect 2: Id 0 (NO_SPELL_EFFECT) RegularDifficulty
BasePoints = 90
Targets (0, 0) (NO_TARGET, NO_TARGET)

School absorb = 1.

ghost avatar May 11 '16 20:05 ghost

take a look here :) https://github.com/ProjectSkyfire/SkyFire.548/blob/master/src/server/game/Server/Protocol/Opcodes.cpp#L1232

AriDEV avatar May 11 '16 20:05 AriDEV

Spell Script works - I checked, absorb apply. You just said that it is necessary to Spell Auras or Unit is a process - to be honest I'm in a dead end right now! XD

ghost avatar May 11 '16 20:05 ghost

i said what? i didnt said that it is necessary i said its implemented there. and i dont understand the dead end thingy sry :/

AriDEV avatar May 11 '16 20:05 AriDEV

Well, the spell requires custom scripts, because spellaura can not perform the required value. When she apply an aura proc 1 shield value absorb, but it takes 20 or 30 percent of your maximum health!

One word can not do without a script and it does not matter where to do it - through SpellScripts or SpellAuras.

P.S:

first the packet for spells arent 100% done if u update the spell packets most of them should work and dont need any custom script. auras are handled in src/server/game/Spells/Auras/

Now these words and put me stumped to be honest!

ghost avatar May 11 '16 21:05 ghost

Effect 0: Id 6 (SPELL_EFFECT_APPLY_AURA) RegularDifficulty BasePoints = 30 <----- WHILE BELOW 30% LIFE Targets (1, 0) (TARGET_UNIT_CASTER, NO_TARGET) Aura Id 42 (SPELL_AURA_PROC_TRIGGER_SPELL), value = 30, misc = 11 (11), miscB = 0, periodic = 0 SpellClassMask = 00200000 00000000 00000000 - 27636 - Звездные осколки - 88625 - Слово Света: Воздаяние - 88684 - Слово Света: Безмятежность - 88685 - Слово Света: Святилище + 88686 - Слово Света: Святилище Trigger spell (18350) Not found, Chance = 100

Effect 1: Id 0 (NO_SPELL_EFFECT) RegularDifficulty BasePoints = 20 <--- 20% SHIELD Targets (0, 0) (NO_TARGET, NO_TARGET)

Effect 2: Id 0 (NO_SPELL_EFFECT) RegularDifficulty BasePoints = 90 <--- 90 Secounds GCD Targets (0, 0) (NO_TARGET, NO_TARGET)

AriDEV avatar May 11 '16 21:05 AriDEV

Yes i know this! True, NO_SPELL_EFFECT need correct in server-side dbc. Maybe NO_SPELL_EFFECT should be = DUMMY_EFFECT and can be stored.

ghost avatar May 11 '16 21:05 ghost

dont think so it says NO_SPELL_EFFECT in spellworks it is if an effect is unknown or not implemented. this spell was added in 5.0.1 so if u using an spellworks and the spell effects not there then u will need to add the new spelleffects etc

AriDEV avatar May 11 '16 21:05 AriDEV

And where to add them? In SpellMgr(hack XD)? After all, no other way at this point! Note: i don't have any sniff. Sry.

WHILE BELOW 30% LIFE
and
90 Secounds GCD

Can be handled in database condition without hardcode core.

ghost avatar May 11 '16 21:05 ghost

Ra-den Murderous Strike testing and not working. Should set amount damage on attack moment. Maybe this true? Spell should have behaviour: Example you can health on current moment 500000. On moment attack you have 350000 from 500000. School damage = 350000 and apply aura on 350000 periodic damage.

// 138333 - Murderous Strike - should damage from max target health percent and apply dot from max pct.
class spell_gen_raden_murderous_strike : public SpellScriptLoader
{
    public:
        spell_gen_raden_murderous_strike() : SpellScriptLoader("spell_gen_raden_murderous_strike") { }

        class spell_gen_raden_murderous_strike_SpellScript : public SpellScript
        {
            PrepareSpellScript(spell_gen_raden_murderous_strike_SpellScript);

            void CalcDamage()
            {
                if (Unit* target = GetHitUnit())
                    SetHitDamage(target->CountPctFromMaxHealth(100)); /// @todo: find correct value
            }

            void Register() OVERRIDE
            {
                OnEffectHitTarget += SpellHitFn(spell_gen_raden_murderous_strike_SpellScript::CalcDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
            }
        };

        class spell_gen_raden_murderous_strike_AuraScript : public AuraScript
        {
            PrepareAuraScript(spell_gen_raden_murderous_strike_AuraScript);

            void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
            {
                 amount = GetTarget()->CountPctFromMaxHealth(100);
            }

            void Register() OVERRIDE
            {
                AfterEffectApply += AuraEffectUpdatePeriodicFn(spell_gen_raden_murderous_strike_AuraScript::CalculateAmount, EFFECT_1, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK);
            }

        SpellScript* GetSpellScript() const OVERRIDE
        {
            return new spell_gen_raden_murderous_strike_SpellScript();
        }

        AuraScript* GetAuraScript() const OVERRIDE
        {
            return new spell_gen_raden_murderous_strike_AuraScript();
        }
};

@Arcidev @Shoxxo @AriDEV ?

ghost avatar Jun 03 '16 19:06 ghost

Any feedback?

ghost avatar Sep 03 '16 12:09 ghost

bill-gates-feedback-quote

SkyFire avatar Sep 03 '16 13:09 SkyFire

To be continued!

ghost avatar Sep 03 '16 13:09 ghost

What we need? DBC Stuff or core Spell stuff @AriDev.

JustZerooo avatar Oct 31 '16 03:10 JustZerooo