[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
+3 -3
View File
@@ -766,7 +766,7 @@ bool BotDatabase::LoadBuffs(Bot* bot_inst)
else if (CalculateCorruptionCounters(bot_buffs[buff_count].spellid) > 0)
bot_buffs[buff_count].counters = atoi(row[7]);
bot_buffs[buff_count].numhits = atoi(row[8]);
bot_buffs[buff_count].hit_number = atoi(row[8]);
bot_buffs[buff_count].melee_rune = atoi(row[9]);
bot_buffs[buff_count].magic_rune = atoi(row[10]);
bot_buffs[buff_count].dot_rune = atoi(row[11]);
@@ -843,13 +843,13 @@ bool BotDatabase::SaveBuffs(Bot* bot_inst)
bot_inst->GetBotID(),
bot_buffs[buff_index].spellid,
bot_buffs[buff_index].casterlevel,
spells[bot_buffs[buff_index].spellid].buffdurationformula,
spells[bot_buffs[buff_index].spellid].buff_duration_formula,
bot_buffs[buff_index].ticsremaining,
((CalculatePoisonCounters(bot_buffs[buff_index].spellid) > 0) ? (bot_buffs[buff_index].counters) : (0)),
((CalculateDiseaseCounters(bot_buffs[buff_index].spellid) > 0) ? (bot_buffs[buff_index].counters) : (0)),
((CalculateCurseCounters(bot_buffs[buff_index].spellid) > 0) ? (bot_buffs[buff_index].counters) : (0)),
((CalculateCorruptionCounters(bot_buffs[buff_index].spellid) > 0) ? (bot_buffs[buff_index].counters) : (0)),
bot_buffs[buff_index].numhits,
bot_buffs[buff_index].hit_number,
bot_buffs[buff_index].melee_rune,
bot_buffs[buff_index].magic_rune,
bot_buffs[buff_index].dot_rune,