mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-24 13:38:21 +00:00
Cleanup BlockedBuffs logic in SpellOnTarget
This commit is contained in:
+15
-6
@@ -4062,13 +4062,22 @@ bool Mob::SpellOnTarget(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool client_blocked_buffs =
|
||||||
|
RuleB(Spells, EnableBlockedBuffs) &&
|
||||||
|
(
|
||||||
|
spelltar->IsClient() ||
|
||||||
|
(spelltar->IsPet() && spelltar->IsPetOwnerClient())
|
||||||
|
);
|
||||||
|
|
||||||
|
bool bot_blocked_buffs =
|
||||||
|
RuleB(Bots, AllowBotBlockedBuffs) &&
|
||||||
|
(
|
||||||
|
spelltar->IsBot() ||
|
||||||
|
(spelltar->IsPet() && spelltar->IsPetOwnerBot())
|
||||||
|
);
|
||||||
|
|
||||||
// now check if the spell is allowed to land
|
// now check if the spell is allowed to land
|
||||||
if (
|
if (client_blocked_buffs || bot_blocked_buffs) {
|
||||||
(RuleB(Spells, EnableBlockedBuffs) && spelltar->IsClient()) ||
|
|
||||||
(RuleB(Spells, EnableBlockedBuffs) && spelltar->IsPet() && spelltar->GetOwner() && spelltar->GetOwner()->IsClient()) ||
|
|
||||||
(RuleB(Bots, AllowBotBlockedBuffs) && spelltar->IsBot()) ||
|
|
||||||
(RuleB(Bots, AllowBotBlockedBuffs) && spelltar->IsPet() && spelltar->GetOwner() && spelltar->GetOwner()->IsBot())
|
|
||||||
) {
|
|
||||||
// We return true here since the caster's client should act like normal
|
// We return true here since the caster's client should act like normal
|
||||||
if (spelltar->IsBlockedBuff(spell_id)) {
|
if (spelltar->IsBlockedBuff(spell_id)) {
|
||||||
LogSpells(
|
LogSpells(
|
||||||
|
|||||||
Reference in New Issue
Block a user