ProjectSkyfire / SkyFire_548

SkyFireEMU is a full featured World of Warcraft: Mists of Pandaria emulator written in C++. || Compatible with World of Warcraft client 5.4.8 (Build: 18414) Project Established in 2011 || Support on Discord https://discord.gg/DnKZycD
http://www.projectskyfire.org
GNU General Public License v3.0
498 stars 421 forks source link

Trying to fix some spells. #708

Open ghost opened 8 years ago

ghost commented 8 years ago

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.

FALL1N1 commented 8 years ago

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

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

ghost commented 8 years ago

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.

FALL1N1 commented 8 years ago

it's not completed

ghost commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

spell_gen_lifesteal_juggernaut and spell_dru_cenarion_ward working. spell_priest_angelic_bulwark_AuraScript need correct.

AriDEV commented 8 years ago

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.

ghost commented 8 years ago
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.

AriDEV commented 8 years ago

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/

ghost commented 8 years ago

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.

AriDEV commented 8 years ago

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

ghost commented 8 years ago

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.

AriDEV commented 8 years ago

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

ghost commented 8 years ago

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.

AriDEV commented 8 years ago

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

ghost commented 8 years ago

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

AriDEV commented 8 years ago

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

ghost commented 8 years ago

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!

AriDEV commented 8 years ago

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

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)

ghost commented 8 years ago

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.

AriDEV commented 8 years ago

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

ghost commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

Any feedback?

SkyFire commented 8 years ago

bill-gates-feedback-quote

ghost commented 8 years ago

To be continued!

JustZerooo commented 8 years ago

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