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
389a0042
Commit
389a0042
authored
Apr 15, 2023
by
hisuinohoshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
41a5685d
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
38 additions
and
20 deletions
+38
-20
alive.php
alive.php
+1
-1
include/admin/gameinfomng.php
include/admin/gameinfomng.php
+3
-3
include/admin/npcmng.php
include/admin/npcmng.php
+1
-1
include/common.inc.php
include/common.inc.php
+9
-5
include/game/event.func.php
include/game/event.func.php
+1
-1
include/game/item.func.php
include/game/item.func.php
+15
-2
include/game/item2.func.php
include/game/item2.func.php
+2
-2
include/game/itemplace.func.php
include/game/itemplace.func.php
+1
-1
include/game/search.func.php
include/game/search.func.php
+1
-0
include/roommng.func.php
include/roommng.func.php
+2
-2
include/state.func.php
include/state.func.php
+1
-1
news.php
news.php
+1
-1
No files found.
alive.php
View file @
389a0042
...
...
@@ -167,7 +167,7 @@ if($gamblingon){
//打包快递给快递员 返回新生成的快递员pid
$gclb
=
Array
(
'clbpara'
=>
Array
(
'sponsor'
=>
$uid
,
'post'
=>
$bet
,
'postid'
=>
6
),);
//记录赞助者的uid、收货方的pid、道具位置
$gitem
=
Array
(
6
,
$iteminfo
[
'item'
],
$iteminfo
[
'itmk'
],
$iteminfo
[
'itme'
],
$iteminfo
[
'itms'
]
*
$bnum
,
$iteminfo
[
'itmsk'
]);
//打包快递
include_once
GAME_ROOT
.
'./include/system.func.php'
;
//
include_once GAME_ROOT.'./include/system.func.php';
$nid
=
addnpc
(
$gnpctype
,
$gnpcsub
,
1
,
$now
,
$gclb
,
$gitem
,
$bdata
[
'pls'
])[
0
];
$gbinfo
.=
"快递员已带着你赞助的商品前往
{
$bdata
[
'name'
]
}
所在的位置!谢谢惠顾~<br>"
;
//存一条发快递记录到gambling表里,一个玩家在快递被接收前不能发第二份快递。防止有人狂买低价商品挤爆players表。
...
...
include/admin/gameinfomng.php
View file @
389a0042
...
...
@@ -29,8 +29,8 @@ if($command == 'wthedit'){
save_gameinfo
();
adminlog
(
'hackedit'
,
$ihack
);
addnews
(
$now
,
'syshackchg'
,
$ihack
);
include_once
GAME_ROOT
.
'./include/system.func.php'
;
movehtm
();
//
include_once GAME_ROOT.'./include/system.func.php';
//
movehtm();
}
}
elseif
(
strpos
(
$command
,
'gsedit'
)
===
0
){
$igamestate
=
explode
(
'_'
,
$command
);
...
...
@@ -65,7 +65,7 @@ if($command == 'wthedit'){
adminlog
(
'gsedit'
,
$igamestate
);
}
else
{
$cmd_info
=
"第
$gamenum
局大逃杀紧急中止"
;
include_once
GAME_ROOT
.
'./include/system.func.php'
;
//
include_once GAME_ROOT.'./include/system.func.php';
gameover
(
$now
,
'end6'
);
save_gameinfo
();
adminlog
(
'gameover'
);
...
...
include/admin/npcmng.php
View file @
389a0042
...
...
@@ -34,7 +34,7 @@ if($command == 'kill' || $command == 'live' || $command == 'del') {
$operlist
[
$
{
'npc_'
.
$i
}]
=
$npcdata
[
$i
][
'name'
]
.
'(PID:'
.
$npcdata
[
$i
][
'pid'
]
.
')'
;
$npcdata
[
$i
][
'hp'
]
=
0
;
$npcdata
[
$i
][
'state'
]
=
15
;
$deathnum
++
;
$alivenum
--
;
$deathnum
++
;
//
$alivenum--;
adminlog
(
'killnpc'
,
$npcdata
[
$i
][
'name'
]);
}
else
{
$gfaillist
[]
=
$npcdata
[
$i
][
'name'
]
.
'(PID:'
.
$npcdata
[
$i
][
'pid'
]
.
')'
;
...
...
include/common.inc.php
View file @
389a0042
...
...
@@ -10,6 +10,7 @@ if(version_compare(PHP_VERSION, '4.3.0', '<')) {
exit
(
'PHP version must >= 4.3.0!'
);
}
require
GAME_ROOT
.
'./include/global.func.php'
;
require
GAME_ROOT
.
'./include/system.func.php'
;
error_reporting
(
E_ALL
);
set_error_handler
(
'gameerrorhandler'
);
$magic_quotes_gpc
=
false
;
...
...
@@ -110,7 +111,7 @@ if(CURSCRIPT !== 'chat')
$hplayer
=
''
;
$noisemode
=
''
;
//save_gameinfo();
include_once
GAME_ROOT
.
'./include/system.func.php'
;
//
include_once GAME_ROOT.'./include/system.func.php';
rs_game
(
1
+
2
+
4
+
8
+
16
+
32
);
//save_gameinfo();
$ginfochange
=
true
;
...
...
@@ -132,7 +133,7 @@ if(CURSCRIPT !== 'chat')
}
//判定增加禁区
if
((
$gamestate
>
10
)
&&
(
$now
>
$areatime
))
{
include_once
GAME_ROOT
.
'./include/system.func.php'
;
//
include_once GAME_ROOT.'./include/system.func.php';
while
(
$now
>
$areatime
){
$o_areatime
=
$areatime
;
$areatime
+=
$areahour
*
60
;
...
...
@@ -142,7 +143,7 @@ if(CURSCRIPT !== 'chat')
}
//判定警告增加禁区
}
elseif
((
$gamestate
>
10
)
&&
(
$now
>
$areatime
-
$areawarntime
)
&&
(
!
$areawarn
)){
include_once
GAME_ROOT
.
'./include/system.func.php'
;
//
include_once GAME_ROOT.'./include/system.func.php';
areawarn
();
$ginfochange
=
true
;
}
...
...
@@ -177,15 +178,18 @@ if(CURSCRIPT !== 'chat')
}
if
((
$gamestate
>=
40
)
&&
(
$now
>
$afktime
+
$antiAFKertime
*
60
))
{
//判定自动反挂机
include_once
GAME_ROOT
.
'./include/system.func.php'
;
//
include_once GAME_ROOT.'./include/system.func.php';
antiAFK
();
$afktime
=
$now
;
$ginfochange
=
true
;
}
if
(
$gamestate
>=
40
)
{
$result
=
$db
->
query
(
"SELECT pid FROM
{
$tablepre
}
players WHERE hp>0 AND type=0"
);
$alivenum
=
$db
->
num_rows
(
$result
);
save_gameinfo
();
if
(
$alivenum
<=
1
)
{
include_once
GAME_ROOT
.
'./include/system.func.php'
;
//
include_once GAME_ROOT.'./include/system.func.php';
gameover
();
}
}
...
...
include/game/event.func.php
View file @
389a0042
...
...
@@ -635,7 +635,7 @@ function event(){
// addnews($now,'death13',$name,0);
// $alivenum--;
// $deathnum++;
// include_once GAME_ROOT.'./include/system.func.php';
//
//
include_once GAME_ROOT.'./include/system.func.php';
// save_gameinfo();
include_once
GAME_ROOT
.
'./include/state.func.php'
;
death
(
'event'
);
...
...
include/game/item.func.php
View file @
389a0042
...
...
@@ -978,11 +978,18 @@ function itemuse($itmn,&$data=NULL) {
//global $itm0,$itmk0,$itme0,$itms0,$itmsk0,$mode;
$itm0
=
$in
;
$itmk0
=
$ik
;
$itme0
=
$ie
;
$itms0
=
$is
;
$itmsk0
=
$isk
;
addnews
(
$now
,
'present'
,
$nickinfo
.
' '
.
$name
,
$itm
,
$in
);
$itms1
--
;
/*
$itms1--;
if ($itms1 <= 0) {
$log .= "<span class=\"red\">$itm</span>用光了。<br>";
$itm = $itmk = $itmsk = '';
$itme = $itms = 0;
}*/
// ?????
$itms
--
;
if
(
$itms
<=
0
)
{
$log
.=
"<span class=
\"
red
\"
>
$itm
</span>用光了。<br>"
;
$itm
=
$itmk
=
$itmsk
=
''
;
$itme
=
$itms
=
0
;
}
include_once
GAME_ROOT
.
'./include/game/itemmain.func.php'
;
itemget
(
$data
);
...
...
@@ -995,11 +1002,17 @@ function itemuse($itmn,&$data=NULL) {
//global $itm0,$itmk0,$itme0,$itms0,$itmsk0,$mode;
$itm0
=
$in
;
$itmk0
=
$ik
;
$itme0
=
$ie
;
$itms0
=
$is
;
$itmsk0
=
$isk
;
addnews
(
$now
,
'present'
,
$nickinfo
.
' '
.
$name
,
$itm
,
$in
);
$itms1
--
;
/*
$itms1--;
if ($itms1 <= 0) {
$log .= "<span class=\"red\">$itm</span>用光了。<br>";
$itm = $itmk = $itmsk = '';
$itme = $itms = 0;
}*/
$itms
--
;
if
(
$itms
<=
0
)
{
$log
.=
"<span class=
\"
red
\"
>
$itm
</span>用光了。<br>"
;
$itm
=
$itmk
=
$itmsk
=
''
;
$itme
=
$itms
=
0
;
}
include_once
GAME_ROOT
.
'./include/game/itemmain.func.php'
;
itemget
(
$data
);
...
...
include/game/item2.func.php
View file @
389a0042
...
...
@@ -137,8 +137,8 @@ function hack($itmn = 0) {
$hack
=
1
;
$clbpara
[
'achvars'
][
'hack'
]
+=
1
;
$log
.=
'入侵禁区控制系统成功了!全部禁区都被解除了!<br>'
;
include_once
GAME_ROOT
.
'./include/system.func.php'
;
movehtm
();
//
include_once GAME_ROOT.'./include/system.func.php';
//
movehtm();
addnews
(
$now
,
'hack'
,
get_title_desc
(
$nick
)
.
' '
.
$name
);
storyputchat
(
$now
,
'hack'
);
save_gameinfo
();
...
...
include/game/itemplace.func.php
View file @
389a0042
...
...
@@ -226,7 +226,7 @@ function get_npc_helpinfo($nlist,$tooltip=1)
break
;
}
}
if
(
isset
(
$snpc
[
'gd'
]
))
if
(
!
empty
(
$snpc
[
'gd'
])
&&
(
$snpc
[
'gd'
]
==
'm'
||
$snpc
[
'gd'
]
==
'f'
))
{
$snpc
[
'gd'
]
=
$snpc
[
'gd'
]
==
'm'
?
'男'
:
'女'
;
}
...
...
include/game/search.func.php
View file @
389a0042
...
...
@@ -812,6 +812,7 @@ function focus_item(&$data=NULL,$id=NULL)
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
mapitem WHERE pls = '
$pls
' AND iid = '
$id
'"
);
if
(
!
$db
->
num_rows
(
$result
))
{
// 这是特性
$log
.=
"但是你想找的东西已经不见了!<br>"
;
return
0
;
}
...
...
include/roommng.func.php
View file @
389a0042
...
...
@@ -81,7 +81,7 @@ function roommng_create_new_room(&$udata)
if
(
$now_room_nums
)
{
$room_ids
=
range
(
1
,
$max_rooms
);
$now_room_ids
=
$db
->
fetch_array
(
$result
)
;
while
(
$now_room_ids
[]
=
$db
->
fetch_array
(
$result
)[
'groomid'
]){}
;
$new_room_id
=
array_shift
(
array_diff
(
$room_ids
,
$now_room_ids
));
}
else
...
...
@@ -157,7 +157,7 @@ function roommng_exit_room(&$udata)
if
(
$db
->
num_rows
(
$result2
))
{
$udata2
=
$db
->
fetch_array
(
$result2
);
$new_ownid
=
$udata2
[
'u
id
'
];
$new_ownid
=
$udata2
[
'u
sername
'
];
echo
"将房主权限移交给了
{
$udata2
[
'username'
]
}
<br>"
;
}
}
...
...
include/state.func.php
View file @
389a0042
...
...
@@ -311,7 +311,7 @@
check_battle_achievement_rev
(
$pa
,
$pd
);
}
# 保存游戏进行状态
include_once
GAME_ROOT
.
'./include/system.func.php'
;
//
include_once GAME_ROOT.'./include/system.func.php';
save_gameinfo
();
return
;
}
...
...
news.php
View file @
389a0042
...
...
@@ -7,7 +7,7 @@ require './include/game.func.php';
//$t_s=getmicrotime();
//require_once GAME_ROOT.'./include/JSON.php';
require_once
GAME_ROOT
.
'./include/news.func.php'
;
include_once
GAME_ROOT
.
'./include/system.func.php'
;
//
include_once GAME_ROOT.'./include/system.func.php';
/*
$newsfile = GAME_ROOT.'./gamedata/newsinfo.php';
...
...
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