Gratis premium account (#156)

* skip premdays and lastdays calculation when premdays = 65535 (gratis premium in TFS)

* TFS consider 65535 as gratis premium account and PHP_INT_MAX does not assume this value

* adds condition of premdays=65535 and standardize the label "gratis premium account" with tibia client

* adjust the label "days" when there is only one day of premium account

* adjusted premium account status

* Some small adjustment

* Sorry, typo.

Co-authored-by: slawkens <slawkens@gmail.com>
This commit is contained in:
czbadaro
2021-04-22 17:49:42 -03:00
committed by GitHub
parent 7303aabc2b
commit 9d7854dda6
3 changed files with 10 additions and 3 deletions

View File

@@ -182,7 +182,7 @@ if ($id > 0) {
}
$lastDay = 0;
if($p_days != 0 && $p_days != PHP_INT_MAX ) {
if($p_days != 0 && $p_days != OTS_Account::GRATIS_PREMIUM_DAYS) {
$lastDay = time();
} else if ($lastDay != 0) {
$lastDay = 0;