Core/Conditions: Added stringid condition type
Port From (https://github.com/TrinityCore/TrinityCore/commit/151dd67e2eb22e49ce84c2eb28b08985bcce7602)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user