2 // Create aura info string
3 function showAuraInfo($spell, $effect, $aura)
5 global $gSpellEffect, $gSpellAuraName;
8 echo ': '.getSpellAuraName($aura);
9 $misc = $spell['EffectMiscValue_'.$effect];
10 $miscB= $spell['EffectMiscValue2_'.$effect];
13 // Misc - это школа спеллов
14 case 10: // SPELL_AURA_MOD_THREAT
15 case 13: // SPELL_AURA_MOD_DAMAGE_DONE
16 case 14: // SPELL_AURA_MOD_DAMAGE_TAKEN
17 case 39: // SPELL_AURA_SCHOOL_IMMUNITY
18 case 40: // SPELL_AURA_DAMAGE_IMMUNITY
19 case 69: // SPELL_AURA_SCHOOL_ABSORB
20 case 71: // SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL
21 case 72: // SPELL_AURA_MOD_POWER_COST_SCHOOL_PCT
22 case 73: // SPELL_AURA_MOD_POWER_COST_SCHOOL
23 case 74: // SPELL_AURA_REFLECT_SPELLS_SCHOOL
24 case 79: // SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
25 case 81: // SPELL_AURA_SPLIT_DAMAGE_PCT
26 case 83: // SPELL_AURA_MOD_BASE_RESISTANCE
27 case 87: // SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN
28 case 97: // SPELL_AURA_MANA_SHIELD
29 case 115: // SPELL_AURA_MOD_HEALING
30 case 118: // SPELL_AURA_MOD_HEALING_PCT
31 case 135: // SPELL_AURA_MOD_HEALING_DONE
32 case 136: // SPELL_AURA_MOD_HEALING_DONE_PERCENT
33 case 149: // SPELL_AURA_RESIST_PUSHBACK
34 case 153: // SPELL_AURA_SPLIT_DAMAGE_FLAT
35 case 163: // SPELL_AURA_MOD_CRIT_DAMAGE_BONUS_MELEE
36 case 174: // SPELL_AURA_MOD_SPELL_DAMAGE_OF_STAT_PERCENT
37 case 179: // SPELL_AURA_MOD_ATTACKER_SPELL_CRIT_CHANCE
38 case 183: // SPELL_AURA_MOD_CRITICAL_THREAT
39 case 186: // SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE
40 case 199: // SPELL_AURA_MOD_INCREASES_SPELL_PCT_TO_HIT
42 case 216: // SPELL_AURA_HASTE_SPELLS
44 case 237: // SPELL_AURA_MOD_SPELL_DAMAGE_OF_ATTACK_POWER
45 case 238: // SPELL_AURA_MOD_SPELL_HEALING_OF_ATTACK_POWER
48 if ($misc == 127 ||
$misc == 0) echo ' (All schools)';
49 else if ($misc == 126) echo ' (All magic)';
50 else if ($misc == 1) echo ' (Physical)';
51 else echo ' (School: '.getSpellSchool($misc).')';
54 case 22: // SPELL_AURA_MOD_RESISTANCE
55 case 101: // SPELL_AURA_MOD_RESISTANCE_PCT
56 case 123: // SPELL_AURA_MOD_TARGET_RESISTANCE
57 case 142: // SPELL_AURA_MOD_BASE_RESISTANCE_PCT
58 case 143: // SPELL_AURA_MOD_RESISTANCE_EXCLUSIVE
59 case 182: // SPELL_AURA_MOD_RESISTANCE_OF_INTELLECT_PERCENT
61 if ($misc == 126) echo ' (All magic)';
62 else if ($misc == 1) echo ' (Armor)';
63 else echo ' (School: '.getSpellSchool($misc).')';
67 case 24: // SPELL_AURA_PERIODIC_ENERGIZE
68 case 35: // SPELL_AURA_MOD_INCREASE_ENERGY
69 case 63: // SPELL_AURA_PERIODIC_POWER_FUNNEL
70 case 64: // SPELL_AURA_PERIODIC_POWER_LEECH
71 case 85: // SPELL_AURA_MOD_POWER_REGEN
72 case 110: // SPELL_AURA_MOD_POWER_REGEN_PERCENT
73 case 162: // SPELL_AURA_POWER_BURN_MANA
75 echo ' ('.getPowerTypeName($misc).')';
78 // Misc - тип модификатора
79 case 107: // SPELL_AURA_ADD_FLAT_MODIFIER
80 case 108: // SPELL_AURA_ADD_PCT_MODIFIER
82 echo ' ('.getSpellModName($misc).')';
86 case 44: // SPELL_AURA_TRACK_CREATURES
88 echo ' ('.getCreatureType($misc).')';
92 case 45: // SPELL_AURA_TRACK_RESOURCES
94 echo ' ('.getLockType($misc, 2).')';
97 // Misc - маска типа юнита
98 case 59: // SPELL_AURA_MOD_DAMAGE_DONE_CREATURE
99 case 102: // SPELL_AURA_MOD_MELEE_ATTACK_POWER_VERSUS
100 case 131: // SPELL_AURA_MOD_RANGED_ATTACK_POWER_VERSUS
101 case 168: // SPELL_AURA_MOD_DAMAGE_DONE_VERSUS
102 case 169: // SPELL_AURA_MOD_CRIT_PERCENT_VERSUS
103 case 180: // SPELL_AURA_MOD_SPELL_DAMAGE_VS_UNDEAD
105 echo ' ('.getCreatureTypeList($misc).')';
109 case 29: // SPELL_AURA_MOD_STAT
110 case 80: // SPELL_AURA_MOD_PERCENT_STAT
111 case 137: // SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE
112 case 175: // SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT
113 case 212: // SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT
114 case 219: // SPELL_AURA_MOD_MANA_REGEN_OF_STAT
115 case 268: // SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT
117 echo ' ('.getStatTypeName($misc).')';
121 case 30: // SPELL_AURA_MOD_SKILL
122 case 98: // SPELL_AURA_MOD_SKILL_TALENT
124 echo ' ('.getSkillName($misc).')';
128 case 36: // SPELL_AURA_MOD_SHAPESHIFT
130 echo ' ('.getForm($misc).')';
133 // Misc - тип рейтинга
134 case 189: // SPELL_AURA_MOD_RATING
135 case 220: // SPELL_AURA_MOD_RATING_FROM_STAT
137 echo ' ('.getRatingList($misc).')';
140 // Misc - тип эффекта
141 case 37: // SPELL_AURA_EFFECT_IMMUNITY
143 echo ' ('.$gSpellEffect[$misc].')';
147 case 38: // SPELL_AURA_STATE_IMMUNITY
149 echo ' ('.$gSpellAuraName[$misc].')';
152 // Misc - тип диспелла
153 case 41: // SPELL_AURA_DISPEL_IMMUNITY
154 case 178: // SPELL_AURA_MOD_DEBUFF_RESISTANCE
156 echo ' ('.getDispelName(abs($misc)).')';
159 // Misc - тип механики
160 case 77: // SPELL_AURA_MECHANIC_IMMUNITY
161 case 117: // SPELL_AURA_MOD_MECHANIC_RESISTANCE
162 case 232: // SPELL_AURA_MECHANIC_DURATION_MOD
163 case 234: // SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK
164 case 255: // SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT
166 echo ' ('.getMechanicName($misc).')';
169 case 56: // SPELL_AURA_TRANSFORM
170 case 78: // SPELL_AURA_MOUNTED
172 echo ' ('.getCreatureName($misc).')';
175 case 190: // SPELL_AURA_MOD_FACTION_REPUTATION_GAIN
177 echo ' ('.getFactionName($misc).')';
180 case 249: // SPELL_AURA_CONVERT_RUNE
182 echo ' ('.getRuneName($misc).' => '.getRuneName($miscB).')';
187 echo ' ('.$misc.($miscB ?
', '.$miscB : '').')';
192 function showEffectInfo($spell, $effect, $eff_id)
195 $misc = $spell['EffectMiscValue_'.$effect];
199 case 2: // SCHOOL_DAMAGE
201 echo ' ('.getSpellSchool($spell['SchoolMask']).')';
204 // Misc - тип энергии
205 case 8: // SPELL_EFFECT_POWER_DRAIN
206 case 30: // SPELL_EFFECT_ENERGIZE
207 case 62: // SPELL_EFFECT_POWER_BURN
209 echo ' ('.getPowerTypeName($misc).')';
212 case 16: // SPELL_EFFECT_QUEST_COMPLETE
213 case 147: // SPELL_EFFECT_QUEST_FAIL
214 case 139: // SPELL_EFFECT_CLEAR_QUEST
216 echo ' ('.getQuestName($misc).')';
219 case 28: // SPELL_EFFECT_SUMMON
220 case 56: // SPELL_EFFECT_SUMMON_PET
221 case 90: // Kill Credit
222 case 134: // Kill Credit
225 echo ' ('.getCreatureName($misc).')';
228 case 50: // SPELL_EFFECT_SUMMON_OBJECT
229 case 76: // SPELL_EFFECT_SUMMON_OBJECT_WILD
235 echo ' ('.getGameobjectName($misc).')';
238 case 53: // SPELL_EFFECT_ENCHANT_ITEM
239 case 54: // SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY
240 case 92: // SPELL_EFFECT_ENCHANT_HELD_ITEM
242 echo ' ('.getEnchantmentDesc($misc).')';
245 case 39: // SPELL_EFFECT_LANGUAGE
247 echo ' ('.getLaungageName($misc).')';
250 case 44: // SPELL_EFFECT_SKILL_STEP
251 case 118: // SPELL_EFFECT_SKILL
253 echo ' ('.getSkillName($misc).')';
256 // Misc - тип рейтинга
257 case 189: // SPELL_AURA_MOD_RATING
259 echo ' ('.getRatingList($misc).')';
262 // Misc - тип диспелла
263 case 38: // SPELL_EFFECT_DISPEL
264 case 126: // SPELL_EFFECT_STEAL_BENEFICIAL_BUFF
266 echo ' ('.getDispelName(abs($misc)).')';
269 // Misc - тип механики
270 case 108: // SPELL_EFFECT_DISPEL_MECHANIC
272 echo ' ('.getMechanicName($misc).')';
275 case 94: // SPELL_EFFECT_SELF_RESURRECT
276 case 113: // SPELL_EFFECT_RESURRECT_NEW
278 echo ' (Restore '.$misc.' power)';
281 case 103: // SPELL_EFFECT_REPUTATION
283 echo ' ('.getFactionName($misc).')';
286 case 33: // SPELL_EFFECT_OPEN_LOCK
288 echo ' ('.getLockType($misc, 2).')';
291 case 146: // SPELL_EFFECT_ACTIVATE_RUNE
293 echo ' ('.getRuneName($misc).')';
296 case 74: // SPELL_EFFECT_APPLY_GLYPH
298 echo ' ('.getGlyphName($misc).')';
308 // Spell target position on map
309 if ($t = getSpellTargetPosition($spell['id']))
310 echo '<a style="float: right;" href="?map&point='.$t['target_map'].':'.$t['target_position_x'].':'.$t['target_position_y'].':'.$t['target_position_z'].'">'.$lang['map'].'</a>';
312 if ($s = getSpellScriptTarget($spell['id']))
315 if ($s1['type']==0) echo '<br><a style="float: right;" href="?object='.$s1['targetEntry'].'">'.getGameobjectName($s1['targetEntry'],0).'</a>';
316 else if ($s1['type']==1) echo '<br><a style="float: right;" href="?npc='.$s1['targetEntry'].'">'.getCreatureName($s1['targetEntry'],0).'</a>';
317 else if ($s1['type']==2) echo '<br><a style="float: right;" href="?npc='.$s1['targetEntry'].'">'.getCreatureName($s1['targetEntry'],0).'</a>';
322 function showEffectData($spell, $effect)
325 echo '<th>Effect '.($effect-1).':</th>';
326 echo '<td colspan=3>';
328 if ($spell['Effect_'.$effect]==0)
335 $eff_id = $spell['Effect_'.$effect];
336 $aura = $spell['EffectApplyAuraName_'.$effect];
337 $itemId = $spell['EffectItemType_'.$effect];
338 $triggerId = $spell['EffectTriggerSpell_'.$effect];
339 $radius = $spell['EffectRadiusIndex_'.$effect];
340 $amount = getBasePointDesc($spell, $effect);
341 if ($aura == 107 OR $aura == 108 OR $aura == 109 OR $aura == 112)
343 $spellFamilyMask = $itemId;
347 echo "($eff_id) ".getSpellEffectName($eff_id);
349 showAuraInfo($spell, $effect, $aura);
351 showEffectInfo($spell, $effect, $eff_id);
353 if ($spell['EffectAmplitude_'.$effect])
354 echo '<br>Interval: '.($spell['EffectAmplitude_'.$effect]/1000).' sec';
358 $trigger = getSpell($triggerId);
361 echo '<table class=no_border><tbody><tr>';
363 show_spell($trigger['id'], $trigger['SpellIconID'], 'spellinfo');
365 echo '<td><a href="?spell='.$trigger['id'].'">'.$trigger['SpellName'].'</a><br>Value: '.$amount.'</td>';
366 echo '</tr></tbody></table>';
369 echo '<br>Err trigger spell id '.$triggerId;
374 $item = getItem($itemId);
378 $colorname = $item['Quality'];
379 echo "<table class=no_border><tbody><tr>";
380 echo "<td>";show_item($item['entry'], $item['displayid'], 'spellinfo');echo "</td>";
381 echo "<td><a class=$Quality[$colorname] href=\"?item=$item[entry]\">$item[name]</a>";
385 echo "</tr></tbody></table>";
388 echo "<br>Err item id ".$itemId;
393 echo "<br>Radius: ".getRadiusText($radius);
395 echo "<br>Value: ".$amount;
402 //********************************************************************************
403 // Детальная информация
404 //********************************************************************************
405 function createSpellDetails($spell)
408 echo '<table class=details width=600><tbody>';
409 echo '<tr><td colspan=4 class=head>'.$lang['detail_info'].'</td></tr>';
410 echo '<tr><th>Name</th><td colspan=2>'.$spell['SpellName'].'</td><td align=right>'.$spell['Rank'].'</td></tr>';
412 if ($spell['Description'])
413 echo '<tr><th width=60>Info:</th><td colspan=3>'.getSpellDesc($spell).'</td></tr>';
415 if ($spell['ToolTip'])
416 echo '<tr><th>Buff:</th><td colspan=3>'.getSpellBuff($spell).'</td></tr>';
417 // Стоимость и длительность
418 $cost = getSpellCostText($spell);
419 $duration = getSpellDurationText($spell);
420 if ($cost OR $duration)
421 echo '<tr><th>Cost</th><td>'.($cost?
$cost:'No Cost').'</td><th>Duration</th><td>'.$duration.'</td></tr>';
424 echo '<th width=13%>Level</th>';
425 echo '<td width=37%>Base '.$spell['baseLevel'].', Max '.$spell['maxLevel'].', Spell '.$spell['spellLevel'].'</td>';
426 echo '<th width=20%>Range</th>';
427 echo '<td width=30%>'.getRangeText($spell['rangeIndex']).'</td>';
430 // Время квста и школа (выводятся всегда)
431 echo '<tr><th>Cast time</th><td>'.getCastTimeText($spell).'</td><th>School</th><td>'.getSpellSchool($spell['SchoolMask']).'</td></tr>';
433 $skillAbility = getSkillLineAbility($spell['id']);
434 if ($skillAbility OR $spell['Category'])
437 echo '<th>Skill</th>';
439 echo '<td>'.getSkillName($skillAbility['skillId']).'</td>';
443 echo '<th>Category</th>';
444 if ($spell['Category'])
445 echo '<td>'.getCategoryName($spell['Category']).'</td>';
450 // Вывод механики и диспелла
451 if ($spell['Mechanic'] OR $spell['Dispel'])
454 echo '<th>Mechanic</th><td>'.getMechanicName($spell['Mechanic']).'</td>';
455 echo '<th>Dispel type</th><td>'.getDispelName($spell['Dispel']).'</td>';
459 $cooldown = getSpellCooldown($spell);
460 if ($cooldown OR $spell['StartRecoveryCategory'] OR $spell['StartRecoveryTime'])
463 echo '<th>Cooldown</th>';
465 echo '<td>'.getTimeText($cooldown/1000).'</td>';
467 echo '<td>No cooldown</td>';
469 echo '<th>Global cooldown</th>';
470 if ($spell['StartRecoveryCategory'] OR $spell['StartRecoveryTime'])
474 if ($spell['StartRecoveryTime'])
475 echo ', '.getTimeText($spell['StartRecoveryTime']/1000);
484 // Вывод требований форм
485 $stances = $spell['Stances'];
486 $stancesNot = $spell['StancesNot'];
487 if ($stances OR $stancesNot)
490 echo '<th>Req form</th>';
492 echo '<td>'.getAllowableForm($stances).'</td>';
496 echo '<th>Not in form</th>';
498 echo '<td>'.getAllowableForm($stancesNot).'</td>';
504 // Вывод требований одетого снаряжения
505 $itemClass = $spell['EquippedItemClass'];
506 $itemSubClass = $spell['EquippedItemSubClassMask'];
507 $inventoryTypeMask = $spell['EquippedItemInventoryTypeMask'];
508 if ($itemClass >= 0 OR $inventoryTypeMask)
511 echo '<th>Req item</th>';
516 echo getClassName($itemClass,0).': '.getSubclassList($itemClass, $itemSubClass);
518 echo getClassName($itemClass);
523 echo '<th>Inv type</th>';
524 if ($inventoryTypeMask)
525 echo '<td>'.getInventoryTypeList($inventoryTypeMask).'</td>';
530 // Вывод тотм категорий и спеллфокуса
531 $totem1=$spell['TotemCategory_1'];
532 $totem2=$spell['TotemCategory_2'];
533 $focus =$spell['RequiresSpellFocus'];
534 if ($totem1 OR $totem2 OR $focus)
537 echo '<th>Tools</th>';
538 if ($totem1 OR $totem2)
541 if ($totem1) echo getTotemCategory($totem1);
542 if ($totem2) echo ', '.getTotemCategory($totem2);
547 echo '<th>Spell Focus</th>';
549 echo '<td>'.getSpellFocusName($focus, 2).'</td>';
554 $area=$spell['AreaGroupId'];
558 echo '<th>Area</th>';
560 echo '<td>'.$area.'</td>';
565 // Вывод требований целей
566 $targets = $spell['Targets'];
567 $targetCreature = $spell['TargetCreatureType'];
568 if ($targets OR $targetCreature)
571 echo '<th>Targets</th>';
573 echo '<td>'.getTargetsList($targets).'</td>';
576 echo '<th>Creature type</th>';
578 echo '<td>'.getCreatureTypeList($targetCreature).'</td>';
583 if ($spell['Reagent_1'] OR $spell['Reagent_2'] OR $spell['Reagent_3'] OR $spell['Reagent_4'] OR
584 $spell['Reagent_5'] OR $spell['Reagent_6'] OR $spell['Reagent_7'] OR $spell['Reagent_8'])
587 echo '<th>Reagents</th>';
588 echo '<td colspan=3>'; r_spellReagents($spell); echo '</td>';
592 showEffectData($spell, 1);
593 showEffectData($spell, 2);
594 showEffectData($spell, 3);
595 echo '</tbody></table>';