mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 01:37:05 +00:00
[12778] Add 5th field in reputation_spillover_template for Bilgewater Cartel/Gilneas spillover reputation.
This commit is contained in:
parent
fccb0cffc6
commit
a91293fe24
4 changed files with 27 additions and 3 deletions
12
sql/updates/12778_01_reputation_spillover_template.sql
Normal file
12
sql/updates/12778_01_reputation_spillover_template.sql
Normal file
|
|
@ -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);
|
||||
|
|
@ -6728,7 +6728,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
|
|||
m_RepSpilloverTemplateMap.clear(); // for reload case
|
||||
|
||||
uint32 count = 0;
|
||||
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");
|
||||
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)
|
||||
{
|
||||
|
|
@ -6765,6 +6765,11 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
|
|||
repTemplate.faction[3] = fields[10].GetUInt32();
|
||||
repTemplate.faction_rate[3] = fields[11].GetFloat();
|
||||
repTemplate.faction_rank[3] = fields[12].GetUInt32();
|
||||
repTemplate.faction[4] = fields[13].GetUInt32();
|
||||
repTemplate.faction_rate[4] = fields[14].GetFloat();
|
||||
repTemplate.faction_rank[4] = fields[15].GetUInt32();
|
||||
|
||||
|
||||
|
||||
FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId);
|
||||
|
||||
|
|
@ -6830,6 +6835,13 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
|
|||
sLog.outErrorDb("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.outErrorDb("Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[4]);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
m_RepSpilloverTemplateMap[factionId] = repTemplate;
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12777"
|
||||
#define REVISION_NR "12778"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue