mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 09:44:55 +02:00
Compare commits
5 Commits
feature/re
...
main
Author | SHA1 | Date | |
---|---|---|---|
![]() |
82d417b590 | ||
![]() |
b797908e49 | ||
![]() |
90c8463797 | ||
![]() |
c91bb5d409 | ||
![]() |
fe821c5808 |
File diff suppressed because it is too large
Load Diff
@@ -21,6 +21,9 @@ if(!$logged) {
|
|||||||
$errors[] = 'You are not logged in. You can\'t create guild.';
|
$errors[] = 'You are not logged in. You can\'t create guild.';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$configLuaFreePremium = configLua('freePremium');
|
||||||
|
$freePremium = (isset($configLuaFreePremium) && getBoolean($configLuaFreePremium)) || ($logged && $account_logged->getPremDays() == OTS_Account::GRATIS_PREMIUM_DAYS);
|
||||||
|
|
||||||
$array_of_player_nig = array();
|
$array_of_player_nig = array();
|
||||||
if(empty($errors))
|
if(empty($errors))
|
||||||
{
|
{
|
||||||
@@ -31,7 +34,7 @@ if(empty($errors))
|
|||||||
if(!$player_rank->isLoaded())
|
if(!$player_rank->isLoaded())
|
||||||
{
|
{
|
||||||
if($player->getLevel() >= setting('core.guild_need_level')) {
|
if($player->getLevel() >= setting('core.guild_need_level')) {
|
||||||
if(!setting('core.guild_need_premium') || $account_logged->isPremium()) {
|
if(!setting('core.guild_need_premium') || $account_logged->isPremium() || $freePremium) {
|
||||||
$array_of_player_nig[] = $player->getName();
|
$array_of_player_nig[] = $player->getName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,7 +98,7 @@ if($todo == 'save')
|
|||||||
if($player->getLevel() < setting('core.guild_need_level')) {
|
if($player->getLevel() < setting('core.guild_need_level')) {
|
||||||
$errors[] = 'Character <b>'.$name.'</b> has too low level. To create guild you need character with level <b>' . setting('core.guild_need_level') . '</b>.';
|
$errors[] = 'Character <b>'.$name.'</b> has too low level. To create guild you need character with level <b>' . setting('core.guild_need_level') . '</b>.';
|
||||||
}
|
}
|
||||||
if(setting('core.guild_need_premium') && !$account_logged->isPremium()) {
|
if(setting('core.guild_need_premium') && !$account_logged->isPremium() && !$freePremium) {
|
||||||
$errors[] = 'Character <b>'.$name.'</b> is on FREE account. To create guild you need PREMIUM account.';
|
$errors[] = 'Character <b>'.$name.'</b> is on FREE account. To create guild you need PREMIUM account.';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user