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
dc0426bd
Commit
dc0426bd
authored
May 04, 2023
by
Nemo Ma
Committed by
GitHub
May 04, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #129 from hikawiier/waaagh
fixx
parents
b257b593
35b6fb87
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
18 deletions
+55
-18
include/game/itemmain.func.php
include/game/itemmain.func.php
+35
-0
include/game/search.func.php
include/game/search.func.php
+3
-1
include/state.func.php
include/state.func.php
+17
-17
No files found.
include/game/itemmain.func.php
View file @
dc0426bd
...
...
@@ -1460,6 +1460,41 @@ function change_subwep($s=2,&$data=NULL)
return
;
}
# 销毁指定装备
function
destory_single_equip
(
&
$pa
,
$equip
)
{
$equip_list
=
get_equip_list
();
if
(
in_array
(
$equip
,
$equip_list
))
{
$pa
[
$equip
]
=
$pa
[
$equip
.
'k'
]
=
$pa
[
$equip
.
'sk'
]
=
''
;
$pa
[
$equip
.
'e'
]
=
$pa
[
$equip
.
's'
]
=
0
;
reload_equip_items
(
$pa
);
}
else
{
return
"传入了非法的装备位名。"
;
}
return
;
}
# 销毁指定道具(传入的i必须为1~6范围内的数字)
function
destory_single_item
(
&
$pa
,
$i
)
{
$item_list
=
range
(
1
,
6
);
if
(
in_array
(
$i
,
$item_list
))
{
$pa
[
'itm'
.
$i
]
=
$pa
[
'itmk'
.
$i
]
=
$pa
[
'itmsk'
.
$i
]
=
''
;
$pa
[
'itme'
.
$i
]
=
$pa
[
'itms'
.
$i
]
=
0
;
}
else
{
return
"传入了非法的道具位名。"
;
}
return
;
}
# 初始化玩家/NPC数据时,检查对应部位是否可装备道具、或是否缺少基础装备
function
reload_equip_items
(
&
$pa
)
{
...
...
include/game/search.func.php
View file @
dc0426bd
...
...
@@ -651,7 +651,9 @@ function discover($schmode = 0,&$data=NULL)
//直接略过无效尸体
if
(
$gamestate
>=
40
)
continue
;
$ret
=
false
;
foreach
(
array
(
'weps'
,
'wep2s'
,
'money'
,
'arhs'
,
'aras'
,
'arfs'
,
'arts'
,
'itms1'
,
'itms2'
,
'itms3'
,
'itms4'
,
'itms5'
,
'itms6'
)
as
$chkval
)
# 略过无效尸体的条件是……全身装备/道具存在耐久不为0的部分
# 但是空手和内衣又属于特例……这两个部位就只能判断效果不为0了
foreach
(
array
(
'wepe'
,
'wep2e'
,
'money'
,
'arhs'
,
'arbe'
,
'aras'
,
'arfs'
,
'arts'
,
'itms1'
,
'itms2'
,
'itms3'
,
'itms4'
,
'itms5'
,
'itms6'
)
as
$chkval
)
{
if
(
$edata
[
$chkval
])
{
...
...
include/state.func.php
View file @
dc0426bd
...
...
@@ -110,6 +110,7 @@
//$alivenum = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}players WHERE hp>0 AND type=0"), 0);
# 执行死亡事件(灵魂绑定等)
if
(
!
$data
[
'type'
]
&&
empty
(
$data
[
'nm'
]))
$data
[
'nm'
]
=
'你'
;
check_death_events
(
create_dummy_playerdata
(),
$data
,
1
);
player_save
(
$data
);
...
...
@@ -366,36 +367,35 @@
}
# 灵魂绑定事件:
foreach
(
Array
(
'wep'
,
'arb'
,
'arh'
,
'ara'
,
'arf'
,
'art'
)
as
$equip
)
foreach
(
get_equip_list
(
)
as
$equip
)
{
// ……我为什么不把这个装备名数组放进resources里……用了一万遍了
// 哈哈,放了!
if
(
!
empty
(
$pd
[
$equip
.
's'
])
&&
strpos
(
$pd
[
$equip
.
'sk'
],
'v'
)
!==
false
)
{
$log
.=
"伴随着
{
$pd
[
'nm'
]
}
的死亡,<span class=
\"
yellow
\"
>
{
$pd
[
$equip
]
}
</span>也化作灰烬消散了。<br>"
;
$pd
[
$equip
]
=
$pd
[
$equip
.
'k'
]
=
$pd
[
$equip
.
'sk'
]
=
''
;
$pd
[
$equip
.
'e'
]
=
$pd
[
$equip
.
's'
]
=
0
;
if
(
$equip
==
'wep'
)
{
$pd
[
$equip
]
=
'拳头'
;
$pd
[
$equip
.
'k'
]
=
'WN'
;
$pd
[
$equip
.
'sk'
]
=
''
;
$pd
[
$equip
.
'e'
]
=
0
;
$pd
[
$equip
.
's'
]
=
$nosta
;
}
elseif
(
$equip
==
'arb'
)
{
$pd
[
$equip
]
=
'内衣'
;
$pd
[
$equip
.
'k'
]
=
'DN'
;
$pd
[
$equip
.
'sk'
]
=
''
;
$pd
[
$equip
.
'e'
]
=
0
;
$pd
[
$equip
.
's'
]
=
$nosta
;
}
$log
.=
"伴随着
{
$pd
[
'nm'
]
}
的死亡,<span class=
\"
yellow
\"
>
{
$pd
[
$equip
]
}
</span>化作灰烬消散了。<br>"
;
include_once
GAME_ROOT
.
'./include/game/itemmain.func.php'
;
destory_single_equip
(
$pd
,
$equip
);
}
}
for
(
$i
=
0
;
$i
<=
6
;
$i
++
)
{
if
(
!
empty
(
$pd
[
'itms'
.
$i
])
&&
strpos
(
$pd
[
'itmsk'
.
$i
],
'v'
)
!==
false
)
{
$log
.=
"伴随着
{
$pd
[
'nm'
]
}
的死亡,<span class=
\"
yellow
\"
>
{
$pd
[
'itm'
.
$i
]
}
</span>
也
化作灰烬消散了。<br>"
;
$pd
[
'itm'
.
$i
]
=
$pd
[
'itmk'
.
$i
]
=
$pd
[
'itmsk'
.
$i
]
=
'
'
;
$pd
[
'itme'
.
$i
]
=
$pd
[
'itms'
.
$i
]
=
0
;
$log
.=
"伴随着
{
$pd
[
'nm'
]
}
的死亡,<span class=
\"
yellow
\"
>
{
$pd
[
'itm'
.
$i
]
}
</span>化作灰烬消散了。<br>"
;
include_once
GAME_ROOT
.
'./include/game/itemmain.func.php
'
;
destory_single_item
(
$pd
,
$i
)
;
}
}
# 带有“天然”属性的副武器,在死亡时会掉到地图上……
if
(
!
empty
(
$pd
[
'wep2e'
])
&&
!
empty
(
$pd
[
'wep2sk'
])
&&
in_array
(
'z'
,
get_itmsk_array
(
$pd
[
'wep2sk'
])))
{
$db
->
query
(
"INSERT INTO
{
$tablepre
}
mapitem (itm, itmk, itme, itms, itmsk ,pls) VALUES ('
{
$pd
[
'wep2'
]
}
', '
{
$pd
[
'wep2k'
]
}
', '
{
$pd
[
'wep2e'
]
}
', '
{
$pd
[
'wep2s'
]
}
', '
{
$pd
[
'wep2sk'
]
}
', '
{
$pd
[
'pls'
]
}
')"
);
include_once
GAME_ROOT
.
'./include/game/itemmain.func.php'
;
destory_single_equip
(
$pd
,
'wep2'
);
}
#「掠夺」判定:
if
(
isset
(
$pa
[
'skill_c4_loot'
]))
{
...
...
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