server/sql/updates/10270_01_mangos_reputation_spillover_template.sql
NoFantasy fb1e8c01ef [10270] Implement basic system for reputation spillover
* Database table needs data for each faction that should give spillover to other faction(s). One faction may give spillover to max 4 other spillover factions.
* The spillover rate is multiplied with the points after bonuses and reward rate is set, Rate is given as: 0.5 for 50% gain, -1.0 for 100% loss, etc
* It is possible to restrict spillover faction by rank. If player has a higher rank with the spillover faction given in database, no spillover will be given towards this faction

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-25 17:05:34 +02:00

19 lines
1.1 KiB
SQL

ALTER TABLE db_version CHANGE COLUMN required_10263_03_mangos_pool_pool required_10270_01_mangos_reputation_spillover_template bit;
DROP TABLE IF EXISTS `reputation_spillover_template`;
CREATE TABLE `reputation_spillover_template` (
`faction` smallint(6) unsigned NOT NULL default '0' COMMENT 'faction entry',
`faction1` smallint(6) unsigned NOT NULL default '0' COMMENT 'faction to give spillover for',
`rate_1` float NOT NULL default '0' COMMENT 'the given rep points * rate',
`rank_1` tinyint(3) unsigned NOT NULL default '0' COMMENT 'max rank, above this will not give any spillover',
`faction2` smallint(6) unsigned NOT NULL default '0',
`rate_2` float NOT NULL default '0',
`rank_2` tinyint(3) unsigned NOT NULL default '0',
`faction3` smallint(6) unsigned NOT NULL default '0',
`rate_3` float NOT NULL default '0',
`rank_3` tinyint(3) unsigned NOT NULL default '0',
`faction4` smallint(6) unsigned NOT NULL default '0',
`rate_4` float NOT NULL default '0',
`rank_4` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`faction`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Reputation spillover reputation gain';