mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
Fix potential crashes in zone/spells.cpp
This commit is contained in:
parent
48fb483de6
commit
69f06f736c
@ -3139,7 +3139,7 @@ int Mob::AddBuff(Mob *caster, uint16 spell_id, int duration, int32 level_overrid
|
|||||||
if (ret == -1) { // stop the spell
|
if (ret == -1) { // stop the spell
|
||||||
Log.Out(Logs::Detail, Logs::Spells, "Adding buff %d failed: stacking prevented by spell %d in slot %d with caster level %d",
|
Log.Out(Logs::Detail, Logs::Spells, "Adding buff %d failed: stacking prevented by spell %d in slot %d with caster level %d",
|
||||||
spell_id, curbuf.spellid, buffslot, curbuf.casterlevel);
|
spell_id, curbuf.spellid, buffslot, curbuf.casterlevel);
|
||||||
if (caster->IsClient() && RuleB(Client, UseLiveBlockedMessage)) {
|
if (caster && caster->IsClient() && RuleB(Client, UseLiveBlockedMessage)) {
|
||||||
caster->Message(13, "Your %s did not take hold on %s. (Blocked by %s.)", spells[spell_id].name, this->GetName(), spells[curbuf.spellid].name);
|
caster->Message(13, "Your %s did not take hold on %s. (Blocked by %s.)", spells[spell_id].name, this->GetName(), spells[curbuf.spellid].name);
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user