mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-09 22:20:24 +00:00
[Bug Fix] Depop Charm Pet and Detach Debuffs on Evacuate (#3888)
* [Bug Fix] depop charm pet and detach debuffs on evac. This will depop charm pets and deteach debuffs to prevent some social aggro issues and exploitable conditions with charming and pulling a mob across the zone with no aggro concerns. * Added Rules
This commit is contained in:
@@ -4843,6 +4843,26 @@ bool Mob::IsAffectedByBuffByGlobalGroup(GlobalGroup group)
|
||||
return false;
|
||||
}
|
||||
|
||||
void Mob::BuffDetachCaster(Mob *caster) {
|
||||
if (!caster) {
|
||||
return;
|
||||
}
|
||||
|
||||
int buff_count = GetMaxTotalSlots();
|
||||
for (int j = 0; j < buff_count; j++) {
|
||||
if (buffs[j].spellid != SPELL_UNKNOWN) {
|
||||
if (IsDetrimentalSpell(buffs[j].spellid)) {
|
||||
//this is a pretty terrible way to do this but
|
||||
//there really isn't another way till I rewrite the basics
|
||||
Mob* c = entity_list.GetMob(buffs[j].casterid);
|
||||
if (c && c == caster) {
|
||||
buffs[j].casterid = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// checks if 'this' can be affected by spell_id from caster
|
||||
// returns true if the spell should fail, false otherwise
|
||||
bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||
|
||||
Reference in New Issue
Block a user