mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-28 00:57:15 +00:00
Simplify case SE_Illusion and SE_IllusionCopy for GetIllusionBlock
This commit is contained in:
+6
-16
@@ -1481,17 +1481,12 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
snprintf(effect_desc, _EDLEN, "Illusion: race %d", effect_value);
|
||||
#endif
|
||||
if (caster && caster->IsOfClientBot()) {
|
||||
if (IsClient()) {
|
||||
if (CastToClient()->GetIllusionBlock()) {
|
||||
auto target = IsClient() ? CastToClient() : CastToBot();
|
||||
|
||||
if (target && target->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]);
|
||||
break;
|
||||
@@ -1503,17 +1498,12 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
snprintf(effect_desc, _EDLEN, "Illusion Copy");
|
||||
#endif
|
||||
if (caster && caster->IsOfClientBot()) {
|
||||
if (IsClient()) {
|
||||
if (CastToClient()->GetIllusionBlock()) {
|
||||
auto target = IsClient() ? CastToClient() : CastToBot();
|
||||
|
||||
if (target && target->GetIllusionBlock()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (CastToBot()->GetIllusionBlock()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(caster && caster->GetTarget()){
|
||||
SendIllusionPacket
|
||||
|
||||
Reference in New Issue
Block a user