mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Merge pull request #7389 from Kiperr/4.3.4
Core/Globals: Add 5th field in reputation_spillover_template for Bilgewa...
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
ALTER TABLE `reputation_spillover_template`
|
||||
ADD COLUMN `faction5` SMALLINT(6) UNSIGNED DEFAULT '0' NOT NULL AFTER `rank_4`,
|
||||
ADD COLUMN `rate_5` FLOAT DEFAULT '0' NOT NULL AFTER `faction5`,
|
||||
ADD COLUMN `rank_5` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL AFTER `rate_5`;
|
||||
|
||||
UPDATE `reputation_spillover_template` SET `faction5`=1134,`rate_5`=0.25,`rank_5`=7 WHERE `faction` IN (72,47,54,930,69);
|
||||
UPDATE `reputation_spillover_template` SET `faction5`=1133,`rate_5`=0.25,`rank_5`=7 WHERE `faction` IN (76,530,911,81,68);
|
||||
|
||||
DELETE FROM `reputation_spillover_template` WHERE `faction` IN (1134,1133);
|
||||
INSERT INTO `reputation_spillover_template`(`faction`,`faction1`,`rate_1`,`rank_1`,`faction2`,`rate_2`,`rank_2`,`faction3`,`rate_3`,`rank_3`,`faction4`,`rate_4`,`rank_4`,`faction5`,`rate_5`,`rank_5`) VALUES
|
||||
(1134,72,0.25,7,47,0.27,7,54,0.25,7,930,0.25,7,69,0.25,7),
|
||||
(1133,76,0.25,7,530,0.27,7,911,0.25,7,81,0.25,7,68,0.25,7),
|
||||
@@ -6804,8 +6804,8 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
|
||||
|
||||
_repSpilloverTemplateStore.clear(); // for reload case
|
||||
|
||||
uint32 count = 0; // 0 1 2 3 4 5 6 7 8 9 10 11 12
|
||||
QueryResult result = WorldDatabase.Query("SELECT faction, faction1, rate_1, rank_1, faction2, rate_2, rank_2, faction3, rate_3, rank_3, faction4, rate_4, rank_4 FROM reputation_spillover_template");
|
||||
uint32 count = 0; // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||
QueryResult result = WorldDatabase.Query("SELECT faction, faction1, rate_1, rank_1, faction2, rate_2, rank_2, faction3, rate_3, rank_3, faction4, rate_4, rank_4, faction5, rate_5, rank_5 FROM reputation_spillover_template");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
@@ -6834,6 +6834,9 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
|
||||
repTemplate.faction[3] = fields[10].GetUInt16();
|
||||
repTemplate.faction_rate[3] = fields[11].GetFloat();
|
||||
repTemplate.faction_rank[3] = fields[12].GetUInt8();
|
||||
repTemplate.faction[4] = fields[13].GetUInt16();
|
||||
repTemplate.faction_rate[4] = fields[14].GetFloat();
|
||||
repTemplate.faction_rank[4] = fields[15].GetUInt16();
|
||||
|
||||
FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId);
|
||||
|
||||
@@ -6899,6 +6902,12 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
|
||||
sLog->outError(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[3]);
|
||||
continue;
|
||||
}
|
||||
FactionEntry const* factionEntry4 = sFactionStore.LookupEntry(repTemplate.faction[4]);
|
||||
if (repTemplate.faction[4] && !factionEntry4)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[4]);
|
||||
continue;
|
||||
}
|
||||
|
||||
_repSpilloverTemplateStore[factionId] = repTemplate;
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ enum ReputationRank
|
||||
#define MIN_REPUTATION_RANK (REP_HATED)
|
||||
#define MAX_REPUTATION_RANK 8
|
||||
|
||||
#define MAX_SPILLOVER_FACTIONS 4
|
||||
#define MAX_SPILLOVER_FACTIONS 5
|
||||
|
||||
enum MoneyConstants
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user