Files
zzz_REBIRTH__Utils/Scripts/Requirements/NPCs/HasLeaderRebirth.cs
2025-06-04 16:44:53 +09:30

30 lines
784 B
C#

public class HasLeaderRebirth : TargetedCompareRequirementBase
{
public override bool IsValid(MinEventParams _params)
{
//Log.Out("HasLeaderRebirth-IsValid START");
if (!this.ParamsValid(_params))
{
//Log.Out("HasLeaderRebirth-IsValid 1");
return false;
}
var entity = _params.Self as EntityAliveV2;
if (entity != null)
{
//Log.Out("HasLeaderRebirth-IsValid entity: " + entity.EntityClass.entityClassName);
foreach (RebirthManager.hireInfo hire in RebirthManager.playerHires)
{
if (hire.hireID == entity.entityId)
{
return true;
}
}
}
return false;
}
}