예제 #1
0
        raise optparse.OptionValueError

    mul = 10000
    div = 100
    for s in split:
        parser.values.wowversion += int(s) * mul
        mul /= div


parser = optparse.OptionParser(usage="%prog [-otlbp] [ARGS]",
                               version="%prog 1.0")
parser.add_option("-o",
                  "--out",
                  dest="output_type",
                  help="Output type (.cpp, .js) <NYI> [cpp]",
                  metavar="TYPE",
                  default="cpp",
                  action="store",
                  type="choice",
                  choices=['cpp', 'js']),
parser.add_option("-t",
                  "--type",
                  dest="type",
                  help="Processing type [spell]",
                  metavar="TYPE",
                  default="spell",
                  action="store",
                  type="choice",
                  choices=[
                      'spell', 'class_list', 'talent', 'scale', 'view', 'csv',
                      'header', 'patch', 'spec_spell_list', 'mastery_list',
예제 #2
0
#!/usr/bin/env python

import optparse, sys, os, glob, re
import dbc.generator, dbc.db, dbc.parser, dbc.patch

parser = optparse.OptionParser( usage= "%prog [-otlbp] [ARGS]", version = "%prog 1.0" )
parser.add_option("-o", "--out", dest = "output_type", 
                  help    = "Output type (.cpp, .js) <NYI> [cpp]", metavar = "TYPE", 
                  default = "cpp", action = "store", type = "choice",
                  choices = [ 'cpp', 'js' ]), 
parser.add_option("-t", "--type", dest = "type", 
                  help    = "Processing type [spell]", metavar = "TYPE", 
                  default = "spell", action = "store", type = "choice",
                  choices = [ 'spell', 'class_list', 'talent', 'scale', 'view', 
                              'header', 'patch', 'spec_spell_list', 'mastery_list', 'racial_list', 
                              'glyph_list', 'class_flags', 'set_list', 'random_property_points', 'random_suffix',
                              'item_ench', 'weapon_damage', 'item', 'item_armor', 'gem_properties', 'random_suffix_groups' ]), 
parser.add_option("-l", "--level", dest = "level", 
                  help    = "Scaling values up to level [85]", 
                  default = 85, action = "store", type = "int")
parser.add_option("-p", "--path", dest = "path", 
                  help    = "DBC input directory [cwd]", 
                  default = r'.', action = "store", type = "string")
parser.add_option("-b", "--build", dest = "build", 
                  help    = "World of Warcraft build number", 
                  default = 0, action = "store", type = "int")
parser.add_option("--prefix", dest = "prefix", 
                  help    = "Data structure prefix string", 
                  default = r'', action = "store", type = "string")
parser.add_option("--suffix", dest = "suffix", 
                  help    = "Data structure suffix string", 
예제 #3
0
def parse_wow_version(option, opt, value, parser):
    parser.values.wowversion = 0
    split = re.split('\.', value)
    if len(split) != 3:
        raise optparse.OptionValueError

    mul = 10000
    div = 100
    for s in split:
        parser.values.wowversion += int(s) * mul
        mul /= div

parser = optparse.OptionParser( usage= "%prog [-otlbp] [ARGS]", version = "%prog 1.0" )
parser.add_option("-o", "--out", dest = "output_type", 
                  help    = "Output type (.cpp, .js) <NYI> [cpp]", metavar = "TYPE", 
                  default = "cpp", action = "store", type = "choice",
                  choices = [ 'cpp', 'js' ]), 
parser.add_option("-t", "--type", dest = "type", 
                  help    = "Processing type [spell]", metavar = "TYPE", 
                  default = "spell", action = "store", type = "choice",
                  choices = [ 'spell', 'class_list', 'talent', 'scale', 'view', 'csv',
                              'header', 'patch', 'spec_spell_list', 'mastery_list', 'racial_list', 'perk_list',
                              'glyph_list', 'glyph_property_list', 'class_flags', 'set_list', 'random_property_points', 'random_suffix',
                              'item_ench', 'weapon_damage', 'item', 'item_armor', 'gem_properties', 'random_suffix_groups', 'spec_enum', 'spec_list', 'item_upgrade', 'rppm_coeff', 'set_list2', 'item_bonus' ]), 
parser.add_option("--delim", dest = "delim",
                  help = "Delimiter for -t csv",
                  default = ",", action = "store", type = "str")
parser.add_option("-l", "--level", dest = "level", 
                  help    = "Scaling values up to level [105]", 
                  default = 105, action = "store", type = "int")
parser.add_option("-p", "--path", dest = "path", 
예제 #4
0
#!/usr/bin/env python

import optparse, sys, os, glob, re
import dbc.generator, dbc.db, dbc.parser, dbc.patch

parser = optparse.OptionParser(usage="%prog [-otlbp] [ARGS]",
                               version="%prog 1.0")
parser.add_option("-o",
                  "--out",
                  dest="output_type",
                  help="Output type (.cpp, .js) <NYI> [cpp]",
                  metavar="TYPE",
                  default="cpp",
                  action="store",
                  type="choice",
                  choices=['cpp', 'js']),
parser.add_option("-t",
                  "--type",
                  dest="type",
                  help="Processing type [spell]",
                  metavar="TYPE",
                  default="spell",
                  action="store",
                  type="choice",
                  choices=[
                      'spell', 'class_list', 'talent', 'scale', 'view',
                      'header', 'patch', 'spec_spell_list', 'mastery_list',
                      'racial_list', 'glyph_list', 'class_flags', 'set_list',
                      'random_property_points', 'random_suffix', 'item_ench',
                      'weapon_damage', 'item', 'item_armor', 'gem_properties',
                      'random_suffix_groups'