public SubscriptionData SetActive(bool Active) { if (Active == IsActive()) { return(this); // Nothing to do } if (!Active) { this.fSubscriptionDatabase.paused_start = UsefulStuff.GetUnixTimpstamp(); return(this); } this.fSubscriptionDatabase.skipped_length += UsefulStuff.GetUnixTimpstamp() - this.fSubscriptionDatabase.paused_start; this.fSubscriptionDatabase.paused_start = 0; return(this); }
public SubscriptionData SetExpiredSeconds(int Seconds) { this.fSubscriptionDatabase.skipped_length = UsefulStuff.GetUnixTimpstamp() - Seconds; return(this); }
public int GetExpiredSeconds() { return(UsefulStuff.GetUnixTimpstamp() - this.fSubscriptionDatabase.skipped_length); }
public SubscriptionData SetRemainingSeconds(int Seconds) { this.fSubscriptionDatabase.total_bought = UsefulStuff.GetUnixTimpstamp() - this.fSubscriptionDatabase.skipped_length + Seconds; return(this); }
public int GetRemainingSeconds() { return(UsefulStuff.GetUnixTimpstamp() - this.fSubscriptionDatabase.total_bought + this.fSubscriptionDatabase.skipped_length); }