Ignore:
Timestamp:
Sep 11, 2008, 9:10:27 AM (16 years ago)
Author:
george
Message:
  • Aktualizováno: Minimanager 0.12 rev. 99. Opraveno zobrazování honoru, přidána captcha p?i registraci nového účtu a mini fórum.
  • Přidáno: Český překlad pro Minimanager 0.12.
  • Smazáno: Staré fotky fyzického serveru přesunuty do fotogalerie.
  • Přidáno: Nějaké návody na eventy od bbtrashe.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • minimanager/game_object.php

    r307 r374  
    99 */
    1010require_once("header.php");
    11 valid_login(1);
     11valid_login($action_permission['read']);
    1212
    1313 $go_type = Array(
     
    150150 $where = "WHERE gameobject_template.entry > 0 ";
    151151 if($custom_search != "") $where .= " $custom_search ";
    152  if(isset($entry)) $where .= "AND entry = '$entry' ";
     152 if(isset($entry)) $where .= "AND gameobject_template.entry = '$entry' ";
    153153 if(isset($name)) $where .= "AND IFNULL(".($deplang<>0?"name_loc$deplang":"NULL").",`name`) LIKE '%$name%' ";
    154154 if(isset($type)) $where .= "AND type = '$type' ";
     
    235235 $output .= "</select></td>
    236236 <td>".makeinfocell($lang_game_object['displayId'],$lang_game_object['displayId_desc'])."</td>
    237  <td><input type=\"text\" name=\"displayId\" size=\"10\" maxlength=\"3\" value=\"0\" /></td>
     237 <td><input type=\"text\" name=\"displayId\" size=\"10\" maxlength=\"11\" value=\"0\" /></td>
    238238
    239239</tr>
     
    415415 $output .= "</select></td>
    416416 <td>".makeinfocell($lang_game_object['displayId'],$lang_game_object['displayId_desc'])."</td>
    417  <td><input type=\"text\" name=\"displayId\" size=\"10\" maxlength=\"3\" value=\"{$go['displayId']}\" /></td>
     417 <td><input type=\"text\" name=\"displayId\" size=\"10\" maxlength=\"11\" value=\"{$go['displayId']}\" /></td>
    418418
    419419</tr>
     
    537537        $row_flag = 0;
    538538        $output .= "<table class=\"hidden\" align=\"center\"><tr>";
    539         $result1 = $sql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,freeforall, lootcondition, condition_value1, condition_value2 FROM gameobject_loot_template WHERE entry = {$go['entry']} ORDER BY ChanceOrRef DESC");
     539        $result1 = $sql->query("SELECT item,ChanceOrQuestChance,`groupid`,mincountOrRef,maxcount, lootcondition, condition_value1, condition_value2 FROM gameobject_loot_template WHERE entry = {$go['data1']} ORDER BY ChanceOrQuestChance DESC");
    540540        while ($item = $sql->fetch_row($result1)){
    541541                $cel_counter++;
    542                 $tooltip = get_item_name($item[0])." ($item[0])<br />{$lang_game_object['drop_chance']}: $item[1]%<br />{$lang_game_object['quest_drop_chance']}: $item[2]%<br />{$lang_game_object['drop_chance']}: $item[3]-$item[4]<br />{$lang_game_object['freeforall']}: $item[5]<br />{$lang_game_object['lootcondition']}: $item[6]<br />{$lang_game_object['condition_value1']}: $item[7]<br />{$lang_game_object['condition_value2']}: $item[8]";
     542                $tooltip = get_item_name($item[0])." ($item[0])<br />{$lang_game_object['drop_chance']}: $item[1]%<br />{$lang_game_object['quest_drop_chance']}: $item[2]%<br />{$lang_game_object['drop_chance']}: $item[3]-$item[4]<br />{$lang_game_object['lootcondition']}: $item[5]<br />{$lang_game_object['condition_value1']}: $item[6]<br />{$lang_game_object['condition_value2']}: $item[7]";
    543543                $output .= "<td>";
    544544                $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"icon_border\" alt=\"\" />", "$item_datasite$item[0]", "$tooltip", "item_tooltip", "target=\"_blank\"");
     
    560560        <td><input type=\"text\" name=\"item\" size=\"8\" maxlength=\"10\" value=\"\" /></td>
    561561<td>".makeinfocell($lang_game_object['loot_drop_chance'],$lang_game_object['loot_drop_chance_desc'])."</td>
    562         <td><input type=\"text\" name=\"ChanceOrRef\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>
     562        <td><input type=\"text\" name=\"ChanceOrQuestChance\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>
    563563<td>".makeinfocell($lang_game_object['loot_quest_drop_chance'],$lang_game_object['loot_quest_drop_chance_desc'])."</td>
    564         <td><input type=\"text\" name=\"QuestChanceOrGroup\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
     564        <td><input type=\"text\" name=\"groupid\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    565565</tr>
    566566<tr>
    567567<td>".makeinfocell($lang_game_object['min_count'],$lang_game_object['min_count_desc'])."</td>
    568         <td><input type=\"text\" name=\"mincount\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>
     568        <td><input type=\"text\" name=\"mincountOrRef\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>
    569569<td>".makeinfocell($lang_game_object['max_count'],$lang_game_object['max_count_desc'])."</td>
    570570        <td><input type=\"text\" name=\"maxcount\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>
    571 <td>".makeinfocell($lang_game_object['freeforall'],$lang_game_object['freeforall_desc'])."</td>
    572         <td><input type=\"text\" name=\"freeforall\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>
    573571</tr>
    574572<tr>
     
    722720        else $data23 = 0;
    723721
    724         if (isset($_POST['ChanceOrRef']) && $_POST['ChanceOrRef'] != '') $ChanceOrRef = $sql->quote_smart($_POST['ChanceOrRef']);
    725                 else $ChanceOrRef = 0;
    726         if (isset($_POST['QuestChanceOrGroup']) && $_POST['QuestChanceOrGroup'] != '') $QuestChanceOrGroup = $sql->quote_smart($_POST['QuestChanceOrGroup']);
    727                 else $QuestChanceOrGroup = 0;
    728         if (isset($_POST['mincount']) && $_POST['mincount'] != '') $mincount = $sql->quote_smart($_POST['mincount']);
    729                 else $mincount = 0;
     722        if (isset($_POST['ChanceOrQuestChance']) && $_POST['ChanceOrQuestChance'] != '') $ChanceOrQuestChance = $sql->quote_smart($_POST['ChanceOrQuestChance']);
     723                else $ChanceOrQuestChance = 0;
     724        if (isset($_POST['groupid']) && $_POST['groupid'] != '') $groupid = $sql->quote_smart($_POST['groupid']);
     725                else $groupid = 0;
     726        if (isset($_POST['mincountOrRef']) && $_POST['mincountOrRef'] != '') $mincountOrRef = $sql->quote_smart($_POST['mincountOrRef']);
     727                else $mincountOrRef = 0;
    730728        if (isset($_POST['maxcount']) && $_POST['maxcount'] != '') $maxcount = $sql->quote_smart($_POST['maxcount']);
    731729                else $maxcount = 0;
    732         if (isset($_POST['freeforall']) && $_POST['freeforall'] != '') $freeforall = $sql->quote_smart($_POST['freeforall']);
    733                 else $freeforall = 0;
    734730        if (isset($_POST['lootcondition']) && $_POST['lootcondition'] != '') $lootcondition = $sql->quote_smart($_POST['lootcondition']);
    735731                else $lootcondition = 0;
     
    814810
    815811        if ($item){
    816         $sql_query .= "INSERT INTO gameobject_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, freeforall, lootcondition, condition_value1, condition_value2)
    817                         VALUES ($entry,$item,'$ChanceOrRef', '$QuestChanceOrGroup' ,$mincount ,$maxcount ,$freeforall ,$lootcondition ,$condition_value1 ,$condition_value2);\n";
     812        $sql_query .= "INSERT INTO gameobject_loot_template (entry, item, ChanceOrQuestChance, `groupid`, mincountOrRef, maxcount, lootcondition, condition_value1, condition_value2)
     813                        VALUES ($data1,$item,'$ChanceOrQuestChance', '$groupid' ,$mincountOrRef ,$maxcount ,$lootcondition ,$condition_value1 ,$condition_value2);\n";
    818814        }
    819815
    820816        if ($del_loot_items){
    821817        foreach($del_loot_items as $item_id)
    822                 $sql_query .= "DELETE FROM gameobject_loot_template WHERE entry = $entry AND item = $item_id;\n";
     818                $sql_query .= "DELETE FROM gameobject_loot_template WHERE entry = $data1 AND item = $item_id;\n";
    823819        }
    824820
     
    910906 $sql->query("DELETE FROM gameobject_involvedrelation WHERE id = '$entry'");
    911907 $sql->query("DELETE FROM gameobject_questrelation WHERE id = '$entry'");
    912  $sql->query("DELETE FROM gameobject_loot_template WHERE entry = '$entry'");
     908 $sql->query("DELETE FROM gameobject_loot_template WHERE entry = '$data1'");
    913909 $sql->query("DELETE FROM gameobject_template WHERE entry = '$entry'");
    914910 
Note: See TracChangeset for help on using the changeset viewer.