開啟檔案wog/class/wog_act_shop.php
In buy() Function
尋找
- 代碼: 選擇全部
$check_tiem=$DB_site->query_first("select d_id from ".$temp["table"]." where d_id=".$_POST["adds"]." and d_dbst=1");
if($check_tiem)
{
alertWindowMsg($lang['wog_act_errwork']);
unset($check_tiem);
}
改為
- 代碼: 選擇全部
$check_item=$DB_site->query_first("select a.d_id,a.d_dbst,a.d_mstr,a.d_msmart,a.d_magl,b.p_str,b.p_smart,b.p_agl from ".$temp["table"]." a,wog_player b where a.d_id=".$_POST["adds"]." and b.p_id=".$user_id);
if($check_item['d_dbst'] == 1 || !$check_item['d_id'])
{
alertWindowMsg($lang['wog_act_errwork']);
unset($check_item);
}
if($check_item['d_mstr'] > $check_item['p_str'] || $check_item['d_msmart'] > $check_item['p_smart'] || $check_item['d_magl'] > $check_item['p_agl'])
{
alertWindowMsg('能力不足,無法購買');
unset($check_tiem);
}
這樣就可以囉~