34 lines
891 B
C#
34 lines
891 B
C#
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;
|
|
}
|
|
}
|
|
|
|
|