Move functions out of mob.h and cleanup

This commit is contained in:
nytmyr
2025-01-30 22:25:54 -06:00
parent 9b72672945
commit e039ce2e37
32 changed files with 1312 additions and 1260 deletions
+22 -4
View File
@@ -1483,8 +1483,17 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
#ifdef SPELL_EFFECT_SPAM
snprintf(effect_desc, _EDLEN, "Illusion: race %d", effect_value);
#endif
if (caster && caster->IsOfClientBot() && GetIllusionBlock()) {
break;
if (caster && caster->IsOfClientBot()) {
if (IsClient()) {
if (CastToClient()->GetIllusionBlock()) {
break;
}
}
else {
if (CastToBot()->GetIllusionBlock()) {
break;
}
}
}
ApplySpellEffectIllusion(spell_id, caster, buffslot, spells[spell_id].base_value[i], spells[spell_id].limit_value[i], spells[spell_id].max_value[i]);
@@ -1496,8 +1505,17 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
#ifdef SPELL_EFFECT_SPAM
snprintf(effect_desc, _EDLEN, "Illusion Copy");
#endif
if (caster && caster->IsOfClientBot() && GetIllusionBlock()) {
break;
if (caster && caster->IsOfClientBot()) {
if (IsClient()) {
if (CastToClient()->GetIllusionBlock()) {
break;
}
}
else {
if (CastToBot()->GetIllusionBlock()) {
break;
}
}
}
if(caster && caster->GetTarget()){