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:
hondacrx
2022-08-04 18:19:37 -04:00
parent 2f1a4b5ba3
commit e92d1ee4e9
3 changed files with 26 additions and 2 deletions
+12 -2
View File
@@ -1823,6 +1823,15 @@ namespace Game
}
break;
}
case ConditionTypes.PlayerCondition:
{
if (!CliDB.PlayerConditionStorage.ContainsKey(cond.ConditionValue1))
{
Log.outError(LogFilter.Sql, $"{cond.ToString(true)} has non existing PlayerConditionId in value1 ({cond.ConditionValue1}), skipped.");
return false;
}
break;
}
default:
Log.outError(LogFilter.Sql, $"{cond.ToString()} Invalid ConditionType in `condition` table, ignoring.");
return false;
@@ -3055,8 +3064,9 @@ namespace Game
new ConditionTypeInfo("Object Entry or Guid", true, true, true),
new ConditionTypeInfo("Object TypeMask", true, false, false),
new ConditionTypeInfo("BattlePet Species Learned", true, true, true),
new ConditionTypeInfo("On Scenario Step", true, false, false),
new ConditionTypeInfo("Scene In Progress", true, false, false)
new ConditionTypeInfo("On Scenario Step", true, false, false),
new ConditionTypeInfo("Scene In Progress", true, false, false),
new ConditionTypeInfo("Player Condition", true, false, false)
};
public struct ConditionTypeInfo