define caster to fix a crash from #1618 (#1632)

This commit is contained in:
splose 2021-10-22 13:48:15 -04:00 committed by GitHub
parent 81e7cf5a32
commit 657cbbcabe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,9 +163,9 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
std::string buf = fmt::format(
"{} {} {} {}",
caster->GetID(),
caster ? caster->GetID() : 0,
buffs[buffslot].ticsremaining,
caster->GetLevel(),
caster ? caster->GetLevel() : 0,
buffslot
);
@ -3751,9 +3751,9 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster)
std::string buf = fmt::format(
"{} {} {} {}",
caster->GetID(),
caster ? caster->GetID() : 0,
buffs[slot].ticsremaining,
caster->GetLevel(),
caster ? caster->GetLevel() : 0,
slot
);