mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-25 02:08:23 +00:00
Simplify case SE_Illusion and SE_IllusionCopy for GetIllusionBlock
This commit is contained in:
+8
-18
@@ -1481,15 +1481,10 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
snprintf(effect_desc, _EDLEN, "Illusion: race %d", effect_value);
|
snprintf(effect_desc, _EDLEN, "Illusion: race %d", effect_value);
|
||||||
#endif
|
#endif
|
||||||
if (caster && caster->IsOfClientBot()) {
|
if (caster && caster->IsOfClientBot()) {
|
||||||
if (IsClient()) {
|
auto target = IsClient() ? CastToClient() : CastToBot();
|
||||||
if (CastToClient()->GetIllusionBlock()) {
|
|
||||||
break;
|
if (target && target->GetIllusionBlock()) {
|
||||||
}
|
break;
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (CastToBot()->GetIllusionBlock()) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1503,15 +1498,10 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
snprintf(effect_desc, _EDLEN, "Illusion Copy");
|
snprintf(effect_desc, _EDLEN, "Illusion Copy");
|
||||||
#endif
|
#endif
|
||||||
if (caster && caster->IsOfClientBot()) {
|
if (caster && caster->IsOfClientBot()) {
|
||||||
if (IsClient()) {
|
auto target = IsClient() ? CastToClient() : CastToBot();
|
||||||
if (CastToClient()->GetIllusionBlock()) {
|
|
||||||
break;
|
if (target && target->GetIllusionBlock()) {
|
||||||
}
|
break;
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (CastToBot()->GetIllusionBlock()) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user