Core/Condition: Implemented condition CONDITION_PRIVATE_OBJECT

Port From (https://github.com/TrinityCore/TrinityCore/commit/f28b4eed3d875ccedde574b0abc7258290b4c0a3)
This commit is contained in:
hondacrx
2023-09-04 08:06:51 -04:00
parent 04250a71f8
commit 296e818f77
3 changed files with 67 additions and 57 deletions
+8
View File
@@ -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))