Требование: PHP => 5.3, часть 2
[cswowd.git] / include / gameobject_table.php
blob6ce44fbeed39f1690616cd575c4efd3d3a4ef4e6
1 <?php
3 // Gameobject type enums
4 define('GAMEOBJECT_TYPE_DOOR', 0);
5 define('GAMEOBJECT_TYPE_BUTTON', 1);
6 define('GAMEOBJECT_TYPE_QUESTGIVER', 2);
7 define('GAMEOBJECT_TYPE_CHEST', 3);
8 define('GAMEOBJECT_TYPE_BINDER', 4);
9 define('GAMEOBJECT_TYPE_GENERIC', 5);
10 define('GAMEOBJECT_TYPE_TRAP', 6);
11 define('GAMEOBJECT_TYPE_CHAIR', 7);
12 define('GAMEOBJECT_TYPE_SPELL_FOCUS', 8);
13 define('GAMEOBJECT_TYPE_TEXT', 9);
14 define('GAMEOBJECT_TYPE_GOOBER', 10);
15 define('GAMEOBJECT_TYPE_TRANSPORT', 11);
16 define('GAMEOBJECT_TYPE_AREADAMAGE', 12);
17 define('GAMEOBJECT_TYPE_CAMERA', 13);
18 define('GAMEOBJECT_TYPE_MAP_OBJECT', 14);
19 define('GAMEOBJECT_TYPE_MO_TRANSPORT', 15);
20 define('GAMEOBJECT_TYPE_DUEL_ARBITER', 16);
21 define('GAMEOBJECT_TYPE_FISHINGNODE', 17);
22 define('GAMEOBJECT_TYPE_SUMMONING_RITUAL', 18);
23 define('GAMEOBJECT_TYPE_MAILBOX', 19);
24 define('GAMEOBJECT_TYPE_AUCTIONHOUSE', 20);
25 define('GAMEOBJECT_TYPE_GUARDPOST', 21);
26 define('GAMEOBJECT_TYPE_SPELLCASTER', 22);
27 define('GAMEOBJECT_TYPE_MEETINGSTONE', 23);
28 define('GAMEOBJECT_TYPE_FLAGSTAND', 24);
29 define('GAMEOBJECT_TYPE_FISHINGHOLE', 25);
30 define('GAMEOBJECT_TYPE_FLAGDROP', 26);
31 define('GAMEOBJECT_TYPE_MINI_GAME', 27);
32 define('GAMEOBJECT_TYPE_LOTTERY_KIOSK', 28);
33 define('GAMEOBJECT_TYPE_CAPTURE_POINT', 29);
34 define('GAMEOBJECT_TYPE_AURA_GENERATOR', 30);
35 define('GAMEOBJECT_TYPE_DUNGEON_DIFFICULTY', 31);
36 define('GAMEOBJECT_TYPE_BARBER_CHAIR', 32);
37 define('GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING', 33);
38 define('GAMEOBJECT_TYPE_GUILDBANK', 34);
39 define('GAMEOBJECT_TYPE_TRAPDOOR', 35);
41 // Gameobject flag enum
42 define('GO_FLAG_IN_USE', 0x01);
43 define('GO_FLAG_LOCKED', 0x02);
44 define('GO_FLAG_INTERACT_COND', 0x04);
45 define('GO_FLAG_TRANSPORT', 0x08);
46 define('GO_FLAG_UNK1', 0x10);
47 define('GO_FLAG_NODESPAWN', 0x20);
48 define('GO_FLAG_TRIGGERED', 0x40);
49 define('GO_FLAG_UNK2', 0x80);
51 function noBorderGameobjectTable($obj)
53 global $game_text;
54 echo "<table class=gameobject cellspacing=0>";
55 echo "<tbody>";
56 echo "<tr><td colspan=2><b>$obj[name]</b></td></tr>";
57 if ($obj['flags'] & GO_FLAG_LOCKED)
58 echo "<tr><td colspan=2>".$game_text['locked']."</td></tr>";
59 echo "<tr width=1%><td>".$game_text['go_type']."</td><td align=right>".getGameobjectType($obj['type'])."</td></tr>";
60 if ($obj['faction'])
61 echo "<tr><td>".$game_text['faction']."</td><td align=right>".getFactionTemplateName($obj['faction'])."</td></tr>";
62 echo "<tr><td>".$game_text['entry']."</td><td align=right>$obj[entry]</td></tr>";
63 echo "</tbody></table>";
66 function generateGameobjectTable($obj)
68 echo "<table class=border cellspacing=0 cellpadding=0><tbody>";
69 echo "<tr><td class=btopl></td><td class=btop></td><td class=btopr></td></tr>";
70 echo "<tr><td class=bl></td><td class=bbody>";
71 noBorderGameobjectTable($obj);
72 echo "</td><td class=br></td></tr>";
73 echo "<tr><td class=bbottoml></td><td class=bbottom></td><td class=bbottomr></td></tr>";
74 echo "</tbody></table>";