Setup/DBC

* index column Id => id
 * why was this exception even there.
 * also DBCs copied directly into aowow_tables should work again
This commit is contained in:
Sarjuuk
2017-04-11 15:29:10 +02:00
parent 6df3a27279
commit b5c7faff65
25 changed files with 281 additions and 192 deletions

View File

@@ -141,36 +141,35 @@ class DBC
'zonemusic' => 'nxxxxxii' 'zonemusic' => 'nxxxxxii'
); );
private $_fields = array( private $_fields = array(
'achievement' => 'Id,faction,map,previous,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,description_loc0,description_loc2,description_loc3,description_loc6,description_loc8,category,points,orderInGroup,flags,iconId,reward_loc0,reward_loc2,reward_loc3,reward_loc6,reward_loc8,reqCriteriaCount,refAchievement', 'achievement' => 'id,faction,map,previous,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,description_loc0,description_loc2,description_loc3,description_loc6,description_loc8,category,points,orderInGroup,flags,iconId,reward_loc0,reward_loc2,reward_loc3,reward_loc6,reward_loc8,reqCriteriaCount,refAchievement',
'achievement_category' => 'Id,parentCategory,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8', 'achievement_category' => 'id,parentCategory,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8',
'achievement_criteria' => 'Id,refAchievementId,type,value1,value2,value3,value4,value5,value6,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,completionFlags,groupFlags,timeLimit,order', 'achievement_criteria' => 'id,refAchievementId,type,value1,value2,value3,value4,value5,value6,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,completionFlags,groupFlags,timeLimit,order',
'areatable' => 'Id,mapId,areaTable,flags,soundAmbience,zoneMusic,zoneIntroMusic,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,factionGroupMask', 'areatable' => 'id,mapId,areaTable,flags,soundAmbience,zoneMusic,zoneIntroMusic,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,factionGroupMask',
'areatrigger' => 'Id,mapId,posY,posX', 'areatrigger' => 'id,mapId,posY,posX',
'battlemasterlist' => 'Id,mapId,moreMapId,areaType,maxPlayers,minLevel,maxLevel', 'battlemasterlist' => 'id,mapId,moreMapId,areaType,maxPlayers,minLevel,maxLevel',
'charbaseinfo' => 'raceId,classId', 'charbaseinfo' => 'raceId,classId',
'charstartoutfit' => 'Id,raceId,classId,gender,item1,item2,item3,item4,item5,item6,item7,item8,item9,item10,item11,item12,item13,item14,item15,item16,item17,item18,item19,item20', 'charstartoutfit' => 'id,raceId,classId,gender,item1,item2,item3,item4,item5,item6,item7,item8,item9,item10,item11,item12,item13,item14,item15,item16,item17,item18,item19,item20',
'chartitles' => 'Id,male_loc0,male_loc2,male_loc3,male_loc6,male_loc8,female_loc0,female_loc2,female_loc3,female_loc6,female_loc8,bitIdx', 'chartitles' => 'id,male_loc0,male_loc2,male_loc3,male_loc6,male_loc8,female_loc0,female_loc2,female_loc3,female_loc6,female_loc8,bitIdx',
'chrclasses' => 'Id,powerType,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,fileString,flags,expansion', 'chrclasses' => 'id,powerType,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,fileString,flags,expansion',
'chrraces' => 'Id,flags,factionId,baseLanguage,fileString,side,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,expansion', 'chrraces' => 'id,flags,factionId,baseLanguage,fileString,side,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,expansion',
'creaturedisplayinfo' => 'Id,modelId,creatureSoundId,extraInfoId,skin1,skin2,skin3,iconString,npcSoundId', 'creaturedisplayinfo' => 'id,modelId,creatureSoundId,extraInfoId,skin1,skin2,skin3,iconString,npcSoundId',
'creaturedisplayinfoextra' => 'Id,textureString', 'creaturedisplayinfoextra' => 'id,textureString',
'creaturefamily' => 'Id,skillLine1,petFoodMask,petTalentType,categoryEnumID,name_loc0,name_loc2,name_loc3,name_lo6,name_loc8,iconString', 'creaturefamily' => 'id,skillLine1,petFoodMask,petTalentType,categoryEnumID,name_loc0,name_loc2,name_loc3,name_lo6,name_loc8,iconString',
'creaturemodeldata' => 'Id,creatureSoundId', 'creaturemodeldata' => 'id,creatureSoundId',
'creaturesounddata' => 'Id,exertion,exertionCritical,injury,injuryCritical,death,stun,stand,footstepTerrainId,aggro,wingFlap,wingGlide,alert,fidget,customAttack,loop,jumpStart,jumpEnd,petAttack,petOrder,petDismiss,birth,spellcast,submerge,submerged', 'creaturesounddata' => 'id,exertion,exertionCritical,injury,injuryCritical,death,stun,stand,footstepTerrainId,aggro,wingFlap,wingGlide,alert,fidget,customAttack,loop,jumpStart,jumpEnd,petAttack,petOrder,petDismiss,birth,spellcast,submerge,submerged',
'currencytypes' => 'Id,itemId,category', 'currencytypes' => 'id,itemId,category',
'dungeonmap' => 'Id,mapId,floor,minY,maxY,minX,maxX,areaId', 'dungeonmap' => 'id,mapId,floor,minY,maxY,minX,maxX,areaId',
'durabilitycosts' => 'Id,w0,w1,w2,w3,w4,w5,w6,w7,w8,w10,w11,w12,w13,w14,w15,w16,w17,w18,w19,w20,a1,a2,a3,a4,a6', 'durabilitycosts' => 'id,w0,w1,w2,w3,w4,w5,w6,w7,w8,w10,w11,w12,w13,w14,w15,w16,w17,w18,w19,w20,a1,a2,a3,a4,a6',
'durabilityquality' => 'Id,mod', 'durabilityquality' => 'id,mod',
'emotes' => 'Id,animationId', 'emotes' => 'id,animationId',
'emotestext' => 'Id,command,emoteId,targetId,noTargetId,selfId', 'emotestext' => 'id,command,emoteId,targetId,noTargetId,selfId',
'emotestextsound' => 'Id,emotesTextId,raceId,gender,soundId', 'emotestextsound' => 'id,emotesTextId,raceId,gender,soundId',
'emotestextdata' => 'Id,text_loc0,text_loc2,text_loc3,text_loc6,text_loc8', 'emotestextdata' => 'id,text_loc0,text_loc2,text_loc3,text_loc6,text_loc8',
'faction' => 'Id,repIdx,repFlags1,parentFaction,spilloverRateIn,spilloverRateOut,spilloverMaxRank,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8', 'faction' => 'id,repIdx,repFlags1,parentFaction,spilloverRateIn,spilloverRateOut,spilloverMaxRank,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8',
'factiontemplate' => 'Id,factionId,ourMask,friendlyMask,hostileMask,enemyFactionId1,enemyFactionId2,enemyFactionId3,enemyFactionId4,friendFactionId1,friendFactionId2,friendFactionId3,friendFactionId4', 'factiontemplate' => 'id,factionId,ourMask,friendlyMask,hostileMask,enemyFactionId1,enemyFactionId2,enemyFactionId3,enemyFactionId4,friendFactionId1,friendFactionId2,friendFactionId3,friendFactionId4',
'gemproperties' => 'Id,enchantmentId,colorMask', 'gemproperties' => 'id,enchantmentId,colorMask',
'glyphproperties' => 'Id,spellId,typeFlags,iconId', 'glyphproperties' => 'id,spellId,typeFlags,iconId',
'gtchancetomeleecrit' => 'chance', 'gtchancetomeleecrit' => 'chance',
'gtchancetomeleecritbase' => 'chance', 'gtchancetomeleecritbase' => 'chance',
'gtchancetospellcrit' => 'chance', 'gtchancetospellcrit' => 'chance',
@@ -180,67 +179,67 @@ class DBC
'gtoctregenhp' => 'ratio', 'gtoctregenhp' => 'ratio',
'gtregenmpperspt' => 'ratio', 'gtregenmpperspt' => 'ratio',
'gtregenhpperspt' => 'ratio', 'gtregenhpperspt' => 'ratio',
'holidays' => 'Id,looping,nameId,descriptionId,textureString,scheduleType', 'holidays' => 'id,looping,nameId,descriptionId,textureString,scheduleType',
'holidaydescriptions' => 'Id,description_loc0,description_loc2,description_loc3,description_loc6,description_loc8', 'holidaydescriptions' => 'id,description_loc0,description_loc2,description_loc3,description_loc6,description_loc8',
'holidaynames' => 'Id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8', 'holidaynames' => 'id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8',
'itemdisplayinfo' => 'Id,leftModelName,rightModelName,inventoryIcon1,spellVisualId,groupSoundId', 'itemdisplayinfo' => 'id,leftModelName,rightModelName,inventoryIcon1,spellVisualId,groupSoundId',
'itemgroupsounds' => 'Id,pickUpSoundId,dropDownSoundId', 'itemgroupsounds' => 'id,pickUpSoundId,dropDownSoundId',
'itemextendedcost' => 'Id,reqHonorPoints,reqArenaPoints,reqArenaSlot,reqItemId1,reqItemId2,reqItemId3,reqItemId4,reqItemId5,itemCount1,itemCount2,itemCount3,itemCount4,itemCount5,reqPersonalRating', 'itemextendedcost' => 'id,reqHonorPoints,reqArenaPoints,reqArenaSlot,reqItemId1,reqItemId2,reqItemId3,reqItemId4,reqItemId5,itemCount1,itemCount2,itemCount3,itemCount4,itemCount5,reqPersonalRating',
'itemlimitcategory' => 'Id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,count,isGem', 'itemlimitcategory' => 'id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,count,isGem',
'itemrandomproperties' => 'Id,nameINT,enchantId1,enchantId2,enchantId3,enchantId4,enchantId5,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8', 'itemrandomproperties' => 'id,nameINT,enchantId1,enchantId2,enchantId3,enchantId4,enchantId5,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8',
'itemrandomsuffix' => 'Id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,nameINT,enchantId1,enchantId2,enchantId3,enchantId4,enchantId5,allocationPct1,allocationPct2,allocationPct3,allocationPct4,allocationPct5', 'itemrandomsuffix' => 'id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,nameINT,enchantId1,enchantId2,enchantId3,enchantId4,enchantId5,allocationPct1,allocationPct2,allocationPct3,allocationPct4,allocationPct5',
'itemset' => 'Id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,spellId1,spellId2,spellId3,spellId4,spellId5,spellId6,spellId7,spellId8,itemCount1,itemCount2,itemCount3,itemCount4,itemCount5,itemCount6,itemCount7,itemCount8,reqSkillId,reqSkillLevel', 'itemset' => 'id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,spellId1,spellId2,spellId3,spellId4,spellId5,spellId6,spellId7,spellId8,itemCount1,itemCount2,itemCount3,itemCount4,itemCount5,itemCount6,itemCount7,itemCount8,reqSkillId,reqSkillLevel',
'itemsubclass' => 'class,subClass,weaponSize', 'itemsubclass' => 'class,subClass,weaponSize',
'lfgdungeons' => 'Id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,levelMin,levelMax,targetLevel,targetLevelMin,targetLevelMax,mapId,difficulty,type,faction,expansion,groupId', 'lfgdungeons' => 'id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,levelMin,levelMax,targetLevel,targetLevelMin,targetLevelMax,mapId,difficulty,type,faction,expansion,groupId',
'lock' => 'Id,type1,type2,type3,type4,type5,properties1,properties2,properties3,properties4,properties5,reqSkill1,reqSkill2,reqSkill3,reqSkill4,reqSkill5', 'lock' => 'id,type1,type2,type3,type4,type5,properties1,properties2,properties3,properties4,properties5,reqSkill1,reqSkill2,reqSkill3,reqSkill4,reqSkill5',
'mailtemplate' => 'Id,subject_loc0,subject_loc2,subject_loc3,subject_loc6,subject_loc8,text_loc0,text_loc2,text_loc3,text_loc6,text_loc8', 'mailtemplate' => 'id,subject_loc0,subject_loc2,subject_loc3,subject_loc6,subject_loc8,text_loc0,text_loc2,text_loc3,text_loc6,text_loc8',
'map' => 'Id,nameINT,areaType,isBG,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,parentMapId,parentX,parentY,expansion,maxPlayers', 'map' => 'id,nameINT,areaType,isBG,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,parentMapId,parentX,parentY,expansion,maxPlayers',
'mapdifficulty' => 'Id,mapId,difficulty,nPlayer,nPlayerString', 'mapdifficulty' => 'id,mapId,difficulty,nPlayer,nPlayerString',
'material' => 'Id,sheatheSoundId,unsheatheSoundId', 'material' => 'id,sheatheSoundId,unsheatheSoundId',
'npcsounds' => 'Id,greetSoundId,byeSoundId,angrySoundId', 'npcsounds' => 'id,greetSoundId,byeSoundId,angrySoundId',
'overridespelldata' => 'Id,spellId1,spellId2,spellId3,spellId4,spellId5', 'overridespelldata' => 'id,spellId1,spellId2,spellId3,spellId4,spellId5',
'powerdisplay' => 'Id,realType,globalString,r,g,b', 'powerdisplay' => 'id,realType,globalString,r,g,b',
'questfactionreward' => 'Id,field1,field2,field3,field4,field5,field6,field7,field8,field9,field10', 'questfactionreward' => 'id,field1,field2,field3,field4,field5,field6,field7,field8,field9,field10',
'questxp' => 'Id,field1,field2,field3,field4,field5,field6,field7,field8,field9,field10', 'questxp' => 'id,field1,field2,field3,field4,field5,field6,field7,field8,field9,field10',
'randproppoints' => 'Id,epic1,epic2,epic3,epic4,epic5,rare1,rare2,rare3,rare4,rare5,uncommon1,uncommon2,uncommon3,uncommon4,uncommon5', 'randproppoints' => 'id,epic1,epic2,epic3,epic4,epic5,rare1,rare2,rare3,rare4,rare5,uncommon1,uncommon2,uncommon3,uncommon4,uncommon5',
'scalingstatdistribution' => 'Id,statMod1,statMod2,statMod3,statMod4,statMod5,statMod6,statMod7,statMod8,statMod9,statMod10,modifier1,modifier2,modifier3,modifier4,modifier5,modifier6,modifier7,modifier8,modifier9,modifier10,maxLevel', 'scalingstatdistribution' => 'id,statMod1,statMod2,statMod3,statMod4,statMod5,statMod6,statMod7,statMod8,statMod9,statMod10,modifier1,modifier2,modifier3,modifier4,modifier5,modifier6,modifier7,modifier8,modifier9,modifier10,maxLevel',
'scalingstatvalues' => 'Id,shoulderMultiplier,trinketMultiplier,weaponMultiplier,rangedMultiplier,clothShoulderArmor,leatherShoulderArmor,mailShoulderArmor,plateShoulderArmor,weaponDPS1H,weaponDPS2H,casterDPS1H,casterDPS2H,rangedDPS,wandDPS,spellPower,primBudged,tertBudged,clothCloakArmor,clothChestArmor,leatherChestArmor,mailChestArmor,plateChestArmor', 'scalingstatvalues' => 'id,shoulderMultiplier,trinketMultiplier,weaponMultiplier,rangedMultiplier,clothShoulderArmor,leatherShoulderArmor,mailShoulderArmor,plateShoulderArmor,weaponDPS1H,weaponDPS2H,casterDPS1H,casterDPS2H,rangedDPS,wandDPS,spellPower,primBudged,tertBudged,clothCloakArmor,clothChestArmor,leatherChestArmor,mailChestArmor,plateChestArmor',
'skillline' => 'Id,categoryId,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,description_loc0,description_loc2,description_loc3,description_loc6,description_loc8,iconId', 'skillline' => 'id,categoryId,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,description_loc0,description_loc2,description_loc3,description_loc6,description_loc8,iconId',
'skilllineability' => 'Id,skillLineId,spellId,reqRaceMask,reqClassMask,reqSkillLevel,acquireMethod,skillLevelGrey,skillLevelYellow', 'skilllineability' => 'id,skillLineId,spellId,reqRaceMask,reqClassMask,reqSkillLevel,acquireMethod,skillLevelGrey,skillLevelYellow',
'skillraceclassinfo' => 'Id,skillLine,raceMask,classMask,flags,reqLevel', 'skillraceclassinfo' => 'id,skillLine,raceMask,classMask,flags,reqLevel',
'soundambience' => 'Id,soundIdDay,soundIdNight', 'soundambience' => 'id,soundIdDay,soundIdNight',
'soundemitters' => 'Id,posY,posX,soundId,mapId', 'soundemitters' => 'id,posY,posX,soundId,mapId',
'soundentries' => 'Id,type,name,file1,file2,file3,file4,file5,file6,file7,file8,file9,file10,path,flags', 'soundentries' => 'id,type,name,file1,file2,file3,file4,file5,file6,file7,file8,file9,file10,path,flags',
'spell' => 'Id,category,dispelType,mechanic,attributes0,attributes1,attributes2,attributes3,attributes4,attributes5,attributes6,attributes7,stanceMask,stanceMaskNot,spellFocus,castTimeId,recoveryTime,recoveryTimeCategory,procChance,procCharges,maxLevel,baseLevel,spellLevel,durationId,powerType,powerCost,powerCostPerLevel,powerPerSecond,powerPerSecondPerLevel,rangeId,stackAmount,tool1,tool2,reagent1,reagent2,reagent3,reagent4,reagent5,reagent6,reagent7,reagent8,reagentCount1,reagentCount2,reagentCount3,reagentCount4,reagentCount5,reagentCount6,reagentCount7,reagentCount8,equippedItemClass,equippedItemSubClassMask,equippedItemInventoryTypeMask,effect1Id,effect2Id,effect3Id,effect1DieSides,effect2DieSides,effect3DieSides,effect1RealPointsPerLevel,effect2RealPointsPerLevel,effect3RealPointsPerLevel,effect1BasePoints,effect2BasePoints,effect3BasePoints,effect1Mechanic,effect2Mechanic,effect3Mechanic,effect1ImplicitTargetA,effect2ImplicitTargetA,effect3ImplicitTargetA,effect1ImplicitTargetB,effect2ImplicitTargetB,effect3ImplicitTargetB,effect1RadiusId,effect2RadiusId,effect3RadiusId,effect1AuraId,effect2AuraId,effect3AuraId,effect1Periode,effect2Periode,effect3Periode,effect1ValueMultiplier,effect2ValueMultiplier,effect3ValueMultiplier,effect1ChainTarget,effect2ChainTarget,effect3ChainTarget,effect1CreateItemId,effect2CreateItemId,effect3CreateItemId,effect1MiscValue,effect2MiscValue,effect3MiscValue,effect1MiscValueB,effect2MiscValueB,effect3MiscValueB,effect1TriggerSpell,effect2TriggerSpell,effect3TriggerSpell,effect1PointsPerComboPoint,effect2PointsPerComboPoint,effect3PointsPerComboPoint,effect1SpellClassMaskA,effect2SpellClassMaskA,effect3SpellClassMaskA,effect1SpellClassMaskB,effect2SpellClassMaskB,effect3SpellClassMaskB,effect1SpellClassMaskC,effect2SpellClassMaskC,effect3SpellClassMaskC,spellVisualId1,spellVisualId2,iconId,iconIdActive,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,rank_loc0,rank_loc2,rank_loc3,rank_loc6,rank_loc8,description_loc0,description_loc2,description_loc3,description_loc6,description_loc8,buff_loc0,buff_loc2,buff_loc3,buff_loc6,buff_loc8,powerCostPercent,startRecoveryCategory,startRecoveryTime,maxTargetLevel,spellFamilyId,spellFamilyFlags1,spellFamilyFlags2,spellFamilyFlags3,maxAffectedTargets,damageClass,effect1DamageMultiplier,effect2DamageMultiplier,effect3DamageMultiplier,toolCategory1,toolCategory2,schoolMask,runeCostId,powerDisplayId,effect1BonusMultiplier,effect2BonusMultiplier,effect3BonusMultiplier,spellDescriptionVariable,spellDifficulty', 'spell' => 'id,category,dispelType,mechanic,attributes0,attributes1,attributes2,attributes3,attributes4,attributes5,attributes6,attributes7,stanceMask,stanceMaskNot,spellFocus,castTimeId,recoveryTime,recoveryTimeCategory,procChance,procCharges,maxLevel,baseLevel,spellLevel,durationId,powerType,powerCost,powerCostPerLevel,powerPerSecond,powerPerSecondPerLevel,rangeId,stackAmount,tool1,tool2,reagent1,reagent2,reagent3,reagent4,reagent5,reagent6,reagent7,reagent8,reagentCount1,reagentCount2,reagentCount3,reagentCount4,reagentCount5,reagentCount6,reagentCount7,reagentCount8,equippedItemClass,equippedItemSubClassMask,equippedItemInventoryTypeMask,effect1Id,effect2Id,effect3Id,effect1DieSides,effect2DieSides,effect3DieSides,effect1RealPointsPerLevel,effect2RealPointsPerLevel,effect3RealPointsPerLevel,effect1BasePoints,effect2BasePoints,effect3BasePoints,effect1Mechanic,effect2Mechanic,effect3Mechanic,effect1ImplicitTargetA,effect2ImplicitTargetA,effect3ImplicitTargetA,effect1ImplicitTargetB,effect2ImplicitTargetB,effect3ImplicitTargetB,effect1RadiusId,effect2RadiusId,effect3RadiusId,effect1AuraId,effect2AuraId,effect3AuraId,effect1Periode,effect2Periode,effect3Periode,effect1ValueMultiplier,effect2ValueMultiplier,effect3ValueMultiplier,effect1ChainTarget,effect2ChainTarget,effect3ChainTarget,effect1CreateItemId,effect2CreateItemId,effect3CreateItemId,effect1MiscValue,effect2MiscValue,effect3MiscValue,effect1MiscValueB,effect2MiscValueB,effect3MiscValueB,effect1TriggerSpell,effect2TriggerSpell,effect3TriggerSpell,effect1PointsPerComboPoint,effect2PointsPerComboPoint,effect3PointsPerComboPoint,effect1SpellClassMaskA,effect2SpellClassMaskA,effect3SpellClassMaskA,effect1SpellClassMaskB,effect2SpellClassMaskB,effect3SpellClassMaskB,effect1SpellClassMaskC,effect2SpellClassMaskC,effect3SpellClassMaskC,spellVisualId1,spellVisualId2,iconId,iconIdActive,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,rank_loc0,rank_loc2,rank_loc3,rank_loc6,rank_loc8,description_loc0,description_loc2,description_loc3,description_loc6,description_loc8,buff_loc0,buff_loc2,buff_loc3,buff_loc6,buff_loc8,powerCostPercent,startRecoveryCategory,startRecoveryTime,maxTargetLevel,spellFamilyId,spellFamilyFlags1,spellFamilyFlags2,spellFamilyFlags3,maxAffectedTargets,damageClass,effect1DamageMultiplier,effect2DamageMultiplier,effect3DamageMultiplier,toolCategory1,toolCategory2,schoolMask,runeCostId,powerDisplayId,effect1BonusMultiplier,effect2BonusMultiplier,effect3BonusMultiplier,spellDescriptionVariable,spellDifficulty',
'spellcasttimes' => 'Id,baseTime', 'spellcasttimes' => 'id,baseTime',
'spelldescriptionvariables' => 'Id,vars', 'spelldescriptionvariables' => 'id,vars',
'spellduration' => 'Id,baseTime', 'spellduration' => 'id,baseTime',
'spelldifficulty' => 'normal10,normal25,heroic10,heroic25', 'spelldifficulty' => 'normal10,normal25,heroic10,heroic25',
'spellfocusobject' => 'Id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8', 'spellfocusobject' => 'id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8',
'spellicon' => 'Id,iconPath', 'spellicon' => 'id,iconPath',
'spellitemenchantment' => 'Id,charges,type1,type2,type3,amount1,amount2,amount3,object1,object2,object3,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,conditionId,skillLine,skillLevel,requiredLevel', 'spellitemenchantment' => 'id,charges,type1,type2,type3,amount1,amount2,amount3,object1,object2,object3,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,conditionId,skillLine,skillLevel,requiredLevel',
'spellitemenchantmentcondition' => 'Id,color1,color2,color3,color4,color5,comparator1,comparator2,comparator3,comparator4,comparator5,cmpColor1,cmpColor2,cmpColor3,cmpColor4,cmpColor5,value1,value2,value3,value4,value5', 'spellitemenchantmentcondition' => 'id,color1,color2,color3,color4,color5,comparator1,comparator2,comparator3,comparator4,comparator5,cmpColor1,cmpColor2,cmpColor3,cmpColor4,cmpColor5,value1,value2,value3,value4,value5',
'spellradius' => 'Id,radiusMin,radiusMax', 'spellradius' => 'id,radiusMin,radiusMax',
'spellrange' => 'Id,rangeMinHostile,rangeMinFriend,rangeMaxHostile,rangeMaxFriend,rangeType,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8', 'spellrange' => 'id,rangeMinHostile,rangeMinFriend,rangeMaxHostile,rangeMaxFriend,rangeType,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8',
'spellrunecost' => 'Id,costBlood,costUnholy,costFrost,runicPowerGain', 'spellrunecost' => 'id,costBlood,costUnholy,costFrost,runicPowerGain',
'spellshapeshiftform' => 'Id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,flags,creatureType,displayIdA,displayIdH,spellId1,spellId2,spellId3,spellId4,spellId5,spellId6,spellId7,spellId8', 'spellshapeshiftform' => 'id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,flags,creatureType,displayIdA,displayIdH,spellId1,spellId2,spellId3,spellId4,spellId5,spellId6,spellId7,spellId8',
'spellvisual' => 'Id,precastKitId,castKitId,impactKitId,stateKitId,statedoneKitId,channelKitId,missileSoundId,animationSoundId,casterImpactKitId,targetImpactKitId,missileTargetingKitId,instantAreaKitId,impactAreaKitId,persistentAreaKitId', 'spellvisual' => 'id,precastKitId,castKitId,impactKitId,stateKitId,statedoneKitId,channelKitId,missileSoundId,animationSoundId,casterImpactKitId,targetImpactKitId,missileTargetingKitId,instantAreaKitId,impactAreaKitId,persistentAreaKitId',
'spellvisualkit' => 'Id,soundId', 'spellvisualkit' => 'id,soundId',
'talent' => 'Id,tabId,row,column,rank1,rank2,rank3,rank4,rank5,reqTalent,reqRank,talentSpell,petCategory1,petCategory2', 'talent' => 'id,tabId,row,column,rank1,rank2,rank3,rank4,rank5,reqTalent,reqRank,talentSpell,petCategory1,petCategory2',
'talenttab' => 'Id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,iconId,raceMask,classMask,creatureFamilyMask,tabNumber,textureFile', 'talenttab' => 'id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,iconId,raceMask,classMask,creatureFamilyMask,tabNumber,textureFile',
'taxinodes' => 'Id,mapId,posX,posY,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8', 'taxinodes' => 'id,mapId,posX,posY,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8',
'taxipath' => 'Id,startNodeId,endNodeId', 'taxipath' => 'id,startNodeId,endNodeId',
'taxipathnode' => 'Id,pathId,nodeIdx,mapId,posX,posY', 'taxipathnode' => 'id,pathId,nodeIdx,mapId,posX,posY',
'totemcategory' => 'Id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,category,categoryMask', 'totemcategory' => 'id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,category,categoryMask',
'vocaluisounds' => 'Id,raceId,soundIdMale,soundIdFemale', 'vocaluisounds' => 'id,raceId,soundIdMale,soundIdFemale',
'weaponimpactsounds' => 'Id,subClass,hit1,hit2,hit3,hit4,hit5,hit6,hit7,hit8,hit9,hit10,crit1,crit2,crit3,crit4,crit5,crit6,crit7,crit8,crit9,crit10', 'weaponimpactsounds' => 'id,subClass,hit1,hit2,hit3,hit4,hit5,hit6,hit7,hit8,hit9,hit10,crit1,crit2,crit3,crit4,crit5,crit6,crit7,crit8,crit9,crit10',
'weaponswingsounds2' => 'Id,weaponSize,soundId', 'weaponswingsounds2' => 'id,weaponSize,soundId',
'worldmaparea' => 'Id,mapId,areaId,nameINT,left,right,top,bottom,defaultDungeonMapId', 'worldmaparea' => 'id,mapId,areaId,nameINT,left,right,top,bottom,defaultDungeonMapId',
'worldmapoverlay' => 'Id,worldMapAreaId,areaTableId,textureString,w,h,x,y', 'worldmapoverlay' => 'id,worldMapAreaId,areaTableId,textureString,w,h,x,y',
'worldmaptransforms' => 'Id,sourceMapId,minX,minY,maxX,maxY,targetMapId,offsetX,offsetY,dungeonMapId', 'worldmaptransforms' => 'id,sourceMapId,minX,minY,maxX,maxY,targetMapId,offsetX,offsetY,dungeonMapId',
'worldstatezonesounds' => 'stateId,value,areaId,wmoAreaId,zoneIntroMusicId,zoneMusicId,soundAmbienceId', 'worldstatezonesounds' => 'stateId,value,areaId,wmoAreaId,zoneIntroMusicId,zoneMusicId,soundAmbienceId',
'zoneintromusictable' => 'Id,soundId', 'zoneintromusictable' => 'id,soundId',
'zonemusic' => 'Id,soundIdDay,soundIdNight' 'zonemusic' => 'id,soundIdDay,soundIdNight'
); );
private $isGameTable = false; private $isGameTable = false;

