Репутация за убийство, с учетом бонусной таблицы.)
Код:
Index: include/functions.php
===================================================================
--- include/functions.php (revision 41)
+++ include/functions.php (working copy)
@@ -666,6 +666,17 @@
return getListFromArray_0($gCreatureFlags, $mask, "?s=n&flag=%d");
return getListFromArray_0($gCreatureFlags, $mask);
}
+
+function getCreatureRewRate($faction_id)
+{
+ global $dDB;
+ $creature = $dDB->selectCell("-- CACHE: 1h
+ SELECT `creature_rate` FROM `reputation_reward_rate` WHERE `faction` = ?d", $faction_id);
+ if (!$creature)
+ $creature=1;
+ return $creature;
+}
+
//********************************************************************************
function getGameobject($gameobject_id, $fields="*")
{
Index: include/report_generator.php
===================================================================
--- include/report_generator.php (revision 41)
+++ include/report_generator.php (working copy)
@@ -781,8 +781,10 @@
}
function r_OnKillRep($data)
{
- if ($data['RewOnKillRepFaction1']) echo ($data['RewOnKillRepValue1']>0?'+':'').$data['RewOnKillRepValue1'].' '.getFactionName($data['RewOnKillRepFaction1']).' ('.getReputationRankName($data['MaxStanding1']).')';
- if ($data['RewOnKillRepFaction2']) echo '<br>'.($data['RewOnKillRepValue2']>0?'+':'').$data['RewOnKillRepValue2'].' '.getFactionName($data['RewOnKillRepFaction2']).' ('.getReputationRankName($data['MaxStanding2']).')';
+ $creature_rate1 = getCreatureRewRate($data['RewOnKillRepFaction1']);
+ $creature_rate2 = getCreatureRewRate($data['RewOnKillRepFaction2']);
+ if ($data['RewOnKillRepFaction1']) echo ($data['RewOnKillRepValue1']>0?'+':'').$data['RewOnKillRepValue1']*$creature_rate1.' '.getFactionName($data['RewOnKillRepFaction1']).' ('.getReputationRankName($data['MaxStanding1']).')';
+ if ($data['RewOnKillRepFaction2']) echo '<br>'.($data['RewOnKillRepValue2']>0?'+':'').$data['RewOnKillRepValue2']*$creature_rate2.' '.getFactionName($data['RewOnKillRepFaction2']).' ('.getReputationRankName($data['MaxStanding2']).')';
}
// NPC report generator config
$npc_report = array(