Ignore:
Timestamp:
Nov 23, 2007, 11:29:33 PM (17 years ago)
Author:
george
Message:

Minimanager 0.1.5b

File:
1 edited

Legend:

Unmodified
Added
Removed
  • minimanager/creature.php

    r19 r142  
    77 * Email: *****
    88 * License: GNU General Public License v2(GPL)
     9 * modded by melefire for rev 4500 and up
    910 */
    1011require_once("header.php");
     
    5960
    6061 $output .= "<center>
    61  <fieldset style=\"width: 760px;\">
     62 <fieldset class=\"full_frame\">
    6263        <legend>{$lang_creature['search_template']}</legend><br />
    6364        <form action=\"creature.php?action=do_search&amp;error=2\" method=\"post\" name=\"form\">
     
    7576                <td>{$lang_creature['health']}:</td>
    7677                <td><input type=\"text\" size=\"10\" maxlength=\"5\" name=\"health\" /></td>
    77                 <td>{$lang_creature['faction']}:</td>
    78                 <td><input type=\"text\" size=\"10\" maxlength=\"4\" name=\"faction\" /></td>
     78                <td>{$lang_creature['faction_A']}:</td>
     79                <td><input type=\"text\" size=\"10\" maxlength=\"4\" name=\"faction_A\" /></td>
    7980        </tr>
    8081        <tr>
     
    190191        ($_POST['npcflag'] === '')&&($_POST['type'] === '')&&($_POST['rank'] === '')&&($_POST['family'] === '')
    191192        &&(!isset($_POST['entry'])||$_POST['entry'] === '')&&(!isset($_POST['name'])||$_POST['name'] === '')&&(!isset($_POST['level'])||$_POST['level'] === '')&&(!isset($_POST['health'])||$_POST['health'] === '')
    192         &&(!isset($_POST['faction'])||$_POST['faction'] === '')&&(!isset($_POST['spell'])||$_POST['spell'] === '')&&(!isset($_POST['lootid'])||$_POST['lootid'] === '')&&(!isset($_POST['ScriptName'])||$_POST['ScriptName'] === '')
     193        &&(!isset($_POST['faction_A'])||$_POST['faction_A'] === '')&&(!isset($_POST['spell'])||$_POST['spell'] === '')&&(!isset($_POST['lootid'])||$_POST['lootid'] === '')&&(!isset($_POST['ScriptName'])||$_POST['ScriptName'] === '')
    193194        &&(!isset($_POST['custom_search'])||$_POST['custom_search'] === '')) {
    194195        redirect("creature.php?error=1");
     
    206207if ($_POST['level'] != '') $level = $sql->quote_smart($_POST['level']);
    207208if ($_POST['health'] != '') $health = $sql->quote_smart($_POST['health']);
    208 if ($_POST['faction'] != '') $faction = $sql->quote_smart($_POST['faction']);
     209if ($_POST['faction_A'] != '') $faction = $sql->quote_smart($_POST['faction_A']);
    209210if ($_POST['spell'] != '') $spell = $sql->quote_smart($_POST['spell']);
    210211if ($_POST['lootid'] != '') $lootid = $sql->quote_smart($_POST['lootid']);
     
    219220 if(isset($level)) $where .= "AND minlevel <= $level AND maxlevel >= $level ";
    220221 if(isset($health)) $where .= "AND minhealth <= $health AND maxhealth >= $health ";
    221  if(isset($faction)) $where .= "AND faction = '$faction' ";
     222 if(isset($faction_A)) $where .= "AND faction = '$faction_A' ";
    222223 if(isset($lootid)) $where .= "AND lootid = '$lootid' ";
    223224 if(isset($ScriptName)) $where .= "AND ScriptName LIKE '%$ScriptName%' ";
     
    273274//########################################################################################################################
    274275function add_new() {
    275  global $lang_global, $lang_creature, $lang_item, $lang_creature, $output, $item_datasite, $lang_id_tab;
     276 global $lang_global, $lang_creature, $lang_item, $lang_creature, $output, $item_datasite,
     277                $lang_id_tab, $lang_item;
    276278
    277279 $output .= "<script type=\"text/javascript\" src=\"js/tab.js\"></script>
     
    341343</tr>
    342344<tr>
    343  <td>".makeinfocell($lang_creature['faction'],$lang_creature['faction_desc'])."</td>
    344  <td colspan=\"2\"><input type=\"text\" name=\"faction\" size=\"14\" maxlength=\"10\" value=\"0\" /></td>
     345 <td>".makeinfocell($lang_creature['faction_A'],$lang_creature['faction_A_desc'])."</td>
     346 <td colspan=\"2\"><input type=\"text\" name=\"faction_A\" size=\"14\" maxlength=\"10\" value=\"0\" /></td>
    345347
    346348 <td>".makeinfocell($lang_creature['type'],$lang_creature['type_desc'])."</td>
     
    451453         <tr>
    452454          <td>".makeinfocell($lang_creature['armor'],$lang_creature['armor_desc'])."</td>
    453           <td><input type=\"text\" name=\"armor\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
     455          <td colspan=\"2\"><input type=\"text\" name=\"armor\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    454456         
    455457          <td>".makeinfocell($lang_creature['speed'],$lang_creature['speed_desc'])."</td>
    456           <td><input type=\"text\" name=\"speed\" size=\"8\" maxlength=\"45\" value=\"1\" /></td>
    457  
    458           <td>".makeinfocell($lang_creature['size'],$lang_creature['size_desc'])."</td>
    459           <td><input type=\"text\" name=\"size\" size=\"8\" maxlength=\"45\" value=\"1\" /></td>
     458          <td colspan=\"2\"><input type=\"text\" name=\"speed\" size=\"8\" maxlength=\"45\" value=\"1\" /></td>
    460459 </tr>
    461460 
     
    492491 </tr>
    493492 <tr>
    494           <td colspan=\"3\">".makeinfocell($lang_creature['bounding_radius'],$lang_creature['bounding_radius_desc'])."</td>
    495           <td colspan=\"3\"><input type=\"text\" name=\"bounding_radius\" size=\"14\" maxlength=\"45\" value=\"2\" /></td>
     493          <td>".makeinfocell($lang_creature['bounding_radius'],$lang_creature['bounding_radius_desc'])."</td>
     494          <td colspan=\"2\"><input type=\"text\" name=\"bounding_radius\" size=\"14\" maxlength=\"45\" value=\"2\" /></td>
     495         
     496          <td>".makeinfocell($lang_creature['dmgschool'],$lang_creature['dmgschool_desc'])."</td>
     497           <td colspan=\"2\"><select name=\"dmgschool\">
     498                <option value=\"0\">0: {$lang_item['physical_dmg']}</option>
     499                <option value=\"1\">1: {$lang_item['holy_dmg']}</option>
     500                <option value=\"2\">2: {$lang_item['fire_dmg']}</option>
     501                <option value=\"3\">3: {$lang_item['nature_dmg']}</option>
     502                <option value=\"4\">4: {$lang_item['frost_dmg']}</option>
     503                <option value=\"5\">5: {$lang_item['shadow_dmg']}</option>
     504                <option value=\"6\">6: {$lang_item['arcane_dmg']}</option>
     505           </select></td>
    496506 </tr>
    497507 
     
    543553<tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['models']}:</td></tr>
    544554<tr>
    545         <td colspan=\"2\">".makeinfocell($lang_creature['modelid_male'],$lang_creature['modelid_male_desc'])."</td>
    546         <td><input type=\"text\" name=\"modelid_m\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>
    547          
    548         <td colspan=\"2\">".makeinfocell($lang_creature['modelid_female'],$lang_creature['modelid_female_desc'])."</td>
    549         <td><input type=\"text\" name=\"modelid_f\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>
     555        <td colspan=\"2\">".makeinfocell($lang_creature['modelid_Aale'],$lang_creature['modelid_Aale_desc'])."</td>
     556        <td><input type=\"text\" name=\"modelid_A\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>
     557         
     558        <td colspan=\"2\">".makeinfocell($lang_creature['modelid_Hemale'],$lang_creature['modelid_Hemale_desc'])."</td>
     559        <td><input type=\"text\" name=\"modelid_H\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>
    550560</tr>
    551561<tr>
     
    680690function edit() {
    681691 global $lang_global, $lang_creature, $output, $mangos_db, $realm_id, $creature_datasite,$item_datasite,
    682                 $quest_datasite, $lang_id_tab, $spell_datasite;
     692                $quest_datasite, $lang_id_tab, $spell_datasite, $lang_item;
    683693
    684694 if (!isset($_GET['entry'])) redirect("creature.php?error=1");
     
    798808
    799809<tr>
    800  <td>".makeinfocell($lang_creature['faction'],$lang_creature['faction_desc'])."</td>
    801  <td colspan=\"2\"><input type=\"text\" name=\"faction\" size=\"14\" maxlength=\"5\" value=\"{$mob['faction']}\" /></td>";
     810 <td>".makeinfocell($lang_creature['faction_A'],$lang_creature['faction_A_desc'])."</td>
     811 <td colspan=\"2\"><input type=\"text\" name=\"faction_A\" size=\"14\" maxlength=\"5\" value=\"{$mob['faction_A']}\" /></td>";
    802812 unset($rank);
    803813 
     
    875885                <option value=\"2\" {$trainer_type[2]}>2 - {$lang_creature['trade_skill']}</option>
    876886                <option value=\"3\" {$trainer_type[3]}>3 - {$lang_creature['pets']}</option>
    877            </select></td>   
     887           </select></td>
    878888</tr>
    879889<tr>";
     
    950960         <tr>
    951961          <td>".makeinfocell($lang_creature['armor'],$lang_creature['armor_desc'])."</td>
    952           <td><input type=\"text\" name=\"armor\" size=\"8\" maxlength=\"10\" value=\"{$mob['armor']}\" /></td>
     962          <td colspan=\"2\"><input type=\"text\" name=\"armor\" size=\"8\" maxlength=\"10\" value=\"{$mob['armor']}\" /></td>
    953963         
    954964          <td>".makeinfocell($lang_creature['speed'],$lang_creature['speed_desc'])."</td>
    955           <td><input type=\"text\" name=\"speed\" size=\"8\" maxlength=\"45\" value=\"{$mob['speed']}\" /></td>
    956  
    957           <td>".makeinfocell($lang_creature['size'],$lang_creature['size_desc'])."</td>
    958           <td><input type=\"text\" name=\"size\" size=\"8\" maxlength=\"45\" value=\"{$mob['size']}\" /></td>
     965          <td colspan=\"2\"><input type=\"text\" name=\"speed\" size=\"8\" maxlength=\"45\" value=\"{$mob['speed']}\" /></td>
    959966 </tr>
    960967 
     
    991998 </tr>
    992999 <tr>
    993           <td colspan=\"3\">".makeinfocell($lang_creature['bounding_radius'],$lang_creature['bounding_radius_desc'])."</td>
    994           <td colspan=\"3\"><input type=\"text\" name=\"bounding_radius\" size=\"14\" maxlength=\"45\" value=\"{$mob['bounding_radius']}\" /></td>
    995  </tr>
    996  
     1000          <td>".makeinfocell($lang_creature['bounding_radius'],$lang_creature['bounding_radius_desc'])."</td>
     1001          <td colspan=\"2\"><input type=\"text\" name=\"bounding_radius\" size=\"14\" maxlength=\"45\" value=\"{$mob['bounding_radius']}\" /></td>";
     1002         
     1003         
     1004 $dmgschool = array(0 => "", 1 => "", 2 => "", 3 => "", 4 => "", 5 => "", 6 => "");
     1005 $dmgschool[$mob['dmgschool']] = " selected=\"selected\" ";
     1006 
     1007 $output .= "<td>".makeinfocell($lang_creature['dmgschool'],$lang_creature['dmgschool_desc'])."</td>
     1008           <td colspan=\"2\"><select name=\"dmgschool\">
     1009                <option value=\"0\" {$dmgschool[0]}>0: {$lang_item['physical_dmg']}</option>
     1010                <option value=\"1\" {$dmgschool[1]}>1: {$lang_item['holy_dmg']}</option>
     1011                <option value=\"2\" {$dmgschool[2]}>2: {$lang_item['fire_dmg']}</option>
     1012                <option value=\"3\" {$dmgschool[3]}>3: {$lang_item['nature_dmg']}</option>
     1013                <option value=\"4\" {$dmgschool[4]}>4: {$lang_item['frost_dmg']}</option>
     1014                <option value=\"5\" {$dmgschool[5]}>5: {$lang_item['shadow_dmg']}</option>
     1015                <option value=\"6\" {$dmgschool[6]}>6: {$lang_item['arcane_dmg']}</option>
     1016           </select></td>";
     1017 unset($dmgschool);
     1018 
     1019$output .= "</tr>
    9971020<tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['spells']}:</td></tr>
    9981021
     
    10411064<tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['models']}:</td></tr>
    10421065<tr>
    1043         <td colspan=\"2\">".makeinfocell($lang_creature['modelid_male'],$lang_creature['modelid_male_desc'])."</td>
    1044         <td><input type=\"text\" name=\"modelid_m\" size=\"8\" maxlength=\"11\" value=\"{$mob['modelid_m']}\" /></td>
    1045          
    1046         <td colspan=\"2\">".makeinfocell($lang_creature['modelid_female'],$lang_creature['modelid_female_desc'])."</td>
    1047         <td><input type=\"text\" name=\"modelid_f\" size=\"8\" maxlength=\"11\" value=\"{$mob['modelid_f']}\" /></td>
     1066        <td colspan=\"2\">".makeinfocell($lang_creature['modelid_Aale'],$lang_creature['modelid_Aale_desc'])."</td>
     1067        <td><input type=\"text\" name=\"modelid_A\" size=\"8\" maxlength=\"11\" value=\"{$mob['modelid_A']}\" /></td>
     1068         
     1069        <td colspan=\"2\">".makeinfocell($lang_creature['modelid_Hemale'],$lang_creature['modelid_Hemale_desc'])."</td>
     1070        <td><input type=\"text\" name=\"modelid_H\" size=\"8\" maxlength=\"11\" value=\"{$mob['modelid_H']}\" /></td>
    10481071</tr>
    10491072<tr>
     
    11851208        $row_flag = 0;
    11861209        $output .= "<table class=\"hidden\" align=\"center\"><tr>";
    1187         $result1 = $sql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,quest_freeforall FROM creature_loot_template WHERE entry = {$mob['lootid']} ORDER BY ChanceOrRef DESC");
     1210        $result1 = $sql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,freeforall, lootcondition, condition_value1,condition_value2 FROM creature_loot_template WHERE entry = {$mob['lootid']} ORDER BY ChanceOrRef DESC");
    11881211        while ($item = $sql->fetch_row($result1)){
    11891212                $cel_counter++;
    1190                 $tooltip = get_item_name($item[0])." ($item[0])<br />{$lang_creature['drop_chance']}: $item[1]%<br />{$lang_creature['quest_drop_chance']}: $item[2]%<br />{$lang_creature['drop_chance']}: $item[3]-$item[4]<br />{$lang_creature['quest_freeforall']}: $item[5]";
     1213                $tooltip = get_item_name($item[0])." ($item[0])<br />{$lang_creature['drop_chance']}: $item[1]%<br />{$lang_creature['quest_drop_chance']}: $item[2]%<br />{$lang_creature['drop_chance']}: $item[3]-$item[4]<br />{$lang_creature['freeforall']}: $item[5]<br />{$lang_creature['lootcondition']}: $item[6]<br />{$lang_creature['condition_value1']}: $item[7]<br />{$lang_creature['condition_value2']}: $item[8]";
    11911214                $output .= "<td>";
    11921215                $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"icon_border\" alt=\"\" />", "$item_datasite$item[0]", $tooltip, "item_tooltip");
     
    12171240<td>".makeinfocell($lang_creature['max_count'],$lang_creature['max_count_desc'])."</td>
    12181241        <td><input type=\"text\" name=\"maxcount\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>
    1219 <td>".makeinfocell($lang_creature['quest_loot'],$lang_creature['quest_loot_desc'])."</td>
    1220         <td><input type=\"text\" name=\"quest_freeforall\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>
     1242<td>".makeinfocell($lang_creature['freeforall'],$lang_creature['freeforall_desc'])."</td>
     1243        <td><input type=\"text\" name=\"freeforall\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>
     1244</tr>
     1245<tr>
     1246<td>".makeinfocell($lang_creature['lootcondition'],$lang_creature['lootcondition_desc'])."</td>
     1247        <td><input type=\"text\" name=\"lootcondition\" size=\"8\" maxlength=\"3\" value=\"0\" /></td>
     1248<td>".makeinfocell($lang_creature['condition_value1'],$lang_creature['condition_value1_desc'])."</td>
     1249        <td><input type=\"text\" name=\"condition_value1\" size=\"8\" maxlength=\"3\" value=\"0\" /></td>
     1250<td>".makeinfocell($lang_creature['condition_value2'],$lang_creature['condition_value2_desc'])."</td>
     1251        <td><input type=\"text\" name=\"condition_value2\" size=\"8\" maxlength=\"3\" value=\"0\" /></td>
    12211252</tr>
    12221253</table><br />{$lang_creature['check_to_delete']}<br /><br />
     
    13591390        $row_flag = 0;
    13601391        $output .= "<table class=\"hidden\" align=\"center\"><tr>";
    1361         $result1 = $sql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,quest_freeforall FROM skinning_loot_template WHERE entry = {$mob['skinloot']} ORDER BY ChanceOrRef DESC");
     1392        $result1 = $sql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,freeforall, lootcondition, condition_value1, condition_value2 FROM skinning_loot_template WHERE entry = {$mob['skinloot']} ORDER BY ChanceOrRef DESC");
    13621393        while ($item = $sql->fetch_row($result1)){
    13631394                $cel_counter++;
    1364                 $tooltip = get_item_name($item[0])." ($item[0])<br />{$lang_creature['drop_chance']}: $item[1]%<br />{$lang_creature['quest_drop_chance']}: $item[2]%<br />{$lang_creature['drop_chance']}: $item[3]-$item[4]<br />{$lang_creature['quest_freeforall']}: $item[5]";
     1395                $tooltip = get_item_name($item[0])." ($item[0])<br />{$lang_creature['drop_chance']}: $item[1]%<br />{$lang_creature['quest_drop_chance']}: $item[2]%<br />{$lang_creature['drop_chance']}: $item[3]-$item[4]<br />{$lang_creature['freeforall']}: $item[5]<br />{$lang_creature['lootcondition']}: $item[6]<br />{$lang_creature['condition_value1']}: $item[7]<br />{$lang_creature['condition_value2']}: $item[8]";
    13651396                $output .= "<td>";
    13661397                $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"icon_border\" alt=\"\" />", "$item_datasite$item[0]", $tooltip, "item_tooltip");
     
    13911422<td>".makeinfocell($lang_creature['max_count'],$lang_creature['max_count_desc'])."</td>
    13921423        <td><input type=\"text\" name=\"skin_maxcount\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>
    1393 <td>".makeinfocell($lang_creature['quest_loot'],$lang_creature['quest_loot_desc'])."</td>
    1394         <td><input type=\"text\" name=\"skin_quest_freeforall\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>
     1424<td>".makeinfocell($lang_creature['freeforall'],$lang_creature['freeforall_desc'])."</td>
     1425        <td><input type=\"text\" name=\"skin_freeforall\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>
     1426</tr>
     1427<tr>
     1428<td>".makeinfocell($lang_creature['lootcondition'],$lang_creature['lootcondition_desc'])."</td>
     1429        <td><input type=\"text\" name=\"skin_lootcondition\" size=\"8\" maxlength=\"3\" value=\"0\" /></td>
     1430<td>".makeinfocell($lang_creature['condition_value1'],$lang_creature['condition_value1_desc'])."</td>
     1431        <td><input type=\"text\" name=\"skin_condition_value1\" size=\"8\" maxlength=\"3\" value=\"0\" /></td>
     1432<td>".makeinfocell($lang_creature['condition_value2'],$lang_creature['condition_value2_desc'])."</td>
     1433        <td><input type=\"text\" name=\"skin_condition_value2\" size=\"8\" maxlength=\"3\" value=\"0\" /></td>
    13951434</tr>
    13961435</table><br />{$lang_creature['check_to_delete']}<br /><br />
     
    14081447        $row_flag = 0;
    14091448        $output .= "<table class=\"hidden\" align=\"center\"><tr>";
    1410         $result1 = $sql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,quest_freeforall FROM pickpocketing_loot_template WHERE entry = {$mob['pickpocketloot']} ORDER BY ChanceOrRef DESC");
     1449        $result1 = $sql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,freeforall, lootcondition, condition_value1, condition_value2 FROM pickpocketing_loot_template WHERE entry = {$mob['pickpocketloot']} ORDER BY ChanceOrRef DESC");
    14111450        while ($item = $sql->fetch_row($result1)){
    14121451                $cel_counter++;
    1413                 $tooltip = get_item_name($item[0])." ($item[0])<br />{$lang_creature['drop_chance']}: $item[1]%<br />{$lang_creature['quest_drop_chance']}: $item[2]%<br />{$lang_creature['drop_chance']}: $item[3]-$item[4]<br />{$lang_creature['quest_freeforall']}: $item[5]";
     1452                $tooltip = get_item_name($item[0])." ($item[0])<br />{$lang_creature['drop_chance']}: $item[1]%<br />{$lang_creature['quest_drop_chance']}: $item[2]%<br />{$lang_creature['drop_chance']}: $item[3]-$item[4]<br />{$lang_creature['freeforall']}: $item[5]<br />{$lang_creature['lootcondition']}: $item[6]<br />{$lang_creature['condition_value1']}: $item[7]<br />{$lang_creature['condition_value2']}: $item[8]";
    14141453                $output .= "<td>";
    14151454                $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"icon_border\" alt=\"\" />", "$item_datasite$item[0]", $tooltip, "item_tooltip");
     
    14401479<td>".makeinfocell($lang_creature['max_count'],$lang_creature['max_count_desc'])."</td>
    14411480        <td><input type=\"text\" name=\"pp_maxcount\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>
    1442 <td>".makeinfocell($lang_creature['quest_loot'],$lang_creature['quest_loot_desc'])."</td>
    1443         <td><input type=\"text\" name=\"pp_quest_freeforall\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>
     1481<td>".makeinfocell($lang_creature['freeforall'],$lang_creature['freeforall_desc'])."</td>
     1482        <td><input type=\"text\" name=\"pp_freeforall\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>
     1483</tr>
     1484<tr>
     1485<td>".makeinfocell($lang_creature['lootcondition'],$lang_creature['lootcondition_desc'])."</td>
     1486        <td><input type=\"text\" name=\"pp_lootcondition\" size=\"8\" maxlength=\"3\" value=\"0\" /></td>
     1487<td>".makeinfocell($lang_creature['condition_value1'],$lang_creature['condition_value1_desc'])."</td>
     1488        <td><input type=\"text\" name=\"pp_condition_value1\" size=\"8\" maxlength=\"3\" value=\"0\" /></td>
     1489<td>".makeinfocell($lang_creature['condition_value2'],$lang_creature['condition_value2_desc'])."</td>
     1490        <td><input type=\"text\" name=\"pp_condition_value2\" size=\"8\" maxlength=\"3\" value=\"0\" /></td>
    14441491</tr>
    14451492</table><br />{$lang_creature['check_to_delete']}<br /><br />
     
    14761523//DO UPDATE CREATURE TEMPLATE
    14771524//########################################################################################################################
     1525//Now We are going to clone the faction variable to the H faction for newer revision support. (MeleFire)
     1526$faction_A = faction_H;
     1527//Now we are done. Yay!
    14781528function do_update() {
    14791529 global $mangos_db, $realm_id;
     
    14861536
    14871537 $entry = $sql->quote_smart($_POST['entry']);
    1488  if (isset($_POST['modelid_m']) && $_POST['modelid_m'] != '') $modelid_m = $sql->quote_smart($_POST['modelid_m']);
    1489         else $modelid_m = 0;
    1490  if (isset($_POST['modelid_f']) && $_POST['modelid_f'] != '') $modelid_f = $sql->quote_smart($_POST['modelid_f']);
    1491         else $modelid_f = 0;
     1538 if (isset($_POST['modelid_A']) && $_POST['modelid_A'] != '') $modelid_A = $sql->quote_smart($_POST['modelid_A']);
     1539        else $modelid_A = 0;
     1540 if (isset($_POST['modelid_H']) && $_POST['modelid_H'] != '') $modelid_H = $sql->quote_smart($_POST['modelid_H']);
     1541        else $modelid_H = 0;
    14921542 if (isset($_POST['name']) && $_POST['name'] != '') $name = $sql->quote_smart($_POST['name']);
    14931543        else $name = "";
     
    15081558 if (isset($_POST['armor']) && $_POST['armor'] != '') $armor = $sql->quote_smart($_POST['armor']);
    15091559        else $armor = 0;
    1510  if (isset($_POST['faction']) && $_POST['faction'] != '') $faction = $sql->quote_smart($_POST['faction']);
    1511         else $faction = 0;
     1560 if (isset($_POST['faction_A']) && $_POST['faction_A'] != '') $faction_A = $sql->quote_smart($_POST['faction_A']);
     1561        else $faction_A = 0;
     1562 if (isset($_POST['faction_H']) && $_POST['faction_H'] != '') $faction_H = $sql->quote_smart($_POST['faction_H']);
     1563        else $faction_H = 0;
    15121564 if (isset($_POST['npcflag'])) $npcflag = $sql->quote_smart($_POST['npcflag']);
    15131565        else $npcflag = 0;
     
    15201572 if (isset($_POST['maxdmg']) && $_POST['maxdmg'] != '') $maxdmg = $sql->quote_smart($_POST['maxdmg']);
    15211573        else $maxdmg = 0;
     1574 if (isset($_POST['dmgschool']) && $_POST['dmgschool'] != '') $dmgschool = $sql->quote_smart($_POST['dmgschool']);
     1575        else $dmgschool = 0;
    15221576 if (isset($_POST['attackpower']) && $_POST['attackpower'] != '') $attackpower = $sql->quote_smart($_POST['attackpower']);
    15231577        else $attackpower = 0;
     
    15301584 if (isset($_POST['dynamicflags']) && $_POST['dynamicflags'] != '') $dynamicflags = $sql->quote_smart($_POST['dynamicflags']);
    15311585        else $dynamicflags = 0;
    1532  if (isset($_POST['size']) && $_POST['size'] != '') $size = $sql->quote_smart($_POST['size']);
    1533         else $size = 0;
    15341586 if (isset($_POST['family']) && $_POST['family'] != '') $family = $sql->quote_smart($_POST['family']);
    15351587        else $family = 0;
     
    16251677        if (isset($_POST['maxcount']) && $_POST['maxcount'] != '') $maxcount = $sql->quote_smart($_POST['maxcount']);
    16261678                else $maxcount = 0;
    1627         if (isset($_POST['quest_freeforall']) && $_POST['quest_freeforall'] != '') $quest_freeforall = $sql->quote_smart($_POST['quest_freeforall']);
    1628                 else $quest_freeforall = 0;
     1679
     1680        if (isset($_POST['freeforall']) && $_POST['freeforall'] != '') $freeforall = $sql->quote_smart($_POST['freeforall']);
     1681                else $freeforall = 0;
     1682        if (isset($_POST['lootcondition']) && $_POST['lootcondition'] != '') $lootcondition = $sql->quote_smart($_POST['lootcondition']);
     1683                else $lootcondition = 0;
     1684        if (isset($_POST['condition_value1']) && $_POST['condition_value1'] != '') $condition_value1 = $sql->quote_smart($_POST['condition_value1']);
     1685                else $condition_value1 = 0;
     1686        if (isset($_POST['condition_value2']) && $_POST['condition_value2'] != '') $condition_value2 = $sql->quote_smart($_POST['condition_value2']);
     1687                else $condition_value2 = 0;
    16291688        if (isset($_POST['item']) && $_POST['item'] != '') $item = $sql->quote_smart($_POST['item']);
    16301689                else $item = 0;
     
    16581717        if (isset($_POST['skin_maxcount']) && $_POST['skin_maxcount'] != '') $skin_maxcount = $sql->quote_smart($_POST['skin_maxcount']);
    16591718                else $skin_maxcount = 0;
    1660         if (isset($_POST['skin_quest_freeforall']) && $_POST['skin_quest_freeforall'] != '') $skin_quest_freeforall = $sql->quote_smart($_POST['skin_quest_freeforall']);
    1661                 else $skin_quest_freeforall = 0;
     1719
     1720        if (isset($_POST['skin_freeforall']) && $_POST['skin_freeforall'] != '') $skin_freeforall = $sql->quote_smart($_POST['skin_freeforall']);
     1721                else $skin_freeforall = 0;
     1722        if (isset($_POST['skin_lootcondition']) && $_POST['skin_lootcondition'] != '') $skin_lootcondition = $sql->quote_smart($_POST['skin_lootcondition']);
     1723                else $skin_lootcondition = 0;
     1724        if (isset($_POST['skin_condition_value1']) && $_POST['skin_condition_value1'] != '') $skin_condition_value1 = $sql->quote_smart($_POST['skin_condition_value1']);
     1725                else $skin_condition_value1 = 0;
     1726        if (isset($_POST['skin_condition_value2']) && $_POST['skin_condition_value2'] != '') $skin_condition_value2 = $sql->quote_smart($_POST['skin_condition_value2']);
     1727                else $skin_condition_value2 = 0;
     1728
    16621729        if (isset($_POST['skin_item']) && $_POST['skin_item'] != '') $skin_item = $sql->quote_smart($_POST['skin_item']);
    16631730                else $skin_item = 0;
     
    16731740        if (isset($_POST['pp_maxcount']) && $_POST['pp_maxcount'] != '') $pp_maxcount = $sql->quote_smart($_POST['pp_maxcount']);
    16741741                else $pp_maxcount = 0;
    1675         if (isset($_POST['pp_quest_freeforall']) && $_POST['pp_quest_freeforall'] != '') $pp_quest_freeforall = $sql->quote_smart($_POST['pp_quest_freeforall']);
    1676                 else $pp_quest_freeforall = 0;
     1742
     1743        if (isset($_POST['pp_freeforall']) && $_POST['pp_freeforall'] != '') $pp_freeforall = $sql->quote_smart($_POST['pp_freeforall']);
     1744                else $pp_freeforall = 0;
     1745        if (isset($_POST['pp_lootcondition']) && $_POST['pp_lootcondition'] != '') $pp_lootcondition = $sql->quote_smart($_POST['pp_lootcondition']);
     1746                else $pp_lootcondition = 0;
     1747        if (isset($_POST['pp_condition_value1']) && $_POST['pp_condition_value1'] != '') $pp_condition_value1 = $sql->quote_smart($_POST['pp_condition_value1']);
     1748                else $pp_condition_value1 = 0;
     1749        if (isset($_POST['pp_condition_value2']) && $_POST['pp_condition_value2'] != '') $pp_condition_value2 = $sql->quote_smart($_POST['pp_condition_value2']);
     1750                else $pp_condition_value2 = 0;
    16771751        if (isset($_POST['pp_item']) && $_POST['pp_item'] != '') $pp_item = $sql->quote_smart($_POST['pp_item']);
    16781752                else $pp_item = 0;
     
    17141788
    17151789  if ($_POST['opp_type'] == "add_new"){
    1716         $sql_query = "INSERT INTO creature_template ( entry, modelid_m, modelid_f, name, subname, minlevel,
    1717         maxlevel, minhealth, maxhealth, minmana, maxmana, armor, faction, npcflag, speed, rank, mindmg,
    1718         maxdmg, attackpower, baseattacktime, rangeattacktime, flags, dynamicflags, size, family,
    1719         bounding_radius, trainer_type, trainer_spell, class, race, minrangedmg, maxrangedmg, rangedattackpower,
    1720         combat_reach, type, civilian, flag1, equipmodel1, equipmodel2, equipmodel3, equipinfo1, equipinfo2,
    1721         equipinfo3, equipslot1, equipslot2, equipslot3, lootid, pickpocketloot, skinloot, resistance1,
     1790        $sql_query = "INSERT INTO creature_template ( entry, modelid_A, modelid_H, name, subname, minlevel,
     1791        maxlevel, minhealth, maxhealth, minmana, maxmana, armor, faction_A, faction_H, npcflag, speed, rank, mindmg,
     1792        maxdmg, dmgschool, attackpower, baseattacktime, rangeattacktime, flags, dynamicflags, family,
     1793        trainer_type, trainer_spell, class, race, minrangedmg, maxrangedmg, rangedattackpower,
     1794        type, civilian, flag1, lootid, pickpocketloot, skinloot, resistance1,
    17221795        resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4,
    1723         mingold, maxgold, AIName, MovementType, InhabitType, RacialLeader, ScriptName) VALUES ( '$entry', '$modelid_m', '$modelid_f', '$name',
    1724         '$subname', '$minlevel', '$maxlevel', '$minhealth', '$maxhealth', '$minmana', '$maxmana', '$armor', '$faction', '$npcflag',
    1725         '$speed', '$rank', '$mindmg', '$maxdmg', '$attackpower', '$baseattacktime', '$rangeattacktime', '$flags',
    1726         '$dynamicflags', '$size', '$family', '$bounding_radius', '$trainer_type', '$trainer_spell', '$class', '$race',
    1727         '$minrangedmg', '$maxrangedmg', '$rangedattackpower', '$combat_reach', '$type', '$civilian', '$flag1',
    1728         '$equipmodel1', '$equipmodel2', '$equipmodel3', '$equipinfo1', '$equipinfo2', '$equipinfo3', '$equipslot1',
    1729         '$equipslot2', '$equipslot3', '$lootid', '$pickpocketloot', '$skinloot', '$resistance1', '$resistance2',
     1796        mingold, maxgold, AIName, MovementType, InhabitType, RacialLeader, ScriptName) VALUES ( '$entry', '$modelid_A', '$modelid_H', '$name',
     1797        '$subname', '$minlevel', '$maxlevel', '$minhealth', '$maxhealth', '$minmana', '$maxmana', '$armor', '$faction_A', '$faction_A',  '$npcflag',
     1798        '$speed', '$rank', '$mindmg', '$maxdmg', '$dmgschool', '$attackpower', '$baseattacktime', '$rangeattacktime', '$flags',
     1799        '$dynamicflags', '$family', '$trainer_type', '$trainer_spell', '$class', '$race',
     1800        '$minrangedmg', '$maxrangedmg', '$rangedattackpower', '$type', '$civilian', '$flag1',
     1801        '$lootid', '$pickpocketloot', '$skinloot', '$resistance1', '$resistance2',
    17301802        '$resistance3', '$resistance4', '$resistance5', '$resistance6', '$spell1', '$spell2', '$spell3', '$spell4',
    17311803        '$mingold', '$maxgold', '$AIName', '$MovementType', '$InhabitType', '$RacialLeader', '$ScriptName' )";
     
    17371809        $result = $sql->query("SELECT * FROM creature_template WHERE entry = '$entry'");
    17381810        if ($mob_templ = $sql->fetch_assoc($result)){
    1739                 if ($mob_templ['modelid_m'] != $modelid_m) $sql_query .= "modelid_m='$modelid_m',";
    1740                 if ($mob_templ['modelid_f'] != $modelid_f) $sql_query .= "modelid_f='$modelid_f',";
     1811                if ($mob_templ['modelid_A'] != $modelid_A) $sql_query .= "modelid_A='$modelid_A',";
     1812                if ($mob_templ['modelid_H'] != $modelid_H) $sql_query .= "modelid_H='$modelid_H',";
    17411813                if ($mob_templ['name'] != $name) $sql_query .= "name='$name',";
    17421814                if ($mob_templ['subname'] != $subname) $sql_query .= "subname='$subname',";
     
    17481820                if ($mob_templ['maxmana'] != $maxmana) $sql_query .= "maxmana='$maxmana',";
    17491821                if ($mob_templ['armor'] != $armor) $sql_query .= "armor='$armor',";
    1750                 if ($mob_templ['faction'] != $faction) $sql_query .= "faction='$faction',";
     1822                if ($mob_templ['faction_A'] != $faction_A) $sql_query .= "faction_A='$faction_A',";
     1823                if ($mob_templ['faction_H'] != $faction_H) $sql_query .= "faction_H='$faction_H',";
    17511824                if ($mob_templ['npcflag'] != $npcflag) $sql_query .= "npcflag='$npcflag',";
    17521825                if ($mob_templ['speed'] != $speed) $sql_query .= "speed='$speed',";
     
    17541827                if ($mob_templ['mindmg'] != $mindmg) $sql_query .= "mindmg='$mindmg',";
    17551828                if ($mob_templ['maxdmg'] != $maxdmg) $sql_query .= "maxdmg='$maxdmg',";
     1829                if ($mob_templ['dmgschool'] != $dmgschool) $sql_query .= "dmgschool='$dmgschool',";
    17561830                if ($mob_templ['attackpower'] != $attackpower) $sql_query .= "attackpower='$attackpower',";
    17571831                if ($mob_templ['baseattacktime'] != $baseattacktime) $sql_query .= "baseattacktime='$baseattacktime',";
     
    17591833                if ($mob_templ['flags'] != $flags) $sql_query .= "flags='$flags',";
    17601834                if ($mob_templ['dynamicflags'] != $dynamicflags) $sql_query .= "dynamicflags='$dynamicflags',";
    1761                 if ($mob_templ['size'] != $size) $sql_query .= "size='$size',";
    17621835                if ($mob_templ['family'] != $family) $sql_query .= "family='$family',";
    17631836                if ($mob_templ['bounding_radius'] != $bounding_radius) $sql_query .= "bounding_radius='$bounding_radius',";
     
    17691842                if ($mob_templ['maxrangedmg'] != $maxrangedmg) $sql_query .= "maxrangedmg='$maxrangedmg',";
    17701843                if ($mob_templ['rangedattackpower'] != $rangedattackpower) $sql_query .= "rangedattackpower='$rangedattackpower',";
    1771                 if ($mob_templ['combat_reach'] != $combat_reach) $sql_query .= "combat_reach='$combat_reach',";
    17721844                if ($mob_templ['type'] != $type) $sql_query .= "type='$type',";
    17731845                if ($mob_templ['civilian'] != $civilian) $sql_query .= "civilian='$civilian',";
     
    18301902
    18311903        if ($item){
    1832         $sql_query .= "INSERT INTO creature_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, quest_freeforall)
    1833                         VALUES ($lootid,$item,'$ChanceOrRef', '$QuestChanceOrGroup' ,$mincount ,$maxcount ,$quest_freeforall);\n";
     1904        $sql_query .= "INSERT INTO creature_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, freeforall, lootcondition, condition_value1, condition_value2)
     1905                        VALUES ($lootid,$item,'$ChanceOrRef', '$QuestChanceOrGroup' ,$mincount ,$maxcount ,$freeforall ,$lootcondition ,$condition_value1 ,$condition_value2);\n";
    18341906        }
    18351907       
     
    18401912
    18411913        if ($skin_item){
    1842         $sql_query .= "INSERT INTO skinning_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, quest_freeforall)
    1843                         VALUES ($skinloot,$skin_item,'$skin_ChanceOrRef', '$skin_QuestChanceOrGroup' ,$skin_mincount ,$skin_maxcount ,$skin_quest_freeforall);\n";
     1914        $sql_query .= "INSERT INTO skinning_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, freeforall, lootcondition, condition_value1, condition_value2)
     1915                        VALUES ($skinloot,$skin_item,'$skin_ChanceOrRef', '$skin_QuestChanceOrGroup' ,$skin_mincount ,$skin_maxcount ,$skin_freeforall,$skin_lootcondition ,$skin_condition_value1 ,$skin_condition_value2);\n";
    18441916        }
    18451917       
     
    18501922   
    18511923        if ($pp_item){
    1852         $sql_query .= "INSERT INTO pickpocketing_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, quest_freeforall)
    1853                         VALUES ($pickpocketloot,$pp_item,'$pp_ChanceOrRef', '$pp_QuestChanceOrGroup' ,$pp_mincount ,$pp_maxcount ,$pp_quest_freeforall);\n";
     1924        $sql_query .= "INSERT INTO pickpocketing_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, freeforall, lootcondition, condition_value1, condition_value2)
     1925                        VALUES ($pickpocketloot,$pp_item,'$pp_ChanceOrRef', '$pp_QuestChanceOrGroup' ,$pp_mincount ,$pp_maxcount ,$pp_freeforall,$pp_lootcondition ,$pp_condition_value1 ,$pp_condition_value2);\n";
    18541926        }
    18551927
Note: See TracChangeset for help on using the changeset viewer.