1
This commit is contained in:
parent
6ce2a98fd1
commit
9fe2f2177c
@ -16,6 +16,8 @@ define('TN_RECHARGE_UPGRADE_TIMES', 8004);
|
||||
define('TN_SHARE_GAMES', 8005);
|
||||
define('TN_HERO_LEVEL_UP', 8006);
|
||||
define('TN_HERO_QUALITY_UP', 8007);
|
||||
define('TN_HERO_MAX_LEVEL', 8008);
|
||||
define('TN_HERO_MAX_QUALITY', 8009);
|
||||
define('TN_END', 8007);
|
||||
|
||||
define('TN_DAILY_BEGIN', 9001);
|
||||
|
@ -186,6 +186,9 @@ class HeroController extends BaseAuthedController {
|
||||
'unlock_time' => 0,
|
||||
)
|
||||
);
|
||||
if ($heroDb['hero_lv'] + 1 > myself()->_getV(TN_HERO_MAX_LEVEL, 0)) {
|
||||
myself()->_setV(TN_HERO_MAX_LEVEL, 0, $heroDb['hero_lv'] + 1);
|
||||
}
|
||||
$newHeroDb = Hero::find($heroUniId);
|
||||
$newHero = Hero::toDto($newHeroDb);
|
||||
$rankActivityService = new services\RankActivityService();
|
||||
@ -264,6 +267,9 @@ class HeroController extends BaseAuthedController {
|
||||
'unlock_time' => 0,
|
||||
)
|
||||
);
|
||||
if ($heroDb['quality'] + 1 > myself()->_getV(TN_HERO_MAX_QUALITY, 0)) {
|
||||
myself()->_setV(TN_HERO_MAX_QUALITY, 0, $heroDb['quality'] + 1);
|
||||
}
|
||||
Hero::update($costHeroUniId,
|
||||
array(
|
||||
'account_id' => myself()->_getAccountId() . '!!!',
|
||||
|
@ -122,13 +122,16 @@ class Task {
|
||||
|
||||
public static function getOfferRewardMissions($excludeMetas)
|
||||
{
|
||||
$maxHeroQuality = myself()->_getV(TN_HERO_MAX_QUALITY, 0, 1);
|
||||
$metas = array();
|
||||
foreach (self::getMetaList() as $meta) {
|
||||
if ($meta['type'] == self::OFFER_REWARD_MISSON_TYPE) {
|
||||
if (!array_find($excludeMetas, function($val) use($meta) {
|
||||
return $val['mission_id'] == $meta['id'];
|
||||
})) {
|
||||
array_push($metas, $meta);
|
||||
if ( $meta['param1'] <= $maxHeroQuality) {
|
||||
if (!array_find($excludeMetas, function($val) use($meta) {
|
||||
return $val['mission_id'] == $meta['id'];
|
||||
})) {
|
||||
array_push($metas, $meta);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user