1
This commit is contained in:
parent
8b7b7859d2
commit
e4538c7ef6
@ -96,9 +96,10 @@ class Other(object):
|
|||||||
_common.RspHead(),
|
_common.RspHead(),
|
||||||
['data', [
|
['data', [
|
||||||
['heroChain',0,'英雄上链'],
|
['heroChain',0,'英雄上链'],
|
||||||
|
['heroUp',0,'英雄升阶'],
|
||||||
['goldSyn',0,'金币合成'],
|
['goldSyn',0,'金币合成'],
|
||||||
['pieceSyn',0,'碎片合成'],
|
['heroPieceSyn',0,'英雄碎片合成'],
|
||||||
['pieceUp',0,'碎片升阶'],
|
['chipPieceSyn',0,'芯片碎片合成'],
|
||||||
], '开关信息'],
|
], '开关信息'],
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -447,9 +447,10 @@ class BagController extends BaseAuthedController {
|
|||||||
'ID' => 'Box',
|
'ID' => 'Box',
|
||||||
'SUB_ID' => 'open',
|
'SUB_ID' => 'open',
|
||||||
'SUB_KEY' => 'open_box',
|
'SUB_KEY' => 'open_box',
|
||||||
'boxInfo' => array(
|
'cost_info' => array(
|
||||||
'item_id' => $itemMeta['id'],
|
'item_id' => $itemMeta['id'],
|
||||||
'item_num' => $itemNum
|
'item_num' => $itemNum,
|
||||||
|
'cost_gold' => $costItems
|
||||||
),
|
),
|
||||||
'result' => $hashItems,
|
'result' => $hashItems,
|
||||||
);
|
);
|
||||||
|
@ -111,11 +111,11 @@ class BaseAuthedController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if (!(myself()->_getChannel() == IMTBL_CHANNEL ||
|
if (!(myself()->_getChannel() == IMTBL_CHANNEL ||
|
||||||
// myself()->_getChannel() == GUEST_CHANNEL)) {
|
myself()->_getChannel() == GUEST_CHANNEL)) {
|
||||||
// phpcommon\sendError(1001, 'session expiration');
|
phpcommon\sendError(1001, 'session expiration');
|
||||||
// die();
|
die();
|
||||||
// }
|
}
|
||||||
$r = $this->_getRedis($this->_getAccountId());
|
$r = $this->_getRedis($this->_getAccountId());
|
||||||
if (!(getReqVal('c', '') == 'User' && getReqVal('a', '') == 'login')) {
|
if (!(getReqVal('c', '') == 'User' && getReqVal('a', '') == 'login')) {
|
||||||
if ((getReqVal('c', '') == 'Battle')) {
|
if ((getReqVal('c', '') == 'Battle')) {
|
||||||
@ -152,10 +152,10 @@ class BaseAuthedController extends BaseController {
|
|||||||
{
|
{
|
||||||
$lastActiveTime = $r->get(LAST_ACTIVE_TIME . $this->_getAccountId());
|
$lastActiveTime = $r->get(LAST_ACTIVE_TIME . $this->_getAccountId());
|
||||||
//第一次登录或者跨天更新最后活跃时间
|
//第一次登录或者跨天更新最后活跃时间
|
||||||
// if (empty($lastActiveTime) ||
|
if (empty($lastActiveTime) ||
|
||||||
// $lastActiveTime < $this->_getNowDaySeconds()) {
|
$lastActiveTime < $this->_getNowDaySeconds()) {
|
||||||
// $r->setPx(LAST_ACTIVE_TIME . $this->_getAccountId(), $this->_getNowTime(), 1000 * 3600 * 24);
|
$r->setPx(LAST_ACTIVE_TIME . $this->_getAccountId(), $this->_getNowTime(), 1000 * 3600 * 24);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function updateSession($accountId, $sessionId)
|
protected function updateSession($accountId, $sessionId)
|
||||||
|
@ -9,6 +9,37 @@ class ServerSwitch {
|
|||||||
return $this->switchConfig;
|
return $this->switchConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function heroChainIsOpen(){
|
||||||
|
if ($this->getConfig()['heroChain'] > 0){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
public function heroUpIsOpen(){
|
||||||
|
if ($this->getConfig()['heroUp'] > 0){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
public function goldSynIsOpen(){
|
||||||
|
if ($this->getConfig()['goldSyn'] > 0){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
public function heroPieceSynIsOpen(){
|
||||||
|
if ($this->getConfig()['heroPieceSyn'] > 0){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
public function chipPieceSynIsOpen(){
|
||||||
|
if ($this->getConfig()['chipPieceSyn'] > 0){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private $switchConfig = null;
|
private $switchConfig = null;
|
||||||
|
|
||||||
private function initConfig(){
|
private function initConfig(){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user