開啟檔案 wog/class/wog_act_arm.php
尋找
- 代碼: 選擇全部
function arm_sale($user_id)
{
..........
..........
..........
}
之後,加上
- 代碼: 選擇全部
[color=red] function arm_demount($user_id)
{
global $DB_site,$_POST,$a_id,$temp_ss,$lang,$wog_arry,$wog_item_tool;
if(empty($_POST["pay_id"]))
{
alertWindowMsg($lang["wog_act_arm_noarm"]);
}
$p=$DB_site->query_first("SELECT a.".$_POST['pay_id']." AS item,b.".$_POST['pay_id']." AS eq,b.p_bag FROM wog_item a,wog_player b WHERE a.p_id=".$user_id." AND b.p_id=".$user_id);
if(!$p['eq'])
{
alertWindowMsg($lang["wog_act_arm_noarm"]);
}
check_type($p['eq']);
$p['item']=$wog_item_tool->item_in(explode(',',$p['item']),$p['eq'],1);
if($a_id=="d_item_id")
{
$bag=$wog_arry["item_limit"]+$p['p_bag'];
}else
{
$bag=$wog_arry["item_limit"];
}
if(count($p['item']) > $bag)
{
alertWindowMsg($lang['wog_act_bid_full']);
}
$p['item']=implode(',',$p['item']);
$eq=$DB_site->query_first("SELECT d_at,d_mat,d_df,d_mdf,d_agl,d_g_bag FROM wog_df WHERE d_id=".$p['eq']);
$DB_site->query("UPDATE wog_player SET ".$_POST['pay_id']."='',p_at=p_at-".$eq['d_at'].",p_mat=p_mat-".$eq['d_mat'].",p_df=p_df-".$eq['d_df'].",p_mdf=p_mdf-".$eq['d_mdf'].",p_agl=p_agl-".$eq['d_agl'].",p_bag=p_bag-".$eq['d_g_bag']." WHERE p_id=".$user_id);
$DB_site->query("UPDATE wog_item SET ".$_POST['pay_id']."='".$p['item']."' WHERE p_id=".$user_id);
showscript("parent.arm_setup('".$_POST['pay_id']."','');parent.job_end(11);");
}[/color]
開啟檔案 wog/wog.js
In arm_view() Function
尋找
- 代碼: 選擇全部
<input type="submit" value="裝備">
後方,加上
- 代碼: 選擇全部
[color=red] <input type="button" value="卸下" onclick="parent.foot_trun(\'arm\',\'demount\',\''+temp_id+'\')">[/color]
開啟檔案 wog/wog_act.php
尋找
- 代碼: 選擇全部
case "sale":
$wog_act_class->arm_sale($HTTP_COOKIE_VARS["wog_cookie"]);
break;
之後,加上
- 代碼: 選擇全部
[color=red] case "demount":
$wog_act_class->arm_demount($HTTP_COOKIE_VARS["wog_cookie"]);
break;[/color]
儲存、關閉所有檔案
完成~這次因為V3中有內建一些部分所以修改少了些
有任何問題請提出謝謝