mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-04 19:22:38 +00:00
Fix: restrict spell suppression restoration to client-owned pets; preserve cleanup via guarded restoration; restore levitate visuals for pets
- Limit restoration code path to IsPet() && GetOwner()->IsClient()\n- Guard restoration logic instead of early-return to keep cleanup paths\n- Restore nimbus, illusion, procs, and levitate FlyMode appropriately\n- Resolve conflicts with master in zone/spell_effects.cpp for PR #45 Co-Authored-By: Warp <agent@warp.dev>
This commit is contained in:
parent
139343691a
commit
185f2a4db3
@ -4695,14 +4695,11 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses, bool suppress, uint32 su
|
|||||||
client->ReapplyBuff(slot, true);
|
client->ReapplyBuff(slot, true);
|
||||||
} else if (IsPet() && GetOwner() && GetOwner()->IsClient()) {
|
} else if (IsPet() && GetOwner() && GetOwner()->IsClient()) {
|
||||||
// Reapply visual/state effects for client pets only
|
// Reapply visual/state effects for client pets only
|
||||||
// All other non-client mobs (NPCs, bots, mercs) use normal dispel mechanic
|
// Other non-client mobs (NPCs, bots, mercs) use the normal dispel mechanic
|
||||||
if (!IsValidSpell(buffs[slot].spellid))
|
|
||||||
return;
|
|
||||||
const auto& spell = spells[buffs[slot].spellid];
|
|
||||||
if (IsValidSpell(buffs[slot].spellid)) {
|
if (IsValidSpell(buffs[slot].spellid)) {
|
||||||
const auto &spell = spells[buffs[slot].spellid];
|
const auto& spell = spells[buffs[slot].spellid];
|
||||||
// Restore nimbus (visual aura) effect before processing individual spell effects,
|
// Restore nimbus (visual aura) effect before processing individual spell effects,
|
||||||
// mirroring Client::ReapplyBuff and bot buff restoration behavior.
|
// mirroring Client::ReapplyBuff behavior for client-owned pets.
|
||||||
if (spell.nimbus_effect) {
|
if (spell.nimbus_effect) {
|
||||||
SetNimbusEffect(spell.nimbus_effect);
|
SetNimbusEffect(spell.nimbus_effect);
|
||||||
}
|
}
|
||||||
@ -4727,8 +4724,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses, bool suppress, uint32 su
|
|||||||
case SpellEffect::RangedProc:
|
case SpellEffect::RangedProc:
|
||||||
AddRangedProc(GetProcID(buffs[slot].spellid, i), 100 + spell.limit_value[i], buffs[slot].spellid, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::RANGED_PROC));
|
AddRangedProc(GetProcID(buffs[slot].spellid, i), 100 + spell.limit_value[i], buffs[slot].spellid, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::RANGED_PROC));
|
||||||
break;
|
break;
|
||||||
case SpellEffect::Levitate:
|
case SpellEffect::Levitate: {
|
||||||
{
|
|
||||||
// Restore levitate visual effects after suppression expires
|
// Restore levitate visual effects after suppression expires
|
||||||
if (!zone->CanLevitate()) {
|
if (!zone->CanLevitate()) {
|
||||||
SendAppearancePacket(AppearanceType::FlyMode, 0);
|
SendAppearancePacket(AppearanceType::FlyMode, 0);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user