Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
phpdts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nemo Ma
phpdts
Commits
1a3dbbd2
Commit
1a3dbbd2
authored
Jul 27, 2023
by
Nemo Ma
Committed by
GitHub
Jul 27, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #194 from luluxia/nachster
update: 更新新前端接口内容;
parents
e697083b
690dcea4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
8 deletions
+41
-8
api.php
api.php
+22
-2
command.php
command.php
+1
-1
game.php
game.php
+1
-1
register.php
register.php
+14
-2
valid.php
valid.php
+3
-2
No files found.
api.php
View file @
1a3dbbd2
...
...
@@ -412,6 +412,18 @@
}
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
(
"page"
=>
"game"
,
/** 玩家状态 */
...
...
@@ -464,7 +476,7 @@
/** 当前称号 */
"nowGiftId"
=>
$club
,
/** 可选称号 */
"giftList"
=>
$clubav
l
,
"giftList"
=>
!
$club
?
array_merge
(
valid_getclublist_t2
(
$udata
),
valid_getclublist_t1
(
$udata
))
:
nul
l
,
/** 称号类型 */
"type"
=>
$clubinfo
,
),
...
...
@@ -494,6 +506,13 @@
/** 姿态tips */
"tips"
=>
$posetips
,
),
/** 战术界面 */
"horizon"
=>
array
(
/** 当前战术界面id */
"nowHorizonId"
=>
$horizon
,
/** 可选战术界面 */
"type"
=>
$horizoninfo
,
),
/** 攻击力 */
"attack"
=>
$atkinfo
,
/** 防御力 */
...
...
@@ -753,6 +772,7 @@
"quality"
=>
$itme0
,
"durability"
=>
$itms0
,
"canMerge"
=>
checkMerge
(),
"mergeList"
=>
mergeList
(),
)
:
null
,
/** 发现敌人 */
"findEnemy"
=>
$tdata
[
'nameinfo'
]
?
array
(
...
...
@@ -795,7 +815,7 @@
/** 敌方道具 */
"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
,
)
:
null
,
...
...
command.php
View file @
1a3dbbd2
...
...
@@ -791,7 +791,7 @@ $jgamedata = compatible_json_encode($gamedata);
//$json = new Services_JSON();
//$jgamedata = $json->encode($gamedata);
//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'
;
}
else
{
echo
$jgamedata
;
...
...
game.php
View file @
1a3dbbd2
...
...
@@ -170,7 +170,7 @@ if(isset($opendialog))
}
//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'
;
}
else
{
include
template
(
'game'
);
...
...
register.php
View file @
1a3dbbd2
...
...
@@ -61,13 +61,25 @@ if(!isset($cmd)){
if
(
isset
(
$error
)){
$gamedata
[
'innerHTML'
][
'error'
]
=
$error
;}
ob_clean
();
$jgamedata
=
compatible_json_encode
(
$gamedata
);
echo
$jgamedata
;
if
(
isset
(
$_GET
[
'is_new'
]))
{
echo
json_encode
(
array
(
"info"
=>
$gamedata
[
'innerHTML'
][
'info'
],
));
}
else
{
echo
$jgamedata
;
}
ob_end_flush
();
}
else
{
ob_clean
();
if
(
isset
(
$error
)){
$gamedata
[
'innerHTML'
][
'error'
]
=
$error
;}
$jgamedata
=
compatible_json_encode
(
$gamedata
);
echo
$jgamedata
;
if
(
isset
(
$_GET
[
'is_new'
]))
{
echo
json_encode
(
array
(
"info"
=>
$gamedata
[
'innerHTML'
][
'info'
],
));
}
else
{
echo
$jgamedata
;
}
ob_end_flush
();
}
}
...
...
valid.php
View file @
1a3dbbd2
...
...
@@ -327,10 +327,11 @@ if($mode == 'enter') {
$select_icon
=
$icon
;
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
(
'id'
=>
$val
,
'title'
=>
$titles_list
[
$val
]
'title'
=>
$titles_list
[
$val
],
'desc'
=>
$title_desc
[
$val
][
'title'
],
);
},
$nicksrev
[
'nicks'
]);
// 获取可选普通内定称号
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment