[Quest API] Add Spell methods to Perl. (#1631)

* [Quest API] Add Spell methods to Perl.
- Add quest::getspell(spell_id) to Perl.
- Add eq.get_spell(spell_id) to Lua.
These methods return a spell object.

Exports $spell object references to spell events.

* Formatting.

* Remove comment.

* Update spdat.cpp

* Amplication typo.

* Fix conflicts.

* Remove repository changes.

* Fix typing.

* Update spell_effects.cpp
This commit is contained in:
Kinglykrab
2021-11-03 17:47:15 -04:00
committed by GitHub
parent 6e26e8953c
commit 17aaab1f9d
61 changed files with 4342 additions and 2117 deletions
+4 -4
View File
@@ -201,7 +201,7 @@ void Mob::DoSpecialAttackDamage(Mob *who, EQ::skills::SkillType skill, int32 bas
float chance = aabonuses.SkillAttackProc[SBIndex::SKILLPROC_CHANCE] / 1000.0f;
if (zone->random.Roll(chance))
SpellFinished(aabonuses.SkillAttackProc[SBIndex::SKILLPROC_SPELL_ID], who, EQ::spells::CastingSlot::Item, 0, -1,
spells[aabonuses.SkillAttackProc[SBIndex::SKILLPROC_SPELL_ID]].ResistDiff);
spells[aabonuses.SkillAttackProc[SBIndex::SKILLPROC_SPELL_ID]].resist_difficulty);
}
who->Damage(this, my_hit.damage_done, SPELL_UNKNOWN, skill, false);
@@ -1039,7 +1039,7 @@ void Mob::ProjectileAttack()
if (ProjectileAtk[i].skill == EQ::skills::SkillConjuration) {
if (IsValidSpell(ProjectileAtk[i].wpn_dmg))
SpellOnTarget(ProjectileAtk[i].wpn_dmg, target, false, true,
spells[ProjectileAtk[i].wpn_dmg].ResistDiff,
spells[ProjectileAtk[i].wpn_dmg].resist_difficulty,
true);
} else {
CastToNPC()->DoRangedAttackDmg(
@@ -1059,7 +1059,7 @@ void Mob::ProjectileAttack()
else if (ProjectileAtk[i].skill == EQ::skills::SkillConjuration &&
IsValidSpell(ProjectileAtk[i].wpn_dmg))
SpellOnTarget(ProjectileAtk[i].wpn_dmg, target, false, true,
spells[ProjectileAtk[i].wpn_dmg].ResistDiff, true);
spells[ProjectileAtk[i].wpn_dmg].resist_difficulty, true);
}
}
@@ -2208,7 +2208,7 @@ void Mob::DoMeleeSkillAttackDmg(Mob *other, uint16 weapon_damage, EQ::skills::Sk
float chance = aabonuses.SkillAttackProc[SBIndex::SKILLPROC_CHANCE] / 1000.0f;
if (zone->random.Roll(chance))
SpellFinished(aabonuses.SkillAttackProc[SBIndex::SKILLPROC_SPELL_ID], other, EQ::spells::CastingSlot::Item, 0, -1,
spells[aabonuses.SkillAttackProc[SBIndex::SKILLPROC_SPELL_ID]].ResistDiff);
spells[aabonuses.SkillAttackProc[SBIndex::SKILLPROC_SPELL_ID]].resist_difficulty);
}
other->Damage(this, damage, SPELL_UNKNOWN, skillinuse);