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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user