Last active
November 16, 2016 21:10
-
-
Save Lillecarl/5791606 to your computer and use it in GitHub Desktop.
A tool by <miceiken> to generate playercreateinfo_items entries. Stored here just to not get lost
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def enum(**enums): | |
return type('Enum', (), enums) | |
WoWRace = enum( | |
HUMAN = 1, | |
ORC = 2, | |
DWARF = 3, | |
NIGHTELF = 4, | |
UNDEAD = 5, | |
TAUREN = 6, | |
GNOME = 7, | |
TROLL = 8, | |
GOBLIN = 9, | |
BLOODELF = 10, | |
DRAENEI = 11) | |
WoWClass = enum( | |
WARRIOR = 1, | |
PALADIN = 2, | |
HUNTER = 3, | |
ROGUE = 4, | |
PRIEST = 5, | |
DEATHKNIGHT = 6, | |
SHAMAN = 7, | |
MAGE = 8, | |
WARLOCK = 9, | |
DRUID = 11) | |
wotlkRaceClasses = { | |
WoWClass.WARRIOR: [ | |
WoWRace.HUMAN, | |
WoWRace.ORC, | |
WoWRace.DWARF, | |
WoWRace.NIGHTELF, | |
WoWRace.UNDEAD, | |
WoWRace.TAUREN, | |
WoWRace.GNOME, | |
WoWRace.TROLL, | |
WoWRace.DRAENEI | |
], | |
WoWClass.PALADIN: [ | |
WoWRace.HUMAN, | |
WoWRace.DWARF, | |
WoWRace.TAUREN, | |
WoWRace.BLOODELF, | |
WoWRace.DRAENEI | |
], | |
WoWClass.HUNTER: [ | |
WoWRace.ORC, | |
WoWRace.DWARF, | |
WoWRace.NIGHTELF, | |
WoWRace.TAUREN, | |
WoWRace.TROLL, | |
WoWRace.BLOODELF, | |
WoWRace.DRAENEI | |
], | |
WoWClass.ROGUE: [ | |
WoWRace.DWARF, | |
WoWRace.GNOME, | |
WoWRace.HUMAN, | |
WoWRace.NIGHTELF, | |
WoWRace.BLOODELF, | |
WoWRace.ORC, | |
WoWRace.TROLL, | |
WoWRace.UNDEAD | |
], | |
WoWClass.PRIEST: [ | |
WoWRace.DRAENEI, | |
WoWRace.DWARF, | |
WoWRace.HUMAN, | |
WoWRace.NIGHTELF, | |
WoWRace.BLOODELF, | |
WoWRace.TROLL, | |
WoWRace.UNDEAD | |
], | |
WoWClass.DEATHKNIGHT: [ | |
WoWRace.DRAENEI, | |
WoWRace.DWARF, | |
WoWRace.GNOME, | |
WoWRace.HUMAN, | |
WoWRace.NIGHTELF, | |
WoWRace.BLOODELF, | |
WoWRace.ORC, | |
WoWRace.TAUREN, | |
WoWRace.TROLL, | |
WoWRace.UNDEAD | |
], | |
WoWClass.SHAMAN: [ | |
WoWRace.DRAENEI, | |
WoWRace.ORC, | |
WoWRace.TAUREN, | |
WoWRace.TROLL | |
], | |
WoWClass.MAGE: [ | |
WoWRace.DRAENEI, | |
WoWRace.GNOME, | |
WoWRace.HUMAN, | |
WoWRace.BLOODELF, | |
WoWRace.TROLL, | |
WoWRace.UNDEAD | |
], | |
WoWClass.WARLOCK: [ | |
WoWRace.GNOME, | |
WoWRace.HUMAN, | |
WoWRace.BLOODELF, | |
WoWRace.ORC, | |
WoWRace.UNDEAD | |
], | |
WoWClass.DRUID: [ | |
WoWRace.NIGHTELF, | |
WoWRace.TAUREN | |
] | |
} | |
classItems = { | |
WoWClass.WARRIOR: { 42943:1, 48685:1, 42949:1, 50255:1, 42991:2 }, | |
WoWClass.PALADIN: { 48718:1, 48685:1, 42949:1, 50255:1, 42991:2 }, | |
WoWClass.HUNTER: { 42946:1, 42943:1, 42950:1, 48577:1, 50255:1, 42991:2 }, | |
WoWClass.ROGUE: { 42944:2, 42946:1, 42952:1, 48687:1, 50255:1, 42991:2 }, | |
WoWClass.PRIEST: { 42947:1, 42985:1, 48691:1, 50255:1, 42991:2 }, | |
WoWClass.DEATHKNIGHT: { 42493:1, 48685:1, 42949:1, 50255:1, 42991:2 }, | |
WoWClass.SHAMAN: { 42493:1, 42950:1, 48577:1, 50255:1, 42991:2 }, | |
WoWClass.MAGE: { 42947:1, 42985:1, 48691:1, 50255:1, 42991:2 }, | |
WoWClass.WARLOCK: { 42947:1, 42985:1, 48691:1, 50255:1, 42991:2 }, | |
WoWClass.DRUID: { 48718:1, 42952:1, 48687:1, 50255:1, 42991:2 } | |
} | |
with open("PlayerCreateInfo.sql", "w") as sqlfile: | |
sqlfile.write("INSERT INTO `playercreateinfo_item` (`race`, `class`, `itemid`, `amount`) VALUES\n") | |
for wc, ci in classItems.iteritems(): | |
for wr in wotlkRaceClasses[wc]: | |
sqlfile.write("(%d, %d, 4500, 4),\n" % (wr, wc)) | |
for k, v in ci.iteritems(): | |
sqlfile.write("(%d, %d, %d, %d),\n" % (wr, wc, k, v)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For anyone intending to use the existing data to create heirlooms and bags for all classes, these are the right data for line 118-127.