Compare commits

...

2 Commits

Author SHA1 Message Date
KayenEQ d18a30b047 root no break variable update
root no break variable update
2025-04-06 14:34:52 -04:00
KayenEQ 359f90a987 Root break update
Roots will not break from damage spells if spell skill is set to 200. Live mechanic.
2025-04-03 18:42:53 -04:00
2 changed files with 5 additions and 1 deletions
+2
View File
@@ -246,6 +246,8 @@
#define MAX_INVISIBILTY_LEVEL 254
#define NO_ROOT_BREAK_SKILL_ID 200 //Live mechanic where if skill id in a spell is set to 200 it will prevent that spell from having a chance to break roots.
//instrument item id's used as song components
#define INSTRUMENT_HAND_DRUM 13000
#define INSTRUMENT_WOODEN_FLUTE 13001
+3 -1
View File
@@ -4439,8 +4439,9 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
if (IsValidSpell(spell_id) && !iBuffTic) {
//see if root will break
if (IsRooted() && !FromDamageShield) // neotoyko: only spells cancel root
if (IsRooted() && !FromDamageShield && spells[spell_id].skill != NO_ROOT_BREAK_SKILL_ID) { // neotoyko: only spells cancel root
TryRootFadeByDamage(buffslot, attacker);
}
}
else if (!IsValidSpell(spell_id))
{
@@ -6223,6 +6224,7 @@ bool Mob::TryRootFadeByDamage(int buffslot, Mob* attacker) {
- If multiple roots on target, always and only checks first root slot and if broken only removes that slots root.
- Only roots on determental spells can be broken by damage.
- Root break chance values obtained from live parses.
- If casting skill is set to 200 then spell can not break root
*/
if (!attacker || !spellbonuses.Root[SBIndex::ROOT_EXISTS] || spellbonuses.Root[SBIndex::ROOT_BUFFSLOT] < 0) {