mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
* Add faction logging category Probably should use this for more things * Add FactionAssociation struct This is simply just a struct that contains an array of faction ids and multiplier. This can hold a maximum of 10 entries (Seru hit is 8, so 2 extra) this can be raised if need be. * Add database changes and other data point changes This is all the database changes and loading changes Included is an optional SQL that will be used as a starting point, there is likely errors or typos, but we will fix those as they are discovered. * Add Client::RewardFaction function This just takes the faction ID and the magnitude of the primary faction hit and calculates the rest. The minimum change will be either 1 or -1. We stop processing after we see an ID of 0 and assume there will be no later entries. The primary faction ID will always receive a hit even if there is no faction association entries * Add users of RewardFaction to NPC death, tasks, and QuestRewards This will only use the new system if the magnitude is set, otherwise we will just use the old system still * Add quest system calls and lua QuestReward support * Add #factionassociation command This just calls RewardFaction, mostly useful for debugging
28 lines
942 B
SQL
28 lines
942 B
SQL
CREATE TABLE `faction_association` (
|
|
`id` INT(10) NOT NULL,
|
|
`id_1` INT(10) NOT NULL DEFAULT 0,
|
|
`mod_1` FLOAT NOT NULL DEFAULT 0,
|
|
`id_2` INT(10) NOT NULL DEFAULT 0,
|
|
`mod_2` FLOAT NOT NULL DEFAULT 0,
|
|
`id_3` INT(10) NOT NULL DEFAULT 0,
|
|
`mod_3` FLOAT NOT NULL DEFAULT 0,
|
|
`id_4` INT(10) NOT NULL DEFAULT 0,
|
|
`mod_4` FLOAT NOT NULL DEFAULT 0,
|
|
`id_5` INT(10) NOT NULL DEFAULT 0,
|
|
`mod_5` FLOAT NOT NULL DEFAULT 0,
|
|
`id_6` INT(10) NOT NULL DEFAULT 0,
|
|
`mod_6` FLOAT NOT NULL DEFAULT 0,
|
|
`id_7` INT(10) NOT NULL DEFAULT 0,
|
|
`mod_7` FLOAT NOT NULL DEFAULT 0,
|
|
`id_8` INT(10) NOT NULL DEFAULT 0,
|
|
`mod_8` FLOAT NOT NULL DEFAULT 0,
|
|
`id_9` INT(10) NOT NULL DEFAULT 0,
|
|
`mod_9` FLOAT NOT NULL DEFAULT 0,
|
|
`id_10` INT(10) NOT NULL DEFAULT 0,
|
|
`mod_10` FLOAT NOT NULL DEFAULT 0,
|
|
PRIMARY KEY(`id`)
|
|
);
|
|
|
|
ALTER TABLE `npc_types` ADD `faction_amount` INT(10) NOT NULL DEFAULT '0';
|
|
ALTER TABLE `tasks` ADD `faction_amount` INT(10) NOT NULL DEFAULT '0';
|