Upload from upload_mods.ps1
This commit is contained in:
33
Scripts/Dialog/NPCs/DialogRequirementNotHomeRebirth.cs
Normal file
33
Scripts/Dialog/NPCs/DialogRequirementNotHomeRebirth.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using static RebirthManager;
|
||||
|
||||
public class DialogRequirementNotHomeRebirth : BaseDialogRequirement
|
||||
{
|
||||
public override bool CheckRequirement(EntityPlayer player, EntityNPC talkingTo)
|
||||
{
|
||||
foreach (hireInfo hire in playerHires)
|
||||
{
|
||||
if (hire.hireID == talkingTo.entityId)
|
||||
{
|
||||
float flPosX = talkingTo.position.x;
|
||||
float flPosY = talkingTo.position.y;
|
||||
float flPosZ = talkingTo.position.z;
|
||||
|
||||
float flX = hire.reSpawnPosition.x;
|
||||
float flY = hire.reSpawnPosition.y;
|
||||
float flZ = hire.reSpawnPosition.z;
|
||||
|
||||
if (flX != flPosX &&
|
||||
flY != flPosY &&
|
||||
flZ != flPosZ)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user