mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
[Crash] Fix raid/group crash regression (#4671)
This commit is contained in:
parent
c228604255
commit
ac4ffefa09
@ -2686,7 +2686,11 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, in
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (spell_target->IsRaidGrouped() && spell_target->IsOfClientBot()) {
|
} else if (spell_target->IsRaidGrouped() && spell_target->IsOfClientBot()) {
|
||||||
Raid *target_raid = (IsClient() ? entity_list.GetRaidByClient(spell_target->CastToClient()) : entity_list.GetRaidByBot(spell_target->CastToBot()));
|
Raid *target_raid = entity_list.GetRaidByClient(spell_target->CastToClient());
|
||||||
|
if (IsBot()) {
|
||||||
|
target_raid = entity_list.GetRaidByBot(spell_target->CastToBot());
|
||||||
|
}
|
||||||
|
|
||||||
uint32 gid = 0xFFFFFFFF;
|
uint32 gid = 0xFFFFFFFF;
|
||||||
if (target_raid) {
|
if (target_raid) {
|
||||||
gid = target_raid->GetGroup(spell_target->GetName());
|
gid = target_raid->GetGroup(spell_target->GetName());
|
||||||
@ -3809,10 +3813,10 @@ int Mob::CanBuffStack(uint16 spellid, uint8 caster_level, bool iFailIfOverwrite)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
IsBot() &&
|
IsBot() &&
|
||||||
GetClass() == Class::Bard &&
|
GetClass() == Class::Bard &&
|
||||||
curbuf.spellid == spellid &&
|
curbuf.spellid == spellid &&
|
||||||
curbuf.ticsremaining == 0 &&
|
curbuf.ticsremaining == 0 &&
|
||||||
curbuf.casterid == GetID()
|
curbuf.casterid == GetID()
|
||||||
) {
|
) {
|
||||||
LogAI("Bard check for song, spell [{}] has [{}] ticks remaining.", spellid, curbuf.ticsremaining);
|
LogAI("Bard check for song, spell [{}] has [{}] ticks remaining.", spellid, curbuf.ticsremaining);
|
||||||
@ -4038,17 +4042,17 @@ bool Mob::SpellOnTarget(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool client_blocked_buffs =
|
bool client_blocked_buffs =
|
||||||
RuleB(Spells, EnableBlockedBuffs) &&
|
RuleB(Spells, EnableBlockedBuffs) &&
|
||||||
(
|
(
|
||||||
spelltar->IsClient() ||
|
spelltar->IsClient() ||
|
||||||
(spelltar->IsPet() && spelltar->IsPetOwnerClient())
|
(spelltar->IsPet() && spelltar->IsPetOwnerClient())
|
||||||
);
|
);
|
||||||
|
|
||||||
bool bot_blocked_buffs =
|
bool bot_blocked_buffs =
|
||||||
RuleB(Bots, AllowBotBlockedBuffs) &&
|
RuleB(Bots, AllowBotBlockedBuffs) &&
|
||||||
(
|
(
|
||||||
spelltar->IsBot() ||
|
spelltar->IsBot() ||
|
||||||
(spelltar->IsPet() && spelltar->IsPetOwnerBot())
|
(spelltar->IsPet() && spelltar->IsPetOwnerBot())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user