Open ghost opened 8 years ago
https://gist.github.com/JunkyBulgaria/1e70e3347521092a9d096a15ad57d36c
INSERT INTO spell_script_names VALUES (124974, "spell_druid_natures_vigil");
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.
it's not completed
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?
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!
spell_gen_lifesteal_juggernaut and spell_dru_cenarion_ward working. spell_priest_angelic_bulwark_AuraScript need correct.
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.
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.
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/
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.
Aura 42 SPELL_AURA_PROC_TRIGGER_SPELL is implemented in Unit::ProcDamageAndSpellFor and Unit::HandleProcTriggerSpell
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.
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
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.
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
i said what? i didnt said that it is necessary i said its implemented there. and i dont understand the dead end thingy sry :/
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!
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)
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.
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
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.
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 ?
Any feedback?
To be continued!
What we need? DBC Stuff or core Spell stuff @AriDev.
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
Juggernaut trinket lifesteal - in WoD convert in new stat. But this is MoP. Something:
http://www.wowhead.com/spell=124974/natures-vigil Don't have idea, how fixing. Sorry.