Commit 4904d990 authored by winddramon's avatar winddramon Committed by GitHub

Merge branch 'amarillonmc:nachster' into nachster

parents 0daf35e9 1a3dbbd2
...@@ -412,6 +412,18 @@ ...@@ -412,6 +412,18 @@
} }
return $check; return $check;
} }
/** 合并物品列表 */
function mergeList() {
$sameitem = array();
for ($i=1; $i<=6; $i++) {
global $itm0, $itme0;
global ${'itm'.$i},${'itmk'.$i},${'itme'.$i},${'itms'.$i};
if (${'itms'.$i} && ($itm0 == ${'itm'.$i}) && ($itme0 == ${'itme'.$i}) && (preg_match('/^(H|P)/',${'itmk'.$i}))) {
$sameitem[] = 'item'.$i;
}
}
return $sameitem;
}
echo (json_encode(array( echo (json_encode(array(
"page" => "game", "page" => "game",
/** 玩家状态 */ /** 玩家状态 */
...@@ -464,7 +476,7 @@ ...@@ -464,7 +476,7 @@
/** 当前称号 */ /** 当前称号 */
"nowGiftId" => $club, "nowGiftId" => $club,
/** 可选称号 */ /** 可选称号 */
"giftList" => $clubavl, "giftList" => !$club ? array_merge(valid_getclublist_t2($udata), valid_getclublist_t1($udata)) : null,
/** 称号类型 */ /** 称号类型 */
"type" => $clubinfo, "type" => $clubinfo,
), ),
...@@ -494,6 +506,13 @@ ...@@ -494,6 +506,13 @@
/** 姿态tips */ /** 姿态tips */
"tips" => $posetips, "tips" => $posetips,
), ),
/** 战术界面 */
"horizon" => array(
/** 当前战术界面id */
"nowHorizonId" => $horizon,
/** 可选战术界面 */
"type" => $horizoninfo,
),
/** 攻击力 */ /** 攻击力 */
"attack" => $atkinfo, "attack" => $atkinfo,
/** 防御力 */ /** 防御力 */
...@@ -753,6 +772,7 @@ ...@@ -753,6 +772,7 @@
"quality" => $itme0, "quality" => $itme0,
"durability" => $itms0, "durability" => $itms0,
"canMerge" => checkMerge(), "canMerge" => checkMerge(),
"mergeList" => mergeList(),
) : null, ) : null,
/** 发现敌人 */ /** 发现敌人 */
"findEnemy" => $tdata['nameinfo'] ? array( "findEnemy" => $tdata['nameinfo'] ? array(
...@@ -795,7 +815,7 @@ ...@@ -795,7 +815,7 @@
/** 敌方道具 */ /** 敌方道具 */
"items" => $battle_title === "发现尸体" ? getCorpseItems($tdata) : null, "items" => $battle_title === "发现尸体" ? getCorpseItems($tdata) : null,
/** 敌方技能 */ /** 敌方技能 */
"skill" => $tdata['clbpara']['skill'] ? getEnemySkillPage($tdata) : null, "skill" => isset($tdata['clbpara']['skill']) ? getEnemySkillPage($tdata) : null,
/** 战斗技能 */ /** 战斗技能 */
"battleSkills" => $battle_skills ? getBattleSkills($battle_skills) : null, "battleSkills" => $battle_skills ? getBattleSkills($battle_skills) : null,
) : null, ) : null,
......
...@@ -791,7 +791,7 @@ $jgamedata = compatible_json_encode($gamedata); ...@@ -791,7 +791,7 @@ $jgamedata = compatible_json_encode($gamedata);
//$json = new Services_JSON(); //$json = new Services_JSON();
//$jgamedata = $json->encode($gamedata); //$jgamedata = $json->encode($gamedata);
//if(!strstr($_SERVER['HTTP_REFERER'], 'php')) { //if(!strstr($_SERVER['HTTP_REFERER'], 'php')) {
if ($udata['u_templateid'] == 1 && !strstr($_SERVER['HTTP_REFERER'], 'php') && $_SERVER['HTTP_REFERER'] != '') { if (isset($_GET['is_new'])) {
include './api.php'; include './api.php';
} else { } else {
echo $jgamedata; echo $jgamedata;
......
...@@ -170,7 +170,7 @@ if(isset($opendialog)) ...@@ -170,7 +170,7 @@ if(isset($opendialog))
} }
//if (!strstr($_SERVER['HTTP_REFERER'], 'php') && $_SERVER['HTTP_REFERER'] != '') { //if (!strstr($_SERVER['HTTP_REFERER'], 'php') && $_SERVER['HTTP_REFERER'] != '') {
if ($udata['u_templateid'] == 1 && !strstr($_SERVER['HTTP_REFERER'], 'php') && $_SERVER['HTTP_REFERER'] != '') { if (isset($_GET['is_new'])) {
include './api.php'; include './api.php';
} else { } else {
include template('game'); include template('game');
......
...@@ -61,13 +61,25 @@ if(!isset($cmd)){ ...@@ -61,13 +61,25 @@ if(!isset($cmd)){
if(isset($error)){$gamedata['innerHTML']['error'] = $error;} if(isset($error)){$gamedata['innerHTML']['error'] = $error;}
ob_clean(); ob_clean();
$jgamedata = compatible_json_encode($gamedata); $jgamedata = compatible_json_encode($gamedata);
if (isset($_GET['is_new'])) {
echo json_encode(array(
"info" => $gamedata['innerHTML']['info'],
));
} else {
echo $jgamedata; echo $jgamedata;
}
ob_end_flush(); ob_end_flush();
}else{ }else{
ob_clean(); ob_clean();
if(isset($error)){$gamedata['innerHTML']['error'] = $error;} if(isset($error)){$gamedata['innerHTML']['error'] = $error;}
$jgamedata = compatible_json_encode($gamedata); $jgamedata = compatible_json_encode($gamedata);
if (isset($_GET['is_new'])) {
echo json_encode(array(
"info" => $gamedata['innerHTML']['info'],
));
} else {
echo $jgamedata; echo $jgamedata;
}
ob_end_flush(); ob_end_flush();
} }
} }
......
...@@ -327,10 +327,11 @@ if($mode == 'enter') { ...@@ -327,10 +327,11 @@ if($mode == 'enter') {
$select_icon = $icon; $select_icon = $icon;
if (isset($_GET['is_new'])) { if (isset($_GET['is_new'])) {
// 获取可选称号 // 获取可选称号
$nickList = array_map(function($val) use ($titles_list) { $nickList = array_map(function($val) use ($titles_list, $title_desc) {
return array( return array(
'id' => $val, 'id' => $val,
'title' => $titles_list[$val] 'title' => $titles_list[$val],
'desc' => $title_desc[$val]['title'],
); );
}, $nicksrev['nicks']); }, $nicksrev['nicks']);
// 获取可选普通内定称号 // 获取可选普通内定称号
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment