Changeset 142 for minimanager/creature.php
- Timestamp:
- Nov 23, 2007, 11:29:33 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/creature.php
r19 r142 7 7 * Email: ***** 8 8 * License: GNU General Public License v2(GPL) 9 * modded by melefire for rev 4500 and up 9 10 */ 10 11 require_once("header.php"); … … 59 60 60 61 $output .= "<center> 61 <fieldset style=\"width: 760px;\">62 <fieldset class=\"full_frame\"> 62 63 <legend>{$lang_creature['search_template']}</legend><br /> 63 64 <form action=\"creature.php?action=do_search&error=2\" method=\"post\" name=\"form\"> … … 75 76 <td>{$lang_creature['health']}:</td> 76 77 <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> 79 80 </tr> 80 81 <tr> … … 190 191 ($_POST['npcflag'] === '')&&($_POST['type'] === '')&&($_POST['rank'] === '')&&($_POST['family'] === '') 191 192 &&(!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'] === '') 193 194 &&(!isset($_POST['custom_search'])||$_POST['custom_search'] === '')) { 194 195 redirect("creature.php?error=1"); … … 206 207 if ($_POST['level'] != '') $level = $sql->quote_smart($_POST['level']); 207 208 if ($_POST['health'] != '') $health = $sql->quote_smart($_POST['health']); 208 if ($_POST['faction '] != '') $faction = $sql->quote_smart($_POST['faction']);209 if ($_POST['faction_A'] != '') $faction = $sql->quote_smart($_POST['faction_A']); 209 210 if ($_POST['spell'] != '') $spell = $sql->quote_smart($_POST['spell']); 210 211 if ($_POST['lootid'] != '') $lootid = $sql->quote_smart($_POST['lootid']); … … 219 220 if(isset($level)) $where .= "AND minlevel <= $level AND maxlevel >= $level "; 220 221 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' "; 222 223 if(isset($lootid)) $where .= "AND lootid = '$lootid' "; 223 224 if(isset($ScriptName)) $where .= "AND ScriptName LIKE '%$ScriptName%' "; … … 273 274 //######################################################################################################################## 274 275 function 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; 276 278 277 279 $output .= "<script type=\"text/javascript\" src=\"js/tab.js\"></script> … … 341 343 </tr> 342 344 <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> 345 347 346 348 <td>".makeinfocell($lang_creature['type'],$lang_creature['type_desc'])."</td> … … 451 453 <tr> 452 454 <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> 454 456 455 457 <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> 460 459 </tr> 461 460 … … 492 491 </tr> 493 492 <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> 496 506 </tr> 497 507 … … 543 553 <tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['models']}:</td></tr> 544 554 <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> 550 560 </tr> 551 561 <tr> … … 680 690 function edit() { 681 691 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; 683 693 684 694 if (!isset($_GET['entry'])) redirect("creature.php?error=1"); … … 798 808 799 809 <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>"; 802 812 unset($rank); 803 813 … … 875 885 <option value=\"2\" {$trainer_type[2]}>2 - {$lang_creature['trade_skill']}</option> 876 886 <option value=\"3\" {$trainer_type[3]}>3 - {$lang_creature['pets']}</option> 877 </select></td> 887 </select></td> 878 888 </tr> 879 889 <tr>"; … … 950 960 <tr> 951 961 <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> 953 963 954 964 <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> 959 966 </tr> 960 967 … … 991 998 </tr> 992 999 <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> 997 1020 <tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['spells']}:</td></tr> 998 1021 … … 1041 1064 <tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['models']}:</td></tr> 1042 1065 <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> 1048 1071 </tr> 1049 1072 <tr> … … 1185 1208 $row_flag = 0; 1186 1209 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 1187 $result1 = $sql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount, quest_freeforallFROM 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"); 1188 1211 while ($item = $sql->fetch_row($result1)){ 1189 1212 $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]"; 1191 1214 $output .= "<td>"; 1192 1215 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"icon_border\" alt=\"\" />", "$item_datasite$item[0]", $tooltip, "item_tooltip"); … … 1217 1240 <td>".makeinfocell($lang_creature['max_count'],$lang_creature['max_count_desc'])."</td> 1218 1241 <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> 1221 1252 </tr> 1222 1253 </table><br />{$lang_creature['check_to_delete']}<br /><br /> … … 1359 1390 $row_flag = 0; 1360 1391 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 1361 $result1 = $sql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount, quest_freeforallFROM 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"); 1362 1393 while ($item = $sql->fetch_row($result1)){ 1363 1394 $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]"; 1365 1396 $output .= "<td>"; 1366 1397 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"icon_border\" alt=\"\" />", "$item_datasite$item[0]", $tooltip, "item_tooltip"); … … 1391 1422 <td>".makeinfocell($lang_creature['max_count'],$lang_creature['max_count_desc'])."</td> 1392 1423 <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> 1395 1434 </tr> 1396 1435 </table><br />{$lang_creature['check_to_delete']}<br /><br /> … … 1408 1447 $row_flag = 0; 1409 1448 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 1410 $result1 = $sql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount, quest_freeforallFROM 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"); 1411 1450 while ($item = $sql->fetch_row($result1)){ 1412 1451 $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]"; 1414 1453 $output .= "<td>"; 1415 1454 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"icon_border\" alt=\"\" />", "$item_datasite$item[0]", $tooltip, "item_tooltip"); … … 1440 1479 <td>".makeinfocell($lang_creature['max_count'],$lang_creature['max_count_desc'])."</td> 1441 1480 <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> 1444 1491 </tr> 1445 1492 </table><br />{$lang_creature['check_to_delete']}<br /><br /> … … 1476 1523 //DO UPDATE CREATURE TEMPLATE 1477 1524 //######################################################################################################################## 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! 1478 1528 function do_update() { 1479 1529 global $mangos_db, $realm_id; … … 1486 1536 1487 1537 $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; 1492 1542 if (isset($_POST['name']) && $_POST['name'] != '') $name = $sql->quote_smart($_POST['name']); 1493 1543 else $name = ""; … … 1508 1558 if (isset($_POST['armor']) && $_POST['armor'] != '') $armor = $sql->quote_smart($_POST['armor']); 1509 1559 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; 1512 1564 if (isset($_POST['npcflag'])) $npcflag = $sql->quote_smart($_POST['npcflag']); 1513 1565 else $npcflag = 0; … … 1520 1572 if (isset($_POST['maxdmg']) && $_POST['maxdmg'] != '') $maxdmg = $sql->quote_smart($_POST['maxdmg']); 1521 1573 else $maxdmg = 0; 1574 if (isset($_POST['dmgschool']) && $_POST['dmgschool'] != '') $dmgschool = $sql->quote_smart($_POST['dmgschool']); 1575 else $dmgschool = 0; 1522 1576 if (isset($_POST['attackpower']) && $_POST['attackpower'] != '') $attackpower = $sql->quote_smart($_POST['attackpower']); 1523 1577 else $attackpower = 0; … … 1530 1584 if (isset($_POST['dynamicflags']) && $_POST['dynamicflags'] != '') $dynamicflags = $sql->quote_smart($_POST['dynamicflags']); 1531 1585 else $dynamicflags = 0; 1532 if (isset($_POST['size']) && $_POST['size'] != '') $size = $sql->quote_smart($_POST['size']);1533 else $size = 0;1534 1586 if (isset($_POST['family']) && $_POST['family'] != '') $family = $sql->quote_smart($_POST['family']); 1535 1587 else $family = 0; … … 1625 1677 if (isset($_POST['maxcount']) && $_POST['maxcount'] != '') $maxcount = $sql->quote_smart($_POST['maxcount']); 1626 1678 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; 1629 1688 if (isset($_POST['item']) && $_POST['item'] != '') $item = $sql->quote_smart($_POST['item']); 1630 1689 else $item = 0; … … 1658 1717 if (isset($_POST['skin_maxcount']) && $_POST['skin_maxcount'] != '') $skin_maxcount = $sql->quote_smart($_POST['skin_maxcount']); 1659 1718 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 1662 1729 if (isset($_POST['skin_item']) && $_POST['skin_item'] != '') $skin_item = $sql->quote_smart($_POST['skin_item']); 1663 1730 else $skin_item = 0; … … 1673 1740 if (isset($_POST['pp_maxcount']) && $_POST['pp_maxcount'] != '') $pp_maxcount = $sql->quote_smart($_POST['pp_maxcount']); 1674 1741 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; 1677 1751 if (isset($_POST['pp_item']) && $_POST['pp_item'] != '') $pp_item = $sql->quote_smart($_POST['pp_item']); 1678 1752 else $pp_item = 0; … … 1714 1788 1715 1789 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, 1722 1795 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', 1730 1802 '$resistance3', '$resistance4', '$resistance5', '$resistance6', '$spell1', '$spell2', '$spell3', '$spell4', 1731 1803 '$mingold', '$maxgold', '$AIName', '$MovementType', '$InhabitType', '$RacialLeader', '$ScriptName' )"; … … 1737 1809 $result = $sql->query("SELECT * FROM creature_template WHERE entry = '$entry'"); 1738 1810 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',"; 1741 1813 if ($mob_templ['name'] != $name) $sql_query .= "name='$name',"; 1742 1814 if ($mob_templ['subname'] != $subname) $sql_query .= "subname='$subname',"; … … 1748 1820 if ($mob_templ['maxmana'] != $maxmana) $sql_query .= "maxmana='$maxmana',"; 1749 1821 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',"; 1751 1824 if ($mob_templ['npcflag'] != $npcflag) $sql_query .= "npcflag='$npcflag',"; 1752 1825 if ($mob_templ['speed'] != $speed) $sql_query .= "speed='$speed',"; … … 1754 1827 if ($mob_templ['mindmg'] != $mindmg) $sql_query .= "mindmg='$mindmg',"; 1755 1828 if ($mob_templ['maxdmg'] != $maxdmg) $sql_query .= "maxdmg='$maxdmg',"; 1829 if ($mob_templ['dmgschool'] != $dmgschool) $sql_query .= "dmgschool='$dmgschool',"; 1756 1830 if ($mob_templ['attackpower'] != $attackpower) $sql_query .= "attackpower='$attackpower',"; 1757 1831 if ($mob_templ['baseattacktime'] != $baseattacktime) $sql_query .= "baseattacktime='$baseattacktime',"; … … 1759 1833 if ($mob_templ['flags'] != $flags) $sql_query .= "flags='$flags',"; 1760 1834 if ($mob_templ['dynamicflags'] != $dynamicflags) $sql_query .= "dynamicflags='$dynamicflags',"; 1761 if ($mob_templ['size'] != $size) $sql_query .= "size='$size',";1762 1835 if ($mob_templ['family'] != $family) $sql_query .= "family='$family',"; 1763 1836 if ($mob_templ['bounding_radius'] != $bounding_radius) $sql_query .= "bounding_radius='$bounding_radius',"; … … 1769 1842 if ($mob_templ['maxrangedmg'] != $maxrangedmg) $sql_query .= "maxrangedmg='$maxrangedmg',"; 1770 1843 if ($mob_templ['rangedattackpower'] != $rangedattackpower) $sql_query .= "rangedattackpower='$rangedattackpower',"; 1771 if ($mob_templ['combat_reach'] != $combat_reach) $sql_query .= "combat_reach='$combat_reach',";1772 1844 if ($mob_templ['type'] != $type) $sql_query .= "type='$type',"; 1773 1845 if ($mob_templ['civilian'] != $civilian) $sql_query .= "civilian='$civilian',"; … … 1830 1902 1831 1903 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"; 1834 1906 } 1835 1907 … … 1840 1912 1841 1913 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"; 1844 1916 } 1845 1917 … … 1850 1922 1851 1923 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"; 1854 1926 } 1855 1927
Note:
See TracChangeset
for help on using the changeset viewer.