mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 17:38:26 +00:00
Cleanup BlockedBuffs logic in SpellOnTarget
This commit is contained in:
+15
-6
@@ -4062,13 +4062,22 @@ bool Mob::SpellOnTarget(
|
||||
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
|
||||
if (
|
||||
(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())
|
||||
) {
|
||||
if (client_blocked_buffs || bot_blocked_buffs) {
|
||||
// We return true here since the caster's client should act like normal
|
||||
if (spelltar->IsBlockedBuff(spell_id)) {
|
||||
LogSpells(
|
||||
|
||||
Reference in New Issue
Block a user