30 lines
784 B
C#
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;
|
|
}
|
|
|
|
}
|