Clean-up database model #15


  • Accepted
  • Enhancment
Open
Assigned to ericbeaudoin
  • EricBeaudoin created this issue Nov 14, 2010
    Owner
    • The db.char.known is done with the exception that there is no need to put the name of the skill. I did it only for debugging reason.
    • db.global needs to be redone I think, some points:
      • In skill, trainers and valid_rep should be normal array
      • Remove unused profile options
      • trainers can be shared between Alliance and Horde (a tag might be needed and the rep might be different some times)
      • Skills should be indexed by spell_id. Professions and Classes skills could be in the same list (with proper tags), reference lists with Profession/class names and skill names can be built at startup
    • It might be a good idea to save db.char.known as one big string that is split at start

    Draft of the new data model

    db.profile.xxx = value
    

    Stays as it is except that I'll remove the variables that are not used

    db.char.known.spell_id = true
    

    Replace the spell name by true to save spece in the SaveVariables. Maybe keep a dev swith to activate for debugging. All the other entries in db.char.known will be erased.

    db.global.version = "M.m"
    

    M = major, m = minor, both numeric. This will allow the database model upgrade in the future.

    db.global.trainers = {
       trainer_name = {
          continent_id = decimal, -- The first four variables allow to map with TomTom or others
          zone_id = decimal,
          x = float,
          y = float,
          zone = "string", -- zone and sub_zone are for display and filtering
          sub_zone = "string",
          rep = "string", -- for filtering
          Horde = bolean, -- for filtering
          Alliance = bolean, -- for filtering
       }
    }
    

    Two variables for Horde and Alliance because some trainers can be used by both factions.

    db.global.skills = {
    }
    

    (to come when I have more time)

  • EricBeaudoin added the tags Accepted Enhancment Nov 14, 2010
  • EricBeaudoin edited description Nov 16, 2010
  • EricBeaudoin posted a comment Dec 22, 2010

    The skills are done now. Works better with spell_id as key and allow me to put the spell name instead of the skill name if the skill name is not known. This in turn will help with pre-populating with data that won't need to be localized.

    I've started gathering NPC ID for the trainers in a couple of weeks (when there most trainers will have been revisited), I'll see about using that as key for trainers. In this case, it will not remove the need for localisation but we will have to localize only in the trainer list and it should save space in the skill list.

    Unfortunately, there is no ID for rep that I could find.


To post a comment, please login or register a new account.