Example #1
0
 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);
 }
Example #2
0
 public SubscriptionData SetExpiredSeconds(int Seconds)
 {
     this.fSubscriptionDatabase.skipped_length = UsefulStuff.GetUnixTimpstamp() - Seconds;
     return(this);
 }
Example #3
0
 public int GetExpiredSeconds()
 {
     return(UsefulStuff.GetUnixTimpstamp() - this.fSubscriptionDatabase.skipped_length);
 }
Example #4
0
 public SubscriptionData SetRemainingSeconds(int Seconds)
 {
     this.fSubscriptionDatabase.total_bought = UsefulStuff.GetUnixTimpstamp() - this.fSubscriptionDatabase.skipped_length + Seconds;
     return(this);
 }
Example #5
0
 public int GetRemainingSeconds()
 {
     return(UsefulStuff.GetUnixTimpstamp() - this.fSubscriptionDatabase.total_bought + this.fSubscriptionDatabase.skipped_length);
 }