nullptr fix

This commit is contained in:
bash
2025-08-13 00:36:33 +02:00
committed by GitHub
parent 8d51092d42
commit 6e638cdf0c

View File

@@ -161,25 +161,24 @@ void PlayerbotFactory::Init()
{
uint32 gemId = iter->GemID;
if (gemId == 0)
{
continue;
}
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(gemId);
if (proto->ItemLevel < 60)
continue;
if (!proto)
continue
if (proto->ItemLevel < 60)
continue;
if (proto->Flags & ITEM_FLAG_UNIQUE_EQUIPPABLE)
{
continue;
}
if (sRandomItemMgr->IsTestItem(gemId))
continue;
if (!proto || !sGemPropertiesStore.LookupEntry(proto->GemProperties))
{
if (!sGemPropertiesStore.LookupEntry(proto->GemProperties))
continue;
}
// LOG_INFO("playerbots", "Add {} to enchantment gems", gemId);
enchantGemIdCache.push_back(gemId);
}