mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 16:28:28 +00:00
[Quest API] Add AddAISpellEffect(spell_effect_id, base_value, limit_value, max_value) and RemoveAISpellEffect(spell_effect_id) to Lua. (#1981)
- Add npc:AddAISpellEffect(spell_effect_id, base_value, limit_value, max_value) to Lua. - Add npc:RemoveAISpellEffect(spell_effect_id) to Lua.
This commit is contained in:
@@ -2799,6 +2799,17 @@ void NPC::RemoveSpellEffectFromNPCList(uint16 iSpellEffectID, bool apply_bonus)
|
||||
}
|
||||
}
|
||||
|
||||
bool NPC::HasAISpellEffect(uint16 spell_effect_id)
|
||||
{
|
||||
for (const auto& spell_effect : AIspellsEffects) {
|
||||
if (spell_effect.spelleffectid == spell_effect_id) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IsSpellEffectInList(DBnpcspellseffects_Struct* spelleffect_list, uint16 iSpellEffectID, int32 base_value, int32 limit, int32 max_value) {
|
||||
for (uint32 i=0; i < spelleffect_list->numentries; i++) {
|
||||
if (spelleffect_list->entries[i].spelleffectid == iSpellEffectID && spelleffect_list->entries[i].base_value == base_value
|
||||
|
||||
Reference in New Issue
Block a user