Merge branch 'hjb' of git.kingsome.cn:server/game2006api into hjb
This commit is contained in:
commit
38655ae3ae
36
doc/ActivationCode.py
Normal file
36
doc/ActivationCode.py
Normal file
@ -0,0 +1,36 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import _common
|
||||
|
||||
class ActivationCode(object):
|
||||
|
||||
def __init__(self):
|
||||
self.apis = [
|
||||
{
|
||||
'name': 'bindActivationCode',
|
||||
'desc': '绑定激活码',
|
||||
'group': 'ActivationCode',
|
||||
'url': 'webapp/index.php?c=ActivationCode&a=bindActivationCode',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['code', 0, '激活码']
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
]
|
||||
},{
|
||||
'name': 'getActivationCodeBindState',
|
||||
'desc': '激活码绑定状态',
|
||||
'group': 'ActivationCode',
|
||||
'url': 'webapp/index.php?c=ActivationCode&a=getActivationCodeBindState',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['state', 0, '1:已激活 0:未激活']
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -119,6 +119,7 @@ class Battle(object):
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['version', 0, '版本'],
|
||||
['is_newbie_battle', 0, '是否新手战'],
|
||||
['battle_uuid', '', 'battle_uuid'],
|
||||
['room_uuid', '', '房间唯一id'],
|
||||
['room_mode', 0, '0:pvp 1:pve 2:moba'],
|
||||
@ -155,6 +156,7 @@ class Battle(object):
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['version', 0, '版本'],
|
||||
['is_newbie_battle', 0, '是否新手战'],
|
||||
['room_uuid', '', '房间唯一id'],
|
||||
['room_mode', 0, '0:pvp 1:pve 2:moba'],
|
||||
['map_mode', 0, ''],
|
||||
|
19
doc/OutAppTools.py
Normal file
19
doc/OutAppTools.py
Normal file
@ -0,0 +1,19 @@
|
||||
import _common
|
||||
|
||||
class OutAppTools(object):
|
||||
|
||||
def __init__(self):
|
||||
self.apis = [
|
||||
{
|
||||
'name': 'refreshServerSwitch',
|
||||
'desc': '刷新服务器开关配置',
|
||||
'group': 'OutAppTools',
|
||||
'url': 'webapp/index.php?c=OutAppTools&a=refreshServerSwitch',
|
||||
'params': [
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
]
|
||||
},
|
||||
|
||||
]
|
@ -69,6 +69,7 @@ CREATE TABLE `t_user` (
|
||||
`parachute` int(11) NOT NULL DEFAULT '0' COMMENT '降落伞ID',
|
||||
`ring_id` int(11) NOT NULL DEFAULT '0' COMMENT '戒指id',
|
||||
`star_num` int(11) NOT NULL DEFAULT '0' COMMENT '星星数(成长任务)',
|
||||
`already_newbie_battle` int(11) NOT NULL DEFAULT '0' COMMENT '是否完成新手战',
|
||||
PRIMARY KEY (`idx`),
|
||||
UNIQUE KEY `account_id` (`account_id`),
|
||||
UNIQUE KEY `address` (`address`),
|
||||
|
29
webapp/controller/ActivationCodeController.class.php
Normal file
29
webapp/controller/ActivationCodeController.class.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
require_once('models/ActivationCode.php');
|
||||
|
||||
use models\ActivationCode;
|
||||
use phpcommon\SqlHelper;
|
||||
class ActivationCodeController extends BaseAuthedController {
|
||||
|
||||
public function bindActivationCode(){
|
||||
$code = getReqVal('code', 0);
|
||||
if (!ActivationCode::verifyCode($code)){
|
||||
$this->_rspErr(1, "activation code error");
|
||||
return;
|
||||
}
|
||||
if (ActivationCode::verifyAccountBind()){
|
||||
$this->_rspErr(1, "The activation code has been bind");
|
||||
return;
|
||||
}
|
||||
ActivationCode::addBindCode($code);
|
||||
$this->_rspOk();
|
||||
}
|
||||
|
||||
public function getActivationCodeBindState(){
|
||||
$state = ActivationCode::verifyAccountBind() ? 1 :0;
|
||||
$this->_rspData(array(
|
||||
'state' => $state
|
||||
));
|
||||
}
|
||||
|
||||
}
|
@ -8,9 +8,11 @@ require_once('mt/LootConfig.php');
|
||||
|
||||
require_once('models/Bag.php');
|
||||
require_once('models/Hero.php');
|
||||
require_once('models/HeroSkin.php');
|
||||
require_once('models/User.php');
|
||||
require_once('models/DiamondConsumeProduct.php');
|
||||
require_once('models/RealtimeData.php');
|
||||
require_once('models/ChipPage.php');
|
||||
require_once('models/Chip.php');
|
||||
|
||||
|
||||
require_once('services/AwardService.php');
|
||||
@ -22,9 +24,11 @@ require_once('services/LootService.php');
|
||||
use phpcommon\SqlHelper;
|
||||
use models\Bag;
|
||||
use models\Hero;
|
||||
use models\HeroSkin;
|
||||
use models\User;
|
||||
use models\RealtimeData;
|
||||
use models\DiamondConsumeProduct;
|
||||
use models\ChipPage;
|
||||
use models\Chip;
|
||||
use services\LogService;
|
||||
|
||||
class BagController extends BaseAuthedController {
|
||||
@ -641,6 +645,27 @@ class BagController extends BaseAuthedController {
|
||||
));
|
||||
$this->propertyChgService->addUserChg();
|
||||
}
|
||||
if ($heroDb['skin_id']){
|
||||
Hero::update($heroUniId,array(
|
||||
'skin_id' => 0,
|
||||
'modifytime'=>myself()->_getNowTime()
|
||||
));
|
||||
HeroSkin::update($heroDb['skin_id'],array(
|
||||
'used'=>HeroSkin::NO_USE,
|
||||
'skin_state'=>HeroSkin::NO_LOCK,
|
||||
'hero_uniid'=>0,
|
||||
'modifytime'=>myself()->_getNowTime(),
|
||||
));
|
||||
}
|
||||
$chipPageDb = ChipPage::find($heroUniId);
|
||||
$chipPageData = emptyReplace(json_decode($chipPageDb['data'], true), array());
|
||||
foreach ($chipPageData as &$value){
|
||||
Chip::updateInlayState($value['chip_id'],0);
|
||||
$value['chip_id'] = 0;
|
||||
}
|
||||
ChipPage::update($heroUniId,array(
|
||||
'data' => json_encode($chipPageData)
|
||||
));
|
||||
$this->propertyChgService->addBagChg();
|
||||
$this->propertyChgService->addHeroChg();
|
||||
$event = array(
|
||||
|
@ -96,6 +96,12 @@ class BaseAuthedController extends BaseController {
|
||||
// }
|
||||
$this->accountId = getReqVal('account_id', '');
|
||||
$this->sessionId = getReqVal('session_id', '');
|
||||
/*
|
||||
if ($this->_getAccountId() == '1_2006_google-oauth2|102579762412391374191') {
|
||||
phpcommon\sendError(1001, 'session expiration');
|
||||
die();
|
||||
return;
|
||||
}*/
|
||||
if (SERVER_ENV == _ONLINE) {
|
||||
$sessionTime = $this->_getSessionTime();
|
||||
if ($sessionTime < 1724049880) {
|
||||
|
@ -19,6 +19,7 @@ require_once('mt/RankSeason.php');
|
||||
require_once('mt/Robot.php');
|
||||
require_once('mt/Skill.php');
|
||||
require_once('mt/MapMode.php');
|
||||
require_once('mt/Map.php');
|
||||
require_once('mt/Parameter.php');
|
||||
|
||||
use phpcommon\SqlHelper;
|
||||
@ -692,6 +693,7 @@ class BattleController extends BaseAuthedController {
|
||||
'room_uuid' => $roomUuid,
|
||||
'start_time' => $startTime,
|
||||
'match_mode' => $currSeason ? 1 : 0,
|
||||
'is_newbie_battle' => 0,
|
||||
'team_list' => array()
|
||||
);
|
||||
foreach ($customData['team_list'] as $team) {
|
||||
@ -813,6 +815,7 @@ class BattleController extends BaseAuthedController {
|
||||
'room_uuid' => $roomUuid,
|
||||
'start_time' => $startTime,
|
||||
'match_mode' => $currSeason ? 1 : 0,
|
||||
'is_newbie_battle' => 0,
|
||||
'team_list' => array()
|
||||
);
|
||||
$mapModeMeta = mt\MapMode::find($modeId);
|
||||
@ -824,6 +827,39 @@ class BattleController extends BaseAuthedController {
|
||||
myself()->_rspErr(2, 'map mode error');
|
||||
return;
|
||||
}
|
||||
$mapMeta = mt\Map::get($mapId);
|
||||
if (empty($mapMeta)) {
|
||||
myself()->_rspErr(2, 'map meta error');
|
||||
return;
|
||||
}
|
||||
$myUserDb = myself()->_getUserInfo(array(
|
||||
'already_newbie_battle'
|
||||
));
|
||||
if ($mapModeMeta['mapMode'] == mt\MapMode::PRACTICE_MODE) {
|
||||
if (!$mapMeta['is_moba']) {
|
||||
if (!$myUserDb['already_newbie_battle']) {
|
||||
$data['is_newbie_battle'] = 1;
|
||||
} else {
|
||||
if (SERVER_ENV != _ONLINE) {
|
||||
$data['is_newbie_battle'] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$myUserDb['already_newbie_battle']) {
|
||||
myself()->_updateUserInfo(array(
|
||||
'already_newbie_battle' => 1,
|
||||
));
|
||||
myself()->_addTgLog('battle.newbieBattle', array(
|
||||
'zone_id' => $zoneId,
|
||||
'node_id' => $nodeId,
|
||||
'mode_id' => $modeId,
|
||||
'map_id' => $mapId,
|
||||
'room_uuid' => $roomUuid,
|
||||
'start_time' => $startTime,
|
||||
'match_mode' => $currSeason ? 1 : 0,
|
||||
));
|
||||
}
|
||||
if (!mt\MapMode::checkLimitTime($mapModeMeta)) {
|
||||
error_log(json_encode(array(
|
||||
'msg' => 'MapMode::CheckLimitTime error',
|
||||
@ -837,6 +873,7 @@ class BattleController extends BaseAuthedController {
|
||||
return;
|
||||
}
|
||||
|
||||
$realPlayerNum = 0;
|
||||
$currSeason = mt\RankSeason::getCurrentSeason();
|
||||
foreach ($customData['team_list'] as $team) {
|
||||
if ($ignoreAndroid) {
|
||||
@ -872,6 +909,7 @@ class BattleController extends BaseAuthedController {
|
||||
$info = $this->genInitBattleData();
|
||||
$userDb = User::find($accountId);
|
||||
if ($userDb) {
|
||||
++$realPlayerNum;
|
||||
$userPresetInfo = User::toPreset($userDb);
|
||||
$info['elo'] = $userDb['elo'];
|
||||
$info['rank'] = $userDb['rank'];
|
||||
@ -923,6 +961,9 @@ class BattleController extends BaseAuthedController {
|
||||
array_push($data['team_list'], $teamInfo);
|
||||
}
|
||||
$this->decTicket($r, $customData, $mapModeMeta);
|
||||
if ($data['is_newbie_battle'] && $realPlayerNum > 1) {
|
||||
$data['is_newbie_battle'] = 0;
|
||||
}
|
||||
myself()->_rspData($data);
|
||||
}
|
||||
|
||||
|
@ -337,13 +337,13 @@ class BigwheelController extends BaseAuthedController {
|
||||
|
||||
myself()->_rspData(array(
|
||||
'award' => $this->awardService->toDto(),
|
||||
'property_chg' => $this->propertyChgService->toDto(),
|
||||
'property_chg' => $this->propertyChgService->toDto(),
|
||||
'info' => $info
|
||||
));
|
||||
myself()->_fireEvent('Bigwheel', 'onBuyOk', array(
|
||||
'grid_id' => $gridId,
|
||||
'buy_price' => $gridRef['buy_price'],
|
||||
));
|
||||
myself()->_fireEvent('Bigwheel', 'onBuyOk',
|
||||
$gridId,
|
||||
$gridRef['buy_price']
|
||||
);
|
||||
}
|
||||
|
||||
private function getMidDataKey()
|
||||
|
@ -56,8 +56,8 @@ class BlockChainController extends BaseAuthedController {
|
||||
switch ($type) {
|
||||
case 1:
|
||||
{
|
||||
myself()->_rspErr(1, 'server internal error');
|
||||
return;
|
||||
//myself()->_rspErr(1, 'server internal error');
|
||||
//return;
|
||||
$heroDb = Hero::find($uniid);
|
||||
if (!$heroDb) {
|
||||
myself()->_rspErr(1, 'hero not found');
|
||||
@ -67,6 +67,11 @@ class BlockChainController extends BaseAuthedController {
|
||||
myself()->_rspErr(1, 'hero no seal');
|
||||
return;
|
||||
}
|
||||
if ($heroDb['quality'] <= 1) {
|
||||
myself()->_rspErr(1, 'hero is N quality');
|
||||
return;
|
||||
}
|
||||
|
||||
$isMint = true;
|
||||
$tokenId = $heroDb['token_id'];
|
||||
if ($heroDb['token_id'] && $heroDb['activate']) {
|
||||
@ -91,7 +96,7 @@ class BlockChainController extends BaseAuthedController {
|
||||
}
|
||||
}
|
||||
$this->internalActivate721Nft($tokenId,
|
||||
Nft::HERO_TYPE,
|
||||
Nft::GCARD_HERO_TYPE,
|
||||
$heroDb['hero_uniid'],
|
||||
$heroDb['hero_id'],
|
||||
$isMint,
|
||||
|
@ -216,6 +216,10 @@ class InGameMallController extends BaseAuthedController {
|
||||
$this->_rspErr(1, 'param goods_unnid error');
|
||||
return;
|
||||
}
|
||||
if ($chipDb['inlay_state'] == 1){
|
||||
$this->_rspErr(1, 'Unable to sell goods in use');
|
||||
return;
|
||||
}
|
||||
$orderField = $chipDb['quality'];
|
||||
}
|
||||
break;
|
||||
@ -473,6 +477,7 @@ EOD;
|
||||
return;
|
||||
}
|
||||
InGameMall::cancel($orderId);
|
||||
$awardService = new services\AwardService();
|
||||
$propertyChgService = new PropertyChgService();
|
||||
switch ($goodsDb['order_type']){
|
||||
case InGameMall::HERO_SKIN_TYPE :{
|
||||
@ -503,6 +508,15 @@ EOD;
|
||||
$propertyChgService->addChip();
|
||||
}
|
||||
break;
|
||||
case InGameMall::GOLD_TYPE:{
|
||||
myself()->_addItems(array(
|
||||
array(
|
||||
'item_id' => $goodsDb['item_id'],
|
||||
'item_num' => $goodsDb['item_num'],
|
||||
)
|
||||
), $awardService, $propertyChgService);
|
||||
}
|
||||
break;
|
||||
default : {
|
||||
Bag::addItem($goodsDb['item_id'],$goodsDb['item_num']);
|
||||
$propertyChgService->addBagChg();
|
||||
@ -510,6 +524,7 @@ EOD;
|
||||
}
|
||||
|
||||
myself()->_rspData(array(
|
||||
'award' => $awardService->toDto(),
|
||||
'property_chg' => $propertyChgService->toDto(),
|
||||
));
|
||||
}
|
||||
|
@ -39,6 +39,10 @@ class OutAppMintController extends BaseController {
|
||||
myself()->_rspErr(1, 'hero not found');
|
||||
return;
|
||||
}
|
||||
if (!$heroDb['seal_type']) {
|
||||
myself()->_rspErr(1, 'hero is no seal');
|
||||
return;
|
||||
}
|
||||
if ($heroDb['quality'] <= 1) {
|
||||
myself()->_rspErr(1, 'hero is N quality');
|
||||
return;
|
||||
|
@ -476,6 +476,7 @@ class OutAppNftController extends BaseController {
|
||||
$info['item_id'] = $heroMeta['id'];
|
||||
$info['type'] = Nft::HERO_TYPE;
|
||||
$info['image'] = 'https://res2.counterfire.games/nft/video/normal/' . $heroMeta['id'] . '_c' . $this->getRealHeroQuality($heroDb) . '.mp4';
|
||||
$info['on_lock'] = $heroDb['seal_type'];
|
||||
$info['detail']['quality'] = $this->getRealHeroQuality($heroDb);
|
||||
$info['detail']['max_mining_days'] = $heroAtteMeta['validTime'];
|
||||
$info['detail']['wealth'] = floor($wealth * (1+$wealth_rate));
|
||||
|
16
webapp/controller/OutAppToolsController.class.php
Normal file
16
webapp/controller/OutAppToolsController.class.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
use phpcommon\SqlHelper;
|
||||
|
||||
require_once('services/ServerSwitchService.php');
|
||||
|
||||
use services\ServerSwitchService;
|
||||
class OutAppToolsController extends BaseController {
|
||||
public function refreshServerSwitch(){
|
||||
$redis = myself()->_getRedis(ServerSwitchService::SERVER_SWITCH_KEY);
|
||||
$data = ServerSwitchService::selectSwitchTable();
|
||||
$redis->set(ServerSwitchService::SERVER_SWITCH_KEY,json_encode($data));
|
||||
$redis->pexpire(ServerSwitchService::SERVER_SWITCH_KEY , 10*1000);
|
||||
$this->_rspOk();
|
||||
}
|
||||
|
||||
}
|
@ -839,9 +839,9 @@ EOD;
|
||||
public function dumpSqlMigrate()
|
||||
{
|
||||
$conn = $this->_getMysql('');
|
||||
$heroSql = $this->dumpMigrateTable($conn, 't_hero', 'gamedb2006_prod_1_old.t_hero_bk', 'WHERE activate=1');
|
||||
$mailSql = $this->dumpMigrateTable($conn, 't_mail', 'gamedb2006_prod_1_old.t_mail_bk', '');
|
||||
$goldBullionSql = $this->dumpMigrateTable($conn, 't_gold_bullion', 'gamedb2006_prod_1_old.t_gold_bullion_bk', '');
|
||||
$heroSql = $this->dumpMigrateTable($conn, 't_hero', 'gamedb2006_prod_1_20240822.t_hero', 'WHERE activate=1');
|
||||
$mailSql = $this->dumpMigrateTable($conn, 't_mail', 'gamedb2006_prod_1_20240822.t_mail', '');
|
||||
$goldBullionSql = $this->dumpMigrateTable($conn, 't_gold_bullion', 'gamedb2006_prod_1_20240822.t_gold_bullion', '');
|
||||
echo $heroSql;
|
||||
echo "\n";
|
||||
echo $mailSql;
|
||||
|
@ -12,6 +12,10 @@ class Bigwheel
|
||||
|
||||
public static function onBuyOk($gridId, $buyPrice)
|
||||
{
|
||||
myself()->_addTgLog('Bigwheel.buyOk', array(
|
||||
'gridId' => $gridId,
|
||||
'buyPrice' => $buyPrice
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
56
webapp/models/ActivationCode.php
Normal file
56
webapp/models/ActivationCode.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace models;
|
||||
|
||||
use mt;
|
||||
use phpcommon\SqlHelper;
|
||||
class ActivationCode extends BaseModel
|
||||
{
|
||||
public static function verifyCode($code){
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
myself()->_getAccountMysql(),
|
||||
't_activation_code',
|
||||
array(
|
||||
'activation_code' => $code,
|
||||
)
|
||||
);
|
||||
if ($row){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function addBindCode($code){
|
||||
SqlHelper::upsert(
|
||||
myself()->_getAccountMysql(),
|
||||
't_activation_code_bind',
|
||||
array(
|
||||
'account_id' => myself()->_getAccountId(),
|
||||
),
|
||||
array(
|
||||
|
||||
),
|
||||
array(
|
||||
'account_id' => myself()->_getAccountId(),
|
||||
'activation_code' =>$code,
|
||||
'createtime' =>myself()->_getNowTime(),
|
||||
'modifytime' =>myself()->_getNowTime(),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public static function verifyAccountBind(){
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
myself()->_getAccountMysql(),
|
||||
't_activation_code_bind',
|
||||
array(
|
||||
'account_id' => myself()->_getAccountId(),
|
||||
)
|
||||
);
|
||||
if ($row){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
@ -257,11 +257,27 @@ class Chip extends BaseModel
|
||||
$attribute = \mt\EconomyAttribute::getAttribute($chipAttrMeta['economyAttribute'],$quality);
|
||||
{
|
||||
$randAttr = array();
|
||||
$randMeta = mt\BattleRandAttribute::getByWeight($chipAttrMeta['battleAttribute'],$quality);
|
||||
if ($randMeta){
|
||||
$randAttr = mt\BattleRandAttribute::getRandAttr($randMeta);
|
||||
// $randMeta = mt\BattleRandAttribute::getByWeight($chipAttrMeta['battleAttribute'],$quality);
|
||||
// if ($randMeta){
|
||||
// $randAttr = mt\BattleRandAttribute::getRandAttr($randMeta);
|
||||
// }
|
||||
for ($i=1;$i<=$quality;$i++){
|
||||
$randMeta = mt\BattleRandAttribute::getByWeight($chipAttrMeta['battleAttribute'],$i);
|
||||
if ($randMeta) {
|
||||
$result = mt\BattleRandAttribute::getRandAttr($randMeta);
|
||||
if ($result){
|
||||
foreach ($result as $value){
|
||||
if (isset($randAttr[$value['attr_id']])){
|
||||
$randAttr[$value['attr_id']]['val'] += $value['val'];
|
||||
}else{
|
||||
$randAttr[$value['attr_id']] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$randAttr = array_values($randAttr);
|
||||
$fieldsKv = array(
|
||||
'item_id' => $itemMeta['id'],
|
||||
'item_num' => 1,
|
||||
@ -329,9 +345,16 @@ class Chip extends BaseModel
|
||||
}
|
||||
|
||||
public static function updateInlayState($chip_unnid,$status){
|
||||
self::update2($chip_unnid,array(
|
||||
'inlay_state' => $status
|
||||
));
|
||||
SqlHelper::update
|
||||
(myself()->_getSelfMysql(),
|
||||
't_chip',
|
||||
array(
|
||||
'idx' => $chip_unnid,
|
||||
),
|
||||
array(
|
||||
'inlay_state' => $status
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
@ -70,8 +70,8 @@ class ChipPage extends BaseModel
|
||||
foreach ($data as &$value){
|
||||
$chipDb = Chip::find($value['chip_id']);
|
||||
if ( !$chipDb ) {
|
||||
$value['chip_id'] = 0;
|
||||
Chip::updateInlayState($value['chip_id'],0);
|
||||
$value['chip_id'] = 0;
|
||||
}
|
||||
}
|
||||
self::update($row['hero_uniid'],array(
|
||||
@ -118,8 +118,8 @@ class ChipPage extends BaseModel
|
||||
foreach ($data as &$value){
|
||||
$chipDb = Chip::find($value['chip_id']);
|
||||
if ( !$chipDb ) {
|
||||
$value['chip_id'] = 0;
|
||||
Chip::updateInlayState($value['chip_id'],0);
|
||||
$value['chip_id'] = 0;
|
||||
}
|
||||
}
|
||||
self::update($row['hero_uniid'],array(
|
||||
|
@ -222,6 +222,7 @@ class Hero extends BaseModel {
|
||||
'is_old' => $row['is_old'],
|
||||
"current_times" => myself()->_getDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,$row['idx']),
|
||||
"total_times" => $heroAtteMeta['roundPerDay'],
|
||||
'activate' => $row['activate'],
|
||||
);
|
||||
$dto['is_avatar'] = 0;
|
||||
if (SERVER_ENV == _ONLINE) {
|
||||
@ -322,6 +323,7 @@ class Hero extends BaseModel {
|
||||
'is_old' => $row['is_old'],
|
||||
"current_times" => myself()->_getDailyV(TN_DAILY_GOLD_MODE_BATTLE_TIMES,$row['idx']),
|
||||
"total_times" => $heroAtteMeta['roundPerDay'],
|
||||
'activate' => $row['activate'],
|
||||
);
|
||||
|
||||
// $nft_address = '';
|
||||
|
@ -597,7 +597,16 @@ class HashRateService extends BaseService
|
||||
return $useCount;
|
||||
}
|
||||
|
||||
private static $ignoreCa = array(
|
||||
'BlockChain@mintGoldBullion'=>1,
|
||||
'InGameMall@sellS'=>2,
|
||||
);
|
||||
|
||||
public static function onSpendGold($goldNum){
|
||||
$ca = getReqVal('c', '') . '@' . getReqVal('a','');
|
||||
if (array_key_exists($ca, self::$ignoreCa)) {
|
||||
return;
|
||||
}
|
||||
self::_updateTaskSchedule(AchievementsPower::SPEND_GOLD,$goldNum);
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ class ServerSwitchService {
|
||||
return $data;
|
||||
}
|
||||
|
||||
private static function selectSwitchTable(){
|
||||
public static function selectSwitchTable(){
|
||||
$rows = SqlHelper::ormSelect(myself()->_getConfDbMysql(), 't_game_switch', array());
|
||||
$data = array(
|
||||
'normal' => array(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user