Commit 3a83d450 authored by Nemo Ma's avatar Nemo Ma Committed by GitHub

Merge pull request #30 from hikawiier/waaagh

Update area&events&vnmix
parents 70a04925 6a257f26
......@@ -18,8 +18,10 @@ $isduel = 0;
$hotkeyon = 0;
//开启NPC台词功能?0为不开启,1为开启
$npcchaton = 1;
//有台词的NPC
$npccanchat = Array(1,5,6,7,9,10,12,13,15,21,22,24,92);
//有台词的NPC(已废弃,只要登记过台词的NPC就会显示台词,需要关闭哪个NPC的台词功能请直接注释掉ta的台词)
//$npccanchat = Array(1,5,6,7,9,10,12,13,15,21,22,24,92);
//开启NPC不会因躲避禁区而移动到危险地图的功能?0为不开启,1为开启
$npc_away_from_deepzones = 1;
//反挂机系统间隔时间,单位分钟
$antiAFKertime = 20;
//尸体保护时间,单位秒
......
......@@ -374,11 +374,11 @@ $mixinfo = array
array('class' => 'hidden', 'stuff' => array('[rm]','[-r]','[-f]'),'result' => array('【E.S.C.A.P.E】','Y',1,1,),),
);
$vn_file = GAME_ROOT.'./gamedata/cache/vnmixitem_1.php';
/*$vn_file = GAME_ROOT.'./gamedata/cache/vnmixitem_1.php';
if(file_exists($vn_file))
{
include_once $vn_file;
//$mixinfo += $vn_mixinfo;
$mixinfo = array_merge($mixinfo,$vn_mixinfo);
}
}*/
?>
......@@ -61,6 +61,10 @@ $rageinfo = Array('平静','愤怒','暴怒','已经死亡');
$wepeinfo = Array('不值一提','略有威胁','威力可观','无敌神器');
$poseinfo = Array('通常','作战姿态','强袭姿态','探物姿态','偷袭姿态','治疗姿态','✧狂飙姿态✧');
$tacinfo = Array('通常','','重视防御','重视反击','重视躲避');
//不会生成在危险地图的NPC(女主)
$hidding_typelist = Array(14);
//不会因躲避禁区、追杀玩家等原因离开地图的NPC(红暮、■、执行官、英灵(没有巫师)、SCP、种火)
$sentinel_typelist = Array(1,4,7,9,13,20,21,22,88,92);
$typeinfo = Array(
0=>'参战者',
1=>'红杀将军',
......@@ -1283,7 +1287,6 @@ $title_valid = Array
);
//club20 元素大师:
//元素列表 可能需要一些布灵布灵的特效
$sparkle = '<span class="sparkle">✨</span>';
$elements_info = Array
(
......@@ -1294,6 +1297,8 @@ $elements_info = Array
4 => $sparkle.'<span class="mtgwhite">昼闪闪</span>'.$sparkle,
5 => $sparkle.'<span class="mtgblack">夜静静</span>'.$sparkle,
);
//NPC在躲避禁区、追杀玩家时不会进入的危险区(默认:无月之影、SCP、雏菊、英灵殿)
$deepzones = Array(0,32,33,34);
//安全箱位置
$depots = Array(5,28);
$shops = Array(0,14,27);
......
......@@ -191,13 +191,55 @@ $vn_gm_itemspkinfo = Array
'*' => '灵魂抽取',
'+' => '技能抽取',
//0-99数字做在这里面还是再开一个框?要考虑考虑。
'1' => '编号1',
'2' => '编号2',
'3' => '编号3',
'4' => '编号4',
'5' => '编号5',
'6' => '编号6',
'7' => '编号7',
'8' => '编号8',
'9' => '编号9',
'10' => '编号10',
'11' => '编号11',
'12' => '编号12',
'13' => '编号13',
'14' => '编号14',
'15' => '编号15',
'16' => '编号16',
'17' => '编号17',
'95' => '编号95',
'96' => '编号96',
'97' => '编号97',
'98' => '编号98',
'99' => '编号99',
);
//道具组别
$vrclassinfo = Array
(
'wp'=> array('殴系武器','yellow'),
'wk'=> array('斩系武器','yellow'),
'wg'=> array('射系武器','yellow'),
'wc'=> array('投系武器','yellow'),
'wd'=> array('爆系武器','yellow'),
'wf'=> array('灵系武器','yellow'),
'wmu' => array('多重武器','yellow'),
'w' => array('其他装备','yellow'),
'h' => array('补给品','lime'),
'pokemon'=> array('小黄系道具','yellow'),
'fseed'=> array('种火系道具','lime'),
'ocg'=> array('游戏王系道具','clan'),
'key'=> array('KEY系道具','lime'),
'cube'=> array('方块系道具','yellow'),
'item'=> array('其他道具','yellow'),
'titles'=> array('头衔奖励相关道具','sienna'),
);
//显示在编辑合成页面上方的信息
$vnmix_top_tips = '提示:每个配方至少需要两种合成素材,素材与道具名最长不可以超过30个字符。<br>将道具耐久设置为0时可以让耐久度变为“∞”。';
if($vnmix_c2_cost) $vnmix_top_tips.='每次提交需要消耗'.$vnmix_c2_cost.'份切糕。';
//显示在编辑合成与打印合成表页面上的提示信息
$stuff_tips = Array('合成材料一','合成材料二','合成材料三','合成材料四','合成材料五',);
$result_tips = Array('合成结果','道具用途','道具效果','道具耐久','属性1','属性2','属性3','属性4','属性5');
$result_tips = Array('合成结果','道具用途','道具效果','道具耐久','属性1','属性2','属性3','属性4','属性5','道具分组');
$log_tips = Array('道具属性','作者','提交状态');
$check_tips = Array('<span class="yellow">提交中</span>','<span class="lime">已采纳</span>','<span class="red">未采纳</span>');
$check_infos = Array
......
......@@ -15,6 +15,7 @@ $presentfile = config('present',$gamecfg);
$boxfile = config('box',$gamecfg);
$vnmixfile = config('vnmixitem',$gamecfg);
include_once $mixfile;
include_once $vnmixfile;
$writefile = GAME_ROOT.TPLDIR.'/mixhelp.htm';
include_once config('npc',$gamecfg);
......@@ -88,7 +89,6 @@ if(filemtime($vnmixfile) > filemtime($writefile) ||filemtime($mixfile) > filemti
}
$mixitem[$mix['class']][] = array('stuff' => $mix['stuff'], 'result' => array($mix['result'][0],$mixitmk,$mix['result'][2],$mix['result'][3],$mixitmsk));
}
}
$mixclass = array(
......@@ -108,7 +108,6 @@ if(filemtime($vnmixfile) > filemtime($writefile) ||filemtime($mixfile) > filemti
'cube'=> array('方块系道具','yellow'),
'item'=> array('其他道具','yellow'),
'titles'=> array('头衔奖励相关道具','sienna'),
'VN'=> array('玩家原创道具','lime'),
);
$mixhelpinfo = '';
foreach($mixitem as $class => $list){
......@@ -158,6 +157,81 @@ if(filemtime($vnmixfile) > filemtime($writefile) ||filemtime($mixfile) > filemti
}
$mixhelpinfo .= "</table>\n";
}
$mixhelpinfo .= "\r <br><span class='evergreen'>此外,游戏中还包含由玩家提交的原创合成:</span><br> \r";
# 玩家原创合成部分
foreach($vn_mixinfo as $mix)
{
if($mix['class'] !== 'hidden')
{
//名字
$mix['result'][0] = parse_itm_desc($mix['result'][0],'m');
//类别
foreach($iteminfo as $info_key => $info_value){
if(strpos($mix['result'][1],$info_key)===0){
$mixitmk = parse_itm_desc($info_key,'k');
break;
}
}
//属性
$mixitmsk = '';
if(!empty($mix['result'][4]) && !is_numeric($mix['result'][4])){
$mix_sk = get_itmsk_array($mix['result'][4]); $mixitmsk = '';
foreach($mix_sk as $sk_value)
{
if(!empty($mixitmsk)) $mixitmsk .= '+'.parse_itm_desc($sk_value,'sk');
else $mixitmsk = parse_itm_desc($sk_value,'sk');
}
}
$vmixitem[$mix['class']][] = array('name' => $mix['name'], 'stuff' => $mix['stuff'], 'result' => array($mix['result'][0],$mixitmk,$mix['result'][2],$mix['result'][3],$mixitmsk));
}
}
foreach($vmixitem as $class => $list){
$classname = $mixclass[$class][0];
$classcolor = $mixclass[$class][1];
$mixhelpinfo .= "<p><span class=\"$classcolor\">{$classname}合成表 - 玩家原创</span>:</p>\n";
$mixhelpinfo .=
"<table>
<tr>
<td class=\"b1\" width=100px><span>配方作者</span></td>
<td class=\"b1\" height=20px><span>合成材料一</span></td>
<td class=\"b1\"><span>合成材料二</span></td>
<td class=\"b1\"><span>合成材料三</span></td>
<td class=\"b1\"><span>合成材料四</span></td>
<td class=\"b1\"><span>合成材料五</span></td>
<td class=\"b1\"></td>
<td class=\"b1\"><span>合成结果</span></td>
<td class=\"b1\"><span>物品属性</span></td>
</tr>
";
foreach($list as $val){
if(!empty($val['result'][4])){$itmskword = '/'.$val['result'][4];}
else{$itmskword = '';}
if(!isset($val['stuff'][2])){$val['stuff'][2] = '-';}
if(!isset($val['stuff'][3])){$val['stuff'][3] = '-';}
if(!isset($val['stuff'][4])){$val['stuff'][4] = '-';}
$mixhelpinfo .= "<tr><td class=\"b3\">{$val['name']}</td>";
for ($i=0; $i<=4; $i++)
{
$mixhelpinfo .= "<td class=\"b3\" ";
if ($i==0) $mixhelpinfo .= "height=20px";
if ($val['stuff'][$i]!='-')
{
$tooltipinfo = get_item_place($val['stuff'][$i]);
if(!empty($tooltipinfo)) $mixhelpinfo .= "><span tooltip=\"".$tooltipinfo."\" ";
}
$mixhelpinfo .= ">{$val['stuff'][$i]}</span></td>";
}
$mixhelpinfo .= "<td class=\"b3\">→</td>
<td class=\"b3\"><span>{$val['result'][0]}</span></td>
<td class=\"b3\"><span>{$val['result'][1]}/{$val['result'][2]}/{$val['result'][3]}{$itmskword}</span></td>
</tr>
";
}
$mixhelpinfo .= "</table>\n";
}
writeover($writefile,$mixhelpinfo);
}
......
This diff is collapsed.
......@@ -793,7 +793,9 @@ function itemmix($mlist, $itemselect=-1) {
}
include_once config('mixitem',$gamecfg);
include_once config('vnmixitem',$gamecfg);
$mixflag = false;
if(!empty($vn_mixinfo)) $mixinfo = array_merge($mixinfo,$vn_mixinfo);
foreach($mixinfo as $minfo) {
if(!array_diff($mixitem,$minfo['stuff']) && !array_diff($minfo['stuff'],$mixitem) && count($mixitem) == count($minfo['stuff'])){
$mixflag = true;
......
......@@ -430,7 +430,10 @@
}
# 获取pa社团技能对攻击力的加成
rev_get_clubskill_bonus($pa['club'],$pa['skills'],$pa,$pd['club'],$pa['skills'],$pd,$att1,$def1);
if(!empty($pa['skills']))
{
rev_get_clubskill_bonus($pa['club'],$pa['skills'],$pa,$pd['club'],$pa['skills'],$pd,$att1,$def1);
}
# 汇总::
$base_att = $pa['att'] + $pa['wepe_t'] + $att1;
......@@ -527,7 +530,10 @@
}
}
# 获取pd社团技能对防御力的加成
rev_get_clubskill_bonus($pa['club'],$pa['skills'],$pa,$pd['club'],$pa['skills'],$pd,$att1,$def1);
if(!empty($pd['skills']))
{
rev_get_clubskill_bonus($pa['club'],$pa['skills'],$pa,$pd['club'],$pa['skills'],$pd,$att1,$def1);
}
# 汇总:
$total_def = $base_def+$equip_def+$def1;
......
......@@ -386,10 +386,15 @@ function discover($schmode = 0) {
global $art,$pls,$now,$log,$mode,$command,$cmd,$event_obbs,$weather,$pls,$club,$pose,$tactic,$inf,$item_obbs,$enemy_obbs,$trap_min_obbs,$trap_max_obbs,$bid,$db,$tablepre,$gamestate,$corpseprotect,$action,$skills,$rp,$aidata;
$event_dice = rand(0,99);
if(($event_dice < $event_obbs)||(($art!="Untainted Glory")&&($pls==34)&&($gamestate != 50))){
//echo "进入事件判定<br>";
include_once GAME_ROOT.'./include/game/event.func.php';
event();
$mode = 'command';
return;
$event_flag = event();
//触发了事件,中止探索推进
if($event_flag)
{
$mode = 'command';
return;
}
}
include_once GAME_ROOT. './include/game/aievent.func.php';//AI事件
......@@ -417,6 +422,7 @@ function discover($schmode = 0) {
$trap_dice=rand(0,99);//随机数,开始判断是否踩陷阱
if($trap_dice < $trap_max_obbs){ //踩陷阱概率最大值
//echo "进入踩陷阱判定<br>";
$trapresult = $db->query("SELECT * FROM {$tablepre}maptrap WHERE pls = '$pls' ORDER BY itmk DESC");
// $traplist = Array();
// while($trap0 = $db->fetch_array($result)){
......@@ -510,6 +516,7 @@ function discover($schmode = 0) {
$mode_dice = rand(0,99);
if($mode_dice < $schmode)
{
//echo "进入遇敌判定<br>";
global $pid,$corpse_obbs,$teamID,$fog,$bid,$gamestate;
global $clbpara,$clbstatusa,$clbstatusb,$clbstatusc,$clbstatusd,$clbstatuse;
......@@ -653,6 +660,7 @@ function discover($schmode = 0) {
$mode = 'command';
return;
} else {
//echo "进入道具判定<br>";
$find_r = get_find_r($weather,$pls,$pose,$tactic,$club,$inf);
$find_obbs = $item_obbs + $find_r;
$item_dice = rand(0,99);
......
......@@ -112,7 +112,19 @@ function rs_game($mode = 0) {
}
//$npc['wp'] = $npc['wk'] = $npc['wg'] = $npc['wc'] = $npc['wd'] = $npc['wf'] = $npc['skill'];
if($npc['gd'] == 'r'){$npc['gd'] = rand(0,1) ? 'm':'f';}
do{$rpls=rand(1,$plsnum-1);}while ($rpls==34);
//初始化NPC所在位置
global $hidding_typelist,$deepzones;
//女主不会刷新在危险区域
if(in_array($npc['type'],$hidding_typelist))
{
do{
$rpls=rand(1,$plsnum-1);
}while (in_array($rpls,$deepzones));
}
else
{
do{$rpls=rand(1,$plsnum-1);}while ($rpls==34);
}
if($npc['pls'] == 99){$npc['pls'] = $rpls; }
$npc['state'] = 0;
$npc=player_format_with_db_structure($npc);
......@@ -289,6 +301,7 @@ function rs_sttime() {
function add_once_area($atime) {
//实际上GAMEOVER的判断是在common.inc.php里
global $db,$tablepre,$now,$gamestate,$areaesc,$arealist,$areanum,$arealimit,$areaadd,$plsinfo,$weather,$hack,$validnum,$alivenum,$deathnum;
global $deepzones,$sentinel_typelist,$npc_away_from_deepzones;
if (($gamestate > 10)&&($now > $atime)) {
$plsnum = sizeof($plsinfo) - 1;
......@@ -349,8 +362,21 @@ function add_once_area($atime) {
do{$pls = $arealist[rand($areanum+1,$plsnum)];}while ($pls==34);
$db->query("UPDATE {$tablepre}players SET pls='$pls' WHERE pid=$pid ");
}
} elseif($sub['type'] != 1 && $sub['type'] != 7 && $sub['type'] != 9 && $sub['type'] != 13 && $sub['type'] != 20 && $sub['type'] != 21 && $sub['type'] != 88 && $sub['type'] != 22 && $sub['type'] != 92) {
do{$pls = $arealist[rand($areanum+1,$plsnum)];}while ($pls==34);
//躲避禁区判定
//} elseif($sub['type'] != 1 && $sub['type'] != 7 && $sub['type'] != 9 && $sub['type'] != 13 && $sub['type'] != 20 && $sub['type'] != 21 && $sub['type'] != 88 && $sub['type'] != 22 && $sub['type'] != 92) {
}elseif(!in_array($sub['type'],$sentinel_typelist)){
if($npc_away_from_deepzones)
{ //开启了NPC不会因躲避禁区移动到危险地图的功能
do{
$pls = $arealist[rand($areanum+1,$plsnum)];
}while (in_array($pls,$deepzones));
}
else
{
do{
$pls = $arealist[rand($areanum+1,$plsnum)];
}while ($pls==34);
}
$db->query("UPDATE {$tablepre}players SET pls='$pls' WHERE pid=$pid");
}
}
......
......@@ -5,7 +5,8 @@
<!--{if !empty($temp_mixinfo)}-->
<table class="admin">
<tr>
<th><span>提交者</span></th>
<th width="100px"><span>提交者</span></th>
<th width="60px"><span>道具分组</span></th>
<th><span>$stuff_tips[0]</span></th>
<th><span>$stuff_tips[1]</span></th>
<th><span>$stuff_tips[2]</span></th>
......@@ -13,11 +14,12 @@
<th><span>$stuff_tips[4]</span></th>
<th width="25px"><span></span></th>
<th><span>$result_tips[0]</span></th>
<th width="35px">调整<span></span></th>
<th width="45px">调整<span></span></th>
</tr>
<!--{loop $temp_mixinfo $key $arr}-->
<tr>
<td style="text-align: center;">$arr['name']</td>
<td style="text-align: center;">$vrclassinfo[$arr['class']][0]</td>
<td style="text-align: center;"><!--{if isset($arr['stuff'][0])}-->$arr['stuff'][0]<!--{else}-->-<!--{/if}--></td>
<td style="text-align: center;"><!--{if isset($arr['stuff'][1])}-->$arr['stuff'][1]<!--{else}-->-<!--{/if}--></span></td>
<td style="text-align: center;"><!--{if isset($arr['stuff'][2])}-->$arr['stuff'][2]<!--{else}-->-<!--{/if}--></span></td>
......@@ -25,7 +27,7 @@
<td style="text-align: center;"><!--{if isset($arr['stuff'][4])}-->$arr['stuff'][4]<!--{else}-->-<!--{/if}--></td>
<td style="text-align: center;"></td>
<td style="text-align: center;">$arr['result'][0]/$arr['result'][1]/$arr['result'][2]/$arr['result'][3]<!--{if isset($arr['result'][4])}-->/$arr['result'][4]<!--{/if}--></td>
<td width="35px">
<td style="text-align: center;">
<!--<input type="submit" value="编辑" onclick="$('vncmd').value='edit_$key'">-->
<input type="submit" value="回退" onclick="$('vncmd').value='del_$key'">
</td>
......
......@@ -45,6 +45,7 @@
<td class="b1"><span>$result_tips[6]</span></td>
<td class="b1"><span>$result_tips[7]</span></td>
<td class="b1"><span>$result_tips[8]</span></td>
<td class="b1"><span>$result_tips[9]</span></td>
</tr>
<tr>
<td class="b3" width=20px></td>
......@@ -99,6 +100,13 @@
<!--{/loop}-->
</select>
</td>
<td class="b3">
<select name="vrck">
<!--{loop $vrclassinfo $ck $vcarr}-->
<option value="$ck" <!--{if $ck===$uvrck}-->selected<!--{/if}-->>$vcarr[0]
<!--{/loop}-->
</select>
</td>
</tr>
</table>
<!--{if $vnmix_name_assoc}-->
......
......@@ -9,8 +9,8 @@
<!--{if !empty($temp_carr)}-->
<table>
<tr>
<td class="b1" height=20px>$log_tips[1]</td>
<td class="b1" width="20px"></td>
<td class="b1" height=20px width="100px">$log_tips[1]</td>
<td class="b1" width="60px">$result_tips[9]</td>
<td class="b1">$stuff_tips[0]</td>
<td class="b1">$stuff_tips[1]</td>
<td class="b1">$stuff_tips[2]</td>
......@@ -22,25 +22,25 @@
<td class="b1">$result_tips[2]</td>
<td class="b1">$result_tips[3]</td>
<td class="b1">$log_tips[0]</td>
<td class="b1" width="20px">编辑</td>
<td class="b1" width="45px">编辑</td>
<td class="b1">$log_tips[2]</td>
</tr>
<!--{loop $temp_carr $cid $cinfo}-->
<tr>
<td class="b3" height=20px >$cinfo['name']</td>
<td class="b3" width="20px"><!--点赞按钮预留位--></td>
<td class="b3">$cinfo['name']</td>
<td class="b3"><!--{if isset($cinfo['stuff'][0])}-->$vrclassinfo[$cinfo['class']][0]<!--{else}-->$vrclassinfo['item'][0]<!--{/if}--></td>
<td class="b3"><!--{if isset($cinfo['stuff'][0])}-->$cinfo['stuff'][0]<!--{else}-->-<!--{/if}--></td>
<td class="b3"><!--{if isset($cinfo['stuff'][1])}-->$cinfo['stuff'][1]<!--{else}-->-<!--{/if}--></td>
<td class="b3"><!--{if isset($cinfo['stuff'][2])}-->$cinfo['stuff'][2]<!--{else}-->-<!--{/if}--></td>
<td class="b3"><!--{if isset($cinfo['stuff'][3])}-->$cinfo['stuff'][3]<!--{else}-->-<!--{/if}--></td>
<td class="b3"><!--{if isset($cinfo['stuff'][4])}-->$cinfo['stuff'][4]<!--{else}-->-<!--{/if}--></td>
<td class="b3" width="25px"></td>
<td class="b3"></td>
<td class="b3">$cinfo['result'][0]</td>
<td class="b3">$temp_vniteminfo[$cinfo['result'][1]]</td>
<td class="b3">$cinfo['result'][2]</td>
<td class="b3">$cinfo['result'][3]</td>
<td class="b3"><!--{if isset($cinfo['spkinfo'])}-->$cinfo['spkinfo']<!--{else}-->-<!--{/if}--></td>
<td class="b3" width="20px">
<td class="b3">
<!--{if ($cinfo['name']==$udata['username']||$udata['groupid']>=$vnmix_editor_group||$udata['username']==$gamefounder) && $cinfo['status']!=1}-->
<form method="post" action="vn_postitem.php" name="vn_postitem" onsubmit="vn_postitem.php" style="margin: 0px">
<input type="hidden" name="editor" value="$cinfo['name']">
......
......@@ -30,7 +30,7 @@ for($i=0;$i<=4;$i++)
${'uvs'.$i} = '';
${'uvrsk'.$i} = 0;
}
$uvrn = ''; $uvrk = 0; $uvre = 1; $uvrs = 0;
$uvrn = ''; $uvrk = 0; $uvre = 1; $uvrs = 0; $uvrck = 'item';
//初始化允许选择的道具类别、属性
$temp_vn_iteminfo = $gmflag ? $vn_iteminfo+$vn_gm_iteminfo : $vn_iteminfo;
......@@ -70,7 +70,7 @@ if(isset($exmode) && strpos($exmode,'ep')===0)
$edit_name = $flag['name']; $edit_result = $flag['result'][0];
unset($flag);
//通过检查,打包。
$flag = filter_post_mixlist($vsname0,$vsname1,$vsname2,$vsname3,$vsname4,$vrname,$vrk,$vre,$vrs,$vrsk0,$vrsk1,$vrsk2,$vrsk3,$vrsk4);
$flag = filter_post_mixlist($vsname0,$vsname1,$vsname2,$vsname3,$vsname4,$vrname,$vrk,$vre,$vrs,$vrsk0,$vrsk1,$vrsk2,$vrsk3,$vrsk4,$vrck);
if($flag && !is_array($flag) || ((!isset($flag['result'])) || !isset($flag['stuff'])))
{ //有非法参数,报错
$vlog = $flag;
......@@ -254,7 +254,9 @@ elseif($vnmode=='编辑') //哇靠!从总览界面传回来的编辑申请。
if(isset($edit_arr['stuff'][$i])) ${'uvs'.$i} = $edit_arr['stuff'][$i];
if(isset($edit_arr['result'][4][$i])) ${'uvrsk'.$i} = $edit_arr['result'][4][$i];
}
$uvrn = $edit_arr['result'][0]; $uvrk = $edit_arr['result'][1]; $uvre = $edit_arr['result'][2]; $uvrs = $edit_arr['result'][3]=='∞' ? 0 : $edit_arr['result'][3];
$uvrn = $edit_arr['result'][0]; $uvrk = $edit_arr['result'][1]; $uvre = $edit_arr['result'][2];
$uvrs = $edit_arr['result'][3]=='∞' ? 0 : $edit_arr['result'][3];
$uvrck = isset($edit_arr['class']) ? $edit_arr['class'] : 'item';
}
error_edit1:
include template('vn_postitem');
......@@ -270,7 +272,7 @@ elseif($vnmode=='postmode')
goto errorlog;
}
//检查参数合法性并打包
$flag = filter_post_mixlist($vsname0,$vsname1,$vsname2,$vsname3,$vsname4,$vrname,$vrk,$vre,$vrs,$vrsk0,$vrsk1,$vrsk2,$vrsk3,$vrsk4);
$flag = filter_post_mixlist($vsname0,$vsname1,$vsname2,$vsname3,$vsname4,$vrname,$vrk,$vre,$vrs,$vrsk0,$vrsk1,$vrsk2,$vrsk3,$vrsk4,$vrck);
if($flag && !is_array($flag) || ((!isset($flag['result'])) || !isset($flag['stuff'])))
{ //参数非法,返回log
$vlog = $flag;
......@@ -433,7 +435,7 @@ function writeover_vn_mixilst($varr=Array())
$vn_mixinfo = Array();
}
$narr = Array();
$narr['class'] = 'VN';
$narr['class'] = isset($varr['class']) ? $varr['class'] : 'item';
foreach($varr as $key=>$arr)
{
if($key == 'stuff')
......@@ -479,9 +481,9 @@ function unlock_vn_cache_file()
}
//检查输入的素材合法性。非法返回log,合法返回一个打包好的数组。
function filter_post_mixlist($vsname0,$vsname1,$vsname2,$vsname3,$vsname4,$vrname,$vrk,$vre,$vrs,$vrsk0,$vrsk1,$vrsk2,$vrsk3,$vrsk4)
function filter_post_mixlist($vsname0,$vsname1,$vsname2,$vsname3,$vsname4,$vrname,$vrk,$vre,$vrs,$vrsk0,$vrsk1,$vrsk2,$vrsk3,$vrsk4,$vrck)
{
global $gmflag,$temp_vn_iteminfo,$temp_vn_itemspkinfo,$result_tips;
global $gmflag,$temp_vn_iteminfo,$temp_vn_itemspkinfo,$result_tips,$vrclassinfo;
$vlog = ''; $slist = Array(); $sklist = Array();
//检查道具用途
if(!isset($vrk) || !isset($temp_vn_iteminfo[$vrk]))
......@@ -489,6 +491,11 @@ function filter_post_mixlist($vsname0,$vsname1,$vsname2,$vsname3,$vsname4,$vrnam
$vlog = '<span class="red">错误:输入了无效的'.$result_tips[1].'。</span><br>';
return $vlog;
}
if(!isset($vrck) || !isset($vrclassinfo[$vrck]))
{
$vlog = '<span class="red">错误:输入了无效的'.$result_tips[9].'。</span><br>';
return $vlog;
}
//检查道具效果、耐久
if($vre<1 || $vre>16777214)
{
......@@ -541,6 +548,8 @@ function filter_post_mixlist($vsname0,$vsname1,$vsname2,$vsname3,$vsname4,$vrnam
}
//通过合法性检测 导入新配方
$newarr = Array();
//导入合成分类
$newarr['class'] = $vrck;
//导入合成素材
foreach($slist as $st) $newarr['stuff'][] = $st;
//导入合成结果
......
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