07.02.2011, 00:20
|
#308
|
YTDB Dev
Регистрация: 06.03.2010
Сообщений: 259
Сказал(а) спасибо: 28
Поблагодарили 280 раз(а) в 136 сообщениях
|
Попробовал.))
Код:
Index: include/creature_table.php
===================================================================
--- include/creature_table.php (revision 53)
+++ include/creature_table.php (working copy)
@@ -88,7 +88,9 @@
else if ($npc['ScriptName']<>"" && $npc['AIName']=="EventAI") {$npcscr='EventAI + SD2';}
else {$npcscr='SD2';}
- $npc['name'] = str_replace('(1)', '(Heroic)', $npc['name']);
+ $npc['name'] = str_replace('(1)', '(5H/25N)', $npc['name']);
+ $npc['name'] = str_replace('(2)', '(10H)', $npc['name']);
+ $npc['name'] = str_replace('(3)', '(25H)', $npc['name']);
echo "<TABLE class=creature cellSpacing=0>";
echo "<TBODY>";
Index: include/report_generator.php
===================================================================
--- include/report_generator.php (revision 53)
+++ include/report_generator.php (working copy)
@@ -320,6 +320,25 @@
return $gheroic;
}
+$gheroic1 = 0;
+function getHeroicList1()
+{
+ global $dDB, $gheroic1;
+ if (!$gheroic1)
+ $gheroic1 = $dDB->selectCol('-- CACHE: 1h
+ SELECT `difficulty_entry_2` AS ARRAY_KEY, `entry` FROM `creature_template` WHERE `difficulty_entry_2` <> 0');
+ return $gheroic1;
+}
+
+$gheroic2 = 0;
+function getHeroicList2()
+{
+ global $dDB, $gheroic2;
+ if (!$gheroic2)
+ $gheroic2 = $dDB->selectCol('-- CACHE: 1h
+ SELECT `difficulty_entry_3` AS ARRAY_KEY, `entry` FROM `creature_template` WHERE `difficulty_entry_3` <> 0');
+ return $gheroic2;
+}
//==============================================================================
// Callback functions
//==============================================================================
@@ -724,12 +743,26 @@
function r_npcName($data)
{
$h = getHeroicList();
+ $h1 = getHeroicList1();
+ $h2 = getHeroicList2();
if (isset($h[$data['entry']]))
{
$heroic = getCreature($h[$data['entry']]);
- $data['name']=$heroic['name'].' (Heroic)';
+ $data['name']=$heroic['name'].' (5H/25N)';
$data['subname']=$heroic['subname'];
}
+ if (isset($h1[$data['entry']]))
+ {
+ $heroic = getCreature($h1[$data['entry']]);
+ $data['name']=$heroic['name'].' (10H)';
+ $data['subname']=$heroic['subname'];
+ }
+ if (isset($h2[$data['entry']]))
+ {
+ $heroic = getCreature($h2[$data['entry']]);
+ $data['name']=$heroic['name'].' (25H)';
+ $data['subname']=$heroic['subname'];
+ }
$name = @$data['name_loc'] ? $data['name_loc'] : $data['name'];
$subname = @$data['subname_loc'] ? $data['subname_loc'] : $data['subname'];
echo '<a href="?npc='.$data['entry'].'">'.($name?$name:'no name').'</a>';
@@ -739,12 +772,26 @@
function r_npcRName($data)
{
$h = getHeroicList();
+ $h1 = getHeroicList1();
+ $h2 = getHeroicList2();
if (isset($h[$data['entry']]))
{
$heroic = getCreature($h[$data['entry']]);
- $data['name']=$heroic['name'].' (Heroic)';
+ $data['name']=$heroic['name'].' (5H/25N)';
$data['subname']=$heroic['subname'];
}
+ if (isset($h1[$data['entry']]))
+ {
+ $heroic = getCreature($h1[$data['entry']]);
+ $data['name']=$heroic['name'].' (10H)';
+ $data['subname']=$heroic['subname'];
+ }
+ if (isset($h2[$data['entry']]))
+ {
+ $heroic = getCreature($h2[$data['entry']]);
+ $data['name']=$heroic['name'].' (25H)';
+ $data['subname']=$heroic['subname'];
+ }
$name = @$data['name_loc'] ? $data['name_loc'] : $data['name'];
$subname = @$data['subname_loc'] ? $data['subname_loc'] : $data['subname'];
echo '<a href="?npc='.$data['entry'].'">'.($name?$name:'no name').'</a> <font size=-3>('.getLoyality($data['faction_A']).')</font>';
@@ -756,6 +803,15 @@
{
global $lang;
$h = getHeroicList();
+ $h1 = getHeroicList1();
+ $h2 = getHeroicList2();
+
+ if (isset($h2[$data['entry']]))
+ echo '<a href="?map&npc='.$h2[$data['entry']].'">'.$lang['map'].'</a>';
+ else
+ if (isset($h1[$data['entry']]))
+ echo '<a href="?map&npc='.$h1[$data['entry']].'">'.$lang['map'].'</a>';
+ else
if (isset($h[$data['entry']]))
echo '<a href="?map&npc='.$h[$data['entry']].'">'.$lang['map'].'</a>';
else
Index: module/show/show_npc.php
===================================================================
--- module/show/show_npc.php (revision 53)
+++ module/show/show_npc.php (working copy)
@@ -45,7 +45,18 @@
if ($cr['mingold']!=0)
echo "<b>$lang[money]</b> ".money ($cr['mingold'])."  - ".money ($cr['maxgold'])."<br>";
$heroic=getHeroicList();
+ $heroic1=getHeroicList1();
+ $heroic2=getHeroicList2();
$hentry=isset($heroic[$entry])?$heroic[$entry]:$entry;
+ $hentry1=isset($heroic1[$entry])?$heroic1[$entry]:$entry;
+ $hentry2=isset($heroic2[$entry])?$heroic2[$entry]:$entry;
+ if (hentry2)
+ echo "<a href=\"?map&npc=$hentry2\">$lang[show_map] (".getCreatureCount($hentry2).")</a><br>";
+ else
+ if (hentry1)
+ echo "<a href=\"?map&npc=$hentry1\">$lang[show_map] (".getCreatureCount($hentry1).")</a><br>";
+ else
+ if (hentry)
echo "<a href=\"?map&npc=$hentry\">$lang[show_map] (".getCreatureCount($hentry).")</a><br>";
/*
подправил вывод на странице нпц и в подсказке...
Последний раз редактировалось NeatElves; 07.02.2011 в 16:34.
|
|
|