Core/Condition: Implemented condition CONDITION_PRIVATE_OBJECT
Port From (https://github.com/TrinityCore/TrinityCore/commit/f28b4eed3d875ccedde574b0abc7258290b4c0a3)
This commit is contained in:
@@ -62,6 +62,7 @@ namespace Framework.Constants
|
||||
ScenarioStep = 54, // ScenarioStepId 0 0 true if player is at scenario with current step equal to ScenarioStepID
|
||||
SceneInProgress = 55, // SceneScriptPackageId 0 0 true if player is playing a scene with ScriptPackageId equal to given value
|
||||
PlayerCondition = 56, // PlayerConditionId 0 0 true if player satisfies PlayerCondition
|
||||
PrivateObject = 57, // 0 0 0 true if entity is private object
|
||||
Max
|
||||
}
|
||||
|
||||
|
||||
@@ -435,6 +435,11 @@ namespace Game.Conditions
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ConditionTypes.PrivateObject:
|
||||
{
|
||||
condMeets = !obj.GetPrivateObjectOwner().IsEmpty();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -556,6 +561,9 @@ namespace Game.Conditions
|
||||
case ConditionTypes.PlayerCondition:
|
||||
mask |= GridMapTypeMask.Player;
|
||||
break;
|
||||
case ConditionTypes.PrivateObject:
|
||||
mask |= GridMapTypeMask.All & ~GridMapTypeMask.Player;
|
||||
break;
|
||||
default:
|
||||
Cypher.Assert(false, "Condition.GetSearcherTypeMaskForCondition - missing condition handling!");
|
||||
break;
|
||||
|
||||
@@ -1796,6 +1796,7 @@ namespace Game
|
||||
case ConditionTypes.Charmed:
|
||||
case ConditionTypes.Taxi:
|
||||
case ConditionTypes.Gamemaster:
|
||||
case ConditionTypes.PrivateObject:
|
||||
break;
|
||||
case ConditionTypes.DifficultyId:
|
||||
if (!CliDB.DifficultyStorage.ContainsKey(cond.ConditionValue1))
|
||||
|
||||
Reference in New Issue
Block a user