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>';
313 if ($s = getSpellScriptTarget($spell['id']))
316 if ($s1['type']==0) echo '<br><a style="float: right;" href="?object='.$s1['targetEntry'].'">'.getGameobjectName($s1['targetEntry'],0).'</a>';
317 else if ($s1['type']==1) echo '<br><a style="float: right;" href="?npc='.$s1['targetEntry'].'">'.getCreatureName($s1['targetEntry'],0).'</a>';
318 else if ($s1['type']==2) echo '<br><a style="float: right;" href="?npc='.$s1['targetEntry'].'">'.getCreatureName($s1['targetEntry'],0).'</a>';
324 function showEffectData($spell, $effect)
327 echo '<th>Effect '.($effect-1).':</th>';
328 echo '<td colspan=3>';
330 if ($spell['Effect_'.$effect]==0)
337 $eff_id = $spell['Effect_'.$effect];
338 $aura = $spell['EffectApplyAuraName_'.$effect];
339 $itemId = $spell['EffectItemType_'.$effect];
340 $triggerId = $spell['EffectTriggerSpell_'.$effect];
341 $radius = $spell['EffectRadiusIndex_'.$effect];
342 $amount = getBasePointDesc($spell, $effect);
343 if ($aura == 107 OR $aura == 108 OR $aura == 109 OR $aura == 112)
345 $spellFamilyMask = $itemId;
349 echo "($eff_id) ".getSpellEffectName($eff_id);
351 showAuraInfo($spell, $effect, $aura);
353 showEffectInfo($spell, $effect, $eff_id);
355 if ($spell['EffectAmplitude_'.$effect])
356 echo '<br>Interval: '.($spell['EffectAmplitude_'.$effect]/1000).' sec';
360 $trigger = getSpell($triggerId);
363 echo '<table class=no_border><tbody><tr>';
365 show_spell($trigger['id'], $trigger['SpellIconID'], 'spellinfo');
367 echo '<td><a href="?spell='.$trigger['id'].'">'.$trigger['SpellName'].'</a><br>Value: '.$amount.'</td>';
368 echo '</tr></tbody></table>';
371 echo '<br>Err trigger spell id '.$triggerId;
376 $item = getItem($itemId);
380 $colorname = $item['Quality'];
381 echo "<table class=no_border><tbody><tr>";
382 echo "<td>";show_item($item['entry'], $item['displayid'], 'spellinfo');echo "</td>";
383 echo "<td><a class=$Quality[$colorname] href=\"?item=$item[entry]\">$item[name]</a>";
387 echo "</tr></tbody></table>";
390 echo "<br>Err item id ".$itemId;
395 echo "<br>Radius: ".getRadiusText($radius);
397 echo "<br>Value: ".$amount;
404 //********************************************************************************
405 // Детальная информация
406 //********************************************************************************
407 function createSpellDetails($spell)
410 echo '<table class=details width=600><tbody>';
411 echo '<tr><td colspan=4 class=head>'.$lang['detail_info'].'</td></tr>';
412 echo '<tr><th>Name</th><td colspan=2>'.$spell['SpellName'].'</td><td align=right>'.$spell['Rank'].'</td></tr>';
414 if ($spell['Description'])
415 echo '<tr><th width=60>Info:</th><td colspan=3>'.getSpellDesc($spell).'</td></tr>';
417 if ($spell['ToolTip'])
418 echo '<tr><th>Buff:</th><td colspan=3>'.getSpellBuff($spell).'</td></tr>';
419 // Стоимость и длительность
420 $cost = getSpellCostText($spell);
421 $duration = getSpellDurationText($spell);
422 if ($cost OR $duration)
423 echo '<tr><th>Cost</th><td>'.($cost?
$cost:'No Cost').'</td><th>Duration</th><td>'.$duration.'</td></tr>';
426 echo '<th width=13%>Level</th>';
427 echo '<td width=37%>Base '.$spell['baseLevel'].', Max '.$spell['maxLevel'].', Spell '.$spell['spellLevel'].'</td>';
428 echo '<th width=20%>Range</th>';
429 echo '<td width=30%>'.getRangeText($spell['rangeIndex']).'</td>';
432 // Время квста и школа (выводятся всегда)
433 echo '<tr><th>Cast time</th><td>'.getCastTimeText($spell).'</td><th>School</th><td>'.getSpellSchool($spell['SchoolMask']).'</td></tr>';
435 $skillAbility = getSkillLineAbility($spell['id']);
436 if ($skillAbility OR $spell['Category'])
439 echo '<th>Skill</th>';
441 echo '<td>'.getSkillName($skillAbility['skillId']).'</td>';
445 echo '<th>Category</th>';
446 if ($spell['Category'])
447 echo '<td>'.getCategoryName($spell['Category']).'</td>';
452 // Вывод механики и диспелла
453 if ($spell['Mechanic'] OR $spell['Dispel'])
456 echo '<th>Mechanic</th><td>'.getMechanicName($spell['Mechanic']).'</td>';
457 echo '<th>Dispel type</th><td>'.getDispelName($spell['Dispel']).'</td>';
461 $cooldown = getSpellCooldown($spell);
462 if ($cooldown OR $spell['StartRecoveryCategory'] OR $spell['StartRecoveryTime'])
465 echo '<th>Cooldown</th>';
467 echo '<td>'.getTimeText($cooldown/1000).'</td>';
469 echo '<td>No cooldown</td>';
471 echo '<th>Global cooldown</th>';
472 if ($spell['StartRecoveryCategory'] OR $spell['StartRecoveryTime'])
476 if ($spell['StartRecoveryTime'])
477 echo ', '.getTimeText($spell['StartRecoveryTime']/1000);
486 // Вывод требований форм
487 $stances = $spell['Stances'];
488 $stancesNot = $spell['StancesNot'];
489 if ($stances OR $stancesNot)
492 echo '<th>Req form</th>';
494 echo '<td>'.getAllowableForm($stances).'</td>';
498 echo '<th>Not in form</th>';
500 echo '<td>'.getAllowableForm($stancesNot).'</td>';
506 // Вывод требований одетого снаряжения
507 $itemClass = $spell['EquippedItemClass'];
508 $itemSubClass = $spell['EquippedItemSubClassMask'];
509 $inventoryTypeMask = $spell['EquippedItemInventoryTypeMask'];
510 if ($itemClass >= 0 OR $inventoryTypeMask)
513 echo '<th>Req item</th>';
518 echo getClassName($itemClass,0).': '.getSubclassList($itemClass, $itemSubClass);
520 echo getClassName($itemClass);
525 echo '<th>Inv type</th>';
526 if ($inventoryTypeMask)
527 echo '<td>'.getInventoryTypeList($inventoryTypeMask).'</td>';
532 // Вывод тотм категорий и спеллфокуса
533 $totem1=$spell['TotemCategory_1'];
534 $totem2=$spell['TotemCategory_2'];
535 $focus =$spell['RequiresSpellFocus'];
536 if ($totem1 OR $totem2 OR $focus)
539 echo '<th>Tools</th>';
540 if ($totem1 OR $totem2)
543 if ($totem1) echo getTotemCategory($totem1);
544 if ($totem2) echo ', '.getTotemCategory($totem2);
549 echo '<th>Spell Focus</th>';
551 echo '<td>'.getSpellFocusName($focus, 2).'</td>';
556 $area=$spell['AreaGroupId'];
560 echo '<th>Area</th>';
562 echo '<td>'.$area.'</td>';
567 // Вывод требований целей
568 $targets = $spell['Targets'];
569 $targetCreature = $spell['TargetCreatureType'];
570 if ($targets OR $targetCreature)
573 echo '<th>Targets</th>';
575 echo '<td>'.getTargetsList($targets).'</td>';
578 echo '<th>Creature type</th>';
580 echo '<td>'.getCreatureTypeList($targetCreature).'</td>';
585 if ($spell['Reagent_1'] OR $spell['Reagent_2'] OR $spell['Reagent_3'] OR $spell['Reagent_4'] OR
586 $spell['Reagent_5'] OR $spell['Reagent_6'] OR $spell['Reagent_7'] OR $spell['Reagent_8'])
589 echo '<th>Reagents</th>';
590 echo '<td colspan=3>'; r_spellReagents($spell); echo '</td>';
594 showEffectData($spell, 1);
595 showEffectData($spell, 2);
596 showEffectData($spell, 3);
597 echo '</tbody></table>';