mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-17 08:00:48 +01:00
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:
@@ -1036,14 +1036,14 @@ void ScriptMgr::OnAuctionExpire(AuctionHouseObject* ah, AuctionEntry* entry)
|
||||
FOREACH_SCRIPT(AuctionHouseScript)->OnAuctionExpire(ah, entry);
|
||||
}
|
||||
|
||||
bool ScriptMgr::OnConditionCheck(Condition* condition, Player* player, Unit* invoker)
|
||||
bool ScriptMgr::OnConditionCheck(Condition* condition, WorldObject* object, WorldObject* invoker)
|
||||
{
|
||||
ASSERT(condition);
|
||||
ASSERT(player);
|
||||
ASSERT(object);
|
||||
// invoker can be NULL.
|
||||
|
||||
GET_SCRIPT_RET(ConditionScript, condition->mScriptId, tmpscript, true);
|
||||
return tmpscript->OnConditionCheck(condition, player, invoker);
|
||||
return tmpscript->OnConditionCheck(condition, object, invoker);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnInstall(Vehicle* veh)
|
||||
|
||||
Reference in New Issue
Block a user