mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-19 16:52:25 +00:00
Resolve merge conflict with updated base branch
Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com>
This commit is contained in:
parent
c9bee6cf0a
commit
9a657e7d6a
@ -4693,49 +4693,52 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses, bool suppress, uint32 su
|
|||||||
if (!IsValidSpell(buffs[slot].spellid))
|
if (!IsValidSpell(buffs[slot].spellid))
|
||||||
return;
|
return;
|
||||||
const auto& spell = spells[buffs[slot].spellid];
|
const auto& spell = spells[buffs[slot].spellid];
|
||||||
// Restore nimbus (visual aura) effect before processing individual spell effects,
|
if (IsValidSpell(buffs[slot].spellid)) {
|
||||||
// mirroring Client::ReapplyBuff and bot buff restoration behavior.
|
const auto &spell = spells[buffs[slot].spellid];
|
||||||
if (spell.nimbus_effect) {
|
// Restore nimbus (visual aura) effect before processing individual spell effects,
|
||||||
SetNimbusEffect(spell.nimbus_effect);
|
// mirroring Client::ReapplyBuff and bot buff restoration behavior.
|
||||||
}
|
if (spell.nimbus_effect) {
|
||||||
for (int i = 0; i < EFFECT_COUNT; i++) {
|
SetNimbusEffect(spell.nimbus_effect);
|
||||||
switch (spell.effect_id[i]) {
|
|
||||||
case SpellEffect::Illusion:
|
|
||||||
ApplySpellEffectIllusion(spell.id, entity_list.GetMobID(buffs[slot].casterid), slot, spell.base_value[i], spell.limit_value[i], spell.max_value[i]);
|
|
||||||
break;
|
|
||||||
case SpellEffect::Silence:
|
|
||||||
Silence(true);
|
|
||||||
break;
|
|
||||||
case SpellEffect::Amnesia:
|
|
||||||
Amnesia(true);
|
|
||||||
break;
|
|
||||||
case SpellEffect::AddMeleeProc:
|
|
||||||
case SpellEffect::WeaponProc:
|
|
||||||
AddProcToWeapon(GetProcID(buffs[slot].spellid, i), false, 100 + spell.limit_value[i], buffs[slot].spellid, buffs[slot].casterlevel, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::MELEE_PROC));
|
|
||||||
break;
|
|
||||||
case SpellEffect::DefensiveProc:
|
|
||||||
AddDefensiveProc(GetProcID(buffs[slot].spellid, i), 100 + spell.limit_value[i], buffs[slot].spellid, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::DEFENSIVE_PROC));
|
|
||||||
break;
|
|
||||||
case SpellEffect::RangedProc:
|
|
||||||
AddRangedProc(GetProcID(buffs[slot].spellid, i), 100 + spell.limit_value[i], buffs[slot].spellid, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::RANGED_PROC));
|
|
||||||
break;
|
|
||||||
case SpellEffect::Levitate:
|
|
||||||
{
|
|
||||||
// Restore levitate visual effects after suppression expires
|
|
||||||
if (!zone->CanLevitate()) {
|
|
||||||
SendAppearancePacket(AppearanceType::FlyMode, 0);
|
|
||||||
BuffFadeByEffect(SpellEffect::Levitate);
|
|
||||||
} else {
|
|
||||||
if (spell.limit_value[i] == 1) {
|
|
||||||
SendAppearancePacket(AppearanceType::FlyMode, EQ::constants::GravityBehavior::LevitateWhileRunning);
|
|
||||||
} else {
|
|
||||||
SendAppearancePacket(AppearanceType::FlyMode, EQ::constants::GravityBehavior::Levitating);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
default:
|
for (int i = 0; i < EFFECT_COUNT; i++) {
|
||||||
break;
|
switch (spell.effect_id[i]) {
|
||||||
|
case SpellEffect::Illusion:
|
||||||
|
ApplySpellEffectIllusion(spell.id, entity_list.GetMobID(buffs[slot].casterid), slot, spell.base_value[i], spell.limit_value[i], spell.max_value[i]);
|
||||||
|
break;
|
||||||
|
case SpellEffect::Silence:
|
||||||
|
Silence(true);
|
||||||
|
break;
|
||||||
|
case SpellEffect::Amnesia:
|
||||||
|
Amnesia(true);
|
||||||
|
break;
|
||||||
|
case SpellEffect::AddMeleeProc:
|
||||||
|
case SpellEffect::WeaponProc:
|
||||||
|
AddProcToWeapon(GetProcID(buffs[slot].spellid, i), false, 100 + spell.limit_value[i], buffs[slot].spellid, buffs[slot].casterlevel, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::MELEE_PROC));
|
||||||
|
break;
|
||||||
|
case SpellEffect::DefensiveProc:
|
||||||
|
AddDefensiveProc(GetProcID(buffs[slot].spellid, i), 100 + spell.limit_value[i], buffs[slot].spellid, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::DEFENSIVE_PROC));
|
||||||
|
break;
|
||||||
|
case SpellEffect::RangedProc:
|
||||||
|
AddRangedProc(GetProcID(buffs[slot].spellid, i), 100 + spell.limit_value[i], buffs[slot].spellid, GetSpellProcLimitTimer(buffs[slot].spellid, ProcType::RANGED_PROC));
|
||||||
|
break;
|
||||||
|
case SpellEffect::Levitate:
|
||||||
|
{
|
||||||
|
// Restore levitate visual effects after suppression expires
|
||||||
|
if (!zone->CanLevitate()) {
|
||||||
|
SendAppearancePacket(AppearanceType::FlyMode, 0);
|
||||||
|
BuffFadeByEffect(SpellEffect::Levitate);
|
||||||
|
} else {
|
||||||
|
if (spell.limit_value[i] == 1) {
|
||||||
|
SendAppearancePacket(AppearanceType::FlyMode, EQ::constants::GravityBehavior::LevitateWhileRunning);
|
||||||
|
} else {
|
||||||
|
SendAppearancePacket(AppearanceType::FlyMode, EQ::constants::GravityBehavior::Levitating);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user