mirror of
https://github.com/EQEmu/Server.git
synced 2026-10-08 13:43:35 +00:00
[Crash] Validate item in SE_SummonItemIntoBag (#4734)
This commit is contained in:
1 parent
ab14458f9e
commit
0ef79903f8
1 file changed
+5
@@ -1243,6 +1243,11 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
case SE_SummonItemIntoBag:
|
||||
{
|
||||
const EQ::ItemData *item = database.GetItem(spell.base_value[i]);
|
||||
if (!item) {
|
||||
Message(Chat::Red, "Unable to summon item %d. Item not found.", spell.base_value[i]);
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef SPELL_EFFECT_SPAM
|
||||
const char *itemname = item ? item->Name : "*Unknown Item*";
|
||||
snprintf(effect_desc, _EDLEN, "Summon Item In Bag: %s (id %d)", itemname, spell.base_value[i]);
|
||||
|
||||
Reference in new issue
Block a user