implementation of Sound DB

Client sounds are cross-referenced with as many other DB-Types as possible. Including, but not limited to:
 * Character VOs (Errors, Emotes)
 * Creature VOs (Boss Dialogue)
 * Zone Music and Ambience
 * Sounds triggerd by spells
 * Sounds from general item/spell usage, creature behavior

Restrictions:
 * only one locale is supported. Choose wisely!
This commit is contained in:
Sarjuuk
2017-03-06 15:16:34 +01:00
committed by GitHub
parent 8fcd8ea429
commit 20a1829317
54 changed files with 3454 additions and 169 deletions

View File

@@ -1136,6 +1136,7 @@ CREATE TABLE `aowow_items` (
`classBak` tinyint(3) NOT NULL,
`subClass` tinyint(3) NOT NULL DEFAULT '0',
`subClassBak` tinyint(3) NOT NULL,
`soundOverrideSubclass` tinyint(3) NOT NULL,
`subSubClass` tinyint(3) NOT NULL,
`name_loc0` varchar(127) NOT NULL DEFAULT '',
`name_loc2` varchar(127) DEFAULT NULL,
@@ -1143,6 +1144,7 @@ CREATE TABLE `aowow_items` (
`name_loc6` varchar(127) DEFAULT NULL,
`name_loc8` varchar(127) DEFAULT NULL,
`displayId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spellVisualId` smallint(5) unsigned NOT NULL DEFAULT '0',
`quality` tinyint(3) unsigned NOT NULL DEFAULT '0',
`flags` bigint(20) NOT NULL DEFAULT '0',
`flagsExtra` int(10) unsigned NOT NULL DEFAULT '0',
@@ -1253,6 +1255,7 @@ CREATE TABLE `aowow_items` (
`languageId` tinyint(3) unsigned NOT NULL DEFAULT '0',
`startQuest` mediumint(8) unsigned NOT NULL DEFAULT '0',
`lockId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`material` tinyint(3) NOT NULL DEFAULT '0',
`randomEnchant` mediumint(8) NOT NULL DEFAULT '0',
`itemset` mediumint(8) unsigned NOT NULL DEFAULT '0',
`durability` smallint(5) unsigned NOT NULL DEFAULT '0',
@@ -1278,6 +1281,10 @@ CREATE TABLE `aowow_items` (
`gemEnchantmentId` mediumint(8) NOT NULL,
`minMoneyLoot` int(10) unsigned NOT NULL DEFAULT '0',
`maxMoneyLoot` int(10) unsigned NOT NULL DEFAULT '0',
`pickUpSoundId` smallint(5) unsigned NOT NULL DEFAULT '0',
`dropDownSoundId` smallint(5) unsigned NOT NULL DEFAULT '0',
`sheatheSoundId` smallint(5) unsigned NOT NULL DEFAULT '0',
`unsheatheSoundId` smallint(5) unsigned NOT NULL DEFAULT '0',
`flagsCustom` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_name` (`name_loc0`),
@@ -2119,6 +2126,7 @@ CREATE TABLE `aowow_spell` (
`iconId` smallint(5) unsigned NOT NULL,
`iconIdAlt` mediumint(9) NOT NULL,
`rankNo` tinyint(3) unsigned NOT NULL,
`spellVisualId` smallint(5) unsigned NOT NULL,
`name_loc0` varchar(85) NOT NULL,
`name_loc2` varchar(85) NOT NULL,
`name_loc3` varchar(85) NOT NULL,
@@ -2420,6 +2428,138 @@ CREATE TABLE `aowow_zones` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
DROP TABLE IF EXISTS `aowow_zones_sounds`;
CREATE TABLE `aowow_zones_sounds` (
`id` smallint(5) unsigned NOT NULL,
`ambienceDay` smallint(5) unsigned NOT NULL,
`ambienceNight` smallint(5) unsigned NOT NULL,
`musicDay` smallint(5) unsigned NOT NULL,
`musicNight` smallint(5) unsigned NOT NULL,
`intro` smallint(5) unsigned NOT NULL,
`worldStateId` smallint(5) unsigned NOT NULL,
`worldStateValue` smallint(6) NOT NULL,
INDEX `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `aowow_creature_sounds`;
CREATE TABLE IF NOT EXISTS `aowow_creature_sounds` (
`id` smallint(5) unsigned NOT NULL COMMENT 'CreatureDisplayInfo.dbc/id',
`greeting` smallint(5) unsigned NOT NULL,
`farewell` smallint(5) unsigned NOT NULL,
`angry` smallint(5) unsigned NOT NULL,
`exertion` smallint(5) unsigned NOT NULL,
`exertioncritical` smallint(5) unsigned NOT NULL,
`injury` smallint(5) unsigned NOT NULL,
`injurycritical` smallint(5) unsigned NOT NULL,
`death` smallint(5) unsigned NOT NULL,
`stun` smallint(5) unsigned NOT NULL,
`stand` smallint(5) unsigned NOT NULL,
`footstep` smallint(5) unsigned NOT NULL,
`aggro` smallint(5) unsigned NOT NULL,
`wingflap` smallint(5) unsigned NOT NULL,
`wingglide` smallint(5) unsigned NOT NULL,
`alert` smallint(5) unsigned NOT NULL,
`fidget` smallint(5) unsigned NOT NULL,
`customattack` smallint(5) unsigned NOT NULL,
`loop` smallint(5) unsigned NOT NULL,
`jumpstart` smallint(5) unsigned NOT NULL,
`jumpend` smallint(5) unsigned NOT NULL,
`petattack` smallint(5) unsigned NOT NULL,
`petorder` smallint(5) unsigned NOT NULL,
`petdismiss` smallint(5) unsigned NOT NULL,
`birth` smallint(5) unsigned NOT NULL,
`spellcast` smallint(5) unsigned NOT NULL,
`submerge` smallint(5) unsigned NOT NULL,
`submerged` smallint(5) unsigned NOT NULL,
`transform` smallint(5) unsigned NOT NULL,
`transformanimated` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='!ATTENTION!\r\nthe primary key of this table is NOT a creatureId, but displayId\r\n\r\ncolumn names from LANG.sound_activities';
DROP TABLE IF EXISTS `aowow_emotes_sounds`;
CREATE TABLE IF NOT EXISTS `aowow_emotes_sounds` (
`emoteId` smallint(5) unsigned NOT NULL,
`raceId` tinyint(3) unsigned NOT NULL,
`gender` tinyint(1) unsigned NOT NULL,
`soundId` smallint(5) unsigned NOT NULL,
UNIQUE KEY `emoteId_raceId_gender_soundId` (`emoteId`,`raceId`,`gender`,`soundId`),
KEY `emoteId` (`emoteId`),
KEY `raceId` (`raceId`),
KEY `soundId` (`soundId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `aowow_races_sounds`;
CREATE TABLE IF NOT EXISTS `aowow_races_sounds` (
`raceId` tinyint(3) unsigned NOT NULL,
`soundId` smallint(5) unsigned NOT NULL,
`gender` tinyint(1) unsigned NOT NULL,
UNIQUE KEY `race_soundId_gender` (`raceId`,`soundId`,`gender`),
KEY `race` (`raceId`),
KEY `soundId` (`soundId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `aowow_sounds`;
CREATE TABLE IF NOT EXISTS `aowow_sounds` (
`id` smallint(5) unsigned NOT NULL,
`cat` tinyint(3) unsigned NOT NULL,
`name` varchar(100) NOT NULL,
`cuFlags` int(10) unsigned NOT NULL,
`soundFile1` smallint(5) unsigned DEFAULT NULL,
`soundFile2` smallint(5) unsigned DEFAULT NULL,
`soundFile3` smallint(5) unsigned DEFAULT NULL,
`soundFile4` smallint(5) unsigned DEFAULT NULL,
`soundFile5` smallint(5) unsigned DEFAULT NULL,
`soundFile6` smallint(5) unsigned DEFAULT NULL,
`soundFile7` smallint(5) unsigned DEFAULT NULL,
`soundFile8` smallint(5) unsigned DEFAULT NULL,
`soundFile9` smallint(5) unsigned DEFAULT NULL,
`soundFile10` smallint(5) unsigned DEFAULT NULL,
`flags` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `cat` (`cat`),
KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `aowow_sounds_files`;
CREATE TABLE IF NOT EXISTS `aowow_sounds_files` (
`id` smallint(6) NOT NULL COMMENT '<0 not found in client files',
`file` varchar(75) NOT NULL,
`path` varchar(75) NOT NULL COMMENT 'in client',
`type` tinyint(1) unsigned NOT NULL COMMENT '1: ogg; 2: mp3',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `aowow_spell_sounds`;
CREATE TABLE IF NOT EXISTS `aowow_spell_sounds` (
`id` smallint(5) unsigned NOT NULL COMMENT 'SpellVisual.dbc/id',
`animation` smallint(5) unsigned NOT NULL,
`ready` smallint(5) unsigned NOT NULL,
`precast` smallint(5) unsigned NOT NULL,
`cast` smallint(5) unsigned NOT NULL,
`impact` smallint(5) unsigned NOT NULL,
`state` smallint(5) unsigned NOT NULL,
`statedone` smallint(5) unsigned NOT NULL,
`channel` smallint(5) unsigned NOT NULL,
`casterimpact` smallint(5) unsigned NOT NULL,
`targetimpact` smallint(5) unsigned NOT NULL,
`castertargeting` smallint(5) unsigned NOT NULL,
`missiletargeting` smallint(5) unsigned NOT NULL,
`instantarea` smallint(5) unsigned NOT NULL,
`persistentarea` smallint(5) unsigned NOT NULL,
`casterstate` smallint(5) unsigned NOT NULL,
`targetstate` smallint(5) unsigned NOT NULL,
`missile` smallint(5) unsigned NOT NULL COMMENT 'not predicted by js',
`impactarea` smallint(5) unsigned NOT NULL COMMENT 'not predicted by js',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='!ATTENTION!\r\nthe primary key of this table is NOT a spellId, but spellVisualId\r\n\r\ncolumn names from LANG.sound_activities';
DROP TABLE IF EXISTS `aowow_items_sounds`;
CREATE TABLE `aowow_items_sounds` (
`soundId` smallint(5) unsigned NOT NULL,
`subClassMask` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`soundId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='actually .. its only weapon related sounds in here';
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
@@ -2513,7 +2653,7 @@ UNLOCK TABLES;
LOCK TABLES `aowow_dbversion` WRITE;
/*!40000 ALTER TABLE `aowow_dbversion` DISABLE KEYS */;
INSERT INTO `aowow_dbversion` VALUES (1484926142,0,NULL,NULL);
INSERT INTO `aowow_dbversion` VALUES (1488745159,0,NULL,NULL);
/*!40000 ALTER TABLE `aowow_dbversion` ENABLE KEYS */;
UNLOCK TABLES;

View File

@@ -328,6 +328,42 @@ class CLISetup
return false;
}
public static function nicePath(/* $file = '', ...$pathParts */)
{
$path = '';
switch (func_num_args())
{
case 0:
return '';
case 1:
$path = func_get_arg(0);
break;
default:
$args = func_get_args();
$file = array_shift($args);
$path = implode(DIRECTORY_SEPARATOR, $args).DIRECTORY_SEPARATOR.$file;
}
if (DIRECTORY_SEPARATOR == '/') // *nix
{
$path = str_replace('\\', '/', $path);
$path = preg_replace('/\/+/i', '/', $path);
}
else if (DIRECTORY_SEPARATOR == '\\') // win
{
$path = str_replace('/', '\\', $path);
$path = preg_replace('/\\\\+/i', '\\', $path);
}
else
CLISetup::log('Dafuq! Your directory separator is "'.DIRECTORY_SEPARATOR.'". Please report this!', CLISetup::LOG_ERROR);
if ($path[0] == DIRECTORY_SEPARATOR)
$path = substr($path, 1);
return $path;
}
/**************/
/* read input */
/**************/

View File

@@ -44,16 +44,18 @@ class DBC
'achievement' => 'niiisxssxxsxsxxxxxxxxsxssxxsxsxxxxxxxxiiiiisxssxxsxsxxxxxxxxii',
'achievement_category' => 'nisxssxxsxsxxxxxxxxx',
'achievement_criteria' => 'niiiiiiiisxssxxsxsxxxxxxxxiixii',
'areatable' => 'niixixxxxxxsxssxxsxsxxxxxxxxixxxxxxx',
'areatable' => 'niixixxiiixsxssxxsxsxxxxxxxxixxxxxxx',
'battlemasterlist' => 'niixxxxxxixxxxxxxxxxxxxxxxxxixii',
'charbaseinfo' => 'bb',
'charstartoutfit' => 'nbbbXiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'chartitles' => 'nxsxssxxsxsxxxxxxxxsxssxxsxsxxxxxxxxi',
'chrclasses' => 'nxixsxssxxsxsxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxsxixi',
'chrraces' => 'niixxxxixxxsxisxssxxsxsxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi',
'creaturedisplayinfo' => 'nixixxssssxxxxxx',
'creaturedisplayinfo' => 'niiixxssssxxixxx',
'creaturedisplayinfoextra' => 'nxxxxxxxxxxxxxxxxxxxs',
'creaturefamily' => 'nxxxxixiiisxssxxsxsxxxxxxxxs',
'creaturemodeldata' => 'nxxxxxxxxxxxxixxxxxxxxxxxxxx',
'creaturesounddata' => 'niiiixiiiiiiiiixxxxixxxxixiiiiixxiiiix',
'currencytypes' => 'niix',
'dungeonmap' => 'niiffffi',
'durabilitycosts' => 'niiiiiiiiixiiiiiiiiiiixiiiixix',
@@ -61,6 +63,7 @@ class DBC
'emotes' => 'nxixxxx',
'emotestext' => 'nsiixxxixixxxxxxxxx',
'emotestextdata' => 'nsxssxxsxsxxxxxxxx',
'emotestextsound' => 'niiii',
'faction' => 'nixxxxxxxxxxxxixxxiffixsxssxxsxsxxxxxxxxxxxxxxxxxxxxxxxxx',
'factiontemplate' => 'nixiiiiiiiiiii',
'gemproperties' => 'nixxi',
@@ -77,17 +80,21 @@ class DBC
'holidays' => 'nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixxxxxxxxxxiisxix',
'holidaydescriptions' => 'nsxssxxsxsxxxxxxxx',
'holidaynames' => 'nsxssxxsxsxxxxxxxx',
'itemdisplayinfo' => 'nssxxsxxxxxxxxxxxxxxxxxxx',
'itemdisplayinfo' => 'nssxxsxxxxxiixxxxxxxxxxxx',
'itemgroupsounds' => 'niixx',
'itemextendedcost' => 'niiiiiiiiiiiiiix',
'itemlimitcategory' => 'nsxssxxsxsxxxxxxxxii',
'itemrandomproperties' => 'nsiiiiisxssxxsxsxxxxxxxx',
'itemrandomsuffix' => 'nsxssxxsxsxxxxxxxxsiiiiiiiiii',
'itemset' => 'nsxssxxsxsxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiiiii',
'itemsubclass' => 'iixxxxxxxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'lfgdungeons' => 'nsxssxxsxsxxxxxxxxiiiiiiixiixixixxxxxxxxxxxxxxxxx',
'lock' => 'niiiiixxxiiiiixxxiiiiixxxxxxxxxxx',
'mailtemplate' => 'nsxssxxsxsxxxxxxxxsxssxxsxsxxxxxxxx',
'map' => 'nsixisxssxxsxsxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiffxixi',
'mapdifficulty' => 'niixxxxxxxxxxxxxxxxxxis',
'material' => 'nxxii',
'npcsounds' => 'niiix',
'powerdisplay' => 'nisbbb',
'questfactionreward' => 'niiiiiiiiii',
'questxp' => 'niiiiiiiiii',
@@ -97,7 +104,10 @@ class DBC
'skillline' => 'nixsxssxxsxsxxxxxxxxsxssxxsxsxxxxxxxxixxxxxxxxxxxxxxxxxx',
'skilllineability' => 'niiiixxixiiixx',
'skillraceclassinfo' => 'niiiiixx',
'spell' => 'niiiuuuuuuuuixixxxixxxxxxxxxiiixxxxiiiiiiiiiiiixxiiiiiiiiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiifffiiiiiiiiixxiixsxssxxsxsxxxxxxxxsxssxxsxsxxxxxxxxsxssxxsxsxxxxxxxxsxssxxsxsxxxxxxxxiiiiiiiiiixxfffxxxiixiixifffii',
'soundambience' => 'nii',
'soundemitters' => 'nffxxxxiix',
'soundentries' => 'nisssssssssssxxxxxxxxxxsxixxxx',
'spell' => 'niiiuuuuuuuuixixxxixxxxxxxxxiiixxxxiiiiiiiiiiiixxiiiiiiiiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiifffiiiiiiiiiiiiixsxssxxsxsxxxxxxxxsxssxxsxsxxxxxxxxsxssxxsxsxxxxxxxxsxssxxsxsxxxxxxxxiiiiiiiiiixxfffxxxiixiixifffii',
'spellcasttimes' => 'nixx',
'spelldescriptionvariables' => 'ns',
'spelldifficulty' => 'xiiii',
@@ -110,15 +120,23 @@ class DBC
'spellrange' => 'nffffisxssxxsxsxxxxxxxxxxxxxxxxxxxxxxxxx',
'spellrunecost' => 'niiii',
'spellshapeshiftform' => 'nxsxssxxsxsxxxxxxxxiixxiixxiiiiiiii',
'spellvisual' => 'niiiiiixxxxiixiixxxxxxiiiixxxxxx',
'spellvisualkit' => 'nxxxxxxxxxxxxxxixxxxxxxxxxxxxxxxxxxxxx',
'talent' => 'niiiiiiiixxxxixxixxixii',
'talenttab' => 'nsxssxxsxsxxxxxxxxiiiiis',
'taxinodes' => 'niffxsxssxxsxsxxxxxxxxxx',
'taxipath' => 'niix',
'taxipathnode' => 'niiiffxxxxx',
'totemcategory' => 'nsxssxxsxsxxxxxxxxiu',
'vocaluisounds' => 'nxiiixx',
'weaponimpactsounds' => 'nixiiiiiiiiiiiiiiiiiiii',
'weaponswingsounds2' => 'nixi',
'worldmaparea' => 'niisffffxix', // 4.x - niisffffxixxxx
'worldmapoverlay' => 'niixxxxxsiiiixxxx', // 4.x - niixxxsiiiixxxx
'worldmaptransforms' => 'niffffiffi',
'worldstatezonesounds' => 'iiiiiiix',
'zoneintromusictable' => 'nxixx',
'zonemusic' => 'nxxxxxii'
);
@@ -126,22 +144,25 @@ class DBC
'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_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,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',
'battlemasterlist' => 'Id,mapId,moreMapId,areaType,maxPlayers,minLevel,maxLevel',
'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',
'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',
'chrraces' => 'Id,flags,factionId,baseLanguage,fileString,side,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,expansion',
'creaturedisplayinfo' => 'Id,modelid,extraInfoId,skin1,skin2,skin3,iconString',
'creaturedisplayinfo' => 'Id,modelId,creatureSoundId,extraInfoId,skin1,skin2,skin3,iconString,npcSoundId',
'creaturedisplayinfoextra' => 'Id,textureString',
'creaturefamily' => 'Id,skillLine1,petFoodMask,petTalentType,categoryEnumID,name_loc0,name_loc2,name_loc3,name_lo6,name_loc8,iconString',
'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',
'currencytypes' => 'Id,itemId,category',
'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',
'durabilityquality' => 'Id,mod',
'emotes' => 'Id,animationId',
'emotestext' => 'Id,command,emoteId,targetId,noTargetId,selfId',
'emotestextsound' => 'Id,emotesTextId,raceId,gender,soundId',
'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',
'factiontemplate' => 'Id,factionId,ourMask,friendlyMask,hostileMask,enemyFactionId1,enemyFactionId2,enemyFactionId3,enemyFactionId4,friendFactionId1,friendFactionId2,friendFactionId3,friendFactionId4',
@@ -159,17 +180,21 @@ class DBC
'holidays' => 'Id,looping,nameId,descriptionId,textureString,scheduleType',
'holidaydescriptions' => 'Id,description_loc0,description_loc2,description_loc3,description_loc6,description_loc8',
'holidaynames' => 'Id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8',
'itemdisplayinfo' => 'Id,leftModelName,rightModelName,inventoryIcon1',
'itemdisplayinfo' => 'Id,leftModelName,rightModelName,inventoryIcon1,spellVisualId,groupSoundId',
'itemgroupsounds' => 'Id,pickUpSoundId,dropDownSoundId',
'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',
'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',
'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',
'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',
'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',
'mapdifficulty' => 'Id,mapId,difficulty,nPlayer,nPlayerString',
'material' => 'Id,sheatheSoundId,unsheatheSoundId',
'npcsounds' => 'Id,greetSoundId,byeSoundId,angrySoundId',
'powerdisplay' => 'Id,realType,globalString,r,g,b',
'questfactionreward' => 'Id,field1,field2,field3,field4,field5,field6,field7,field8,field9,field10',
'questxp' => 'Id,field1,field2,field3,field4,field5,field6,field7,field8,field9,field10',
@@ -179,7 +204,10 @@ class DBC
'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',
'skillraceclassinfo' => 'Id,skillLine,raceMask,classMask,flags,reqLevel',
'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,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',
'soundambience' => 'Id,soundIdDay,soundIdNight',
'soundemitters' => 'Id,posY,posX,soundId,mapId',
'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',
'spellcasttimes' => 'Id,baseTime',
'spelldescriptionvariables' => 'Id,vars',
'spellduration' => 'Id,baseTime',
@@ -192,15 +220,23 @@ class DBC
'spellrange' => 'Id,rangeMinHostile,rangeMinFriend,rangeMaxHostile,rangeMaxFriend,rangeType,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8',
'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',
'spellvisual' => 'Id,precastKitId,castKitId,impactKitId,stateKitId,statedoneKitId,channelKitId,missileSoundId,animationSoundId,casterImpactKitId,targetImpactKitId,missileTargetingKitId,instantAreaKitId,impactAreaKitId,persistentAreaKitId',
'spellvisualkit' => 'Id,soundId',
'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',
'taxinodes' => 'Id,mapId,posX,posY,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8',
'taxipath' => 'Id,startNodeId,endNodeId',
'taxipathnode' => 'Id,pathId,nodeIdx,mapId,posX,posY',
'totemcategory' => 'Id,name_loc0,name_loc2,name_loc3,name_loc6,name_loc8,category,categoryMask',
'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',
'weaponswingsounds2' => 'Id,weaponSize,soundId',
'worldmaparea' => 'Id,mapId,areaId,nameINT,left,right,top,bottom,defaultDungeonMapId',
'worldmapoverlay' => 'Id,worldMapAreaId,areaTableId,textureString,w,h,x,y',
'worldmaptransforms' => 'Id,sourceMapId,minX,minY,maxX,maxY,targetMapId,offsetX,offsetY,dungeonMapId',
'worldstatezonesounds' => 'stateId,value,areaId,wmoAreaId,zoneIntroMusicId,zoneMusicId,soundAmbienceId',
'zoneintromusictable' => 'Id,soundId',
'zonemusic' => 'Id,soundIdDay,soundIdNight'
);
private $isGameTable = false;

View File

@@ -48,7 +48,8 @@ class FileGen
'enchants' => [['items', 'spell', 'itemenchantment'], null],
'gems' => [['items', 'spell', 'itemenchantment'], null],
'profiler' => [['quests', 'quests_startend', 'spell', 'currencies', 'achievement', 'titles'], null],
'weightPresets' => [null, null]
'weightPresets' => [null, null],
'sounds' => [['sounds_files'], null]
);
public static $defaultExecTime = 30;
@@ -60,7 +61,8 @@ class FileGen
'static/uploads/screenshots/temp',
'static/uploads/screenshots/thumb',
'static/uploads/temp/',
'static/download/searchplugins/'
'static/download/searchplugins/',
'static/wowsounds/'
);
public static $txtConstants = array(

View File

@@ -0,0 +1,62 @@
<?php
if (!defined('AOWOW_REVISION'))
die('illegal access');
if (!CLI)
die('not in cli mode');
function sounds()
{
$ok = true;
// ALL files
$files = DB::Aowow()->selectCol('SELECT ABS(id) AS ARRAY_KEY, CONCAT(path, "/", `file`) FROM ?_sounds_files');
$nFiles = count($files);
$itr = $i = 0;
$nStep = 1000;
foreach ($files as $fileId => $filePath)
{
$i++;
$itr++;
if ($i == $step)
{
$i = 0;
CLISetup::log(' - '.$itr.'/'.$nFiles.' ('.(intVal(100 * $itr / $nFiles).'%) done'));
}
if (stristr($filePath, '.wav')) // expected file.wav.ogg
$filePath .= '.ogg';
else // expected file.mp3.mp3
$filePath .= '.mp3';
// just use the first locale available .. i there is no support for multiple audio files anyway
foreach (CLISetup::$expectedPaths as $locStr => $__)
{
// get your paths straight!
$p = CLISetup::nicePath($filePath, CLISetup::$srcDir, $locStr);
if (CLISetup::fileExists($p))
{
// copy over to static/wowsounds/
if (!copy($p, 'static/wowsounds/'.$fileId))
{
$ok = false;
CLISetup::log(' - could not copy '.CLISetup::bold($p).' into '.CLISetup::bold('static/wowsounds/'.$fileId), CLISetup::LOG_ERROR);
die();
}
continue 2;
}
}
CLISetup::log(' - did not find file: '.CLISetup::bold(CLISetup::nicePath($filePath, CLISetup::$srcDir, '<locale>')), CLISetup::LOG_WARN);
// flag as unusable in DB
DB::Aowow()->query('UPDATE ?_sounds_files SET id = ?d WHERE ABS(id) = ?d', -$fileId, $fileId);
}
return $ok;
}
?>

View File

@@ -52,6 +52,7 @@ class SqlGen
'shapeshiftforms' => [null, null, null, null],
'skillline' => [null, null, null, null],
'emotes' => [null, null, null, null],
'sounds' => [null, null, null, null],
'itemenchantment' => [null, null, null, ['spell_enchant_proc_data']],
'achievement' => [null, null, null, ['dbc_achievement']],
'creature' => [null, null, null, ['creature_template', 'creature_template_locale', 'creature_classlevelstats', 'instance_encounters']],

View File

@@ -9,10 +9,14 @@ if (!CLI)
$customData = array(
);
$reqDBC = ['emotes', 'emotestext', 'emotestextdata' /*, 'emotestextsound' */];
$reqDBC = ['emotes', 'emotestext', 'emotestextdata'];
function emotes(/*array $ids = [] */)
{
/**********/
/* Basics */
/**********/
$globStrPath = CLISetup::$srcDir.'%sInterface/FrameXML/GlobalStrings.lua';
$allOK = true;
$locPath = [];

View File

@@ -33,9 +33,11 @@ function items(array $ids = [])
it.entry,
class, class as classBak,
subclass, subclass AS subClassBak,
SoundOverrideSubclass,
IFNULL(sg.id, 0) AS subSubClass,
name, IFNULL(li.name_loc2, ""), IFNULL(li.name_loc3, ""), IFNULL(li.name_loc6, ""), IFNULL(li.name_loc8, ""),
displayid,
0 AS spellVisualId,
Quality,
Flags, FlagsExtra,
BuyCount, BuyPrice, SellPrice,
@@ -86,6 +88,7 @@ function items(array $ids = [])
LanguageID,
startquest,
lockid,
Material,
IF(RandomProperty > 0, RandomProperty, -RandomSuffix) AS randomEnchant,
itemset,
MaxDurability,
@@ -107,6 +110,10 @@ function items(array $ids = [])
FoodType,
0 AS gemEnchantmentId,
minMoneyLoot, maxMoneyLoot,
0 AS pickUpSoundId,
0 AS dropDownSoundId,
0 AS sheatheSoundId,
0 AS unsheatheSoundId,
flagsCustom
FROM
item_template it

View File

@@ -25,6 +25,10 @@ $reqDBC = ['chrraces', 'charbaseinfo'];
function races()
{
/**********/
/* Basics */
/**********/
$baseQuery = '
REPLACE INTO
?_races

View File

@@ -0,0 +1,426 @@
<?php
if (!defined('AOWOW_REVISION'))
die('illegal access');
if (!CLI)
die('not in cli mode');
$customData = array(
15407 => ['cat' => 10] // UR_Algalon_Summon03 (this is not an item pickup)
);
$reqDBC = array(
// base emotes race
'soundentries', 'emotestextsound', 'vocaluisounds',
// creatures
'npcsounds', 'creaturesounddata', 'creaturedisplayinfo', 'creaturemodeldata',
// spells
'spell', 'spellvisual', 'spellvisualkit',
// zones
'soundambience', 'zonemusic', 'zoneintromusictable', 'worldstatezonesounds', 'areatable',
// items
'material', 'itemgroupsounds', 'itemdisplayinfo', 'weaponimpactsounds', 'itemsubclass', 'weaponswingsounds2' /*, 'sheathesoundlookups' data is redundant with material..? */
);
function sounds(/*array $ids = [] */)
{
/*
okay, here's the thing. WMOAreaTable.dbc references WMO-files to get its position in the world (AreTable) and has sparse information on the related AreaTables themself.
Though it has sets for ZoneAmbience, ZoneMusic and ZoneIntroMusic, these can't be linked for this very reason and are omitted for now.
content: e.g. Tavern Music
*/
// WMOAreaTable.dbc/Id => AreaTable.dbc/Id
$worldStateZoneSoundFix = array(
18153 => 2119,
18154 => 2119,
47321 => 4273, // The Spark of Imagination
43600 => 4273, // The Celestial Planetarium
47478 => 4273 // The Prison of Yogg-Saron
);
/***********/
/* M A I N */
/***********/
CLISetup::log(' - sounds main data');
// file extraction and conversion in build step. data here is purely structural
// reality check ... thats probably gigabytes worth of sound.. only growing in size with every locale added on top (RedRocketSite didn't do it. Should i then?)
// .wav => audio/ogg; codecs="vorbis"
// .mp3 => audio/mpeg
$query = '
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,
`file6` AS soundFile6, `file7` AS soundFile7, `file8` AS soundFile8, `file9` AS soundFile9, `file10` AS soundFile10,
path, flags
FROM dbc_soundentries
WHERE id > ?d LIMIT ?d
';
DB::Aowow()->query('TRUNCATE ?_sounds');
DB::Aowow()->query('TRUNCATE ?_sounds_files');
$lastMax = 0;
$soundFileIdx = 0;
$soundIndex = [];
while ($sounds = DB::Aowow()->select($query, $lastMax, SqlGen::$stepSize))
{
$newMax = max(array_column($sounds, 'id'));
CLISetup::log(' * sets '.($lastMax + 1).' - '.$newMax);
$lastMax = $newMax;
$groupSets = [];
foreach ($sounds as $s)
{
/* attention!
one sound can be used in 20 or more locations but may appear as multiple files,
because of different cases, path being attached to file and other shenanigans
build a usable path and create full index to compensate
25.6k raw files => expect ~21k filtered files
*/
$fileSets = [];
$hasDupes = false;
for ($i = 1; $i < 11; $i++)
{
$nicePath = CLISetup::nicePath($s['soundFile'.$i], $s['path']);
if ($s['soundFile'.$i] && array_key_exists($nicePath, $soundIndex))
{
$s['soundFile'.$i] = $soundIndex[$nicePath];
$hasDupes = true;
continue;
}
// convert to something web friendly => ogg
if (stristr($s['soundFile'.$i], '.wav'))
{
$soundIndex[$nicePath] = ++$soundFileIdx;
$fileSets[] = array(
$soundFileIdx,
strtolower($s['soundFile'.$i]),
strtolower($s['path']),
SOUND_TYPE_OGG
);
$s['soundFile'.$i] = $soundFileIdx;
}
// mp3 .. keep as is
else if (stristr($s['soundFile'.$i], '.mp3'))
{
$soundIndex[$nicePath] = ++$soundFileIdx;
$fileSets[] = array(
$soundFileIdx,
strtolower($s['soundFile'.$i]),
strtolower($s['path']),
SOUND_TYPE_MP3
);
$s['soundFile'.$i] = $soundFileIdx;
}
// i call bullshit
else if ($s['soundFile'.$i])
{
CLISetup::log(' - sound group #'.$s['id'].' "'.$s['name'].'" has invalid sound file "'.$s['soundFile'.$i].'" on index '.$i.'! Skipping...', CLISetup::LOG_WARN);
$s['soundFile'.$i] = null;
}
// empty case
else
$s['soundFile'.$i] = null;
}
if (!$fileSets && !$hasDupes)
{
CLISetup::log(' - sound group #'.$s['id'].' "'.$s['name'].'" contains no sound files! Skipping...', CLISetup::LOG_WARN);
continue;
}
else if ($fileSets)
DB::Aowow()->query('INSERT INTO ?_sounds_files VALUES (?a)', array_values($fileSets));
unset($s['path']);
$groupSets[] = array_values($s);
}
DB::Aowow()->query('REPLACE INTO ?_sounds VALUES (?a)', array_values($groupSets));
}
/******************/
/* VocalUI Sounds */
/******************/
CLISetup::log(' - linking to race');
DB::Aowow()->query('TRUNCATE ?_races_sounds');
DB::Aowow()->query('INSERT IGNORE INTO ?_races_sounds SELECT raceId, soundIdMale, 1 FROM dbc_vocaluisounds WHERE soundIdMale <> soundIdFemale AND soundIdMale > 0');
DB::Aowow()->query('INSERT IGNORE INTO ?_races_sounds SELECT raceId, soundIdFemale, 2 FROM dbc_vocaluisounds WHERE soundIdMale <> soundIdFemale AND soundIdFemale > 0');
// ps: im too dumb to union this
/***************/
/* Emote Sound */
/***************/
CLISetup::log(' - linking to emotes');
DB::Aowow()->query('TRUNCATE ?_emotes_sounds');
DB::Aowow()->query('INSERT IGNORE INTO ?_emotes_sounds SELECT emotesTextId, raceId, gender + 1, soundId FROM dbc_emotestextsound');
/*******************/
/* Creature Sounds */
/*******************/
CLISetup::log(' - linking to creatures');
// currently ommitting:
// * footsteps (matrix of: creature + terrain + humidity)
// * fidget2 through 5
// * customattack2 through 3
// in case of conflicting data CreatureDisplayInfo overrides CreatureModelData (seems to be more specialized (Thral > MaleOrc / Maiden > FemaleTitan))
DB::Aowow()->query('TRUNCATE ?_creature_sounds');
DB::Aowow()->query('
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`)
SELECT
cdi.Id,
IFNULL(ns.greetSoundId, 0),
IFNULL(ns.byeSoundId, 0),
IFNULL(ns.angrySoundId, 0),
IF(csdA.exertion, csdA.exertion, IFNULL(csdB.exertion, 0)),
IF(csdA.exertionCritical, csdA.exertionCritical, IFNULL(csdB.exertionCritical, 0)),
IF(csdA.injury, csdA.injury, IFNULL(csdB.injury, 0)),
IF(csdA.injuryCritical, csdA.injuryCritical, IFNULL(csdB.injuryCritical, 0)),
IF(csdA.death, csdA.death, IFNULL(csdB.death, 0)),
IF(csdA.stun, csdA.stun, IFNULL(csdB.stun, 0)),
IF(csdA.stand, csdA.stand, IFNULL(csdB.stand, 0)),
IF(csdA.aggro, csdA.aggro, IFNULL(csdB.aggro, 0)),
IF(csdA.wingFlap, csdA.wingFlap, IFNULL(csdB.wingFlap, 0)),
IF(csdA.wingGlide, csdA.wingGlide, IFNULL(csdB.wingGlide, 0)),
IF(csdA.alert, csdA.alert, IFNULL(csdB.alert, 0)),
IF(csdA.fidget, csdA.fidget, IFNULL(csdB.fidget, 0)),
IF(csdA.customAttack, csdA.customAttack, IFNULL(csdB.customAttack, 0)),
IF(csdA.loop, csdA.loop, IFNULL(csdB.loop, 0)),
IF(csdA.jumpStart, csdA.jumpStart, IFNULL(csdB.jumpStart, 0)),
IF(csdA.jumpEnd, csdA.jumpEnd, IFNULL(csdB.jumpEnd, 0)),
IF(csdA.petAttack, csdA.petAttack, IFNULL(csdB.petAttack, 0)),
IF(csdA.petOrder, csdA.petOrder, IFNULL(csdB.petOrder, 0)),
IF(csdA.petDismiss, csdA.petDismiss, IFNULL(csdB.petDismiss, 0)),
IF(csdA.birth, csdA.birth, IFNULL(csdB.birth, 0)),
IF(csdA.spellcast, csdA.spellcast, IFNULL(csdB.spellcast, 0)),
IF(csdA.submerge, csdA.submerge, IFNULL(csdB.submerge, 0)),
IF(csdA.submerged, csdA.submerged, IFNULL(csdB.submerged, 0))
FROM
dbc_creaturedisplayinfo cdi
LEFT JOIN
dbc_creaturemodeldata cmd ON cmd.Id = cdi.modelId
LEFT JOIN
dbc_creaturesounddata csdA ON cdi.creatureSoundId = csdA.Id
LEFT JOIN
dbc_creaturesounddata csdB ON cmd.creatureSoundId = csdB.Id
LEFT JOIN
dbc_npcsounds ns ON cdi.npcSoundId = ns.Id
');
/****************/
/* Spell Sounds */
/****************/
CLISetup::log(' - linking to spells');
// issues: (probably because of 335-data)
// * animate is probably wrong
// * missile and impactarea not in js
// * ready, castertargeting, casterstate and targetstate not in dbc
DB::Aowow()->query('TRUNCATE ?_spell_sounds');
DB::Aowow()->query('
INSERT INTO
?_spell_sounds (`Id`, `precast`, `cast`, `impact`, `state`, `statedone`, `channel`, `missile`, `animation`, `casterimpact`, `targetimpact`, `missiletargeting`, `instantarea`, `impactarea`, `persistentarea`)
SELECT
sv.Id,
IFNULL(svk1.soundId, 0),
IFNULL(svk2.soundId, 0),
IFNULL(svk3.soundId, 0),
IFNULL(svk4.soundId, 0),
IFNULL(svk5.soundId, 0),
IFNULL(svk6.soundId, 0),
missileSoundId,
animationSoundId,
IFNULL(svk7.soundId, 0),
IFNULL(svk8.soundId, 0),
IFNULL(svk9.soundId, 0),
IFNULL(svk10.soundId, 0),
IFNULL(svk11.soundId, 0),
IFNULL(svk12.soundId, 0)
FROM
dbc_spellvisual sv
LEFT JOIN
dbc_spellvisualkit svk1 ON svk1.Id = sv.precastKitId
LEFT JOIN
dbc_spellvisualkit svk2 ON svk2.Id = sv.castKitId
LEFT JOIN
dbc_spellvisualkit svk3 ON svk3.Id = sv.impactKitId
LEFT JOIN
dbc_spellvisualkit svk4 ON svk4.Id = sv.stateKitId
LEFT JOIN
dbc_spellvisualkit svk5 ON svk5.Id = sv.statedoneKitId
LEFT JOIN
dbc_spellvisualkit svk6 ON svk6.Id = sv.channelKitId
LEFT JOIN
dbc_spellvisualkit svk7 ON svk7.Id = sv.casterImpactKitId
LEFT JOIN
dbc_spellvisualkit svk8 ON svk8.Id = sv.targetImpactKitId
LEFT JOIN
dbc_spellvisualkit svk9 ON svk9.Id = sv.missileTargetingKitId
LEFT JOIN
dbc_spellvisualkit svk10 ON svk10.Id = sv.instantAreaKitId
LEFT JOIN
dbc_spellvisualkit svk11 ON svk11.Id = sv.impactAreaKitId
LEFT JOIN
dbc_spellvisualkit svk12 ON svk12.Id = sv.persistentAreaKitId
');
/***************/
/* Zone Sounds */
/***************/
CLISetup::log(' - linking to zones');
// omiting data from WMOAreaTable, as its at the moment impossible to link to actual zones
DB::Aowow()->query('TRUNCATE ?_zones_sounds');
DB::Aowow()->query('
INSERT INTO
?_zones_sounds (id, ambienceDay, ambienceNight, musicDay, musicNight, intro, worldStateId, worldStateValue)
SELECT
a.id,
IFNULL(sa1.soundIdDay, 0),
IFNULL(sa1.soundIdNight, 0),
IFNULL(zm1.soundIdDay, 0),
IFNULL(zm1.soundIdNight, 0),
IFNULL(zimt1.soundId, 0),
0,
0
FROM
dbc_areatable a
LEFT JOIN
dbc_soundambience sa1 ON sa1.id = a.soundAmbience
LEFT JOIN
dbc_zonemusic zm1 ON zm1.id = a.zoneMusic
LEFT JOIN
dbc_zoneintromusictable zimt1 ON zimt1.id = a.zoneIntroMusic
WHERE
a.soundAmbience > 0 OR a.zoneMusic > 0 OR a.zoneIntroMusic
UNION
SELECT
IF(wszs.areaId, wszs.areaId, wszs.wmoAreaId),
IFNULL(sa2.soundIdDay, 0),
IFNULL(sa2.soundIdNight, 0),
IFNULL(zm2.soundIdDay, 0),
IFNULL(zm2.soundIdNight, 0),
IFNULL(zimt2.soundId, 0),
wszs.stateId,
wszs.value
FROM
dbc_worldstatezonesounds wszs
LEFT JOIN
dbc_soundambience sa2 ON sa2.id = wszs.soundAmbienceId
LEFT JOIN
dbc_zonemusic zm2 ON zm2.id = wszs.zoneMusicId
LEFT JOIN
dbc_zoneintromusictable zimt2 ON zimt2.id = wszs.zoneIntroMusicId
WHERE
wszs.zoneMusicId > 0 AND (wszs.areaId OR wszs.wmoAreaId IN (?a))
', array_keys($worldStateZoneSoundFix));
// apply post-fix
foreach ($worldStateZoneSoundFix as $old => $new)
DB::Aowow()->query('UPDATE ?_zones_sounds SET id = ?d WHERE id = ?d', $new, $old);
/***************/
/* Item Sounds */
/***************/
CLISetup::log(' - linking to items');
DB::Aowow()->query('
UPDATE
?_items i
LEFT JOIN
dbc_itemdisplayinfo idi ON
idi.id = i.displayId
LEFT JOIN
dbc_itemgroupsounds igs ON
igs.id = idi.groupSoundId
LEFT JOIN
dbc_material m ON
m.id = i.material
SET
i.spellVisualId = IFNULL(idi.spellVisualId, 0),
i.pickUpSoundId = IFNULL(igs.pickUpSoundId, 0),
i.dropDownSoundId = IFNULL(igs.dropDownSoundId, 0),
i.sheatheSoundId = IFNULL(m.sheatheSoundId, 0),
i.unsheatheSoundId = IFNULL(m.unsheatheSoundId, 0)
');
DB::Aowow()->query('TRUNCATE ?_items_sounds');
$fields = ['hit', 'crit'];
foreach ($fields as $f)
{
for ($i = 1; $i <= 10; $i++)
{
DB::Aowow()->query('
INSERT INTO
?_items_sounds
SELECT
?#,
(1 << wis.subClass)
FROM
dbc_weaponimpactsounds wis
WHERE
?# > 0
ON DUPLICATE KEY UPDATE
subClassMask = subClassMask | (1 << wis.subClass)
', $f.$i, $f.$i);
}
}
DB::Aowow()->query('
INSERT INTO
?_items_sounds
SELECT
wss.soundId,
(1 << isc.subClass)
FROM
dbc_itemsubclass isc
JOIN
dbc_weaponswingsounds2 wss ON
wss.weaponSize = isc.weaponSize
WHERE
isc.class = 2
ON DUPLICATE KEY UPDATE
subClassMask = subClassMask | (1 << isc.subClass)
');
return true;
}
?>

View File

@@ -23,7 +23,7 @@ if (!CLI)
$customData = array(
);
$reqDBC = ['worldmaparea', 'map', 'worldmaptransforms', 'dungeonmap', 'taxipathnode'];
$reqDBC = ['worldmaparea', 'map', 'dungeonmap', 'taxipathnode', 'soundemitters'];
function spawns() // and waypoints
{
@@ -98,15 +98,19 @@ function spawns() // and waypoints
'FROM gameobject c',
' - assembling '.CLISetup::bold('gameobject').' spawns'];
$query[3] = ['SELECT c.guid, w.entry AS "npcOrPath", w.pointId AS "point", c.zoneId AS areaId, c.map, w.waittime AS "wait", w.location_y AS `posX`, w.location_x AS `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',
' - assembling '.CLISetup::bold('sound emitter').' spawns'];
$query[4] = ['SELECT c.guid, w.entry AS "npcOrPath", w.pointId AS "point", c.zoneId AS areaId, c.map, w.waittime AS "wait", w.location_y AS `posX`, w.location_x AS `posY` ' .
'FROM creature c JOIN script_waypoint w ON c.id = w.entry',
' - assembling waypoints from '.CLISetup::bold('script_waypoint')];
$query[4] = ['SELECT c.guid, w.entry AS "npcOrPath", w.pointId AS "point", c.zoneId AS areaId, c.map, 0 AS "wait", w.position_y AS `posX`, w.position_x AS `posY` ' .
$query[5] = ['SELECT c.guid, w.entry AS "npcOrPath", w.pointId AS "point", c.zoneId AS areaId, c.map, 0 AS "wait", w.position_y AS `posX`, w.position_x AS `posY` ' .
'FROM creature c JOIN waypoints w ON c.id = w.entry',
' - assembling waypoints from '.CLISetup::bold('waypoints')];
$query[5] = ['SELECT c.guid, -w.id AS "npcOrPath", w.point, c.zoneId AS areaId, c.map, w.delay AS "wait", w.position_y AS `posX`, w.position_x AS `posY` ' .
$query[6] = ['SELECT c.guid, -w.id AS "npcOrPath", w.point, c.zoneId AS areaId, c.map, w.delay AS "wait", w.position_y AS `posX`, w.position_x AS `posY` ' .
'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')];
@@ -118,7 +122,7 @@ function spawns() // and waypoints
'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) ' .
'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';
@@ -149,7 +153,13 @@ function spawns() // and waypoints
$n = 0;
$sum = 0;
foreach (DB::World()->select($q[0]) as $spawn)
if ($idx == 3)
$queryResult = DB::Aowow()->select($q[0]);
else
$queryResult = DB::World()->select($q[0]);
foreach ($queryResult as $spawn)
{
if (!$n)
CLISetup::log(' * sets '.($sum + 1).' - '.($sum += SqlGen::$stepSize));
@@ -167,20 +177,20 @@ function spawns() // and waypoints
$spawn['map'] = $transports[$spawn['map']]['mapId'];
}
$points = DB::Aowow()->select($queryPost, $spawn['posX'], $spawn['posX'], $spawn['posY'], $spawn['posY'], $spawn['posX'], $spawn['posX'], $spawn['posY'], $spawn['posY'], 1, $spawn['map'], $spawn['areaId'], $spawn['areaId'], $spawn['areaId'] ? 1 : 0);
$points = DB::Aowow()->select($queryPost, $spawn['posX'], $spawn['posX'], $spawn['posY'], $spawn['posY'], $spawn['posX'], $spawn['posX'], $spawn['posY'], $spawn['posY'], 1, $spawn['map'], $spawn['areaId'], $spawn['areaId'] /*, $spawn['areaId'] ? 1 : 0*/);
if (!$points) // retry: TC counts pre-instance subareas as instance-maps .. which have no map file
$points = DB::Aowow()->select($queryPost, $spawn['posX'], $spawn['posX'], $spawn['posY'], $spawn['posY'], $spawn['posX'], $spawn['posX'], $spawn['posY'], $spawn['posY'], 0, $spawn['map'], 0, 0, 1);
$points = DB::Aowow()->select($queryPost, $spawn['posX'], $spawn['posX'], $spawn['posY'], $spawn['posY'], $spawn['posX'], $spawn['posX'], $spawn['posY'], $spawn['posY'], 0, $spawn['map'], 0, 0 /*, 1*/);
if (!$points) // still impossible (there are areas that are intentionally off the map (e.g. the isles south of tanaris))
{
CLISetup::log('GUID '.$spawn['guid'].($idx < 3 ? '' : ' on path/point '.$spawn['npcOrPath'].'/'.$spawn['point']).' could not be matched to displayable area [A:'.$spawn['areaId'].'; X:'.$spawn['posY'].'; Y:'.$spawn['posX'].']', CLISetup::LOG_WARN);
CLISetup::log('GUID '.$spawn['guid'].($idx < 4 ? '' : ' on path/point '.$spawn['npcOrPath'].'/'.$spawn['point']).' could not be matched to displayable area [A:'.$spawn['areaId'].'; X:'.$spawn['posY'].'; Y:'.$spawn['posX'].']', CLISetup::LOG_WARN);
continue;
}
// if areaId is set, area was determined by TC .. we're fine .. mostly
$final = $spawn['areaId'] ? $points[0] : $checkCoords($points);
if ($idx < 3)
if ($idx < 4)
{
$set = array(
'guid' => $spawn['guid'],

View File

@@ -85,6 +85,7 @@ function spell()
EffectSpellClassMaskA1, EffectSpellClassMaskA2, EffectSpellClassMaskA3,
EffectSpellClassMaskB1, EffectSpellClassMaskB2, EffectSpellClassMaskB3,
EffectSpellClassMaskC1, EffectSpellClassMaskC2, EffectSpellClassMaskC3,
0 AS spellVisualId1, 0 AS spellVisualId2,
0 AS iconId, 0 AS iconIdActive,
CONCAT("Serverside - ",Comment) AS name_loc0,CONCAT("Serverside - ",Comment) AS name_loc2,CONCAT("Serverside - ",Comment) AS name_loc3,CONCAT("Serverside - ",Comment) AS name_loc6,CONCAT("Serverside - ",Comment) AS name_loc8,
"" AS rank_loc0, "" AS rank_loc2, "" AS rank_loc3, "" AS rank_loc6, "" AS rank_loc8,
@@ -176,6 +177,7 @@ function spell()
effect1BonusMultiplier, effect2BonusMultiplier, effect3BonusMultiplier,
iconId, 0 AS iconIdAlt,
0 AS rankId,
spellVisualId1,
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,

View File

@@ -1,107 +1,107 @@
-- TYPE_NPC:1
UPDATE aowow_creature a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 1 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_OBJECT:2
UPDATE aowow_objects a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 2 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_ITEM:3
UPDATE aowow_items a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 3 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_ITEMSET:4
UPDATE aowow_itemset a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 4 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_QUEST:5
UPDATE aowow_quests a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 5 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_SPELL:6
UPDATE aowow_spell a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 6 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_ZONE:7
UPDATE aowow_zones a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 7 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_FACTION:8
UPDATE aowow_factions a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 8 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_PET:9
UPDATE aowow_pet a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 9 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_ACHIEVEMENT:10
UPDATE aowow_achievement a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 10 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_TITLE:11
UPDATE aowow_titles a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 11 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_WORLDEVENT:12
UPDATE aowow_events a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 12 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_CLASS:13
UPDATE aowow_classes a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 13 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_RACE:14
UPDATE aowow_races a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 14 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_SKILL:15
UPDATE aowow_skillline a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 15 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_CURRENCY:17
UPDATE aowow_currencies a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 17 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_EMOTE:501
UPDATE aowow_emotes a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 501 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_ENCHANTMENT:502
UPDATE aowow_itemenchantment a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 502 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_NPC:1
UPDATE aowow_creature a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 1 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_OBJECT:2
UPDATE aowow_objects a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 2 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_ITEM:3
UPDATE aowow_items a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 3 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_ITEMSET:4
UPDATE aowow_itemset a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 4 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_QUEST:5
UPDATE aowow_quests a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 5 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_SPELL:6
UPDATE aowow_spell a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 6 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_ZONE:7
UPDATE aowow_zones a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 7 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_FACTION:8
UPDATE aowow_factions a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 8 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_PET:9
UPDATE aowow_pet a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 9 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_ACHIEVEMENT:10
UPDATE aowow_achievement a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 10 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_TITLE:11
UPDATE aowow_titles a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 11 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_WORLDEVENT:12
UPDATE aowow_events a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 12 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_CLASS:13
UPDATE aowow_classes a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 13 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_RACE:14
UPDATE aowow_races a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 14 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_SKILL:15
UPDATE aowow_skillline a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 15 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_CURRENCY:17
UPDATE aowow_currencies a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 17 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_EMOTE:501
UPDATE aowow_emotes a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 501 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;
-- TYPE_ENCHANTMENT:502
UPDATE aowow_itemenchantment a
JOIN (SELECT typeId, BIT_OR(`status`) AS `ccFlags` FROM aowow_screenshots WHERE `type` = 502 GROUP BY typeId) b ON a.id = b.typeId
SET a.cuFlags = a.cuFlags | 0x02000000
WHERE b.ccFlags & 0x8;

View File

@@ -0,0 +1,23 @@
-- drop deprecatede dbc-tables
DROP TABLE IF EXISTS `dbc_areatable`;
DROP TABLE IF EXISTS `dbc_creaturedisplayinfo`;
DROP TABLE IF EXISTS `dbc_creaturemodeldata`;
DROP TABLE IF EXISTS `dbc_creaturesounddata`;
DROP TABLE IF EXISTS `dbc_emotestextsound`;
DROP TABLE IF EXISTS `dbc_itemdisplayinfo`;
DROP TABLE IF EXISTS `dbc_itemgroupsounds`;
DROP TABLE IF EXISTS `dbc_itemsubclass`;
DROP TABLE IF EXISTS `dbc_material`;
DROP TABLE IF EXISTS `dbc_npcsounds`;
DROP TABLE IF EXISTS `dbc_soundambience`;
DROP TABLE IF EXISTS `dbc_soundemitters`;
DROP TABLE IF EXISTS `dbc_soundentries`;
DROP TABLE IF EXISTS `dbc_spell`;
DROP TABLE IF EXISTS `dbc_spellvisual`;
DROP TABLE IF EXISTS `dbc_spellvisualkit`;
DROP TABLE IF EXISTS `dbc_vocaluisounds`;
DROP TABLE IF EXISTS `dbc_weaponimpactsounds`;
DROP TABLE IF EXISTS `dbc_weaponswingsounds2`;
DROP TABLE IF EXISTS `dbc_worldstatezonesound`;
DROP TABLE IF EXISTS `dbc_zoneintromusictable`;
DROP TABLE IF EXISTS `dbc_zonemusic`;

View File

@@ -0,0 +1,164 @@
-- alterations
ALTER TABLE `aowow_spell`
ADD COLUMN `spellVisualId` smallint(5) unsigned NOT NULL AFTER `rankNo`;
ALTER TABLE `aowow_items`
ADD COLUMN `spellVisualId` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `displayId`,
ADD COLUMN `material` tinyint(3) NOT NULL DEFAULT '0' AFTER `lockId`,
ADD COLUMN `soundOverrideSubclass` tinyint(3) NOT NULL AFTER `subClassBak`,
ADD COLUMN `pickUpSoundId` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `maxMoneyLoot`,
ADD COLUMN `dropDownSoundId` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `pickUpSoundId`,
ADD COLUMN `sheatheSoundId` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `dropDownSoundId`,
ADD COLUMN `unsheatheSoundId` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `sheatheSoundId`;
-- additions
REPLACE INTO `aowow_articles` (`type`, `typeId`, `locale`, `article`, `quickInfo`)
VALUES (19, -1000, 0, 'Here you can set up a playlist of sounds and music. \n\nJust click the "Add" button near an audio control, then return to this page to listen to the list you\'ve created.', NULL);
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
DROP TABLE IF EXISTS `aowow_items_sounds`;
CREATE TABLE `aowow_items_sounds` (
`soundId` smallint(5) unsigned NOT NULL,
`subClassMask` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`soundId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='actually .. its only weapon related sounds in here';
DROP TABLE IF EXISTS `aowow_zones_sounds`;
CREATE TABLE `aowow_zones_sounds` (
`id` smallint(5) unsigned NOT NULL,
`ambienceDay` smallint(5) unsigned NOT NULL,
`ambienceNight` smallint(5) unsigned NOT NULL,
`musicDay` smallint(5) unsigned NOT NULL,
`musicNight` smallint(5) unsigned NOT NULL,
`intro` smallint(5) unsigned NOT NULL,
`worldStateId` smallint(5) unsigned NOT NULL,
`worldStateValue` smallint(6) NOT NULL,
INDEX `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `aowow_creature_sounds`;
CREATE TABLE IF NOT EXISTS `aowow_creature_sounds` (
`id` smallint(5) unsigned NOT NULL COMMENT 'CreatureDisplayInfo.dbc/id',
`greeting` smallint(5) unsigned NOT NULL,
`farewell` smallint(5) unsigned NOT NULL,
`angry` smallint(5) unsigned NOT NULL,
`exertion` smallint(5) unsigned NOT NULL,
`exertioncritical` smallint(5) unsigned NOT NULL,
`injury` smallint(5) unsigned NOT NULL,
`injurycritical` smallint(5) unsigned NOT NULL,
`death` smallint(5) unsigned NOT NULL,
`stun` smallint(5) unsigned NOT NULL,
`stand` smallint(5) unsigned NOT NULL,
`footstep` smallint(5) unsigned NOT NULL,
`aggro` smallint(5) unsigned NOT NULL,
`wingflap` smallint(5) unsigned NOT NULL,
`wingglide` smallint(5) unsigned NOT NULL,
`alert` smallint(5) unsigned NOT NULL,
`fidget` smallint(5) unsigned NOT NULL,
`customattack` smallint(5) unsigned NOT NULL,
`loop` smallint(5) unsigned NOT NULL,
`jumpstart` smallint(5) unsigned NOT NULL,
`jumpend` smallint(5) unsigned NOT NULL,
`petattack` smallint(5) unsigned NOT NULL,
`petorder` smallint(5) unsigned NOT NULL,
`petdismiss` smallint(5) unsigned NOT NULL,
`birth` smallint(5) unsigned NOT NULL,
`spellcast` smallint(5) unsigned NOT NULL,
`submerge` smallint(5) unsigned NOT NULL,
`submerged` smallint(5) unsigned NOT NULL,
`transform` smallint(5) unsigned NOT NULL,
`transformanimated` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='!ATTENTION!\r\nthe primary key of this table is NOT a creatureId, but displayId\r\n\r\ncolumn names from LANG.sound_activities';
DROP TABLE IF EXISTS `aowow_emotes_sounds`;
CREATE TABLE IF NOT EXISTS `aowow_emotes_sounds` (
`emoteId` smallint(5) unsigned NOT NULL,
`raceId` tinyint(3) unsigned NOT NULL,
`gender` tinyint(1) unsigned NOT NULL,
`soundId` smallint(5) unsigned NOT NULL,
UNIQUE KEY `emoteId_raceId_gender_soundId` (`emoteId`,`raceId`,`gender`,`soundId`),
KEY `emoteId` (`emoteId`),
KEY `raceId` (`raceId`),
KEY `soundId` (`soundId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `aowow_races_sounds`;
CREATE TABLE IF NOT EXISTS `aowow_races_sounds` (
`raceId` tinyint(3) unsigned NOT NULL,
`soundId` smallint(5) unsigned NOT NULL,
`gender` tinyint(1) unsigned NOT NULL,
UNIQUE KEY `race_soundId_gender` (`raceId`,`soundId`,`gender`),
KEY `race` (`raceId`),
KEY `soundId` (`soundId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `aowow_sounds`;
CREATE TABLE IF NOT EXISTS `aowow_sounds` (
`id` smallint(5) unsigned NOT NULL,
`cat` tinyint(3) unsigned NOT NULL,
`name` varchar(100) NOT NULL,
`cuFlags` int(10) unsigned NOT NULL,
`soundFile1` smallint(5) unsigned DEFAULT NULL,
`soundFile2` smallint(5) unsigned DEFAULT NULL,
`soundFile3` smallint(5) unsigned DEFAULT NULL,
`soundFile4` smallint(5) unsigned DEFAULT NULL,
`soundFile5` smallint(5) unsigned DEFAULT NULL,
`soundFile6` smallint(5) unsigned DEFAULT NULL,
`soundFile7` smallint(5) unsigned DEFAULT NULL,
`soundFile8` smallint(5) unsigned DEFAULT NULL,
`soundFile9` smallint(5) unsigned DEFAULT NULL,
`soundFile10` smallint(5) unsigned DEFAULT NULL,
`flags` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `cat` (`cat`),
KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `aowow_sounds_files`;
CREATE TABLE IF NOT EXISTS `aowow_sounds_files` (
`id` smallint(6) NOT NULL COMMENT '<0 not found in client files',
`file` varchar(75) NOT NULL,
`path` varchar(75) NOT NULL COMMENT 'in client',
`type` tinyint(1) unsigned NOT NULL COMMENT '1: ogg; 2: mp3',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `aowow_spell_sounds`;
CREATE TABLE IF NOT EXISTS `aowow_spell_sounds` (
`id` smallint(5) unsigned NOT NULL COMMENT 'SpellVisual.dbc/id',
`animation` smallint(5) unsigned NOT NULL,
`ready` smallint(5) unsigned NOT NULL,
`precast` smallint(5) unsigned NOT NULL,
`cast` smallint(5) unsigned NOT NULL,
`impact` smallint(5) unsigned NOT NULL,
`state` smallint(5) unsigned NOT NULL,
`statedone` smallint(5) unsigned NOT NULL,
`channel` smallint(5) unsigned NOT NULL,
`casterimpact` smallint(5) unsigned NOT NULL,
`targetimpact` smallint(5) unsigned NOT NULL,
`castertargeting` smallint(5) unsigned NOT NULL,
`missiletargeting` smallint(5) unsigned NOT NULL,
`instantarea` smallint(5) unsigned NOT NULL,
`persistentarea` smallint(5) unsigned NOT NULL,
`casterstate` smallint(5) unsigned NOT NULL,
`targetstate` smallint(5) unsigned NOT NULL,
`missile` smallint(5) unsigned NOT NULL COMMENT 'not predicted by js',
`impactarea` smallint(5) unsigned NOT NULL COMMENT 'not predicted by js',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='!ATTENTION!\r\nthe primary key of this table is NOT a spellId, but spellVisualId\r\n\r\ncolumn names from LANG.sound_activities';
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
UPDATE aowow_dbversion SET `build` = CONCAT(IFNULL(`build`, ''), ' sounds'), `sql` = CONCAT(IFNULL(`sql`, ''), ' spell creature sounds spawns');