3 define('UNIT_FLAG_UNK_0', 0x00000001);
4 define('UNIT_FLAG_NON_ATTACKABLE', 0x00000002);
5 define('UNIT_FLAG_DISABLE_MOVE', 0x00000004);
6 define('UNIT_FLAG_PVP_ATTACKABLE', 0x00000008);
7 define('UNIT_FLAG_RENAME', 0x00000010);
8 define('UNIT_FLAG_PREPARATION', 0x00000020);
9 define('UNIT_FLAG_UNK_6', 0x00000040);
10 define('UNIT_FLAG_NOT_ATTACKABLE_1', 0x00000080);
11 define('UNIT_FLAG_OOC_NOT_ATTACKABLE', 0x00000100);
12 define('UNIT_FLAG_PASSIVE', 0x00000200);
13 define('UNIT_FLAG_LOOTING', 0x00000400);
14 define('UNIT_FLAG_PET_IN_COMBAT', 0x00000800);
15 define('UNIT_FLAG_PVP', 0x00001000);
16 define('UNIT_FLAG_SILENCED', 0x00002000);
17 define('UNIT_FLAG_UNK_14', 0x00004000);
18 define('UNIT_FLAG_UNK_15', 0x00008000);
19 define('UNIT_FLAG_UNK_16', 0x00010000);
20 define('UNIT_FLAG_PACIFIED', 0x00020000);
21 define('UNIT_FLAG_STUNNED', 0x00040000);
22 define('UNIT_FLAG_IN_COMBAT', 0x00080000);
23 define('UNIT_FLAG_TAXI_FLIGHT', 0x00100000);
24 define('UNIT_FLAG_DISARMED', 0x00200000);
25 define('UNIT_FLAG_CONFUSED', 0x00400000);
26 define('UNIT_FLAG_FLEEING', 0x00800000);
27 define('UNIT_FLAG_PLAYER_CONTROLLED', 0x01000000);
28 define('UNIT_FLAG_NOT_SELECTABLE', 0x02000000);
29 define('UNIT_FLAG_SKINNABLE', 0x04000000);
30 define('UNIT_FLAG_MOUNT', 0x08000000);
31 define('UNIT_FLAG_UNK_28', 0x10000000);
32 define('UNIT_FLAG_UNK_29', 0x20000000);
33 define('UNIT_FLAG_SHEATHE', 0x40000000);
34 define('UNIT_FLAG_UNK_31', 0x80000000);
36 define('CREATURE_TYPEFLAGS_HERBLOOT', 0x00000100);
37 define('CREATURE_TYPEFLAGS_MININGLOOT', 0x00000200);
38 define('CREATURE_TYPEFLAGS_ENGINEERLOOT', 0x00008000);
40 define('UNIT_NPC_FLAG_NONE', 0x00000000);
41 define('UNIT_NPC_FLAG_GOSSIP', 0x00000001);
42 define('UNIT_NPC_FLAG_QUESTGIVER', 0x00000002);
43 define('UNIT_NPC_FLAG_UNK1', 0x00000004);
44 define('UNIT_NPC_FLAG_UNK2', 0x00000008);
45 define('UNIT_NPC_FLAG_TRAINER', 0x00000010);
46 define('UNIT_NPC_FLAG_TRAINER_CLASS', 0x00000020);
47 define('UNIT_NPC_FLAG_TRAINER_PROFESSION', 0x00000040);
48 define('UNIT_NPC_FLAG_VENDOR', 0x00000080);
49 define('UNIT_NPC_FLAG_VENDOR_AMMO', 0x00000100);
50 define('UNIT_NPC_FLAG_VENDOR_FOOD', 0x00000200);
51 define('UNIT_NPC_FLAG_VENDOR_POISON', 0x00000400);
52 define('UNIT_NPC_FLAG_VENDOR_REAGENT', 0x00000800);
53 define('UNIT_NPC_FLAG_REPAIR', 0x00001000);
54 define('UNIT_NPC_FLAG_FLIGHTMASTER', 0x00002000);
55 define('UNIT_NPC_FLAG_SPIRITHEALER', 0x00004000);
56 define('UNIT_NPC_FLAG_SPIRITGUIDE', 0x00008000);
57 define('UNIT_NPC_FLAG_INNKEEPER', 0x00010000);
58 define('UNIT_NPC_FLAG_BANKER', 0x00020000);
59 define('UNIT_NPC_FLAG_PETITIONER', 0x00040000);
60 define('UNIT_NPC_FLAG_TABARDDESIGNER', 0x00080000);
61 define('UNIT_NPC_FLAG_BATTLEMASTER', 0x00100000);
62 define('UNIT_NPC_FLAG_AUCTIONEER', 0x00200000);
63 define('UNIT_NPC_FLAG_STABLEMASTER', 0x00400000);
64 define('UNIT_NPC_FLAG_GUILD_BANKER', 0x00800000);
65 define('UNIT_NPC_FLAG_SPELLCLIC', 0x01000000);
66 define('UNIT_NPC_FLAG_UNK25', 0x02000000);
67 define('UNIT_NPC_FLAG_UNK26', 0x04000000);
68 define('UNIT_NPC_FLAG_UNK27', 0x08000000);
69 define('UNIT_NPC_FLAG_UNK28', 0x10000000);
70 define('UNIT_NPC_FLAG_UNK29', 0x20000000);
71 define('UNIT_NPC_FLAG_UNK30', 0x40000000);
72 define('UNIT_NPC_FLAG_UNK31', 0x80000000);
74 function noBorderCreatureTable($npc)
76 global $game_text, $lang;
77 $loyality= getLoyality($npc['faction_A']);
80 $family =$npc['family'];
81 $npcdmgmin = ROUND(($npc['mindmg']+
$npc['attackpower'])*$npc['dmg_multiplier']);
82 $npcdmgmax = ROUND(($npc['maxdmg']+
$npc['attackpower'])*$npc['dmg_multiplier']);
84 if ($npc['ScriptName']=="" && $npc['AIName']=="") {$npcscr='No script';}
85 else if ($npc['AIName']=="EventAI" && $npc['ScriptName']=="") {$npcscr='EventAI';}
86 else if ($npc['AIName']=="NullAI" && $npc['ScriptName']=="") {$npcscr='NullAI';}
87 else if ($npc['AIName']=="AggressorAI" && $npc['ScriptName']=="") {$npcscr='AggressorAI';}
88 else if ($npc['AIName']=="ReactorAI" && $npc['ScriptName']=="") {$npcscr='ReactorAI';}
89 else if ($npc['AIName']=="GuardAI" && $npc['ScriptName']=="") {$npcscr='GuardAI';}
90 else if ($npc['AIName']=="PetAI" && $npc['ScriptName']=="") {$npcscr='PetAI';}
91 else if ($npc['AIName']=="TotemAI" && $npc['ScriptName']=="") {$npcscr='TotemAI';}
92 else if ($npc['ScriptName']=="generic_creature") {$npcscr='Caster';}
93 else if ($npc['ScriptName']<>"" && $npc['AIName']=="EventAI") {$npcscr='EventAI + SD2';}
96 $npc['name'] = str_replace('(1)', '(difficulty_1)', $npc['name']);
97 $npc['name'] = str_replace('(2)', '(difficulty_2)', $npc['name']);
98 $npc['name'] = str_replace('(3)', '(difficulty_3)', $npc['name']);
100 echo "<table class=creature cellspacing=0>";
102 echo "<tr><td colspan=2><b>$npc[name] ($loyality)</b>";
103 if ($npc['subname']!="")
104 echo "<br><FONT color=#008800 size=-3><$npc[subname]></FONT>";
108 echo "<td>".$game_text['npc_rank']."</td><td align=right>".getCreatureRank($rank)."</td></tr>";
110 echo "<tr><td>".$game_text['npc_type']."</td><td align=right>".getCreatureType($type)."</td></tr>";
111 if ($npc['family']!=0)
112 echo "<tr><td>".$game_text['npc_family']."</td><td align=right>".getCreatureFamily($family)."</td></tr>";
114 echo "<tr><td>".$game_text['npc_level']."</td><td align=right>$npc[maxlevel]</td></tr>";
115 if ($npc['minhealth']==$npc['maxhealth'])
116 echo "<tr><td>".$game_text['npc_health']."</td><td align=right>$npc[maxhealth]</td></tr>";
118 echo "<tr><td>".$game_text['npc_health']."</td><td align=right>$npc[minhealth]-$npc[maxhealth]</td></tr>";
119 if ($npc['minmana']!=0)
121 if ($npc['minmana']!=$npc['maxmana'])
122 echo "<tr><td>".$game_text['npc_mana']."</td><td align=right>$npc[minmana]-$npc[maxmana]</td></tr>";
124 echo "<tr><td>".$game_text['npc_mana']."</td><td align=right>$npc[minmana]</td></tr>";
126 if ($npc['armor']!=0)
127 echo "<tr><td>".$game_text['npc_armor']."</td><td align=right>$npc[armor]</td></tr>";
129 echo "<tr><td>".$game_text['npc_damage']."</td><td align=right>$npcdmgmin - $npcdmgmax</td></tr>";
130 echo "<tr><td>".$game_text['npc_ap']."</td><td align=right>$npc[attackpower]</td></tr>";
131 $attackTime = $npc['baseattacktime']/1000;
132 echo "<tr><td>".$game_text['npc_attack']."</td><td align=right>$attackTime $lang[sec]</td></tr>";
134 echo "<tr><td>".$game_text['faction']."</td><td align=right>".getFactionTemplateName($npc['faction_A'])."</td></tr>";
135 // echo "<tr><td>Радиус аггро</td><td align=right>$npc[combat_reach]</td></tr>";
136 // echo "<tr><td>".$game_text['entry']."</td><td align=right>$npc[entry]</td></tr>";
137 if ($npc['modelid_1'])
138 echo "<tr><td>".$game_text['display1']."</td><td align=right>$npc[modelid_1]</td></tr>";
139 if ($npc['modelid_2'])
140 echo "<tr><td>".$game_text['display2']."</td><td align=right>$npc[modelid_2]</td></tr>";
141 if ($npc['modelid_3'])
142 echo "<tr><td>".$game_text['display3']."</td><td align=right>$npc[modelid_3]</td></tr>";
143 if ($npc['modelid_4'])
144 echo "<tr><td>".$game_text['display4']."</td><td align=right>$npc[modelid_4]</td></tr>";
146 echo "<tr><td>".$game_text['npc_script']."</td><td align=right>$npcscr</td></tr>";
148 echo "<tr><td colspan=2>".getCreatureFlagsList($npc['npcflag'])."</td></tr>";
150 // echo "<tr><td colspan=2 class=bottom>This is from MaNGOS database!</td></tr>";
151 echo "</tbody></table>";
153 function generateCreatureTable($npc)
155 echo "<table class=border cellspacing=0 cellpadding=0><tbody>";
156 echo "<tr><td class=btopl></td><td class=btop></td><td class=btopr></td></tr>";
157 echo "<tr><td class=bl></td><td class=bbody>";
158 noBorderCreatureTable($npc);
159 echo "</td><td class=br></td></tr>";
160 echo "<tr><td class=bbottoml></td><td class=bbottom></td><td class=bbottomr></td></tr>";
161 echo "</tbody></table>";