[分享]能力不足時無法購買商店物品

WOG設定安裝教學

版主: 涅魂, 簫哥


涅魂
 
文章: 4463
註冊時間: 2004-01-04 11:17 am
來自: Taiwan
性別: 男生

[分享]能力不足時無法購買商店物品

文章涅魂 » 2007-04-21 7:16 pm

這個也不難,下列的程式修改可以供您參考看看^^

開啟檔案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);
      }

這樣就可以囉~



回到 精華區

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 3 位訪客