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