mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[Quest API] Add HasSpellEffect() to Perl/Lua (#3319)
* [Quest API] Add HasSpellEffect() to Perl/Lua # Perl - Add `$mob->HasSpellEffect(effect_id)`. # Lua - Add `mob:HasSpellEffect(effect_id)`. # Notes - Allows operators to see if a Mob has an effect ID from any of their buffs. * Update mob.cpp
This commit is contained in:
+8
-8
@@ -6227,20 +6227,20 @@ FACTION_VALUE Mob::GetSpecialFactionCon(Mob* iOther) {
|
||||
|
||||
bool Mob::HasSpellEffect(int effect_id)
|
||||
{
|
||||
int i;
|
||||
const auto buff_count = GetMaxTotalSlots();
|
||||
for (int i = 0; i < buff_count; i++) {
|
||||
const auto spell_id = buffs[i].spellid;
|
||||
|
||||
int buff_count = GetMaxTotalSlots();
|
||||
for(i = 0; i < buff_count; i++)
|
||||
{
|
||||
if (!IsValidSpell(buffs[i].spellid)) {
|
||||
if (!IsValidSpell(spell_id)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (IsEffectInSpell(buffs[i].spellid, effect_id)) {
|
||||
return(1);
|
||||
if (IsEffectInSpell(spell_id, effect_id)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int Mob::GetSpecialAbility(int ability)
|
||||
|
||||
Reference in New Issue
Block a user