Требование: PHP => 5.3
[cswowd.git] / module / show / show_npc.php
blobf23363a0baa318ddc4bcf62eae51445af7198344
1 <?php
2 include_once("conf.php");
3 include_once("include/creature_table.php");
4 include_once("include/info_table_generator.php");
5 include_once("include/report_generator.php");
6 ##########
7 /*
8 Скрипт показывает Creature по его $entry
9 Показывает:
10 - Что кастует
11 - Каким спеллом может быть призыван
12 - Что он продаёт
13 - Чему обучает
14 - Нужен для какого квеста
15 - В какую группу входит НИП (kredit)
16 - Какие квесты даёт
17 - Какие квесты принимает
18 - Лут с НИП
19 - Лут который можно украсть у НИП
20 - Лут шкурок с трупа НИП
22 $entry = intval(@$_REQUEST['npc']);
23 $page = intval(@$_REQUEST['page']);
24 $mark = @$_REQUEST['mark'];
26 $cr=getCreature($entry);
27 if (!$cr)
29 RenderError("$lang[creature_not_found]");
31 else
33 $baseLink = '?npc='.$entry;
35 if ($ajaxmode==0)
37 if ($lang['www_creature'])
38 echo "<a href=\"".sprintf($lang['www_creature'], $entry)."\" target=\"_blank\"\">".sprintf($lang['www_creature'], $entry)."</a><br>";
39 echo "<table cellspacing=0 cellpadding=0 width=500>";
40 echo "<tbody>";
41 echo "<tr>";
42 echo "<td align=center>";generateCreatureTable($cr);echo "</td>";
43 echo "</tr>";
44 echo "</tbody></table>";
46 if ($cr['MinLootGold']) echo "<b>$lang[Rew_money]</b>&nbsp;&nbsp;".money($cr['MinLootGold']);
47 if (($cr['MaxLootGold']) && ($cr['MaxLootGold']>$cr['MinLootGold'])) echo "&nbsp;-&nbsp;".money($cr['MaxLootGold']);
48 if ($cr['MinLootGold']) echo "<br>";
50 $heroic=getHeroicList();
51 $heroic1=getHeroicList1();
52 $heroic2=getHeroicList2();
54 $hentry=isset($heroic[$entry])?$heroic[$entry]:0;
55 $hentry1=isset($heroic1[$entry])?$heroic1[$entry]:0;
56 $hentry2=isset($heroic2[$entry])?$heroic2[$entry]:0;
58 if ($hentry2)
59 echo "<a href=\"?map&npc=$hentry2\">$lang[show_map]&nbsp;(".getCreatureCount($hentry2).")</a><br>";
60 else
61 if ($hentry1)
62 echo "<a href=\"?map&npc=$hentry1\">$lang[show_map]&nbsp;(".getCreatureCount($hentry1).")</a><br>";
63 else
64 if ($hentry)
65 echo "<a href=\"?map&npc=$hentry\">$lang[show_map]&nbsp;(".getCreatureCount($hentry).")</a><br>";
66 else
67 echo "<a href=\"?map&npc=$entry\">$lang[show_map]&nbsp;(".getCreatureCount($entry).")</a><br>";
69 if ($config['show_npc_detalis'])
71 echo "<br><table class=details width=600>";
72 echo "<tbody>";
73 echo "<tr><td colspan=4 class=head>$lang[detail_info]</td></tr>";
74 echo "<tr><th>Entry</th><td>".$cr['Entry']."</td><th>ModelId1</th><td>".$cr['ModelId1']."</td></tr>";
75 echo "<tr><th>DifficultyEntry1</th><td>".$cr['DifficultyEntry1']."</td><th>ModelId2</th><td>".$cr['ModelId2']."</td></tr>";
76 echo "<tr><th>DifficultyEntry2</th><td>".$cr['DifficultyEntry2']."</td><th>ModelId3</th><td>".$cr['ModelId3']."</td></tr>";
77 echo "<tr><th>DifficultyEntry3</th><td>".$cr['DifficultyEntry3']."</td><th>ModelId4</th><td>".$cr['ModelId4']."</td></tr>";
78 echo "<tr><th>Name</th><td>".$cr['Name']."<br><div class=subname>".$cr['SubName']."</div></td>";
79 echo "<th>IconName</th><td>".$cr['IconName']."</td></tr>";
80 echo "<tr><th>Level</th><td>".$cr['MinLevel']." - ".$cr['MaxLevel']."</td>";
81 echo "<th>Armor</th><td>".$cr['Armor']."</td></tr>";
82 echo "<tr><th>Health</th><td>".$cr['MinLevelHealth']." - ".$cr['MaxLevelHealth']."</td>";
83 echo "<th>Mana</th><td>".$cr['MinLevelMana']." - ".$cr['MaxLevelMana']."</td></tr>";
84 echo "<tr><th>FactionAlliance</th><td>".$cr['FactionAlliance']."</td><th>FactionHorde</th><td>".$cr['FactionHorde']."</td></tr>";
85 echo "<tr><th>NpcFlags</th><td>".$cr['NpcFlags']."</td><th>GossipMenuId</th><td>".$cr['GossipMenuId']."</td></tr>";
86 echo "<tr><th>SpeedWalk</th><td>".$cr['SpeedWalk']."</td><th>SpeedRun</th><td>".$cr['SpeedRun']."</td></tr>";
87 echo "<tr><th>Scale</th><td>".$cr['Scale']."</td><th>Rank</th><td>".$cr['Rank']."</td></tr>";
88 echo "<tr><th>MinMeleeDmg</th><td>".$cr['MinMeleeDmg']."</td><th>MaxMeleeDmg</th><td>".$cr['MaxMeleeDmg']."</td></tr>";
89 echo "<tr><th>MinRangedDmg</th><td>".$cr['MinRangedDmg']."</td><th>MaxRangedDmg</th><td>".$cr['MaxRangedDmg']."</td></tr>";
90 echo "<tr><th>DamageSchool</th><td>".$cr['DamageSchool']."</td><th>DamageMultiplier</th><td>".$cr['DamageMultiplier']."</td></tr>";
91 echo "<tr><th>MeleeAttackPower</th><td>".$cr['MeleeAttackPower']."</td><th>RangedAttackPower</th><td>".$cr['RangedAttackPower']."</td></tr>";
92 echo "<tr><th>MeleeBaseAttackTime</th><td>".$cr['MeleeBaseAttackTime']."</td><th>RangedBaseAttackTime</th><td>".$cr['RangedBaseAttackTime']."</td></tr>";
93 echo "<tr><th>UnitFlags</th><td>".$cr['UnitFlags']."</td><th>DynamicFlags</th><td>".$cr['DynamicFlags']."</td></tr>";
94 echo "<tr><th>UnitClass</th><td>".$cr['UnitClass']."</td><th>Family</th><td>".$cr['Family']."</td></tr>";
95 echo "<tr><th>TrainerType</th><td>".$cr['TrainerType']."</td><th>TrainerSpell</th><td>".$cr['TrainerSpell']."</td></tr>";
96 echo "<tr><th>TrainerClass</th><td>".$cr['TrainerClass']."</td><th>TrainerRace</th><td>".$cr['TrainerRace']."</td></tr>";
97 echo "<tr><th>CreatureType</th><td>".$cr['CreatureType']."</td><th>CreatureTypeFlags</th><td>".$cr['CreatureTypeFlags']."</td></tr>";
98 if ($cr['LootId']) echo "<tr><th>LootId</th><td>".$cr['LootId']."</td></tr>";
99 if ($cr['PickpocketLootId']) echo "<tr><th>PickpocketLootId</th><td>".$cr['PickpocketLootId']."</td></tr>";
100 if ($cr['SkinningLootId']) echo "<tr><th>SkinningLootId</th><td>".$cr['SkinningLootId']."</td></tr>";
101 echo "<tr><th>ResistanceHoly</th><td>".$cr['ResistanceHoly']."</td><th>ResistanceFire</th><td>".$cr['ResistanceFire']."</td></tr>";
102 echo "<tr><th>ResistanceNature</th><td>".$cr['ResistanceNature']."</td><th>ResistanceFrost</th><td>".$cr['ResistanceFrost']."</td></tr>";
103 echo "<tr><th>ResistanceShadow</th><td>".$cr['ResistanceShadow']."</td><th>ResistanceArcane</th><td>".$cr['ResistanceArcane']."</td></tr>";
104 if ($cr['PetSpellDataId']) echo "<tr><th>PetSpellDataId</th><td>".$cr['PetSpellDataId']."</td></tr>";
105 if ($cr['MinLootGold'])echo "<tr><th>MinLootGold</th><td>".$cr['MinLootGold']."</td><th>MaxLootGold</th><td>".$cr['MaxLootGold']."</td></tr>";
106 echo "<tr><th>MovementType</th><td>".$cr['MovementType']."</td><th>InhabitType</th><td>".$cr['InhabitType']."</td></tr>";
107 if ($cr['RacialLeader']) echo "<tr><th>RacialLeader</th><td>".$cr['RacialLeader']."</td></tr>";
108 if ($cr['EquipmentTemplateId']) echo "<tr><th>EquipmentTemplateId</th><td>".$cr['EquipmentTemplateId']."</td></tr>";
109 if ($cr['MechanicImmuneMask']) echo "<tr><th>MechanicImmuneMask</th><td>".$cr['MechanicImmuneMask']."</td></tr>";
110 if ($cr['ExtraFlags']) echo "<tr><th>ExtraFlags</th><td>".$cr['ExtraFlags']."</td></tr>";
111 echo "<tr><th>AIName</th><td>".$cr['AIName']."</td><th>ScriptName</th><td>".$cr['ScriptName']."</td></tr>";
112 echo "</tbody></table>";
114 //==========================================================
115 if ($config['show_3d_model_npc']) // Вывод 3D модели НИП
117 echo '<br><span><div align="center" style="margin-bottom:1px;font-size:11px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
118 echo '<input type="button" value="+" style="width:20px;font-size:9px;margin:0px;padding:0px;" ';
119 echo " onClick=\"if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') ";
120 echo "{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; ";
121 echo " this.innerText = ''; ";
122 echo " this.value = '-'; } ";
123 echo " else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; ";
124 echo " this.innerText = ''; ";
125 echo " this.value = '+'; }\">&nbsp;&nbsp;&nbsp;<b>$lang[view3dnpc]</b></div>";
126 echo '<div class="alt2" style="margin: 0px; padding: 0px; border: 0px inset;">';
127 echo '<div style="display: none;">';
129 if ($cr['ModelId1'])
131 echo '<span><div align="center" style="margin-bottom:1px;font-size:11px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
132 echo '<input type="button" value="+" style="width:20px;font-size:9px;margin:0px;padding:0px;" ';
133 echo " onClick=\"if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') ";
134 echo "{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; ";
135 echo " this.innerText = ''; ";
136 echo " this.value = '-'; } ";
137 echo " else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; ";
138 echo " this.innerText = ''; ";
139 echo " this.value = '+'; }\">&nbsp;&nbsp;&nbsp;<b>$game_text[display1]&nbsp;($cr[ModelId1])</b></div>";
140 echo '<div class="alt2" style="margin: 0px; padding: 0px; border: 0px inset;">';
141 echo '<div style="display: none;">';
142 switch ($cr['CreatureType']):
143 case 6:
144 case 7:
145 echo "<object data='http://static.wowhead.com/modelviewer/ModelView.swf' type='application/x-shockwave-flash' height='400' width='600'>
146 <param value='high' name='quality'>
147 <param value='always' name='allowscriptaccess'>
148 <param value='false' name='menu'>
149 <param name='wmode' value='transparent'>
150 <param value='model=$cr[ModelId1]&amp;modelType=32&amp;contentPath=http://static.wowhead.com/modelviewer/&amp;blur=1' name='flashvars'>
151 </object>";
152 break;
153 default:
154 echo "<object data='http://static.wowhead.com/modelviewer/ModelView.swf' type='application/x-shockwave-flash' height='400' width='600'>
155 <param value='high' name='quality'>
156 <param value='always' name='allowscriptaccess'>
157 <param value='false' name='menu'>
158 <param name='wmode' value='transparent'>
159 <param value='model=$cr[ModelId1]&amp;modelType=8&amp;contentPath=http://static.wowhead.com/modelviewer/&amp;blur=1' name='flashvars'>
160 </object>";
161 endswitch;
162 echo "</div></div></span>";
164 if ($cr['ModelId2'])
166 echo '<span><div align="center" style="margin-bottom:1px;font-size:11px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
167 echo '<input type="button" value="+" style="width:20px;font-size:9px;margin:0px;padding:0px;" ';
168 echo " onClick=\"if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') ";
169 echo "{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; ";
170 echo " this.innerText = ''; ";
171 echo " this.value = '-'; } ";
172 echo " else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; ";
173 echo " this.innerText = ''; ";
174 echo " this.value = '+'; }\">&nbsp;&nbsp;&nbsp;<b>$game_text[display2]&nbsp;($cr[ModelId2])</b></div>";
175 echo '<div class="alt2" style="margin: 0px; padding: 0px; border: 0px inset;">';
176 echo '<div style="display: none;">';
177 switch ($cr['CreatureType']):
178 case 6:
179 case 7:
180 echo "<object data='http://static.wowhead.com/modelviewer/ModelView.swf' type='application/x-shockwave-flash' height='400' width='600'>
181 <param value='high' name='quality'>
182 <param value='always' name='allowscriptaccess'>
183 <param value='false' name='menu'>
184 <param name='wmode' value='transparent'>
185 <param value='model=$cr[ModelId2]&amp;modelType=32&amp;contentPath=http://static.wowhead.com/modelviewer/&amp;blur=1' name='flashvars'>
186 </object>";
187 break;
188 default:
189 echo "<object data='http://static.wowhead.com/modelviewer/ModelView.swf' type='application/x-shockwave-flash' height='400' width='600'>
190 <param value='high' name='quality'>
191 <param value='always' name='allowscriptaccess'>
192 <param value='false' name='menu'>
193 <param name='wmode' value='transparent'>
194 <param value='model=$cr[ModelId2]&amp;modelType=8&amp;contentPath=http://static.wowhead.com/modelviewer/&amp;blur=1' name='flashvars'>
195 </object>";
196 endswitch;
197 echo "</div></div></span>";
199 if ($cr['ModelId3'])
201 echo '<span><div align="center" style="margin-bottom:1px;font-size:11px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
202 echo '<input type="button" value="+" style="width:20px;font-size:9px;margin:0px;padding:0px;" ';
203 echo " onClick=\"if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') ";
204 echo "{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; ";
205 echo " this.innerText = ''; ";
206 echo " this.value = '-'; } ";
207 echo " else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; ";
208 echo " this.innerText = ''; ";
209 echo " this.value = '+'; }\">&nbsp;&nbsp;&nbsp;<b>$game_text[display3]&nbsp;($cr[ModelId3])</b></div>";
210 echo '<div class="alt2" style="margin: 0px; padding: 0px; border: 0px inset;">';
211 echo '<div style="display: none;">';
212 switch ($cr['CreatureType']):
213 case 6:
214 case 7:
215 echo "<object data='http://static.wowhead.com/modelviewer/ModelView.swf' type='application/x-shockwave-flash' height='400' width='600'>
216 <param value='high' name='quality'>
217 <param value='always' name='allowscriptaccess'>
218 <param value='false' name='menu'>
219 <param name='wmode' value='transparent'>
220 <param value='model=$cr[ModelId3]&amp;modelType=32&amp;contentPath=http://static.wowhead.com/modelviewer/&amp;blur=1' name='flashvars'>
221 </object>";
222 break;
223 default:
224 echo "<object data='http://static.wowhead.com/modelviewer/ModelView.swf' type='application/x-shockwave-flash' height='400' width='600'>
225 <param value='high' name='quality'>
226 <param value='always' name='allowscriptaccess'>
227 <param value='false' name='menu'>
228 <param name='wmode' value='transparent'>
229 <param value='model=$cr[ModelId3]&amp;modelType=8&amp;contentPath=http://static.wowhead.com/modelviewer/&amp;blur=1' name='flashvars'>
230 </object>";
231 endswitch;
232 echo "</div></div></span>";
234 if ($cr['ModelId4'])
236 echo '<span><div align="center" style="margin-bottom:1px;font-size:11px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
237 echo '<input type="button" value="+" style="width:20px;font-size:9px;margin:0px;padding:0px;" ';
238 echo " onClick=\"if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') ";
239 echo "{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; ";
240 echo " this.innerText = ''; ";
241 echo " this.value = '-'; } ";
242 echo " else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; ";
243 echo " this.innerText = ''; ";
244 echo " this.value = '+'; }\">&nbsp;&nbsp;&nbsp;<b>$game_text[display4]&nbsp;($cr[ModelId4])</b></div>";
245 echo '<div class="alt2" style="margin: 0px; padding: 0px; border: 0px inset;">';
246 echo '<div style="display: none;">';
247 switch ($cr['CreatureType']):
248 case 6:
249 case 7:
250 echo "<object data='http://static.wowhead.com/modelviewer/ModelView.swf' type='application/x-shockwave-flash' height='400' width='600'>
251 <param value='high' name='quality'>
252 <param value='always' name='allowscriptaccess'>
253 <param value='false' name='menu'>
254 <param name='wmode' value='transparent'>
255 <param value='model=$cr[ModelId4]&amp;modelType=32&amp;contentPath=http://static.wowhead.com/modelviewer/&amp;blur=1' name='flashvars'>
256 </object>";
257 break;
258 default:
259 echo "<object data='http://static.wowhead.com/modelviewer/ModelView.swf' type='application/x-shockwave-flash' height='400' width='600'>
260 <param value='high' name='quality'>
261 <param value='always' name='allowscriptaccess'>
262 <param value='false' name='menu'>
263 <param name='wmode' value='transparent'>
264 <param value='model=$cr[ModelId4]&amp;modelType=8&amp;contentPath=http://static.wowhead.com/modelviewer/&amp;blur=1' name='flashvars'>
265 </object>";
266 endswitch;
267 echo "</div></div></span>";
269 echo "</div></div></span>";
274 createReportTab();
275 //********************************************************************************
276 // Summoned by spell
277 //********************************************************************************
278 $summoned_by = new SpellReportGenerator;
279 $fields = array('SPELL_REPORT_ICON','SPELL_REPORT_NAME');
280 if ($summoned_by->Init($fields, $baseLink, 'summonLIST', $config['fade_limit'], 'name'))
282 $summoned_by->summonCreature($entry);
283 $summoned_by->createReport($lang['summoned_by_spell']);
285 //********************************************************************************
286 // Cast spells
287 //********************************************************************************
288 $cast_spell = new SpellReportGenerator;
289 $fields = array('SPELL_REPORT_ICON','SPELL_REPORT_NAME');
290 if ($cast_spell->Init($fields, $baseLink, 'castLIST', $config['fade_limit'], 'name'))
292 $cast_spell->castByCreature($cr);
293 $cast_spell->createReport($lang['cast_spells']);
295 //**************************************************
296 // Vendor items list
297 //**************************************************
298 if ($cr['NpcFlags']&(UNIT_NPC_FLAG_VENDOR|UNIT_NPC_FLAG_VENDOR_AMMO|UNIT_NPC_FLAG_VENDOR_FOOD|UNIT_NPC_FLAG_VENDOR_POISON|UNIT_NPC_FLAG_VENDOR_REAGENT))
300 $sold = new ItemReportGenerator('vendor');
301 $fields = array('ITEM_REPORT_ICON','ITEM_REPORT_NAME', 'VENDOR_REPORT_COST', 'VENDOR_REPORT_COUNT', 'VENDOR_REPORT_INCTIME');
302 if ($sold->Init($fields, $baseLink, 'vendorLIST', $config['fade_limit'], 'name'))
304 $sold->vendorItemList($entry);
305 $sold->createReport($lang['sold']);
308 //**************************************************
309 // Train spells
310 //**************************************************
311 if ($cr['NpcFlags']&(UNIT_NPC_FLAG_TRAINER|UNIT_NPC_FLAG_TRAINER_CLASS|UNIT_NPC_FLAG_TRAINER_PROFESSION))
313 $train = new NPCTrainerReportGenerator();
314 $fields = array('TRAIN_REPORT_LEVEL','TRAIN_REPORT_ICON', 'TRAIN_REPORT_NAME', 'TRAIN_REPORT_SKILL', 'TRAIN_REPORT_VALUE', 'TRAIN_REPORT_COST');
315 if ($train->Init($fields, $baseLink, 'trainLIST', $config['fade_limit'], 'level'))
317 $train->trainSpell($entry);
318 $train->createReport($lang['train']);
321 //********************************************************************************
322 // Required for quest list
323 //********************************************************************************
324 $reqForQuest = new QuestReportGenerator();
325 $fields = array('QUEST_REPORT_LEVEL', 'QUEST_REPORT_NAME', 'QUEST_REPORT_GIVER', 'QUEST_REPORT_GIVER_END', 'QUEST_REPORT_REWARD');
326 if ($reqForQuest->Init($fields, $baseLink, 'qreqLIST', $config['fade_limit'], 'name'))
328 $reqForQuest->requireCreature($entry);
329 $reqForQuest->createReport($lang['req_for_quest']);
331 //********************************************************************************
332 // Kill kredit list
333 //********************************************************************************
334 $kredit = new CreatureReportGenerator();
335 $fields = array('NPC_REPORT_LEVEL', 'NPC_REPORT_RNAME', 'NPC_REPORT_MAP');
336 if ($kredit->Init($fields, $baseLink, 'r_creatureLIST', $config['fade_limit'], 'name'))
338 $kredit->kreditGroup($entry);
339 $kredit->createReport($lang['kill_kredit_group']);
341 //**************************************************
342 // Give quests
343 //**************************************************
344 if ($cr['NpcFlags']&(UNIT_NPC_FLAG_QUESTGIVER))
346 $giveQuest = new QuestReportGenerator('npc_giver');
347 $fields = array('QUEST_REPORT_LEVEL', 'QUEST_REPORT_NAME', 'QUEST_REPORT_REWARD');
348 if ($giveQuest->Init($fields, $baseLink, 'qgLIST', $config['fade_limit'], 'name'))
350 $giveQuest->getGiveTakeList($entry);
351 $giveQuest->createReport($lang['give_quest']);
354 //**************************************************
355 // Take quests
356 //**************************************************
357 if ($cr['NpcFlags']&(UNIT_NPC_FLAG_QUESTGIVER))
359 $takeQuest = new QuestReportGenerator('npc_take');
360 $fields = array('QUEST_REPORT_LEVEL', 'QUEST_REPORT_NAME', 'QUEST_REPORT_REWARD');
361 if ($takeQuest->Init($fields, $baseLink, 'qtLIST', $config['fade_limit'], 'name'))
363 $takeQuest->getGiveTakeList($entry);
364 $takeQuest->createReport($lang['take_quest']);
368 //**************************************************
369 // Loot list
370 //**************************************************
371 if ($ajaxmode==0)
373 if ($cr['LootId'])
376 $loot = new LootReportGenerator('creature_loot');
377 if ($loot->Init($fields, $baseLink, 'lootLIST', $config['fade_limit'], ''))
379 $loot->getLootList($cr['LootId']);
380 $loot->createReport($lang['can_loot']);
382 $page_seek = init_pagePerMark($mark, "lootLIST", $page);
383 $rows = getLootList($cr['LootId'], "creature_loot_template", $totalRecords, $page_seek, $config['fade_limit']);
384 renderLootTableList($rows, $lang['can_loot'], $page_seek, $totalRecords, $baseLink, "lootLIST");
387 //**************************************************
388 // Pickpocket loot
389 //**************************************************
390 if ($ajaxmode==0)
392 if ($cr['PickpocketLootId'])
394 $page_seek = init_pagePerMark($mark, "pickpocketLIST", $page);
395 $rows = getLootList($cr['PickpocketLootId'], "pickpocketing_loot_template", $totalRecords, $page_seek, $config['fade_limit']);
396 renderLootTableList($rows, $lang['can_pickpocketing'], $page_seek, $totalRecords, $baseLink, "pickpocketLIST");
399 //**************************************************
400 // Skining loot
401 //**************************************************
402 if ($ajaxmode==0)
404 if ($cr['SkinningLootId'])
406 $page_seek = init_pagePerMark($mark, "skinLIST", $page);
407 $rows = getLootList($cr['SkinningLootId'], "skinning_loot_template", $totalRecords, $page_seek, $config['fade_limit']);
408 if ($cr['CreatureTypeFlags'] & CREATURE_TYPEFLAGS_HERBLOOT)
409 renderLootTableList($rows, $lang['give_herb'], $page_seek, $totalRecords, $baseLink, "skinLIST");
410 else if ($cr['CreatureTypeFlags'] & CREATURE_TYPEFLAGS_MININGLOOT)
411 renderLootTableList($rows, $lang['give_mining'], $page_seek, $totalRecords, $baseLink, "skinLIST");
412 else if ($cr['CreatureTypeFlags'] & CREATURE_TYPEFLAGS_ENGINEERLOOT)
413 renderLootTableList($rows, $lang['give_engineer'], $page_seek, $totalRecords, $baseLink, "skinLIST");
414 else
415 renderLootTableList($rows, $lang['give_skin'], $page_seek, $totalRecords, $baseLink, "skinLIST");
418 //**************************************************
419 // Reputation
420 //**************************************************
421 $r_knpc = new CreatureReportGenerator('reputation');
422 $fields = array('ONKILL_REPUTATION');
423 if ($r_knpc->Init($fields, $baseLink, 'r_ccreatureLIST', $config['fade_limit'], 'rep'))
425 $r_knpc->rewardNpcFactionReputation($entry);
426 $r_knpc->createReport($lang['faction_kill_rew']);