Core/Db/Conditions: Prepare conditions system to work on objects of different type than players.
Warning: API has changed a bit: ConditionScript::OnConditionCheck(Condition* condition, Player* player, Unit* invoker) is now ConditionScript::OnConditionCheck(Condition* condition, WorldObject* object, WorldObject* invoker)
This commit is contained in:
@@ -341,7 +341,7 @@ LootItem::LootItem(LootStoreItem const& li)
|
||||
bool LootItem::AllowedForPlayer(Player const* player) const
|
||||
{
|
||||
// DB conditions check
|
||||
if (!sConditionMgr->IsPlayerMeetToConditions(const_cast<Player*>(player), conditions))
|
||||
if (!sConditionMgr->IsObjectMeetToConditions(const_cast<Player*>(player), conditions))
|
||||
return false;
|
||||
|
||||
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(itemid);
|
||||
|
||||
Reference in New Issue
Block a user