Tying into the Server Stats functionality we recently implemented, this could also help feed data into Stats by sifting through histories and finding when specific things occurred, like harvesting rares (what/when/where), or when a player joins a guild, goes up in Adv level, TS level, how many of a specific mob TYPE the player has slain (Gnoll Hunter)*, and the list goes on.
This table will likely be large, so data storage should be as lean as possible.
Code: Select all
CREATE TABLE `character_history` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`char_id` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`event_type` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
`event_value` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`event_date` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`zone_name` VARCHAR(64) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
UNIQUE KEY `CharEventIDX` (`char_id`,`event_type`,`event_value`)
) ENGINE=INNODB* Note: We will need to modify our `spawn` data storage to include a spawn "type". We already need this anyway for the fact that certain spells/abilities only work on certain NPC types (is that a correct statement? Ie., only hit undead)
This is probably very easy to implement for someone who knows anything more about C++ than me
PS: LE, don't faint... I am only thinking of storing "zone_name" (instead of ID) because if the event occurs in an Instance, like player housing, we cannot just use the zone ID. Yes?