source: aowow/spell.php

Last change on this file was 170, checked in by maron, 16 years ago
  • Property svn:executable set to *
File size: 19.6 KB
Line 
1<?php
2
3require_once('includes/allspells.php');
4require_once('includes/allnpcs.php');
5require_once('includes/allquests.php');
6require_once('includes/allcomments.php');
7
8$smarty->config_load($conf_file,'spell');
9
10// номер спелла;
11$id = $podrazdel;
12
13if(!$spell = load_cache(13, intval($id)))
14{
15 unset($spell);
16
17 // БД
18 global $DB;
19 // Таблица спеллов
20 global $allspells;
21 // Таблица вещей
22 global $allitems;
23
24 global $npc_cols;
25
26 // Данные об спелле:
27 $row = $DB->selectRow('
28 SELECT s.*, i.iconname
29 FROM ?_spell s, ?_spellicons i
30 WHERE
31 s.spellID=?
32 AND i.id = s.spellicon
33 ',
34 $id
35 );
36 if ($row)
37 {
38 $spell = array();
39 // Номер спелла
40 $spell['entry'] = $row['spellID'];
41 // Имя спелла
42 $spell['name'] = $row['spellname'];
43 // Иконка спелла
44 //$spell['icon'] = $row['iconname'];
45 // Затраты маны на сспелл
46 if ($row['manacost'])
47 $spell['manacost'] = $row['manacost'];
48 elseif ($row['manacostpercent'])
49 $spell['manacost'] = $row['manacostpercent'].'% '.$smarty->get_config_vars('of_base');
50 // Уровень спелла
51 $spell['level'] = $row['levelspell'];
52 // Дальность
53 $RangeRow = $DB->selectRow('SELECT rangeMin, rangeMax, name from ?_spellrange where rangeID=? limit 1', $row['rangeID']);
54 $spell['range'] = '';
55 if (($RangeRow['rangeMin'] != $RangeRow['rangeMax']) and ($RangeRow['rangeMin'] != 0))
56 $spell['range'] = $RangeRow['rangeMin'].'-';
57 $spell['range'] .= $RangeRow['rangeMax'];
58 $spell['rangename'] = $RangeRow['name'];
59 // Время каста
60 $casttime = $DB->selectCell('SELECT base from ?_spellcasttimes where id=? limit 1', $row['spellcasttimesID']);
61 if ($casttime>0)
62 $spell['casttime'] = ($casttime/1000).' '.$smarty->get_config_vars('seconds');
63 else if($row['ChannelInterruptFlags'])
64 $spell['casttime'] = 'Channeled';
65 else
66 $spell['casttime'] = 'Instant';
67 // Cooldown
68 if ($row['cooldown']>0)
69 $spell['cooldown'] = $row['cooldown'] / 1000;
70 // Время действия спелла
71 $duration = $DB->selectCell('SELECT durationBase FROM ?_spellduration WHERE durationID=?d LIMIT 1', $row['durationID']);
72 if ($duration > 0)
73 $spell['duration'] = ($duration/1000).' '.$smarty->get_config_vars('seconds');
74 else
75 $spell['duration'] ='<span class="q0">n/a</span>';
76 // Школа спелла
77 $spell['school'] = $DB->selectCell('SELECT name FROM ?_resistances WHERE id=?d LIMIT 1', $row['resistancesID']);
78 // Тип диспела
79 if ($row['dispeltypeID'])
80 $spell['dispel'] = $DB->selectCell('SELECT name FROM ?_spelldispeltype WHERE id=?d LIMIT 1', $row['dispeltypeID']);
81 // Механика спелла
82 if ($row['mechanicID'])
83 $spell['mechanic'] = $DB->selectCell('SELECT name FROM ?_spellmechanic WHERE id=?d LIMIT 1', $row['mechanicID']);
84
85 // Информация о спелле
86 $spell['info'] = allspellsinfo2($row, 2);
87
88 // Инструменты
89 $spell['tools'] = array();
90 $i=0;
91 for ($j=1;$j<=2;$j++)
92 {
93 if ($row['tool'.$j])
94 {
95 $spell['tools'][$i] = array();
96 // Имя инструмента
97 $tool_row = $DB->selectRow('SELECT ?#, `name`, `quality` FROM item_template, ?_icons WHERE entry=?d AND id=displayid LIMIT 1', $item_cols[0], $row['tool'.$j]);
98 $spell['tools'][$i]['name'] = $tool_row['name'];
99 $spell['tools'][$i]['quality'] = $tool_row['quality'];
100 // ID инструмента
101 $spell['tools'][$i]['entry'] = $row['tool'.$j];
102 // Добавляем инструмент в таблицу вещей
103 allitemsinfo2($tool_row, 0);
104 $i++;
105 }
106 }
107
108 // Реагенты
109 $spell['reagents'] = array();
110 $i=0;
111 for ($j=1;$j<=8;$j++)
112 {
113 if ($row['reagent'.$j])
114 {
115 $spell['reagents'][$i] = array();
116 // Имя реагента
117 $reagentrow = $DB->selectRow('
118 SELECT c.?#, name
119 { ,l.name_loc?d as `name_loc` }
120 FROM ?_icons, item_template c
121 { LEFT JOIN (locales_item l) ON l.entry=c.entry AND ? }
122 WHERE
123 c.entry=?d
124 AND id=displayid
125 LIMIT 1
126 ',
127 $item_cols[0],
128 ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP,
129 ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP,
130 $row['reagent'.$j]
131 );
132 $spell['reagents'][$i]['name'] = !empty($reagentrow['name_loc'])?$reagentrow['name_loc']:$reagentrow['name'];
133 $spell['reagents'][$i]['quality'] = $reagentrow['quality'];
134 // ID реагента
135 $spell['reagents'][$i]['entry'] = $row['reagent'.$j];
136 // Количество реагентов
137 $spell['reagents'][$i]['count'] = $row['reagentcount'.$j];
138 // Добавляем реагент в таблицу вещей
139 allitemsinfo2($reagentrow, 0);
140 $i++;
141 }
142 }
143
144 // Перебираем все эффекты:
145 $i=0;
146 $spell['effect'] = array();
147 // Btt - Buff TollTip
148 if ($row['buff'])
149 $spell['btt'] = spell_buff_render($row);
150 for ($j=1;$j<=3;$j++)
151 {
152 if($row['effect'.$j.'id'] > 0)
153 {
154 // Название эффекта
155 $spell['effect'][$i]['name'] = $spell_effect_names[$row['effect'.$j.'id']];
156 // Доп информация в имени
157 if ($row['effect'.$j.'MiscValue'])
158 {
159 switch ($row['effect'.$j.'id'])
160 {
161 // Если эффект - создание обекта, создаем информацию о нём
162 case 50: // "Summon Object" // 103 spells, OK
163 case 76: // "Summon Object (Wild)" // 173 spells, OK
164 //case 86: // "Activate Object" // 175 spells; wrong GOs, tiny ID; skipping
165 case 104: // "Summon Object (slot 1)" // 24 spells - traps, OK
166 //case 105: // "Summon Object (slot 2)" // 2 spells: 22996, 23005; wrong GOs; skipping
167 //case 106: // "Summon Object (slot 3)" // 0 spells; skipping
168 //case 107: // "Summon Object (slot 4)" // 0 spells; skipping
169 {
170 $spell['effect'][$i]['object'] = array();
171 $spell['effect'][$i]['object']['entry'] = $row['effect'.$j.'MiscValue'];
172 $spell['effect'][$i]['object']['name'] = $DB->selectCell("SELECT name FROM gameobject_template WHERE entry=? LIMIT 1", $spell['effect'][$i]['object']['entry']).' ('.$spell['effect'][$i]['object']['entry'].')';
173 break;
174 }
175 // скиллы
176 case 118: // "Require Skill"
177 {
178 $spell['effect'][$i]['name'] .= ' ('.$DB->selectCell('SELECT name FROM ?_skill WHERE skillID=? LIMIT 1', $row['effect'.$j.'MiscValue']).')';
179 break;
180 }
181 // ауры
182 case 6:
183 {
184 break;
185 }
186 // тотемы
187 case 75: // "Summon Totem"
188 case 87: // "Summon Totem (slot 1)"
189 case 88: // "Summon Totem (slot 2)"
190 case 89: // "Summon Totem (slot 3)"
191 case 90: // "Summon Totem (slot 4)"
192 {
193 $spell['effect'][$i]['name'] .= ' (<a href="?npc='.$row['effect'.$j.'MiscValue'].'">'.$row['effect'.$j.'MiscValue'].'</a>)';
194 break;
195 }
196 default:
197 {
198 $spell['effect'][$i]['name'] .= ' ('.$row['effect'.$j.'MiscValue'].')';
199 }
200 }
201 }
202 // Если просто урон школой - добавляем подпись школы
203 if ($row['effect'.$j.'id'] == 2 && $spell['school'])
204 $spell['effect'][$i]['name'] .= ' ('.$spell['school'].')';
205 // Радиус действия эффекта
206 if ($row['effect'.$j.'radius'])
207 $spell['effect'][$i]['radius'] = $DB->selectCell("SELECT radiusbase from ?_spellradius where radiusID=? limit 1", $row['effect'.$j.'radius']);
208 // Значение спелла (урон)
209 if ($row['effect'.$j.'BasePoints'] && !$row['effect'.$j.'itemtype'])
210 $spell['effect'][$i]['value'] = $row['effect'.$j.'BasePoints'] + 1;
211 // Интервал действия спелла
212 if ($row['effect'.$j.'Amplitude'] > 0)
213 $spell['effect'][$i]['interval'] = $row['effect'.$j.'Amplitude'] / 1000;
214 // Название ауры:
215 if ($row['effect'.$j.'Aura'] > 0 && IsSet($spell_aura_names[$row['effect'.$j.'Aura']]))
216 switch ($row['effect'.$j.'Aura'])
217 {
218 case 78: // "Mounted" - приписываем ссылку на нпс
219 case 56: // "Transform"
220 {
221 $spell['effect'][$i]['name'] .= ': '.$spell_aura_names[$row['effect'.$j.'Aura']].' (<a href="?npc='.$row['effect'.$j.'MiscValue'].'">'.$row['effect'.$j.'MiscValue'].'</a>)';
222 break;
223 }
224 default:
225 {
226 $spell['effect'][$i]['name'] .= ': '.$spell_aura_names[$row['effect'.$j.'Aura']];
227 if($row['effect'.$j.'MiscValue'] > 0)
228 $spell['effect'][$i]['name'] .= ' ('.$row['effect'.$j.'MiscValue'].')';
229 }
230 }
231 elseif ($row['effect'.$j.'Aura'] > 0)
232 $spell['effect'][$i]['name'] .= ': Unknown_Aura('.$row['effect'.$j.'Aura'].')';
233 // Создает вещь:
234 if (($row['effect'.$j.'id'] == 24))
235 {
236 $spell['effect'][$i]['item'] = array();
237 $spell['effect'][$i]['item']['entry'] = $row['effect'.$j.'itemtype'];
238 $tmpRow = $DB->selectRow('
239 SELECT c.?#, name
240 { ,l.name_loc?d as `name_loc` }
241 FROM ?_icons, item_template c
242 { LEFT JOIN (locales_item l) ON l.entry=c.entry AND ? }
243 WHERE
244 c.entry=?d
245 AND id=displayid
246 LIMIT 1
247 ',
248 $item_cols[0],
249 ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP,
250 ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP,
251 $spell['effect'][$i]['item']['entry']
252 );
253 $spell['effect'][$i]['item']['name'] = $tmpRow['name'];
254 $spell['effect'][$i]['item']['quality'] = $tmpRow['quality'];
255 $spell['effect'][$i]['item']['count'] = $row['effect'.$j.'BasePoints'] + 1;
256 // Иконка итема, если спелл создает этот итем
257 if(!IsSet($spell['icon']))
258 $spell['icon'] = $tmpRow['iconname'];
259 allitemsinfo2($tmpRow, 0);
260 }
261 // Создает спелл
262 if ($row['effect'.$j.'triggerspell'] > 0)
263 {
264 $spell['effect'][$i]['spell'] = array();
265 $spell['effect'][$i]['spell']['entry'] = $row['effect'.$j.'triggerspell'];
266 $spell['effect'][$i]['spell']['name'] = $DB->selectCell('SELECT spellname FROM ?_spell WHERE spellID=?d LIMIT 1', $spell['effect'][$i]['spell']['entry']);
267 allspellsinfo($spell['effect'][$i]['spell']['entry']);
268 }
269 $i++;
270 }
271 }
272
273 if(!IsSet($spell['icon']))
274 $spell['icon'] = $row['iconname'];
275
276 // Спеллы с таким же названием
277 $seealso = $DB->select('
278 SELECT s.*, i.iconname
279 FROM ?_spell s, ?_spellicons i
280 WHERE
281 s.spellname=?
282 AND s.spellID!=?d
283 AND (
284 (s.effect1id=?d AND s.effect1id!=0)
285 OR (s.effect2id=?d AND s.effect2id!=0)
286 OR (s.effect3id=?d AND s.effect3id!=0)
287 )
288 AND i.id=s.spellicon
289 ',
290 $spell['name'],
291 $spell['entry'],
292 $row['effect1id'],
293 $row['effect2id'],
294 $row['effect3id']
295 );
296 if ($seealso)
297 {
298 $spell['seealso'] = array();
299 foreach($seealso as $i => $row)
300 $spell['seealso'][] = spellinfo2($row);
301 unset ($seealso);
302 }
303
304 // Кто обучает этому спеллу
305 $spell['taughtbynpc'] = array();
306 // Список тренеров, обучающих нужному спеллу
307 $taughtbytrainers = $DB->select('
308 SELECT ?#, c.entry
309 { , name_loc?d AS name_loc, subname_loc'.$_SESSION['locale'].' AS subname_loc }
310 FROM ?_factiontemplate, creature_template c
311 { LEFT JOIN (locales_creature l) ON c.entry = l.entry AND ? }
312 WHERE
313 c.entry IN (SELECT entry FROM npc_trainer WHERE spell=?d)
314 AND factiontemplateID=faction_A
315 ',
316 $npc_cols[0],
317 ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP,
318 ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP,
319 $spell['entry']
320 );
321 if ($taughtbytrainers)
322 {
323 foreach($taughtbytrainers as $i=>$npcrow)
324 $spell['taughtbynpc'][] = creatureinfo2($npcrow);
325 unset ($taughtbytrainers);
326 }
327
328 // Список книг/рецептов, просто обучающих спеллу
329 $spell['taughtbyitem'] = array();
330 $taughtbyitem = $DB->select('
331 SELECT ?#, c.entry
332 { , name_loc?d AS name_loc }
333 FROM ?_icons, item_template c
334 { LEFT JOIN (locales_item l) ON c.entry = l.entry AND ? }
335 WHERE
336 ((spellid_2=?d)
337 AND (spelltrigger_2=6))
338 AND id=displayid
339 ',
340 $item_cols[2],
341 ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP,
342 ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP,
343 $spell['entry']//, $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry']
344 );
345 if ($taughtbyitem)
346 {
347 foreach($taughtbyitem as $i=>$itemrow)
348 $spell['taughtbyitem'][] = iteminfo2($itemrow, 0);
349 unset ($taughtbyitem);
350 }
351
352 // Список спеллов, обучающих этому спеллу:
353 $taughtbyspells = $DB->selectCol('
354 SELECT spellID
355 FROM ?_spell
356 WHERE
357 (effect1triggerspell=?d AND (effect1id=57 OR effect1id=36))
358 OR (effect2triggerspell=?d AND (effect2id=57 OR effect2id=36))
359 OR (effect3triggerspell=?d AND (effect3id=57 OR effect3id=36))
360 ',
361 $spell['entry'], $spell['entry'], $spell['entry']
362 );
363
364 if ($taughtbyspells)
365 {
366 // Список петов, кастующих спелл, обучающий нужному спеллу
367 $taughtbypets = $DB->select('
368 SELECT ?#, c.entry
369 { , name_loc?d AS name_loc, subname_loc'.$_SESSION['locale'].' AS subname_loc }
370 FROM ?_factiontemplate, creature_template c
371 { LEFT JOIN (locales_creature l) ON c.entry = l.entry AND ? }
372 WHERE
373 c.entry IN (SELECT entry FROM petcreateinfo_spell WHERE (Spell1 IN (?a)) OR (Spell2 IN (?a)) OR (Spell3 IN (?a)) OR (Spell4 IN (?a)))
374 AND factiontemplateID=faction_A
375 ',
376 $npc_cols[0],
377 ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP,
378 ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP,
379 $taughtbyspells, $taughtbyspells, $taughtbyspells, $taughtbyspells
380 );
381 // Перебираем этих петов
382 if ($taughtbypets)
383 {
384 foreach($taughtbypets as $i=>$petrow)
385 $spell['taughtbynpc'][] = creatureinfo2($petrow);
386 unset ($taughtbypets);
387 }
388
389 // Список квестов, наградой за которые является спелл, обучающий нужному спеллу
390 $taughtbyquest = $DB->select('
391 SELECT c.?#
392 { , Title_loc?d AS Title_loc }
393 FROM quest_template c
394 { LEFT JOIN (locales_quest l) ON c.entry = l.entry AND ? }
395 WHERE
396 RewSpell IN (?a) OR RewSpellCast IN (?a)
397 ',
398 $quest_cols[2],
399 ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP,
400 ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP,
401 $taughtbyspells, $taughtbyspells
402 );
403 if ($taughtbyquest)
404 {
405 $spell['taughtbyquest'] = array();
406 foreach($taughtbyquest as $i=>$questrow)
407 $spell['taughtbyquest'][] = GetQuestInfo($questrow, 0xFFFFFF);
408 unset ($taughtbyquest);
409 }
410
411 // Список НПЦ, кастующих нужный спелл, бла-бла-бла
412 $taughtbytrainers = $DB->select('
413 SELECT ?#, c.entry
414 { , name_loc?d AS name_loc, subname_loc'.$_SESSION['locale'].' AS subname_loc }
415 FROM ?_factiontemplate, creature_template c
416 { LEFT JOIN (locales_creature l) ON c.entry = l.entry AND ? }
417 WHERE
418 c.entry IN (SELECT entry FROM npc_trainer WHERE spell in (?a))
419 AND factiontemplateID=faction_A
420 ',
421 $npc_cols[0],
422 ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP,
423 ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP,
424 $taughtbyspells
425 );
426 if ($taughtbytrainers)
427 {
428 foreach($taughtbytrainers as $i=>$npcrow)
429 $spell['taughtbynpc'][] = creatureinfo2($npcrow);
430 unset ($taughtbytrainers);
431 }
432
433 // Список книг, кастующих спелл, обучающий нужному спеллу
434 $taughtbyitem = $DB->select('
435 SELECT ?#, c.entry
436 { , name_loc?d AS name_loc }
437 FROM ?_icons, item_template c
438 { LEFT JOIN (locales_item l) ON c.entry = l.entry AND ? }
439 WHERE
440 ((spellid_1 IN (?a))
441 OR (spellid_2 IN (?a))
442 OR (spellid_3 IN (?a))
443 OR (spellid_4 IN (?a))
444 OR (spellid_5 IN (?a)))
445 AND id=displayid
446 ',
447 $item_cols[2],
448 ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP,
449 ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP,
450 $taughtbyspells, $taughtbyspells, $taughtbyspells, $taughtbyspells, $taughtbyspells
451 );
452 if ($taughtbyitem)
453 {
454 foreach($taughtbyitem as $i=>$itemrow)
455 $spell['taughtbyitem'][] = iteminfo2($itemrow, 0);
456 unset ($taughtbyitem);
457 }
458 }
459
460 // Используется NPC:
461 $usedbynpc = $DB->select('
462 SELECT ?#, c.entry
463 { , name_loc?d AS name_loc, subname_loc'.$_SESSION['locale'].' AS subname_loc }
464 FROM ?_factiontemplate, creature_template c
465 { LEFT JOIN (locales_creature l) ON c.entry = l.entry AND ? }
466 WHERE
467 (spell1=?d
468 OR spell2=?d
469 OR spell3=?d
470 OR spell4=?d)
471 AND factiontemplateID=faction_A
472 ',
473 $npc_cols[0],
474 ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP,
475 ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP,
476 $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry']
477 );
478 if ($usedbynpc)
479 {
480 $spell['usedbynpc'] = array();
481 foreach($usedbynpc as $i=>$row)
482 $spell['usedbynpc'][] = creatureinfo2($row);
483 unset ($usedbynpc);
484 }
485
486 // Используется вещями:
487 $usedbyitem = $DB->select('
488 SELECT ?#, c.entry
489 { , name_loc?d AS name_loc }
490 FROM ?_icons, item_template c
491 { LEFT JOIN (locales_item l) ON c.entry = l.entry AND ? }
492 WHERE
493 (spellid_1=?d OR (spellid_2=?d AND spelltrigger_2!=6) OR spellid_3=?d OR spellid_4=?d OR spellid_5=?d)
494 AND id=displayID
495 ',
496 $item_cols[2],
497 ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP,
498 ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP,
499 $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry']
500 );
501 if ($usedbyitem)
502 {
503 $spell['usedbyitem'] = array();
504 foreach($usedbyitem as $i => $row)
505 $spell['usedbyitem'][] = iteminfo2($row, 0);
506 unset ($usedbyitem);
507 }
508
509 // Используется наборами вещей:
510 $usedbyitemset = $DB->select('
511 SELECT *
512 FROM ?_itemset
513 WHERE spell1=?d or spell2=?d or spell3=?d or spell4=?d or spell5=?d or spell6=?d or spell7=?d or spell8=?d
514 ',
515 $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry']
516 );
517 if ($usedbyitemset)
518 {
519 $spell['usedbyitemset'] = array();
520 foreach($usedbyitemset as $i => $row)
521 $spell['usedbyitemset'][] = itemsetinfo2($row);
522 unset ($usedbyitemset);
523 }
524
525 // Спелл - награда за квест
526 $questreward = $DB->select('
527 SELECT c.?#
528 { , Title_loc?d AS Title_loc }
529 FROM quest_template c
530 { LEFT JOIN (locales_quest l) ON c.entry = l.entry AND ? }
531 WHERE
532 RewSpell=?d
533 OR RewSpellCast=?d
534 ',
535 $quest_cols[2],
536 ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP,
537 ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP,
538 $spell['entry'], $spell['entry']
539 );
540 if ($questreward)
541 {
542 $spell['questreward'] = array();
543 foreach($questreward as $i => $row)
544 $spell['questreward'][] = GetQuestInfo($row, 0xFFFFFF);
545 unset ($questreward);
546 }
547
548 // Проверяем на пустые массивы
549 if (!($spell['taughtbyitem']))
550 unset ($spell['taughtbyitem']);
551 if (!($spell['taughtbynpc']))
552 unset ($spell['taughtbynpc']);
553
554 $smarty->assign('spell', $spell);
555 save_cache(13, $spell['spellID'], $spell);
556 }
557}
558
559global $page;
560$page = array(
561 'Mapper' => false,
562 'Book' => false,
563 'Title' => $spell['name'].' - '.$smarty->get_config_vars('Spells'),
564 'tab' => 0,
565 'type' => 6,
566 'typeid' => $spell['entry'],
567 'path' => '[0,1]'
568);
569$smarty->assign('page', $page);
570
571// Комментарии
572$smarty->assign('comments', getcomments($page['type'], $page['typeid']));
573
574// Количество MySQL запросов
575$smarty->assign('mysql', $DB->getStatistics());
576if (count($allspells)>=0)
577 $smarty->assign('allspells',$allspells);
578if (count($allitems)>=0)
579 $smarty->assign('allitems',$allitems);
580
581$smarty->display('spell.tpl');
582
583?>
Note: See TracBrowser for help on using the repository browser.