filtered creatures table

This commit is contained in:
Ulf Gebhardt 2013-09-30 00:47:36 +02:00
parent e73f4e8b3c
commit 975ae59542
2 changed files with 19 additions and 87 deletions

View File

@ -1,6 +1,7 @@
<?php
class saimod_mojotrollz_db_command extends \SYSTEM\SAI\SaiModule {
public static function sai_mod_saimod_mojotrollz_db_command(){
$con = new \SYSTEM\DB\Connection(new \DBD\mangos_world());
$res = $con->query('SELECT * FROM creature_template LIMIT 100;');
@ -143,7 +144,7 @@ class saimod_mojotrollz_db_command extends \SYSTEM\SAI\SaiModule {
</tr>';
}
$result .= '</table>';
return $result;}
return $result;}
public static function html_li_menu(){return '<li><a href="#" saimenu="saimod_mojotrollz_db_command">DB:Commands</a></li><li class="divider"></li>';}
public static function right_public(){return false;}
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);}

View File

@ -6,34 +6,16 @@ class saimod_mojotrollz_db_creature extends \SYSTEM\SAI\SaiModule {
$result = '<table><tr>
<th>entry</th>
<th>KillCredit1</th>
<th>KillCredit2</th>
<th>modelid_1</th>
<th>modelid_2</th>
<th>name</th>
<th>subname</th>
<th>gossip_menu_id</th>
<th>subname</th>
<th>minlevel</th>
<th>maxlevel</th>
<th>minhealth</th>
<th>maxhealth</th>
<th>minmana</th>
<th>maxmana</th>
<th>armor</th>
<th>maxlevel</th>
<th>faction_A</th>
<th>faction_H</th>
<th>npcflag</th>
<th>speed_walk</th>
<th>speed_run</th>
<th>scale</th>
<th>rank</th>
<th>mindmg</th>
<th>maxdmg</th>
<th>dmgschool</th>
<th>attackpower</th>
<th>dmg_multiplier</th>
<th>baseattacktime</th>
<th>rangeattacktime</th>
<th>npcflag</th>
<th>rank</th>
<th>unit_class</th>
<th>unit_flags</th>
<th>dynamicflags</th>
@ -41,68 +23,33 @@ class saimod_mojotrollz_db_creature extends \SYSTEM\SAI\SaiModule {
<th>trainer_type</th>
<th>trainer_spell</th>
<th>trainer_class</th>
<th>trainer_race</th>
<th>minrangedmg</th>
<th>maxrangedmg</th>
<th>rangedattackpower</th>
<th>trainer_race</th>
<th>type</th>
<th>type_flags</th>
<th>lootid</th>
<th>pickpocketloot</th>
<th>skinloot</th>
<th>resistance1</th>
<th>resistance2</th>
<th>resistance3</th>
<th>resistance4</th>
<th>resistance5</th>
<th>resistance6</th>
<th>PetSpellDataId</th>
<th>mingold</th>
<th>maxgold</th>
<th>type_flags</th>
<th>AIName</th>
<th>MovementType</th>
<th>InhabitType</th>
<th>Civilian</th>
<th>RacialLeader</th>
<th>RegenHealth</th>
<th>RacialLeader</th>
<th>equipment_id</th>
<th>trainer_id</th>
<th>vendor_id</th>
<th>mechanic_immune_mask</th>
<th>vendor_id</th>
<th>flags_extra</th>
<th>ScriptName</th>
</tr>';
while($row = $res->next()){
$result .= '<tr>
<td>'.$row['entry'].'</td>
<td>'.$row['KillCredit1'].'</td>
<td>'.$row['KillCredit2'].'</td>
<td>'.$row['entry'].'</td>
<td>'.$row['modelid_1'].'</td>
<td>'.$row['modelid_2'].'</td>
<td>'.$row['name'].'</td>
<td>'.$row['subname'].'</td>
<td>'.$row['gossip_menu_id'].'</td>
<td>'.$row['subname'].'</td>
<td>'.$row['minlevel'].'</td>
<td>'.$row['maxlevel'].'</td>
<td>'.$row['minhealth'].'</td>
<td>'.$row['maxhealth'].'</td>
<td>'.$row['minmana'].'</td>
<td>'.$row['maxmana'].'</td>
<td>'.$row['armor'].'</td>
<td>'.$row['maxlevel'].'</td>
<td>'.$row['faction_A'].'</td>
<td>'.$row['faction_H'].'</td>
<td>'.$row['npcflag'].'</td>
<td>'.$row['speed_walk'].'</td>
<td>'.$row['speed_run'].'</td>
<td>'.$row['scale'].'</td>
<td>'.$row['rank'].'</td>
<td>'.$row['mindmg'].'</td>
<td>'.$row['maxdmg'].'</td>
<td>'.$row['dmgschool'].'</td>
<td>'.$row['attackpower'].'</td>
<td>'.$row['dmg_multiplier'].'</td>
<td>'.$row['baseattacktime'].'</td>
<td>'.$row['rangeattacktime'].'</td>
<td>'.$row['npcflag'].'</td>
<td>'.$row['rank'].'</td>
<td>'.$row['unit_class'].'</td>
<td>'.$row['unit_flags'].'</td>
<td>'.$row['dynamicflags'].'</td>
@ -110,30 +57,14 @@ class saimod_mojotrollz_db_creature extends \SYSTEM\SAI\SaiModule {
<td>'.$row['trainer_type'].'</td>
<td>'.$row['trainer_spell'].'</td>
<td>'.$row['trainer_class'].'</td>
<td>'.$row['trainer_race'].'</td>
<td>'.$row['minrangedmg'].'</td>
<td>'.$row['maxrangedmg'].'</td>
<td>'.$row['rangedattackpower'].'</td>
<td>'.$row['trainer_race'].'</td>
<td>'.$row['type'].'</td>
<td>'.$row['type_flags'].'</td>
<td>'.$row['lootid'].'</td>
<td>'.$row['pickpocketloot'].'</td>
<td>'.$row['skinloot'].'</td>
<td>'.$row['resistance1'].'</td>
<td>'.$row['resistance2'].'</td>
<td>'.$row['resistance3'].'</td>
<td>'.$row['resistance4'].'</td>
<td>'.$row['resistance5'].'</td>
<td>'.$row['resistance6'].'</td>
<td>'.$row['PetSpellDataId'].'</td>
<td>'.$row['mingold'].'</td>
<td>'.$row['maxgold'].'</td>
<td>'.$row['type_flags'].'</td>
<td>'.$row['AIName'].'</td>
<td>'.$row['MovementType'].'</td>
<td>'.$row['InhabitType'].'</td>
<td>'.$row['Civilian'].'</td>
<td>'.$row['RacialLeader'].'</td>
<td>'.$row['RegenHealth'].'</td>
<td>'.$row['RacialLeader'].'</td>
<td>'.$row['equipment_id'].'</td>
<td>'.$row['trainer_id'].'</td>
<td>'.$row['vendor_id'].'</td>
@ -143,7 +74,7 @@ class saimod_mojotrollz_db_creature extends \SYSTEM\SAI\SaiModule {
</tr>';
}
$result .= '</table>';
return $result;}
return $result;}
public static function html_li_menu(){return '<li><a href="#" saimenu="saimod_mojotrollz_db_creature">DB:Creatures</a></li><li class="divider"></li>';}
public static function right_public(){return false;}
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);}