Upload from upload_mods.ps1
This commit is contained in:
29
Scripts/Requirements/NPCs/HasLeaderRebirth.cs
Normal file
29
Scripts/Requirements/NPCs/HasLeaderRebirth.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user