Core/Conditions: Added stringid condition type

Port From (https://github.com/TrinityCore/TrinityCore/commit/151dd67e2eb22e49ce84c2eb28b08985bcce7602)
This commit is contained in:
hondacrx
2024-02-06 09:50:23 -05:00
parent 80936edeab
commit 9668e07c16
3 changed files with 87 additions and 62 deletions
+14
View File
@@ -458,6 +458,19 @@ namespace Game.Conditions
condMeets = !obj.GetPrivateObjectOwner().IsEmpty();
break;
}
case ConditionTypes.StringId:
{
Creature creature = obj.ToCreature();
if (creature != null)
condMeets = creature.HasStringId(ConditionStringValue1);
else
{
GameObject go = obj.ToGameObject();
if (go != null)
condMeets = go.HasStringId(ConditionStringValue1);
}
break;
}
default:
break;
}
@@ -653,6 +666,7 @@ namespace Game.Conditions
public uint ConditionValue1;
public uint ConditionValue2;
public uint ConditionValue3;
public string ConditionStringValue1;
public uint ErrorType;
public uint ErrorTextId;
public uint ReferenceId;