Merge branch 'hjb' of git.kingsome.cn:server/game2006api into hjb
This commit is contained in:
commit
d28b0234e0
@ -11,6 +11,6 @@ LABEL description="This is custom Docker Image for \
|
|||||||
# 6 70
|
# 6 70
|
||||||
RUN apt update
|
RUN apt update
|
||||||
RUN apt install -y tzdata
|
RUN apt install -y tzdata
|
||||||
RUN apt install -y net-tools iputils-ping vim mariadb-client redis php php-fpm php-pdo php-mysql php-redis php-mbstring
|
RUN apt install -y net-tools curl iputils-ping vim mariadb-client redis php php-fpm php-pdo php-mysql php-redis php-mbstring
|
||||||
#php-pecl-libsodium
|
#php-pecl-libsodium
|
||||||
#RUN sh -c '/bin/echo -e "\n6\n70" | apt install -y net-tools iputils-ping mariadb-client php php-fpm'
|
#RUN sh -c '/bin/echo -e "\n6\n70" | apt install -y net-tools iputils-ping mariadb-client php php-fpm'
|
||||||
|
@ -503,7 +503,7 @@ class UserController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
$userInfo = User::Info($userDb);
|
$userInfo = User::Info($userDb);
|
||||||
{
|
{
|
||||||
$userInfo['total_lucky'] = Hero::getAccountLucky($userInfo['address']);
|
$userInfo['total_lucky'] = Hero::getAccountLuckyTemp();
|
||||||
$userInfo['admission_item_num'] = myself()->_getItemCount(900006, $userInfo);
|
$userInfo['admission_item_num'] = myself()->_getItemCount(900006, $userInfo);
|
||||||
}
|
}
|
||||||
$heroDb = Hero::findByAccountId(myself()->_getAccountId(), $userInfo['hero_uniid']);
|
$heroDb = Hero::findByAccountId(myself()->_getAccountId(), $userInfo['hero_uniid']);
|
||||||
@ -541,7 +541,7 @@ class UserController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
$userInfo = User::Info($userDb);
|
$userInfo = User::Info($userDb);
|
||||||
{
|
{
|
||||||
$userInfo['total_lucky'] = Hero::getAccountLucky($userInfo['address']);
|
$userInfo['total_lucky'] = Hero::getAccountLuckyTemp();
|
||||||
$userInfo['admission_item_num'] = myself()->_getItemCount(900006, $userInfo);
|
$userInfo['admission_item_num'] = myself()->_getItemCount(900006, $userInfo);
|
||||||
}
|
}
|
||||||
$heroDb = Hero::findByAccountId(myself()->_getAccountId(), $userInfo['hero_uniid']);
|
$heroDb = Hero::findByAccountId(myself()->_getAccountId(), $userInfo['hero_uniid']);
|
||||||
|
@ -888,6 +888,27 @@ class Hero extends BaseModel {
|
|||||||
return $lucky;
|
return $lucky;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getAccountLuckyTemp(){
|
||||||
|
$lucky = 0;
|
||||||
|
$rows = SqlHelper::ormSelect(
|
||||||
|
myself()->_getSelfMysql(),
|
||||||
|
't_hero',
|
||||||
|
array(
|
||||||
|
'account_id' => myself()->_getAccountId(),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($rows as $row) {
|
||||||
|
$heroMeta = \mt\Item::get($row['hero_id']);
|
||||||
|
$heroAtteMeta = \mt\EconomyAttribute::findByGrade($heroMeta['relationship'],$row['quality']);
|
||||||
|
$currTime = $row['unseal_time'] ? $row['unseal_time'] : $row['activate_time'];
|
||||||
|
if ($row['seal_type'] == 0 && $currTime + 86400 * $heroAtteMeta['validTime'] > myself()->_getNowTime()){
|
||||||
|
$lucky += self::getHeroLucky($row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $lucky;
|
||||||
|
}
|
||||||
|
|
||||||
public static function verifyValid($hero){
|
public static function verifyValid($hero){
|
||||||
// if (empty($hero['token_id'])){
|
// if (empty($hero['token_id'])){
|
||||||
// return false;
|
// return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user