Core/Conditions: Added CONDITION_PLAYER_CONDITION to integrate conditions with db2 data
Port From (https://github.com/TrinityCore/TrinityCore/commit/3a56b914c64dd44303f63fe8f6cb9ac4865e5a59)
This commit is contained in:
@@ -438,6 +438,16 @@ namespace Game.Conditions
|
||||
condMeets = player.GetSceneMgr().GetActiveSceneCount(ConditionValue1) > 0;
|
||||
break;
|
||||
}
|
||||
case ConditionTypes.PlayerCondition:
|
||||
{
|
||||
if (player != null)
|
||||
{
|
||||
PlayerConditionRecord playerCondition = CliDB.PlayerConditionStorage.LookupByKey(ConditionValue1);
|
||||
if (playerCondition != null)
|
||||
condMeets = ConditionManager.IsPlayerMeetingCondition(player, playerCondition);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -556,6 +566,9 @@ namespace Game.Conditions
|
||||
case ConditionTypes.SceneInProgress:
|
||||
mask |= GridMapTypeMask.Player;
|
||||
break;
|
||||
case ConditionTypes.PlayerCondition:
|
||||
mask |= GridMapTypeMask.Player;
|
||||
break;
|
||||
default:
|
||||
Cypher.Assert(false, "Condition.GetSearcherTypeMaskForCondition - missing condition handling!");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user