View File

@@ -256,7 +256,7 @@ if (!CLI)
{ {
// [classMask, creatureFamilyMask, tabNr, textureStr] // [classMask, creatureFamilyMask, tabNr, textureStr]
$tTabs = DB::Aowow()->select('SELECT tt.creatureFamilyMask, tt.textureFile, tt.tabNumber, cc.fileString FROM dbc_talenttab tt LEFT JOIN dbc_chrclasses cc ON cc.Id = (LOG(2, tt.classMask) + 1)'); $tTabs = DB::Aowow()->select('SELECT tt.creatureFamilyMask, tt.textureFile, tt.tabNumber, cc.fileString FROM dbc_talenttab tt LEFT JOIN dbc_chrclasses cc ON cc.id = (LOG(2, tt.classMask) + 1)');
$order = array( $order = array(
['-TopLeft', '-TopRight'], ['-TopLeft', '-TopRight'],
['-BottomLeft', '-BottomRight'] ['-BottomLeft', '-BottomRight']
@@ -336,7 +336,7 @@ if (!CLI)
3789 => 1, 1477 => 1, 3959 => 0, 3845 => 1, 2717 => 1, 3923 => 1, 3607 => 1, 3836 => 1, 2159 => 1, 4075 => 0 3789 => 1, 1477 => 1, 3959 => 0, 3845 => 1, 2717 => 1, 3923 => 1, 3607 => 1, 3836 => 1, 2159 => 1, 4075 => 0
); );
$wmo = DB::Aowow()->select('SELECT *, worldMapAreaId AS ARRAY_KEY, Id AS ARRAY_KEY2 FROM dbc_worldmapoverlay WHERE textureString <> ""'); $wmo = DB::Aowow()->select('SELECT *, worldMapAreaId AS ARRAY_KEY, id AS ARRAY_KEY2 FROM dbc_worldmapoverlay WHERE textureString <> ""');
$wma = DB::Aowow()->select('SELECT * FROM dbc_worldmaparea'); $wma = DB::Aowow()->select('SELECT * FROM dbc_worldmaparea');
if (!$wma || !$wmo) if (!$wma || !$wmo)
{ {
@@ -351,7 +351,7 @@ if (!CLI)
if ($a['areaId']) if ($a['areaId'])
continue; continue;
switch ($a['Id']) switch ($a['id'])
{ {
case 13: $a['areaId'] = -6; break; // Kalimdor case 13: $a['areaId'] = -6; break; // Kalimdor
case 14: $a['areaId'] = -3; break; // Eastern Kingdoms case 14: $a['areaId'] = -3; break; // Eastern Kingdoms
@@ -359,7 +359,7 @@ if (!CLI)
case 485: $a['areaId'] = -5; break; // Northrend case 485: $a['areaId'] = -5; break; // Northrend
} }
} }
array_unshift($wma, ['Id' => -1, 'areaId' => -1, 'nameINT' => 'World'], ['Id' => -4, 'areaId' => -4, 'nameINT' => 'Cosmic']); array_unshift($wma, ['id' => -1, 'areaId' => -1, 'nameINT' => 'World'], ['id' => -4, 'areaId' => -4, 'nameINT' => 'Cosmic']);
$sumMaps = count(CLISetup::$localeIds) * count($wma); $sumMaps = count(CLISetup::$localeIds) * count($wma);
@@ -415,7 +415,7 @@ if (!CLI)
$curMap = $progressArea + count($wma) * $progressLoc; $curMap = $progressArea + count($wma) * $progressLoc;
$progress = ' - ' . str_pad($curMap.'/'.($sumMaps), 10) . str_pad('('.number_format($curMap * 100 / $sumMaps, 2).'%)', 9); $progress = ' - ' . str_pad($curMap.'/'.($sumMaps), 10) . str_pad('('.number_format($curMap * 100 / $sumMaps, 2).'%)', 9);
$wmaId = $areaEntry['Id']; $wmaId = $areaEntry['id'];
$zoneId = $areaEntry['areaId']; $zoneId = $areaEntry['areaId'];
$textureStr = $areaEntry['nameINT']; $textureStr = $areaEntry['nameINT'];

View File

@@ -27,7 +27,7 @@ if (!CLI)
function gems() function gems()
{ {
// sketchy, but should work // sketchy, but should work
// Id < 36'000 || ilevel < 70 ? BC : WOTLK // id < 36'000 || ilevel < 70 ? BC : WOTLK
$gems = DB::Aowow()->Select( $gems = DB::Aowow()->Select(
'SELECT i.id AS itemId, 'SELECT i.id AS itemId,
i.name_loc0, i.name_loc2, i.name_loc3, i.name_loc6, i.name_loc8, i.name_loc0, i.name_loc2, i.name_loc3, i.name_loc6, i.name_loc8,

View File

@@ -31,16 +31,16 @@ if (!CLI)
IF (g.typeFlags & 0x1, 2, 1) AS type, IF (g.typeFlags & 0x1, 2, 1) AS type,
i.subclass AS classs, i.subclass AS classs,
i.requiredLevel AS level, i.requiredLevel AS level,
s1.Id AS glyphSpell, s1.id AS glyphSpell,
ic.name AS icon, ic.name AS icon,
s1.skillLine1 AS skillId, s1.skillLine1 AS skillId,
s2.Id AS glyphEffect, s2.id AS glyphEffect,
s2.Id AS ARRAY_KEY s2.id AS ARRAY_KEY
FROM ?_items i FROM ?_items i
JOIN ?_spell s1 ON s1.Id = i.spellid1 JOIN ?_spell s1 ON s1.id = i.spellid1
JOIN ?_glyphproperties g ON g.Id = s1.effect1MiscValue JOIN ?_glyphproperties g ON g.id = s1.effect1MiscValue
JOIN ?_spell s2 ON s2.Id = g.spellId JOIN ?_spell s2 ON s2.id = g.spellId
JOIN ?_icons ic ON ic.Id = s1.iconIdAlt JOIN ?_icons ic ON ic.id = s1.iconIdAlt
WHERE i.classBak = 16'); WHERE i.classBak = 16');
// check directory-structure // check directory-structure

View File

@@ -93,7 +93,7 @@ if (!CLI)
$v = $v ?: '0 AS idx'.$k; // NULL => 0 (plus some index so we can have 2x 0) $v = $v ?: '0 AS idx'.$k; // NULL => 0 (plus some index so we can have 2x 0)
}); });
$data = DB::Aowow()->select('SELECT Id AS ARRAY_KEY, '.implode(', ', $fields).' FROM dbc_scalingstatvalues'); $data = DB::Aowow()->select('SELECT id AS ARRAY_KEY, '.implode(', ', $fields).' FROM dbc_scalingstatvalues');
foreach ($data as &$d) foreach ($data as &$d)
$d = array_values($d); // strip indizes $d = array_values($d); // strip indizes
@@ -102,7 +102,7 @@ if (!CLI)
function itemScalingSD() function itemScalingSD()
{ {
$data = DB::Aowow()->select('SELECT *, Id AS ARRAY_KEY FROM dbc_scalingstatdistribution'); $data = DB::Aowow()->select('SELECT *, id AS ARRAY_KEY FROM dbc_scalingstatdistribution');
foreach ($data as &$row) foreach ($data as &$row)
{ {
$row = array_values($row); $row = array_values($row);

View File

@@ -46,7 +46,7 @@ if (!CLI)
LOWER(SUBSTRING_INDEX(cf.iconString, "\\\\", -1)) AS icon, LOWER(SUBSTRING_INDEX(cf.iconString, "\\\\", -1)) AS icon,
cf.petTalentType AS type cf.petTalentType AS type
FROM ?_creature cr FROM ?_creature cr
JOIN ?_factiontemplate ft ON ft.Id = cr.faction JOIN ?_factiontemplate ft ON ft.id = cr.faction
JOIN dbc_creaturefamily cf ON cf.id = cr.family JOIN dbc_creaturefamily cf ON cf.id = cr.family
WHERE cr.typeFlags & 0x1 AND (cr.cuFlags & 0x2) = 0 WHERE cr.typeFlags & 0x1 AND (cr.cuFlags & 0x2) = 0
ORDER BY cr.id ASC'); ORDER BY cr.id ASC');

View File

@@ -43,7 +43,7 @@ if (!CLI)
for ($l = 0; $l < count($tabs); $l++) for ($l = 0; $l < count($tabs); $l++)
{ {
$talents = DB::Aowow()->select('SELECT t.id AS tId, t.*, s.name_loc0, s.name_loc2, s.name_loc3, s.name_loc6, s.name_loc8, LOWER(SUBSTRING_INDEX(si.iconPath, "\\\\", -1)) AS iconString FROM dbc_talent t, dbc_spell s, dbc_spellicon si WHERE si.`Id` = s.`iconId` AND t.`tabId`= ?d AND s.`Id` = t.`rank1` ORDER by t.`row`, t.`column`', $tabs[$l]['Id']); $talents = DB::Aowow()->select('SELECT t.id AS tId, t.*, s.name_loc0, s.name_loc2, s.name_loc3, s.name_loc6, s.name_loc8, LOWER(SUBSTRING_INDEX(si.iconPath, "\\\\", -1)) AS iconString FROM dbc_talent t, dbc_spell s, dbc_spellicon si WHERE si.`id` = s.`iconId` AND t.`tabId`= ?d AND s.`id` = t.`rank1` ORDER by t.`row`, t.`column`', $tabs[$l]['id']);
$result[$l] = array( $result[$l] = array(
'n' => Util::localizedString($tabs[$l], 'name'), 'n' => Util::localizedString($tabs[$l], 'name'),
't' => [] 't' => []
@@ -53,7 +53,7 @@ if (!CLI)
{ {
$petFamId = log($tabs[$l]['creatureFamilyMask'], 2); $petFamId = log($tabs[$l]['creatureFamilyMask'], 2);
$result[$l]['icon'] = $petFamIcons[$petFamId]; $result[$l]['icon'] = $petFamIcons[$petFamId];
$petCategories = DB::Aowow()->SelectCol('SELECT Id AS ARRAY_KEY, categoryEnumID FROM dbc_creaturefamily WHERE petTalentType = ?d', $petFamId); $petCategories = DB::Aowow()->SelectCol('SELECT id AS ARRAY_KEY, categoryEnumID FROM dbc_creaturefamily WHERE petTalentType = ?d', $petFamId);
$result[$l]['f'] = array_keys($petCategories); $result[$l]['f'] = array_keys($petCategories);
} }
@@ -186,7 +186,7 @@ if (!CLI)
// PetCalc // PetCalc
if (empty($petIcons)) if (empty($petIcons))
{ {
$pets = DB::Aowow()->SelectCol('SELECT Id AS ARRAY_KEY, LOWER(SUBSTRING_INDEX(iconString, "\\\\", -1)) AS iconString FROM dbc_creaturefamily WHERE petTalentType IN (0, 1, 2)'); $pets = DB::Aowow()->SelectCol('SELECT id AS ARRAY_KEY, LOWER(SUBSTRING_INDEX(iconString, "\\\\", -1)) AS iconString FROM dbc_creaturefamily WHERE petTalentType IN (0, 1, 2)');
$petIcons = Util::toJSON($pets); $petIcons = Util::toJSON($pets);
} }

View File

@@ -15,7 +15,7 @@ if (!CLI)
function talentIcons() function talentIcons()
{ {
$success = true; $success = true;
$query = 'SELECT ic.name AS iconString FROM ?_icons ic JOIN ?_spell s ON s.iconId = ic.Id JOIN dbc_talent t ON t.rank1 = s.id JOIN dbc_talenttab tt ON tt.Id = t.tabId WHERE tt.?# = ?d AND tt.tabNumber = ?d ORDER BY t.row, t.column, t.petCategory1 ASC'; $query = 'SELECT ic.name AS iconString FROM ?_icons ic JOIN ?_spell s ON s.iconId = ic.id JOIN dbc_talent t ON t.rank1 = s.id JOIN dbc_talenttab tt ON tt.id = t.tabId WHERE tt.?# = ?d AND tt.tabNumber = ?d ORDER BY t.row, t.column, t.petCategory1 ASC';
$dims = 36; //v-pets $dims = 36; //v-pets
$filenames = ['icons', 'warrior', 'paladin', 'hunter', 'rogue', 'priest', 'deathknight', 'shaman', 'mage', 'warlock', null, 'druid']; $filenames = ['icons', 'warrior', 'paladin', 'hunter', 'rogue', 'priest', 'deathknight', 'shaman', 'mage', 'warlock', null, 'druid'];

View File

@@ -24,7 +24,7 @@ $reqDBC = ['spell', 'charbaseinfo', 'skillraceclassinfo', 'skilllineability', 'c
function classes() function classes()
{ {
$classes = DB::Aowow()->select('SELECT *, Id AS ARRAY_KEY FROM dbc_chrclasses'); $classes = DB::Aowow()->select('SELECT *, id AS ARRAY_KEY FROM dbc_chrclasses');
// add raceMask // add raceMask
$races = DB::Aowow()->select('SELECT classId AS ARRAY_KEY, BIT_OR(1 << (raceId - 1)) AS raceMask FROM dbc_charbaseinfo GROUP BY classId'); $races = DB::Aowow()->select('SELECT classId AS ARRAY_KEY, BIT_OR(1 << (raceId - 1)) AS raceMask FROM dbc_charbaseinfo GROUP BY classId');

View File

@@ -27,7 +27,7 @@ $reqDBC = ['itemdisplayinfo', 'currencytypes'];
function currencies(array $ids = []) function currencies(array $ids = [])
{ {
if (!$ids) if (!$ids)
DB::Aowow()->query('REPLACE INTO ?_currencies (id, category, itemId) SELECT Id, category, itemId FROM dbc_currencytypes'); DB::Aowow()->query('REPLACE INTO ?_currencies (id, category, itemId) SELECT id, category, itemId FROM dbc_currencytypes');
$moneyItems = DB::Aowow()->selectCol('SELECT id AS ARRAY_KEY, itemId FROM dbc_currencytypes{ WHERE id IN (?a)}', $ids ?: DBSIMPLE_SKIP); $moneyItems = DB::Aowow()->selectCol('SELECT id AS ARRAY_KEY, itemId FROM dbc_currencytypes{ WHERE id IN (?a)}', $ids ?: DBSIMPLE_SKIP);

View File

@@ -46,7 +46,7 @@ function emotes(/*array $ids = [] */)
} }
$_= DB::Aowow()->query('REPLACE INTO ?_emotes SELECT $_= DB::Aowow()->query('REPLACE INTO ?_emotes SELECT
et.Id, et.id,
LOWER(et.command), LOWER(et.command),
IF(e.animationId, 1, 0), IF(e.animationId, 1, 0),
0, -- cuFlags 0, -- cuFlags
@@ -56,13 +56,13 @@ function emotes(/*array $ids = [] */)
FROM FROM
dbc_emotestext et dbc_emotestext et
LEFT JOIN LEFT JOIN
dbc_emotes e ON e.Id = et.emoteId dbc_emotes e ON e.id = et.emoteId
LEFT JOIN LEFT JOIN
dbc_emotestextdata etdT ON etdT.Id = et.targetId dbc_emotestextdata etdT ON etdT.id = et.targetId
LEFT JOIN LEFT JOIN
dbc_emotestextdata etdNT ON etdNT.Id = et.noTargetId dbc_emotestextdata etdNT ON etdNT.id = et.noTargetId
LEFT JOIN LEFT JOIN
dbc_emotestextdata etdS ON etdS.Id = et.selfId' dbc_emotestextdata etdS ON etdS.id = et.selfId'
); );
if (!$_) if (!$_)

View File

@@ -72,7 +72,7 @@ function factions()
UPDATE UPDATE
?_factions f ?_factions f
JOIN JOIN
(SELECT ft.factionId, GROUP_CONCAT(ft.Id SEPARATOR " ") AS tplIds FROM dbc_factiontemplate ft GROUP BY ft.factionId) temp ON f.id = temp.factionId (SELECT ft.factionId, GROUP_CONCAT(ft.id SEPARATOR " ") AS tplIds FROM dbc_factiontemplate ft GROUP BY ft.factionId) temp ON f.id = temp.factionId
SET SET
f.templateIds = temp.tplIds'; f.templateIds = temp.tplIds';
@@ -98,7 +98,7 @@ function factions()
JOIN JOIN
dbc_faction f ON f.id = x.id dbc_faction f ON f.id = x.id
LEFT JOIN LEFT JOIN
dbc_factiontemplate ft ON f.Id = ft.factionId dbc_factiontemplate ft ON f.id = ft.factionId
SET SET
cuFlags = cuFlags | ?d cuFlags = cuFlags | ?d
WHERE WHERE

View File

@@ -169,7 +169,7 @@ function item_stats(array $ids = [])
function enchantment_stats() function enchantment_stats()
{ {
$statCols = DB::Aowow()->selectCol('SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_NAME` LIKE "%item_stats"'); $statCols = DB::Aowow()->selectCol('SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_NAME` LIKE "%item_stats"');
$enchants = DB::Aowow()->select('SELECT *, Id AS ARRAY_KEY FROM dbc_spellitemenchantment'); $enchants = DB::Aowow()->select('SELECT *, id AS ARRAY_KEY FROM dbc_spellitemenchantment');
$spells = []; $spells = [];
$spellStats = []; $spellStats = [];

View File

@@ -207,7 +207,7 @@ function items(array $ids = [])
DB::Aowow()->query('UPDATE ?_items SET class = 12 WHERE classBak = 15 AND startQuest <> 0 AND name_loc0 NOT LIKE "sayge\'s fortune%"'); DB::Aowow()->query('UPDATE ?_items SET class = 12 WHERE classBak = 15 AND startQuest <> 0 AND name_loc0 NOT LIKE "sayge\'s fortune%"');
// move perm. enchantments into appropriate cat/subcat // move perm. enchantments into appropriate cat/subcat
DB::Aowow()->query('UPDATE ?_items i, dbc_spell s SET i.class = 0, i.subClass = 6 WHERE s.Id = i.spellId1 AND s.effect1Id = 53 AND i.classBak = 12'); DB::Aowow()->query('UPDATE ?_items i, dbc_spell s SET i.class = 0, i.subClass = 6 WHERE s.id = i.spellId1 AND s.effect1Id = 53 AND i.classBak = 12');
// move some generic recipes into appropriate sub-categories // move some generic recipes into appropriate sub-categories
$skillz = array( $skillz = array(

View File

@@ -102,15 +102,15 @@ function quests(array $ids = [])
LEFT JOIN LEFT JOIN
quest_request_items qri ON q.ID = qri.ID quest_request_items qri ON q.ID = qri.ID
LEFT JOIN LEFT JOIN
locales_quest lq ON q.ID = lq.Id locales_quest lq ON q.ID = lq.id
LEFT JOIN LEFT JOIN
game_event_seasonal_questrelation gesqr ON gesqr.questId = q.ID game_event_seasonal_questrelation gesqr ON gesqr.questId = q.ID
LEFT JOIN LEFT JOIN
disables d ON d.entry = q.ID AND d.sourceType = 1 disables d ON d.entry = q.ID AND d.sourceType = 1
WHERE WHERE
q.Id > ?d q.id > ?d
{ {
AND q.Id IN (?a) AND q.id IN (?a)
} }
ORDER BY ORDER BY
q.ID ASC q.ID ASC
@@ -136,7 +136,7 @@ function quests(array $ids = [])
UPDATE UPDATE
?_quests q ?_quests q
LEFT JOIN LEFT JOIN
dbc_questfactionreward rep ON rep.Id = IF(rewardFactionValue?d > 0, 1, 2) dbc_questfactionreward rep ON rep.id = IF(rewardFactionValue?d > 0, 1, 2)
SET SET
rewardFactionValue?d = (CASE ABS(rewardFactionValue?d) rewardFactionValue?d = (CASE ABS(rewardFactionValue?d)
WHEN 0 THEN rep.Field1 WHEN 1 THEN rep.Field2 WHEN 2 THEN rep.Field3 WHEN 3 THEN rep.Field4 WHEN 4 THEN rep.Field5 WHEN 0 THEN rep.Field1 WHEN 1 THEN rep.Field2 WHEN 2 THEN rep.Field3 WHEN 3 THEN rep.Field4 WHEN 4 THEN rep.Field5

View File

@@ -33,7 +33,7 @@ function races()
REPLACE INTO REPLACE INTO
?_races ?_races
SELECT SELECT
Id, 0, flags, 0, factionId, 0, 0, baseLanguage, IF(side = 2, 0, side + 1), fileString, name_loc0, name_loc2, name_loc3, name_loc6, name_loc8, expansion id, 0, flags, 0, factionId, 0, 0, baseLanguage, IF(side = 2, 0, side + 1), fileString, name_loc0, name_loc2, name_loc3, name_loc6, name_loc8, expansion
FROM FROM
dbc_chrraces'; dbc_chrraces';

View File

@@ -34,7 +34,7 @@ function skillline()
REPLACE INTO REPLACE INTO
?_skillline ?_skillline
SELECT SELECT
Id, categoryId, 0, categoryId, name_loc0, name_loc2, name_loc3, name_loc6, name_loc8, description_loc0, description_loc2, description_loc3, description_loc6, description_loc8, 0, iconId, 0, 0, "" id, categoryId, 0, categoryId, name_loc0, name_loc2, name_loc3, name_loc6, name_loc8, description_loc0, description_loc2, description_loc3, description_loc6, description_loc8, 0, iconId, 0, 0, ""
FROM FROM
dbc_skillline'; dbc_skillline';

View File

@@ -32,7 +32,7 @@ function sounds(/*array $ids = [] */)
content: e.g. Tavern Music content: e.g. Tavern Music
*/ */
// WMOAreaTable.dbc/Id => AreaTable.dbc/Id // WMOAreaTable.dbc/id => AreaTable.dbc/id
$worldStateZoneSoundFix = array( $worldStateZoneSoundFix = array(
18153 => 2119, 18153 => 2119,
18154 => 2119, 18154 => 2119,
@@ -56,7 +56,7 @@ function sounds(/*array $ids = [] */)
// .mp3 => audio/mpeg // .mp3 => audio/mpeg
$query = ' $query = '
SELECT Id AS `id`, `type` AS `cat`, `name`, 0 AS cuFlags, SELECT id AS `id`, `type` AS `cat`, `name`, 0 AS cuFlags,
`file1` AS soundFile1, `file2` AS soundFile2, `file3` AS soundFile3, `file4` AS soundFile4, `file5` AS soundFile5, `file1` AS soundFile1, `file2` AS soundFile2, `file3` AS soundFile3, `file4` AS soundFile4, `file5` AS soundFile5,
`file6` AS soundFile6, `file7` AS soundFile7, `file8` AS soundFile8, `file9` AS soundFile9, `file10` AS soundFile10, `file6` AS soundFile6, `file7` AS soundFile7, `file8` AS soundFile8, `file9` AS soundFile9, `file10` AS soundFile10,
path, flags path, flags
@@ -196,7 +196,7 @@ function sounds(/*array $ids = [] */)
INSERT INTO INSERT INTO
?_creature_sounds (`id`, `greeting`, `farewell`, `angry`, `exertion`, `exertioncritical`, `injury`, `injurycritical`, `death`, `stun`, `stand`, `aggro`, `wingflap`, `wingglide`, `alert`, `fidget`, `customattack`, `loop`, `jumpstart`, `jumpend`, `petattack`, `petorder`, `petdismiss`, `birth`, `spellcast`, `submerge`, `submerged`) ?_creature_sounds (`id`, `greeting`, `farewell`, `angry`, `exertion`, `exertioncritical`, `injury`, `injurycritical`, `death`, `stun`, `stand`, `aggro`, `wingflap`, `wingglide`, `alert`, `fidget`, `customattack`, `loop`, `jumpstart`, `jumpend`, `petattack`, `petorder`, `petdismiss`, `birth`, `spellcast`, `submerge`, `submerged`)
SELECT SELECT
cdi.Id, cdi.id,
IFNULL(ns.greetSoundId, 0), IFNULL(ns.greetSoundId, 0),
IFNULL(ns.byeSoundId, 0), IFNULL(ns.byeSoundId, 0),
IFNULL(ns.angrySoundId, 0), IFNULL(ns.angrySoundId, 0),
@@ -226,13 +226,13 @@ function sounds(/*array $ids = [] */)
FROM FROM
dbc_creaturedisplayinfo cdi dbc_creaturedisplayinfo cdi
LEFT JOIN LEFT JOIN
dbc_creaturemodeldata cmd ON cmd.Id = cdi.modelId dbc_creaturemodeldata cmd ON cmd.id = cdi.modelId
LEFT JOIN LEFT JOIN
dbc_creaturesounddata csdA ON cdi.creatureSoundId = csdA.Id dbc_creaturesounddata csdA ON cdi.creatureSoundId = csdA.id
LEFT JOIN LEFT JOIN
dbc_creaturesounddata csdB ON cmd.creatureSoundId = csdB.Id dbc_creaturesounddata csdB ON cmd.creatureSoundId = csdB.id
LEFT JOIN LEFT JOIN
dbc_npcsounds ns ON cdi.npcSoundId = ns.Id dbc_npcsounds ns ON cdi.npcSoundId = ns.id
'); ');
@@ -250,9 +250,9 @@ function sounds(/*array $ids = [] */)
DB::Aowow()->query('TRUNCATE ?_spell_sounds'); DB::Aowow()->query('TRUNCATE ?_spell_sounds');
DB::Aowow()->query(' DB::Aowow()->query('
INSERT INTO INSERT INTO
?_spell_sounds (`Id`, `precast`, `cast`, `impact`, `state`, `statedone`, `channel`, `missile`, `animation`, `casterimpact`, `targetimpact`, `missiletargeting`, `instantarea`, `impactarea`, `persistentarea`) ?_spell_sounds (`id`, `precast`, `cast`, `impact`, `state`, `statedone`, `channel`, `missile`, `animation`, `casterimpact`, `targetimpact`, `missiletargeting`, `instantarea`, `impactarea`, `persistentarea`)
SELECT SELECT
sv.Id, sv.id,
IFNULL(svk1.soundId, 0), IFNULL(svk1.soundId, 0),
IFNULL(svk2.soundId, 0), IFNULL(svk2.soundId, 0),
IFNULL(svk3.soundId, 0), IFNULL(svk3.soundId, 0),
@@ -270,29 +270,29 @@ function sounds(/*array $ids = [] */)
FROM FROM
dbc_spellvisual sv dbc_spellvisual sv
LEFT JOIN LEFT JOIN
dbc_spellvisualkit svk1 ON svk1.Id = sv.precastKitId dbc_spellvisualkit svk1 ON svk1.id = sv.precastKitId
LEFT JOIN LEFT JOIN
dbc_spellvisualkit svk2 ON svk2.Id = sv.castKitId dbc_spellvisualkit svk2 ON svk2.id = sv.castKitId
LEFT JOIN LEFT JOIN
dbc_spellvisualkit svk3 ON svk3.Id = sv.impactKitId dbc_spellvisualkit svk3 ON svk3.id = sv.impactKitId
LEFT JOIN LEFT JOIN
dbc_spellvisualkit svk4 ON svk4.Id = sv.stateKitId dbc_spellvisualkit svk4 ON svk4.id = sv.stateKitId
LEFT JOIN LEFT JOIN
dbc_spellvisualkit svk5 ON svk5.Id = sv.statedoneKitId dbc_spellvisualkit svk5 ON svk5.id = sv.statedoneKitId
LEFT JOIN LEFT JOIN
dbc_spellvisualkit svk6 ON svk6.Id = sv.channelKitId dbc_spellvisualkit svk6 ON svk6.id = sv.channelKitId
LEFT JOIN LEFT JOIN
dbc_spellvisualkit svk7 ON svk7.Id = sv.casterImpactKitId dbc_spellvisualkit svk7 ON svk7.id = sv.casterImpactKitId
LEFT JOIN LEFT JOIN
dbc_spellvisualkit svk8 ON svk8.Id = sv.targetImpactKitId dbc_spellvisualkit svk8 ON svk8.id = sv.targetImpactKitId
LEFT JOIN LEFT JOIN
dbc_spellvisualkit svk9 ON svk9.Id = sv.missileTargetingKitId dbc_spellvisualkit svk9 ON svk9.id = sv.missileTargetingKitId
LEFT JOIN LEFT JOIN
dbc_spellvisualkit svk10 ON svk10.Id = sv.instantAreaKitId dbc_spellvisualkit svk10 ON svk10.id = sv.instantAreaKitId
LEFT JOIN LEFT JOIN
dbc_spellvisualkit svk11 ON svk11.Id = sv.impactAreaKitId dbc_spellvisualkit svk11 ON svk11.id = sv.impactAreaKitId
LEFT JOIN LEFT JOIN
dbc_spellvisualkit svk12 ON svk12.Id = sv.persistentAreaKitId dbc_spellvisualkit svk12 ON svk12.id = sv.persistentAreaKitId
'); ');

View File

@@ -356,8 +356,8 @@ function source(array $ids = [])
$spellBuff = []; $spellBuff = [];
$itemBuff = []; $itemBuff = [];
$xCostH = DB::Aowow()->selectCol('SELECT Id FROM dbc_itemextendedcost WHERE reqHonorPoints > 0 AND reqArenaPoints = 0'); $xCostH = DB::Aowow()->selectCol('SELECT id FROM dbc_itemextendedcost WHERE reqHonorPoints > 0 AND reqArenaPoints = 0');
$xCostA = DB::Aowow()->selectCol('SELECT Id FROM dbc_itemextendedcost WHERE reqArenaPoints > 0'); $xCostA = DB::Aowow()->selectCol('SELECT id FROM dbc_itemextendedcost WHERE reqArenaPoints > 0');
$vendorQuery = 'SELECT n.item AS ARRAY_KEY, SUM(n.qty) AS qty, it.class, it.subclass, it.spellid_1, it.spelltrigger_1, it.spellid_2, it.spelltrigger_2 FROM ( $vendorQuery = 'SELECT n.item AS ARRAY_KEY, SUM(n.qty) AS qty, it.class, it.subclass, it.spellid_1, it.spelltrigger_1, it.spellid_2, it.spelltrigger_2 FROM (
SELECT item, COUNT(1) AS qty FROM npc_vendor WHERE ExtendedCost IN (?a) GROUP BY item SELECT item, COUNT(1) AS qty FROM npc_vendor WHERE ExtendedCost IN (?a) GROUP BY item
UNION UNION
@@ -477,7 +477,7 @@ function source(array $ids = [])
$spellBuff = []; $spellBuff = [];
$itemBuff = []; $itemBuff = [];
$xCostIds = DB::Aowow()->selectCol('SELECT Id FROM dbc_itemextendedcost WHERE reqHonorPoints <> 0 OR reqArenaPoints <> 0'); $xCostIds = DB::Aowow()->selectCol('SELECT id FROM dbc_itemextendedcost WHERE reqHonorPoints <> 0 OR reqArenaPoints <> 0');
$vendors = DB::World()->select( $vendors = DB::World()->select(
'SELECT n.item AS ARRAY_KEY, n.npc, SUM(n.qty) AS qty, it.class, it.subclass, it.spellid_1, it.spelltrigger_1, it.spellid_2, it.spelltrigger_2 FROM ( 'SELECT n.item AS ARRAY_KEY, n.npc, SUM(n.qty) AS qty, it.class, it.subclass, it.spellid_1, it.spelltrigger_1, it.spellid_2, it.spelltrigger_2 FROM (
SELECT item, entry AS npc, COUNT(1) AS qty FROM npc_vendor WHERE ExtendedCost NOT IN (?a) GROUP BY item SELECT item, entry AS npc, COUNT(1) AS qty FROM npc_vendor WHERE ExtendedCost NOT IN (?a) GROUP BY item
@@ -1088,7 +1088,7 @@ function source(array $ids = [])
CLISetup::log(' * #6 Trainer'); CLISetup::log(' * #6 Trainer');
if ($tNpcs = DB::World()->select('SELECT SpellID AS ARRAY_KEY, ID AS entry, COUNT(1) AS qty FROM npc_trainer WHERE SpellID > 0 GROUP BY ARRAY_KEY')) if ($tNpcs = DB::World()->select('SELECT SpellID AS ARRAY_KEY, ID AS entry, COUNT(1) AS qty FROM npc_trainer WHERE SpellID > 0 GROUP BY ARRAY_KEY'))
{ {
$tSpells = DB::Aowow()->select('SELECT Id AS ARRAY_KEY, effect1Id, effect2Id, effect3Id, effect1TriggerSpell, effect2TriggerSpell, effect3TriggerSpell FROM dbc_spell WHERE Id IN (?a)', array_keys($tNpcs)); $tSpells = DB::Aowow()->select('SELECT id AS ARRAY_KEY, effect1Id, effect2Id, effect3Id, effect1TriggerSpell, effect2TriggerSpell, effect3TriggerSpell FROM dbc_spell WHERE id IN (?a)', array_keys($tNpcs));
$buff = []; $buff = [];
// todo (med): this skips some spells (e.g. riding) // todo (med): this skips some spells (e.g. riding)
@@ -1126,9 +1126,9 @@ function source(array $ids = [])
# 9: Talent # 9: Talent
CLISetup::log(' * #9 Talent'); CLISetup::log(' * #9 Talent');
$tSpells = DB::Aowow()->select(' $tSpells = DB::Aowow()->select('
SELECT s.Id AS ARRAY_KEY, s.effect1Id, s.effect2Id, s.effect3Id, s.effect1TriggerSpell, s.effect2TriggerSpell, s.effect3TriggerSpell SELECT s.id AS ARRAY_KEY, s.effect1Id, s.effect2Id, s.effect3Id, s.effect1TriggerSpell, s.effect2TriggerSpell, s.effect3TriggerSpell
FROM dbc_talent t FROM dbc_talent t
JOIN dbc_spell s ON s.Id = t.rank1 JOIN dbc_spell s ON s.id = t.rank1
WHERE t.rank2 < 1 AND (t.talentSpell = 1 OR (s.effect1Id = 36 OR s.effect2Id = 36 OR s.effect3Id = 36)) WHERE t.rank2 < 1 AND (t.talentSpell = 1 OR (s.effect1Id = 36 OR s.effect2Id = 36 OR s.effect3Id = 36))
'); ');
@@ -1155,7 +1155,7 @@ function source(array $ids = [])
if (!$recurse) if (!$recurse)
break; break;
$tSpells = DB::Aowow()->select('SELECT Id AS ARRAY_KEY, effect1Id, effect2Id, effect3Id, effect1TriggerSpell, effect2TriggerSpell, effect3TriggerSpell FROM dbc_spell WHERE Id IN (?a)', array_keys($recurse)); $tSpells = DB::Aowow()->select('SELECT id AS ARRAY_KEY, effect1Id, effect2Id, effect3Id, effect1TriggerSpell, effect2TriggerSpell, effect3TriggerSpell FROM dbc_spell WHERE id IN (?a)', array_keys($recurse));
} }
DB::Aowow()->query(queryfy('[V]', $buff, $insBasic), 9, 9, 9); DB::Aowow()->query(queryfy('[V]', $buff, $insBasic), 9, 9, 9);

View File

@@ -98,11 +98,11 @@ function spawns() // and waypoints
'FROM gameobject c', 'FROM gameobject c',
' - assembling '.CLISetup::bold('gameobject').' spawns']; ' - assembling '.CLISetup::bold('gameobject').' spawns'];
$query[3] = ['SELECT Id AS "guid", 19 AS "type", soundId AS typeId, 0 AS respawn, 0 AS phaseMask, 0 AS areaId, mapId AS "map", 0 AS pathId, posX, posY ' . $query[3] = ['SELECT id AS "guid", 19 AS "type", soundId AS typeId, 0 AS respawn, 0 AS phaseMask, 0 AS areaId, mapId AS "map", 0 AS pathId, posX, posY ' .
'FROM dbc_soundemitters', 'FROM dbc_soundemitters',
' - assembling '.CLISetup::bold('sound emitter').' spawns']; ' - assembling '.CLISetup::bold('sound emitter').' spawns'];
$query[4] = ['SELECT Id AS "guid", 503 AS "type", Id AS typeId, 0 AS respawn, 0 AS phaseMask, 0 AS areaId, mapId AS "map", 0 AS pathId, posX, posY ' . $query[4] = ['SELECT id AS "guid", 503 AS "type", id AS typeId, 0 AS respawn, 0 AS phaseMask, 0 AS areaId, mapId AS "map", 0 AS pathId, posX, posY ' .
'FROM dbc_areatrigger', 'FROM dbc_areatrigger',
' - assembling '.CLISetup::bold('areatrigger').' spawns']; ' - assembling '.CLISetup::bold('areatrigger').' spawns'];
@@ -118,15 +118,15 @@ function spawns() // and waypoints
'FROM creature c JOIN creature_addon ca ON ca.guid = c.guid JOIN waypoint_data w ON w.id = ca.path_id WHERE ca.path_id <> 0', 'FROM creature c JOIN creature_addon ca ON ca.guid = c.guid JOIN waypoint_data w ON w.id = ca.path_id WHERE ca.path_id <> 0',
' - assembling waypoints from '.CLISetup::bold('waypoint_data')]; ' - assembling waypoints from '.CLISetup::bold('waypoint_data')];
$queryPost = 'SELECT dm.Id, wma.areaId, IFNULL(dm.floor, 0) AS floor, ' . $queryPost = 'SELECT dm.id, wma.areaId, IFNULL(dm.floor, 0) AS floor, ' .
'100 - ROUND(IF(dm.Id IS NOT NULL, (?f - dm.minY) * 100 / (dm.maxY - dm.minY), (?f - wma.right) * 100 / (wma.left - wma.right)), 1) AS `posX`, ' . '100 - ROUND(IF(dm.id IS NOT NULL, (?f - dm.minY) * 100 / (dm.maxY - dm.minY), (?f - wma.right) * 100 / (wma.left - wma.right)), 1) AS `posX`, ' .
'100 - ROUND(IF(dm.Id IS NOT NULL, (?f - dm.minX) * 100 / (dm.maxX - dm.minX), (?f - wma.bottom) * 100 / (wma.top - wma.bottom)), 1) AS `posY`, ' . '100 - ROUND(IF(dm.id IS NOT NULL, (?f - dm.minX) * 100 / (dm.maxX - dm.minX), (?f - wma.bottom) * 100 / (wma.top - wma.bottom)), 1) AS `posY`, ' .
'((abs(IF(dm.Id IS NOT NULL, (?f - dm.minY) * 100 / (dm.maxY - dm.minY), (?f - wma.right) * 100 / (wma.left - wma.right)) - 50) / 50) * ' . '((abs(IF(dm.id IS NOT NULL, (?f - dm.minY) * 100 / (dm.maxY - dm.minY), (?f - wma.right) * 100 / (wma.left - wma.right)) - 50) / 50) * ' .
' (abs(IF(dm.Id IS NOT NULL, (?f - dm.minX) * 100 / (dm.maxX - dm.minX), (?f - wma.bottom) * 100 / (wma.top - wma.bottom)) - 50) / 50)) AS quality ' . ' (abs(IF(dm.id IS NOT NULL, (?f - dm.minX) * 100 / (dm.maxX - dm.minX), (?f - wma.bottom) * 100 / (wma.top - wma.bottom)) - 50) / 50)) AS quality ' .
'FROM dbc_worldmaparea wma ' . 'FROM dbc_worldmaparea wma ' .
'LEFT JOIN dbc_dungeonmap dm ON dm.mapId = IF(?d AND (wma.mapId NOT IN (0, 1, 530, 571) OR wma.areaId = 4395), wma.mapId, -1) ' . 'LEFT JOIN dbc_dungeonmap dm ON dm.mapId = IF(?d AND (wma.mapId NOT IN (0, 1, 530, 571) OR wma.areaId = 4395), wma.mapId, -1) ' .
'WHERE wma.mapId = ?d AND IF(?d, wma.areaId = ?d, wma.areaId <> 0) ' . 'WHERE wma.mapId = ?d AND IF(?d, wma.areaId = ?d, wma.areaId <> 0) ' .
'HAVING (`posX` BETWEEN 0.1 AND 99.9 AND `posY` BETWEEN 0.1 AND 99.9) ' . // AND (dm.Id IS NULL OR ?d) ' . 'HAVING (`posX` BETWEEN 0.1 AND 99.9 AND `posY` BETWEEN 0.1 AND 99.9) ' . // AND (dm.id IS NULL OR ?d) ' .
'ORDER BY quality ASC'; 'ORDER BY quality ASC';
@@ -277,7 +277,7 @@ function spawns() // and waypoints
/* restrict difficulty displays */ /* restrict difficulty displays */
/********************************/ /********************************/
DB::Aowow()->query('UPDATE ?_spawns s, dbc_worldmaparea wma, dbc_map m SET s.spawnMask = 0 WHERE s.areaId = wma.areaId AND wma.mapId = m.Id AND m.areaType IN (0, 3, 4)'); DB::Aowow()->query('UPDATE ?_spawns s, dbc_worldmaparea wma, dbc_map m SET s.spawnMask = 0 WHERE s.areaId = wma.areaId AND wma.mapId = m.id AND m.areaType IN (0, 3, 4)');
return true; return true;
} }

View File

@@ -40,8 +40,8 @@ function spell()
{ {
$ssQuery = ' $ssQuery = '
SELECT SELECT
Id AS ARRAY_KEY, id AS ARRAY_KEY,
Id, id,
0 AS category, 0 AS category,
Dispel, Dispel,
Mechanic, Mechanic,
@@ -113,13 +113,13 @@ function spell()
FROM FROM
spell_dbc spell_dbc
WHERE WHERE
Id > ?d id > ?d
LIMIT LIMIT
?d'; ?d';
$baseQuery = ' $baseQuery = '
SELECT SELECT
s.Id, s.id,
category, category,
dispelType, dispelType,
mechanic, mechanic,
@@ -142,7 +142,7 @@ function spell()
powerPerSecond, powerPerSecond,
powerPerSecondPerLevel, powerPerSecondPerLevel,
IFNULL (src.runicPowerGain, 0) AS powerGainRunicPower, IFNULL (src.runicPowerGain, 0) AS powerGainRunicPower,
IF (src.Id IS NULL, 0, (src.costBlood << 8) | (src.costUnholy << 4) | src.costFrost) AS powerCostRunes, IF (src.id IS NULL, 0, (src.costBlood << 8) | (src.costUnholy << 4) | src.costFrost) AS powerCostRunes,
rangeId, rangeId,
stackAmount, stackAmount,
tool1, tool2, tool1, tool2,
@@ -202,19 +202,19 @@ function spell()
FROM FROM
dbc_spell s dbc_spell s
LEFT JOIN LEFT JOIN
dbc_spellcasttimes sct ON s.castTimeId = sct.Id dbc_spellcasttimes sct ON s.castTimeId = sct.id
LEFT JOIN LEFT JOIN
dbc_spellrunecost src ON s.runeCostId = src.Id dbc_spellrunecost src ON s.runeCostId = src.id
LEFT JOIN LEFT JOIN
dbc_spellduration sd ON s.durationId = sd.Id dbc_spellduration sd ON s.durationId = sd.id
LEFT JOIN LEFT JOIN
dbc_spellradius sr1 ON s.effect1RadiusId = sr1.Id dbc_spellradius sr1 ON s.effect1RadiusId = sr1.id
LEFT JOIN LEFT JOIN
dbc_spellradius sr2 ON s.effect2RadiusId = sr2.Id dbc_spellradius sr2 ON s.effect2RadiusId = sr2.id
LEFT JOIN LEFT JOIN
dbc_spellradius sr3 ON s.effect3RadiusId = sr3.Id dbc_spellradius sr3 ON s.effect3RadiusId = sr3.id
WHERE WHERE
s.Id > ?d s.id > ?d
LIMIT LIMIT
?d'; ?d';
@@ -225,7 +225,7 @@ function spell()
CLISetup::log(' - merging serverside spells into spell.dbc'); CLISetup::log(' - merging serverside spells into spell.dbc');
while ($spells = DB::World()->select($ssQuery, $lastMax, SqlGen::$stepSize)) while ($spells = DB::World()->select($ssQuery, $lastMax, SqlGen::$stepSize))
{ {
$newMax = max(array_column($spells, 'Id')); $newMax = max(array_column($spells, 'id'));
CLISetup::log(' * sets '.($lastMax + 1).' - '.$newMax); CLISetup::log(' * sets '.($lastMax + 1).' - '.$newMax);
@@ -243,7 +243,7 @@ function spell()
CLISetup::log(' - filling aowow_spell'); CLISetup::log(' - filling aowow_spell');
while ($spells = DB::Aowow()->select($baseQuery, $lastMax, SqlGen::$stepSize)) while ($spells = DB::Aowow()->select($baseQuery, $lastMax, SqlGen::$stepSize))
{ {
$newMax = max(array_column($spells, 'Id')); $newMax = max(array_column($spells, 'id'));
CLISetup::log(' * sets '.($lastMax + 1).' - '.$newMax); CLISetup::log(' * sets '.($lastMax + 1).' - '.$newMax);
@@ -288,7 +288,7 @@ function spell()
CLISetup::log(' - linking with skillineability'); CLISetup::log(' - linking with skillineability');
$results = DB::Aowow()->select('SELECT spellId AS ARRAY_KEY, Id AS ARRAY_KEY2, skillLineId, reqRaceMask, reqClassMask, reqSkillLevel, acquireMethod, skillLevelGrey, skillLevelYellow FROM dbc_skilllineability sla'); $results = DB::Aowow()->select('SELECT spellId AS ARRAY_KEY, id AS ARRAY_KEY2, skillLineId, reqRaceMask, reqClassMask, reqSkillLevel, acquireMethod, skillLevelGrey, skillLevelYellow FROM dbc_skilllineability sla');
foreach ($results as $spellId => $sets) foreach ($results as $spellId => $sets)
{ {
$names = array_keys(current($sets)); $names = array_keys(current($sets));
@@ -367,7 +367,7 @@ function spell()
// fill learnedAt, trainingCost from trainer // fill learnedAt, trainingCost from trainer
if ($trainer = DB::World()->select('SELECT SpellID AS ARRAY_KEY, MIN(ReqSkillRank) AS reqSkill, MIN(MoneyCost) AS cost, COUNT(*) AS count FROM npc_trainer GROUP BY SpellID')) if ($trainer = DB::World()->select('SELECT SpellID AS ARRAY_KEY, MIN(ReqSkillRank) AS reqSkill, MIN(MoneyCost) AS cost, COUNT(*) AS count FROM npc_trainer GROUP BY SpellID'))
{ {
$spells = DB::Aowow()->select('SELECT Id AS ARRAY_KEY, effect1Id, effect2Id, effect3Id, effect1TriggerSpell, effect2TriggerSpell, effect3TriggerSpell FROM dbc_spell WHERE Id IN (?a)', array_keys($trainer)); $spells = DB::Aowow()->select('SELECT id AS ARRAY_KEY, effect1Id, effect2Id, effect3Id, effect1TriggerSpell, effect2TriggerSpell, effect3TriggerSpell FROM dbc_spell WHERE id IN (?a)', array_keys($trainer));
$links = []; $links = [];
// todo (med): this skips some spells (e.g. riding) // todo (med): this skips some spells (e.g. riding)
@@ -490,7 +490,7 @@ function spell()
// altIcons and quality for craftSpells // altIcons and quality for craftSpells
$itemSpells = DB::Aowow()->selectCol(' $itemSpells = DB::Aowow()->selectCol('
SELECT s.Id AS ARRAY_KEY, effect1CreateItemId SELECT s.id AS ARRAY_KEY, effect1CreateItemId
FROM dbc_spell s FROM dbc_spell s
LEFT JOIN dbc_talent t1 ON t1.rank1 = s.id LEFT JOIN dbc_talent t1 ON t1.rank1 = s.id
LEFT JOIN dbc_talent t2 ON t2.rank2 = s.id LEFT JOIN dbc_talent t2 ON t2.rank2 = s.id
@@ -532,7 +532,7 @@ function spell()
CLISetup::log(' - applying categories'); CLISetup::log(' - applying categories');
// player talents (-2) // player talents (-2)
DB::Aowow()->query('UPDATE ?_spell s, dbc_talent t SET s.typeCat = -2 WHERE t.tabId NOT IN (409, 410, 411) AND (s.Id = t.rank1 OR s.Id = t.rank2 OR s.Id = t.rank3 OR s.Id = t.rank4 OR s.Id = t.rank5)'); DB::Aowow()->query('UPDATE ?_spell s, dbc_talent t SET s.typeCat = -2 WHERE t.tabId NOT IN (409, 410, 411) AND (s.id = t.rank1 OR s.id = t.rank2 OR s.id = t.rank3 OR s.id = t.rank4 OR s.id = t.rank5)');
// pet spells (-3) // pet spells (-3)
DB::Aowow()->query('UPDATE ?_spell s SET s.typeCat = -3 WHERE (s.cuFlags & 0x3) = 0 AND s.skillline1 IN (?a)', DB::Aowow()->query('UPDATE ?_spell s SET s.typeCat = -3 WHERE (s.cuFlags & 0x3) = 0 AND s.skillline1 IN (?a)',
@@ -554,9 +554,9 @@ function spell()
DB::Aowow()->query('UPDATE ?_spell s SET s.typeCat = -6 WHERE s.skillLine1 = 778'); DB::Aowow()->query('UPDATE ?_spell s SET s.typeCat = -6 WHERE s.skillLine1 = 778');
// pet talents (-7) // pet talents (-7)
DB::Aowow()->query('UPDATE ?_spell s, dbc_talent t SET s.typeCat = -7, s.cuFlags = s.cuFlags | 0x10 WHERE t.tabId = 409 AND (s.Id = t.rank1 OR s.Id = t.rank2 OR s.Id = t.rank3)'); DB::Aowow()->query('UPDATE ?_spell s, dbc_talent t SET s.typeCat = -7, s.cuFlags = s.cuFlags | 0x10 WHERE t.tabId = 409 AND (s.id = t.rank1 OR s.id = t.rank2 OR s.id = t.rank3)');
DB::Aowow()->query('UPDATE ?_spell s, dbc_talent t SET s.typeCat = -7, s.cuFlags = s.cuFlags | 0x08 WHERE t.tabId = 410 AND (s.Id = t.rank1 OR s.Id = t.rank2 OR s.Id = t.rank3)'); DB::Aowow()->query('UPDATE ?_spell s, dbc_talent t SET s.typeCat = -7, s.cuFlags = s.cuFlags | 0x08 WHERE t.tabId = 410 AND (s.id = t.rank1 OR s.id = t.rank2 OR s.id = t.rank3)');
DB::Aowow()->query('UPDATE ?_spell s, dbc_talent t SET s.typeCat = -7, s.cuFlags = s.cuFlags | 0x20 WHERE t.tabId = 411 AND (s.Id = t.rank1 OR s.Id = t.rank2 OR s.Id = t.rank3)'); DB::Aowow()->query('UPDATE ?_spell s, dbc_talent t SET s.typeCat = -7, s.cuFlags = s.cuFlags | 0x20 WHERE t.tabId = 411 AND (s.id = t.rank1 OR s.id = t.rank2 OR s.id = t.rank3)');
// internal (-9) by faaaaaar not complete // internal (-9) by faaaaaar not complete
DB::Aowow()->query('UPDATE ?_spell s SET s.typeCat = -9 WHERE s.skillLine1 = 769'); DB::Aowow()->query('UPDATE ?_spell s SET s.typeCat = -9 WHERE s.skillLine1 = 769');
@@ -689,8 +689,8 @@ function spell()
$effects = DB::Aowow()->select(' $effects = DB::Aowow()->select('
SELECT SELECT
s2.Id AS ARRAY_KEY, s2.id AS ARRAY_KEY,
s1.Id, s1.id,
s1.name_loc0, s1.name_loc0,
s1.spellFamilyId, s1.spellFamilyId,
s1.spellFamilyFlags1, s1.spellFamilyFlags2, s1.spellFamilyFlags3, s1.spellFamilyFlags1, s1.spellFamilyFlags2, s1.spellFamilyFlags3,
@@ -701,11 +701,11 @@ function spell()
FROM FROM
dbc_glyphproperties gp dbc_glyphproperties gp
JOIN JOIN
?_spell s1 ON s1.Id = gp.spellId ?_spell s1 ON s1.id = gp.spellId
JOIN JOIN
?_spell s2 ON s2.effect1MiscValue = gp.id AND s2.effect1Id = 74 ?_spell s2 ON s2.effect1MiscValue = gp.id AND s2.effect1Id = 74
WHERE WHERE
gp.typeFlags IN (0, 1) -- AND s2.Id In (58271, 56297, 56289, 63941, 58275) gp.typeFlags IN (0, 1) -- AND s2.id In (58271, 56297, 56289, 63941, 58275)
'); ');
foreach ($effects as $applyId => $glyphEffect) foreach ($effects as $applyId => $glyphEffect)
@@ -754,7 +754,7 @@ function spell()
if ($icons) if ($icons)
DB::Aowow()->query('UPDATE ?_spell s SET s.skillLine1 = ?d, s.iconIdAlt = ?d WHERE s.id = ?d', $icons['skill'], $icons['icon'], $applyId); DB::Aowow()->query('UPDATE ?_spell s SET s.skillLine1 = ?d, s.iconIdAlt = ?d WHERE s.id = ?d', $icons['skill'], $icons['icon'], $applyId);
else else
CLISetup::log('could not match '.$glyphEffect['name_loc0'].' ('.$glyphEffect['Id'].') with affected spells', CLISetup::LOG_WARN); CLISetup::log('could not match '.$glyphEffect['name_loc0'].' ('.$glyphEffect['id'].') with affected spells', CLISetup::LOG_WARN);
} }
// hide unused glyphs // hide unused glyphs

View File

@@ -16,7 +16,7 @@ function talents()
// class: 0 => hunter pets // class: 0 => hunter pets
for ($i = 1; $i < 6; $i++) for ($i = 1; $i < 6; $i++)
DB::Aowow()->query( DB::Aowow()->query(
'REPLACE INTO ?_talents SELECT t.Id, IF(tt.classMask <> 0, LOG(2, tt.classMask) + 1, 0), IF(tt.creaturefamilyMask <> 0, LOG(2, tt.creaturefamilyMask), tt.tabNumber), t.row, t.column, t.rank?d, ?d FROM dbc_talenttab tt JOIN dbc_talent t ON tt.Id = t.tabId WHERE t.rank?d <> 0', 'REPLACE INTO ?_talents SELECT t.id, IF(tt.classMask <> 0, LOG(2, tt.classMask) + 1, 0), IF(tt.creaturefamilyMask <> 0, LOG(2, tt.creaturefamilyMask), tt.tabNumber), t.row, t.column, t.rank?d, ?d FROM dbc_talenttab tt JOIN dbc_talent t ON tt.id = t.tabId WHERE t.rank?d <> 0',
$i, $i, $i $i, $i, $i
); );

View File

@@ -32,7 +32,7 @@ function taxi() // path & nodes
{ {
if ($_['startNodeId'] == $p['endNodeId'] AND $_['endNodeId'] == $p['startNodeId']) if ($_['startNodeId'] == $p['endNodeId'] AND $_['endNodeId'] == $p['startNodeId'])
{ {
DB::Aowow()->query('DELETE FROM ?_taxipath WHERE Id = ?d', $j); DB::Aowow()->query('DELETE FROM ?_taxipath WHERE id = ?d', $j);
unset($paths[$j]); unset($paths[$j]);
unset($paths[$i]); unset($paths[$i]);
break; break;
@@ -137,13 +137,13 @@ function taxi() // path & nodes
// fetch reactions per faction // fetch reactions per faction
$factions = DB::Aowow()->query(' $factions = DB::Aowow()->query('
SELECT SELECT
Id AS ARRAY_KEY, id AS ARRAY_KEY,
IF(enemyFactionId1 = 1 OR enemyFactionId2 = 1 OR enemyFactionId3 = 1 OR enemyFactionId4 = 1 OR hostileMask & 0x3, -1, 1) AS reactA, IF(enemyFactionId1 = 1 OR enemyFactionId2 = 1 OR enemyFactionId3 = 1 OR enemyFactionId4 = 1 OR hostileMask & 0x3, -1, 1) AS reactA,
IF(enemyFactionId1 = 2 OR enemyFactionId2 = 2 OR enemyFactionId3 = 2 OR enemyFactionId4 = 2 OR hostileMask & 0x5, -1, 1) AS reactH IF(enemyFactionId1 = 2 OR enemyFactionId2 = 2 OR enemyFactionId3 = 2 OR enemyFactionId4 = 2 OR hostileMask & 0x5, -1, 1) AS reactH
FROM FROM
dbc_factiontemplate dbc_factiontemplate
WHERE WHERE
Id IN (?a)', id IN (?a)',
array_column($fNodes, 'faction') array_column($fNodes, 'faction')
); );

View File

@@ -49,7 +49,7 @@ function titles()
WHERE WHERE
qt.RewardTitle <> 0'; qt.RewardTitle <> 0';
DB::Aowow()->query('REPLACE INTO ?_titles SELECT Id, 0, 0, 0, 0, 0, 0, 0, bitIdx, male_loc0, male_loc2, male_loc3, male_loc6, male_loc8, female_loc0, female_loc2, female_loc3, female_loc6, female_loc8 FROM dbc_chartitles'); DB::Aowow()->query('REPLACE INTO ?_titles SELECT id, 0, 0, 0, 0, 0, 0, 0, bitIdx, male_loc0, male_loc2, male_loc3, male_loc6, male_loc8, female_loc0, female_loc2, female_loc3, female_loc6, female_loc8 FROM dbc_chartitles');
// hide unused titles // hide unused titles
DB::Aowow()->query('UPDATE ?_titles SET cuFlags = ?d WHERE id BETWEEN 85 AND 123 AND id NOT IN (113, 120, 121, 122)', CUSTOM_EXCLUDE_FOR_LISTVIEW); DB::Aowow()->query('UPDATE ?_titles SET cuFlags = ?d WHERE id BETWEEN 85 AND 123 AND id NOT IN (113, 120, 121, 122)', CUSTOM_EXCLUDE_FOR_LISTVIEW);

View File

@@ -0,0 +1,90 @@
DROP TABLE IF EXISTS
`dbc_skillraceclassinfo`,
`dbc_soundambience`,
`dbc_skilllineability`,
`dbc_scalingstatvalues`,
`dbc_skillline`,
`dbc_spellcasttimes`,
`dbc_spelldifficulty`,
`dbc_spell`,
`dbc_soundemitters`,
`dbc_soundentries`,
`dbc_scalingstatdistribution`,
`dbc_lock`,
`dbc_map`,
`dbc_lfgdungeons`,
`dbc_itemset`,
`dbc_itemsubclass`,
`dbc_questfactionreward`,
`dbc_questxp`,
`dbc_npcsounds`,
`dbc_mapdifficulty`,
`dbc_material`,
`dbc_spellduration`,
`dbc_weaponswingsounds2`,
`dbc_worldmaparea`,
`dbc_weaponimpactsounds`,
`dbc_taxipathnode`,
`dbc_vocaluisounds`,
`dbc_zoneintromusictable`,
`dbc_zonemusic`,
`dbc_worldstatezonesounds`,
`dbc_worldmapoverlay`,
`dbc_worldmaptransforms`,
`dbc_taxipath`,
`dbc_spellrunecost`,
`dbc_spellshapeshiftform`,
`dbc_spellradius`,
`dbc_spellicon`,
`dbc_spellitemenchantment`,
`dbc_talenttab`,
`dbc_taxinodes`,
`dbc_talent`,
`dbc_spellvisual`,
`dbc_spellvisualkit`,
`dbc_itemrandomsuffix`,
`dbc_creaturesounddata`,
`dbc_currencytypes`,
`dbc_creaturemodeldata`,
`dbc_creaturedisplayinfoextra`,
`dbc_creaturefamily`,
`dbc_emotes`,
`dbc_emotestext`,
`dbc_durabilityquality`,
`dbc_dungeonmap`,
`dbc_durabilitycosts`,
`dbc_creaturedisplayinfo`,
`dbc_areatrigger`,
`dbc_battlemasterlist`,
`dbc_areatable`,
`dbc_achievement`,
`dbc_achievement_category`,
`dbc_chrclasses`,
`dbc_chrraces`,
`dbc_chartitles`,
`dbc_charbaseinfo`,
`dbc_charstartoutfit`,
`dbc_emotestextdata`,
`dbc_holidaydescriptions`,
`dbc_holidaynames`,
`dbc_gtregenmpperspt`,
`dbc_gtoctregenhp`,
`dbc_gtregenhpperspt`,
`dbc_itemgroupsounds`,
`dbc_itemrandomproperties`,
`dbc_itemextendedcost`,
`dbc_holidays`,
`dbc_itemdisplayinfo`,
`dbc_gtoctclasscombatratingscalar`,
`dbc_gemproperties`,
`dbc_glyphproperties`,
`dbc_factiontemplate`,
`dbc_emotestextsound`,
`dbc_faction`,
`dbc_gtchancetospellcritbase`,
`dbc_gtcombatratings`,
`dbc_gtchancetospellcrit`,
`dbc_gtchancetomeleecrit`,
`dbc_gtchancetomeleecritbase`;
UPDATE `aowow_dbversion` SET `sql` = CONCAT(IFNULL(`sql`, ''), ' achievementcategory achievementcriteria itemenchantmentcondition itemextendedcost itemlimitcategory itemrandomproppoints lock mailtemplate scalingstatdistribution scalingstatvalues spellfocusobject spelloverride spellrange spellvariables totemcategory');