fix(DB/Creatures): Nat Pagle should display vendor icon if player completed Nat's Measuring Tap quest. (#10657)

Moved c++ script to DB. Original author: @offl
Fixes #10559
This commit is contained in:
UltraNix
2022-02-17 01:13:39 +01:00
committed by GitHub
parent faf88c7f9c
commit 1366838a05
7 changed files with 68 additions and 49 deletions
+15 -5
View File
@@ -885,7 +885,14 @@ ConditionList ConditionMgr::GetConditionsForNpcVendorEvent(uint32 creatureId, ui
if (i != (*itr).second.end())
{
cond = (*i).second;
LOG_DEBUG("condition", "GetConditionsForNpcVendorEvent: found conditions for creature entry {} item {}", creatureId, itemId);
if (itemId)
{
LOG_DEBUG("condition", "GetConditionsForNpcVendorEvent: found conditions for creature entry {} item {}", creatureId, itemId);
}
else
{
LOG_DEBUG("condition", "GetConditionsForNpcVendorEvent: found conditions for creature entry {}", creatureId);
}
}
}
return cond;
@@ -1650,11 +1657,14 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
LOG_ERROR("condition", "SourceEntry {} in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup);
return false;
}
ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(cond->SourceEntry);
if (!itemTemplate)
if (cond->SourceEntry)
{
LOG_ERROR("condition", "SourceEntry {} in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceEntry);
return false;
ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(cond->SourceEntry);
if (!itemTemplate)
{
LOG_ERROR("condition", "SourceEntry {} in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceEntry);
return false;
}
}
break;
}