Core/PacketIO: Updated packet structures to 8.0.1
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
--
|
||||
-- Table structure for table `animation_data`
|
||||
--
|
||||
DROP TABLE IF EXISTS `animation_data`;
|
||||
CREATE TABLE `animation_data` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`Fallback` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`BehaviorTier` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`BehaviorID` int(11) NOT NULL DEFAULT '0',
|
||||
`Flags1` int(11) NOT NULL DEFAULT '0',
|
||||
`Flags2` int(11) NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Table structure for table `num_talents_at_level`
|
||||
--
|
||||
DROP TABLE IF EXISTS `num_talents_at_level`;
|
||||
CREATE TABLE `num_talents_at_level` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`NumTalents` int(11) NOT NULL DEFAULT '0',
|
||||
`NumTalentsDeathKnight` int(11) NOT NULL DEFAULT '0',
|
||||
`NumTalentsDemonHunter` int(11) NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
@@ -0,0 +1,104 @@
|
||||
ALTER TABLE `conversation_template` ADD `TextureKitId` int(10) unsigned NOT NULL DEFAULT '0' AFTER `LastLineEndTime`;
|
||||
ALTER TABLE `gameobject_template` ADD `Data33` int(11) NOT NULL DEFAULT '0' AFTER `Data32`;
|
||||
ALTER TABLE `playerchoice` ADD `KeepOpenAfterChoice` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `HideWarboardHeader`;
|
||||
ALTER TABLE `playerchoice_response`
|
||||
ADD `Flags` int(11) NOT NULL DEFAULT '0' AFTER `ChoiceArtFileId`,
|
||||
ADD `WidgetSetID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `Flags`,
|
||||
ADD `GroupID` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `WidgetSetID`;
|
||||
|
||||
ALTER TABLE `quest_poi`
|
||||
ADD `UiMapID` int(11) DEFAULT NULL AFTER `MapID`,
|
||||
CHANGE `WoDUnk1` `SpawnTrackingID` int(11) NOT NULL DEFAULT '0' AFTER `PlayerConditionID`;
|
||||
|
||||
ALTER TABLE `quest_template`
|
||||
ADD `ScalingFactionGroup` int(11) NOT NULL DEFAULT '0' AFTER `QuestLevel`,
|
||||
ADD `FlagsEx2` int(10) unsigned NOT NULL DEFAULT '0' AFTER `FlagsEx`,
|
||||
ADD `PortraitGiverMount` int(11) NOT NULL DEFAULT '0' AFTER `PortraitGiver`,
|
||||
CHANGE `QuestRewardID` `TreasurePickerID` int(11) NOT NULL DEFAULT '0' AFTER `AllowableRaces`;
|
||||
|
||||
ALTER TABLE `scenario_poi` ADD `UiMapID` int(11) DEFAULT NULL AFTER `MapID`;
|
||||
|
||||
DROP TABLE IF EXISTS `world_map_area_to_ui_map`;
|
||||
CREATE TABLE `world_map_area_to_ui_map` (
|
||||
`WorldMapAreaID` int(11) NOT NULL,
|
||||
`Floor` int(11) NOT NULL,
|
||||
`UiMapID` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`WorldMapAreaID`,`Floor`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
INSERT INTO `world_map_area_to_ui_map` VALUES
|
||||
(4,0,1),(4,8,2),(4,10,3),(4,11,4),(4,12,5),(4,19,6),(9,0,7),(9,6,8),(9,7,9),(11,0,10),(11,20,11),(13,0,12),(14,0,13),(16,0,14),(17,0,15),(17,18,16),(19,0,17),(20,0,18),(20,13,19),(20,25,20),
|
||||
(21,0,21),(22,0,22),(23,0,23),(23,20,24),(24,0,25),(26,0,26),(27,0,27),(27,6,28),(27,7,29),(27,10,30),(27,11,31),(28,0,32),(28,14,33),(28,15,34),(28,16,35),(29,0,36),(30,0,37),(30,1,38),(30,2,39),(30,19,40),
|
||||
(30,21,41),(32,0,42),(32,22,43),(32,23,44),(32,24,45),(32,27,46),(34,0,47),(35,0,48),(36,0,49),(37,0,50),(38,0,51),(39,0,52),(39,4,53),(39,5,54),(39,17,55),(40,0,56),(41,0,57),(41,2,58),(41,3,59),(41,4,60),
|
||||
(41,5,61),(42,0,62),(43,0,63),(61,0,64),(81,0,65),(101,0,66),(101,21,67),(101,22,68),(121,0,69),(141,0,70),(161,0,71),(161,15,72),(161,16,73),(161,17,74),(161,18,75),(181,0,76),(182,0,77),(201,0,78),(201,14,79),(241,0,80),
|
||||
(261,0,81),(261,13,82),(281,0,83),(301,0,84),(321,0,85),(321,1,86),(341,0,87),(362,0,88),(381,0,89),(382,0,90),(401,0,91),(443,0,92),(461,0,93),(462,0,94),(463,0,95),(463,1,96),(464,0,97),(464,2,98),(464,3,99),(465,0,100),
|
||||
(466,0,101),(467,0,102),(471,0,103),(473,0,104),(475,0,105),(476,0,106),(477,0,107),(478,0,108),(479,0,109),(480,0,110),(481,0,111),(482,0,112),(485,0,113),(486,0,114),(488,0,115),(490,0,116),(491,0,117),(492,0,118),(493,0,119),(495,0,120),
|
||||
(496,0,121),(499,0,122),(501,0,123),(502,0,124),(504,1,125),(504,2,126),(510,0,127),(512,0,128),(520,1,129),(521,0,130),(521,1,131),(522,1,132),(523,1,133),(523,2,134),(523,3,135),(524,1,136),(524,2,137),(525,1,138),(525,2,139),(526,1,140),
|
||||
(527,1,141),(528,0,142),(528,1,143),(528,2,144),(528,3,145),(528,4,146),(529,0,147),(529,1,148),(529,2,149),(529,3,150),(529,4,151),(529,5,152),(530,0,153),(530,1,154),(531,0,155),(532,1,156),(533,1,157),(533,2,158),(533,3,159),(534,1,160),
|
||||
(534,2,161),(535,1,162),(535,2,163),(535,3,164),(535,4,165),(535,5,166),(535,6,167),(536,1,168),(540,0,169),(541,0,170),(542,1,171),(543,1,172),(543,2,173),(544,0,174),(544,1,175),(544,2,176),(544,3,177),(544,4,178),(545,0,179),(545,1,180),
|
||||
(545,2,181),(545,3,182),(601,1,183),(602,0,184),(603,1,185),(604,1,186),(604,2,187),(604,3,188),(604,4,189),(604,5,190),(604,6,191),(604,7,192),(604,8,193),(605,0,194),(605,5,195),(605,6,196),(605,7,197),(606,0,198),(607,0,199),(609,0,200),
|
||||
(610,0,201),(611,0,202),(613,0,203),(614,0,204),(615,0,205),(626,0,206),(640,0,207),(640,1,208),(640,2,209),(673,0,210),(680,1,213),(684,0,217),(685,0,218),(686,0,219),(687,1,220),(688,1,221),(688,2,222),(688,3,223),(689,0,224),(690,1,225),
|
||||
(691,1,226),(691,2,227),(691,3,228),(691,4,229),(692,1,230),(692,2,231),(696,1,232),(697,0,233),(699,0,234),(699,1,235),(699,2,236),(699,3,237),(699,4,238),(699,5,239),(699,6,240),(700,0,241),(704,1,242),(704,2,243),(708,0,244),(709,0,245),
|
||||
(710,1,246),(717,0,247),(718,1,248),(720,0,249),(721,1,250),(721,2,251),(721,3,252),(721,4,253),(721,5,254),(721,6,255),(722,1,256),(722,2,257),(723,1,258),(723,2,259),(724,1,260),(725,1,261),(726,1,262),(727,1,263),(727,2,264),(728,1,265),
|
||||
(729,1,266),(730,1,267),(730,2,268),(731,1,269),(731,2,270),(731,3,271),(732,1,272),(733,0,273),(734,0,274),(736,0,275),(737,0,276),(747,0,277),(749,1,279),(750,1,280),(750,2,281),(752,1,282),(753,1,283),(753,2,284),(754,1,285),(754,2,286),
|
||||
(755,1,287),(755,2,288),(755,3,289),(755,4,290),(756,1,291),(756,2,292),(757,1,293),(758,1,294),(758,2,295),(758,3,296),(759,1,297),(759,2,298),(759,3,299),(760,1,300),(761,1,301),(762,1,302),(762,2,303),(762,3,304),(762,4,305),(763,1,306),
|
||||
(763,2,307),(763,3,308),(763,4,309),(764,1,310),(764,2,311),(764,3,312),(764,4,313),(764,5,314),(764,6,315),(764,7,316),(765,1,317),(765,2,318),(766,1,319),(766,2,320),(766,3,321),(767,1,322),(767,2,323),(768,1,324),(769,1,325),(772,0,327),
|
||||
(773,1,328),(775,0,329),(776,1,330),(779,1,331),(780,1,332),(781,0,333),(782,1,334),(789,0,335),(789,1,336),(793,0,337),(795,0,338),(796,0,339),(796,1,340),(796,2,341),(796,3,342),(796,4,343),(796,5,344),(796,6,345),(796,7,346),(797,1,347),
|
||||
(798,1,348),(798,2,349),(799,1,350),(799,2,351),(799,3,352),(799,4,353),(799,5,354),(799,6,355),(799,7,356),(799,8,357),(799,9,358),(799,10,359),(799,11,360),(799,12,361),(799,13,362),(799,14,363),(799,15,364),(799,16,365),(799,17,366),(800,0,367),
|
||||
(800,1,368),(800,2,369),(803,1,370),(806,0,371),(806,6,372),(806,7,373),(806,15,374),(806,16,375),(807,0,376),(807,14,377),(808,0,378),(809,0,379),(809,8,380),(809,9,381),(809,10,382),(809,11,383),(809,12,384),(809,17,385),(809,20,386),(809,21,387),
|
||||
(810,0,388),(810,13,389),(811,0,390),(811,1,391),(811,2,392),(811,3,393),(811,4,394),(811,18,395),(811,19,396),(813,0,397),(816,0,398),(819,0,399),(819,1,400),(820,0,401),(820,1,402),(820,2,403),(820,3,404),(820,4,405),(820,5,406),(823,0,407),
|
||||
(823,1,408),(824,0,409),(824,1,410),(824,2,411),(824,3,412),(824,4,413),(824,5,414),(824,6,415),(851,0,416),(856,0,417),(857,0,418),(857,1,419),(857,2,420),(857,3,421),(858,0,422),(860,1,423),(862,0,424),(864,0,425),(864,3,426),(866,0,427),
|
||||
(866,9,428),(867,1,429),(867,2,430),(871,1,431),(871,2,432),(873,0,433),(873,5,434),(874,1,435),(874,2,436),(875,1,437),(875,2,438),(876,1,439),(876,2,440),(876,3,441),(876,4,442),(877,0,443),(877,1,444),(877,2,445),(877,3,446),(878,0,447),
|
||||
(880,0,448),(881,0,449),(882,0,450),(883,0,451),(884,0,452),(885,1,453),(885,2,454),(885,3,455),(886,0,456),(887,0,457),(887,1,458),(887,2,459),(888,0,460),(889,0,461),(890,0,462),(891,0,463),(891,9,464),(892,0,465),(892,12,466),(893,0,467),
|
||||
(894,0,468),(895,0,469),(895,8,470),(896,1,471),(896,2,472),(896,3,473),(897,1,474),(897,2,475),(898,1,476),(898,2,477),(898,3,478),(898,4,479),(899,1,480),(900,1,481),(900,2,482),(906,0,483),(911,0,486),(912,0,487),(914,0,488),(914,1,489),
|
||||
(919,0,490),(919,1,491),(919,2,492),(919,3,493),(919,4,494),(919,5,495),(919,6,496),(919,7,497),(920,0,498),(922,1,499),(922,2,500),(924,1,501),(924,2,502),(925,1,503),(928,0,504),(928,1,505),(928,2,506),(929,0,507),(930,1,508),(930,2,509),
|
||||
(930,3,510),(930,4,511),(930,5,512),(930,6,513),(930,7,514),(930,8,515),(933,0,516),(933,1,517),(934,1,518),(935,0,519),(937,0,520),(937,1,521),(938,1,522),(939,0,523),(940,0,524),(941,0,525),(941,1,526),(941,2,527),(941,3,528),(941,4,529),
|
||||
(941,6,530),(941,7,531),(941,8,532),(941,9,533),(945,0,534),(946,0,535),(946,13,536),(946,14,537),(946,30,538),(947,0,539),(947,15,540),(947,22,541),(948,0,542),(949,0,543),(949,16,544),(949,17,545),(949,18,546),(949,19,547),(949,20,548),(949,21,549),
|
||||
(950,0,550),(950,10,551),(950,11,552),(950,12,553),(951,0,554),(951,22,555),(953,0,556),(953,1,557),(953,2,558),(953,3,559),(953,4,560),(953,5,561),(953,6,562),(953,7,563),(953,8,564),(953,9,565),(953,10,566),(953,11,567),(953,12,568),(953,13,569),
|
||||
(953,14,570),(955,0,571),(962,0,572),(964,1,573),(969,1,574),(969,2,575),(969,3,576),(970,0,577),(970,1,578),(971,23,579),(971,24,580),(971,25,581),(973,0,582),(976,26,585),(976,27,586),(976,28,587),(978,0,588),(978,29,589),(980,0,590),(983,0,592),
|
||||
(984,1,593),(986,0,594),(987,1,595),(988,1,596),(988,2,597),(988,3,598),(988,4,599),(988,5,600),(989,1,601),(989,2,602),(993,1,606),(993,2,607),(993,3,608),(993,4,609),(994,0,610),(994,1,611),(994,2,612),(994,3,613),(994,4,614),(994,5,615),
|
||||
(995,1,616),(995,2,617),(995,3,618),(1007,0,619),(1008,0,620),(1008,1,621),(1009,0,622),(1010,0,623),(1011,0,624),(1014,0,625),(1014,4,626),(1014,10,627),(1014,11,628),(1014,12,629),(1015,0,630),(1015,17,631),(1015,18,632),(1015,19,633),(1017,0,634),(1017,1,635),
|
||||
(1017,9,636),(1017,25,637),(1017,26,638),(1017,27,639),(1017,28,640),(1018,0,641),(1018,13,642),(1018,14,643),(1018,15,644),(1020,0,645),(1021,0,646),(1021,1,647),(1021,2,648),(1022,0,649),(1024,0,650),
|
||||
(1024,5,651),(1024,6,652),(1024,8,653),(1024,16,654),(1024,20,655),(1024,21,656),(1024,29,657),(1024,30,658),(1024,31,659),(1024,40,660),(1026,0,661),(1026,1,662),(1026,2,663),(1026,3,664),(1026,4,665),
|
||||
(1026,5,666),(1026,6,667),(1026,7,668),(1026,8,669),(1026,9,670),(1027,0,671),(1028,0,672),(1028,1,673),(1028,2,674),(1028,3,675),(1031,0,676),(1032,1,677),(1032,2,678),(1032,3,679),(1033,0,680),
|
||||
(1033,22,681),(1033,23,682),(1033,24,683),(1033,32,684),(1033,33,685),(1033,34,686),(1033,35,687),(1033,36,688),(1033,37,689),(1033,38,690),(1033,39,691),(1033,41,692),(1033,42,693),(1034,0,694),
|
||||
(1035,1,695),(1037,0,696),(1038,0,697),(1039,1,698),(1039,2,699),(1039,3,700),(1039,4,701),(1040,1,702),(1041,0,703),(1041,1,704),(1041,2,705),(1042,0,706),(1042,1,707),(1042,2,708),(1044,0,709),
|
||||
(1045,1,710),(1045,2,711),(1045,3,712),(1046,0,713),(1047,0,714),(1048,0,715),(1049,1,716),(1050,0,717),(1051,0,718),(1052,0,719),(1052,1,720),(1052,2,721),(1054,1,723),(1056,0,725),(1057,0,726),
|
||||
(1059,0,728),(1060,1,729),(1065,0,731),(1066,1,732),(1067,0,733),(1068,1,734),(1068,2,735),(1069,1,736),(1070,1,737),(1071,0,738),(1072,0,739),(1073,1,740),(1073,2,741),(1075,1,742),(1075,2,743),
|
||||
(1076,1,744),(1076,2,745),(1076,3,746),(1077,0,747),(1078,0,748),(1079,1,749),(1080,0,750),(1081,1,751),(1081,2,752),(1081,3,753),(1081,4,754),(1081,5,755),(1081,6,756),(1082,0,757),(1084,0,758),
|
||||
(1085,1,759),(1086,0,760),(1087,0,761),(1087,1,762),(1087,2,763),(1088,1,764),(1088,2,765),(1088,3,766),(1088,4,767),(1088,5,768),(1088,6,769),(1088,7,770),(1088,8,771),(1088,9,772),(1090,0,773),
|
||||
(1090,1,774),(1091,0,775),(1092,0,776),(1094,1,777),(1094,2,778),(1094,3,779),(1094,4,780),(1094,5,781),(1094,6,782),(1094,7,783),(1094,8,784),(1094,9,785),(1094,10,786),(1094,11,787),(1094,12,788),
|
||||
(1094,13,789),(1096,0,790),(1097,1,791),(1097,2,792),(1099,0,793),(1100,1,794),(1100,2,795),(1100,3,796),(1100,4,797),(1102,1,798),(1104,0,799),(1104,1,800),(1104,2,801),(1104,3,802),(1104,4,803),
|
||||
(1105,1,804),(1105,2,805),(1114,0,806),(1114,1,807),(1114,2,808),(1115,1,809),(1115,2,810),(1115,3,811),(1115,4,812),(1115,5,813),(1115,6,814),(1115,7,815),(1115,8,816),(1115,9,817),(1115,10,818),
|
||||
(1115,11,819),(1115,12,820),(1115,13,821),(1115,14,822),(1116,0,823),(1126,0,824),(1127,1,825),(1129,1,826),(1130,1,827),(1131,1,828),(1132,1,829),(1135,0,830),(1135,1,831),(1135,2,832),(1135,7,833),
|
||||
(1136,0,834),(1137,1,835),(1137,2,836),(1139,0,837),(1140,0,838),(1142,1,839),(1143,1,840),(1143,2,841),(1143,3,842),(1144,0,843),(1145,0,844),(1146,1,845),(1146,2,846),(1146,3,847),(1146,4,848),
|
||||
(1146,5,849),(1147,1,850),(1147,2,851),(1147,3,852),(1147,4,853),(1147,5,854),(1147,6,855),(1147,7,856),(1148,1,857),(1149,0,858),(1150,0,859),(1151,0,860),(1152,0,861),(1153,0,862),(1154,0,863),
|
||||
(1155,0,864),(1156,1,865),(1156,2,866),(1157,1,867),(1158,1,868),(1159,1,869),(1159,2,870),(1160,0,871),(1161,0,872),(1161,1,873),(1161,2,874),(1162,0,875),(1163,0,876),(1164,0,877),(1165,0,878),
|
||||
(1165,1,879),(1165,2,880),(1166,1,881),(1170,0,882),(1170,3,883),(1170,4,884),(1171,0,885),(1171,5,886),(1171,6,887),(1172,1,888),(1173,1,889),(1173,2,890),(1174,0,891),(1174,1,892),(1174,2,893),
|
||||
(1174,3,894),(1175,0,895),(1176,0,896),(1177,0,897),(1177,1,898),(1177,2,899),(1177,3,900),(1177,4,901),(1177,5,902),(1178,0,903),(1183,0,904),(1184,0,905),(1185,0,906),(1186,0,907),(1187,0,908),
|
||||
(1188,0,909),(1188,1,910),(1188,2,911),(1188,3,912),(1188,4,913),(1188,5,914),(1188,6,915),(1188,7,916),(1188,8,917),(1188,9,918),(1188,10,919),(1188,11,920),(1190,0,921),(1191,0,922),(1192,0,923),
|
||||
(1193,0,924),(1194,0,925),(1195,0,926),(1196,0,927),(1197,0,928),(1198,0,929),(1199,0,930),(1200,0,931),(1201,0,932),(1202,0,933),(1204,1,934),(1204,2,935),(1205,0,936),(1210,0,938),(1211,0,939),
|
||||
(1212,1,940),(1212,2,941),(1213,0,942),(1214,0,943),(1215,0,971),(1216,0,972),(1217,1,973),(1219,0,974),(1219,1,975),(1219,2,976),(1219,3,977),(1219,4,978),(1219,5,979),(1219,6,980),(1220,0,981),
|
||||
(32,21,42),(974,0,582),(1121,0,646),(992,0,17),(981,0,590),(991,0,582),(990,0,590),(975,0,582),(910,0,418),(910,1,419),(910,2,420),(910,3,421),(907,0,70),(905,4,394),(321,2,85),(510,1,127),(522,0,132);
|
||||
|
||||
UPDATE `quest_poi` SET `UiMapID`=(SELECT wma.`UiMapID` FROM `world_map_area_to_ui_map` wma WHERE wma.`WorldMapAreaID`=`quest_poi`.`WorldMapAreaID` AND wma.`Floor`=`quest_poi`.`Floor`);
|
||||
UPDATE `scenario_poi` SET `UiMapID`=(SELECT wma.`UiMapID` FROM `world_map_area_to_ui_map` wma WHERE wma.`WorldMapAreaID`=`scenario_poi`.`WorldMapAreaID` AND wma.`Floor`=`scenario_poi`.`Floor`);
|
||||
|
||||
DROP TABLE IF EXISTS `world_map_area_to_ui_map`;
|
||||
|
||||
DELETE FROM `quest_poi` WHERE `UiMapID` IS NULL;
|
||||
DELETE FROM `scenario_poi` WHERE `UiMapID` IS NULL;
|
||||
|
||||
ALTER TABLE `quest_poi`
|
||||
CHANGE `UiMapID` `UiMapID` int(11) NOT NULL DEFAULT '0' AFTER `MapID`,
|
||||
DROP `WorldMapAreaID`,
|
||||
DROP `Floor`;
|
||||
|
||||
ALTER TABLE `scenario_poi`
|
||||
CHANGE `UiMapID` `UiMapID` int(11) NOT NULL DEFAULT '0' AFTER `MapID`,
|
||||
DROP `WorldMapAreaID`,
|
||||
DROP `Floor`;
|
||||
|
||||
ALTER TABLE `spell_areatrigger`
|
||||
ADD `AnimId` int(11) NOT NULL DEFAULT '0' AFTER `FacingCurveId`,
|
||||
ADD `AnimKitId` int(11) NOT NULL DEFAULT '0' AFTER `AnimId`;
|
||||
@@ -36,6 +36,9 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
"Points, Flags, UiOrder, IconFileID, CriteriaTree, SharesCriteria FROM achievement ORDER BY ID DESC", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_ACHIEVEMENT, "SELECT ID, Description_lang, Title_lang, Reward_lang FROM achievement_locale WHERE locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// AnimationData.db2
|
||||
PrepareStatement(HOTFIX_SEL_ANIMATION_DATA, "SELECT ID, Fallback, BehaviorTier, BehaviorID, Flags1, Flags2 FROM animation_data ORDER BY ID DESC", CONNECTION_SYNCH);
|
||||
|
||||
// AnimKit.db2
|
||||
PrepareStatement(HOTFIX_SEL_ANIM_KIT, "SELECT ID, OneShotDuration, OneShotStopAnimKitID, LowDefAnimKitID FROM anim_kit ORDER BY ID DESC", CONNECTION_SYNCH);
|
||||
|
||||
@@ -684,6 +687,10 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
// NamesReservedLocale.db2
|
||||
PrepareStatement(HOTFIX_SEL_NAMES_RESERVED_LOCALE, "SELECT ID, Name, LocaleMask FROM names_reserved_locale ORDER BY ID DESC", CONNECTION_SYNCH);
|
||||
|
||||
// NumTalentsAtLevel.db2
|
||||
PrepareStatement(HOTFIX_SEL_NUM_TALENTS_AT_LEVEL, "SELECT ID, NumTalents, NumTalentsDeathKnight, NumTalentsDemonHunter FROM num_talents_at_level"
|
||||
" ORDER BY ID DESC", CONNECTION_SYNCH);
|
||||
|
||||
// OverrideSpellData.db2
|
||||
PrepareStatement(HOTFIX_SEL_OVERRIDE_SPELL_DATA, "SELECT ID, Spells1, Spells2, Spells3, Spells4, Spells5, Spells6, Spells7, Spells8, Spells9, "
|
||||
"Spells10, PlayerActionBarFileDataID, Flags FROM override_spell_data ORDER BY ID DESC", CONNECTION_SYNCH);
|
||||
|
||||
@@ -34,6 +34,8 @@ enum HotfixDatabaseStatements : uint32
|
||||
HOTFIX_SEL_ACHIEVEMENT,
|
||||
HOTFIX_SEL_ACHIEVEMENT_LOCALE,
|
||||
|
||||
HOTFIX_SEL_ANIMATION_DATA,
|
||||
|
||||
HOTFIX_SEL_ANIM_KIT,
|
||||
|
||||
HOTFIX_SEL_AREA_GROUP_MEMBER,
|
||||
@@ -364,6 +366,8 @@ enum HotfixDatabaseStatements : uint32
|
||||
|
||||
HOTFIX_SEL_NAMES_RESERVED_LOCALE,
|
||||
|
||||
HOTFIX_SEL_NUM_TALENTS_AT_LEVEL,
|
||||
|
||||
HOTFIX_SEL_OVERRIDE_SPELL_DATA,
|
||||
|
||||
HOTFIX_SEL_PHASE,
|
||||
|
||||
@@ -1787,9 +1787,7 @@ bool CriteriaHandler::AdditionalRequirementsSatisfied(ModifierTreeNode const* tr
|
||||
return false;
|
||||
break;
|
||||
case CRITERIA_ADDITIONAL_CONDITION_PRESTIGE_LEVEL: // 194
|
||||
if (!referencePlayer || referencePlayer->GetPrestigeLevel() != reqValue)
|
||||
return false;
|
||||
break;
|
||||
return false;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1289,9 +1289,10 @@ void Battleground::BuildPvPLogDataPacket(WorldPackets::Battleground::PVPLogData&
|
||||
{
|
||||
playerData.IsInWorld = true;
|
||||
playerData.PrimaryTalentTree = player->GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID);
|
||||
playerData.PrimaryTalentTreeNameIndex = 0;
|
||||
playerData.Sex = player->getGender();
|
||||
playerData.Race = player->getRace();
|
||||
playerData.Prestige = player->GetPrestigeLevel();
|
||||
playerData.Class = player->getClass();
|
||||
playerData.HonorLevel = player->GetHonorLevel();
|
||||
}
|
||||
|
||||
pvpLogData.Players.push_back(playerData);
|
||||
|
||||
@@ -463,6 +463,7 @@ void CalendarMgr::SendCalendarEventUpdateAlert(CalendarEvent const& calendarEven
|
||||
packet.ClearPending = true; // FIXME
|
||||
packet.Date = calendarEvent.GetDate();
|
||||
packet.Description = calendarEvent.GetDescription();
|
||||
packet.EventClubID = calendarEvent.GetGuildId();
|
||||
packet.EventID = calendarEvent.GetEventId();
|
||||
packet.EventName = calendarEvent.GetTitle();
|
||||
packet.EventType = calendarEvent.GetType();
|
||||
@@ -534,18 +535,15 @@ void CalendarMgr::SendCalendarEventInviteAlert(CalendarEvent const& calendarEven
|
||||
packet.OwnerGuid = calendarEvent.GetOwnerGUID();
|
||||
packet.Status = invite.GetStatus();
|
||||
packet.TextureID = calendarEvent.GetTextureId();
|
||||
|
||||
Guild* guild = sGuildMgr->GetGuildById(calendarEvent.GetGuildId());
|
||||
packet.EventGuildID = guild ? guild->GetGUID() : ObjectGuid::Empty;
|
||||
packet.EventClubID = calendarEvent.GetGuildId();
|
||||
|
||||
if (calendarEvent.IsGuildEvent() || calendarEvent.IsGuildAnnouncement())
|
||||
{
|
||||
if (guild)
|
||||
if (Guild* guild = sGuildMgr->GetGuildById(calendarEvent.GetGuildId()))
|
||||
guild->BroadcastPacket(packet.Write());
|
||||
}
|
||||
else
|
||||
if (Player* player = ObjectAccessor::FindConnectedPlayer(invite.GetInviteeGUID()))
|
||||
player->SendDirectMessage(packet.Write());
|
||||
else if (Player* player = ObjectAccessor::FindConnectedPlayer(invite.GetInviteeGUID()))
|
||||
player->SendDirectMessage(packet.Write());
|
||||
}
|
||||
|
||||
void CalendarMgr::SendCalendarEvent(ObjectGuid guid, CalendarEvent const& calendarEvent, CalendarSendEventType sendType)
|
||||
@@ -567,9 +565,7 @@ void CalendarMgr::SendCalendarEvent(ObjectGuid guid, CalendarEvent const& calend
|
||||
packet.LockDate = calendarEvent.GetLockDate(); // Always 0 ?
|
||||
packet.OwnerGuid = calendarEvent.GetOwnerGUID();
|
||||
packet.TextureID = calendarEvent.GetTextureId();
|
||||
|
||||
Guild* guild = sGuildMgr->GetGuildById(calendarEvent.GetGuildId());
|
||||
packet.EventGuildID = (guild ? guild->GetGUID() : ObjectGuid::Empty);
|
||||
packet.EventClubID = calendarEvent.GetGuildId();
|
||||
|
||||
for (auto const& calendarInvite : eventInviteeList)
|
||||
{
|
||||
|
||||
@@ -51,6 +51,24 @@ struct AchievementLoadInfo
|
||||
}
|
||||
};
|
||||
|
||||
struct AnimationDataLoadInfo
|
||||
{
|
||||
static DB2LoadInfo const* Instance()
|
||||
{
|
||||
static DB2FieldMeta const fields[] =
|
||||
{
|
||||
{ false, FT_INT, "ID" },
|
||||
{ false, FT_SHORT, "Fallback" },
|
||||
{ false, FT_BYTE, "BehaviorTier" },
|
||||
{ true, FT_INT, "BehaviorID" },
|
||||
{ true, FT_INT, "Flags1" },
|
||||
{ true, FT_INT, "Flags2" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::extent<decltype(fields)>::value, AnimationDataMeta::Instance(), HOTFIX_SEL_ANIMATION_DATA);
|
||||
return &loadInfo;
|
||||
}
|
||||
};
|
||||
|
||||
struct AnimKitLoadInfo
|
||||
{
|
||||
static DB2LoadInfo const* Instance()
|
||||
@@ -3384,6 +3402,22 @@ struct NamesReservedLocaleLoadInfo
|
||||
}
|
||||
};
|
||||
|
||||
struct NumTalentsAtLevelLoadInfo
|
||||
{
|
||||
static DB2LoadInfo const* Instance()
|
||||
{
|
||||
static DB2FieldMeta const fields[] =
|
||||
{
|
||||
{ false, FT_INT, "ID" },
|
||||
{ true, FT_INT, "NumTalents" },
|
||||
{ true, FT_INT, "NumTalentsDeathKnight" },
|
||||
{ true, FT_INT, "NumTalentsDemonHunter" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::extent<decltype(fields)>::value, NumTalentsAtLevelMeta::Instance(), HOTFIX_SEL_NUM_TALENTS_AT_LEVEL);
|
||||
return &loadInfo;
|
||||
}
|
||||
};
|
||||
|
||||
struct OverrideSpellDataLoadInfo
|
||||
{
|
||||
static DB2LoadInfo const* Instance()
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#endif
|
||||
|
||||
DB2Storage<AchievementEntry> sAchievementStore("Achievement.db2", AchievementLoadInfo::Instance());
|
||||
DB2Storage<AnimationDataEntry> sAnimationDataStore("AnimationData.db2", AnimationDataLoadInfo::Instance());
|
||||
DB2Storage<AnimKitEntry> sAnimKitStore("AnimKit.db2", AnimKitLoadInfo::Instance());
|
||||
DB2Storage<AreaGroupMemberEntry> sAreaGroupMemberStore("AreaGroupMember.db2", AreaGroupMemberLoadInfo::Instance());
|
||||
DB2Storage<AreaTableEntry> sAreaTableStore("AreaTable.db2", AreaTableLoadInfo::Instance());
|
||||
@@ -182,6 +183,7 @@ DB2Storage<NameGenEntry> sNameGenStore("NameGen.db2", Nam
|
||||
DB2Storage<NamesProfanityEntry> sNamesProfanityStore("NamesProfanity.db2", NamesProfanityLoadInfo::Instance());
|
||||
DB2Storage<NamesReservedEntry> sNamesReservedStore("NamesReserved.db2", NamesReservedLoadInfo::Instance());
|
||||
DB2Storage<NamesReservedLocaleEntry> sNamesReservedLocaleStore("NamesReservedLocale.db2", NamesReservedLocaleLoadInfo::Instance());
|
||||
DB2Storage<NumTalentsAtLevelEntry> sNumTalentsAtLevelStore("NumTalentsAtLevel.db2", NumTalentsAtLevelLoadInfo::Instance());
|
||||
DB2Storage<OverrideSpellDataEntry> sOverrideSpellDataStore("OverrideSpellData.db2", OverrideSpellDataLoadInfo::Instance());
|
||||
DB2Storage<PhaseEntry> sPhaseStore("Phase.db2", PhaseLoadInfo::Instance());
|
||||
DB2Storage<PhaseXPhaseGroupEntry> sPhaseXPhaseGroupStore("PhaseXPhaseGroup.db2", PhaseXPhaseGroupLoadInfo::Instance());
|
||||
@@ -490,6 +492,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale)
|
||||
#define LOAD_DB2(store) LoadDB2(availableDb2Locales, bad_db2_files, _stores, &store, db2Path, defaultLocale, store)
|
||||
|
||||
LOAD_DB2(sAchievementStore);
|
||||
LOAD_DB2(sAnimationDataStore);
|
||||
LOAD_DB2(sAnimKitStore);
|
||||
LOAD_DB2(sAreaGroupMemberStore);
|
||||
LOAD_DB2(sAreaTableStore);
|
||||
@@ -634,6 +637,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale)
|
||||
LOAD_DB2(sNamesProfanityStore);
|
||||
LOAD_DB2(sNamesReservedStore);
|
||||
LOAD_DB2(sNamesReservedLocaleStore);
|
||||
LOAD_DB2(sNumTalentsAtLevelStore);
|
||||
LOAD_DB2(sOverrideSpellDataStore);
|
||||
LOAD_DB2(sPhaseStore);
|
||||
LOAD_DB2(sPhaseXPhaseGroupStore);
|
||||
@@ -2102,6 +2106,28 @@ ResponseCodes DB2Manager::ValidateName(std::wstring const& name, LocaleConstant
|
||||
return CHAR_NAME_SUCCESS;
|
||||
}
|
||||
|
||||
int32 DB2Manager::GetNumTalentsAtLevel(uint32 level, Classes playerClass)
|
||||
{
|
||||
NumTalentsAtLevelEntry const* numTalentsAtLevel = sNumTalentsAtLevelStore.LookupEntry(level);
|
||||
if (!numTalentsAtLevel)
|
||||
numTalentsAtLevel = sNumTalentsAtLevelStore.LookupEntry(sNumTalentsAtLevelStore.GetNumRows() - 1);
|
||||
|
||||
if (numTalentsAtLevel)
|
||||
{
|
||||
switch (playerClass)
|
||||
{
|
||||
case CLASS_DEATH_KNIGHT:
|
||||
return numTalentsAtLevel->NumTalentsDeathKnight;
|
||||
case CLASS_DEMON_HUNTER:
|
||||
return numTalentsAtLevel->NumTalentsDemonHunter;
|
||||
default:
|
||||
return numTalentsAtLevel->NumTalents;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
PVPDifficultyEntry const* DB2Manager::GetBattlegroundBracketByLevel(uint32 mapid, uint32 level)
|
||||
{
|
||||
PVPDifficultyEntry const* maxEntry = nullptr; // used for level > max listed level case
|
||||
@@ -2152,6 +2178,16 @@ uint32 DB2Manager::GetRequiredLevelForPvpTalentSlot(uint8 slot, Classes class_)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32 DB2Manager::GetPvpTalentNumSlotsAtLevel(uint32 level, Classes class_) const
|
||||
{
|
||||
int32 slots = 0;
|
||||
for (uint8 slot = 0; slot < MAX_PVP_TALENT_SLOTS; ++slot)
|
||||
if (level >= GetRequiredLevelForPvpTalentSlot(slot, class_))
|
||||
++slots;
|
||||
|
||||
return slots;
|
||||
}
|
||||
|
||||
std::vector<QuestPackageItemEntry const*> const* DB2Manager::GetQuestPackageItems(uint32 questPackageID) const
|
||||
{
|
||||
auto itr = _questPackages.find(questPackageID);
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
class DB2HotfixGeneratorBase;
|
||||
|
||||
TC_GAME_API extern DB2Storage<AchievementEntry> sAchievementStore;
|
||||
TC_GAME_API extern DB2Storage<AnimationDataEntry> sAnimationDataStore;
|
||||
TC_GAME_API extern DB2Storage<AnimKitEntry> sAnimKitStore;
|
||||
TC_GAME_API extern DB2Storage<AreaTableEntry> sAreaTableStore;
|
||||
TC_GAME_API extern DB2Storage<AreaTriggerEntry> sAreaTriggerStore;
|
||||
@@ -301,12 +302,13 @@ public:
|
||||
MapDifficultyEntry const* GetDefaultMapDifficulty(uint32 mapId, Difficulty* difficulty = nullptr) const;
|
||||
MapDifficultyEntry const* GetMapDifficultyData(uint32 mapId, Difficulty difficulty) const;
|
||||
MapDifficultyEntry const* GetDownscaledMapDifficultyData(uint32 mapId, Difficulty &difficulty) const;
|
||||
std::string GetNameGenEntry(uint8 race, uint8 gender) const;
|
||||
MountEntry const* GetMount(uint32 spellId) const;
|
||||
MountEntry const* GetMountById(uint32 id) const;
|
||||
MountTypeXCapabilitySet const* GetMountCapabilities(uint32 mountType) const;
|
||||
MountXDisplayContainer const* GetMountDisplays(uint32 mountId) const;
|
||||
std::string GetNameGenEntry(uint8 race, uint8 gender) const;
|
||||
ResponseCodes ValidateName(std::wstring const& name, LocaleConstant locale) const;
|
||||
static int32 GetNumTalentsAtLevel(uint32 level, Classes playerClass);
|
||||
std::vector<uint32> const* GetPhasesForGroup(uint32 group) const;
|
||||
PowerTypeEntry const* GetPowerTypeEntry(Powers power) const;
|
||||
PowerTypeEntry const* GetPowerTypeByName(std::string const& name) const;
|
||||
@@ -314,6 +316,7 @@ public:
|
||||
static PVPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 level);
|
||||
static PVPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id);
|
||||
uint32 GetRequiredLevelForPvpTalentSlot(uint8 slot, Classes class_) const;
|
||||
int32 GetPvpTalentNumSlotsAtLevel(uint32 level, Classes class_) const;
|
||||
std::vector<QuestPackageItemEntry const*> const* GetQuestPackageItems(uint32 questPackageID) const;
|
||||
std::vector<QuestPackageItemEntry const*> const* GetQuestPackageItemsFallback(uint32 questPackageID) const;
|
||||
uint32 GetQuestUniqueBitFlag(uint32 questId);
|
||||
|
||||
@@ -45,6 +45,15 @@ struct AchievementEntry
|
||||
int16 SharesCriteria; // referenced achievement (counting of all completed criterias)
|
||||
};
|
||||
|
||||
struct AnimationDataEntry
|
||||
{
|
||||
uint32 ID;
|
||||
uint16 Fallback;
|
||||
uint8 BehaviorTier;
|
||||
int32 BehaviorID;
|
||||
int32 Flags[2];
|
||||
};
|
||||
|
||||
struct AnimKitEntry
|
||||
{
|
||||
uint32 ID;
|
||||
@@ -2052,6 +2061,14 @@ struct NamesReservedLocaleEntry
|
||||
uint8 LocaleMask;
|
||||
};
|
||||
|
||||
struct NumTalentsAtLevelEntry
|
||||
{
|
||||
uint32 ID;
|
||||
int32 NumTalents;
|
||||
int32 NumTalentsDeathKnight;
|
||||
int32 NumTalentsDemonHunter;
|
||||
};
|
||||
|
||||
#define MAX_OVERRIDE_SPELL 10
|
||||
|
||||
struct OverrideSpellDataEntry
|
||||
|
||||
@@ -46,7 +46,8 @@ AreaTrigger::AreaTrigger() : WorldObject(false), MapObject(), _aurEff(nullptr),
|
||||
m_objectType |= TYPEMASK_AREATRIGGER;
|
||||
m_objectTypeId = TYPEID_AREATRIGGER;
|
||||
|
||||
m_updateFlag = UPDATEFLAG_STATIONARY_POSITION | UPDATEFLAG_AREATRIGGER;
|
||||
m_updateFlag.Stationary = true;
|
||||
m_updateFlag.AreaTrigger = true;
|
||||
|
||||
m_valuesCount = AREATRIGGER_END;
|
||||
_dynamicValuesCount = AREATRIGGER_DYNAMIC_END;
|
||||
@@ -142,7 +143,7 @@ bool AreaTrigger::Create(uint32 spellMiscId, Unit* caster, Unit* target, SpellIn
|
||||
{
|
||||
AreaTriggerCircularMovementInfo cmi = GetMiscTemplate()->CircularMovementInfo;
|
||||
if (target && GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_ATTACHED))
|
||||
cmi.TargetGUID = target->GetGUID();
|
||||
cmi.PathTarget = target->GetGUID();
|
||||
else
|
||||
cmi.Center = pos;
|
||||
|
||||
@@ -637,12 +638,12 @@ void AreaTrigger::InitSplines(std::vector<G3D::Vector3> splinePoints, uint32 tim
|
||||
{
|
||||
if (_reachedDestination)
|
||||
{
|
||||
WorldPackets::AreaTrigger::AreaTriggerReShape reshape;
|
||||
WorldPackets::AreaTrigger::AreaTriggerRePath reshape;
|
||||
reshape.TriggerGUID = GetGUID();
|
||||
SendMessageToSet(reshape.Write(), true);
|
||||
}
|
||||
|
||||
WorldPackets::AreaTrigger::AreaTriggerReShape reshape;
|
||||
WorldPackets::AreaTrigger::AreaTriggerRePath reshape;
|
||||
reshape.TriggerGUID = GetGUID();
|
||||
reshape.AreaTriggerSpline = boost::in_place();
|
||||
reshape.AreaTriggerSpline->ElapsedTimeForMovement = GetElapsedTimeForMovement();
|
||||
@@ -664,7 +665,7 @@ bool AreaTrigger::HasSplines() const
|
||||
void AreaTrigger::InitCircularMovement(AreaTriggerCircularMovementInfo const& cmi, uint32 timeToTarget)
|
||||
{
|
||||
// Circular movement requires either a center position or an attached unit
|
||||
ASSERT(cmi.Center.is_initialized() || cmi.TargetGUID.is_initialized());
|
||||
ASSERT(cmi.Center.is_initialized() || cmi.PathTarget.is_initialized());
|
||||
|
||||
// should be sent in object create packets only
|
||||
m_uint32Values[AREATRIGGER_TIME_TO_TARGET] = timeToTarget;
|
||||
@@ -676,7 +677,7 @@ void AreaTrigger::InitCircularMovement(AreaTriggerCircularMovementInfo const& cm
|
||||
|
||||
if (IsInWorld())
|
||||
{
|
||||
WorldPackets::AreaTrigger::AreaTriggerReShape reshape;
|
||||
WorldPackets::AreaTrigger::AreaTriggerRePath reshape;
|
||||
reshape.TriggerGUID = GetGUID();
|
||||
reshape.AreaTriggerCircularMovement = _circularMovementInfo;
|
||||
|
||||
@@ -691,11 +692,11 @@ bool AreaTrigger::HasCircularMovement() const
|
||||
|
||||
Position const* AreaTrigger::GetCircularMovementCenterPosition() const
|
||||
{
|
||||
if (_circularMovementInfo.is_initialized())
|
||||
if (!_circularMovementInfo.is_initialized())
|
||||
return nullptr;
|
||||
|
||||
if (_circularMovementInfo->TargetGUID.is_initialized())
|
||||
if (WorldObject* center = ObjectAccessor::GetWorldObject(*this, *_circularMovementInfo->TargetGUID))
|
||||
if (_circularMovementInfo->PathTarget.is_initialized())
|
||||
if (WorldObject* center = ObjectAccessor::GetWorldObject(*this, *_circularMovementInfo->PathTarget))
|
||||
return center;
|
||||
|
||||
if (_circularMovementInfo->Center.is_initialized())
|
||||
|
||||
@@ -96,6 +96,9 @@ AreaTriggerMiscTemplate::AreaTriggerMiscTemplate()
|
||||
MorphCurveId = 0;
|
||||
FacingCurveId = 0;
|
||||
|
||||
AnimId = 0;
|
||||
AnimKitId = 0;
|
||||
|
||||
DecalPropertiesId = 0;
|
||||
|
||||
TimeToTarget = 0;
|
||||
|
||||
@@ -36,10 +36,11 @@ enum AreaTriggerFlags
|
||||
AREATRIGGER_FLAG_HAS_FOLLOWS_TERRAIN = 0x00010, // NYI
|
||||
AREATRIGGER_FLAG_UNK1 = 0x00020,
|
||||
AREATRIGGER_FLAG_HAS_TARGET_ROLL_PITCH_YAW = 0x00040, // NYI
|
||||
AREATRIGGER_FLAG_UNK2 = 0x00080,
|
||||
AREATRIGGER_FLAG_HAS_ANIM_ID = 0x00080,
|
||||
AREATRIGGER_FLAG_UNK3 = 0x00100,
|
||||
AREATRIGGER_FLAG_UNK4 = 0x00200,
|
||||
AREATRIGGER_FLAG_HAS_CIRCULAR_MOVEMENT = 0x00400
|
||||
AREATRIGGER_FLAG_HAS_ANIM_KIT_ID = 0x00200,
|
||||
AREATRIGGER_FLAG_HAS_CIRCULAR_MOVEMENT = 0x00400,
|
||||
AREATRIGGER_FLAG_UNK5 = 0x00800,
|
||||
};
|
||||
|
||||
enum AreaTriggerTypes
|
||||
@@ -96,7 +97,7 @@ struct AreaTriggerScaleInfo
|
||||
|
||||
struct AreaTriggerCircularMovementInfo
|
||||
{
|
||||
Optional<ObjectGuid> TargetGUID;
|
||||
Optional<ObjectGuid> PathTarget;
|
||||
Optional<TaggedPosition<Position::XYZ>> Center;
|
||||
bool CounterClockwise = false;
|
||||
bool CanLoop = false;
|
||||
@@ -190,6 +191,9 @@ public:
|
||||
uint32 MorphCurveId;
|
||||
uint32 FacingCurveId;
|
||||
|
||||
int32 AnimId;
|
||||
int32 AnimKitId;
|
||||
|
||||
uint32 DecalPropertiesId;
|
||||
|
||||
uint32 TimeToTarget;
|
||||
|
||||
@@ -30,7 +30,8 @@ Conversation::Conversation() : WorldObject(false), _duration(0)
|
||||
m_objectType |= TYPEMASK_CONVERSATION;
|
||||
m_objectTypeId = TYPEID_CONVERSATION;
|
||||
|
||||
m_updateFlag = UPDATEFLAG_STATIONARY_POSITION;
|
||||
m_updateFlag.Stationary = true;
|
||||
m_updateFlag.Conversation = true;
|
||||
|
||||
m_valuesCount = CONVERSATION_END;
|
||||
_dynamicValuesCount = CONVERSATION_DYNAMIC_END;
|
||||
@@ -123,13 +124,15 @@ bool Conversation::Create(ObjectGuid::LowType lowGuid, uint32 conversationEntry,
|
||||
|
||||
SetUInt32Value(CONVERSATION_LAST_LINE_END_TIME, conversationTemplate->LastLineEndTime);
|
||||
_duration = conversationTemplate->LastLineEndTime;
|
||||
_textureKitId = conversationTemplate->TextureKitId;
|
||||
|
||||
for (uint16 actorIndex = 0; actorIndex < conversationTemplate->Actors.size(); ++actorIndex)
|
||||
{
|
||||
if (ConversationActorTemplate const* actor = conversationTemplate->Actors[actorIndex])
|
||||
{
|
||||
ConversationDynamicFieldActor actorField;
|
||||
actorField.ActorTemplate = *actor;
|
||||
actorField.ActorTemplate.CreatureId = actor->CreatureId;
|
||||
actorField.ActorTemplate.CreatureModelId = actor->CreatureModelId;
|
||||
actorField.Type = ConversationDynamicFieldActor::ActorType::CreatureActor;
|
||||
SetDynamicStructuredValue(CONVERSATION_DYNAMIC_FIELD_ACTORS, actorIndex, &actorField);
|
||||
}
|
||||
|
||||
@@ -47,8 +47,11 @@ struct ConversationDynamicFieldActor
|
||||
union
|
||||
{
|
||||
ObjectGuid ActorGuid;
|
||||
|
||||
ConversationActorTemplate ActorTemplate;
|
||||
struct
|
||||
{
|
||||
uint32 CreatureId;
|
||||
uint32 CreatureModelId;
|
||||
} ActorTemplate;
|
||||
|
||||
struct
|
||||
{
|
||||
@@ -75,6 +78,7 @@ class TC_GAME_API Conversation : public WorldObject, public GridObject<Conversat
|
||||
void Update(uint32 diff) override;
|
||||
void Remove();
|
||||
int32 GetDuration() const { return _duration; }
|
||||
uint32 GetTextureKitId() const { return _textureKitId; }
|
||||
|
||||
static Conversation* CreateConversation(uint32 conversationEntry, Unit* creator, Position const& pos, GuidUnorderedSet&& participants, SpellInfo const* spellInfo = nullptr);
|
||||
bool Create(ObjectGuid::LowType lowGuid, uint32 conversationEntry, Map* map, Unit* creator, Position const& pos, GuidUnorderedSet&& participants, SpellInfo const* spellInfo = nullptr);
|
||||
@@ -95,6 +99,7 @@ class TC_GAME_API Conversation : public WorldObject, public GridObject<Conversat
|
||||
Position _stationaryPosition;
|
||||
ObjectGuid _creatorGuid;
|
||||
uint32 _duration;
|
||||
uint32 _textureKitId;
|
||||
GuidUnorderedSet _participants;
|
||||
};
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ Corpse::Corpse(CorpseType type) : WorldObject(type != CORPSE_BONES), m_type(type
|
||||
m_objectType |= TYPEMASK_CORPSE;
|
||||
m_objectTypeId = TYPEID_CORPSE;
|
||||
|
||||
m_updateFlag = UPDATEFLAG_STATIONARY_POSITION;
|
||||
m_updateFlag.Stationary = true;
|
||||
|
||||
m_valuesCount = CORPSE_END;
|
||||
_dynamicValuesCount = CORPSE_DYNAMIC_END;
|
||||
|
||||
@@ -430,6 +430,8 @@ bool Creature::UpdateEntry(uint32 entry, CreatureData const* data /*= nullptr*/,
|
||||
|
||||
SetUInt32Value(OBJECT_DYNAMIC_FLAGS, dynamicFlags);
|
||||
|
||||
SetUInt32Value(UNIT_FIELD_STATE_ANIM_ID, sAnimationDataStore.GetNumRows());
|
||||
|
||||
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
|
||||
|
||||
SetBaseAttackTime(BASE_ATTACK, cInfo->BaseAttackTime);
|
||||
|
||||
@@ -286,6 +286,7 @@ void PlayerMenu::SendPointOfInterest(uint32 id) const
|
||||
}
|
||||
|
||||
WorldPackets::NPC::GossipPOI packet;
|
||||
packet.ID = pointOfInterest->ID;
|
||||
packet.Name = pointOfInterest->Name;
|
||||
|
||||
LocaleConstant localeConstant = _session->GetSessionDbLocaleIndex();
|
||||
@@ -438,6 +439,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const* quest, ObjectGuid npcGU
|
||||
packet.InformUnit = _session->GetPlayer()->GetDivider();
|
||||
packet.QuestID = quest->GetQuestId();
|
||||
packet.PortraitGiver = quest->GetQuestGiverPortrait();
|
||||
packet.PortraitGiverMount = quest->GetQuestGiverPortraitMount();
|
||||
packet.PortraitTurnIn = quest->GetQuestTurnInPortrait();
|
||||
packet.AutoLaunched = autoLaunched;
|
||||
packet.DisplayPopup = displayPopup;
|
||||
@@ -512,6 +514,7 @@ void PlayerMenu::SendQuestQueryResponse(Quest const* quest) const
|
||||
packet.Info.QuestID = quest->GetQuestId();
|
||||
packet.Info.QuestType = quest->GetQuestType();
|
||||
packet.Info.QuestLevel = quest->GetQuestLevel();
|
||||
packet.Info.QuestScalingFactionGroup = quest->GetQuestScalingFactionGroup();
|
||||
packet.Info.QuestMaxScalingLevel = quest->GetQuestMaxScalingLevel();
|
||||
packet.Info.QuestPackageID = quest->GetQuestPackageID();
|
||||
packet.Info.QuestMinLevel = quest->GetMinLevel();
|
||||
@@ -543,12 +546,14 @@ void PlayerMenu::SendQuestQueryResponse(Quest const* quest) const
|
||||
packet.Info.StartItem = quest->GetSrcItemId();
|
||||
packet.Info.Flags = quest->GetFlags();
|
||||
packet.Info.FlagsEx = quest->GetFlagsEx();
|
||||
packet.Info.FlagsEx2 = quest->GetFlagsEx2();
|
||||
packet.Info.RewardTitle = quest->GetRewTitle();
|
||||
packet.Info.RewardArenaPoints = quest->GetRewArenaPoints();
|
||||
packet.Info.RewardSkillLineID = quest->GetRewardSkillId();
|
||||
packet.Info.RewardNumSkillUps = quest->GetRewardSkillPoints();
|
||||
packet.Info.RewardFactionFlags = quest->GetRewardReputationMask();
|
||||
packet.Info.PortraitGiver = quest->GetQuestGiverPortrait();
|
||||
packet.Info.PortraitGiverMount = quest->GetQuestGiverPortraitMount();
|
||||
packet.Info.PortraitTurnIn = quest->GetQuestTurnInPortrait();
|
||||
|
||||
for (uint8 i = 0; i < QUEST_ITEM_DROP_COUNT; ++i)
|
||||
@@ -585,7 +590,7 @@ void PlayerMenu::SendQuestQueryResponse(Quest const* quest) const
|
||||
packet.Info.POIPriority = quest->GetPOIPriority();
|
||||
|
||||
packet.Info.AllowableRaces = quest->GetAllowableRaces();
|
||||
packet.Info.QuestRewardID = quest->GetRewardId();
|
||||
packet.Info.TreasurePickerID = quest->GetTreasurePickerId();
|
||||
packet.Info.Expansion = quest->GetExpansion();
|
||||
|
||||
for (QuestObjective const& questObjective : quest->GetObjectives())
|
||||
@@ -666,6 +671,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* quest, ObjectGuid npcGUI
|
||||
|
||||
packet.PortraitTurnIn = quest->GetQuestTurnInPortrait();
|
||||
packet.PortraitGiver = quest->GetQuestGiverPortrait();
|
||||
packet.PortraitGiverMount = quest->GetQuestGiverPortraitMount();
|
||||
packet.QuestPackageID = quest->GetQuestPackageID();
|
||||
|
||||
_session->SendPacket(packet.Write());
|
||||
|
||||
@@ -38,7 +38,7 @@ DynamicObject::DynamicObject(bool isWorldObject) : WorldObject(isWorldObject),
|
||||
m_objectType |= TYPEMASK_DYNAMICOBJECT;
|
||||
m_objectTypeId = TYPEID_DYNAMICOBJECT;
|
||||
|
||||
m_updateFlag = UPDATEFLAG_STATIONARY_POSITION;
|
||||
m_updateFlag.Stationary = true;
|
||||
|
||||
m_valuesCount = DYNAMICOBJECT_END;
|
||||
_dynamicValuesCount = DYNAMICOBJECT_DYNAMIC_END;
|
||||
|
||||
@@ -61,7 +61,8 @@ GameObject::GameObject() : WorldObject(false), MapObject(),
|
||||
m_objectType |= TYPEMASK_GAMEOBJECT;
|
||||
m_objectTypeId = TYPEID_GAMEOBJECT;
|
||||
|
||||
m_updateFlag = (UPDATEFLAG_STATIONARY_POSITION | UPDATEFLAG_ROTATION);
|
||||
m_updateFlag.Stationary = true;
|
||||
m_updateFlag.Rotation = true;
|
||||
|
||||
m_valuesCount = GAMEOBJECT_END;
|
||||
_dynamicValuesCount = GAMEOBJECT_DYNAMIC_END;
|
||||
@@ -238,7 +239,7 @@ bool GameObject::Create(uint32 entry, Map* map, Position const& pos, QuaternionD
|
||||
else
|
||||
{
|
||||
guid = ObjectGuid::Create<HighGuid::Transport>(map->GenerateLowGuid<HighGuid::Transport>());
|
||||
m_updateFlag |= UPDATEFLAG_TRANSPORT;
|
||||
m_updateFlag.ServerTime = true;
|
||||
}
|
||||
|
||||
Object::_Create(guid);
|
||||
@@ -271,7 +272,7 @@ bool GameObject::Create(uint32 entry, Map* map, Position const& pos, QuaternionD
|
||||
|
||||
if (m_goTemplateAddon->WorldEffectID)
|
||||
{
|
||||
m_updateFlag |= UPDATEFLAG_GAMEOBJECT;
|
||||
m_updateFlag.GameObject = true;
|
||||
SetWorldEffectID(m_goTemplateAddon->WorldEffectID);
|
||||
}
|
||||
}
|
||||
@@ -292,6 +293,8 @@ bool GameObject::Create(uint32 entry, Map* map, Position const& pos, QuaternionD
|
||||
SetGoState(goState);
|
||||
SetGoArtKit(artKit);
|
||||
|
||||
SetUInt32Value(GAMEOBJECT_STATE_ANIM_ID, sAnimationDataStore.GetNumRows());
|
||||
|
||||
switch (goInfo->type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_FISHINGHOLE:
|
||||
@@ -376,7 +379,7 @@ bool GameObject::Create(uint32 entry, Map* map, Position const& pos, QuaternionD
|
||||
|
||||
if (gameObjectAddon && gameObjectAddon->WorldEffectID)
|
||||
{
|
||||
m_updateFlag |= UPDATEFLAG_GAMEOBJECT;
|
||||
m_updateFlag.GameObject = true;
|
||||
SetWorldEffectID(gameObjectAddon->WorldEffectID);
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ struct GameObjectTemplate
|
||||
uint32 usegrouplootrules; // 15 use group loot rules, enum { false, true, }; Default: false
|
||||
uint32 floatingTooltip; // 16 floatingTooltip, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 17 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
int32 xpLevel; // 18 xpLevel, int, Min value: -1, Max value: 123, Default value: 0
|
||||
uint32 XPLevelRange; // 18 XP Level Range, References: ContentTuning, NoValue = 0
|
||||
uint32 xpDifficulty; // 19 xpDifficulty, enum { No Exp, Trivial, Very Small, Small, Substandard, Standard, High, Epic, Dungeon, 5, }; Default: No Exp
|
||||
uint32 lootLevel; // 20 lootLevel, int, Min value: 0, Max value: 123, Default value: 0
|
||||
uint32 GroupXP; // 21 Group XP, enum { false, true, }; Default: false
|
||||
@@ -119,6 +119,7 @@ struct GameObjectTemplate
|
||||
uint32 chestPersonalLoot; // 30 chest Personal Loot, References: Treasure, NoValue = 0
|
||||
uint32 turnpersonallootsecurityoff; // 31 turn personal loot security off, enum { false, true, }; Default: false
|
||||
uint32 ChestProperties; // 32 Chest Properties, References: ChestProperties, NoValue = 0
|
||||
uint32 chestPushLoot; // 33 chest Push Loot, References: Treasure, NoValue = 0
|
||||
} chest;
|
||||
// 4 GAMEOBJECT_TYPE_BINDER
|
||||
struct
|
||||
@@ -331,6 +332,7 @@ struct GameObjectTemplate
|
||||
{
|
||||
uint32 creatureID; // 0 creatureID, References: Creature, NoValue = 0
|
||||
uint32 charges; // 1 charges, int, Min value: 0, Max value: 65535, Default value: 1
|
||||
uint32 Preferonlyifinlineofsight; // 2 Prefer only if in line of sight (expensive), enum { false, true, }; Default: false
|
||||
} guardPost;
|
||||
// 22 GAMEOBJECT_TYPE_SPELLCASTER
|
||||
struct
|
||||
@@ -502,7 +504,10 @@ struct GameObjectTemplate
|
||||
uint32 startOpen; // 1 startOpen, enum { false, true, }; Default: false
|
||||
uint32 autoClose; // 2 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 BlocksPathsDown; // 3 Blocks Paths Down, enum { false, true, }; Default: false
|
||||
uint32 PathBlockerBump; // 4 Path Blocker Bump (ft), int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
int32 PathBlockerBump; // 4 Path Blocker Bump (ft), int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 GiganticAOI; // 5 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 InfiniteAOI; // 6 Infinite AOI, enum { false, true, }; Default: false
|
||||
uint32 DoorisOpaque; // 7 Door is Opaque (Disable portal on close), enum { false, true, }; Default: false
|
||||
} trapdoor;
|
||||
// 36 GAMEOBJECT_TYPE_NEW_FLAG
|
||||
struct
|
||||
@@ -580,7 +585,7 @@ struct GameObjectTemplate
|
||||
struct
|
||||
{
|
||||
int32 SpawnMap; // 0 Spawn Map, References: Map, NoValue = -1
|
||||
uint32 AreaNameSet; // 1 Area Name Set (Index), int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
int32 AreaNameSet; // 1 Area Name Set (Index), int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 DoodadSetA; // 2 Doodad Set A, int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 DoodadSetB; // 3 Doodad Set B, int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
} phaseableMO;
|
||||
@@ -615,7 +620,7 @@ struct GameObjectTemplate
|
||||
// 48 GAMEOBJECT_TYPE_UI_LINK
|
||||
struct
|
||||
{
|
||||
uint32 UILinkType; // 0 UI Link Type, enum { Adventure Journal, Obliterum Forge, }; Default: Adventure Journal
|
||||
uint32 UILinkType; // 0 UI Link Type, enum { Adventure Journal, Obliterum Forge, Scrapping Machine, }; Default: Adventure Journal
|
||||
uint32 allowMounted; // 1 allowMounted, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 2 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 spellFocusType; // 3 spellFocusType, References: SpellFocusObject, NoValue = 0
|
||||
@@ -640,7 +645,7 @@ struct GameObjectTemplate
|
||||
uint32 openTextID; // 9 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 floatingTooltip; // 10 floatingTooltip, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 11 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 xpLevel; // 12 xpLevel, int, Min value: -1, Max value: 123, Default value: 0
|
||||
uint32 XPLevelRange; // 12 XP Level Range, References: ContentTuning, NoValue = 0
|
||||
uint32 xpDifficulty; // 13 xpDifficulty, enum { No Exp, Trivial, Very Small, Small, Substandard, Standard, High, Epic, Dungeon, 5, }; Default: No Exp
|
||||
uint32 spell; // 14 spell, References: Spell, NoValue = 0
|
||||
uint32 GiganticAOI; // 15 Gigantic AOI, enum { false, true, }; Default: false
|
||||
@@ -649,13 +654,45 @@ struct GameObjectTemplate
|
||||
uint32 MaxNumberofLoots; // 18 Max Number of Loots, int, Min value: 1, Max value: 40, Default value: 10
|
||||
uint32 logloot; // 19 log loot, enum { false, true, }; Default: false
|
||||
uint32 linkedTrap; // 20 linkedTrap, References: GameObjects, NoValue = 0
|
||||
uint32 PlayOpenAnimationonOpening; // 21 Play Open Animation on Opening, enum { false, true, }; Default: false
|
||||
} gatheringNode;
|
||||
// 51 GAMEOBJECT_TYPE_CHALLENGE_MODE_REWARD
|
||||
struct
|
||||
{
|
||||
uint32 chestLoot; // 0 chestLoot, References: Treasure, NoValue = 0
|
||||
uint32 WhenAvailable; // 1 When Available, References: GameObjectDisplayInfo, NoValue = 0
|
||||
uint32 open; // 2 open, References: Lock_, NoValue = 0
|
||||
uint32 openTextID; // 3 openTextID, References: BroadcastText, NoValue = 0
|
||||
} challengeModeReward;
|
||||
// 52 GAMEOBJECT_TYPE_MULTI
|
||||
struct
|
||||
{
|
||||
uint32 MultiProperties; // 0 Multi Properties, References: MultiProperties, NoValue = 0
|
||||
} multi;
|
||||
// 53 GAMEOBJECT_TYPE_SIEGEABLE_MULTI
|
||||
struct
|
||||
{
|
||||
uint32 MultiProperties; // 0 Multi Properties, References: MultiProperties, NoValue = 0
|
||||
uint32 InitialDamage; // 1 Initial Damage, enum { None, Raw, Ratio, }; Default: None
|
||||
} siegeableMulti;
|
||||
// 54 GAMEOBJECT_TYPE_SIEGEABLE_MO
|
||||
struct
|
||||
{
|
||||
uint32 SiegeableProperties; // 0 Siegeable Properties, References: SiegeableProperties, NoValue = 0
|
||||
uint32 DoodadSetA; // 1 Doodad Set A, int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 DoodadSetB; // 2 Doodad Set B, int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 DoodadSetC; // 3 Doodad Set C, int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
int32 SpawnMap; // 4 Spawn Map, References: Map, NoValue = -1
|
||||
int32 AreaNameSet; // 5 Area Name Set (Index), int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
} siegeableMO;
|
||||
// 55 GAMEOBJECT_TYPE_PVP_REWARD
|
||||
struct
|
||||
{
|
||||
uint32 chestLoot; // 0 chestLoot, References: Treasure, NoValue = 0
|
||||
uint32 WhenAvailable; // 1 When Available, References: GameObjectDisplayInfo, NoValue = 0
|
||||
uint32 open; // 2 open, References: Lock_, NoValue = 0
|
||||
uint32 openTextID; // 3 openTextID, References: BroadcastText, NoValue = 0
|
||||
} pvpReward;
|
||||
struct
|
||||
{
|
||||
uint32 data[MAX_GAMEOBJECT_DATA];
|
||||
@@ -708,6 +745,8 @@ struct GameObjectTemplate
|
||||
case GAMEOBJECT_TYPE_NEW_FLAG_DROP: return newflagdrop.open;
|
||||
case GAMEOBJECT_TYPE_CAPTURE_POINT: return capturePoint.open;
|
||||
case GAMEOBJECT_TYPE_GATHERING_NODE: return gatheringNode.open;
|
||||
case GAMEOBJECT_TYPE_CHALLENGE_MODE_REWARD: return challengeModeReward.open;
|
||||
case GAMEOBJECT_TYPE_PVP_REWARD: return pvpReward.open;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,8 +275,6 @@ Item::Item()
|
||||
m_objectType |= TYPEMASK_ITEM;
|
||||
m_objectTypeId = TYPEID_ITEM;
|
||||
|
||||
m_updateFlag = 0;
|
||||
|
||||
m_valuesCount = ITEM_END;
|
||||
_dynamicValuesCount = ITEM_DYNAMIC_END;
|
||||
m_slot = 0;
|
||||
|
||||
@@ -55,7 +55,7 @@ Object::Object()
|
||||
{
|
||||
m_objectTypeId = TYPEID_OBJECT;
|
||||
m_objectType = TYPEMASK_OBJECT;
|
||||
m_updateFlag = UPDATEFLAG_NONE;
|
||||
m_updateFlag.Clear();
|
||||
|
||||
m_uint32Values = nullptr;
|
||||
_dynamicValues = nullptr;
|
||||
@@ -170,12 +170,19 @@ void Object::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) c
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
uint8 updateType = UPDATETYPE_CREATE_OBJECT;
|
||||
uint32 flags = m_updateFlag;
|
||||
uint8 updateType = UPDATETYPE_CREATE_OBJECT;
|
||||
uint8 objectType = m_objectTypeId;
|
||||
uint16 objectTypeMask = m_objectType;
|
||||
CreateObjectBits flags = m_updateFlag;
|
||||
|
||||
/** lower flag1 **/
|
||||
if (target == this) // building packet for yourself
|
||||
flags |= UPDATEFLAG_SELF;
|
||||
{
|
||||
flags.ThisIsYou = true;
|
||||
flags.ActivePlayer = true;
|
||||
objectType = TYPEID_ACTIVE_PLAYER;
|
||||
objectTypeMask |= TYPEMASK_ACTIVE_PLAYER;
|
||||
}
|
||||
|
||||
switch (GetGUID().GetHigh())
|
||||
{
|
||||
@@ -208,15 +215,14 @@ void Object::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) c
|
||||
|
||||
if (WorldObject const* worldObject = dynamic_cast<WorldObject const*>(this))
|
||||
{
|
||||
if (!(flags & UPDATEFLAG_LIVING))
|
||||
if (!worldObject->m_movementInfo.transport.guid.IsEmpty())
|
||||
flags |= UPDATEFLAG_TRANSPORT_POSITION;
|
||||
if (!flags.MovementUpdate && !worldObject->m_movementInfo.transport.guid.IsEmpty())
|
||||
flags.MovementTransport = true;
|
||||
|
||||
if (worldObject->GetAIAnimKitId() || worldObject->GetMovementAnimKitId() || worldObject->GetMeleeAnimKitId())
|
||||
flags |= UPDATEFLAG_ANIMKITS;
|
||||
flags.AnimKit = true;
|
||||
}
|
||||
|
||||
if (flags & UPDATEFLAG_STATIONARY_POSITION)
|
||||
if (flags.Stationary)
|
||||
{
|
||||
// UPDATETYPE_CREATE_OBJECT2 for some gameobject types...
|
||||
if (isType(TYPEMASK_GAMEOBJECT))
|
||||
@@ -237,12 +243,13 @@ void Object::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) c
|
||||
|
||||
if (Unit const* unit = ToUnit())
|
||||
if (unit->GetVictim())
|
||||
flags |= UPDATEFLAG_HAS_TARGET;
|
||||
flags.CombatVictim = true;
|
||||
|
||||
ByteBuffer buf(0x400);
|
||||
buf << uint8(updateType);
|
||||
buf << GetGUID();
|
||||
buf << uint8(m_objectTypeId);
|
||||
buf << uint8(objectType);
|
||||
buf << uint32(objectTypeMask);
|
||||
|
||||
BuildMovementUpdate(&buf, flags);
|
||||
BuildValuesUpdate(updateType, &buf, target);
|
||||
@@ -337,25 +344,8 @@ ObjectGuid const& Object::GetGuidValue(uint16 index) const
|
||||
return *((ObjectGuid*)&(m_uint32Values[index]));
|
||||
}
|
||||
|
||||
void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags) const
|
||||
{
|
||||
bool NoBirthAnim = false;
|
||||
bool EnablePortals = false;
|
||||
bool PlayHoverAnim = false;
|
||||
bool HasMovementUpdate = (flags & UPDATEFLAG_LIVING) != 0;
|
||||
bool HasMovementTransport = (flags & UPDATEFLAG_TRANSPORT_POSITION) != 0;
|
||||
bool Stationary = (flags & UPDATEFLAG_STATIONARY_POSITION) != 0;
|
||||
bool CombatVictim = (flags & UPDATEFLAG_HAS_TARGET) != 0;
|
||||
bool ServerTime = (flags & UPDATEFLAG_TRANSPORT) != 0;
|
||||
bool VehicleCreate = (flags & UPDATEFLAG_VEHICLE) != 0;
|
||||
bool AnimKitCreate = (flags & UPDATEFLAG_ANIMKITS) != 0;
|
||||
bool Rotation = (flags & UPDATEFLAG_ROTATION) != 0;
|
||||
bool HasAreaTrigger = (flags & UPDATEFLAG_AREATRIGGER) != 0;
|
||||
bool HasGameObject = (flags & UPDATEFLAG_GAMEOBJECT) != 0;
|
||||
bool ThisIsYou = (flags & UPDATEFLAG_SELF) != 0;
|
||||
bool SmoothPhasing = false;
|
||||
bool SceneObjCreate = false;
|
||||
bool PlayerCreateData = GetTypeId() == TYPEID_PLAYER && ToUnit()->GetPowerIndex(POWER_RUNES) != MAX_POWERS;
|
||||
std::vector<uint32> const* PauseTimes = nullptr;
|
||||
uint32 PauseTimesCount = 0;
|
||||
if (GameObject const* go = ToGameObject())
|
||||
@@ -367,26 +357,27 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
}
|
||||
}
|
||||
|
||||
data->WriteBit(NoBirthAnim);
|
||||
data->WriteBit(EnablePortals);
|
||||
data->WriteBit(PlayHoverAnim);
|
||||
data->WriteBit(HasMovementUpdate);
|
||||
data->WriteBit(HasMovementTransport);
|
||||
data->WriteBit(Stationary);
|
||||
data->WriteBit(CombatVictim);
|
||||
data->WriteBit(ServerTime);
|
||||
data->WriteBit(VehicleCreate);
|
||||
data->WriteBit(AnimKitCreate);
|
||||
data->WriteBit(Rotation);
|
||||
data->WriteBit(HasAreaTrigger);
|
||||
data->WriteBit(HasGameObject);
|
||||
data->WriteBit(SmoothPhasing);
|
||||
data->WriteBit(ThisIsYou);
|
||||
data->WriteBit(SceneObjCreate);
|
||||
data->WriteBit(PlayerCreateData);
|
||||
data->WriteBit(flags.NoBirthAnim);
|
||||
data->WriteBit(flags.EnablePortals);
|
||||
data->WriteBit(flags.PlayHoverAnim);
|
||||
data->WriteBit(flags.MovementUpdate);
|
||||
data->WriteBit(flags.MovementTransport);
|
||||
data->WriteBit(flags.Stationary);
|
||||
data->WriteBit(flags.CombatVictim);
|
||||
data->WriteBit(flags.ServerTime);
|
||||
data->WriteBit(flags.Vehicle);
|
||||
data->WriteBit(flags.AnimKit);
|
||||
data->WriteBit(flags.Rotation);
|
||||
data->WriteBit(flags.AreaTrigger);
|
||||
data->WriteBit(flags.GameObject);
|
||||
data->WriteBit(flags.SmoothPhasing);
|
||||
data->WriteBit(flags.ThisIsYou);
|
||||
data->WriteBit(flags.SceneObject);
|
||||
data->WriteBit(flags.ActivePlayer);
|
||||
data->WriteBit(flags.Conversation);
|
||||
data->FlushBits();
|
||||
|
||||
if (HasMovementUpdate)
|
||||
if (flags.MovementUpdate)
|
||||
{
|
||||
Unit const* unit = ToUnit();
|
||||
bool HasFallDirection = unit->HasUnitMovementFlag(MOVEMENTFLAG_FALLING);
|
||||
@@ -457,6 +448,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
// *data << uint32(TransportID);
|
||||
// *data << float(Magnitude);
|
||||
// data->WriteBits(Type, 2);
|
||||
// data->FlushBits();
|
||||
//}
|
||||
|
||||
if (HasSpline)
|
||||
@@ -465,7 +457,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
|
||||
*data << uint32(PauseTimesCount);
|
||||
|
||||
if (Stationary)
|
||||
if (flags.Stationary)
|
||||
{
|
||||
WorldObject const* self = static_cast<WorldObject const*>(this);
|
||||
*data << float(self->GetStationaryX());
|
||||
@@ -474,10 +466,10 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
*data << float(self->GetStationaryO());
|
||||
}
|
||||
|
||||
if (CombatVictim)
|
||||
if (flags.CombatVictim)
|
||||
*data << ToUnit()->GetVictim()->GetGUID(); // CombatVictim
|
||||
|
||||
if (ServerTime)
|
||||
if (flags.ServerTime)
|
||||
{
|
||||
GameObject const* go = ToGameObject();
|
||||
/** @TODO Use IsTransport() to also handle type 11 (TRANSPORT)
|
||||
@@ -491,14 +483,14 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
*data << uint32(getMSTime());
|
||||
}
|
||||
|
||||
if (VehicleCreate)
|
||||
if (flags.Vehicle)
|
||||
{
|
||||
Unit const* unit = ToUnit();
|
||||
*data << uint32(unit->GetVehicleKit()->GetVehicleInfo()->ID); // RecID
|
||||
*data << float(unit->GetOrientation()); // InitialRawFacing
|
||||
}
|
||||
|
||||
if (AnimKitCreate)
|
||||
if (flags.AnimKit)
|
||||
{
|
||||
WorldObject const* self = static_cast<WorldObject const*>(this);
|
||||
*data << uint16(self->GetAIAnimKitId()); // AiID
|
||||
@@ -506,19 +498,19 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
*data << uint16(self->GetMeleeAnimKitId()); // MeleeID
|
||||
}
|
||||
|
||||
if (Rotation)
|
||||
if (flags.Rotation)
|
||||
*data << uint64(ToGameObject()->GetPackedWorldRotation()); // Rotation
|
||||
|
||||
if (PauseTimesCount)
|
||||
data->append(PauseTimes->data(), PauseTimes->size());
|
||||
|
||||
if (HasMovementTransport)
|
||||
if (flags.MovementTransport)
|
||||
{
|
||||
WorldObject const* self = static_cast<WorldObject const*>(this);
|
||||
*data << self->m_movementInfo.transport;
|
||||
}
|
||||
|
||||
if (HasAreaTrigger)
|
||||
if (flags.AreaTrigger)
|
||||
{
|
||||
AreaTrigger const* areaTrigger = ToAreaTrigger();
|
||||
AreaTriggerMiscTemplate const* areaTriggerMiscTemplate = areaTrigger->GetMiscTemplate();
|
||||
@@ -539,9 +531,10 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
bool hasMorphCurveID = areaTriggerMiscTemplate->MorphCurveId != 0;
|
||||
bool hasFacingCurveID = areaTriggerMiscTemplate->FacingCurveId != 0;
|
||||
bool hasMoveCurveID = areaTriggerMiscTemplate->MoveCurveId != 0;
|
||||
bool hasUnk2 = areaTriggerTemplate->HasFlag(AREATRIGGER_FLAG_UNK2);
|
||||
bool hasAnimation = areaTriggerTemplate->HasFlag(AREATRIGGER_FLAG_HAS_ANIM_ID);
|
||||
bool hasUnk3 = areaTriggerTemplate->HasFlag(AREATRIGGER_FLAG_UNK3);
|
||||
bool hasUnk4 = areaTriggerTemplate->HasFlag(AREATRIGGER_FLAG_UNK4);
|
||||
bool hasAnimKitID = areaTriggerTemplate->HasFlag(AREATRIGGER_FLAG_HAS_ANIM_KIT_ID);
|
||||
bool hasAnimProgress = false;
|
||||
bool hasAreaTriggerSphere = areaTriggerTemplate->IsSphere();
|
||||
bool hasAreaTriggerBox = areaTriggerTemplate->IsBox();
|
||||
bool hasAreaTriggerPolygon = areaTriggerTemplate->IsPolygon();
|
||||
@@ -560,9 +553,10 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
data->WriteBit(hasMorphCurveID);
|
||||
data->WriteBit(hasFacingCurveID);
|
||||
data->WriteBit(hasMoveCurveID);
|
||||
data->WriteBit(hasUnk2);
|
||||
data->WriteBit(hasAnimation);
|
||||
data->WriteBit(hasAnimKitID);
|
||||
data->WriteBit(hasUnk3);
|
||||
data->WriteBit(hasUnk4);
|
||||
data->WriteBit(hasAnimProgress);
|
||||
data->WriteBit(hasAreaTriggerSphere);
|
||||
data->WriteBit(hasAreaTriggerBox);
|
||||
data->WriteBit(hasAreaTriggerPolygon);
|
||||
@@ -598,10 +592,13 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
if (hasMoveCurveID)
|
||||
*data << uint32(areaTriggerMiscTemplate->MoveCurveId);
|
||||
|
||||
if (hasUnk2)
|
||||
*data << int32(0);
|
||||
if (hasAnimation)
|
||||
*data << int32(areaTriggerMiscTemplate->AnimId);
|
||||
|
||||
if (hasUnk4)
|
||||
if (hasAnimKitID)
|
||||
*data << int32(areaTriggerMiscTemplate->AnimKitId);
|
||||
|
||||
if (hasAnimProgress)
|
||||
*data << uint32(0);
|
||||
|
||||
if (hasAreaTriggerSphere)
|
||||
@@ -648,7 +645,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
*data << *areaTrigger->GetCircularMovementInfo();
|
||||
}
|
||||
|
||||
if (HasGameObject)
|
||||
if (flags.GameObject)
|
||||
{
|
||||
bool bit8 = false;
|
||||
uint32 Int1 = 0;
|
||||
@@ -663,7 +660,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
*data << uint32(Int1);
|
||||
}
|
||||
|
||||
//if (SmoothPhasing)
|
||||
//if (flags.SmoothPhasing)
|
||||
//{
|
||||
// data->WriteBit(ReplaceActive);
|
||||
// data->WriteBit(HasReplaceObject);
|
||||
@@ -672,7 +669,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
// *data << ObjectGuid(ReplaceObject);
|
||||
//}
|
||||
|
||||
//if (SceneObjCreate)
|
||||
//if (flags.SceneObject)
|
||||
//{
|
||||
// data->WriteBit(HasLocalScriptData);
|
||||
// data->WriteBit(HasPetBattleFullUpdate);
|
||||
@@ -782,7 +779,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
// }
|
||||
//}
|
||||
|
||||
if (PlayerCreateData)
|
||||
if (flags.ActivePlayer)
|
||||
{
|
||||
bool HasSceneInstanceIDs = false;
|
||||
bool HasRuneState = ToUnit()->GetPowerIndex(POWER_RUNES) != MAX_POWERS;
|
||||
@@ -809,6 +806,15 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
*data << uint8((baseCd - float(player->GetRuneCooldown(i))) / baseCd * 255);
|
||||
}
|
||||
}
|
||||
|
||||
if (flags.Conversation)
|
||||
{
|
||||
Conversation const* self = ToConversation();
|
||||
if (data->WriteBit(self->GetTextureKitId() != 0))
|
||||
*data << uint32(self->GetTextureKitId());
|
||||
|
||||
data->FlushBits();
|
||||
}
|
||||
}
|
||||
|
||||
void Object::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target) const
|
||||
@@ -842,7 +848,11 @@ void Object::BuildDynamicValuesUpdate(uint8 updateType, ByteBuffer* data, Player
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
std::size_t blockCount = UpdateMask::GetBlockCount(_dynamicValuesCount);
|
||||
std::size_t valueCount = _dynamicValuesCount;
|
||||
if (target != this && GetTypeId() == TYPEID_PLAYER)
|
||||
valueCount = PLAYER_DYNAMIC_END;
|
||||
|
||||
std::size_t blockCount = UpdateMask::GetBlockCount(valueCount);
|
||||
|
||||
uint32* flags = nullptr;
|
||||
uint32 visibleFlag = GetDynamicUpdateFieldData(target, flags);
|
||||
@@ -851,7 +861,7 @@ void Object::BuildDynamicValuesUpdate(uint8 updateType, ByteBuffer* data, Player
|
||||
std::size_t maskPos = data->wpos();
|
||||
data->resize(data->size() + blockCount * sizeof(UpdateMask::BlockType));
|
||||
|
||||
for (uint16 index = 0; index < _dynamicValuesCount; ++index)
|
||||
for (uint16 index = 0; index < valueCount; ++index)
|
||||
{
|
||||
std::vector<uint32> const& values = _dynamicValues[index];
|
||||
if (_fieldNotifyFlags & flags[index] ||
|
||||
@@ -931,6 +941,16 @@ uint32 Object::GetUpdateFieldData(Player const* target, uint32*& flags) const
|
||||
if (((Item const*)this)->GetOwnerGUID() == target->GetGUID())
|
||||
visibleFlag |= UF_FLAG_OWNER | UF_FLAG_ITEM_OWNER;
|
||||
break;
|
||||
case TYPEID_AZERITE_EMPOWERED_ITEM:
|
||||
flags = AzeriteEmpoweredItemUpdateFieldFlags;
|
||||
if (((Item const*)this)->GetOwnerGUID() == target->GetGUID())
|
||||
visibleFlag |= UF_FLAG_OWNER | UF_FLAG_ITEM_OWNER;
|
||||
break;
|
||||
case TYPEID_AZERITE_ITEM:
|
||||
flags = AzeriteItemUpdateFieldFlags;
|
||||
if (((Item const*)this)->GetOwnerGUID() == target->GetGUID())
|
||||
visibleFlag |= UF_FLAG_OWNER | UF_FLAG_ITEM_OWNER;
|
||||
break;
|
||||
case TYPEID_UNIT:
|
||||
case TYPEID_PLAYER:
|
||||
{
|
||||
@@ -972,6 +992,7 @@ uint32 Object::GetUpdateFieldData(Player const* target, uint32*& flags) const
|
||||
flags = ConversationUpdateFieldFlags;
|
||||
break;
|
||||
case TYPEID_OBJECT:
|
||||
case TYPEID_ACTIVE_PLAYER:
|
||||
ABORT();
|
||||
break;
|
||||
}
|
||||
@@ -990,6 +1011,8 @@ uint32 Object::GetDynamicUpdateFieldData(Player const* target, uint32*& flags) c
|
||||
{
|
||||
case TYPEID_ITEM:
|
||||
case TYPEID_CONTAINER:
|
||||
case TYPEID_AZERITE_EMPOWERED_ITEM:
|
||||
case TYPEID_AZERITE_ITEM:
|
||||
flags = ItemDynamicUpdateFieldFlags;
|
||||
if (((Item const*)this)->GetOwnerGUID() == target->GetGUID())
|
||||
visibleFlag |= UF_FLAG_OWNER | UF_FLAG_ITEM_OWNER;
|
||||
|
||||
@@ -54,6 +54,33 @@ struct QuaternionData;
|
||||
|
||||
typedef std::unordered_map<Player*, UpdateData> UpdateDataMapType;
|
||||
|
||||
struct CreateObjectBits
|
||||
{
|
||||
bool NoBirthAnim : 1;
|
||||
bool EnablePortals : 1;
|
||||
bool PlayHoverAnim : 1;
|
||||
bool MovementUpdate : 1;
|
||||
bool MovementTransport : 1;
|
||||
bool Stationary : 1;
|
||||
bool CombatVictim : 1;
|
||||
bool ServerTime : 1;
|
||||
bool Vehicle : 1;
|
||||
bool AnimKit : 1;
|
||||
bool Rotation : 1;
|
||||
bool AreaTrigger : 1;
|
||||
bool GameObject : 1;
|
||||
bool SmoothPhasing : 1;
|
||||
bool ThisIsYou : 1;
|
||||
bool SceneObject : 1;
|
||||
bool ActivePlayer : 1;
|
||||
bool Conversation : 1;
|
||||
|
||||
void Clear()
|
||||
{
|
||||
memset(this, 0, sizeof(CreateObjectBits));
|
||||
}
|
||||
};
|
||||
|
||||
namespace UpdateMask
|
||||
{
|
||||
typedef uint32 BlockType;
|
||||
@@ -298,14 +325,14 @@ class TC_GAME_API Object
|
||||
uint32 GetUpdateFieldData(Player const* target, uint32*& flags) const;
|
||||
uint32 GetDynamicUpdateFieldData(Player const* target, uint32*& flags) const;
|
||||
|
||||
void BuildMovementUpdate(ByteBuffer* data, uint32 flags) const;
|
||||
void BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags) const;
|
||||
virtual void BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, Player* target) const;
|
||||
virtual void BuildDynamicValuesUpdate(uint8 updatetype, ByteBuffer* data, Player* target) const;
|
||||
|
||||
uint16 m_objectType;
|
||||
|
||||
TypeID m_objectTypeId;
|
||||
uint32 m_updateFlag;
|
||||
CreateObjectBits m_updateFlag;
|
||||
|
||||
union
|
||||
{
|
||||
|
||||
@@ -87,6 +87,7 @@ namespace
|
||||
SET_GUID_NAME(CommerceObj);
|
||||
SET_GUID_NAME(ClientSession);
|
||||
SET_GUID_NAME(Cast);
|
||||
SET_GUID_NAME(ClientConnection);
|
||||
|
||||
#undef SET_GUID_NAME
|
||||
}
|
||||
|
||||
@@ -30,35 +30,41 @@
|
||||
|
||||
enum TypeID
|
||||
{
|
||||
TYPEID_OBJECT = 0,
|
||||
TYPEID_ITEM = 1,
|
||||
TYPEID_CONTAINER = 2,
|
||||
TYPEID_UNIT = 3,
|
||||
TYPEID_PLAYER = 4,
|
||||
TYPEID_GAMEOBJECT = 5,
|
||||
TYPEID_DYNAMICOBJECT = 6,
|
||||
TYPEID_CORPSE = 7,
|
||||
TYPEID_AREATRIGGER = 8,
|
||||
TYPEID_SCENEOBJECT = 9,
|
||||
TYPEID_CONVERSATION = 10
|
||||
TYPEID_OBJECT = 0,
|
||||
TYPEID_ITEM = 1,
|
||||
TYPEID_CONTAINER = 2,
|
||||
TYPEID_AZERITE_EMPOWERED_ITEM = 3,
|
||||
TYPEID_AZERITE_ITEM = 4,
|
||||
TYPEID_UNIT = 5,
|
||||
TYPEID_PLAYER = 6,
|
||||
TYPEID_ACTIVE_PLAYER = 7,
|
||||
TYPEID_GAMEOBJECT = 8,
|
||||
TYPEID_DYNAMICOBJECT = 9,
|
||||
TYPEID_CORPSE = 10,
|
||||
TYPEID_AREATRIGGER = 11,
|
||||
TYPEID_SCENEOBJECT = 12,
|
||||
TYPEID_CONVERSATION = 13
|
||||
};
|
||||
|
||||
#define NUM_CLIENT_OBJECT_TYPES 11
|
||||
#define NUM_CLIENT_OBJECT_TYPES 14
|
||||
|
||||
enum TypeMask
|
||||
{
|
||||
TYPEMASK_OBJECT = 0x0001,
|
||||
TYPEMASK_ITEM = 0x0002,
|
||||
TYPEMASK_CONTAINER = 0x0004,
|
||||
TYPEMASK_UNIT = 0x0008,
|
||||
TYPEMASK_PLAYER = 0x0010,
|
||||
TYPEMASK_GAMEOBJECT = 0x0020,
|
||||
TYPEMASK_DYNAMICOBJECT = 0x0040,
|
||||
TYPEMASK_CORPSE = 0x0080,
|
||||
TYPEMASK_AREATRIGGER = 0x0100,
|
||||
TYPEMASK_SCENEOBJECT = 0x0200,
|
||||
TYPEMASK_CONVERSATION = 0x0400,
|
||||
TYPEMASK_SEER = TYPEMASK_PLAYER | TYPEMASK_UNIT | TYPEMASK_DYNAMICOBJECT
|
||||
TYPEMASK_OBJECT = 0x0001,
|
||||
TYPEMASK_ITEM = 0x0002,
|
||||
TYPEMASK_CONTAINER = 0x0004,
|
||||
TYPEMASK_AZERITE_EMPOWERED_ITEM = 0x0008,
|
||||
TYPEMASK_AZERITE_ITEM = 0x0010,
|
||||
TYPEMASK_UNIT = 0x0020,
|
||||
TYPEMASK_PLAYER = 0x0040,
|
||||
TYPEMASK_ACTIVE_PLAYER = 0x0080,
|
||||
TYPEMASK_GAMEOBJECT = 0x0100,
|
||||
TYPEMASK_DYNAMICOBJECT = 0x0200,
|
||||
TYPEMASK_CORPSE = 0x0400,
|
||||
TYPEMASK_AREATRIGGER = 0x0800,
|
||||
TYPEMASK_SCENEOBJECT = 0x1000,
|
||||
TYPEMASK_CONVERSATION = 0x2000,
|
||||
TYPEMASK_SEER = TYPEMASK_PLAYER | TYPEMASK_UNIT | TYPEMASK_DYNAMICOBJECT
|
||||
};
|
||||
|
||||
enum class HighGuid
|
||||
@@ -111,6 +117,7 @@ enum class HighGuid
|
||||
CommerceObj = 45,
|
||||
ClientSession = 46,
|
||||
Cast = 47,
|
||||
ClientConnection = 48,
|
||||
|
||||
Count,
|
||||
};
|
||||
@@ -349,6 +356,7 @@ class TC_GAME_API ObjectGuidGeneratorBase
|
||||
{
|
||||
public:
|
||||
ObjectGuidGeneratorBase(ObjectGuid::LowType start = UI64LIT(1)) : _nextGuid(start) { }
|
||||
virtual ~ObjectGuidGeneratorBase() { }
|
||||
|
||||
virtual void Set(uint64 val) { _nextGuid = val; }
|
||||
virtual ObjectGuid::LowType Generate() = 0;
|
||||
|
||||
@@ -34,29 +34,6 @@ enum OBJECT_UPDATE_TYPE
|
||||
UPDATETYPE_OUT_OF_RANGE_OBJECTS = 3,
|
||||
};
|
||||
|
||||
enum OBJECT_UPDATE_FLAGS
|
||||
{
|
||||
UPDATEFLAG_NONE = 0x0000,
|
||||
UPDATEFLAG_SELF = 0x0001,
|
||||
UPDATEFLAG_TRANSPORT = 0x0002,
|
||||
UPDATEFLAG_HAS_TARGET = 0x0004,
|
||||
UPDATEFLAG_LIVING = 0x0008,
|
||||
UPDATEFLAG_STATIONARY_POSITION = 0x0010,
|
||||
UPDATEFLAG_VEHICLE = 0x0020,
|
||||
UPDATEFLAG_TRANSPORT_POSITION = 0x0040,
|
||||
UPDATEFLAG_ROTATION = 0x0080,
|
||||
UPDATEFLAG_ANIMKITS = 0x0100,
|
||||
UPDATEFLAG_AREATRIGGER = 0x0200,
|
||||
UPDATEFLAG_GAMEOBJECT = 0x0400,
|
||||
//UPDATEFLAG_REPLACE_ACTIVE = 0x0800,
|
||||
//UPDATEFLAG_NO_BIRTH_ANIM = 0x1000,
|
||||
//UPDATEFLAG_ENABLE_PORTALS = 0x2000,
|
||||
//UPDATEFLAG_PLAY_HOVER_ANIM = 0x4000,
|
||||
//UPDATEFLAG_IS_SUPPRESSING_GREETINGS = 0x8000
|
||||
//UPDATEFLAG_SCENEOBJECT = 0x10000,
|
||||
//UPDATEFLAG_SCENE_PENDING_INSTANCE = 0x20000
|
||||
};
|
||||
|
||||
class UpdateData
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -2419,9 +2419,8 @@ void Player::GiveLevel(uint8 level)
|
||||
for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i)
|
||||
packet.StatDelta[i] = int32(info.stats[i]) - GetCreateStat(Stats(i));
|
||||
|
||||
uint32 const* rowLevels = (getClass() != CLASS_DEATH_KNIGHT) ? DefaultTalentRowLevels : DKTalentRowLevels;
|
||||
|
||||
packet.Cp = std::find(rowLevels, rowLevels + MAX_TALENT_TIERS, level) != (rowLevels + MAX_TALENT_TIERS);
|
||||
packet.NumNewTalents = DB2Manager::GetNumTalentsAtLevel(level, Classes(getClass())) - DB2Manager::GetNumTalentsAtLevel(oldLevel, Classes(getClass()));
|
||||
packet.NumNewPvpTalentSlots = sDB2Manager.GetPvpTalentNumSlotsAtLevel(level, Classes(getClass())) - sDB2Manager.GetPvpTalentNumSlotsAtLevel(oldLevel, Classes(getClass()));
|
||||
|
||||
GetSession()->SendPacket(packet.Write());
|
||||
|
||||
@@ -2505,7 +2504,7 @@ void Player::InitTalentForLevel()
|
||||
if (level < MIN_SPECIALIZATION_LEVEL)
|
||||
ResetTalentSpecialization();
|
||||
|
||||
uint32 talentTiers = CalculateTalentsTiers();
|
||||
uint32 talentTiers = DB2Manager::GetNumTalentsAtLevel(level, Classes(getClass()));
|
||||
if (level < 15)
|
||||
{
|
||||
// Remove all talent points
|
||||
@@ -14570,6 +14569,38 @@ uint32 Player::GetDefaultGossipMenuForSource(WorldObject* source)
|
||||
/*** QUEST SYSTEM ***/
|
||||
/*********************************************************/
|
||||
|
||||
int32 Player::GetQuestMinLevel(Quest const* quest) const
|
||||
{
|
||||
if (quest->GetQuestLevel() == -1 && quest->GetQuestScalingFactionGroup())
|
||||
{
|
||||
ChrRacesEntry const* race = sChrRacesStore.AssertEntry(getRace());
|
||||
FactionTemplateEntry const* raceFaction = sFactionTemplateStore.LookupEntry(race->FactionID);
|
||||
if (!raceFaction || raceFaction->FactionGroup != quest->GetQuestScalingFactionGroup())
|
||||
return quest->GetQuestMaxScalingLevel();
|
||||
}
|
||||
|
||||
return quest->GetMinLevel();
|
||||
}
|
||||
|
||||
int32 Player::GetQuestLevel(Quest const* quest) const
|
||||
{
|
||||
if (!quest)
|
||||
return 0;
|
||||
|
||||
if (quest->GetQuestLevel() == -1)
|
||||
{
|
||||
int32 minLevel = GetQuestMinLevel(quest);
|
||||
int32 maxLevel = quest->GetQuestMaxScalingLevel();
|
||||
int32 level = getLevel();
|
||||
if (level >= minLevel)
|
||||
return std::min(level, maxLevel);
|
||||
|
||||
return minLevel;
|
||||
}
|
||||
|
||||
return quest->GetQuestLevel();
|
||||
}
|
||||
|
||||
void Player::PrepareQuestMenu(ObjectGuid guid)
|
||||
{
|
||||
QuestRelationBounds objectQR;
|
||||
@@ -14737,7 +14768,7 @@ bool Player::CanSeeStartQuest(Quest const* quest)
|
||||
SatisfyQuestPrevChain(quest, false) && SatisfyQuestDay(quest, false) && SatisfyQuestWeek(quest, false) &&
|
||||
SatisfyQuestMonth(quest, false) && SatisfyQuestSeasonal(quest, false))
|
||||
{
|
||||
return int32(getLevel() + sWorld->getIntConfig(CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF)) >= quest->GetMinLevel();
|
||||
return int32(getLevel() + sWorld->getIntConfig(CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF)) >= GetQuestMinLevel(quest);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -15163,7 +15194,7 @@ void Player::IncompleteQuest(uint32 quest_id)
|
||||
|
||||
uint32 Player::GetQuestMoneyReward(Quest const* quest) const
|
||||
{
|
||||
return quest->MoneyValue(getLevel()) * sWorld->getRate(RATE_MONEY_QUEST);
|
||||
return quest->MoneyValue(this) * sWorld->getRate(RATE_MONEY_QUEST);
|
||||
}
|
||||
|
||||
uint32 Player::GetQuestXPReward(Quest const* quest)
|
||||
@@ -15174,7 +15205,7 @@ uint32 Player::GetQuestXPReward(Quest const* quest)
|
||||
if (rewarded && !quest->IsDFQuest())
|
||||
return 0;
|
||||
|
||||
uint32 XP = quest->XPValue(getLevel()) * sWorld->getRate(RATE_XP_QUEST);
|
||||
uint32 XP = quest->XPValue(this) * sWorld->getRate(RATE_XP_QUEST);
|
||||
|
||||
// handle SPELL_AURA_MOD_XP_QUEST_PCT auras
|
||||
Unit::AuraEffectList const& ModXPPctAuras = GetAuraEffectsByType(SPELL_AURA_MOD_XP_QUEST_PCT);
|
||||
@@ -15570,7 +15601,7 @@ bool Player::SatisfyQuestSkill(Quest const* qInfo, bool msg) const
|
||||
|
||||
bool Player::SatisfyQuestLevel(Quest const* qInfo, bool msg) const
|
||||
{
|
||||
if (getLevel() < qInfo->GetMinLevel())
|
||||
if (getLevel() < GetQuestMinLevel(qInfo))
|
||||
{
|
||||
if (msg)
|
||||
{
|
||||
@@ -19625,7 +19656,7 @@ void Player::SendRaidInfo()
|
||||
{
|
||||
InstanceSave* save = itr->second.save;
|
||||
|
||||
WorldPackets::Instance::InstanceLockInfos lockInfos;
|
||||
WorldPackets::Instance::InstanceLock lockInfos;
|
||||
|
||||
lockInfos.InstanceID = save->GetInstanceId();
|
||||
lockInfos.MapID = save->GetMapId();
|
||||
@@ -22328,6 +22359,8 @@ void Player::InitDisplayIds()
|
||||
default:
|
||||
TC_LOG_ERROR("entities.player", "Player::InitDisplayIds: Player '%s' (%s) has invalid gender %u", GetName().c_str(), GetGUID().ToString().c_str(), gender);
|
||||
}
|
||||
|
||||
SetUInt32Value(UNIT_FIELD_STATE_ANIM_ID, sAnimationDataStore.GetNumRows());
|
||||
}
|
||||
|
||||
inline bool Player::_StoreOrEquipNewItem(uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot, int64 price, ItemTemplate const* pProto, Creature* pVendor, VendorItem const* crItem, bool bStore)
|
||||
@@ -23999,19 +24032,15 @@ void Player::LearnDefaultSkill(SkillRaceClassInfoEntry const* rcInfo)
|
||||
break;
|
||||
case SKILL_RANGE_RANK:
|
||||
{
|
||||
uint16 rank = 1;
|
||||
if (getClass() == CLASS_DEATH_KNIGHT && skillId == SKILL_FIRST_AID)
|
||||
rank = 4;
|
||||
|
||||
SkillTiersEntry const* tier = sObjectMgr->GetSkillTier(rcInfo->SkillTierID);
|
||||
uint16 maxValue = tier->Value[std::max<int32>(rank - 1, 0)];
|
||||
uint16 maxValue = tier->Value[0];
|
||||
uint16 skillValue = 1;
|
||||
if (rcInfo->Flags & SKILL_FLAG_ALWAYS_MAX_VALUE)
|
||||
skillValue = maxValue;
|
||||
else if (getClass() == CLASS_DEATH_KNIGHT)
|
||||
skillValue = std::min(std::max(uint16(1), uint16((getLevel() - 1) * 5)), maxValue);
|
||||
|
||||
SetSkill(skillId, rank, skillValue, maxValue);
|
||||
SetSkill(skillId, 1, skillValue, maxValue);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -26496,7 +26525,10 @@ void Player::SendTalentsInfoData()
|
||||
continue;
|
||||
}
|
||||
|
||||
groupInfoPkt.PvPTalentIDs.push_back(uint16(pvpTalents[slot]));
|
||||
groupInfoPkt.PvPTalents.emplace_back();
|
||||
WorldPackets::Talent::PvPTalent& pvpTalent = groupInfoPkt.PvPTalents.back();
|
||||
pvpTalent.PvPTalentID = pvpTalents[slot];
|
||||
pvpTalent.Slot = slot;
|
||||
}
|
||||
|
||||
packet.Info.TalentGroups.push_back(groupInfoPkt);
|
||||
@@ -27517,6 +27549,7 @@ void Player::SendPlayerChoice(ObjectGuid sender, int32 choiceId)
|
||||
displayPlayerChoice.Responses.resize(playerChoice->Responses.size());
|
||||
displayPlayerChoice.CloseChoiceFrame = false;
|
||||
displayPlayerChoice.HideWarboardHeader = playerChoice->HideWarboardHeader;
|
||||
displayPlayerChoice.KeepOpenAfterChoice = playerChoice->KeepOpenAfterChoice;
|
||||
|
||||
for (std::size_t i = 0; i < playerChoice->Responses.size(); ++i)
|
||||
{
|
||||
@@ -27524,6 +27557,9 @@ void Player::SendPlayerChoice(ObjectGuid sender, int32 choiceId)
|
||||
WorldPackets::Quest::PlayerChoiceResponse& playerChoiceResponse = displayPlayerChoice.Responses[i];
|
||||
playerChoiceResponse.ResponseID = playerChoiceResponseTemplate.ResponseId;
|
||||
playerChoiceResponse.ChoiceArtFileID = playerChoiceResponseTemplate.ChoiceArtFileId;
|
||||
playerChoiceResponse.Flags = playerChoiceResponseTemplate.Flags;
|
||||
playerChoiceResponse.WidgetSetID = playerChoiceResponseTemplate.WidgetSetID;
|
||||
playerChoiceResponse.GroupID = playerChoiceResponseTemplate.GroupID;
|
||||
playerChoiceResponse.Answer = playerChoiceResponseTemplate.Answer;
|
||||
playerChoiceResponse.Header = playerChoiceResponseTemplate.Header;
|
||||
playerChoiceResponse.Description = playerChoiceResponseTemplate.Description;
|
||||
@@ -27848,29 +27884,6 @@ void Player::SendSupercededSpell(uint32 oldSpell, uint32 newSpell) const
|
||||
GetSession()->SendPacket(supercededSpells.Write());
|
||||
}
|
||||
|
||||
uint32 Player::CalculateTalentsTiers() const
|
||||
{
|
||||
uint32 const* rowLevels;
|
||||
switch (getClass())
|
||||
{
|
||||
case CLASS_DEATH_KNIGHT:
|
||||
rowLevels = DKTalentRowLevels;
|
||||
break;
|
||||
case CLASS_DEMON_HUNTER:
|
||||
rowLevels = DHTalentRowLevels;
|
||||
break;
|
||||
default:
|
||||
rowLevels = DefaultTalentRowLevels;
|
||||
break;
|
||||
}
|
||||
|
||||
for (uint32 i = MAX_TALENT_TIERS; i; --i)
|
||||
if (getLevel() >= rowLevels[i - 1])
|
||||
return i;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Difficulty Player::GetDifficultyID(MapEntry const* mapEntry) const
|
||||
{
|
||||
if (!mapEntry->IsRaid())
|
||||
|
||||
@@ -399,7 +399,7 @@ enum PlayerFlags
|
||||
PLAYER_FLAGS_GM = 0x00000008,
|
||||
PLAYER_FLAGS_GHOST = 0x00000010,
|
||||
PLAYER_FLAGS_RESTING = 0x00000020,
|
||||
PLAYER_FLAGS_UNK6 = 0x00000040,
|
||||
PLAYER_FLAGS_VOICE_CHAT = 0x00000040,
|
||||
PLAYER_FLAGS_UNK7 = 0x00000080, // pre-3.0.3 PLAYER_FLAGS_FFA_PVP flag for FFA PVP state
|
||||
PLAYER_FLAGS_CONTESTED_PVP = 0x00000100, // Player has been involved in a PvP combat and will be attacked by contested guards
|
||||
PLAYER_FLAGS_IN_PVP = 0x00000200,
|
||||
@@ -430,7 +430,8 @@ enum PlayerFlags
|
||||
enum PlayerFlagsEx
|
||||
{
|
||||
PLAYER_FLAGS_EX_REAGENT_BANK_UNLOCKED = 0x0001,
|
||||
PLAYER_FLAGS_EX_MERCENARY_MODE = 0x0002
|
||||
PLAYER_FLAGS_EX_MERCENARY_MODE = 0x0002,
|
||||
PLAYER_FLAGS_EX_ARTIFACT_FORGE_CHEAT = 0x0004
|
||||
};
|
||||
|
||||
enum PlayerLocalFlags
|
||||
@@ -1009,10 +1010,6 @@ enum TalentLearnResult
|
||||
TALENT_FAILED_REST_AREA = 8
|
||||
};
|
||||
|
||||
static uint32 const DefaultTalentRowLevels[MAX_TALENT_TIERS] = { 15, 30, 45, 60, 75, 90, 100 };
|
||||
static uint32 const DKTalentRowLevels[MAX_TALENT_TIERS] = { 57, 58, 59, 60, 75, 90, 100 };
|
||||
static uint32 const DHTalentRowLevels[MAX_TALENT_TIERS] = { 99, 100, 102, 104, 106, 108, 110 };
|
||||
|
||||
struct TC_GAME_API SpecializationInfo
|
||||
{
|
||||
SpecializationInfo() : ResetTalentsCost(0), ResetTalentsTime(0), PrimarySpecialization(0), ActiveGroup(0)
|
||||
@@ -1357,13 +1354,8 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
/*** QUEST SYSTEM ***/
|
||||
/*********************************************************/
|
||||
|
||||
int32 GetQuestLevel(Quest const* quest) const
|
||||
{
|
||||
if (!quest)
|
||||
return getLevel();
|
||||
return quest->GetQuestLevel() > 0 ? quest->GetQuestLevel() : std::min<int32>(getLevel(), quest->GetQuestMaxScalingLevel());
|
||||
}
|
||||
|
||||
int32 GetQuestMinLevel(Quest const* quest) const;
|
||||
int32 GetQuestLevel(Quest const* quest) const;
|
||||
void PrepareQuestMenu(ObjectGuid guid);
|
||||
void SendPreparedQuest(WorldObject* source);
|
||||
bool IsActiveQuest(uint32 quest_id) const;
|
||||
@@ -1653,7 +1645,6 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
bool AddTalent(TalentEntry const* talent, uint8 spec, bool learning);
|
||||
bool HasTalent(uint32 spell_id, uint8 spec) const;
|
||||
void RemoveTalent(TalentEntry const* talent);
|
||||
uint32 CalculateTalentsTiers() const;
|
||||
void ResetTalentSpecialization();
|
||||
|
||||
TalentLearnResult LearnPvpTalent(uint32 talentID, uint8 slot, int32* spellOnCooldown);
|
||||
@@ -1993,7 +1984,6 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
void RestoreHealthAfterDuel() { SetHealth(healthBeforeDuel); }
|
||||
void RestoreManaAfterDuel() { SetPower(POWER_MANA, manaBeforeDuel); }
|
||||
|
||||
uint32 GetPrestigeLevel() const { return 0; }
|
||||
uint32 GetHonorLevel() const { return GetUInt32Value(PLAYER_FIELD_HONOR_LEVEL); }
|
||||
void AddHonorXP(uint32 xp);
|
||||
void SetHonorLevel(uint8 honorLevel);
|
||||
|
||||
@@ -38,7 +38,9 @@ Transport::Transport() : GameObject(),
|
||||
_triggeredArrivalEvent(false), _triggeredDepartureEvent(false),
|
||||
_passengerTeleportItr(_passengers.begin()), _delayedAddModel(false), _delayedTeleport(false)
|
||||
{
|
||||
m_updateFlag = UPDATEFLAG_TRANSPORT | UPDATEFLAG_STATIONARY_POSITION | UPDATEFLAG_ROTATION;
|
||||
m_updateFlag.ServerTime = true;
|
||||
m_updateFlag.Stationary = true;
|
||||
m_updateFlag.Rotation = true;
|
||||
}
|
||||
|
||||
Transport::~Transport()
|
||||
|
||||
@@ -111,13 +111,13 @@ bool DispelableAura::RollDispel() const
|
||||
}
|
||||
|
||||
DamageInfo::DamageInfo(Unit* attacker, Unit* victim, uint32 damage, SpellInfo const* spellInfo, SpellSchoolMask schoolMask, DamageEffectType damageType, WeaponAttackType attackType)
|
||||
: m_attacker(attacker), m_victim(victim), m_damage(damage), m_spellInfo(spellInfo), m_schoolMask(schoolMask), m_damageType(damageType), m_attackType(attackType),
|
||||
: m_attacker(attacker), m_victim(victim), m_damage(damage), m_originalDamage(damage), m_spellInfo(spellInfo), m_schoolMask(schoolMask), m_damageType(damageType), m_attackType(attackType),
|
||||
m_absorb(0), m_resist(0), m_block(0), m_hitMask(0)
|
||||
{
|
||||
}
|
||||
|
||||
DamageInfo::DamageInfo(CalcDamageInfo const& dmgInfo)
|
||||
: m_attacker(dmgInfo.attacker), m_victim(dmgInfo.target), m_damage(dmgInfo.damage), m_spellInfo(nullptr), m_schoolMask(SpellSchoolMask(dmgInfo.damageSchoolMask)),
|
||||
: m_attacker(dmgInfo.attacker), m_victim(dmgInfo.target), m_damage(dmgInfo.damage), m_originalDamage(dmgInfo.damage), m_spellInfo(nullptr), m_schoolMask(SpellSchoolMask(dmgInfo.damageSchoolMask)),
|
||||
m_damageType(DIRECT_DAMAGE), m_attackType(dmgInfo.attackType), m_absorb(dmgInfo.absorb), m_resist(dmgInfo.resist), m_block(dmgInfo.blocked_amount), m_hitMask(0)
|
||||
{
|
||||
switch (dmgInfo.TargetState)
|
||||
@@ -171,7 +171,7 @@ DamageInfo::DamageInfo(CalcDamageInfo const& dmgInfo)
|
||||
}
|
||||
|
||||
DamageInfo::DamageInfo(SpellNonMeleeDamage const& spellNonMeleeDamage, DamageEffectType damageType, WeaponAttackType attackType, uint32 hitMask)
|
||||
: m_attacker(spellNonMeleeDamage.attacker), m_victim(spellNonMeleeDamage.target), m_damage(spellNonMeleeDamage.damage),
|
||||
: m_attacker(spellNonMeleeDamage.attacker), m_victim(spellNonMeleeDamage.target), m_damage(spellNonMeleeDamage.damage), m_originalDamage(spellNonMeleeDamage.originalDamage),
|
||||
m_spellInfo(sSpellMgr->GetSpellInfo(spellNonMeleeDamage.SpellID)), m_schoolMask(SpellSchoolMask(spellNonMeleeDamage.schoolMask)), m_damageType(damageType),
|
||||
m_attackType(attackType), m_absorb(spellNonMeleeDamage.absorb), m_resist(spellNonMeleeDamage.resist), m_block(spellNonMeleeDamage.blocked), m_hitMask(hitMask)
|
||||
{
|
||||
@@ -226,7 +226,7 @@ uint32 DamageInfo::GetHitMask() const
|
||||
}
|
||||
|
||||
HealInfo::HealInfo(Unit* healer, Unit* target, uint32 heal, SpellInfo const* spellInfo, SpellSchoolMask schoolMask)
|
||||
: _healer(healer), _target(target), _heal(heal), _effectiveHeal(0), _absorb(0), _spellInfo(spellInfo), _schoolMask(schoolMask), _hitMask(0)
|
||||
: _healer(healer), _target(target), _heal(heal), _originalHeal(heal), _effectiveHeal(0), _absorb(0), _spellInfo(spellInfo), _schoolMask(schoolMask), _hitMask(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -279,8 +279,8 @@ SpellSchoolMask ProcEventInfo::GetSchoolMask() const
|
||||
}
|
||||
|
||||
SpellNonMeleeDamage::SpellNonMeleeDamage(Unit* _attacker, Unit* _target, uint32 _SpellID, uint32 _SpellXSpellVisualID, uint32 _schoolMask, ObjectGuid _castId)
|
||||
: target(_target), attacker(_attacker), castId(_castId), SpellID(_SpellID), SpellXSpellVisualID(_SpellXSpellVisualID), damage(0), schoolMask(_schoolMask),
|
||||
absorb(0), resist(0), periodicLog(false), blocked(0), HitInfo(0), cleanDamage(0), fullBlock(false), preHitHealth(_target->GetHealth())
|
||||
: target(_target), attacker(_attacker), castId(_castId), SpellID(_SpellID), SpellXSpellVisualID(_SpellXSpellVisualID), damage(0), originalDamage(0),
|
||||
schoolMask(_schoolMask), absorb(0), resist(0), periodicLog(false), blocked(0), HitInfo(0), cleanDamage(0), fullBlock(false), preHitHealth(_target->GetHealth())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ Unit::Unit(bool isWorldObject) :
|
||||
m_objectType |= TYPEMASK_UNIT;
|
||||
m_objectTypeId = TYPEID_UNIT;
|
||||
|
||||
m_updateFlag = UPDATEFLAG_LIVING;
|
||||
m_updateFlag.MovementUpdate = true;
|
||||
|
||||
for (uint32 i = 0; i < MAX_ATTACK; ++i)
|
||||
{
|
||||
@@ -1181,6 +1181,7 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 dama
|
||||
damage = 0;
|
||||
|
||||
damageInfo->damage = damage;
|
||||
damageInfo->originalDamage = damage;
|
||||
DamageInfo dmgInfo(*damageInfo, SPELL_DIRECT_DAMAGE, BASE_ATTACK, PROC_HIT_NONE);
|
||||
CalcAbsorbResist(dmgInfo);
|
||||
damageInfo->absorb = dmgInfo.GetAbsorb();
|
||||
@@ -1227,6 +1228,7 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam
|
||||
damageInfo->damageSchoolMask = GetMeleeDamageSchoolMask();
|
||||
damageInfo->attackType = attackType;
|
||||
damageInfo->damage = 0;
|
||||
damageInfo->originalDamage = 0;
|
||||
damageInfo->cleanDamage = 0;
|
||||
damageInfo->absorb = 0;
|
||||
damageInfo->resist = 0;
|
||||
@@ -1295,17 +1297,20 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam
|
||||
case MELEE_HIT_EVADE:
|
||||
damageInfo->HitInfo |= HITINFO_MISS | HITINFO_SWINGNOHITSOUND;
|
||||
damageInfo->TargetState = VICTIMSTATE_EVADES;
|
||||
damageInfo->originalDamage = damageInfo->damage;
|
||||
damageInfo->damage = 0;
|
||||
damageInfo->cleanDamage = 0;
|
||||
return;
|
||||
case MELEE_HIT_MISS:
|
||||
damageInfo->HitInfo |= HITINFO_MISS;
|
||||
damageInfo->TargetState = VICTIMSTATE_INTACT;
|
||||
damageInfo->originalDamage = damageInfo->damage;
|
||||
damageInfo->damage = 0;
|
||||
damageInfo->cleanDamage = 0;
|
||||
break;
|
||||
case MELEE_HIT_NORMAL:
|
||||
damageInfo->TargetState = VICTIMSTATE_HIT;
|
||||
damageInfo->originalDamage = damageInfo->damage;
|
||||
break;
|
||||
case MELEE_HIT_CRIT:
|
||||
{
|
||||
@@ -1320,21 +1325,26 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam
|
||||
|
||||
if (mod != 0)
|
||||
AddPct(damageInfo->damage, mod);
|
||||
|
||||
damageInfo->originalDamage = damageInfo->damage;
|
||||
break;
|
||||
}
|
||||
case MELEE_HIT_PARRY:
|
||||
damageInfo->TargetState = VICTIMSTATE_PARRY;
|
||||
damageInfo->originalDamage = damageInfo->damage;
|
||||
damageInfo->cleanDamage += damageInfo->damage;
|
||||
damageInfo->damage = 0;
|
||||
break;
|
||||
case MELEE_HIT_DODGE:
|
||||
damageInfo->TargetState = VICTIMSTATE_DODGE;
|
||||
damageInfo->originalDamage = damageInfo->damage;
|
||||
damageInfo->cleanDamage += damageInfo->damage;
|
||||
damageInfo->damage = 0;
|
||||
break;
|
||||
case MELEE_HIT_BLOCK:
|
||||
damageInfo->TargetState = VICTIMSTATE_HIT;
|
||||
damageInfo->HitInfo |= HITINFO_BLOCK;
|
||||
damageInfo->originalDamage = damageInfo->damage;
|
||||
// 30% damage blocked, double blocked amount if block is critical
|
||||
damageInfo->blocked_amount = CalculatePct(damageInfo->damage, damageInfo->target->isBlockCritical() ? damageInfo->target->GetBlockPercent() * 2 : damageInfo->target->GetBlockPercent());
|
||||
damageInfo->damage -= damageInfo->blocked_amount;
|
||||
@@ -1344,6 +1354,7 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam
|
||||
{
|
||||
damageInfo->HitInfo |= HITINFO_GLANCING;
|
||||
damageInfo->TargetState = VICTIMSTATE_HIT;
|
||||
damageInfo->originalDamage = damageInfo->damage;
|
||||
int32 leveldif = int32(victim->getLevel()) - int32(getLevel());
|
||||
if (leveldif > 3)
|
||||
leveldif = 3;
|
||||
@@ -1358,6 +1369,7 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam
|
||||
damageInfo->TargetState = VICTIMSTATE_HIT;
|
||||
// 150% normal damage
|
||||
damageInfo->damage += (damageInfo->damage / 2);
|
||||
damageInfo->originalDamage = damageInfo->damage;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -1372,6 +1384,7 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam
|
||||
resilienceReduction = damageInfo->damage - resilienceReduction;
|
||||
damageInfo->damage -= resilienceReduction;
|
||||
damageInfo->cleanDamage += resilienceReduction;
|
||||
damageInfo->originalDamage -= resilienceReduction;
|
||||
|
||||
// Calculate absorb resist
|
||||
if (int32(damageInfo->damage) > 0)
|
||||
@@ -1514,7 +1527,6 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
|
||||
DamageInfo damageInfo(this, victim, damage, spellInfo, spellInfo->GetSchoolMask(), SPELL_DIRECT_DAMAGE, BASE_ATTACK);
|
||||
victim->CalcAbsorbResist(damageInfo);
|
||||
damage = damageInfo.GetDamage();
|
||||
// No Unit::CalcAbsorbResist here - opcode doesn't send that data - this damage is probably not affected by that
|
||||
victim->DealDamageMods(this, damage, nullptr);
|
||||
|
||||
WorldPackets::CombatLog::SpellDamageShield damageShield;
|
||||
@@ -1522,6 +1534,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
|
||||
damageShield.Defender = GetGUID();
|
||||
damageShield.SpellID = spellInfo->Id;
|
||||
damageShield.TotalDamage = damage;
|
||||
damageShield.OriginalDamage = damageInfo.GetOriginalDamage();
|
||||
damageShield.OverKill = std::max(int32(damage) - int32(GetHealth()), 0);
|
||||
damageShield.SchoolMask = spellInfo->SchoolMask;
|
||||
damageShield.LogAbsorbed = damageInfo.GetAbsorb();
|
||||
@@ -1881,6 +1894,7 @@ void Unit::CalcAbsorbResist(DamageInfo& damageInfo)
|
||||
CleanDamage cleanDamage = CleanDamage(splitDamage, 0, BASE_ATTACK, MELEE_HIT_NORMAL);
|
||||
DealDamage(caster, splitDamage, &cleanDamage, DIRECT_DAMAGE, damageInfo.GetSchoolMask(), (*itr)->GetSpellInfo(), false);
|
||||
log.damage = splitDamage;
|
||||
log.originalDamage = splitDamage;
|
||||
log.absorb = split_absorb;
|
||||
SendSpellNonMeleeDamageLog(&log);
|
||||
|
||||
@@ -2016,6 +2030,7 @@ void Unit::FakeAttackerStateUpdate(Unit* victim, WeaponAttackType attType /*= BA
|
||||
damageInfo.damageSchoolMask = GetMeleeDamageSchoolMask();
|
||||
damageInfo.attackType = attType;
|
||||
damageInfo.damage = 0;
|
||||
damageInfo.originalDamage = 0;
|
||||
damageInfo.cleanDamage = 0;
|
||||
damageInfo.absorb = 0;
|
||||
damageInfo.resist = 0;
|
||||
@@ -4985,6 +5000,7 @@ void Unit::SendSpellNonMeleeDamageLog(SpellNonMeleeDamage const* log)
|
||||
packet.CastID = log->castId;
|
||||
packet.SpellID = log->SpellID;
|
||||
packet.Damage = log->damage;
|
||||
packet.OriginalDamage = log->originalDamage;
|
||||
if (log->damage > log->preHitHealth)
|
||||
packet.Overkill = log->damage - log->preHitHealth;
|
||||
else
|
||||
@@ -4997,9 +5013,9 @@ void Unit::SendSpellNonMeleeDamageLog(SpellNonMeleeDamage const* log)
|
||||
packet.Periodic = log->periodicLog;
|
||||
packet.Flags = log->HitInfo;
|
||||
|
||||
WorldPackets::Spells::SandboxScalingData sandboxScalingData;
|
||||
if (sandboxScalingData.GenerateDataForUnits(log->attacker, log->target))
|
||||
packet.SandboxScaling = sandboxScalingData;
|
||||
WorldPackets::Spells::ContentTuningParams contentTuningParams;
|
||||
if (contentTuningParams.GenerateDataForUnits(log->attacker, log->target))
|
||||
packet.ContentTuning = contentTuningParams;
|
||||
|
||||
SendCombatLogMessage(&packet);
|
||||
}
|
||||
@@ -5025,10 +5041,10 @@ void Unit::SendPeriodicAuraLog(SpellPeriodicAuraLogInfo* info)
|
||||
data.SpellID = aura->GetId();
|
||||
data.LogData.Initialize(this);
|
||||
|
||||
/// @todo: should send more logs in one packet when multistrike
|
||||
WorldPackets::CombatLog::SpellPeriodicAuraLog::SpellLogEffect spellLogEffect;
|
||||
spellLogEffect.Effect = aura->GetAuraType();
|
||||
spellLogEffect.Amount = info->damage;
|
||||
spellLogEffect.OriginalDamage = info->originalDamage;
|
||||
spellLogEffect.OverHealOrKill = info->overDamage;
|
||||
spellLogEffect.SchoolMaskOrPower = aura->GetSpellInfo()->GetSchoolMask();
|
||||
spellLogEffect.AbsorbedOrAmplitude = info->absorb;
|
||||
@@ -5036,10 +5052,10 @@ void Unit::SendPeriodicAuraLog(SpellPeriodicAuraLogInfo* info)
|
||||
spellLogEffect.Crit = info->critical;
|
||||
/// @todo: implement debug info
|
||||
|
||||
WorldPackets::Spells::SandboxScalingData sandboxScalingData;
|
||||
WorldPackets::Spells::ContentTuningParams contentTuningParams;
|
||||
if (Unit* caster = ObjectAccessor::GetUnit(*this, aura->GetCasterGUID()))
|
||||
if (sandboxScalingData.GenerateDataForUnits(caster, this))
|
||||
spellLogEffect.SandboxScaling = sandboxScalingData;
|
||||
if (contentTuningParams.GenerateDataForUnits(caster, this))
|
||||
spellLogEffect.ContentTuning = contentTuningParams;
|
||||
|
||||
data.Effects.push_back(spellLogEffect);
|
||||
|
||||
@@ -5081,6 +5097,7 @@ void Unit::SendAttackStateUpdate(CalcDamageInfo* damageInfo)
|
||||
packet.AttackerGUID = damageInfo->attacker->GetGUID();
|
||||
packet.VictimGUID = damageInfo->target->GetGUID();
|
||||
packet.Damage = damageInfo->damage;
|
||||
packet.OriginalDamage = damageInfo->originalDamage;
|
||||
int32 overkill = damageInfo->damage - damageInfo->target->GetHealth();
|
||||
packet.OverDamage = (overkill < 0 ? -1 : overkill);
|
||||
|
||||
@@ -5096,9 +5113,9 @@ void Unit::SendAttackStateUpdate(CalcDamageInfo* damageInfo)
|
||||
|
||||
packet.LogData.Initialize(damageInfo->attacker);
|
||||
|
||||
WorldPackets::Spells::SandboxScalingData sandboxScalingData;
|
||||
if (sandboxScalingData.GenerateDataForUnits(damageInfo->attacker, damageInfo->target))
|
||||
packet.SandboxScaling = sandboxScalingData;
|
||||
WorldPackets::Spells::ContentTuningParams contentTuningParams;
|
||||
if (contentTuningParams.GenerateDataForUnits(damageInfo->attacker, damageInfo->target))
|
||||
packet.ContentTuning = contentTuningParams;
|
||||
|
||||
SendCombatLogMessage(&packet);
|
||||
}
|
||||
@@ -5110,6 +5127,7 @@ void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit* target, uint8 /*SwingType
|
||||
dmgInfo.attacker = this;
|
||||
dmgInfo.target = target;
|
||||
dmgInfo.damage = Damage - AbsorbDamage - Resist - BlockedAmount;
|
||||
dmgInfo.originalDamage = Damage;
|
||||
dmgInfo.damageSchoolMask = damageSchoolMask;
|
||||
dmgInfo.absorb = AbsorbDamage;
|
||||
dmgInfo.resist = Resist;
|
||||
@@ -6334,32 +6352,12 @@ void Unit::SendHealSpellLog(HealInfo& healInfo, bool critical /*= false*/)
|
||||
|
||||
spellHealLog.TargetGUID = healInfo.GetTarget()->GetGUID();
|
||||
spellHealLog.CasterGUID = healInfo.GetHealer()->GetGUID();
|
||||
|
||||
spellHealLog.SpellID = healInfo.GetSpellInfo()->Id;
|
||||
spellHealLog.Health = healInfo.GetHeal();
|
||||
spellHealLog.OriginalHeal = healInfo.GetOriginalHeal();
|
||||
spellHealLog.OverHeal = int32(healInfo.GetHeal()) - healInfo.GetEffectiveHeal();
|
||||
spellHealLog.Absorbed = healInfo.GetAbsorb();
|
||||
|
||||
spellHealLog.Crit = critical;
|
||||
|
||||
/// @todo: 6.x Has to be implemented
|
||||
/*
|
||||
packet.ReadBit("Multistrike");
|
||||
|
||||
var hasCritRollMade = packet.ReadBit("HasCritRollMade");
|
||||
var hasCritRollNeeded = packet.ReadBit("HasCritRollNeeded");
|
||||
var hasLogData = packet.ReadBit("HasLogData");
|
||||
|
||||
if (hasCritRollMade)
|
||||
packet.ReadSingle("CritRollMade");
|
||||
|
||||
if (hasCritRollNeeded)
|
||||
packet.ReadSingle("CritRollNeeded");
|
||||
|
||||
if (hasLogData)
|
||||
SpellParsers.ReadSpellCastLogData(packet);
|
||||
*/
|
||||
|
||||
spellHealLog.LogData.Initialize(healInfo.GetTarget());
|
||||
SendCombatLogMessage(&spellHealLog);
|
||||
}
|
||||
@@ -11665,7 +11663,7 @@ bool Unit::CreateVehicleKit(uint32 id, uint32 creatureEntry, bool loading /*= fa
|
||||
return false;
|
||||
|
||||
m_vehicleKit = new Vehicle(this, vehInfo, creatureEntry);
|
||||
m_updateFlag |= UPDATEFLAG_VEHICLE;
|
||||
m_updateFlag.Vehicle = true;
|
||||
m_unitTypeMask |= UNIT_MASK_VEHICLE;
|
||||
|
||||
if (!loading)
|
||||
@@ -11687,7 +11685,7 @@ void Unit::RemoveVehicleKit(bool onRemoveFromWorld /*= false*/)
|
||||
|
||||
m_vehicleKit = NULL;
|
||||
|
||||
m_updateFlag &= ~UPDATEFLAG_VEHICLE;
|
||||
m_updateFlag.Vehicle = false;
|
||||
m_unitTypeMask &= ~UNIT_MASK_VEHICLE;
|
||||
RemoveFlag64(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK | UNIT_NPC_FLAG_PLAYER_VEHICLE);
|
||||
}
|
||||
|
||||
@@ -576,6 +576,7 @@ class TC_GAME_API DamageInfo
|
||||
Unit* const m_attacker;
|
||||
Unit* const m_victim;
|
||||
uint32 m_damage;
|
||||
uint32 const m_originalDamage;
|
||||
SpellInfo const* const m_spellInfo;
|
||||
SpellSchoolMask const m_schoolMask;
|
||||
DamageEffectType const m_damageType;
|
||||
@@ -601,6 +602,7 @@ class TC_GAME_API DamageInfo
|
||||
DamageEffectType GetDamageType() const { return m_damageType; }
|
||||
WeaponAttackType GetAttackType() const { return m_attackType; }
|
||||
uint32 GetDamage() const { return m_damage; }
|
||||
uint32 GetOriginalDamage() const { return m_originalDamage; }
|
||||
uint32 GetAbsorb() const { return m_absorb; }
|
||||
uint32 GetResist() const { return m_resist; }
|
||||
uint32 GetBlock() const { return m_block; }
|
||||
@@ -614,6 +616,7 @@ class TC_GAME_API HealInfo
|
||||
Unit* const _healer;
|
||||
Unit* const _target;
|
||||
uint32 _heal;
|
||||
uint32 const _originalHeal;
|
||||
uint32 _effectiveHeal;
|
||||
uint32 _absorb;
|
||||
SpellInfo const* const _spellInfo;
|
||||
@@ -629,6 +632,7 @@ class TC_GAME_API HealInfo
|
||||
Unit* GetHealer() const { return _healer; }
|
||||
Unit* GetTarget() const { return _target; }
|
||||
uint32 GetHeal() const { return _heal; }
|
||||
uint32 GetOriginalHeal() const { return _originalHeal; }
|
||||
uint32 GetEffectiveHeal() const { return _effectiveHeal; }
|
||||
uint32 GetAbsorb() const { return _absorb; }
|
||||
SpellInfo const* GetSpellInfo() const { return _spellInfo; };
|
||||
@@ -682,6 +686,7 @@ struct CalcDamageInfo
|
||||
Unit *target; // Target for damage
|
||||
uint32 damageSchoolMask;
|
||||
uint32 damage;
|
||||
uint32 originalDamage;
|
||||
uint32 absorb;
|
||||
uint32 resist;
|
||||
uint32 blocked_amount;
|
||||
@@ -706,6 +711,7 @@ struct TC_GAME_API SpellNonMeleeDamage
|
||||
uint32 SpellID;
|
||||
uint32 SpellXSpellVisualID;
|
||||
uint32 damage;
|
||||
uint32 originalDamage;
|
||||
uint32 schoolMask;
|
||||
uint32 absorb;
|
||||
uint32 resist;
|
||||
@@ -720,11 +726,12 @@ struct TC_GAME_API SpellNonMeleeDamage
|
||||
|
||||
struct SpellPeriodicAuraLogInfo
|
||||
{
|
||||
SpellPeriodicAuraLogInfo(AuraEffect const* _auraEff, uint32 _damage, uint32 _overDamage, uint32 _absorb, uint32 _resist, float _multiplier, bool _critical)
|
||||
: auraEff(_auraEff), damage(_damage), overDamage(_overDamage), absorb(_absorb), resist(_resist), multiplier(_multiplier), critical(_critical){ }
|
||||
SpellPeriodicAuraLogInfo(AuraEffect const* _auraEff, uint32 _damage, uint32 _originalDamage, uint32 _overDamage, uint32 _absorb, uint32 _resist, float _multiplier, bool _critical)
|
||||
: auraEff(_auraEff), damage(_damage), originalDamage(_originalDamage), overDamage(_overDamage), absorb(_absorb), resist(_resist), multiplier(_multiplier), critical(_critical){ }
|
||||
|
||||
AuraEffect const* auraEff;
|
||||
uint32 damage;
|
||||
uint32 originalDamage;
|
||||
uint32 overDamage; // overkill/overheal
|
||||
uint32 absorb;
|
||||
uint32 resist;
|
||||
|
||||
@@ -147,8 +147,8 @@ void AreaTriggerDataStore::LoadAreaTriggerTemplates()
|
||||
while (templates->NextRow());
|
||||
}
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8
|
||||
if (QueryResult areatriggerSpellMiscs = WorldDatabase.Query("SELECT SpellMiscId, AreaTriggerId, MoveCurveId, ScaleCurveId, MorphCurveId, FacingCurveId, DecalPropertiesId, TimeToTarget, TimeToTargetScale FROM `spell_areatrigger`"))
|
||||
// 0 1 2 3 4 5 6 7 8 9 10
|
||||
if (QueryResult areatriggerSpellMiscs = WorldDatabase.Query("SELECT SpellMiscId, AreaTriggerId, MoveCurveId, ScaleCurveId, MorphCurveId, FacingCurveId, AnimId, AnimKitId, DecalPropertiesId, TimeToTarget, TimeToTargetScale FROM `spell_areatrigger`"))
|
||||
{
|
||||
do
|
||||
{
|
||||
@@ -182,10 +182,13 @@ void AreaTriggerDataStore::LoadAreaTriggerTemplates()
|
||||
|
||||
#undef VALIDATE_AND_SET_CURVE
|
||||
|
||||
miscTemplate.DecalPropertiesId = areatriggerSpellMiscFields[6].GetUInt32();
|
||||
miscTemplate.AnimId = areatriggerSpellMiscFields[6].GetInt32();
|
||||
miscTemplate.AnimKitId = areatriggerSpellMiscFields[7].GetInt32();
|
||||
|
||||
miscTemplate.TimeToTarget = areatriggerSpellMiscFields[7].GetUInt32();
|
||||
miscTemplate.TimeToTargetScale = areatriggerSpellMiscFields[8].GetUInt32();
|
||||
miscTemplate.DecalPropertiesId = areatriggerSpellMiscFields[8].GetUInt32();
|
||||
|
||||
miscTemplate.TimeToTarget = areatriggerSpellMiscFields[9].GetUInt32();
|
||||
miscTemplate.TimeToTargetScale = areatriggerSpellMiscFields[10].GetUInt32();
|
||||
|
||||
miscTemplate.SplinePoints = std::move(splinesBySpellMisc[miscTemplate.MiscId]);
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ void ConversationDataStore::LoadConversationTemplates()
|
||||
TC_LOG_INFO("server.loading", ">> Loaded 0 Conversation actors. DB table `conversation_actors` is empty.");
|
||||
}
|
||||
|
||||
if (QueryResult templates = WorldDatabase.Query("SELECT Id, FirstLineId, LastLineEndTime, ScriptName FROM conversation_template"))
|
||||
if (QueryResult templates = WorldDatabase.Query("SELECT Id, FirstLineId, LastLineEndTime, TextureKitId, ScriptName FROM conversation_template"))
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -162,7 +162,8 @@ void ConversationDataStore::LoadConversationTemplates()
|
||||
conversationTemplate.Id = fields[0].GetUInt32();
|
||||
conversationTemplate.FirstLineId = fields[1].GetUInt32();
|
||||
conversationTemplate.LastLineEndTime = fields[2].GetUInt32();
|
||||
conversationTemplate.ScriptId = sObjectMgr->GetScriptId(fields[3].GetString());
|
||||
conversationTemplate.TextureKitId = fields[3].GetUInt32();
|
||||
conversationTemplate.ScriptId = sObjectMgr->GetScriptId(fields[4].GetString());
|
||||
|
||||
conversationTemplate.Actors = std::move(actorsByConversation[conversationTemplate.Id]);
|
||||
conversationTemplate.ActorGuids = std::move(actorGuidsByConversation[conversationTemplate.Id]);
|
||||
@@ -184,7 +185,7 @@ void ConversationDataStore::LoadConversationTemplates()
|
||||
currentConversationLine = sConversationLineStore.AssertEntry(currentConversationLine->NextConversationLineID);
|
||||
}
|
||||
|
||||
_conversationTemplateStore[conversationTemplate.Id] = conversationTemplate;
|
||||
_conversationTemplateStore[conversationTemplate.Id] = std::move(conversationTemplate);
|
||||
}
|
||||
while (templates->NextRow());
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ enum ConversationLineFlags
|
||||
CONVERSATION_LINE_FLAG_NOTIFY_STARTED = 0x1 // Client will send CMSG_CONVERSATION_LINE_STARTED when it runs this line
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct ConversationActorTemplate
|
||||
{
|
||||
uint32 Id;
|
||||
@@ -36,6 +35,7 @@ struct ConversationActorTemplate
|
||||
uint32 CreatureModelId;
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct ConversationLineTemplate
|
||||
{
|
||||
uint32 Id; // Link to ConversationLine.db2
|
||||
@@ -52,6 +52,7 @@ struct ConversationTemplate
|
||||
uint32 Id;
|
||||
uint32 FirstLineId; // Link to ConversationLine.db2
|
||||
uint32 LastLineEndTime; // Time in ms after conversation creation the last line fades out
|
||||
uint32 TextureKitId; // Background texture
|
||||
|
||||
std::vector<ConversationActorTemplate const*> Actors;
|
||||
std::vector<ObjectGuid::LowType> ActorGuids;
|
||||
|
||||
@@ -171,30 +171,37 @@ ExtendedPlayerName ExtractExtendedPlayerName(std::string const& name)
|
||||
|
||||
LanguageDesc lang_description[LANGUAGES_COUNT] =
|
||||
{
|
||||
{ LANG_ADDON, 0, 0 },
|
||||
{ LANG_UNIVERSAL, 0, 0 },
|
||||
{ LANG_ORCISH, 669, SKILL_LANG_ORCISH },
|
||||
{ LANG_DARNASSIAN, 671, SKILL_LANG_DARNASSIAN },
|
||||
{ LANG_TAURAHE, 670, SKILL_LANG_TAURAHE },
|
||||
{ LANG_DWARVISH, 672, SKILL_LANG_DWARVEN },
|
||||
{ LANG_COMMON, 668, SKILL_LANG_COMMON },
|
||||
{ LANG_DEMONIC, 815, SKILL_LANG_DEMON_TONGUE },
|
||||
{ LANG_TITAN, 816, SKILL_LANG_TITAN },
|
||||
{ LANG_THALASSIAN, 813, SKILL_LANG_THALASSIAN },
|
||||
{ LANG_DRACONIC, 814, SKILL_LANG_DRACONIC },
|
||||
{ LANG_KALIMAG, 817, SKILL_LANG_OLD_TONGUE },
|
||||
{ LANG_GNOMISH, 7340, SKILL_LANG_GNOMISH },
|
||||
{ LANG_TROLL, 7341, SKILL_LANG_TROLL },
|
||||
{ LANG_GUTTERSPEAK, 17737, SKILL_LANG_FORSAKEN },
|
||||
{ LANG_DRAENEI, 29932, SKILL_LANG_DRAENEI },
|
||||
{ LANG_ZOMBIE, 0, 0 },
|
||||
{ LANG_GNOMISH_BINARY, 0, 0 },
|
||||
{ LANG_GOBLIN_BINARY, 0, 0 },
|
||||
{ LANG_WORGEN, 69270, SKILL_LANG_GILNEAN },
|
||||
{ LANG_GOBLIN, 69269, SKILL_LANG_GOBLIN },
|
||||
{ LANG_PANDAREN_NEUTRAL, 108127, SKILL_LANG_PANDAREN_NEUTRAL },
|
||||
{ LANG_PANDAREN_ALLIANCE, 108130, SKILL_LANG_PANDAREN_ALLIANCE },
|
||||
{ LANG_PANDAREN_HORDE, 108131, SKILL_LANG_PANDAREN_HORDE }
|
||||
{ LANG_ADDON, 0, 0 },
|
||||
{ LANG_ADDON_LOGGED, 0, 0 },
|
||||
{ LANG_UNIVERSAL, 0, 0 },
|
||||
{ LANG_ORCISH, 669, SKILL_LANGUAGE_ORCISH },
|
||||
{ LANG_DARNASSIAN, 671, SKILL_LANGUAGE_DARNASSIAN },
|
||||
{ LANG_TAURAHE, 670, SKILL_LANGUAGE_TAURAHE },
|
||||
{ LANG_DWARVISH, 672, SKILL_LANGUAGE_DWARVEN },
|
||||
{ LANG_COMMON, 668, SKILL_LANGUAGE_COMMON },
|
||||
{ LANG_DEMONIC, 815, SKILL_LANGUAGE_DEMON_TONGUE },
|
||||
{ LANG_TITAN, 816, SKILL_LANGUAGE_TITAN },
|
||||
{ LANG_THALASSIAN, 813, SKILL_LANGUAGE_THALASSIAN },
|
||||
{ LANG_DRACONIC, 814, SKILL_LANGUAGE_DRACONIC },
|
||||
{ LANG_KALIMAG, 265462, SKILL_LANGUAGE_OLD_TONGUE },
|
||||
{ LANG_GNOMISH, 7340, SKILL_LANGUAGE_GNOMISH },
|
||||
{ LANG_TROLL, 7341, SKILL_LANGUAGE_TROLL },
|
||||
{ LANG_GUTTERSPEAK, 17737, SKILL_LANGUAGE_FORSAKEN },
|
||||
{ LANG_DRAENEI, 29932, SKILL_LANGUAGE_DRAENEI },
|
||||
{ LANG_ZOMBIE, 265467, 0 },
|
||||
{ LANG_GNOMISH_BINARY, 265460, 0 },
|
||||
{ LANG_GOBLIN_BINARY, 265461, 0 },
|
||||
{ LANG_WORGEN, 69270, SKILL_LANGUAGE_GILNEAN },
|
||||
{ LANG_GOBLIN, 69269, SKILL_LANGUAGE_GOBLIN },
|
||||
{ LANG_PANDAREN_NEUTRAL, 108127, SKILL_LANGUAGE_PANDAREN_NEUTRAL },
|
||||
{ LANG_PANDAREN_ALLIANCE, 108130, 0 },
|
||||
{ LANG_PANDAREN_HORDE, 108131, 0 },
|
||||
{ LANG_SPRITE, 265466, 0 },
|
||||
{ LANG_SHATH_YAR, 265465, 0 },
|
||||
{ LANG_NERGLISH, 265464, 0 },
|
||||
{ LANG_MOONKIN, 265463, 0 },
|
||||
{ LANG_SHALASSIAN, 262439, SKILL_LANGUAGE_SHALASSIAN },
|
||||
{ LANG_THALASSIAN_2, 262454, SKILL_LANGUAGE_THALASSIAN_2 }
|
||||
};
|
||||
|
||||
LanguageDesc const* GetLanguageDescByID(uint32 lang)
|
||||
@@ -3924,35 +3931,35 @@ void ObjectMgr::LoadQuests()
|
||||
mExclusiveQuestGroups.clear();
|
||||
|
||||
QueryResult result = WorldDatabase.Query("SELECT "
|
||||
//0 1 2 3 4 5 6 7 8 9 10 11
|
||||
"ID, QuestType, QuestLevel, MaxScalingLevel, QuestPackageID, MinLevel, QuestSortID, QuestInfoID, SuggestedGroupNum, RewardNextQuest, RewardXPDifficulty, RewardXPMultiplier, "
|
||||
//12 13 14 15 16 17 18 19 20 21 22
|
||||
//0 1 2 3 4 5 6 7 8 9 10 11 12
|
||||
"ID, QuestType, QuestLevel, ScalingFactionGroup, MaxScalingLevel, QuestPackageID, MinLevel, QuestSortID, QuestInfoID, SuggestedGroupNum, RewardNextQuest, RewardXPDifficulty, RewardXPMultiplier, "
|
||||
//13 14 15 16 17 18 19 20 21 22 23
|
||||
"RewardMoney, RewardMoneyDifficulty, RewardMoneyMultiplier, RewardBonusMoney, RewardDisplaySpell1, RewardDisplaySpell2, RewardDisplaySpell3, RewardSpell, RewardHonor, RewardKillHonor, StartItem, "
|
||||
//23 24 25 26 27
|
||||
"RewardArtifactXPDifficulty, RewardArtifactXPMultiplier, RewardArtifactCategoryID, Flags, FlagsEx, "
|
||||
//28 29 30 31 32 33 34 35
|
||||
//24 25 26 27 28 29
|
||||
"RewardArtifactXPDifficulty, RewardArtifactXPMultiplier, RewardArtifactCategoryID, Flags, FlagsEx, FlagsEx2, "
|
||||
//30 31 32 33 34 35 36 37
|
||||
"RewardItem1, RewardAmount1, ItemDrop1, ItemDropQuantity1, RewardItem2, RewardAmount2, ItemDrop2, ItemDropQuantity2, "
|
||||
//36 37 38 39 40 41 42 43
|
||||
//38 39 40 41 42 43 44 45
|
||||
"RewardItem3, RewardAmount3, ItemDrop3, ItemDropQuantity3, RewardItem4, RewardAmount4, ItemDrop4, ItemDropQuantity4, "
|
||||
//44 45 46 47 48 49
|
||||
//46 47 48 49 50 51
|
||||
"RewardChoiceItemID1, RewardChoiceItemQuantity1, RewardChoiceItemDisplayID1, RewardChoiceItemID2, RewardChoiceItemQuantity2, RewardChoiceItemDisplayID2, "
|
||||
//50 51 52 53 54 55
|
||||
//52 53 54 55 56 57
|
||||
"RewardChoiceItemID3, RewardChoiceItemQuantity3, RewardChoiceItemDisplayID3, RewardChoiceItemID4, RewardChoiceItemQuantity4, RewardChoiceItemDisplayID4, "
|
||||
//56 57 58 59 60 61
|
||||
//58 59 60 61 62 63
|
||||
"RewardChoiceItemID5, RewardChoiceItemQuantity5, RewardChoiceItemDisplayID5, RewardChoiceItemID6, RewardChoiceItemQuantity6, RewardChoiceItemDisplayID6, "
|
||||
//62 63 64 65 66 67 68 69 70 71
|
||||
"POIContinent, POIx, POIy, POIPriority, RewardTitle, RewardArenaPoints, RewardSkillLineID, RewardNumSkillUps, PortraitGiver, PortraitTurnIn, "
|
||||
//72 73 74 75 76 77 78 79
|
||||
//64 65 66 67 68 69 70 71 72 73 74
|
||||
"POIContinent, POIx, POIy, POIPriority, RewardTitle, RewardArenaPoints, RewardSkillLineID, RewardNumSkillUps, PortraitGiver, PortraitGiverMount, PortraitTurnIn, "
|
||||
//75 76 77 78 79 80 81 82
|
||||
"RewardFactionID1, RewardFactionValue1, RewardFactionOverride1, RewardFactionCapIn1, RewardFactionID2, RewardFactionValue2, RewardFactionOverride2, RewardFactionCapIn2, "
|
||||
//80 81 82 83 84 85 86 87
|
||||
//83 84 85 86 87 88 89 90
|
||||
"RewardFactionID3, RewardFactionValue3, RewardFactionOverride3, RewardFactionCapIn3, RewardFactionID4, RewardFactionValue4, RewardFactionOverride4, RewardFactionCapIn4, "
|
||||
//88 89 90 91 92
|
||||
//91 92 93 94 95
|
||||
"RewardFactionID5, RewardFactionValue5, RewardFactionOverride5, RewardFactionCapIn5, RewardFactionFlags, "
|
||||
//93 94 95 96 97 98 99 100
|
||||
//96 97 98 99 100 101 102 103
|
||||
"RewardCurrencyID1, RewardCurrencyQty1, RewardCurrencyID2, RewardCurrencyQty2, RewardCurrencyID3, RewardCurrencyQty3, RewardCurrencyID4, RewardCurrencyQty4, "
|
||||
//101 102 103 104 105 106 107
|
||||
"AcceptedSoundKitID, CompleteSoundKitID, AreaGroupID, TimeAllowed, AllowableRaces, QuestRewardID, Expansion, "
|
||||
//108 109 110 111 112 113 114 115 116
|
||||
//104 105 106 107 108 109 110
|
||||
"AcceptedSoundKitID, CompleteSoundKitID, AreaGroupID, TimeAllowed, AllowableRaces, TreasurePickerID, Expansion, "
|
||||
//111 112 113 114 115 116 117 118 119
|
||||
"LogTitle, LogDescription, QuestDescription, AreaDescription, PortraitGiverText, PortraitGiverName, PortraitTurnInText, PortraitTurnInName, QuestCompletionLog"
|
||||
" FROM quest_template");
|
||||
if (!result)
|
||||
@@ -7027,8 +7034,8 @@ void ObjectMgr::LoadGameObjectTemplate()
|
||||
"Data0, Data1, Data2, Data3, Data4, Data5, Data6, Data7, Data8, Data9, Data10, Data11, Data12, "
|
||||
// 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
||||
"Data13, Data14, Data15, Data16, Data17, Data18, Data19, Data20, Data21, Data22, Data23, Data24, Data25, Data26, Data27, Data28, "
|
||||
// 37 38 39 40 41 42 43
|
||||
"Data29, Data30, Data31, Data32, RequiredLevel, AIName, ScriptName "
|
||||
// 37 38 39 40 41 42 43 44
|
||||
"Data29, Data30, Data31, Data32, Data33, RequiredLevel, AIName, ScriptName "
|
||||
"FROM gameobject_template");
|
||||
|
||||
if (!result)
|
||||
@@ -7058,9 +7065,9 @@ void ObjectMgr::LoadGameObjectTemplate()
|
||||
for (uint8 i = 0; i < MAX_GAMEOBJECT_DATA; ++i)
|
||||
got.raw.data[i] = fields[8 + i].GetUInt32();
|
||||
|
||||
got.RequiredLevel = fields[41].GetInt32();
|
||||
got.AIName = fields[42].GetString();
|
||||
got.ScriptId = GetScriptId(fields[43].GetString());
|
||||
got.RequiredLevel = fields[42].GetInt32();
|
||||
got.AIName = fields[43].GetString();
|
||||
got.ScriptId = GetScriptId(fields[44].GetString());
|
||||
|
||||
// Checks
|
||||
|
||||
@@ -7696,8 +7703,8 @@ void ObjectMgr::LoadQuestPOI()
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
||||
QueryResult result = WorldDatabase.Query("SELECT QuestID, BlobIndex, Idx1, ObjectiveIndex, QuestObjectiveID, QuestObjectID, MapID, WorldMapAreaId, Floor, Priority, Flags, WorldEffectID, PlayerConditionID, WoDUnk1, AlwaysAllowMergingBlobs FROM quest_poi order by QuestID, Idx1");
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13
|
||||
QueryResult result = WorldDatabase.Query("SELECT QuestID, BlobIndex, Idx1, ObjectiveIndex, QuestObjectiveID, QuestObjectID, MapID, UiMapID, Priority, Flags, WorldEffectID, PlayerConditionID, SpawnTrackingID, AlwaysAllowMergingBlobs FROM quest_poi order by QuestID, Idx1");
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_ERROR("server.loading", ">> Loaded 0 quest POI definitions. DB table `quest_poi` is empty.");
|
||||
@@ -7737,33 +7744,32 @@ void ObjectMgr::LoadQuestPOI()
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
int32 QuestID = fields[0].GetInt32();
|
||||
int32 BlobIndex = fields[1].GetInt32();
|
||||
int32 Idx1 = fields[2].GetInt32();
|
||||
int32 ObjectiveIndex = fields[3].GetInt32();
|
||||
int32 QuestObjectiveID = fields[4].GetInt32();
|
||||
int32 QuestObjectID = fields[5].GetInt32();
|
||||
int32 MapID = fields[6].GetInt32();
|
||||
int32 WorldMapAreaId = fields[7].GetInt32();
|
||||
int32 Floor = fields[8].GetInt32();
|
||||
int32 Priority = fields[9].GetInt32();
|
||||
int32 Flags = fields[10].GetInt32();
|
||||
int32 WorldEffectID = fields[11].GetInt32();
|
||||
int32 PlayerConditionID = fields[12].GetInt32();
|
||||
int32 WoDUnk1 = fields[13].GetInt32();
|
||||
bool AlwaysAllowMergingBlobs = fields[14].GetBool();
|
||||
int32 questID = fields[0].GetInt32();
|
||||
int32 blobIndex = fields[1].GetInt32();
|
||||
int32 idx1 = fields[2].GetInt32();
|
||||
int32 objectiveIndex = fields[3].GetInt32();
|
||||
int32 questObjectiveID = fields[4].GetInt32();
|
||||
int32 questObjectID = fields[5].GetInt32();
|
||||
int32 mapID = fields[6].GetInt32();
|
||||
int32 uiMapID = fields[7].GetInt32();
|
||||
int32 priority = fields[8].GetInt32();
|
||||
int32 flags = fields[9].GetInt32();
|
||||
int32 worldEffectID = fields[10].GetInt32();
|
||||
int32 playerConditionID = fields[11].GetInt32();
|
||||
int32 spawnTrackingID = fields[12].GetInt32();
|
||||
bool alwaysAllowMergingBlobs = fields[13].GetBool();
|
||||
|
||||
if (!sObjectMgr->GetQuestTemplate(QuestID))
|
||||
TC_LOG_ERROR("sql.sql", "`quest_poi` quest id (%u) Idx1 (%u) does not exist in `quest_template`", QuestID, Idx1);
|
||||
if (!sObjectMgr->GetQuestTemplate(questID))
|
||||
TC_LOG_ERROR("sql.sql", "`quest_poi` quest id (%u) Idx1 (%u) does not exist in `quest_template`", questID, idx1);
|
||||
|
||||
QuestPOI POI(BlobIndex, ObjectiveIndex, QuestObjectiveID, QuestObjectID, MapID, WorldMapAreaId, Floor, Priority, Flags, WorldEffectID, PlayerConditionID, WoDUnk1, AlwaysAllowMergingBlobs);
|
||||
if (QuestID < int32(POIs.size()) && Idx1 < int32(POIs[QuestID].size()))
|
||||
QuestPOI POI(blobIndex, objectiveIndex, questObjectiveID, questObjectID, mapID, uiMapID, priority, flags, worldEffectID, playerConditionID, spawnTrackingID, alwaysAllowMergingBlobs);
|
||||
if (questID < int32(POIs.size()) && idx1 < int32(POIs[questID].size()))
|
||||
{
|
||||
POI.points = POIs[QuestID][Idx1];
|
||||
_questPOIStore[QuestID].push_back(POI);
|
||||
POI.points = POIs[questID][idx1];
|
||||
_questPOIStore[questID].push_back(POI);
|
||||
}
|
||||
else
|
||||
TC_LOG_ERROR("sql.sql", "Table quest_poi references unknown quest points for quest %i POI id %i", QuestID, BlobIndex);
|
||||
TC_LOG_ERROR("sql.sql", "Table quest_poi references unknown quest points for quest %i POI id %i", questID, blobIndex);
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
@@ -10099,7 +10105,7 @@ void ObjectMgr::LoadPlayerChoices()
|
||||
uint32 oldMSTime = getMSTime();
|
||||
_playerChoices.clear();
|
||||
|
||||
QueryResult choices = WorldDatabase.Query("SELECT ChoiceId, UiTextureKitId, Question, HideWarboardHeader FROM playerchoice");
|
||||
QueryResult choices = WorldDatabase.Query("SELECT ChoiceId, UiTextureKitId, Question, HideWarboardHeader, KeepOpenAfterChoice FROM playerchoice");
|
||||
|
||||
if (!choices)
|
||||
{
|
||||
@@ -10124,10 +10130,11 @@ void ObjectMgr::LoadPlayerChoices()
|
||||
choice.UiTextureKitId = fields[1].GetInt32();
|
||||
choice.Question = fields[2].GetString();
|
||||
choice.HideWarboardHeader = fields[3].GetBool();
|
||||
choice.KeepOpenAfterChoice = fields[4].GetBool();
|
||||
|
||||
} while (choices->NextRow());
|
||||
|
||||
if (QueryResult responses = WorldDatabase.Query("SELECT ChoiceId, ResponseId, ChoiceArtFileId, Header, Answer, Description, Confirmation FROM playerchoice_response ORDER BY `Index` ASC"))
|
||||
if (QueryResult responses = WorldDatabase.Query("SELECT ChoiceId, ResponseId, ChoiceArtFileId, Flags, WidgetSetID, GroupID, Header, Answer, Description, Confirmation FROM playerchoice_response ORDER BY `Index` ASC"))
|
||||
{
|
||||
do
|
||||
{
|
||||
@@ -10148,10 +10155,13 @@ void ObjectMgr::LoadPlayerChoices()
|
||||
PlayerChoiceResponse& response = choice->Responses.back();
|
||||
response.ResponseId = responseId;
|
||||
response.ChoiceArtFileId = fields[2].GetInt32();
|
||||
response.Header = fields[3].GetString();
|
||||
response.Answer = fields[4].GetString();
|
||||
response.Description = fields[5].GetString();
|
||||
response.Confirmation = fields[6].GetString();
|
||||
response.Flags = fields[3].GetInt32();
|
||||
response.WidgetSetID = fields[4].GetUInt32();
|
||||
response.GroupID = fields[5].GetUInt8();
|
||||
response.Header = fields[6].GetString();
|
||||
response.Answer = fields[7].GetString();
|
||||
response.Description = fields[8].GetString();
|
||||
response.Confirmation = fields[9].GetString();
|
||||
++responseCount;
|
||||
|
||||
} while (responses->NextRow());
|
||||
|
||||
@@ -710,20 +710,19 @@ struct QuestPOI
|
||||
int32 QuestObjectiveID;
|
||||
int32 QuestObjectID;
|
||||
int32 MapID;
|
||||
int32 WorldMapAreaID;
|
||||
int32 Floor;
|
||||
int32 UiMapID;
|
||||
int32 Priority;
|
||||
int32 Flags;
|
||||
int32 WorldEffectID;
|
||||
int32 PlayerConditionID;
|
||||
int32 UnkWoD1;
|
||||
int32 SpawnTrackingID;
|
||||
std::vector<QuestPOIPoint> points;
|
||||
bool AlwaysAllowMergingBlobs;
|
||||
|
||||
QuestPOI() : BlobIndex(0), ObjectiveIndex(0), QuestObjectiveID(0), QuestObjectID(0), MapID(0), WorldMapAreaID(0), Floor(0), Priority(0), Flags(0), WorldEffectID(0), PlayerConditionID(0), UnkWoD1(0), AlwaysAllowMergingBlobs(false){ }
|
||||
QuestPOI(int32 _BlobIndex, int32 _ObjectiveIndex, int32 _QuestObjectiveID, int32 _QuestObjectID, int32 _MapID, int32 _WorldMapAreaID, int32 _Foor, int32 _Priority, int32 _Flags, int32 _WorldEffectID, int32 _PlayerConditionID, int32 _UnkWoD1, bool _AlwaysAllowMergingBlobs) :
|
||||
BlobIndex(_BlobIndex), ObjectiveIndex(_ObjectiveIndex), QuestObjectiveID(_QuestObjectiveID), QuestObjectID(_QuestObjectID), MapID(_MapID), WorldMapAreaID(_WorldMapAreaID),
|
||||
Floor(_Foor), Priority(_Priority), Flags(_Flags), WorldEffectID(_WorldEffectID), PlayerConditionID(_PlayerConditionID), UnkWoD1(_UnkWoD1), AlwaysAllowMergingBlobs(_AlwaysAllowMergingBlobs) { }
|
||||
QuestPOI() : BlobIndex(0), ObjectiveIndex(0), QuestObjectiveID(0), QuestObjectID(0), MapID(0), UiMapID(0), Priority(0), Flags(0), WorldEffectID(0), PlayerConditionID(0), SpawnTrackingID(0), AlwaysAllowMergingBlobs(false){ }
|
||||
QuestPOI(int32 blobIndex, int32 objectiveIndex, int32 questObjectiveID, int32 questObjectID, int32 mapID, int32 uiMapID, int32 priority, int32 flags, int32 worldEffectID, int32 playerConditionID, int32 spawnTrackingID, bool alwaysAllowMergingBlobs) :
|
||||
BlobIndex(blobIndex), ObjectiveIndex(objectiveIndex), QuestObjectiveID(questObjectiveID), QuestObjectID(questObjectID), MapID(mapID), UiMapID(uiMapID),
|
||||
Priority(priority), Flags(flags), WorldEffectID(worldEffectID), PlayerConditionID(playerConditionID), SpawnTrackingID(spawnTrackingID), AlwaysAllowMergingBlobs(alwaysAllowMergingBlobs) { }
|
||||
};
|
||||
|
||||
typedef std::vector<QuestPOI> QuestPOIVector;
|
||||
@@ -794,6 +793,9 @@ struct PlayerChoiceResponse
|
||||
{
|
||||
int32 ResponseId;
|
||||
int32 ChoiceArtFileId;
|
||||
int32 Flags;
|
||||
uint32 WidgetSetID;
|
||||
uint8 GroupID;
|
||||
std::string Header;
|
||||
std::string Answer;
|
||||
std::string Description;
|
||||
@@ -808,6 +810,7 @@ struct PlayerChoice
|
||||
std::string Question;
|
||||
std::vector<PlayerChoiceResponse> Responses;
|
||||
bool HideWarboardHeader;
|
||||
bool KeepOpenAfterChoice;
|
||||
|
||||
PlayerChoiceResponse const* GetResponse(int32 responseId) const
|
||||
{
|
||||
|
||||
@@ -98,6 +98,9 @@ void WorldSession::SendFeatureSystemStatusGlueScreen()
|
||||
features.BpayStoreDisabledByParentalControls = false;
|
||||
features.CharUndeleteEnabled = sWorld->getBoolConfig(CONFIG_FEATURE_SYSTEM_CHARACTER_UNDELETE_ENABLED);
|
||||
features.BpayStoreEnabled = sWorld->getBoolConfig(CONFIG_FEATURE_SYSTEM_BPAY_STORE_ENABLED);
|
||||
features.MaxCharactersPerRealm = sWorld->getIntConfig(CONFIG_CHARACTERS_PER_REALM);
|
||||
features.MinimumExpansionLevel = EXPANSION_CLASSIC;
|
||||
features.MaximumExpansionLevel = sWorld->getIntConfig(CONFIG_EXPANSION);
|
||||
|
||||
SendPacket(features.Write());
|
||||
}
|
||||
|
||||
@@ -79,8 +79,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPackets::Calendar::CalendarGet
|
||||
WorldPackets::Calendar::CalendarSendCalendarEventInfo eventInfo;
|
||||
eventInfo.EventID = event->GetEventId();
|
||||
eventInfo.Date = event->GetDate();
|
||||
Guild* guild = sGuildMgr->GetGuildById(event->GetGuildId());
|
||||
eventInfo.EventGuildID = guild ? guild->GetGUID() : ObjectGuid::Empty;
|
||||
eventInfo.EventClubID = event->GetGuildId();
|
||||
eventInfo.EventName = event->GetTitle();
|
||||
eventInfo.EventType = event->GetType();
|
||||
eventInfo.Flags = event->GetFlags();
|
||||
|
||||
@@ -349,6 +349,7 @@ void WorldSession::HandleCharEnum(PreparedQueryResult result)
|
||||
while (result->NextRow());
|
||||
}
|
||||
|
||||
charEnum.IsTestDemonHunterCreationAllowed = canAlwaysCreateDemonHunter;
|
||||
charEnum.IsDemonHunterCreationAllowed = GetAccountExpansion() >= EXPANSION_LEGION || canAlwaysCreateDemonHunter;
|
||||
charEnum.IsAlliedRacesCreationAllowed = GetAccountExpansion() >= EXPANSION_BATTLE_FOR_AZEROTH;
|
||||
|
||||
@@ -733,7 +734,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPackets::Character::CreateCharact
|
||||
|
||||
LoginDatabase.CommitTransaction(trans);
|
||||
|
||||
SendCharCreate(CHAR_CREATE_SUCCESS);
|
||||
SendCharCreate(CHAR_CREATE_SUCCESS, newChar.GetGUID());
|
||||
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Create Character: %s %s", GetAccountId(), GetRemoteAddress().c_str(), createInfo->Name.c_str(), newChar.GetGUID().ToString().c_str());
|
||||
sScriptMgr->OnPlayerCreate(&newChar);
|
||||
@@ -2476,10 +2477,11 @@ void WorldSession::HandleCharUndeleteOpcode(WorldPackets::Character::UndeleteCha
|
||||
}));
|
||||
}
|
||||
|
||||
void WorldSession::SendCharCreate(ResponseCodes result)
|
||||
void WorldSession::SendCharCreate(ResponseCodes result, ObjectGuid const& guid /*= ObjectGuid::Empty*/)
|
||||
{
|
||||
WorldPackets::Character::CreateChar response;
|
||||
response.Code = result;
|
||||
response.Guid = guid;
|
||||
|
||||
SendPacket(response.Write());
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ void WorldSession::HandleCanDuel(WorldPackets::Duel::CanDuel& packet)
|
||||
|
||||
void WorldSession::HandleDuelResponseOpcode(WorldPackets::Duel::DuelResponse& duelResponse)
|
||||
{
|
||||
if (duelResponse.Accepted)
|
||||
if (duelResponse.Accepted && !duelResponse.Forfeited)
|
||||
HandleDuelAccepted();
|
||||
else
|
||||
HandleDuelCancelled();
|
||||
|
||||
@@ -62,6 +62,10 @@ void WorldSession::HandleInspectOpcode(WorldPackets::Inspect::Inspect& inspect)
|
||||
if (v.second != PLAYERSPELL_REMOVED)
|
||||
inspectResult.Talents.push_back(v.first);
|
||||
}
|
||||
|
||||
PlayerPvpTalentMap const& pvpTalents = player->GetPvpTalentMap(player->GetActiveTalentGroup());
|
||||
for (std::size_t i = 0; i < pvpTalents.size(); ++i)
|
||||
inspectResult.PvpTalents[i] = pvpTalents[i];
|
||||
}
|
||||
|
||||
if (Guild* guild = sGuildMgr->GetGuildById(player->GetGuildId()))
|
||||
|
||||
@@ -95,10 +95,22 @@ void WorldSession::HandleCreatureQuery(WorldPackets::Query::QueryCreature& packe
|
||||
for (uint32 i = 0; i < MAX_KILL_CREDIT; ++i)
|
||||
stats.ProxyCreatureID[i] = creatureInfo->KillCredit[i];
|
||||
|
||||
stats.CreatureDisplayID[0] = creatureInfo->Modelid1;
|
||||
stats.CreatureDisplayID[1] = creatureInfo->Modelid2;
|
||||
stats.CreatureDisplayID[2] = creatureInfo->Modelid3;
|
||||
stats.CreatureDisplayID[3] = creatureInfo->Modelid4;
|
||||
// TEMPORARY, PR #22567
|
||||
auto addModel = [&](uint32 modelId)
|
||||
{
|
||||
if (modelId)
|
||||
{
|
||||
stats.Display.TotalProbability += 1.0f;
|
||||
stats.Display.CreatureDisplay.emplace_back();
|
||||
WorldPackets::Query::CreatureXDisplay& display = stats.Display.CreatureDisplay.back();
|
||||
display.CreatureDisplayID = modelId;
|
||||
}
|
||||
};
|
||||
|
||||
addModel(creatureInfo->Modelid1);
|
||||
addModel(creatureInfo->Modelid2);
|
||||
addModel(creatureInfo->Modelid3);
|
||||
addModel(creatureInfo->Modelid4);
|
||||
|
||||
stats.HpMulti = creatureInfo->ModHealth;
|
||||
stats.EnergyMulti = creatureInfo->ModMana;
|
||||
@@ -107,14 +119,14 @@ void WorldSession::HandleCreatureQuery(WorldPackets::Query::QueryCreature& packe
|
||||
stats.RequiredExpansion = creatureInfo->RequiredExpansion;
|
||||
stats.HealthScalingExpansion = creatureInfo->HealthScalingExpansion;
|
||||
stats.VignetteID = creatureInfo->VignetteID;
|
||||
stats.Class = creatureInfo->unit_class;
|
||||
|
||||
stats.Title = creatureInfo->SubName;
|
||||
stats.TitleAlt = creatureInfo->TitleAlt;
|
||||
stats.CursorName = creatureInfo->IconName;
|
||||
|
||||
if (std::vector<uint32> const* items = sObjectMgr->GetCreatureQuestItemList(packet.CreatureID))
|
||||
for (uint32 item : *items)
|
||||
stats.QuestItems.push_back(item);
|
||||
stats.QuestItems.insert(stats.QuestItems.begin(), items->begin(), items->end());
|
||||
|
||||
LocaleConstant localeConstant = GetSessionDbLocaleIndex();
|
||||
if (localeConstant != LOCALE_enUS)
|
||||
@@ -368,13 +380,12 @@ void WorldSession::HandleQuestPOIQuery(WorldPackets::Query::QuestPOIQuery& quest
|
||||
questPOIBlobData.QuestObjectiveID = data->QuestObjectiveID;
|
||||
questPOIBlobData.QuestObjectID = data->QuestObjectID;
|
||||
questPOIBlobData.MapID = data->MapID;
|
||||
questPOIBlobData.WorldMapAreaID = data->WorldMapAreaID;
|
||||
questPOIBlobData.Floor = data->Floor;
|
||||
questPOIBlobData.UiMapID = data->UiMapID;
|
||||
questPOIBlobData.Priority = data->Priority;
|
||||
questPOIBlobData.Flags = data->Flags;
|
||||
questPOIBlobData.WorldEffectID = data->WorldEffectID;
|
||||
questPOIBlobData.PlayerConditionID = data->PlayerConditionID;
|
||||
questPOIBlobData.UnkWoD1 = data->UnkWoD1;
|
||||
questPOIBlobData.SpawnTrackingID = data->SpawnTrackingID;
|
||||
questPOIBlobData.AlwaysAllowMergingBlobs = data->AlwaysAllowMergingBlobs;
|
||||
|
||||
for (QuestPOIPoint const& point : data->points)
|
||||
|
||||
@@ -55,14 +55,14 @@ void WorldSession::HandleLearnPvpTalentsOpcode(WorldPackets::Talent::LearnPvpTal
|
||||
{
|
||||
WorldPackets::Talent::LearnPvpTalentsFailed learnPvpTalentsFailed;
|
||||
bool anythingLearned = false;
|
||||
for (uint32 talentId : packet.Talents)
|
||||
for (WorldPackets::Talent::PvPTalent pvpTalent : packet.Talents)
|
||||
{
|
||||
if (TalentLearnResult result = _player->LearnPvpTalent(talentId, 0, &learnPvpTalentsFailed.SpellID))
|
||||
if (TalentLearnResult result = _player->LearnPvpTalent(pvpTalent.PvPTalentID, pvpTalent.Slot, &learnPvpTalentsFailed.SpellID))
|
||||
{
|
||||
if (!learnPvpTalentsFailed.Reason)
|
||||
learnPvpTalentsFailed.Reason = result;
|
||||
|
||||
learnPvpTalentsFailed.Talents.push_back(talentId);
|
||||
learnPvpTalentsFailed.Talents.push_back(pvpTalent);
|
||||
}
|
||||
else
|
||||
anythingLearned = true;
|
||||
|
||||
@@ -994,6 +994,7 @@ enum CharacterFlags4 : uint32
|
||||
{
|
||||
CHARACTER_FLAG_4_TRIAL_BOOST = 0x00000080,
|
||||
CHARACTER_FLAG_4_TRIAL_BOOST_LOCKED = 0x00040000,
|
||||
CHARACTER_FLAG_4_EXPANSION_TRIAL = 0x00080000,
|
||||
};
|
||||
|
||||
#define PLAYER_CUSTOM_DISPLAY_SIZE 3
|
||||
@@ -1048,11 +1049,17 @@ enum Language
|
||||
LANG_PANDAREN_NEUTRAL = 42,
|
||||
LANG_PANDAREN_ALLIANCE = 43,
|
||||
LANG_PANDAREN_HORDE = 44,
|
||||
LANG_RIKKITUN = 168,
|
||||
LANG_ADDON = 0xFFFFFFFF // used by addons, in 2.4.0 not exist, replaced by messagetype?
|
||||
LANG_SPRITE = 168,
|
||||
LANG_SHATH_YAR = 178,
|
||||
LANG_NERGLISH = 179,
|
||||
LANG_MOONKIN = 180,
|
||||
LANG_SHALASSIAN = 181,
|
||||
LANG_THALASSIAN_2 = 182,
|
||||
LANG_ADDON = 183,
|
||||
LANG_ADDON_LOGGED = 184
|
||||
};
|
||||
|
||||
#define LANGUAGES_COUNT 25
|
||||
#define LANGUAGES_COUNT 31
|
||||
|
||||
enum TeamId
|
||||
{
|
||||
@@ -2426,11 +2433,15 @@ enum GameobjectTypes : uint8
|
||||
GAMEOBJECT_TYPE_UI_LINK = 48,
|
||||
GAMEOBJECT_TYPE_KEYSTONE_RECEPTACLE = 49,
|
||||
GAMEOBJECT_TYPE_GATHERING_NODE = 50,
|
||||
GAMEOBJECT_TYPE_CHALLENGE_MODE_REWARD = 51
|
||||
GAMEOBJECT_TYPE_CHALLENGE_MODE_REWARD = 51,
|
||||
GAMEOBJECT_TYPE_MULTI = 52,
|
||||
GAMEOBJECT_TYPE_SIEGEABLE_MULTI = 53,
|
||||
GAMEOBJECT_TYPE_SIEGEABLE_MO = 54,
|
||||
GAMEOBJECT_TYPE_PVP_REWARD = 55,
|
||||
};
|
||||
|
||||
#define MAX_GAMEOBJECT_TYPE 52 // sending to client this or greater value can crash client.
|
||||
#define MAX_GAMEOBJECT_DATA 33 // Max number of uint32 vars in gameobject_template data field
|
||||
#define MAX_GAMEOBJECT_TYPE 56 // sending to client this or greater value can crash client.
|
||||
#define MAX_GAMEOBJECT_DATA 34 // Max number of uint32 vars in gameobject_template data field
|
||||
|
||||
enum GameObjectFlags
|
||||
{
|
||||
@@ -4218,23 +4229,22 @@ enum SkillType
|
||||
SKILL_MACES = 54,
|
||||
SKILL_TWO_HANDED_SWORDS = 55,
|
||||
SKILL_DEFENSE = 95,
|
||||
SKILL_LANG_COMMON = 98,
|
||||
SKILL_LANGUAGE_COMMON = 98,
|
||||
SKILL_RACIAL_DWARF = 101,
|
||||
SKILL_LANG_ORCISH = 109,
|
||||
SKILL_LANG_DWARVEN = 111,
|
||||
SKILL_LANG_DARNASSIAN = 113,
|
||||
SKILL_LANG_TAURAHE = 115,
|
||||
SKILL_LANGUAGE_ORCISH = 109,
|
||||
SKILL_LANGUAGE_DWARVEN = 111,
|
||||
SKILL_LANGUAGE_DARNASSIAN = 113,
|
||||
SKILL_LANGUAGE_TAURAHE = 115,
|
||||
SKILL_DUAL_WIELD = 118,
|
||||
SKILL_RACIAL_TAUREN = 124,
|
||||
SKILL_RACIAL_ORC = 125,
|
||||
SKILL_RACIAL_NIGHT_ELF = 126,
|
||||
SKILL_FIRST_AID = 129,
|
||||
SKILL_STAVES = 136,
|
||||
SKILL_LANG_THALASSIAN = 137,
|
||||
SKILL_LANG_DRACONIC = 138,
|
||||
SKILL_LANG_DEMON_TONGUE = 139,
|
||||
SKILL_LANG_TITAN = 140,
|
||||
SKILL_LANG_OLD_TONGUE = 141,
|
||||
SKILL_LANGUAGE_THALASSIAN = 137,
|
||||
SKILL_LANGUAGE_DRACONIC = 138,
|
||||
SKILL_LANGUAGE_DEMON_TONGUE = 139,
|
||||
SKILL_LANGUAGE_TITAN = 140,
|
||||
SKILL_LANGUAGE_OLD_TONGUE = 141,
|
||||
SKILL_SURVIVAL = 142,
|
||||
SKILL_HORSE_RIDING = 148,
|
||||
SKILL_WOLF_RIDING = 149,
|
||||
@@ -4279,8 +4289,8 @@ enum SkillType
|
||||
SKILL_PET_TURTLE = 251,
|
||||
SKILL_PET_GENERIC_HUNTER = 270,
|
||||
SKILL_PLATE_MAIL = 293,
|
||||
SKILL_LANG_GNOMISH = 313,
|
||||
SKILL_LANG_TROLL = 315,
|
||||
SKILL_LANGUAGE_GNOMISH = 313,
|
||||
SKILL_LANGUAGE_TROLL = 315,
|
||||
SKILL_ENCHANTING = 333,
|
||||
SKILL_FISHING = 356,
|
||||
SKILL_SKINNING = 393,
|
||||
@@ -4296,7 +4306,7 @@ enum SkillType
|
||||
SKILL_PET_HYENA = 654,
|
||||
SKILL_PET_BIRD_OF_PREY = 655,
|
||||
SKILL_PET_WIND_SERPENT = 656,
|
||||
SKILL_LANG_FORSAKEN = 673,
|
||||
SKILL_LANGUAGE_FORSAKEN = 673,
|
||||
SKILL_KODO_RIDING = 713,
|
||||
SKILL_RACIAL_TROLL = 733,
|
||||
SKILL_RACIAL_GNOME = 753,
|
||||
@@ -4304,7 +4314,7 @@ enum SkillType
|
||||
SKILL_JEWELCRAFTING = 755,
|
||||
SKILL_RACIAL_BLOOD_ELF = 756,
|
||||
SKILL_PET_EVENT_REMOTE_CONTROL = 758,
|
||||
SKILL_LANG_DRAENEI = 759,
|
||||
SKILL_LANGUAGE_DRAENEI = 759,
|
||||
SKILL_RACIAL_DRAENEI = 760,
|
||||
SKILL_PET_FELGUARD = 761,
|
||||
SKILL_RIDING = 762,
|
||||
@@ -4330,8 +4340,8 @@ enum SkillType
|
||||
SKILL_PET_EXOTIC_SPIRIT_BEAST = 788,
|
||||
SKILL_RACIAL_WORGEN = 789,
|
||||
SKILL_RACIAL_GOBLIN = 790,
|
||||
SKILL_LANG_GILNEAN = 791,
|
||||
SKILL_LANG_GOBLIN = 792,
|
||||
SKILL_LANGUAGE_GILNEAN = 791,
|
||||
SKILL_LANGUAGE_GOBLIN = 792,
|
||||
SKILL_ARCHAEOLOGY = 794,
|
||||
SKILL_HUNTER = 795,
|
||||
SKILL_DEATH_KNIGHT = 796,
|
||||
@@ -4343,7 +4353,7 @@ enum SkillType
|
||||
SKILL_ALL_GLYPHS = 810,
|
||||
SKILL_PET_DOG = 811,
|
||||
SKILL_PET_MONKEY = 815,
|
||||
SKILL_PET_SHALE_SPIDER = 817,
|
||||
SKILL_PET_EXOTIC_SHALE_SPIDER = 817,
|
||||
SKILL_BEETLE = 818,
|
||||
SKILL_ALL_GUILD_PERKS = 821,
|
||||
SKILL_PET_HYDRA = 824,
|
||||
@@ -4352,9 +4362,7 @@ enum SkillType
|
||||
SKILL_WARLOCK = 849,
|
||||
SKILL_RACIAL_PANDAREN = 899,
|
||||
SKILL_MAGE = 904,
|
||||
SKILL_LANG_PANDAREN_NEUTRAL = 905,
|
||||
SKILL_LANG_PANDAREN_ALLIANCE = 906,
|
||||
SKILL_LANG_PANDAREN_HORDE = 907,
|
||||
SKILL_LANGUAGE_PANDAREN_NEUTRAL = 905,
|
||||
SKILL_ROGUE = 921,
|
||||
SKILL_SHAMAN = 924,
|
||||
SKILL_FEL_IMP = 927,
|
||||
@@ -4374,17 +4382,16 @@ enum SkillType
|
||||
SKILL_WAY_OF_THE_BREW = 980,
|
||||
SKILL_APPRENTICE_COOKING = 981,
|
||||
SKILL_JOURNEYMAN_COOKBOOK = 982,
|
||||
SKILL_PORCUPINE = 983,
|
||||
SKILL_CRANE = 984,
|
||||
SKILL_WATER_STRIDER = 985,
|
||||
SKILL_PET_RODENT = 983,
|
||||
SKILL_PET_CRANE = 984,
|
||||
SKILL_PET_WATER_STRIDER = 985,
|
||||
SKILL_PET_EXOTIC_QUILEN = 986,
|
||||
SKILL_PET_GOAT = 987,
|
||||
SKILL_BASILISK = 988,
|
||||
SKILL_PET_BASILISK = 988,
|
||||
SKILL_NO_PLAYERS = 999,
|
||||
SKILL_DIREHORN = 1305,
|
||||
SKILL_PET_DIREHORN = 1305,
|
||||
SKILL_PET_PRIMAL_STORM_ELEMENTAL = 1748,
|
||||
SKILL_PET_WATER_ELEMENTAL_MINOR_TALENT_VERSION = 1777,
|
||||
SKILL_PET_EXOTIC_RYLAK = 1818,
|
||||
SKILL_PET_RIVERBEAST = 1819,
|
||||
SKILL_UNUSED = 1830,
|
||||
SKILL_DEMON_HUNTER = 1848,
|
||||
@@ -4396,6 +4403,127 @@ enum SkillType
|
||||
SKILL_WARGLAIVES = 2152,
|
||||
SKILL_PET_MECHANICAL = 2189,
|
||||
SKILL_PET_ABOMINATION = 2216,
|
||||
SKILL_PET_OXEN = 2279,
|
||||
SKILL_PET_SCALEHIDE = 2280,
|
||||
SKILL_PET_FEATHERMANE = 2361,
|
||||
SKILL_RACIAL_NIGHTBORNE = 2419,
|
||||
SKILL_RACIAL_HIGHMOUNTAIN_TAUREN = 2420,
|
||||
SKILL_RACIAL_LIGHTFORGED_DRAENEI = 2421,
|
||||
SKILL_RACIAL_VOID_ELF = 2423,
|
||||
SKILL_KUL_TIRAN_BLACKSMITHING = 2437,
|
||||
SKILL_LEGION_BLACKSMITHING = 2454,
|
||||
SKILL_LANGUAGE_SHALASSIAN = 2464,
|
||||
SKILL_LANGUAGE_THALASSIAN_2 = 2465,
|
||||
SKILL_DRAENOR_BLACKSMITHING = 2472,
|
||||
SKILL_PANDARIA_BLACKSMITHING = 2473,
|
||||
SKILL_CATACLYSM_BLACKSMITHING = 2474,
|
||||
SKILL_NORTHREND_BLACKSMITHING = 2475,
|
||||
SKILL_OUTLAND_BLACKSMITHING = 2476,
|
||||
SKILL_BLACKSMITHING_2 = 2477,
|
||||
SKILL_KUL_TIRAN_ALCHEMY = 2478,
|
||||
SKILL_LEGION_ALCHEMY = 2479,
|
||||
SKILL_DRAENOR_ALCHEMY = 2480,
|
||||
SKILL_PANDARIA_ALCHEMY = 2481,
|
||||
SKILL_CATACLYSM_ALCHEMY = 2482,
|
||||
SKILL_NORTHREND_ALCHEMY = 2483,
|
||||
SKILL_OUTLAND_ALCHEMY = 2484,
|
||||
SKILL_ALCHEMY_2 = 2485,
|
||||
SKILL_KUL_TIRAN_ENCHANTING = 2486,
|
||||
SKILL_LEGION_ENCHANTING = 2487,
|
||||
SKILL_DRAENOR_ENCHANTING = 2488,
|
||||
SKILL_PANDARIA_ENCHANTING = 2489,
|
||||
SKILL_CATACLYSM_ENCHANTING = 2491,
|
||||
SKILL_NORTHREND_ENCHANTING = 2492,
|
||||
SKILL_OUTLAND_ENCHANTING = 2493,
|
||||
SKILL_ENCHANTING_2 = 2494,
|
||||
SKILL_KUL_TIRAN_ENGINEERING = 2499,
|
||||
SKILL_LEGION_ENGINEERING = 2500,
|
||||
SKILL_DRAENOR_ENGINEERING = 2501,
|
||||
SKILL_PANDARIA_ENGINEERING = 2502,
|
||||
SKILL_CATACLYSM_ENGINEERING = 2503,
|
||||
SKILL_NORTHREND_ENGINEERING = 2504,
|
||||
SKILL_OUTLAND_ENGINEERING = 2505,
|
||||
SKILL_ENGINEERING_2 = 2506,
|
||||
SKILL_KUL_TIRAN_INSCRIPTION = 2507,
|
||||
SKILL_LEGION_INSCRIPTION = 2508,
|
||||
SKILL_DRAENOR_INSCRIPTION = 2509,
|
||||
SKILL_PANDARIA_INSCRIPTION = 2510,
|
||||
SKILL_CATACLYSM_INSCRIPTION = 2511,
|
||||
SKILL_NORTHREND_INSCRIPTION = 2512,
|
||||
SKILL_OUTLAND_INSCRIPTION = 2513,
|
||||
SKILL_INSCRIPTION_2 = 2514,
|
||||
SKILL_KUL_TIRAN_JEWELCRAFTING = 2517,
|
||||
SKILL_LEGION_JEWELCRAFTING = 2518,
|
||||
SKILL_DRAENOR_JEWELCRAFTING = 2519,
|
||||
SKILL_PANDARIA_JEWELCRAFTING = 2520,
|
||||
SKILL_CATACLYSM_JEWELCRAFTING = 2521,
|
||||
SKILL_NORTHREND_JEWELCRAFTING = 2522,
|
||||
SKILL_OUTLAND_JEWELCRAFTING = 2523,
|
||||
SKILL_JEWELCRAFTING_2 = 2524,
|
||||
SKILL_KUL_TIRAN_LEATHERWORKING = 2525,
|
||||
SKILL_LEGION_LEATHERWORKING = 2526,
|
||||
SKILL_DRAENOR_LEATHERWORKING = 2527,
|
||||
SKILL_PANDARIA_LEATHERWORKING = 2528,
|
||||
SKILL_CATACLYSM_LEATHERWORKING = 2529,
|
||||
SKILL_NORTHREND_LEATHERWORKING = 2530,
|
||||
SKILL_OUTLAND_LEATHERWORKING = 2531,
|
||||
SKILL_LEATHERWORKING_2 = 2532,
|
||||
SKILL_KUL_TIRAN_TAILORING = 2533,
|
||||
SKILL_LEGION_TAILORING = 2534,
|
||||
SKILL_DRAENOR_TAILORING = 2535,
|
||||
SKILL_PANDARIA_TAILORING = 2536,
|
||||
SKILL_CATACLYSM_TAILORING = 2537,
|
||||
SKILL_NORTHREND_TAILORING = 2538,
|
||||
SKILL_OUTLAND_TAILORING = 2539,
|
||||
SKILL_TAILORING_2 = 2540,
|
||||
SKILL_KUL_TIRAN_COOKING = 2541,
|
||||
SKILL_LEGION_COOKING = 2542,
|
||||
SKILL_DRAENOR_COOKING = 2543,
|
||||
SKILL_PANDARIA_COOKING = 2544,
|
||||
SKILL_CATACLYSM_COOKING = 2545,
|
||||
SKILL_NORTHREND_COOKING = 2546,
|
||||
SKILL_OUTLAND_COOKING = 2547,
|
||||
SKILL_COOKING_2 = 2548,
|
||||
SKILL_KUL_TIRAN_HERBALISM = 2549,
|
||||
SKILL_LEGION_HERBALISM = 2550,
|
||||
SKILL_DRAENOR_HERBALISM = 2551,
|
||||
SKILL_PANDARIA_HERBALISM = 2552,
|
||||
SKILL_CATACLYSM_HERBALISM = 2553,
|
||||
SKILL_NORTHREND_HERBALISM = 2554,
|
||||
SKILL_OUTLAND_HERBALISM = 2555,
|
||||
SKILL_HERBALISM_2 = 2556,
|
||||
SKILL_KUL_TIRAN_SKINNING = 2557,
|
||||
SKILL_LEGION_SKINNING = 2558,
|
||||
SKILL_DRAENOR_SKINNING = 2559,
|
||||
SKILL_PANDARIA_SKINNING = 2560,
|
||||
SKILL_CATACLYSM_SKINNING = 2561,
|
||||
SKILL_NORTHREND_SKINNING = 2562,
|
||||
SKILL_OUTLAND_SKINNING = 2563,
|
||||
SKILL_SKINNING_2 = 2564,
|
||||
SKILL_KUL_TIRAN_MINING = 2565,
|
||||
SKILL_LEGION_MINING = 2566,
|
||||
SKILL_DRAENOR_MINING = 2567,
|
||||
SKILL_PANDARIA_MINING = 2568,
|
||||
SKILL_CATACLYSM_MINING = 2569,
|
||||
SKILL_NORTHREND_MINING = 2570,
|
||||
SKILL_OUTLAND_MINING = 2571,
|
||||
SKILL_MINING_2 = 2572,
|
||||
SKILL_KUL_TIRAN_FISHING = 2585,
|
||||
SKILL_LEGION_FISHING = 2586,
|
||||
SKILL_DRAENOR_FISHING = 2587,
|
||||
SKILL_PANDARIA_FISHING = 2588,
|
||||
SKILL_CATACLYSM_FISHING = 2589,
|
||||
SKILL_NORTHREND_FISHING = 2590,
|
||||
SKILL_OUTLAND_FISHING = 2591,
|
||||
SKILL_FISHING_2 = 2592,
|
||||
SKILL_RACIAL_DARK_IRON_DWARF = 2597,
|
||||
SKILL_RACIAL_MAG_HAR_ORC = 2598,
|
||||
SKILL_PET_LIZARD = 2703,
|
||||
SKILL_PET_HORSE = 2704,
|
||||
SKILL_PET_EXOTIC_PTERRORDAX = 2705,
|
||||
SKILL_PET_TOAD = 2706,
|
||||
SKILL_PET_EXOTIC_KROLUSK = 2707,
|
||||
SKILL_SECOND_PET_HUNTER = 2716
|
||||
};
|
||||
|
||||
inline SkillType SkillByLockType(LockType locktype)
|
||||
@@ -4425,7 +4553,6 @@ inline uint32 SkillByQuestSort(int32 QuestSort)
|
||||
case QUEST_SORT_ENGINEERING: return SKILL_ENGINEERING;
|
||||
case QUEST_SORT_TAILORING: return SKILL_TAILORING;
|
||||
case QUEST_SORT_COOKING: return SKILL_COOKING;
|
||||
case QUEST_SORT_FIRST_AID: return SKILL_FIRST_AID;
|
||||
case QUEST_SORT_JEWELCRAFTING: return SKILL_JEWELCRAFTING;
|
||||
case QUEST_SORT_INSCRIPTION: return SKILL_INSCRIPTION;
|
||||
case QUEST_SORT_ARCHAEOLOGY: return SKILL_ARCHAEOLOGY;
|
||||
@@ -4772,52 +4899,54 @@ enum ResponseCodes
|
||||
CHAR_CREATE_THROTTLE = 49,
|
||||
CHAR_CREATE_ALLIED_RACE_ACHIEVEMENT = 50,
|
||||
CHAR_CREATE_LEVEL_REQUIREMENT_DEMON_HUNTER = 51,
|
||||
CHAR_CREATE_CHARACTER_IN_COMMUNITY = 52,
|
||||
|
||||
CHAR_DELETE_IN_PROGRESS = 52,
|
||||
CHAR_DELETE_SUCCESS = 53,
|
||||
CHAR_DELETE_FAILED = 54,
|
||||
CHAR_DELETE_FAILED_LOCKED_FOR_TRANSFER = 55,
|
||||
CHAR_DELETE_FAILED_GUILD_LEADER = 56,
|
||||
CHAR_DELETE_FAILED_ARENA_CAPTAIN = 57,
|
||||
CHAR_DELETE_FAILED_HAS_HEIRLOOM_OR_MAIL = 58,
|
||||
CHAR_DELETE_FAILED_UPGRADE_IN_PROGRESS = 59,
|
||||
CHAR_DELETE_FAILED_HAS_WOW_TOKEN = 60,
|
||||
CHAR_DELETE_FAILED_VAS_TRANSACTION_IN_PROGRESS = 61,
|
||||
CHAR_DELETE_IN_PROGRESS = 53,
|
||||
CHAR_DELETE_SUCCESS = 54,
|
||||
CHAR_DELETE_FAILED = 55,
|
||||
CHAR_DELETE_FAILED_LOCKED_FOR_TRANSFER = 56,
|
||||
CHAR_DELETE_FAILED_GUILD_LEADER = 57,
|
||||
CHAR_DELETE_FAILED_ARENA_CAPTAIN = 58,
|
||||
CHAR_DELETE_FAILED_HAS_HEIRLOOM_OR_MAIL = 59,
|
||||
CHAR_DELETE_FAILED_UPGRADE_IN_PROGRESS = 60,
|
||||
CHAR_DELETE_FAILED_HAS_WOW_TOKEN = 61,
|
||||
CHAR_DELETE_FAILED_VAS_TRANSACTION_IN_PROGRESS = 62,
|
||||
CHAR_DELETE_FAILED_COMMUNITY_OWNER = 63,
|
||||
|
||||
CHAR_LOGIN_IN_PROGRESS = 62,
|
||||
CHAR_LOGIN_SUCCESS = 63,
|
||||
CHAR_LOGIN_NO_WORLD = 64,
|
||||
CHAR_LOGIN_DUPLICATE_CHARACTER = 65,
|
||||
CHAR_LOGIN_NO_INSTANCES = 66,
|
||||
CHAR_LOGIN_FAILED = 67,
|
||||
CHAR_LOGIN_DISABLED = 68,
|
||||
CHAR_LOGIN_NO_CHARACTER = 69,
|
||||
CHAR_LOGIN_LOCKED_FOR_TRANSFER = 70,
|
||||
CHAR_LOGIN_LOCKED_BY_BILLING = 71,
|
||||
CHAR_LOGIN_LOCKED_BY_MOBILE_AH = 72,
|
||||
CHAR_LOGIN_TEMPORARY_GM_LOCK = 73,
|
||||
CHAR_LOGIN_LOCKED_BY_CHARACTER_UPGRADE = 74,
|
||||
CHAR_LOGIN_LOCKED_BY_REVOKED_CHARACTER_UPGRADE = 75,
|
||||
CHAR_LOGIN_LOCKED_BY_REVOKED_VAS_TRANSACTION = 76,
|
||||
CHAR_LOGIN_LOCKED_BY_RESTRICTION = 77,
|
||||
CHAR_LOGIN_IN_PROGRESS = 64,
|
||||
CHAR_LOGIN_SUCCESS = 65,
|
||||
CHAR_LOGIN_NO_WORLD = 66,
|
||||
CHAR_LOGIN_DUPLICATE_CHARACTER = 67,
|
||||
CHAR_LOGIN_NO_INSTANCES = 68,
|
||||
CHAR_LOGIN_FAILED = 69,
|
||||
CHAR_LOGIN_DISABLED = 70,
|
||||
CHAR_LOGIN_NO_CHARACTER = 71,
|
||||
CHAR_LOGIN_LOCKED_FOR_TRANSFER = 72,
|
||||
CHAR_LOGIN_LOCKED_BY_BILLING = 73,
|
||||
CHAR_LOGIN_LOCKED_BY_MOBILE_AH = 74,
|
||||
CHAR_LOGIN_TEMPORARY_GM_LOCK = 75,
|
||||
CHAR_LOGIN_LOCKED_BY_CHARACTER_UPGRADE = 76,
|
||||
CHAR_LOGIN_LOCKED_BY_REVOKED_CHARACTER_UPGRADE = 77,
|
||||
CHAR_LOGIN_LOCKED_BY_REVOKED_VAS_TRANSACTION = 78,
|
||||
CHAR_LOGIN_LOCKED_BY_RESTRICTION = 79,
|
||||
|
||||
CHAR_NAME_SUCCESS = 78,
|
||||
CHAR_NAME_FAILURE = 79,
|
||||
CHAR_NAME_NO_NAME = 80,
|
||||
CHAR_NAME_TOO_SHORT = 81,
|
||||
CHAR_NAME_TOO_LONG = 82,
|
||||
CHAR_NAME_INVALID_CHARACTER = 83,
|
||||
CHAR_NAME_MIXED_LANGUAGES = 84,
|
||||
CHAR_NAME_PROFANE = 85,
|
||||
CHAR_NAME_RESERVED = 86,
|
||||
CHAR_NAME_INVALID_APOSTROPHE = 87,
|
||||
CHAR_NAME_MULTIPLE_APOSTROPHES = 88,
|
||||
CHAR_NAME_THREE_CONSECUTIVE = 89,
|
||||
CHAR_NAME_INVALID_SPACE = 90,
|
||||
CHAR_NAME_CONSECUTIVE_SPACES = 91,
|
||||
CHAR_NAME_RUSSIAN_CONSECUTIVE_SILENT_CHARACTERS = 92,
|
||||
CHAR_NAME_RUSSIAN_SILENT_CHARACTER_AT_BEGINNING_OR_END = 93,
|
||||
CHAR_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME = 94
|
||||
CHAR_NAME_SUCCESS = 80,
|
||||
CHAR_NAME_FAILURE = 81,
|
||||
CHAR_NAME_NO_NAME = 82,
|
||||
CHAR_NAME_TOO_SHORT = 83,
|
||||
CHAR_NAME_TOO_LONG = 84,
|
||||
CHAR_NAME_INVALID_CHARACTER = 85,
|
||||
CHAR_NAME_MIXED_LANGUAGES = 86,
|
||||
CHAR_NAME_PROFANE = 87,
|
||||
CHAR_NAME_RESERVED = 88,
|
||||
CHAR_NAME_INVALID_APOSTROPHE = 89,
|
||||
CHAR_NAME_MULTIPLE_APOSTROPHES = 90,
|
||||
CHAR_NAME_THREE_CONSECUTIVE = 91,
|
||||
CHAR_NAME_INVALID_SPACE = 92,
|
||||
CHAR_NAME_CONSECUTIVE_SPACES = 93,
|
||||
CHAR_NAME_RUSSIAN_CONSECUTIVE_SILENT_CHARACTERS = 94,
|
||||
CHAR_NAME_RUSSIAN_SILENT_CHARACTER_AT_BEGINNING_OR_END = 95,
|
||||
CHAR_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME = 96
|
||||
};
|
||||
|
||||
enum CharacterUndeleteResult
|
||||
|
||||
@@ -37,38 +37,40 @@ Quest::Quest(Field* questRecord)
|
||||
ID = questRecord[0].GetUInt32();
|
||||
Type = questRecord[1].GetUInt8();
|
||||
Level = questRecord[2].GetInt32();
|
||||
MaxScalingLevel = questRecord[3].GetInt32();
|
||||
PackageID = questRecord[4].GetUInt32();
|
||||
MinLevel = questRecord[5].GetInt32();
|
||||
QuestSortID = questRecord[6].GetInt16();
|
||||
QuestInfoID = questRecord[7].GetUInt16();
|
||||
SuggestedPlayers = questRecord[8].GetUInt8();
|
||||
NextQuestInChain = questRecord[9].GetUInt32();
|
||||
RewardXPDifficulty = questRecord[10].GetUInt32();
|
||||
RewardXPMultiplier = questRecord[11].GetFloat();
|
||||
RewardMoney = questRecord[12].GetUInt32();
|
||||
RewardMoneyDifficulty = questRecord[13].GetUInt32();
|
||||
RewardMoneyMultiplier = questRecord[14].GetFloat();
|
||||
RewardBonusMoney = questRecord[15].GetUInt32();
|
||||
ScalingFactionGroup = questRecord[3].GetInt32();
|
||||
MaxScalingLevel = questRecord[4].GetInt32();
|
||||
PackageID = questRecord[5].GetUInt32();
|
||||
MinLevel = questRecord[6].GetInt32();
|
||||
QuestSortID = questRecord[7].GetInt16();
|
||||
QuestInfoID = questRecord[8].GetUInt16();
|
||||
SuggestedPlayers = questRecord[9].GetUInt8();
|
||||
NextQuestInChain = questRecord[10].GetUInt32();
|
||||
RewardXPDifficulty = questRecord[11].GetUInt32();
|
||||
RewardXPMultiplier = questRecord[12].GetFloat();
|
||||
RewardMoney = questRecord[13].GetUInt32();
|
||||
RewardMoneyDifficulty = questRecord[14].GetUInt32();
|
||||
RewardMoneyMultiplier = questRecord[15].GetFloat();
|
||||
RewardBonusMoney = questRecord[16].GetUInt32();
|
||||
for (uint32 i = 0; i < QUEST_REWARD_DISPLAY_SPELL_COUNT; ++i)
|
||||
RewardDisplaySpell[i] = questRecord[16 + i].GetUInt32();
|
||||
RewardDisplaySpell[i] = questRecord[17 + i].GetUInt32();
|
||||
|
||||
RewardSpell = questRecord[19].GetUInt32();
|
||||
RewardHonor = questRecord[20].GetUInt32();
|
||||
RewardKillHonor = questRecord[21].GetUInt32();
|
||||
SourceItemId = questRecord[22].GetUInt32();
|
||||
RewardArtifactXPDifficulty = questRecord[23].GetUInt32();
|
||||
RewardArtifactXPMultiplier = questRecord[24].GetFloat();
|
||||
RewardArtifactCategoryID = questRecord[25].GetUInt32();
|
||||
Flags = questRecord[26].GetUInt32();
|
||||
FlagsEx = questRecord[27].GetUInt32();
|
||||
RewardSpell = questRecord[20].GetUInt32();
|
||||
RewardHonor = questRecord[21].GetUInt32();
|
||||
RewardKillHonor = questRecord[22].GetUInt32();
|
||||
SourceItemId = questRecord[23].GetUInt32();
|
||||
RewardArtifactXPDifficulty = questRecord[24].GetUInt32();
|
||||
RewardArtifactXPMultiplier = questRecord[25].GetFloat();
|
||||
RewardArtifactCategoryID = questRecord[26].GetUInt32();
|
||||
Flags = questRecord[27].GetUInt32();
|
||||
FlagsEx = questRecord[28].GetUInt32();
|
||||
FlagsEx2 = questRecord[29].GetUInt32();
|
||||
|
||||
for (uint32 i = 0; i < QUEST_ITEM_DROP_COUNT; ++i)
|
||||
{
|
||||
RewardItemId[i] = questRecord[28 + i * 4].GetUInt32();
|
||||
RewardItemCount[i] = questRecord[29 + i * 4].GetUInt32();
|
||||
ItemDrop[i] = questRecord[30 + i * 4].GetUInt32();
|
||||
ItemDropQuantity[i] = questRecord[31 + i * 4].GetUInt32();
|
||||
RewardItemId[i] = questRecord[30 + i * 4].GetUInt32();
|
||||
RewardItemCount[i] = questRecord[31 + i * 4].GetUInt32();
|
||||
ItemDrop[i] = questRecord[32 + i * 4].GetUInt32();
|
||||
ItemDropQuantity[i] = questRecord[33 + i * 4].GetUInt32();
|
||||
|
||||
if (RewardItemId[i])
|
||||
++_rewItemsCount;
|
||||
@@ -76,63 +78,64 @@ Quest::Quest(Field* questRecord)
|
||||
|
||||
for (uint32 i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
|
||||
{
|
||||
RewardChoiceItemId[i] = questRecord[44 + i * 3].GetUInt32();
|
||||
RewardChoiceItemCount[i] = questRecord[45 + i * 3].GetUInt32();
|
||||
RewardChoiceItemDisplayId[i] = questRecord[46 + i * 3].GetUInt32();
|
||||
RewardChoiceItemId[i] = questRecord[46 + i * 3].GetUInt32();
|
||||
RewardChoiceItemCount[i] = questRecord[47 + i * 3].GetUInt32();
|
||||
RewardChoiceItemDisplayId[i] = questRecord[48 + i * 3].GetUInt32();
|
||||
|
||||
if (RewardChoiceItemId[i])
|
||||
++_rewChoiceItemsCount;
|
||||
}
|
||||
|
||||
POIContinent = questRecord[62].GetUInt32();
|
||||
POIx = questRecord[63].GetFloat();
|
||||
POIy = questRecord[64].GetFloat();
|
||||
POIPriority = questRecord[65].GetUInt32();
|
||||
POIContinent = questRecord[64].GetUInt32();
|
||||
POIx = questRecord[65].GetFloat();
|
||||
POIy = questRecord[66].GetFloat();
|
||||
POIPriority = questRecord[67].GetUInt32();
|
||||
|
||||
RewardTitleId = questRecord[66].GetUInt32();
|
||||
RewardArenaPoints = questRecord[67].GetUInt32();
|
||||
RewardSkillId = questRecord[68].GetUInt32();
|
||||
RewardSkillPoints = questRecord[69].GetUInt32();
|
||||
RewardTitleId = questRecord[68].GetUInt32();
|
||||
RewardArenaPoints = questRecord[69].GetUInt32();
|
||||
RewardSkillId = questRecord[70].GetUInt32();
|
||||
RewardSkillPoints = questRecord[71].GetUInt32();
|
||||
|
||||
QuestGiverPortrait = questRecord[70].GetUInt32();
|
||||
QuestTurnInPortrait = questRecord[71].GetUInt32();
|
||||
QuestGiverPortrait = questRecord[72].GetUInt32();
|
||||
QuestGiverPortraitMount = questRecord[73].GetUInt32();
|
||||
QuestTurnInPortrait = questRecord[74].GetUInt32();
|
||||
|
||||
for (uint32 i = 0; i < QUEST_REWARD_REPUTATIONS_COUNT; ++i)
|
||||
{
|
||||
RewardFactionId[i] = questRecord[72 + i * 4].GetUInt32();
|
||||
RewardFactionValue[i] = questRecord[73 + i * 4].GetInt32();
|
||||
RewardFactionOverride[i] = questRecord[74 + i * 4].GetInt32();
|
||||
RewardFactionCapIn[i] = questRecord[75 + i * 4].GetUInt32();
|
||||
RewardFactionId[i] = questRecord[75 + i * 4].GetUInt32();
|
||||
RewardFactionValue[i] = questRecord[76 + i * 4].GetInt32();
|
||||
RewardFactionOverride[i] = questRecord[77 + i * 4].GetInt32();
|
||||
RewardFactionCapIn[i] = questRecord[78 + i * 4].GetUInt32();
|
||||
}
|
||||
|
||||
RewardReputationMask = questRecord[92].GetUInt32();
|
||||
RewardReputationMask = questRecord[95].GetUInt32();
|
||||
|
||||
for (uint32 i = 0; i < QUEST_REWARD_CURRENCY_COUNT; ++i)
|
||||
{
|
||||
RewardCurrencyId[i] = questRecord[93 + i * 2].GetUInt32();
|
||||
RewardCurrencyCount[i] = questRecord[94 + i * 2].GetUInt32();
|
||||
RewardCurrencyId[i] = questRecord[96 + i * 2].GetUInt32();
|
||||
RewardCurrencyCount[i] = questRecord[97 + i * 2].GetUInt32();
|
||||
|
||||
if (RewardCurrencyId[i])
|
||||
++_rewCurrencyCount;
|
||||
}
|
||||
|
||||
SoundAccept = questRecord[101].GetUInt32();
|
||||
SoundTurnIn = questRecord[102].GetUInt32();
|
||||
AreaGroupID = questRecord[103].GetUInt32();
|
||||
LimitTime = questRecord[104].GetUInt32();
|
||||
AllowableRaces = questRecord[105].GetUInt64();
|
||||
QuestRewardID = questRecord[106].GetUInt32();
|
||||
Expansion = questRecord[107].GetInt32();
|
||||
SoundAccept = questRecord[104].GetUInt32();
|
||||
SoundTurnIn = questRecord[105].GetUInt32();
|
||||
AreaGroupID = questRecord[106].GetUInt32();
|
||||
LimitTime = questRecord[107].GetUInt32();
|
||||
AllowableRaces = questRecord[108].GetUInt64();
|
||||
TreasurePickerID = questRecord[109].GetInt32();
|
||||
Expansion = questRecord[110].GetInt32();
|
||||
|
||||
LogTitle = questRecord[108].GetString();
|
||||
LogDescription = questRecord[109].GetString();
|
||||
QuestDescription = questRecord[110].GetString();
|
||||
AreaDescription = questRecord[111].GetString();
|
||||
PortraitGiverText = questRecord[112].GetString();
|
||||
PortraitGiverName = questRecord[113].GetString();
|
||||
PortraitTurnInText = questRecord[114].GetString();
|
||||
PortraitTurnInName = questRecord[115].GetString();
|
||||
QuestCompletionLog = questRecord[116].GetString();
|
||||
LogTitle = questRecord[111].GetString();
|
||||
LogDescription = questRecord[112].GetString();
|
||||
QuestDescription = questRecord[113].GetString();
|
||||
AreaDescription = questRecord[114].GetString();
|
||||
PortraitGiverText = questRecord[115].GetString();
|
||||
PortraitGiverName = questRecord[116].GetString();
|
||||
PortraitTurnInText = questRecord[117].GetString();
|
||||
PortraitTurnInName = questRecord[118].GetString();
|
||||
QuestCompletionLog = questRecord[119].GetString();
|
||||
|
||||
for (uint32 i = 0; i < QUEST_EMOTE_COUNT; ++i)
|
||||
{
|
||||
@@ -255,20 +258,20 @@ void Quest::LoadQuestObjectiveVisualEffect(Field* fields)
|
||||
}
|
||||
}
|
||||
|
||||
uint32 Quest::XPValue(uint32 playerLevel) const
|
||||
uint32 Quest::XPValue(Player const* player) const
|
||||
{
|
||||
if (playerLevel)
|
||||
if (player)
|
||||
{
|
||||
uint32 questLevel = uint32(Level == -1 ? playerLevel : Level);
|
||||
uint32 questLevel = player->GetQuestLevel(this);
|
||||
QuestXPEntry const* questXp = sQuestXPStore.LookupEntry(questLevel);
|
||||
if (!questXp || RewardXPDifficulty >= 10)
|
||||
return 0;
|
||||
|
||||
float multiplier = 1.0f;
|
||||
if (questLevel != playerLevel)
|
||||
multiplier = sXpGameTable.GetRow(std::min(playerLevel, questLevel))->Divisor / sXpGameTable.GetRow(playerLevel)->Divisor;
|
||||
if (questLevel != player->getLevel())
|
||||
multiplier = sXpGameTable.GetRow(std::min<int32>(player->getLevel(), questLevel))->Divisor / sXpGameTable.GetRow(player->getLevel())->Divisor;
|
||||
|
||||
int32 diffFactor = 2 * (questLevel - playerLevel) + 20;
|
||||
int32 diffFactor = 2 * (questLevel + (Level == -1 ? 0 : 5) - player->getLevel()) + 10;
|
||||
if (diffFactor < 1)
|
||||
diffFactor = 1;
|
||||
else if (diffFactor > 10)
|
||||
@@ -290,11 +293,9 @@ uint32 Quest::XPValue(uint32 playerLevel) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 Quest::MoneyValue(uint8 playerLevel) const
|
||||
uint32 Quest::MoneyValue(Player const* player) const
|
||||
{
|
||||
uint8 level = Level == -1 ? playerLevel : Level;
|
||||
|
||||
if (QuestMoneyRewardEntry const* money = sQuestMoneyRewardStore.LookupEntry(level))
|
||||
if (QuestMoneyRewardEntry const* money = sQuestMoneyRewardStore.LookupEntry(player->GetQuestLevel(this)))
|
||||
return money->Difficulty[GetRewMoneyDifficulty()] * GetMoneyMultiplier();
|
||||
else
|
||||
return 0;
|
||||
@@ -315,11 +316,11 @@ void Quest::BuildQuestRewards(WorldPackets::Quest::QuestRewards& rewards, Player
|
||||
rewards.SpellCompletionID = GetRewSpell();
|
||||
rewards.SkillLineID = GetRewardSkillId();
|
||||
rewards.NumSkillUps = GetRewardSkillPoints();
|
||||
rewards.RewardID = GetRewardId();
|
||||
rewards.TreasurePickerID = GetTreasurePickerId();
|
||||
|
||||
for (uint32 i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
|
||||
{
|
||||
rewards.ChoiceItems[i].ItemID = RewardChoiceItemId[i];
|
||||
rewards.ChoiceItems[i].Item.ItemID = RewardChoiceItemId[i];
|
||||
rewards.ChoiceItems[i].Quantity = RewardChoiceItemCount[i];
|
||||
}
|
||||
|
||||
|
||||
@@ -200,6 +200,11 @@ enum QuestFlagsEx : uint32
|
||||
QUEST_FLAGS_EX_CLEAR_PROGRESS_OF_CRITERIA_TREE_OBJECTIVES_ON_ACCEPT = 0x1000000
|
||||
};
|
||||
|
||||
enum QuestFlagsEx2 : uint32
|
||||
{
|
||||
QUEST_FLAGS_EX2_NO_WAR_MODE_BONUS = 0x2
|
||||
};
|
||||
|
||||
enum QuestSpecialFlags
|
||||
{
|
||||
QUEST_SPECIAL_FLAGS_NONE = 0x000,
|
||||
@@ -348,17 +353,16 @@ class TC_GAME_API Quest
|
||||
void LoadQuestObjective(Field* fields);
|
||||
void LoadQuestObjectiveVisualEffect(Field* fields);
|
||||
|
||||
uint32 XPValue(uint32 playerLevel) const;
|
||||
uint32 MoneyValue(uint8 playerLevel) const;
|
||||
uint32 XPValue(Player const* player) const;
|
||||
uint32 MoneyValue(Player const* player) const;
|
||||
|
||||
bool HasFlag(uint32 flag) const { return (Flags & flag) != 0; }
|
||||
void SetFlag(uint32 flag) { Flags |= flag; }
|
||||
bool HasFlag(QuestFlags flag) const { return (Flags & uint32(flag)) != 0; }
|
||||
bool HasFlagEx(QuestFlagsEx flag) const { return (FlagsEx & uint32(flag)) != 0; }
|
||||
bool HasFlagEx2(QuestFlagsEx2 flag) const { return (FlagsEx2 & uint32(flag)) != 0; }
|
||||
|
||||
bool HasSpecialFlag(uint32 flag) const { return (SpecialFlags & flag) != 0; }
|
||||
void SetSpecialFlag(uint32 flag) { SpecialFlags |= flag; }
|
||||
|
||||
bool HasFlagEx(QuestFlagsEx flag) const { return (FlagsEx & uint32(flag)) != 0; }
|
||||
|
||||
// table data accessors:
|
||||
uint32 GetQuestId() const { return ID; }
|
||||
uint32 GetQuestType() const { return Type; }
|
||||
@@ -367,6 +371,7 @@ class TC_GAME_API Quest
|
||||
int32 GetMinLevel() const { return MinLevel; }
|
||||
uint32 GetMaxLevel() const { return MaxLevel; }
|
||||
int32 GetQuestLevel() const { return Level; }
|
||||
int32 GetQuestScalingFactionGroup() const { return ScalingFactionGroup; }
|
||||
int32 GetQuestMaxScalingLevel() const { return MaxScalingLevel; }
|
||||
uint32 GetQuestInfoID() const { return QuestInfoID; }
|
||||
uint32 GetAllowableClasses() const { return AllowableClasses; }
|
||||
@@ -427,15 +432,17 @@ class TC_GAME_API Quest
|
||||
bool IsAutoComplete() const;
|
||||
uint32 GetFlags() const { return Flags; }
|
||||
uint32 GetFlagsEx() const { return FlagsEx; }
|
||||
uint32 GetFlagsEx2() const { return FlagsEx2; }
|
||||
uint32 GetSpecialFlags() const { return SpecialFlags; }
|
||||
uint32 GetScriptId() const { return ScriptId; }
|
||||
uint32 GetAreaGroupID() const { return AreaGroupID; }
|
||||
uint32 GetRewardSkillId() const { return RewardSkillId; }
|
||||
uint32 GetRewardSkillPoints() const { return RewardSkillPoints; }
|
||||
uint32 GetRewardReputationMask() const { return RewardReputationMask; }
|
||||
uint32 GetRewardId() const { return QuestRewardID; }
|
||||
int32 GetTreasurePickerId() const { return TreasurePickerID; }
|
||||
int32 GetExpansion() const { return Expansion; }
|
||||
uint32 GetQuestGiverPortrait() const { return QuestGiverPortrait; }
|
||||
int32 GetQuestGiverPortraitMount() const { return QuestGiverPortraitMount; }
|
||||
uint32 GetQuestTurnInPortrait() const { return QuestTurnInPortrait; }
|
||||
bool IsDaily() const { return (Flags & QUEST_FLAGS_DAILY) != 0; }
|
||||
bool IsWeekly() const { return (Flags & QUEST_FLAGS_WEEKLY) != 0; }
|
||||
@@ -469,6 +476,7 @@ class TC_GAME_API Quest
|
||||
uint32 ID;
|
||||
uint32 Type;
|
||||
int32 Level;
|
||||
int32 ScalingFactionGroup;
|
||||
int32 MaxScalingLevel;
|
||||
uint32 PackageID;
|
||||
int32 MinLevel;
|
||||
@@ -492,6 +500,7 @@ class TC_GAME_API Quest
|
||||
uint32 SourceItemId;
|
||||
uint32 Flags;
|
||||
uint32 FlagsEx;
|
||||
uint32 FlagsEx2;
|
||||
uint32 RewardItemId[QUEST_REWARD_ITEM_COUNT];
|
||||
uint32 RewardItemCount[QUEST_REWARD_ITEM_COUNT];
|
||||
uint32 ItemDrop[QUEST_ITEM_DROP_COUNT];
|
||||
@@ -508,6 +517,7 @@ class TC_GAME_API Quest
|
||||
uint32 RewardSkillId;
|
||||
uint32 RewardSkillPoints;
|
||||
uint32 QuestGiverPortrait;
|
||||
int32 QuestGiverPortraitMount;
|
||||
uint32 QuestTurnInPortrait;
|
||||
uint32 RewardFactionId[QUEST_REWARD_REPUTATIONS_COUNT];
|
||||
int32 RewardFactionValue[QUEST_REWARD_REPUTATIONS_COUNT];
|
||||
@@ -521,7 +531,7 @@ class TC_GAME_API Quest
|
||||
uint32 AreaGroupID;
|
||||
uint32 LimitTime;
|
||||
uint64 AllowableRaces;
|
||||
uint32 QuestRewardID;
|
||||
int32 TreasurePickerID;
|
||||
int32 Expansion;
|
||||
QuestObjectives Objectives;
|
||||
std::string LogTitle;
|
||||
|
||||
@@ -147,8 +147,8 @@ void ScenarioMgr::LoadScenarioPOI()
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
// 0 1 2 6 7 8 9 10 11 12
|
||||
QueryResult result = WorldDatabase.Query("SELECT CriteriaTreeID, BlobIndex, Idx1, MapID, WorldMapAreaId, Floor, Priority, Flags, WorldEffectID, PlayerConditionID FROM scenario_poi ORDER BY CriteriaTreeID, Idx1");
|
||||
// 0 1 2 3 4 5 6 7 8
|
||||
QueryResult result = WorldDatabase.Query("SELECT CriteriaTreeID, BlobIndex, Idx1, MapID, UiMapID, Priority, Flags, WorldEffectID, PlayerConditionID FROM scenario_poi ORDER BY CriteriaTreeID, Idx1");
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_ERROR("server.loading", ">> Loaded 0 scenario POI definitions. DB table `scenario_poi` is empty.");
|
||||
@@ -188,24 +188,23 @@ void ScenarioMgr::LoadScenarioPOI()
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
int32 CriteriaTreeID = fields[0].GetInt32();
|
||||
int32 BlobIndex = fields[1].GetInt32();
|
||||
int32 Idx1 = fields[2].GetInt32();
|
||||
int32 MapID = fields[3].GetInt32();
|
||||
int32 WorldMapAreaId = fields[4].GetInt32();
|
||||
int32 Floor = fields[5].GetInt32();
|
||||
int32 Priority = fields[6].GetInt32();
|
||||
int32 Flags = fields[7].GetInt32();
|
||||
int32 WorldEffectID = fields[8].GetInt32();
|
||||
int32 PlayerConditionID = fields[9].GetInt32();
|
||||
int32 criteriaTreeID = fields[0].GetInt32();
|
||||
int32 blobIndex = fields[1].GetInt32();
|
||||
int32 idx1 = fields[2].GetInt32();
|
||||
int32 mapID = fields[3].GetInt32();
|
||||
int32 uiMapID = fields[4].GetInt32();
|
||||
int32 priority = fields[5].GetInt32();
|
||||
int32 flags = fields[6].GetInt32();
|
||||
int32 worldEffectID = fields[7].GetInt32();
|
||||
int32 playerConditionID = fields[8].GetInt32();
|
||||
|
||||
if (!sCriteriaMgr->GetCriteriaTree(CriteriaTreeID))
|
||||
TC_LOG_ERROR("sql.sql", "`scenario_poi` CriteriaTreeID (%u) Idx1 (%u) does not correspond to a valid criteria tree", CriteriaTreeID, Idx1);
|
||||
if (!sCriteriaMgr->GetCriteriaTree(criteriaTreeID))
|
||||
TC_LOG_ERROR("sql.sql", "`scenario_poi` CriteriaTreeID (%u) Idx1 (%u) does not correspond to a valid criteria tree", criteriaTreeID, idx1);
|
||||
|
||||
if (CriteriaTreeID < int32(POIs.size()) && Idx1 < int32(POIs[CriteriaTreeID].size()))
|
||||
_scenarioPOIStore[CriteriaTreeID].emplace_back(BlobIndex, MapID, WorldMapAreaId, Floor, Priority, Flags, WorldEffectID, PlayerConditionID, POIs[CriteriaTreeID][Idx1]);
|
||||
if (criteriaTreeID < int32(POIs.size()) && idx1 < int32(POIs[criteriaTreeID].size()))
|
||||
_scenarioPOIStore[criteriaTreeID].emplace_back(blobIndex, mapID, uiMapID, priority, flags, worldEffectID, playerConditionID, POIs[criteriaTreeID][idx1]);
|
||||
else
|
||||
TC_LOG_ERROR("server.loading", "Table scenario_poi references unknown scenario poi points for criteria tree id %i POI id %i", CriteriaTreeID, BlobIndex);
|
||||
TC_LOG_ERROR("server.loading", "Table scenario_poi references unknown scenario poi points for criteria tree id %i POI id %i", criteriaTreeID, blobIndex);
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
@@ -74,23 +74,22 @@ struct ScenarioPOI
|
||||
{
|
||||
int32 BlobIndex;
|
||||
int32 MapID;
|
||||
int32 WorldMapAreaID;
|
||||
int32 Floor;
|
||||
int32 UiMapID;
|
||||
int32 Priority;
|
||||
int32 Flags;
|
||||
int32 WorldEffectID;
|
||||
int32 PlayerConditionID;
|
||||
std::vector<ScenarioPOIPoint> Points;
|
||||
|
||||
ScenarioPOI() : BlobIndex(0), MapID(0), WorldMapAreaID(0), Floor(0), Priority(0), Flags(0), WorldEffectID(0), PlayerConditionID(0) { }
|
||||
ScenarioPOI() : BlobIndex(0), MapID(0), UiMapID(0), Priority(0), Flags(0), WorldEffectID(0), PlayerConditionID(0) { }
|
||||
|
||||
ScenarioPOI(int32 _BlobIndex, int32 _MapID, int32 _WorldMapAreaID, int32 _Floor, int32 _Priority, int32 _Flags, int32 _WorldEffectID,
|
||||
int32 _PlayerConditionID, std::vector<ScenarioPOIPoint> points) :
|
||||
BlobIndex(_BlobIndex), MapID(_MapID), WorldMapAreaID(_WorldMapAreaID), Floor(_Floor), Priority(_Priority), Flags(_Flags), WorldEffectID(_WorldEffectID),
|
||||
PlayerConditionID(_PlayerConditionID), Points(std::move(points)) { }
|
||||
ScenarioPOI(int32 blobIndex, int32 mapID, int32 uiMapID, int32 priority, int32 flags, int32 worldEffectID,
|
||||
int32 playerConditionID, std::vector<ScenarioPOIPoint> points) :
|
||||
BlobIndex(blobIndex), MapID(mapID), UiMapID(uiMapID), Priority(priority), Flags(flags), WorldEffectID(worldEffectID),
|
||||
PlayerConditionID(playerConditionID), Points(std::move(points)) { }
|
||||
|
||||
ScenarioPOI(ScenarioPOI&& scenarioPOI) :
|
||||
BlobIndex(scenarioPOI.BlobIndex), MapID(scenarioPOI.MapID), WorldMapAreaID(scenarioPOI.WorldMapAreaID), Floor(scenarioPOI.Floor), Priority(scenarioPOI.Priority),
|
||||
BlobIndex(scenarioPOI.BlobIndex), MapID(scenarioPOI.MapID), UiMapID(scenarioPOI.UiMapID), Priority(scenarioPOI.Priority),
|
||||
Flags(scenarioPOI.Flags), WorldEffectID(scenarioPOI.WorldEffectID), PlayerConditionID(scenarioPOI.PlayerConditionID), Points(std::move(scenarioPOI.Points)) { }
|
||||
};
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace WorldPackets
|
||||
class AchievementDeleted final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
AchievementDeleted() : ServerPacket(SMSG_ACHIEVEMENT_DELETED, 4) { }
|
||||
AchievementDeleted() : ServerPacket(SMSG_ACHIEVEMENT_DELETED, 8) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::AreaTrigger::AreaTriggerS
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, AreaTriggerCircularMovementInfo const& areaTriggerCircularMovement)
|
||||
{
|
||||
data.WriteBit(areaTriggerCircularMovement.TargetGUID.is_initialized());
|
||||
data.WriteBit(areaTriggerCircularMovement.PathTarget.is_initialized());
|
||||
data.WriteBit(areaTriggerCircularMovement.Center.is_initialized());
|
||||
data.WriteBit(areaTriggerCircularMovement.CounterClockwise);
|
||||
data.WriteBit(areaTriggerCircularMovement.CanLoop);
|
||||
@@ -46,8 +46,8 @@ ByteBuffer& operator<<(ByteBuffer& data, AreaTriggerCircularMovementInfo const&
|
||||
data << float(areaTriggerCircularMovement.InitialAngle);
|
||||
data << float(areaTriggerCircularMovement.ZOffset);
|
||||
|
||||
if (areaTriggerCircularMovement.TargetGUID)
|
||||
data << *areaTriggerCircularMovement.TargetGUID;
|
||||
if (areaTriggerCircularMovement.PathTarget)
|
||||
data << *areaTriggerCircularMovement.PathTarget;
|
||||
|
||||
if (areaTriggerCircularMovement.Center)
|
||||
data << *areaTriggerCircularMovement.Center;
|
||||
@@ -72,14 +72,6 @@ WorldPacket const* WorldPackets::AreaTrigger::AreaTriggerDenied::Write()
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::AreaTrigger::AreaTriggerRePath::Write()
|
||||
{
|
||||
_worldPacket << TriggerGUID;
|
||||
_worldPacket << AreaTriggerSpline;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::AreaTrigger::AreaTriggerReShape::Write()
|
||||
{
|
||||
_worldPacket << TriggerGUID;
|
||||
|
||||
|
||||
@@ -68,18 +68,7 @@ namespace WorldPackets
|
||||
class AreaTriggerRePath final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
AreaTriggerRePath() : ServerPacket(SMSG_AREA_TRIGGER_RE_PATH, 50) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
AreaTriggerSplineInfo AreaTriggerSpline;
|
||||
ObjectGuid TriggerGUID;
|
||||
};
|
||||
|
||||
class AreaTriggerReShape final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
AreaTriggerReShape() : ServerPacket(SMSG_AREA_TRIGGER_RE_SHAPE, 17) { }
|
||||
AreaTriggerRePath() : ServerPacket(SMSG_AREA_TRIGGER_RE_PATH, 17) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
|
||||
@@ -84,8 +84,6 @@ void WorldPackets::Auth::AuthSession::Read()
|
||||
uint32 realmJoinTicketSize;
|
||||
|
||||
_worldPacket >> DosResponse;
|
||||
_worldPacket >> Build;
|
||||
_worldPacket >> BuildType;
|
||||
_worldPacket >> RegionID;
|
||||
_worldPacket >> BattlegroupID;
|
||||
_worldPacket >> RealmID;
|
||||
@@ -145,6 +143,7 @@ WorldPacket const* WorldPackets::Auth::AuthResponse::Write()
|
||||
_worldPacket.WriteBit(SuccessInfo->ForceCharacterTemplate);
|
||||
_worldPacket.WriteBit(SuccessInfo->NumPlayersHorde.is_initialized());
|
||||
_worldPacket.WriteBit(SuccessInfo->NumPlayersAlliance.is_initialized());
|
||||
_worldPacket.WriteBit(SuccessInfo->ExpansionTrialExpiration.is_initialized());
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
{
|
||||
@@ -164,6 +163,9 @@ WorldPacket const* WorldPackets::Auth::AuthResponse::Write()
|
||||
if (SuccessInfo->NumPlayersAlliance)
|
||||
_worldPacket << uint16(*SuccessInfo->NumPlayersAlliance);
|
||||
|
||||
if (SuccessInfo->ExpansionTrialExpiration)
|
||||
_worldPacket << int32(*SuccessInfo->ExpansionTrialExpiration);
|
||||
|
||||
for (VirtualRealmInfo const& virtualRealm : SuccessInfo->VirtualRealms)
|
||||
_worldPacket << virtualRealm;
|
||||
|
||||
|
||||
@@ -83,8 +83,6 @@ namespace WorldPackets
|
||||
Digest.fill(0);
|
||||
}
|
||||
|
||||
uint16 Build = 0;
|
||||
int8 BuildType = 0;
|
||||
uint32 RegionID = 0;
|
||||
uint32 BattlegroupID = 0;
|
||||
uint32 RealmID = 0;
|
||||
@@ -159,6 +157,7 @@ namespace WorldPackets
|
||||
bool ForceCharacterTemplate = false; ///< forces the client to always use a character template when creating a new character. @see Templates. @todo implement
|
||||
Optional<uint16> NumPlayersHorde; ///< number of horde players in this realm. @todo implement
|
||||
Optional<uint16> NumPlayersAlliance; ///< number of alliance players in this realm. @todo implement
|
||||
Optional<int32> ExpansionTrialExpiration; ///< expansion trial expiration unix timestamp
|
||||
};
|
||||
|
||||
AuthResponse();
|
||||
|
||||
@@ -67,9 +67,11 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Battleground::PVPLogData:
|
||||
data << uint32(playerData.HealingDone);
|
||||
data << uint32(playerData.Stats.size());
|
||||
data << int32(playerData.PrimaryTalentTree);
|
||||
data << int32(playerData.PrimaryTalentTreeNameIndex);
|
||||
data << int32(playerData.Sex);
|
||||
data << int32(playerData.Race);
|
||||
data << uint32(playerData.Prestige);
|
||||
data << int32(playerData.Class);
|
||||
data << int32(playerData.CreatureID);
|
||||
data << int32(playerData.HonorLevel);
|
||||
if (!playerData.Stats.empty())
|
||||
data.append(playerData.Stats.data(), playerData.Stats.size());
|
||||
|
||||
@@ -89,13 +91,13 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Battleground::PVPLogData:
|
||||
data << uint32(*playerData.PreMatchRating);
|
||||
|
||||
if (playerData.RatingChange)
|
||||
data << uint32(*playerData.RatingChange);
|
||||
data << int32(*playerData.RatingChange);
|
||||
|
||||
if (playerData.PreMatchMMR)
|
||||
data << uint32(*playerData.PreMatchMMR);
|
||||
|
||||
if (playerData.MmrChange)
|
||||
data << uint32(*playerData.MmrChange);
|
||||
data << int32(*playerData.MmrChange);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -122,9 +122,11 @@ namespace WorldPackets
|
||||
Optional<int32> MmrChange;
|
||||
std::vector<int32> Stats;
|
||||
int32 PrimaryTalentTree = 0;
|
||||
int32 PrimaryTalentTreeNameIndex = 0; // controls which name field from ChrSpecialization.dbc will be sent to lua
|
||||
int32 Sex = 0;
|
||||
int32 Race = 0;
|
||||
uint32 Prestige = 0;
|
||||
int32 Class = 0;
|
||||
int32 CreatureID = 0;
|
||||
int32 HonorLevel = 0;
|
||||
};
|
||||
|
||||
Optional<uint8> Winner;
|
||||
|
||||
@@ -24,7 +24,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Calendar::CalendarSendCal
|
||||
data.AppendPackedTime(eventInfo.Date);
|
||||
data << uint32(eventInfo.Flags);
|
||||
data << int32(eventInfo.TextureID);
|
||||
data << eventInfo.EventGuildID;
|
||||
data << uint64(eventInfo.EventClubID);
|
||||
data << eventInfo.OwnerGuid;
|
||||
|
||||
data.WriteBits(eventInfo.EventName.size(), 8);
|
||||
@@ -82,6 +82,7 @@ void WorldPackets::Calendar::CalendarGetEvent::Read()
|
||||
|
||||
void WorldPackets::Calendar::CalendarCommunityFilter::Read()
|
||||
{
|
||||
_worldPacket >> ClubID;
|
||||
_worldPacket >> MinLevel;
|
||||
_worldPacket >> MaxLevel;
|
||||
_worldPacket >> MaxRankOrder;
|
||||
@@ -92,26 +93,45 @@ ByteBuffer& operator>>(ByteBuffer& buffer, WorldPackets::Calendar::CalendarAddEv
|
||||
buffer >> invite.Guid;
|
||||
buffer >> invite.Status;
|
||||
buffer >> invite.Moderator;
|
||||
if (buffer.ReadBit())
|
||||
invite.Unused_801_1 = boost::in_place();
|
||||
|
||||
if (buffer.ReadBit())
|
||||
invite.Unused_801_2 = boost::in_place();
|
||||
|
||||
if (buffer.ReadBit())
|
||||
invite.Unused_801_3 = boost::in_place();
|
||||
|
||||
if (invite.Unused_801_1)
|
||||
buffer >> *invite.Unused_801_1;
|
||||
|
||||
if (invite.Unused_801_2)
|
||||
buffer >> *invite.Unused_801_2;
|
||||
|
||||
if (invite.Unused_801_3)
|
||||
buffer >> *invite.Unused_801_3;
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
ByteBuffer& operator>>(ByteBuffer& buffer, WorldPackets::Calendar::CalendarAddEventInfo& addEventInfo)
|
||||
{
|
||||
uint8 titleLength = buffer.ReadBits(8);
|
||||
uint16 descriptionLength = buffer.ReadBits(11);
|
||||
|
||||
buffer >> addEventInfo.ClubID;
|
||||
buffer >> addEventInfo.EventType;
|
||||
buffer >> addEventInfo.TextureID;
|
||||
addEventInfo.Time = buffer.ReadPackedTime();
|
||||
buffer >> addEventInfo.Flags;
|
||||
addEventInfo.Invites.resize(buffer.read<uint32>());
|
||||
|
||||
addEventInfo.Title = buffer.ReadString(titleLength);
|
||||
addEventInfo.Description = buffer.ReadString(descriptionLength);
|
||||
uint8 titleLength = buffer.ReadBits(8);
|
||||
uint16 descriptionLength = buffer.ReadBits(11);
|
||||
|
||||
for (WorldPackets::Calendar::CalendarAddEventInviteInfo& invite : addEventInfo.Invites)
|
||||
buffer >> invite;
|
||||
|
||||
addEventInfo.Title = buffer.ReadString(titleLength);
|
||||
addEventInfo.Description = buffer.ReadString(descriptionLength);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
@@ -121,20 +141,28 @@ void WorldPackets::Calendar::CalendarAddEvent::Read()
|
||||
_worldPacket >> MaxSize;
|
||||
}
|
||||
|
||||
ByteBuffer& operator>>(ByteBuffer& buffer, WorldPackets::Calendar::CalendarUpdateEventInfo& updateEventInfo)
|
||||
{
|
||||
buffer >> updateEventInfo.ClubID;
|
||||
buffer >> updateEventInfo.EventID;
|
||||
buffer >> updateEventInfo.ModeratorID;
|
||||
buffer >> updateEventInfo.EventType;
|
||||
buffer >> updateEventInfo.TextureID;
|
||||
updateEventInfo.Time = buffer.ReadPackedTime();
|
||||
buffer >> updateEventInfo.Flags;
|
||||
|
||||
uint8 titleLen = buffer.ReadBits(8);
|
||||
uint16 descLen = buffer.ReadBits(11);
|
||||
|
||||
updateEventInfo.Title = buffer.ReadString(titleLen);
|
||||
updateEventInfo.Description = buffer.ReadString(descLen);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
void WorldPackets::Calendar::CalendarUpdateEvent::Read()
|
||||
{
|
||||
_worldPacket >> EventInfo.EventID;
|
||||
_worldPacket >> EventInfo.ModeratorID;
|
||||
_worldPacket >> EventInfo.EventType;
|
||||
_worldPacket >> EventInfo.TextureID;
|
||||
EventInfo.Time = _worldPacket.ReadPackedTime();
|
||||
_worldPacket >> EventInfo.Flags;
|
||||
|
||||
uint8 titleLen = _worldPacket.ReadBits(8);
|
||||
uint16 descLen = _worldPacket.ReadBits(11);
|
||||
|
||||
EventInfo.Title = _worldPacket.ReadString(titleLen);
|
||||
EventInfo.Description = _worldPacket.ReadString(descLen);
|
||||
_worldPacket >> EventInfo;
|
||||
_worldPacket >> MaxSize;
|
||||
}
|
||||
|
||||
@@ -142,6 +170,7 @@ void WorldPackets::Calendar::CalendarRemoveEvent::Read()
|
||||
{
|
||||
_worldPacket >> EventID;
|
||||
_worldPacket >> ModeratorID;
|
||||
_worldPacket >> ClubID;
|
||||
_worldPacket >> Flags;
|
||||
}
|
||||
|
||||
@@ -149,6 +178,7 @@ void WorldPackets::Calendar::CalendarCopyEvent::Read()
|
||||
{
|
||||
_worldPacket >> EventID;
|
||||
_worldPacket >> ModeratorID;
|
||||
_worldPacket >> EventClubID;
|
||||
Date = _worldPacket.ReadPackedTime();
|
||||
}
|
||||
|
||||
@@ -163,6 +193,7 @@ void WorldPackets::Calendar::CalendarEventInvite::Read()
|
||||
{
|
||||
_worldPacket >> EventID;
|
||||
_worldPacket >> ModeratorID;
|
||||
_worldPacket >> ClubID;
|
||||
|
||||
uint16 nameLen = _worldPacket.ReadBits(9);
|
||||
Creating = _worldPacket.ReadBit();
|
||||
@@ -174,6 +205,7 @@ void WorldPackets::Calendar::CalendarEventInvite::Read()
|
||||
void WorldPackets::Calendar::CalendarEventSignUp::Read()
|
||||
{
|
||||
_worldPacket >> EventID;
|
||||
_worldPacket >> ClubID;
|
||||
Tentative = _worldPacket.ReadBit();
|
||||
}
|
||||
|
||||
@@ -255,7 +287,7 @@ WorldPacket const* WorldPackets::Calendar::CalendarSendEvent::Write()
|
||||
_worldPacket << uint32(Flags);
|
||||
_worldPacket.AppendPackedTime(Date);
|
||||
_worldPacket << uint32(LockDate);
|
||||
_worldPacket << EventGuildID;
|
||||
_worldPacket << uint64(EventClubID);
|
||||
_worldPacket << uint32(Invites.size());
|
||||
_worldPacket.WriteBits(EventName.size(), 8);
|
||||
_worldPacket.WriteBits(Description.size(), 11);
|
||||
@@ -277,7 +309,7 @@ WorldPacket const* WorldPackets::Calendar::CalendarEventInviteAlert::Write()
|
||||
_worldPacket << uint32(Flags);
|
||||
_worldPacket << uint8(EventType);
|
||||
_worldPacket << int32(TextureID);
|
||||
_worldPacket << EventGuildID;
|
||||
_worldPacket << uint64(EventClubID);
|
||||
_worldPacket << uint64(InviteID);
|
||||
_worldPacket << uint8(Status);
|
||||
_worldPacket << uint8(ModeratorStatus);
|
||||
@@ -344,6 +376,7 @@ WorldPacket const* WorldPackets::Calendar::CalendarEventInviteRemovedAlert::Writ
|
||||
|
||||
WorldPacket const* WorldPackets::Calendar::CalendarEventUpdatedAlert::Write()
|
||||
{
|
||||
_worldPacket << uint64(EventClubID);
|
||||
_worldPacket << uint64(EventID);
|
||||
|
||||
_worldPacket.AppendPackedTime(OriginalDate);
|
||||
@@ -462,8 +495,8 @@ WorldPacket const* WorldPackets::Calendar::CalendarEventInviteNotes::Write()
|
||||
_worldPacket << InviteGuid;
|
||||
_worldPacket << uint64(EventID);
|
||||
|
||||
_worldPacket.WriteBits(Notes.size(), 8);
|
||||
_worldPacket.WriteBit(ClearPending);
|
||||
_worldPacket.WriteBits(Notes.size(), 8);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket.WriteString(Notes);
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ namespace WorldPackets
|
||||
|
||||
void Read() override;
|
||||
|
||||
uint64 ClubID = 0;
|
||||
uint8 MinLevel = 1;
|
||||
uint8 MaxLevel = 100;
|
||||
uint8 MaxRankOrder = 0;
|
||||
@@ -62,10 +63,14 @@ namespace WorldPackets
|
||||
ObjectGuid Guid;
|
||||
uint8 Status = 0;
|
||||
uint8 Moderator = 0;
|
||||
Optional<ObjectGuid> Unused_801_1;
|
||||
Optional<uint64> Unused_801_2;
|
||||
Optional<uint64> Unused_801_3;
|
||||
};
|
||||
|
||||
struct CalendarAddEventInfo
|
||||
{
|
||||
uint64 ClubID = 0;
|
||||
std::string Title;
|
||||
std::string Description;
|
||||
uint8 EventType = 0;
|
||||
@@ -88,6 +93,7 @@ namespace WorldPackets
|
||||
|
||||
struct CalendarUpdateEventInfo
|
||||
{
|
||||
uint64 ClubID = 0;
|
||||
uint64 EventID = 0;
|
||||
uint64 ModeratorID = 0;
|
||||
std::string Title;
|
||||
@@ -118,6 +124,7 @@ namespace WorldPackets
|
||||
|
||||
uint64 ModeratorID = 0;
|
||||
uint64 EventID = 0;
|
||||
uint64 ClubID = 0;
|
||||
uint32 Flags = 0;
|
||||
};
|
||||
|
||||
@@ -130,6 +137,7 @@ namespace WorldPackets
|
||||
|
||||
uint64 ModeratorID = 0;
|
||||
uint64 EventID = 0;
|
||||
uint64 EventClubID = 0;
|
||||
time_t Date = time_t(0);
|
||||
};
|
||||
|
||||
@@ -176,7 +184,7 @@ namespace WorldPackets
|
||||
time_t Date = time_t(0);
|
||||
uint32 Flags = 0;
|
||||
int32 TextureID = 0;
|
||||
ObjectGuid EventGuildID;
|
||||
uint64 EventClubID = 0;
|
||||
ObjectGuid OwnerGuid;
|
||||
};
|
||||
|
||||
@@ -213,7 +221,7 @@ namespace WorldPackets
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
ObjectGuid OwnerGuid;
|
||||
ObjectGuid EventGuildID;
|
||||
uint64 EventClubID = 0;
|
||||
uint64 EventID = 0;
|
||||
time_t Date = time_t(0);
|
||||
time_t LockDate = time_t(0);
|
||||
@@ -234,7 +242,7 @@ namespace WorldPackets
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
ObjectGuid OwnerGuid;
|
||||
ObjectGuid EventGuildID;
|
||||
uint64 EventClubID = 0;
|
||||
ObjectGuid InvitedByGuid;
|
||||
uint64 InviteID = 0;
|
||||
uint64 EventID = 0;
|
||||
@@ -258,6 +266,7 @@ namespace WorldPackets
|
||||
bool IsSignUp = false;
|
||||
bool Creating = true;
|
||||
uint64 EventID = 0;
|
||||
uint64 ClubID = 0;
|
||||
std::string Name;
|
||||
};
|
||||
|
||||
@@ -343,6 +352,7 @@ namespace WorldPackets
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
uint64 EventClubID = 0;
|
||||
uint64 EventID = 0;
|
||||
time_t Date = time_t(0);
|
||||
uint32 Flags = 0;
|
||||
@@ -395,6 +405,7 @@ namespace WorldPackets
|
||||
|
||||
bool Tentative = false;
|
||||
uint64 EventID = 0;
|
||||
uint64 ClubID = 0;
|
||||
};
|
||||
|
||||
class CalendarRemoveInvite final : public ClientPacket
|
||||
|
||||
@@ -140,6 +140,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Character::EnumCharacters
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Character::EnumCharactersResult::CharacterInfo const& charInfo)
|
||||
{
|
||||
data << charInfo.Guid;
|
||||
data << uint64(charInfo.GuildClubMemberID);
|
||||
data << uint8(charInfo.ListPosition);
|
||||
data << uint8(charInfo.Race);
|
||||
data << uint8(charInfo.Class);
|
||||
@@ -201,9 +202,9 @@ WorldPacket const* WorldPackets::Character::EnumCharactersResult::Write()
|
||||
|
||||
_worldPacket.WriteBit(Success);
|
||||
_worldPacket.WriteBit(IsDeletedCharacters);
|
||||
_worldPacket.WriteBit(IsDemonHunterCreationAllowed);
|
||||
_worldPacket.WriteBit(IsTestDemonHunterCreationAllowed);
|
||||
_worldPacket.WriteBit(HasDemonHunterOnRealm);
|
||||
_worldPacket.WriteBit(Unknown7x);
|
||||
_worldPacket.WriteBit(IsDemonHunterCreationAllowed);
|
||||
_worldPacket.WriteBit(DisabledClassesMask.is_initialized());
|
||||
_worldPacket.WriteBit(IsAlliedRacesCreationAllowed);
|
||||
_worldPacket << uint32(Characters.size());
|
||||
@@ -227,6 +228,7 @@ void WorldPackets::Character::CreateCharacter::Read()
|
||||
CreateInfo.reset(new CharacterCreateInfo());
|
||||
uint32 nameLength = _worldPacket.ReadBits(6);
|
||||
bool const hasTemplateSet = _worldPacket.ReadBit();
|
||||
CreateInfo->IsTrialBoost = _worldPacket.ReadBit();
|
||||
|
||||
_worldPacket >> CreateInfo->Race;
|
||||
_worldPacket >> CreateInfo->Class;
|
||||
@@ -246,6 +248,7 @@ void WorldPackets::Character::CreateCharacter::Read()
|
||||
WorldPacket const* WorldPackets::Character::CreateChar::Write()
|
||||
{
|
||||
_worldPacket << uint8(Code);
|
||||
_worldPacket << Guid;
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace WorldPackets
|
||||
std::array<uint8, PLAYER_CUSTOM_DISPLAY_SIZE> CustomDisplay = { };
|
||||
uint8 OutfitId = 0;
|
||||
Optional<int32> TemplateSet;
|
||||
bool IsTrialBoost = false;
|
||||
std::string Name;
|
||||
|
||||
/// Server side data
|
||||
@@ -121,6 +122,7 @@ namespace WorldPackets
|
||||
CharacterInfo(Field* fields);
|
||||
|
||||
ObjectGuid Guid;
|
||||
uint64 GuildClubMemberID = 0; ///< same as bgs.protocol.club.v1.MemberId.unique_id, guessed basing on SMSG_QUERY_PLAYER_NAME_RESPONSE (that one is known)
|
||||
std::string Name;
|
||||
uint8 ListPosition = 0; ///< Order of the characters in list
|
||||
uint8 Race = 0;
|
||||
@@ -170,22 +172,22 @@ namespace WorldPackets
|
||||
|
||||
struct RaceUnlock
|
||||
{
|
||||
int32 RaceID;
|
||||
bool HasExpansion;
|
||||
bool HasAchievement;
|
||||
bool HasHeritageArmor;
|
||||
int32 RaceID = 0;
|
||||
bool HasExpansion = false;
|
||||
bool HasAchievement = false;
|
||||
bool HasHeritageArmor = false;
|
||||
};
|
||||
|
||||
EnumCharactersResult() : ServerPacket(SMSG_ENUM_CHARACTERS_RESULT) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
bool Success = false; ///<
|
||||
bool IsDeletedCharacters = false; ///< used for character undelete list
|
||||
bool IsDemonHunterCreationAllowed = false; ///< used for demon hunter early access
|
||||
bool HasDemonHunterOnRealm = false;
|
||||
bool Unknown7x = false;
|
||||
bool IsAlliedRacesCreationAllowed = false;
|
||||
bool Success = false; ///<
|
||||
bool IsDeletedCharacters = false; ///< used for character undelete list
|
||||
bool IsTestDemonHunterCreationAllowed = false; ///< allows client to skip 1 per realm and level 70 requirements
|
||||
bool HasDemonHunterOnRealm = false;
|
||||
bool IsDemonHunterCreationAllowed = false; ///< used for demon hunter early access
|
||||
bool IsAlliedRacesCreationAllowed = false;
|
||||
|
||||
int32 MaxCharacterLevel = 1;
|
||||
Optional<uint32> DisabledClassesMask;
|
||||
@@ -225,6 +227,7 @@ namespace WorldPackets
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
uint8 Code = 0; ///< Result code @see enum ResponseCodes
|
||||
ObjectGuid Guid;
|
||||
};
|
||||
|
||||
class CharDelete final : public ClientPacket
|
||||
@@ -537,7 +540,7 @@ namespace WorldPackets
|
||||
class InitialSetup final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
InitialSetup() : ServerPacket(SMSG_INITIAL_SETUP, 1 + 1 + 4 + 4) { }
|
||||
InitialSetup() : ServerPacket(SMSG_INITIAL_SETUP, 1 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ void WorldPackets::Chat::ChatAddonMessageTargeted::Read()
|
||||
_worldPacket.ResetBitPos();
|
||||
|
||||
_worldPacket >> Params;
|
||||
Target = _worldPacket.ReadString(targetLen);
|
||||
}
|
||||
|
||||
void WorldPackets::Chat::ChatMessageDND::Read()
|
||||
@@ -159,17 +160,17 @@ void WorldPackets::Chat::Chat::SetReceiver(WorldObject const* receiver, LocaleCo
|
||||
|
||||
WorldPacket const* WorldPackets::Chat::Chat::Write()
|
||||
{
|
||||
_worldPacket << SlashCmd;
|
||||
_worldPacket << _Language;
|
||||
_worldPacket << uint8(SlashCmd);
|
||||
_worldPacket << uint32(_Language);
|
||||
_worldPacket << SenderGUID;
|
||||
_worldPacket << SenderGuildGUID;
|
||||
_worldPacket << SenderAccountGUID;
|
||||
_worldPacket << TargetGUID;
|
||||
_worldPacket << TargetVirtualAddress;
|
||||
_worldPacket << SenderVirtualAddress;
|
||||
_worldPacket << uint32(TargetVirtualAddress);
|
||||
_worldPacket << uint32(SenderVirtualAddress);
|
||||
_worldPacket << PartyGUID;
|
||||
_worldPacket << AchievementID;
|
||||
_worldPacket << DisplayTime;
|
||||
_worldPacket << uint32(AchievementID);
|
||||
_worldPacket << float(DisplayTime);
|
||||
_worldPacket.WriteBits(SenderName.length(), 11);
|
||||
_worldPacket.WriteBits(TargetName.length(), 11);
|
||||
_worldPacket.WriteBits(Prefix.length(), 5);
|
||||
@@ -178,6 +179,7 @@ WorldPacket const* WorldPackets::Chat::Chat::Write()
|
||||
_worldPacket.WriteBits(_ChatFlags, 11);
|
||||
_worldPacket.WriteBit(HideChatLog);
|
||||
_worldPacket.WriteBit(FakeSenderName);
|
||||
_worldPacket.WriteBit(Unused_801.is_initialized());
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket.WriteString(SenderName);
|
||||
@@ -186,6 +188,9 @@ WorldPacket const* WorldPackets::Chat::Chat::Write()
|
||||
_worldPacket.WriteString(_Channel);
|
||||
_worldPacket.WriteString(ChatText);
|
||||
|
||||
if (Unused_801)
|
||||
_worldPacket << uint32(*Unused_801);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace WorldPackets
|
||||
class ChatMessageWhisper final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
ChatMessageWhisper(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
|
||||
ChatMessageWhisper(WorldPacket&& packet) : ClientPacket(CMSG_CHAT_MESSAGE_WHISPER, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace WorldPackets
|
||||
class ChatMessageChannel final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
ChatMessageChannel(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
|
||||
ChatMessageChannel(WorldPacket&& packet) : ClientPacket(CMSG_CHAT_MESSAGE_CHANNEL, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace WorldPackets
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
uint8 SlashCmd = 0; ///< @see enum ChatMsg
|
||||
uint8 _Language = LANG_UNIVERSAL;
|
||||
uint32 _Language = LANG_UNIVERSAL;
|
||||
ObjectGuid SenderGUID;
|
||||
ObjectGuid SenderGuildGUID;
|
||||
ObjectGuid SenderAccountGUID;
|
||||
@@ -166,6 +166,7 @@ namespace WorldPackets
|
||||
uint32 AchievementID = 0;
|
||||
uint8 _ChatFlags = 0; ///< @see enum ChatFlags
|
||||
float DisplayTime = 0.0f;
|
||||
Optional<uint32> Unused_801;
|
||||
bool HideChatLog = false;
|
||||
bool FakeSenderName = false;
|
||||
};
|
||||
|
||||
@@ -26,6 +26,7 @@ WorldPacket const* WorldPackets::CombatLog::SpellNonMeleeDamageLog::Write()
|
||||
*this << int32(SpellID);
|
||||
*this << int32(SpellXSpellVisualID);
|
||||
*this << int32(Damage);
|
||||
*this << int32(OriginalDamage);
|
||||
*this << int32(Overkill);
|
||||
*this << uint8(SchoolMask);
|
||||
*this << int32(Absorbed);
|
||||
@@ -35,11 +36,11 @@ WorldPacket const* WorldPackets::CombatLog::SpellNonMeleeDamageLog::Write()
|
||||
WriteBits(Flags, 7);
|
||||
WriteBit(false); // Debug info
|
||||
WriteLogDataBit();
|
||||
WriteBit(SandboxScaling.is_initialized());
|
||||
WriteBit(ContentTuning.is_initialized());
|
||||
FlushBits();
|
||||
WriteLogData();
|
||||
if (SandboxScaling)
|
||||
*this << *SandboxScaling;
|
||||
if (ContentTuning)
|
||||
*this << *ContentTuning;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
@@ -61,12 +62,12 @@ WorldPacket const* WorldPackets::CombatLog::EnvironmentalDamageLog::Write()
|
||||
WorldPacket const* WorldPackets::CombatLog::SpellExecuteLog::Write()
|
||||
{
|
||||
*this << Caster;
|
||||
*this << SpellID;
|
||||
*this << int32(SpellID);
|
||||
*this << uint32(Effects.size());
|
||||
|
||||
for (SpellLogEffect const& effect : Effects)
|
||||
{
|
||||
*this << effect.Effect;
|
||||
*this << int32(effect.Effect);
|
||||
|
||||
*this << uint32(effect.PowerDrainTargets.size());
|
||||
*this << uint32(effect.ExtraAttacksTargets.size());
|
||||
@@ -78,32 +79,32 @@ WorldPacket const* WorldPackets::CombatLog::SpellExecuteLog::Write()
|
||||
for (SpellLogEffectPowerDrainParams const& powerDrainTarget : effect.PowerDrainTargets)
|
||||
{
|
||||
*this << powerDrainTarget.Victim;
|
||||
*this << powerDrainTarget.Points;
|
||||
*this << powerDrainTarget.PowerType;
|
||||
*this << powerDrainTarget.Amplitude;
|
||||
*this << uint32(powerDrainTarget.Points);
|
||||
*this << uint32(powerDrainTarget.PowerType);
|
||||
*this << float(powerDrainTarget.Amplitude);
|
||||
}
|
||||
|
||||
for (SpellLogEffectExtraAttacksParams const& extraAttacksTarget : effect.ExtraAttacksTargets)
|
||||
{
|
||||
*this << extraAttacksTarget.Victim;
|
||||
*this << extraAttacksTarget.NumAttacks;
|
||||
*this << uint32(extraAttacksTarget.NumAttacks);
|
||||
}
|
||||
|
||||
for (SpellLogEffectDurabilityDamageParams const& durabilityDamageTarget : effect.DurabilityDamageTargets)
|
||||
{
|
||||
*this << durabilityDamageTarget.Victim;
|
||||
*this << durabilityDamageTarget.ItemID;
|
||||
*this << durabilityDamageTarget.Amount;
|
||||
*this << int32(durabilityDamageTarget.ItemID);
|
||||
*this << int32(durabilityDamageTarget.Amount);
|
||||
}
|
||||
|
||||
for (SpellLogEffectGenericVictimParams const& genericVictimTarget : effect.GenericVictimTargets)
|
||||
*this << genericVictimTarget.Victim;
|
||||
|
||||
for (SpellLogEffectTradeSkillItemParams const& tradeSkillTarget : effect.TradeSkillTargets)
|
||||
*this << tradeSkillTarget.ItemID;
|
||||
*this << int32(tradeSkillTarget.ItemID);
|
||||
|
||||
for (SpellLogEffectFeedPetParams const& feedPetTarget : effect.FeedPetTargets)
|
||||
*this << feedPetTarget.ItemID;
|
||||
*this << int32(feedPetTarget.ItemID);
|
||||
}
|
||||
|
||||
WriteLogDataBit();
|
||||
@@ -119,13 +120,14 @@ WorldPacket const* WorldPackets::CombatLog::SpellHealLog::Write()
|
||||
*this << CasterGUID;
|
||||
*this << int32(SpellID);
|
||||
*this << int32(Health);
|
||||
*this << int32(OriginalHeal);
|
||||
*this << int32(OverHeal);
|
||||
*this << int32(Absorbed);
|
||||
WriteBit(Crit);
|
||||
WriteBit(CritRollMade.is_initialized());
|
||||
WriteBit(CritRollNeeded.is_initialized());
|
||||
WriteLogDataBit();
|
||||
WriteBit(SandboxScaling.is_initialized());
|
||||
WriteBit(ContentTuning.is_initialized());
|
||||
FlushBits();
|
||||
|
||||
WriteLogData();
|
||||
@@ -136,8 +138,8 @@ WorldPacket const* WorldPackets::CombatLog::SpellHealLog::Write()
|
||||
if (CritRollNeeded)
|
||||
*this << *CritRollNeeded;
|
||||
|
||||
if (SandboxScaling)
|
||||
*this << *SandboxScaling;
|
||||
if (ContentTuning)
|
||||
*this << *ContentTuning;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
@@ -155,24 +157,24 @@ WorldPacket const* WorldPackets::CombatLog::SpellPeriodicAuraLog::Write()
|
||||
{
|
||||
*this << int32(effect.Effect);
|
||||
*this << int32(effect.Amount);
|
||||
*this << int32(effect.OriginalDamage);
|
||||
*this << int32(effect.OverHealOrKill);
|
||||
*this << int32(effect.SchoolMaskOrPower);
|
||||
*this << int32(effect.AbsorbedOrAmplitude);
|
||||
*this << int32(effect.Resisted);
|
||||
WriteBit(effect.Crit);
|
||||
WriteBit(effect.DebugInfo.is_initialized());
|
||||
WriteBit(effect.SandboxScaling.is_initialized());
|
||||
WriteBit(effect.ContentTuning.is_initialized());
|
||||
FlushBits();
|
||||
|
||||
if (effect.SandboxScaling)
|
||||
*this << *effect.SandboxScaling;
|
||||
if (effect.ContentTuning)
|
||||
*this << *effect.ContentTuning;
|
||||
|
||||
if (effect.DebugInfo)
|
||||
{
|
||||
*this << float(effect.DebugInfo->CritRollMade);
|
||||
*this << float(effect.DebugInfo->CritRollNeeded);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
WriteLogData();
|
||||
@@ -280,6 +282,7 @@ WorldPacket const* WorldPackets::CombatLog::SpellDamageShield::Write()
|
||||
*this << Defender;
|
||||
*this << int32(SpellID);
|
||||
*this << int32(TotalDamage);
|
||||
*this << int32(OriginalDamage);
|
||||
*this << int32(OverKill);
|
||||
*this << int32(SchoolMask);
|
||||
*this << int32(LogAbsorbed);
|
||||
@@ -297,6 +300,7 @@ WorldPacket const* WorldPackets::CombatLog::AttackerStateUpdate::Write()
|
||||
attackRoundInfo << AttackerGUID;
|
||||
attackRoundInfo << VictimGUID;
|
||||
attackRoundInfo << int32(Damage);
|
||||
attackRoundInfo << int32(OriginalDamage);
|
||||
attackRoundInfo << int32(OverDamage);
|
||||
attackRoundInfo << uint8(SubDmg.is_initialized());
|
||||
if (SubDmg)
|
||||
@@ -338,15 +342,16 @@ WorldPacket const* WorldPackets::CombatLog::AttackerStateUpdate::Write()
|
||||
if (HitInfo & (HITINFO_BLOCK | HITINFO_UNK12))
|
||||
attackRoundInfo << float(Unk);
|
||||
|
||||
attackRoundInfo << uint8(SandboxScaling.Type);
|
||||
attackRoundInfo << uint8(SandboxScaling.TargetLevel);
|
||||
attackRoundInfo << uint8(SandboxScaling.Expansion);
|
||||
attackRoundInfo << uint8(SandboxScaling.Class);
|
||||
attackRoundInfo << uint8(SandboxScaling.TargetMinScalingLevel);
|
||||
attackRoundInfo << uint8(SandboxScaling.TargetMaxScalingLevel);
|
||||
attackRoundInfo << int16(SandboxScaling.PlayerLevelDelta);
|
||||
attackRoundInfo << int8(SandboxScaling.TargetScalingLevelDelta);
|
||||
attackRoundInfo << uint16(SandboxScaling.PlayerItemLevel);
|
||||
attackRoundInfo << uint8(ContentTuning.Type);
|
||||
attackRoundInfo << uint8(ContentTuning.TargetLevel);
|
||||
attackRoundInfo << uint8(ContentTuning.Expansion);
|
||||
attackRoundInfo << uint8(ContentTuning.TargetMinScalingLevel);
|
||||
attackRoundInfo << uint8(ContentTuning.TargetMaxScalingLevel);
|
||||
attackRoundInfo << int16(ContentTuning.PlayerLevelDelta);
|
||||
attackRoundInfo << int8(ContentTuning.TargetScalingLevelDelta);
|
||||
attackRoundInfo << uint16(ContentTuning.PlayerItemLevel);
|
||||
attackRoundInfo << uint16(ContentTuning.ScalingHealthItemLevelCurveID);
|
||||
attackRoundInfo << uint8(ContentTuning.ScalesWithItemLevel ? 1 : 0);
|
||||
|
||||
WriteLogDataBit();
|
||||
FlushBits();
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace WorldPackets
|
||||
int32 SpellID = 0;
|
||||
int32 SpellXSpellVisualID = 0;
|
||||
int32 Damage = 0;
|
||||
int32 OriginalDamage = 0;
|
||||
int32 Overkill = -1;
|
||||
uint8 SchoolMask = 0;
|
||||
int32 ShieldBlock = 0;
|
||||
@@ -47,7 +48,7 @@ namespace WorldPackets
|
||||
int32 Absorbed = 0;
|
||||
int32 Flags = 0;
|
||||
// Optional<SpellNonMeleeDamageLogDebugInfo> DebugInfo;
|
||||
Optional<Spells::SandboxScalingData> SandboxScaling;
|
||||
Optional<Spells::ContentTuningParams> ContentTuning;
|
||||
};
|
||||
|
||||
class EnvironmentalDamageLog final : public CombatLogServerPacket
|
||||
@@ -99,12 +100,13 @@ namespace WorldPackets
|
||||
ObjectGuid TargetGUID;
|
||||
int32 SpellID = 0;
|
||||
int32 Health = 0;
|
||||
int32 OriginalHeal = 0;
|
||||
int32 OverHeal = 0;
|
||||
int32 Absorbed = 0;
|
||||
bool Crit = false;
|
||||
Optional<float> CritRollMade;
|
||||
Optional<float> CritRollNeeded;
|
||||
Optional<Spells::SandboxScalingData> SandboxScaling;
|
||||
Optional<Spells::ContentTuningParams> ContentTuning;
|
||||
};
|
||||
|
||||
class SpellPeriodicAuraLog final : public CombatLogServerPacket
|
||||
@@ -120,13 +122,14 @@ namespace WorldPackets
|
||||
{
|
||||
int32 Effect = 0;
|
||||
int32 Amount = 0;
|
||||
int32 OriginalDamage = 0;
|
||||
int32 OverHealOrKill = 0;
|
||||
int32 SchoolMaskOrPower = 0;
|
||||
int32 AbsorbedOrAmplitude = 0;
|
||||
int32 Resisted = 0;
|
||||
bool Crit = false;
|
||||
Optional<PeriodicalAuraLogEffectDebugInfo> DebugInfo;
|
||||
Optional<Spells::SandboxScalingData> SandboxScaling;
|
||||
Optional<Spells::ContentTuningParams> ContentTuning;
|
||||
};
|
||||
|
||||
SpellPeriodicAuraLog() : CombatLogServerPacket(SMSG_SPELL_PERIODIC_AURA_LOG, 16 + 16 + 4 + 4 + 1) { }
|
||||
@@ -267,6 +270,7 @@ namespace WorldPackets
|
||||
ObjectGuid Defender;
|
||||
int32 SpellID = 0;
|
||||
int32 TotalDamage = 0;
|
||||
int32 OriginalDamage = 0;
|
||||
int32 OverKill = 0;
|
||||
int32 SchoolMask = 0;
|
||||
int32 LogAbsorbed = 0;
|
||||
@@ -308,6 +312,7 @@ namespace WorldPackets
|
||||
ObjectGuid AttackerGUID;
|
||||
ObjectGuid VictimGUID;
|
||||
int32 Damage = 0;
|
||||
int32 OriginalDamage = 0;
|
||||
int32 OverDamage = -1; // (damage - health) or -1 if unit is still alive
|
||||
Optional<SubDamage> SubDmg;
|
||||
uint8 VictimState = 0;
|
||||
@@ -317,7 +322,7 @@ namespace WorldPackets
|
||||
int32 RageGained = 0;
|
||||
UnkAttackerState UnkState;
|
||||
float Unk = 0.0f;
|
||||
Spells::SandboxScalingData SandboxScaling;
|
||||
Spells::ContentTuningParams ContentTuning;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ void WorldPackets::Spells::SpellCastLogData::Initialize(Unit const* unit)
|
||||
Health = unit->GetHealth();
|
||||
AttackPower = unit->GetTotalAttackPowerValue(unit->getClass() == CLASS_HUNTER ? RANGED_ATTACK : BASE_ATTACK);
|
||||
SpellPower = unit->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_SPELL);
|
||||
Armor = unit->GetArmor();
|
||||
PowerData.emplace_back(int32(unit->GetPowerType()), unit->GetPower(unit->GetPowerType()), int32(0));
|
||||
}
|
||||
|
||||
@@ -35,6 +36,7 @@ void WorldPackets::Spells::SpellCastLogData::Initialize(Spell const* spell)
|
||||
Health = spell->GetCaster()->GetHealth();
|
||||
AttackPower = spell->GetCaster()->GetTotalAttackPowerValue(spell->GetCaster()->getClass() == CLASS_HUNTER ? RANGED_ATTACK : BASE_ATTACK);
|
||||
SpellPower = spell->GetCaster()->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_SPELL);
|
||||
Armor = spell->GetCaster()->GetArmor();
|
||||
Powers primaryPowerType = spell->GetCaster()->GetPowerType();
|
||||
bool primaryPowerAdded = false;
|
||||
for (SpellPowerCost const& cost : spell->GetPowerCost())
|
||||
@@ -53,22 +55,22 @@ namespace WorldPackets
|
||||
namespace Spells
|
||||
{
|
||||
template<class T, class U>
|
||||
bool SandboxScalingData::GenerateDataForUnits(T* /*attacker*/, U* /*target*/)
|
||||
bool ContentTuningParams::GenerateDataForUnits(T* /*attacker*/, U* /*target*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template<>
|
||||
bool SandboxScalingData::GenerateDataForUnits<Creature, Player>(Creature* attacker, Player* target)
|
||||
bool ContentTuningParams::GenerateDataForUnits<Creature, Player>(Creature* attacker, Player* target)
|
||||
{
|
||||
CreatureTemplate const* creatureTemplate = attacker->GetCreatureTemplate();
|
||||
|
||||
Type = TYPE_CREATURE_TO_PLAYER_DAMAGE;
|
||||
PlayerLevelDelta = target->GetInt32Value(ACTIVE_PLAYER_FIELD_SCALING_PLAYER_LEVEL_DELTA);
|
||||
PlayerItemLevel = target->GetAverageItemLevel();
|
||||
ScalingHealthItemLevelCurveID = target->GetUInt32Value(UNIT_FIELD_SCALING_HEALTH_ITEM_LEVEL_CURVE_ID);
|
||||
TargetLevel = target->getLevel();
|
||||
Expansion = creatureTemplate->RequiredExpansion;
|
||||
Class = creatureTemplate->unit_class;
|
||||
TargetMinScalingLevel = uint8(creatureTemplate->levelScaling->MinLevel);
|
||||
TargetMaxScalingLevel = uint8(creatureTemplate->levelScaling->MaxLevel);
|
||||
TargetScalingLevelDelta = int8(attacker->GetInt32Value(UNIT_FIELD_SCALING_LEVEL_DELTA));
|
||||
@@ -76,16 +78,16 @@ namespace WorldPackets
|
||||
}
|
||||
|
||||
template<>
|
||||
bool SandboxScalingData::GenerateDataForUnits<Player, Creature>(Player* attacker, Creature* target)
|
||||
bool ContentTuningParams::GenerateDataForUnits<Player, Creature>(Player* attacker, Creature* target)
|
||||
{
|
||||
CreatureTemplate const* creatureTemplate = target->GetCreatureTemplate();
|
||||
|
||||
Type = TYPE_PLAYER_TO_CREATURE_DAMAGE;
|
||||
PlayerLevelDelta = attacker->GetInt32Value(ACTIVE_PLAYER_FIELD_SCALING_PLAYER_LEVEL_DELTA);
|
||||
PlayerItemLevel = attacker->GetAverageItemLevel();
|
||||
ScalingHealthItemLevelCurveID = target->GetUInt32Value(UNIT_FIELD_SCALING_HEALTH_ITEM_LEVEL_CURVE_ID);
|
||||
TargetLevel = target->getLevel();
|
||||
Expansion = creatureTemplate->RequiredExpansion;
|
||||
Class = creatureTemplate->unit_class;
|
||||
TargetMinScalingLevel = uint8(creatureTemplate->levelScaling->MinLevel);
|
||||
TargetMaxScalingLevel = uint8(creatureTemplate->levelScaling->MaxLevel);
|
||||
TargetScalingLevelDelta = int8(target->GetInt32Value(UNIT_FIELD_SCALING_LEVEL_DELTA));
|
||||
@@ -93,7 +95,7 @@ namespace WorldPackets
|
||||
}
|
||||
|
||||
template<>
|
||||
bool SandboxScalingData::GenerateDataForUnits<Creature, Creature>(Creature* attacker, Creature* target)
|
||||
bool ContentTuningParams::GenerateDataForUnits<Creature, Creature>(Creature* attacker, Creature* target)
|
||||
{
|
||||
Creature* accessor = target->HasScalableLevels() ? target : attacker;
|
||||
CreatureTemplate const* creatureTemplate = accessor->GetCreatureTemplate();
|
||||
@@ -103,7 +105,6 @@ namespace WorldPackets
|
||||
PlayerItemLevel = 0;
|
||||
TargetLevel = target->getLevel();
|
||||
Expansion = creatureTemplate->RequiredExpansion;
|
||||
Class = creatureTemplate->unit_class;
|
||||
TargetMinScalingLevel = uint8(creatureTemplate->levelScaling->MinLevel);
|
||||
TargetMaxScalingLevel = uint8(creatureTemplate->levelScaling->MaxLevel);
|
||||
TargetScalingLevelDelta = int8(accessor->GetInt32Value(UNIT_FIELD_SCALING_LEVEL_DELTA));
|
||||
@@ -111,7 +112,7 @@ namespace WorldPackets
|
||||
}
|
||||
|
||||
template<>
|
||||
bool SandboxScalingData::GenerateDataForUnits<Unit, Unit>(Unit* attacker, Unit* target)
|
||||
bool ContentTuningParams::GenerateDataForUnits<Unit, Unit>(Unit* attacker, Unit* target)
|
||||
{
|
||||
if (Player* playerAttacker = attacker->ToPlayer())
|
||||
{
|
||||
@@ -152,6 +153,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellCastLogData
|
||||
data << int64(spellCastLogData.Health);
|
||||
data << int32(spellCastLogData.AttackPower);
|
||||
data << int32(spellCastLogData.SpellPower);
|
||||
data << int32(spellCastLogData.Armor);
|
||||
data.WriteBits(spellCastLogData.PowerData.size(), 9);
|
||||
data.FlushBits();
|
||||
|
||||
@@ -165,16 +167,18 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellCastLogData
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SandboxScalingData const& sandboxScalingData)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::ContentTuningParams const& contentTuningParams)
|
||||
{
|
||||
data.WriteBits(sandboxScalingData.Type, 4);
|
||||
data << int16(sandboxScalingData.PlayerLevelDelta);
|
||||
data << uint16(sandboxScalingData.PlayerItemLevel);
|
||||
data << uint8(sandboxScalingData.TargetLevel);
|
||||
data << uint8(sandboxScalingData.Expansion);
|
||||
data << uint8(sandboxScalingData.Class);
|
||||
data << uint8(sandboxScalingData.TargetMinScalingLevel);
|
||||
data << uint8(sandboxScalingData.TargetMaxScalingLevel);
|
||||
data << int8(sandboxScalingData.TargetScalingLevelDelta);
|
||||
data << int16(contentTuningParams.PlayerLevelDelta);
|
||||
data << uint16(contentTuningParams.PlayerItemLevel);
|
||||
data << uint16(contentTuningParams.ScalingHealthItemLevelCurveID);
|
||||
data << uint8(contentTuningParams.TargetLevel);
|
||||
data << uint8(contentTuningParams.Expansion);
|
||||
data << uint8(contentTuningParams.TargetMinScalingLevel);
|
||||
data << uint8(contentTuningParams.TargetMaxScalingLevel);
|
||||
data << int8(contentTuningParams.TargetScalingLevelDelta);
|
||||
data.WriteBits(contentTuningParams.Type, 4);
|
||||
data.WriteBit(contentTuningParams.ScalesWithItemLevel);
|
||||
data.FlushBits();
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -41,31 +41,33 @@ namespace WorldPackets
|
||||
int64 Health = 0;
|
||||
int32 AttackPower = 0;
|
||||
int32 SpellPower = 0;
|
||||
int32 Armor = 0;
|
||||
std::vector<SpellLogPowerData> PowerData;
|
||||
|
||||
void Initialize(Unit const* unit);
|
||||
void Initialize(Spell const* spell);
|
||||
};
|
||||
|
||||
struct SandboxScalingData
|
||||
struct ContentTuningParams
|
||||
{
|
||||
enum SandboxScalingDataType : uint32
|
||||
enum ContentTuningType : uint32
|
||||
{
|
||||
TYPE_PLAYER_TO_PLAYER = 1, // NYI
|
||||
TYPE_CREATURE_TO_PLAYER_DAMAGE = 2,
|
||||
TYPE_PLAYER_TO_CREATURE_DAMAGE = 3,
|
||||
TYPE_PLAYER_TO_PLAYER = 7, // NYI
|
||||
TYPE_CREATURE_TO_PLAYER_DAMAGE = 1,
|
||||
TYPE_PLAYER_TO_CREATURE_DAMAGE = 2,
|
||||
TYPE_CREATURE_TO_CREATURE_DAMAGE = 4
|
||||
};
|
||||
|
||||
uint32 Type = 0;
|
||||
int16 PlayerLevelDelta = 0;
|
||||
uint16 PlayerItemLevel = 0;
|
||||
uint16 ScalingHealthItemLevelCurveID = 0;
|
||||
uint8 TargetLevel = 0;
|
||||
uint8 Expansion = 0;
|
||||
uint8 Class = 0;
|
||||
uint8 TargetMinScalingLevel = 0;
|
||||
uint8 TargetMaxScalingLevel = 0;
|
||||
int8 TargetScalingLevelDelta = 0;
|
||||
bool ScalesWithItemLevel = false;
|
||||
|
||||
template<class T, class U>
|
||||
bool GenerateDataForUnits(T* attacker, U* target);
|
||||
@@ -126,6 +128,6 @@ namespace WorldPackets
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SpellCastLogData const& spellCastLogData);
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::SandboxScalingData const& sandboxScalingData);
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Spells::ContentTuningParams const& contentTuningParams);
|
||||
|
||||
#endif // CombatLogPacketsCommon_h__
|
||||
|
||||
@@ -96,7 +96,7 @@ WorldPacket const* WorldPackets::Combat::AIReaction::Write()
|
||||
|
||||
WorldPacket const* WorldPackets::Combat::AttackSwingError::Write()
|
||||
{
|
||||
_worldPacket.WriteBits(Reason, 2);
|
||||
_worldPacket.WriteBits(Reason, 3);
|
||||
_worldPacket.FlushBits();
|
||||
return &_worldPacket;
|
||||
}
|
||||
@@ -107,8 +107,8 @@ WorldPacket const* WorldPackets::Combat::PowerUpdate::Write()
|
||||
_worldPacket << uint32(Powers.size());
|
||||
for (PowerUpdatePower const& power : Powers)
|
||||
{
|
||||
_worldPacket << power.Power;
|
||||
_worldPacket << power.PowerType;
|
||||
_worldPacket << int32(power.Power);
|
||||
_worldPacket << uint8(power.PowerType);
|
||||
}
|
||||
|
||||
return &_worldPacket;
|
||||
|
||||
@@ -41,9 +41,9 @@ namespace WorldPackets
|
||||
public:
|
||||
enum AttackSwingErr : uint8
|
||||
{
|
||||
CantAttack = 0,
|
||||
NotInRange = 0,
|
||||
BadFacing = 1,
|
||||
NotInRange = 2,
|
||||
CantAttack = 2,
|
||||
DeadTarget = 3
|
||||
};
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ void WorldPackets::Duel::DuelResponse::Read()
|
||||
{
|
||||
_worldPacket >> ArbiterGUID;
|
||||
Accepted = _worldPacket.ReadBit();
|
||||
Forfeited = _worldPacket.ReadBit();
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Duel::DuelWinner::Write()
|
||||
|
||||
@@ -103,6 +103,7 @@ namespace WorldPackets
|
||||
|
||||
ObjectGuid ArbiterGUID;
|
||||
bool Accepted = false;
|
||||
bool Forfeited = false;
|
||||
};
|
||||
|
||||
class DuelWinner final : public ServerPacket
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace WorldPackets
|
||||
class EquipmentSetID final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
EquipmentSetID() : ServerPacket(SMSG_EQUIPMENT_SET_ID, 8 + 4) { }
|
||||
EquipmentSetID() : ServerPacket(SMSG_EQUIPMENT_SET_ID, 8 + 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace WorldPackets
|
||||
class UseEquipmentSetResult final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
UseEquipmentSetResult() : ServerPacket(SMSG_USE_EQUIPMENT_SET_RESULT, 1) { }
|
||||
UseEquipmentSetResult() : ServerPacket(SMSG_USE_EQUIPMENT_SET_RESULT, 8 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ namespace WorldPackets
|
||||
class GarrisonLearnBlueprintResult final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
GarrisonLearnBlueprintResult() : ServerPacket(SMSG_GARRISON_LEARN_BLUEPRINT_RESULT, 4 + 4) { }
|
||||
GarrisonLearnBlueprintResult() : ServerPacket(SMSG_GARRISON_LEARN_BLUEPRINT_RESULT, 4 + 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::GuildFinder::GuildPostDat
|
||||
data << int32(post.Availability);
|
||||
data << int32(post.ClassRoles);
|
||||
data << int32(post.LevelRange);
|
||||
data << uint32(post.SecondsRemaining);
|
||||
data << int32(post.SecondsRemaining);
|
||||
data.WriteString(post.Comment);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace WorldPackets
|
||||
int32 Availability = 0;
|
||||
int32 ClassRoles = 0;
|
||||
int32 LevelRange = 0;
|
||||
time_t SecondsRemaining = time_t(0);
|
||||
int32 SecondsRemaining = 0;
|
||||
std::string Comment;
|
||||
};
|
||||
|
||||
|
||||
@@ -63,9 +63,9 @@ WorldPacket const* WorldPackets::Guild::QueryGuildInfoResponse::Write()
|
||||
|
||||
WorldPacket const* WorldPackets::Guild::GuildRoster::Write()
|
||||
{
|
||||
_worldPacket << NumAccounts;
|
||||
_worldPacket << int32(NumAccounts);
|
||||
_worldPacket.AppendPackedTime(CreateDate);
|
||||
_worldPacket << GuildFlags;
|
||||
_worldPacket << int32(GuildFlags);
|
||||
_worldPacket << uint32(MemberData.size());
|
||||
_worldPacket.WriteBits(WelcomeText.length(), 10);
|
||||
_worldPacket.WriteBits(InfoText.length(), 11);
|
||||
@@ -98,8 +98,8 @@ void WorldPackets::Guild::GuildUpdateMotdText::Read()
|
||||
|
||||
WorldPacket const* WorldPackets::Guild::GuildCommandResult::Write()
|
||||
{
|
||||
_worldPacket << Result;
|
||||
_worldPacket << Command;
|
||||
_worldPacket << int32(Result);
|
||||
_worldPacket << int32(Command);
|
||||
|
||||
_worldPacket.WriteBits(Name.length(), 8);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -127,17 +127,17 @@ WorldPacket const* WorldPackets::Guild::GuildInvite::Write()
|
||||
_worldPacket.WriteBits(OldGuildName.length(), 7);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket << InviterVirtualRealmAddress;
|
||||
_worldPacket << GuildVirtualRealmAddress;
|
||||
_worldPacket << uint32(InviterVirtualRealmAddress);
|
||||
_worldPacket << uint32(GuildVirtualRealmAddress);
|
||||
_worldPacket << GuildGUID;
|
||||
_worldPacket << OldGuildVirtualRealmAddress;
|
||||
_worldPacket << uint32(OldGuildVirtualRealmAddress);
|
||||
_worldPacket << OldGuildGUID;
|
||||
_worldPacket << EmblemStyle;
|
||||
_worldPacket << EmblemColor;
|
||||
_worldPacket << BorderStyle;
|
||||
_worldPacket << BorderColor;
|
||||
_worldPacket << Background;
|
||||
_worldPacket << AchievementPoints;
|
||||
_worldPacket << uint32(EmblemStyle);
|
||||
_worldPacket << uint32(EmblemColor);
|
||||
_worldPacket << uint32(BorderStyle);
|
||||
_worldPacket << uint32(BorderColor);
|
||||
_worldPacket << uint32(Background);
|
||||
_worldPacket << int32(AchievementPoints);
|
||||
|
||||
_worldPacket.WriteString(InviterName);
|
||||
_worldPacket.WriteString(GuildName);
|
||||
@@ -148,9 +148,9 @@ WorldPacket const* WorldPackets::Guild::GuildInvite::Write()
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Guild::GuildRosterProfessionData const& rosterProfessionData)
|
||||
{
|
||||
data << rosterProfessionData.DbID;
|
||||
data << rosterProfessionData.Rank;
|
||||
data << rosterProfessionData.Step;
|
||||
data << int32(rosterProfessionData.DbID);
|
||||
data << int32(rosterProfessionData.Rank);
|
||||
data << int32(rosterProfessionData.Step);
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -158,20 +158,20 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Guild::GuildRosterProfess
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Guild::GuildRosterMemberData const& rosterMemberData)
|
||||
{
|
||||
data << rosterMemberData.Guid;
|
||||
data << rosterMemberData.RankID;
|
||||
data << rosterMemberData.AreaID;
|
||||
data << rosterMemberData.PersonalAchievementPoints;
|
||||
data << rosterMemberData.GuildReputation;
|
||||
data << rosterMemberData.LastSave;
|
||||
data << int32(rosterMemberData.RankID);
|
||||
data << int32(rosterMemberData.AreaID);
|
||||
data << int32(rosterMemberData.PersonalAchievementPoints);
|
||||
data << int32(rosterMemberData.GuildReputation);
|
||||
data << float(rosterMemberData.LastSave);
|
||||
|
||||
for (uint8 i = 0; i < 2; i++)
|
||||
data << rosterMemberData.Profession[i];
|
||||
|
||||
data << rosterMemberData.VirtualRealmAddress;
|
||||
data << rosterMemberData.Status;
|
||||
data << rosterMemberData.Level;
|
||||
data << rosterMemberData.ClassID;
|
||||
data << rosterMemberData.Gender;
|
||||
data << uint32(rosterMemberData.VirtualRealmAddress);
|
||||
data << uint8(rosterMemberData.Status);
|
||||
data << uint8(rosterMemberData.Level);
|
||||
data << uint8(rosterMemberData.ClassID);
|
||||
data << uint8(rosterMemberData.Gender);
|
||||
|
||||
data.WriteBits(rosterMemberData.Name.length(), 6);
|
||||
data.WriteBits(rosterMemberData.Note.length(), 8);
|
||||
@@ -190,7 +190,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Guild::GuildRosterMemberD
|
||||
WorldPacket const* WorldPackets::Guild::GuildEventPresenceChange::Write()
|
||||
{
|
||||
_worldPacket << Guid;
|
||||
_worldPacket << VirtualRealmAddress;
|
||||
_worldPacket << uint32(VirtualRealmAddress);
|
||||
|
||||
_worldPacket.WriteBits(Name.length(), 6);
|
||||
_worldPacket.WriteBit(LoggedOn);
|
||||
@@ -215,7 +215,7 @@ WorldPacket const* WorldPackets::Guild::GuildEventMotd::Write()
|
||||
WorldPacket const* WorldPackets::Guild::GuildEventPlayerJoined::Write()
|
||||
{
|
||||
_worldPacket << Guid;
|
||||
_worldPacket << VirtualRealmAddress;
|
||||
_worldPacket << uint32(VirtualRealmAddress);
|
||||
|
||||
_worldPacket.WriteBits(Name.length(), 6);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -249,9 +249,9 @@ WorldPacket const* WorldPackets::Guild::GuildEventLogQueryResults::Write()
|
||||
{
|
||||
_worldPacket << entry.PlayerGUID;
|
||||
_worldPacket << entry.OtherGUID;
|
||||
_worldPacket << entry.TransactionType;
|
||||
_worldPacket << entry.RankID;
|
||||
_worldPacket << entry.TransactionDate;
|
||||
_worldPacket << uint8(entry.TransactionType);
|
||||
_worldPacket << uint8(entry.RankID);
|
||||
_worldPacket << uint32(entry.TransactionDate);
|
||||
}
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -269,12 +269,12 @@ WorldPacket const* WorldPackets::Guild::GuildEventPlayerLeft::Write()
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket << RemoverGUID;
|
||||
_worldPacket << RemoverVirtualRealmAddress;
|
||||
_worldPacket << uint32(RemoverVirtualRealmAddress);
|
||||
_worldPacket.WriteString(RemoverName);
|
||||
}
|
||||
|
||||
_worldPacket << LeaverGUID;
|
||||
_worldPacket << LeaverVirtualRealmAddress;
|
||||
_worldPacket << uint32(LeaverVirtualRealmAddress);
|
||||
_worldPacket.WriteString(LeaverName);
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -282,16 +282,16 @@ WorldPacket const* WorldPackets::Guild::GuildEventPlayerLeft::Write()
|
||||
|
||||
WorldPacket const* WorldPackets::Guild::GuildPermissionsQueryResults::Write()
|
||||
{
|
||||
_worldPacket << RankID;
|
||||
_worldPacket << WithdrawGoldLimit;
|
||||
_worldPacket << Flags;
|
||||
_worldPacket << NumTabs;
|
||||
_worldPacket << uint32(RankID);
|
||||
_worldPacket << int32(WithdrawGoldLimit);
|
||||
_worldPacket << int32(Flags);
|
||||
_worldPacket << int32(NumTabs);
|
||||
_worldPacket << uint32(Tab.size());
|
||||
|
||||
for (GuildRankTabPermissions const& tab : Tab)
|
||||
{
|
||||
_worldPacket << tab.Flags;
|
||||
_worldPacket << tab.WithdrawItemLimit;
|
||||
_worldPacket << int32(tab.Flags);
|
||||
_worldPacket << int32(tab.WithdrawItemLimit);
|
||||
}
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -325,9 +325,9 @@ WorldPacket const* WorldPackets::Guild::GuildEventNewLeader::Write()
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket << OldLeaderGUID;
|
||||
_worldPacket << OldLeaderVirtualRealmAddress;
|
||||
_worldPacket << uint32(OldLeaderVirtualRealmAddress);
|
||||
_worldPacket << NewLeaderGUID;
|
||||
_worldPacket << NewLeaderVirtualRealmAddress;
|
||||
_worldPacket << uint32(NewLeaderVirtualRealmAddress);
|
||||
|
||||
_worldPacket.WriteString(OldLeaderName);
|
||||
_worldPacket.WriteString(NewLeaderName);
|
||||
@@ -337,7 +337,7 @@ WorldPacket const* WorldPackets::Guild::GuildEventNewLeader::Write()
|
||||
|
||||
WorldPacket const* WorldPackets::Guild::GuildEventTabModified::Write()
|
||||
{
|
||||
_worldPacket << Tab;
|
||||
_worldPacket << int32(Tab);
|
||||
|
||||
_worldPacket.WriteBits(Name.length(), 7);
|
||||
_worldPacket.WriteBits(Icon.length(), 9);
|
||||
@@ -358,15 +358,15 @@ WorldPacket const* WorldPackets::Guild::GuildEventTabTextChanged::Write()
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Guild::GuildRankData const& rankData)
|
||||
{
|
||||
data << rankData.RankID;
|
||||
data << rankData.RankOrder;
|
||||
data << rankData.Flags;
|
||||
data << rankData.WithdrawGoldLimit;
|
||||
data << uint32(rankData.RankID);
|
||||
data << uint32(rankData.RankOrder);
|
||||
data << uint32(rankData.Flags);
|
||||
data << uint32(rankData.WithdrawGoldLimit);
|
||||
|
||||
for (uint8 i = 0; i < GUILD_BANK_MAX_TABS; i++)
|
||||
{
|
||||
data << rankData.TabFlags[i];
|
||||
data << rankData.TabWithdrawItemLimit[i];
|
||||
data << uint32(rankData.TabFlags[i]);
|
||||
data << uint32(rankData.TabWithdrawItemLimit[i]);
|
||||
}
|
||||
|
||||
data.WriteBits(rankData.RankName.length(), 7);
|
||||
@@ -416,7 +416,7 @@ WorldPacket const* WorldPackets::Guild::GuildSendRankChange::Write()
|
||||
{
|
||||
_worldPacket << Officer;
|
||||
_worldPacket << Other;
|
||||
_worldPacket << RankID;
|
||||
_worldPacket << uint32(RankID);
|
||||
|
||||
_worldPacket.WriteBit(Promote);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -499,25 +499,25 @@ WorldPacket const* WorldPackets::Guild::GuildPartyState::Write()
|
||||
_worldPacket.WriteBit(InGuildParty);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket << NumMembers;
|
||||
_worldPacket << NumRequired;
|
||||
_worldPacket << GuildXPEarnedMult;
|
||||
_worldPacket << int32(NumMembers);
|
||||
_worldPacket << int32(NumRequired);
|
||||
_worldPacket << float(GuildXPEarnedMult);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Guild::GuildRewardItem const& rewardItem)
|
||||
{
|
||||
data << rewardItem.ItemID;
|
||||
data << rewardItem.Unk4;
|
||||
data << uint32(rewardItem.ItemID);
|
||||
data << uint32(rewardItem.Unk4);
|
||||
data << uint32(rewardItem.AchievementsRequired.size());
|
||||
data << uint64(rewardItem.RaceMask);
|
||||
data << rewardItem.MinGuildLevel;
|
||||
data << rewardItem.MinGuildRep;
|
||||
data << rewardItem.Cost;
|
||||
data << int32(rewardItem.MinGuildLevel);
|
||||
data << int32(rewardItem.MinGuildRep);
|
||||
data << uint64(rewardItem.Cost);
|
||||
|
||||
for (uint8 i = 0; i < rewardItem.AchievementsRequired.size(); i++)
|
||||
data << rewardItem.AchievementsRequired[i];
|
||||
for (std::size_t i = 0; i < rewardItem.AchievementsRequired.size(); i++)
|
||||
data << uint32(rewardItem.AchievementsRequired[i]);
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -529,7 +529,7 @@ void WorldPackets::Guild::RequestGuildRewardsList::Read()
|
||||
|
||||
WorldPacket const* WorldPackets::Guild::GuildRewardList::Write()
|
||||
{
|
||||
_worldPacket << Version;
|
||||
_worldPacket << int32(Version);
|
||||
_worldPacket << uint32(RewardItems.size());
|
||||
|
||||
for (GuildRewardItem const& item : RewardItems)
|
||||
@@ -592,9 +592,9 @@ void WorldPackets::Guild::GuildBankWithdrawMoney::Read()
|
||||
|
||||
WorldPacket const* WorldPackets::Guild::GuildBankQueryResults::Write()
|
||||
{
|
||||
_worldPacket << Money;
|
||||
_worldPacket << Tab;
|
||||
_worldPacket << WithdrawalsRemaining;
|
||||
_worldPacket << uint64(Money);
|
||||
_worldPacket << int32(Tab);
|
||||
_worldPacket << int32(WithdrawalsRemaining);
|
||||
_worldPacket << uint32(TabInfo.size());
|
||||
_worldPacket << uint32(ItemInfo.size());
|
||||
_worldPacket.WriteBit(FullUpdate);
|
||||
@@ -602,7 +602,7 @@ WorldPacket const* WorldPackets::Guild::GuildBankQueryResults::Write()
|
||||
|
||||
for (GuildBankTabInfo const& tab : TabInfo)
|
||||
{
|
||||
_worldPacket << tab.TabIndex;
|
||||
_worldPacket << int32(tab.TabIndex);
|
||||
_worldPacket.WriteBits(tab.Name.length(), 7);
|
||||
_worldPacket.WriteBits(tab.Icon.length(), 9);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -613,12 +613,12 @@ WorldPacket const* WorldPackets::Guild::GuildBankQueryResults::Write()
|
||||
|
||||
for (GuildBankItemInfo const& item : ItemInfo)
|
||||
{
|
||||
_worldPacket << item.Slot;
|
||||
_worldPacket << item.Count;
|
||||
_worldPacket << item.EnchantmentID;
|
||||
_worldPacket << item.Charges;
|
||||
_worldPacket << item.OnUseEnchantmentID;
|
||||
_worldPacket << item.Flags;
|
||||
_worldPacket << int32(item.Slot);
|
||||
_worldPacket << int32(item.Count);
|
||||
_worldPacket << int32(item.EnchantmentID);
|
||||
_worldPacket << int32(item.Charges);
|
||||
_worldPacket << int32(item.OnUseEnchantmentID);
|
||||
_worldPacket << int32(item.Flags);
|
||||
_worldPacket << item.Item;
|
||||
_worldPacket.WriteBits(item.SocketEnchant.size(), 2);
|
||||
_worldPacket.WriteBit(item.Locked);
|
||||
@@ -658,7 +658,7 @@ void WorldPackets::Guild::GuildBankLogQuery::Read()
|
||||
|
||||
WorldPacket const* WorldPackets::Guild::GuildBankLogQueryResults::Write()
|
||||
{
|
||||
_worldPacket << Tab;
|
||||
_worldPacket << int32(Tab);
|
||||
_worldPacket << uint32(Entry.size());
|
||||
_worldPacket.WriteBit(WeeklyBonusMoney.is_initialized());
|
||||
_worldPacket.FlushBits();
|
||||
@@ -666,8 +666,8 @@ WorldPacket const* WorldPackets::Guild::GuildBankLogQueryResults::Write()
|
||||
for (GuildBankLogEntry const& logEntry : Entry)
|
||||
{
|
||||
_worldPacket << logEntry.PlayerGUID;
|
||||
_worldPacket << logEntry.TimeOffset;
|
||||
_worldPacket << logEntry.EntryType;
|
||||
_worldPacket << uint32(logEntry.TimeOffset);
|
||||
_worldPacket << int8(logEntry.EntryType);
|
||||
|
||||
_worldPacket.WriteBit(logEntry.Money.is_initialized());
|
||||
_worldPacket.WriteBit(logEntry.ItemID.is_initialized());
|
||||
@@ -676,20 +676,20 @@ WorldPacket const* WorldPackets::Guild::GuildBankLogQueryResults::Write()
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (logEntry.Money.is_initialized())
|
||||
_worldPacket << *logEntry.Money;
|
||||
_worldPacket << uint64(*logEntry.Money);
|
||||
|
||||
if (logEntry.ItemID.is_initialized())
|
||||
_worldPacket << *logEntry.ItemID;
|
||||
_worldPacket << int32(*logEntry.ItemID);
|
||||
|
||||
if (logEntry.Count.is_initialized())
|
||||
_worldPacket << *logEntry.Count;
|
||||
_worldPacket << int32(*logEntry.Count);
|
||||
|
||||
if (logEntry.OtherTab.is_initialized())
|
||||
_worldPacket << *logEntry.OtherTab;
|
||||
_worldPacket << int8(*logEntry.OtherTab);
|
||||
}
|
||||
|
||||
if (WeeklyBonusMoney)
|
||||
_worldPacket << *WeeklyBonusMoney;
|
||||
_worldPacket << uint64(*WeeklyBonusMoney);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
@@ -701,7 +701,7 @@ void WorldPackets::Guild::GuildBankTextQuery::Read()
|
||||
|
||||
WorldPacket const* WorldPackets::Guild::GuildBankTextQueryResult::Write()
|
||||
{
|
||||
_worldPacket << Tab;
|
||||
_worldPacket << int32(Tab);
|
||||
|
||||
_worldPacket.WriteBits(Text.length(), 14);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -724,13 +724,13 @@ void WorldPackets::Guild::GuildQueryNews::Read()
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Guild::GuildNewsEvent const& newsEvent)
|
||||
{
|
||||
data << newsEvent.Id;
|
||||
data << int32(newsEvent.Id);
|
||||
data.AppendPackedTime(newsEvent.CompletedDate);
|
||||
data << newsEvent.Type;
|
||||
data << newsEvent.Flags;
|
||||
data << int32(newsEvent.Type);
|
||||
data << int32(newsEvent.Flags);
|
||||
|
||||
for (uint8 i = 0; i < 2; i++)
|
||||
data << newsEvent.Data[i];
|
||||
for (std::size_t i = 0; i < newsEvent.Data.size(); ++i)
|
||||
data << int32(newsEvent.Data[i]);
|
||||
|
||||
data << newsEvent.MemberGuid;
|
||||
data << uint32(newsEvent.MemberList.size());
|
||||
|
||||
@@ -432,11 +432,11 @@ namespace WorldPackets
|
||||
|
||||
int32 RankID = 0;
|
||||
int32 RankOrder = 0;
|
||||
int32 WithdrawGoldLimit = 0;
|
||||
uint32 WithdrawGoldLimit = 0;
|
||||
uint32 Flags = 0;
|
||||
uint32 OldFlags = 0;
|
||||
int32 TabFlags[GUILD_BANK_MAX_TABS];
|
||||
int32 TabWithdrawItemLimit[GUILD_BANK_MAX_TABS];
|
||||
uint32 TabFlags[GUILD_BANK_MAX_TABS];
|
||||
uint32 TabWithdrawItemLimit[GUILD_BANK_MAX_TABS];
|
||||
std::string RankName;
|
||||
};
|
||||
|
||||
@@ -687,7 +687,7 @@ namespace WorldPackets
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
std::vector<GuildRewardItem> RewardItems;
|
||||
uint32 Version = 0;
|
||||
int32 Version = 0;
|
||||
};
|
||||
|
||||
class GuildBankActivate final : public ClientPacket
|
||||
@@ -918,9 +918,9 @@ namespace WorldPackets
|
||||
uint32 CompletedDate = 0;
|
||||
int32 Type = 0;
|
||||
int32 Flags = 0;
|
||||
int32 Data[2];
|
||||
std::array<int32, 2> Data;
|
||||
ObjectGuid MemberGuid;
|
||||
GuidList MemberList;
|
||||
std::vector<ObjectGuid> MemberList;
|
||||
Optional<Item::ItemInstance> Item;
|
||||
};
|
||||
|
||||
|
||||
@@ -35,6 +35,10 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Inspect::InspectItemData
|
||||
{
|
||||
data << itemData.CreatorGUID;
|
||||
data << uint8(itemData.Index);
|
||||
data << uint32(itemData.AzeritePowers.size());
|
||||
if (!itemData.AzeritePowers.empty())
|
||||
data.append(itemData.AzeritePowers.data(), itemData.AzeritePowers.size());
|
||||
|
||||
data << itemData.Item;
|
||||
data.WriteBit(itemData.Usable);
|
||||
data.WriteBits(itemData.Enchants.size(), 4);
|
||||
@@ -76,10 +80,11 @@ WorldPackets::Inspect::InspectItemData::InspectItemData(::Item const* item, uint
|
||||
{
|
||||
if (gemData.ItemId)
|
||||
{
|
||||
WorldPackets::Item::ItemGemData gem;
|
||||
Gems.emplace_back();
|
||||
|
||||
WorldPackets::Item::ItemGemData& gem = Gems.back();
|
||||
gem.Slot = i;
|
||||
gem.Item.Initialize(&gemData);
|
||||
Gems.push_back(gem);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
@@ -103,6 +108,7 @@ WorldPacket const* WorldPackets::Inspect::InspectResult::Write()
|
||||
_worldPacket.append(PvpTalents.data(), PvpTalents.size());
|
||||
|
||||
_worldPacket.WriteBit(GuildData.is_initialized());
|
||||
_worldPacket.WriteBit(AzeriteLevel.is_initialized());
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
for (size_t i = 0; i < Items.size(); ++i)
|
||||
@@ -111,6 +117,9 @@ WorldPacket const* WorldPackets::Inspect::InspectResult::Write()
|
||||
if (GuildData)
|
||||
_worldPacket << *GuildData;
|
||||
|
||||
if (AzeriteLevel)
|
||||
_worldPacket << int32(*AzeriteLevel);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -138,6 +147,7 @@ void WorldPackets::Inspect::InspectPVPRequest::Read()
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Inspect::PVPBracketData const& bracket)
|
||||
{
|
||||
data << uint8(bracket.Bracket);
|
||||
data << int32(bracket.Rating);
|
||||
data << int32(bracket.Rank);
|
||||
data << int32(bracket.WeeklyPlayed);
|
||||
@@ -146,7 +156,9 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Inspect::PVPBracketData c
|
||||
data << int32(bracket.SeasonWon);
|
||||
data << int32(bracket.WeeklyBestRating);
|
||||
data << int32(bracket.Unk710);
|
||||
data << uint8(bracket.Bracket);
|
||||
data << int32(bracket.Unk801_1);
|
||||
data.WriteBit(bracket.Unk801_2);
|
||||
data.FlushBits();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace WorldPackets
|
||||
bool Usable = false;
|
||||
std::vector<InspectEnchantData> Enchants;
|
||||
std::vector<Item::ItemGemData> Gems;
|
||||
std::vector<int32> AzeritePowers;
|
||||
};
|
||||
|
||||
struct InspectGuildData
|
||||
@@ -68,7 +69,10 @@ namespace WorldPackets
|
||||
class InspectResult final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
InspectResult() : ServerPacket(SMSG_INSPECT_RESULT, 45) { }
|
||||
InspectResult() : ServerPacket(SMSG_INSPECT_RESULT, 45)
|
||||
{
|
||||
PvpTalents.fill(0);
|
||||
}
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -76,11 +80,12 @@ namespace WorldPackets
|
||||
std::vector<InspectItemData> Items;
|
||||
std::vector<uint16> Glyphs;
|
||||
std::vector<uint16> Talents;
|
||||
std::vector<uint16> PvpTalents;
|
||||
std::array<uint16, MAX_PVP_TALENT_SLOTS> PvpTalents;
|
||||
int32 ClassID = CLASS_NONE;
|
||||
int32 GenderID = GENDER_NONE;
|
||||
Optional<InspectGuildData> GuildData;
|
||||
int32 SpecializationID = 0;
|
||||
Optional<int32> AzeriteLevel;
|
||||
};
|
||||
|
||||
class RequestHonorStats final : public ClientPacket
|
||||
@@ -128,7 +133,9 @@ namespace WorldPackets
|
||||
int32 SeasonWon = 0;
|
||||
int32 WeeklyBestRating = 0;
|
||||
int32 Unk710 = 0;
|
||||
int32 Unk801_1 = 0;
|
||||
uint8 Bracket = 0;
|
||||
bool Unk801_2 = false;
|
||||
};
|
||||
|
||||
class InspectPVPResponse final : public ServerPacket
|
||||
|
||||
@@ -31,23 +31,13 @@ WorldPacket const* WorldPackets::Instance::UpdateInstanceOwnership::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Instance::InstanceInfo::Write()
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Instance::InstanceLock const& lockInfos)
|
||||
{
|
||||
_worldPacket << int32(LockList.size());
|
||||
|
||||
for (InstanceLockInfos const& lockInfos : LockList)
|
||||
_worldPacket << lockInfos;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Instance::InstanceLockInfos const& lockInfos)
|
||||
{
|
||||
data << lockInfos.MapID;
|
||||
data << lockInfos.DifficultyID;
|
||||
data << lockInfos.InstanceID;
|
||||
data << lockInfos.TimeRemaining;
|
||||
data << lockInfos.CompletedMask;
|
||||
data << uint32(lockInfos.MapID);
|
||||
data << uint32(lockInfos.DifficultyID);
|
||||
data << uint64(lockInfos.InstanceID);
|
||||
data << uint32(lockInfos.TimeRemaining);
|
||||
data << uint32(lockInfos.CompletedMask);
|
||||
|
||||
data.WriteBit(lockInfos.Locked);
|
||||
data.WriteBit(lockInfos.Extended);
|
||||
@@ -57,6 +47,16 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Instance::InstanceLockInf
|
||||
return data;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Instance::InstanceInfo::Write()
|
||||
{
|
||||
_worldPacket << int32(LockList.size());
|
||||
|
||||
for (InstanceLock const& instanceLock : LockList)
|
||||
_worldPacket << instanceLock;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Instance::InstanceReset::Write()
|
||||
{
|
||||
_worldPacket << uint32(MapID);
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace WorldPackets
|
||||
// but it has been deperecated in favor of simply checking group leader, being inside an instance or using dungeon finder
|
||||
};
|
||||
|
||||
struct InstanceLockInfos
|
||||
struct InstanceLock
|
||||
{
|
||||
uint64 InstanceID = 0u;
|
||||
uint32 MapID = 0u;
|
||||
@@ -66,7 +66,7 @@ namespace WorldPackets
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
std::vector<InstanceLockInfos> LockList;
|
||||
std::vector<InstanceLock> LockList;
|
||||
};
|
||||
|
||||
class ResetInstances final : public ClientPacket
|
||||
@@ -90,7 +90,7 @@ namespace WorldPackets
|
||||
class InstanceResetFailed final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
InstanceResetFailed() : ServerPacket(SMSG_INSTANCE_RESET_FAILED, 4 + 4) { }
|
||||
InstanceResetFailed() : ServerPacket(SMSG_INSTANCE_RESET_FAILED, 4 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -248,6 +248,4 @@ namespace WorldPackets
|
||||
}
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Instance::InstanceLockInfos const& lockInfos);
|
||||
|
||||
#endif // InstancePackets_h__
|
||||
|
||||
@@ -280,7 +280,7 @@ WorldPacket const* WorldPackets::Item::ReadItemResultFailed::Write()
|
||||
{
|
||||
_worldPacket << Item;
|
||||
_worldPacket << uint32(Delay);
|
||||
_worldPacket.WriteBits(Subcode, 3);
|
||||
_worldPacket.WriteBits(Subcode, 2);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
|
||||
@@ -311,10 +311,15 @@ WorldPacket const* WorldPackets::LFG::LFGQueueStatus::Write()
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::LFG::LFGPlayerRewards const& lfgPlayerRewards)
|
||||
{
|
||||
data << int32(lfgPlayerRewards.RewardItem);
|
||||
data << uint32(lfgPlayerRewards.RewardItemQuantity);
|
||||
data << int32(lfgPlayerRewards.BonusCurrency);
|
||||
data.WriteBit(lfgPlayerRewards.IsCurrency);
|
||||
data.WriteBit(lfgPlayerRewards.RewardItem.is_initialized());
|
||||
data.WriteBit(lfgPlayerRewards.RewardCurrency.is_initialized());
|
||||
if (lfgPlayerRewards.RewardItem)
|
||||
data << *lfgPlayerRewards.RewardItem;
|
||||
|
||||
data << uint32(lfgPlayerRewards.Quantity);
|
||||
data << int32(lfgPlayerRewards.BonusQuantity);
|
||||
if (lfgPlayerRewards.RewardCurrency)
|
||||
data << int32(*lfgPlayerRewards.RewardCurrency);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "Packet.h"
|
||||
#include "PacketUtilities.h"
|
||||
#include "ItemPacketsCommon.h"
|
||||
#include "LFGPacketsCommon.h"
|
||||
#include "Optional.h"
|
||||
|
||||
@@ -325,13 +326,24 @@ namespace WorldPackets
|
||||
struct LFGPlayerRewards
|
||||
{
|
||||
LFGPlayerRewards() { }
|
||||
LFGPlayerRewards(int32 rewardItem, uint32 rewardItemQuantity, int32 bonusCurrency, bool isCurrency)
|
||||
: RewardItem(rewardItem), RewardItemQuantity(rewardItemQuantity), BonusCurrency(bonusCurrency), IsCurrency(isCurrency) { }
|
||||
LFGPlayerRewards(int32 id, uint32 quantity, int32 bonusQuantity, bool isCurrency)
|
||||
: Quantity(quantity), BonusQuantity(bonusQuantity)
|
||||
{
|
||||
if (!isCurrency)
|
||||
{
|
||||
RewardItem = boost::in_place();
|
||||
RewardItem->ItemID = id;
|
||||
}
|
||||
else
|
||||
{
|
||||
RewardCurrency = id;
|
||||
}
|
||||
}
|
||||
|
||||
int32 RewardItem = 0;
|
||||
uint32 RewardItemQuantity = 0;
|
||||
int32 BonusCurrency = 0;
|
||||
bool IsCurrency = false;
|
||||
Optional<Item::ItemInstance> RewardItem;
|
||||
Optional<int32> RewardCurrency;
|
||||
uint32 Quantity = 0;
|
||||
int32 BonusQuantity = 0;
|
||||
};
|
||||
|
||||
class LFGPlayerReward final : public ServerPacket
|
||||
|
||||
@@ -346,7 +346,8 @@ WorldPacket const* WorldPackets::Misc::LevelUpInfo::Write()
|
||||
for (int32 stat : StatDelta)
|
||||
_worldPacket << stat;
|
||||
|
||||
_worldPacket << int32(Cp);
|
||||
_worldPacket << int32(NumNewTalents);
|
||||
_worldPacket << int32(NumNewPvpTalentSlots);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ namespace WorldPackets
|
||||
|
||||
void Read() override;
|
||||
|
||||
int32 DifficultyID = 0;
|
||||
uint32 DifficultyID = 0;
|
||||
};
|
||||
|
||||
class SetRaidDifficulty final : public ClientPacket
|
||||
@@ -480,7 +480,8 @@ namespace WorldPackets
|
||||
int32 HealthDelta = 0;
|
||||
std::array<int32, 6> PowerDelta = { };
|
||||
std::array<int32, MAX_STATS> StatDelta = { };
|
||||
int32 Cp = 0;
|
||||
int32 NumNewTalents = 0;
|
||||
int32 NumNewPvpTalentSlots = 0;
|
||||
};
|
||||
|
||||
class PlayMusic final : public ServerPacket
|
||||
|
||||
@@ -213,6 +213,16 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MonsterSplineSp
|
||||
data << uint32(spellEffectExtraData.SpellVisualID);
|
||||
data << uint32(spellEffectExtraData.ProgressCurveID);
|
||||
data << uint32(spellEffectExtraData.ParabolicCurveID);
|
||||
data << float(spellEffectExtraData.JumpGravity);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MonsterSplineJumpExtraData const& jumpExtraData)
|
||||
{
|
||||
data << float(jumpExtraData.JumpGravity);
|
||||
data << uint32(jumpExtraData.StartTime);
|
||||
data << uint32(jumpExtraData.Duration);
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -224,8 +234,7 @@ ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MovementSpline
|
||||
data << uint32(movementSpline.TierTransStartTime);
|
||||
data << int32(movementSpline.Elapsed);
|
||||
data << uint32(movementSpline.MoveTime);
|
||||
data << float(movementSpline.JumpGravity);
|
||||
data << uint32(movementSpline.SpecialTime);
|
||||
data << uint32(movementSpline.FadeObjectTime);
|
||||
data << uint8(movementSpline.Mode);
|
||||
data << uint8(movementSpline.VehicleExitVoluntary);
|
||||
data << movementSpline.TransportGUID;
|
||||
@@ -235,6 +244,7 @@ ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MovementSpline
|
||||
data.WriteBits(movementSpline.PackedDeltas.size(), 16);
|
||||
data.WriteBit(movementSpline.SplineFilter.is_initialized());
|
||||
data.WriteBit(movementSpline.SpellEffectExtraData.is_initialized());
|
||||
data.WriteBit(movementSpline.JumpExtraData.is_initialized());
|
||||
data.FlushBits();
|
||||
|
||||
if (movementSpline.SplineFilter)
|
||||
@@ -262,6 +272,9 @@ ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MovementSpline
|
||||
if (movementSpline.SpellEffectExtraData)
|
||||
data << *movementSpline.SpellEffectExtraData;
|
||||
|
||||
if (movementSpline.JumpExtraData)
|
||||
data << *movementSpline.JumpExtraData;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -300,12 +313,12 @@ void WorldPackets::Movement::CommonMovement::WriteCreateObjectSplineDataBlock(::
|
||||
data << float(1.0f); // DurationModifier
|
||||
data << float(1.0f); // NextDurationModifier
|
||||
data.WriteBits(moveSpline.facing.type, 2); // Face
|
||||
bool HasJumpGravity = data.WriteBit(moveSpline.splineflags.parabolic || moveSpline.splineflags.animation); // HasJumpGravity
|
||||
bool HasSpecialTime = data.WriteBit(moveSpline.splineflags.parabolic && moveSpline.effect_start_time < moveSpline.Duration()); // HasSpecialTime
|
||||
bool hasFadeObjectTime = data.WriteBit(moveSpline.splineflags.fadeObject && moveSpline.effect_start_time < moveSpline.Duration());
|
||||
data.WriteBits(moveSpline.getPath().size(), 16);
|
||||
data.WriteBits(uint8(moveSpline.spline.mode()), 2); // Mode
|
||||
data.WriteBit(0); // HasSplineFilter
|
||||
data.WriteBit(moveSpline.spell_effect_extra.is_initialized()); // HasSpellEffectExtraData
|
||||
data.WriteBit(moveSpline.splineflags.parabolic); // HasJumpExtraData
|
||||
data.FlushBits();
|
||||
|
||||
//if (HasSplineFilterKey)
|
||||
@@ -341,11 +354,8 @@ void WorldPackets::Movement::CommonMovement::WriteCreateObjectSplineDataBlock(::
|
||||
break;
|
||||
}
|
||||
|
||||
if (HasJumpGravity)
|
||||
data << float(moveSpline.vertical_acceleration); // JumpGravity
|
||||
|
||||
if (HasSpecialTime)
|
||||
data << uint32(moveSpline.effect_start_time); // SpecialTime
|
||||
if (hasFadeObjectTime)
|
||||
data << uint32(moveSpline.effect_start_time); // FadeObjectTime
|
||||
|
||||
data.append(moveSpline.getPath().data(), moveSpline.getPath().size());
|
||||
|
||||
@@ -355,6 +365,14 @@ void WorldPackets::Movement::CommonMovement::WriteCreateObjectSplineDataBlock(::
|
||||
data << uint32(moveSpline.spell_effect_extra->SpellVisualId);
|
||||
data << uint32(moveSpline.spell_effect_extra->ProgressCurveId);
|
||||
data << uint32(moveSpline.spell_effect_extra->ParabolicCurveId);
|
||||
data << float(moveSpline.vertical_acceleration);
|
||||
}
|
||||
|
||||
if (moveSpline.splineflags.parabolic)
|
||||
{
|
||||
data << float(moveSpline.vertical_acceleration);
|
||||
data << uint32(moveSpline.effect_start_time);
|
||||
data << uint32(0); // Duration (override)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -388,12 +406,13 @@ void WorldPackets::Movement::MonsterMove::InitializeSplineData(::Movement::MoveS
|
||||
|
||||
if (splineFlags.parabolic)
|
||||
{
|
||||
movementSpline.JumpGravity = moveSpline.vertical_acceleration;
|
||||
movementSpline.SpecialTime = moveSpline.effect_start_time;
|
||||
movementSpline.JumpExtraData = boost::in_place();
|
||||
movementSpline.JumpExtraData->JumpGravity = moveSpline.vertical_acceleration;
|
||||
movementSpline.JumpExtraData->StartTime = moveSpline.effect_start_time;
|
||||
}
|
||||
|
||||
if (splineFlags.fadeObject)
|
||||
movementSpline.SpecialTime = moveSpline.effect_start_time;
|
||||
movementSpline.FadeObjectTime = moveSpline.effect_start_time;
|
||||
|
||||
if (moveSpline.spell_effect_extra)
|
||||
{
|
||||
@@ -402,6 +421,7 @@ void WorldPackets::Movement::MonsterMove::InitializeSplineData(::Movement::MoveS
|
||||
movementSpline.SpellEffectExtraData->SpellVisualID = moveSpline.spell_effect_extra->SpellVisualId;
|
||||
movementSpline.SpellEffectExtraData->ProgressCurveID = moveSpline.spell_effect_extra->ProgressCurveId;
|
||||
movementSpline.SpellEffectExtraData->ParabolicCurveID = moveSpline.spell_effect_extra->ParabolicCurveId;
|
||||
movementSpline.SpellEffectExtraData->JumpGravity = moveSpline.vertical_acceleration;
|
||||
}
|
||||
|
||||
::Movement::Spline<int32> const& spline = moveSpline.spline;
|
||||
|
||||
@@ -75,6 +75,14 @@ namespace WorldPackets
|
||||
uint32 SpellVisualID = 0;
|
||||
uint32 ProgressCurveID = 0;
|
||||
uint32 ParabolicCurveID = 0;
|
||||
float JumpGravity = 0.0f;
|
||||
};
|
||||
|
||||
struct MonsterSplineJumpExtraData
|
||||
{
|
||||
float JumpGravity = 0.0f;
|
||||
uint32 StartTime = 0;
|
||||
uint32 Duration = 0;
|
||||
};
|
||||
|
||||
struct MovementSpline
|
||||
@@ -85,8 +93,7 @@ namespace WorldPackets
|
||||
uint32 TierTransStartTime = 0;
|
||||
int32 Elapsed = 0;
|
||||
uint32 MoveTime = 0;
|
||||
float JumpGravity = 0.0f;
|
||||
uint32 SpecialTime = 0;
|
||||
uint32 FadeObjectTime = 0;
|
||||
std::vector<TaggedPosition<Position::XYZ>> Points; // Spline path
|
||||
uint8 Mode = 0; // Spline mode - actually always 0 in this packet - Catmullrom mode appears only in SMSG_UPDATE_OBJECT. In this packet it is determined by flags
|
||||
uint8 VehicleExitVoluntary = 0;
|
||||
@@ -95,6 +102,7 @@ namespace WorldPackets
|
||||
std::vector<TaggedPosition<Position::PackedXYZ>> PackedDeltas;
|
||||
Optional<MonsterSplineFilter> SplineFilter;
|
||||
Optional<MonsterSplineSpellEffectExtraData> SpellEffectExtraData;
|
||||
Optional<MonsterSplineJumpExtraData> JumpExtraData;
|
||||
float FaceDirection = 0.0f;
|
||||
ObjectGuid FaceGUID;
|
||||
TaggedPosition<Position::XYZ> FaceSpot;
|
||||
|
||||
@@ -96,19 +96,19 @@ WorldPacket const* WorldPackets::NPC::VendorInventory::Write()
|
||||
WorldPacket const* WorldPackets::NPC::TrainerList::Write()
|
||||
{
|
||||
_worldPacket << TrainerGUID;
|
||||
_worldPacket << TrainerType;
|
||||
_worldPacket << TrainerID;
|
||||
_worldPacket << uint32(TrainerType);
|
||||
_worldPacket << uint32(TrainerID);
|
||||
|
||||
_worldPacket << int32(Spells.size());
|
||||
_worldPacket << uint32(Spells.size());
|
||||
for (TrainerListSpell const& spell : Spells)
|
||||
{
|
||||
_worldPacket << spell.SpellID;
|
||||
_worldPacket << spell.MoneyCost;
|
||||
_worldPacket << spell.ReqSkillLine;
|
||||
_worldPacket << spell.ReqSkillRank;
|
||||
_worldPacket << int32(spell.SpellID);
|
||||
_worldPacket << uint32(spell.MoneyCost);
|
||||
_worldPacket << uint32(spell.ReqSkillLine);
|
||||
_worldPacket << uint32(spell.ReqSkillRank);
|
||||
_worldPacket.append(spell.ReqAbility.data(), spell.ReqAbility.size());
|
||||
_worldPacket << spell.Usable;
|
||||
_worldPacket << spell.ReqLevel;
|
||||
_worldPacket << uint8(spell.Usable);
|
||||
_worldPacket << uint8(spell.ReqLevel);
|
||||
}
|
||||
|
||||
_worldPacket.WriteBits(Greeting.length(), 11);
|
||||
@@ -144,11 +144,13 @@ WorldPacket const* WorldPackets::NPC::PlayerTabardVendorActivate::Write()
|
||||
|
||||
WorldPacket const* WorldPackets::NPC::GossipPOI::Write()
|
||||
{
|
||||
_worldPacket.WriteBits(Flags, 14);
|
||||
_worldPacket.WriteBits(Name.length(), 6);
|
||||
_worldPacket << int32(ID);
|
||||
_worldPacket << Pos;
|
||||
_worldPacket << int32(Icon);
|
||||
_worldPacket << int32(Importance);
|
||||
_worldPacket.WriteBits(Flags, 14);
|
||||
_worldPacket.WriteBits(Name.length(), 6);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket.WriteString(Name);
|
||||
|
||||
return &_worldPacket;
|
||||
|
||||
@@ -131,9 +131,9 @@ namespace WorldPackets
|
||||
struct TrainerListSpell
|
||||
{
|
||||
int32 SpellID = 0;
|
||||
int32 MoneyCost = 0;
|
||||
int32 ReqSkillLine = 0;
|
||||
int32 ReqSkillRank = 0;
|
||||
uint32 MoneyCost = 0;
|
||||
uint32 ReqSkillLine = 0;
|
||||
uint32 ReqSkillRank = 0;
|
||||
std::array<int32, 3> ReqAbility = { };
|
||||
uint8 Usable = 0;
|
||||
uint8 ReqLevel = 0;
|
||||
@@ -180,6 +180,7 @@ namespace WorldPackets
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
int32 ID = 0;
|
||||
uint32 Flags = 0;
|
||||
TaggedPosition<Position::XY> Pos;
|
||||
int32 Icon = 0;
|
||||
|
||||
@@ -42,6 +42,8 @@ namespace WorldPackets
|
||||
|
||||
typedef typename storage_type::value_type value_type;
|
||||
typedef typename storage_type::size_type size_type;
|
||||
typedef typename storage_type::pointer pointer;
|
||||
typedef typename storage_type::const_pointer const_pointer;
|
||||
typedef typename storage_type::reference reference;
|
||||
typedef typename storage_type::const_reference const_reference;
|
||||
typedef typename storage_type::iterator iterator;
|
||||
@@ -55,6 +57,9 @@ namespace WorldPackets
|
||||
iterator end() { return _storage.end(); }
|
||||
const_iterator end() const { return _storage.end(); }
|
||||
|
||||
pointer data() { return _storage.data(); }
|
||||
const_pointer data() const { return _storage.data(); }
|
||||
|
||||
size_type size() const { return _storage.size(); }
|
||||
bool empty() const { return _storage.empty(); }
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ WorldPacket const* WorldPackets::Party::PartyCommandResult::Write()
|
||||
_worldPacket.WriteBits(Command, 4);
|
||||
_worldPacket.WriteBits(Result, 6);
|
||||
|
||||
_worldPacket << ResultData;
|
||||
_worldPacket << uint32(ResultData);
|
||||
_worldPacket << ResultGUID;
|
||||
_worldPacket.WriteString(Name);
|
||||
|
||||
@@ -78,12 +78,12 @@ WorldPacket const* WorldPackets::Party::PartyInvite::Write()
|
||||
_worldPacket << InviterBNetAccountId;
|
||||
_worldPacket << uint16(Unk1);
|
||||
_worldPacket << uint32(ProposedRoles);
|
||||
_worldPacket << int32(LfgSlots.size());
|
||||
_worldPacket << LfgCompletedMask;
|
||||
_worldPacket << uint32(LfgSlots.size());
|
||||
_worldPacket << uint32(LfgCompletedMask);
|
||||
|
||||
_worldPacket.WriteString(InviterName);
|
||||
|
||||
for (int32 LfgSlot : LfgSlots)
|
||||
for (uint32 LfgSlot : LfgSlots)
|
||||
_worldPacket << LfgSlot;
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -212,7 +212,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyMemberStats c
|
||||
data << int16(memberStats.PositionY);
|
||||
data << int16(memberStats.PositionZ);
|
||||
data << int32(memberStats.VehicleSeat);
|
||||
data << int32(memberStats.Auras.size());
|
||||
data << uint32(memberStats.Auras.size());
|
||||
data << memberStats.Phases;
|
||||
|
||||
for (WorldPackets::Party::PartyMemberAuraStates const& aura : memberStats.Auras)
|
||||
@@ -318,15 +318,13 @@ WorldPacket const* WorldPackets::Party::SendRaidTargetUpdateSingle::Write()
|
||||
|
||||
WorldPacket const* WorldPackets::Party::SendRaidTargetUpdateAll::Write()
|
||||
{
|
||||
_worldPacket << PartyIndex;
|
||||
_worldPacket << uint8(PartyIndex);
|
||||
_worldPacket << uint32(TargetIcons.size());
|
||||
|
||||
_worldPacket << int32(TargetIcons.size());
|
||||
|
||||
std::map<uint8, ObjectGuid>::const_iterator itr;
|
||||
for (itr = TargetIcons.begin(); itr != TargetIcons.end(); itr++)
|
||||
for (auto itr = TargetIcons.begin(); itr != TargetIcons.end(); ++itr)
|
||||
{
|
||||
_worldPacket << itr->second;
|
||||
_worldPacket << itr->first;
|
||||
_worldPacket << uint8(itr->first);
|
||||
}
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -420,7 +418,9 @@ WorldPacket const* WorldPackets::Party::GroupNewLeader::Write()
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyPlayerInfo const& playerInfo)
|
||||
{
|
||||
data.WriteBits(playerInfo.Name.size(), 6);
|
||||
data.WriteBits(playerInfo.VoiceStateID.size(), 6);
|
||||
data.WriteBit(playerInfo.FromSocialQueue);
|
||||
data.WriteBit(playerInfo.VoiceChatSilenced);
|
||||
data << playerInfo.GUID;
|
||||
data << uint8(playerInfo.Status);
|
||||
data << uint8(playerInfo.Subgroup);
|
||||
@@ -428,6 +428,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyPlayerInfo co
|
||||
data << uint8(playerInfo.RolesAssigned);
|
||||
data << uint8(playerInfo.Class);
|
||||
data.WriteString(playerInfo.Name);
|
||||
data.WriteString(playerInfo.VoiceStateID);
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -524,8 +525,8 @@ void WorldPackets::Party::ClearRaidMarker::Read()
|
||||
|
||||
WorldPacket const* WorldPackets::Party::RaidMarkersChanged::Write()
|
||||
{
|
||||
_worldPacket << PartyIndex;
|
||||
_worldPacket << ActiveMarkers;
|
||||
_worldPacket << uint8(PartyIndex);
|
||||
_worldPacket << uint32(ActiveMarkers);
|
||||
|
||||
_worldPacket.WriteBits(RaidMarkers.size(), 4);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -48,8 +48,8 @@ namespace WorldPackets
|
||||
|
||||
void Read() override;
|
||||
|
||||
int8 PartyIndex = 0;
|
||||
int32 ProposedRoles = 0;
|
||||
uint8 PartyIndex = 0;
|
||||
uint32 ProposedRoles = 0;
|
||||
std::string TargetName;
|
||||
std::string TargetRealm;
|
||||
ObjectGuid TargetGUID;
|
||||
@@ -85,9 +85,9 @@ namespace WorldPackets
|
||||
std::string InviterRealmNameNormalized;
|
||||
|
||||
// Lfg
|
||||
int32 ProposedRoles = 0;
|
||||
int32 LfgCompletedMask = 0;
|
||||
std::vector<int32> LfgSlots;
|
||||
uint32 ProposedRoles = 0;
|
||||
uint32 LfgCompletedMask = 0;
|
||||
std::vector<uint32> LfgSlots;
|
||||
};
|
||||
|
||||
class PartyInviteResponse final : public ClientPacket
|
||||
@@ -97,9 +97,9 @@ namespace WorldPackets
|
||||
|
||||
void Read() override;
|
||||
|
||||
int8 PartyIndex = 0;
|
||||
uint8 PartyIndex = 0;
|
||||
bool Accept = false;
|
||||
Optional<int32> RolesDesired;
|
||||
Optional<uint32> RolesDesired;
|
||||
};
|
||||
|
||||
class PartyUninvite final : public ClientPacket
|
||||
@@ -109,7 +109,7 @@ namespace WorldPackets
|
||||
|
||||
void Read() override;
|
||||
|
||||
int8 PartyIndex = 0;
|
||||
uint8 PartyIndex = 0;
|
||||
ObjectGuid TargetGUID;
|
||||
std::string Reason;
|
||||
};
|
||||
@@ -327,7 +327,7 @@ namespace WorldPackets
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
int8 PartyIndex = 0;
|
||||
uint8 PartyIndex = 0;
|
||||
std::map<uint8, ObjectGuid> TargetIcons;
|
||||
};
|
||||
|
||||
@@ -359,7 +359,7 @@ namespace WorldPackets
|
||||
void Read() override;
|
||||
|
||||
ObjectGuid Target;
|
||||
int8 PartyIndex = 0;
|
||||
uint8 PartyIndex = 0;
|
||||
bool Apply = false;
|
||||
};
|
||||
|
||||
@@ -405,7 +405,7 @@ namespace WorldPackets
|
||||
|
||||
void Read() override;
|
||||
|
||||
int8 PartyIndex = 0;
|
||||
uint8 PartyIndex = 0;
|
||||
bool IsReady = false;
|
||||
};
|
||||
|
||||
@@ -486,13 +486,14 @@ namespace WorldPackets
|
||||
{
|
||||
ObjectGuid GUID;
|
||||
std::string Name;
|
||||
std::string VoiceStateID; // same as bgs.protocol.club.v1.MemberVoiceState.id
|
||||
uint8 Class = 0;
|
||||
|
||||
uint8 Status = 0u;
|
||||
uint8 Subgroup = 0u;
|
||||
uint8 Flags = 0u;
|
||||
uint8 RolesAssigned = 0u;
|
||||
bool FromSocialQueue = false;
|
||||
bool VoiceChatSilenced = false;
|
||||
};
|
||||
|
||||
struct PartyLFGInfo
|
||||
@@ -554,7 +555,7 @@ namespace WorldPackets
|
||||
|
||||
void Read() override;
|
||||
|
||||
int8 PartyIndex = 0;
|
||||
uint8 PartyIndex = 0;
|
||||
bool EveryoneIsAssistant = false;
|
||||
};
|
||||
|
||||
@@ -599,7 +600,7 @@ namespace WorldPackets
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
int8 PartyIndex = 0;
|
||||
uint8 PartyIndex = 0;
|
||||
uint32 ActiveMarkers = 0u;
|
||||
|
||||
std::vector<RaidMarker*> RaidMarkers;
|
||||
|
||||
@@ -65,9 +65,8 @@ WorldPacket const* WorldPackets::Pet::PetStableList::Write()
|
||||
_worldPacket << int32(pet.CreatureID);
|
||||
_worldPacket << int32(pet.DisplayID);
|
||||
_worldPacket << int32(pet.ExperienceLevel);
|
||||
_worldPacket << int32(pet.PetFlags);
|
||||
|
||||
_worldPacket << int8(pet.PetName.length());
|
||||
_worldPacket << uint8(pet.PetFlags);
|
||||
_worldPacket.WriteBits(pet.PetName.length(), 8);
|
||||
_worldPacket.WriteString(pet.PetName);
|
||||
}
|
||||
|
||||
@@ -92,21 +91,18 @@ WorldPacket const* WorldPackets::Pet::PetUnlearnedSpells::Write()
|
||||
|
||||
WorldPacket const* WorldPackets::Pet::PetNameInvalid::Write()
|
||||
{
|
||||
_worldPacket << uint8(Result);
|
||||
_worldPacket << RenameData.PetGUID;
|
||||
_worldPacket << int32(RenameData.PetNumber);
|
||||
|
||||
_worldPacket << uint8(RenameData.NewName.length());
|
||||
|
||||
_worldPacket.WriteBit(RenameData.DeclinedNames.is_initialized());
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (RenameData.DeclinedNames)
|
||||
{
|
||||
for (int32 i = 0; i < MAX_DECLINED_NAME_CASES; i++)
|
||||
{
|
||||
_worldPacket.WriteBits(RenameData.DeclinedNames->name[i].length(), 7);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
for (int32 i = 0; i < MAX_DECLINED_NAME_CASES; i++)
|
||||
_worldPacket << RenameData.DeclinedNames->name[i];
|
||||
@@ -121,8 +117,7 @@ void WorldPackets::Pet::PetRename::Read()
|
||||
_worldPacket >> RenameData.PetGUID;
|
||||
_worldPacket >> RenameData.PetNumber;
|
||||
|
||||
int8 nameLen = 0;
|
||||
_worldPacket >> nameLen;
|
||||
uint8 nameLen = _worldPacket.ReadBits(8);
|
||||
|
||||
if (_worldPacket.ReadBit())
|
||||
{
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace WorldPackets
|
||||
uint32 CreatureID = 0;
|
||||
uint32 DisplayID = 0;
|
||||
uint32 ExperienceLevel = 0;
|
||||
uint32 PetFlags = 0;
|
||||
uint8 PetFlags = 0;
|
||||
std::string PetName;
|
||||
};
|
||||
|
||||
|
||||
@@ -25,32 +25,31 @@ void WorldPackets::Petition::QueryPetition::Read()
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Petition::PetitionInfo const& petitionInfo)
|
||||
{
|
||||
data << petitionInfo.PetitionID;
|
||||
data << int32(petitionInfo.PetitionID);
|
||||
data << petitionInfo.Petitioner;
|
||||
|
||||
data << petitionInfo.MinSignatures;
|
||||
data << petitionInfo.MaxSignatures;
|
||||
data << petitionInfo.DeadLine;
|
||||
data << petitionInfo.IssueDate;
|
||||
data << petitionInfo.AllowedGuildID;
|
||||
data << petitionInfo.AllowedClasses;
|
||||
data << petitionInfo.AllowedRaces;
|
||||
data << petitionInfo.AllowedGender;
|
||||
data << petitionInfo.AllowedMinLevel;
|
||||
data << petitionInfo.AllowedMaxLevel;
|
||||
data << petitionInfo.NumChoices;
|
||||
data << petitionInfo.StaticType;
|
||||
data << petitionInfo.Muid;
|
||||
data << int32(petitionInfo.MinSignatures);
|
||||
data << int32(petitionInfo.MaxSignatures);
|
||||
data << int32(petitionInfo.DeadLine);
|
||||
data << int32(petitionInfo.IssueDate);
|
||||
data << int32(petitionInfo.AllowedGuildID);
|
||||
data << int32(petitionInfo.AllowedClasses);
|
||||
data << int32(petitionInfo.AllowedRaces);
|
||||
data << int16(petitionInfo.AllowedGender);
|
||||
data << int32(petitionInfo.AllowedMinLevel);
|
||||
data << int32(petitionInfo.AllowedMaxLevel);
|
||||
data << int32(petitionInfo.NumChoices);
|
||||
data << int32(petitionInfo.StaticType);
|
||||
data << uint32(petitionInfo.Muid);
|
||||
|
||||
data.WriteBits(petitionInfo.Title.length(), 7);
|
||||
data.WriteBits(petitionInfo.BodyText.length(), 12);
|
||||
|
||||
for (uint8 i = 0; i < 10; i++)
|
||||
for (std::size_t i = 0; i < petitionInfo.Choicetext.size(); ++i)
|
||||
data.WriteBits(petitionInfo.Choicetext[i].length(), 6);
|
||||
|
||||
data.FlushBits();
|
||||
|
||||
for (uint8 i = 0; i < 10; i++)
|
||||
for (std::size_t i = 0; i < petitionInfo.Choicetext.size(); ++i)
|
||||
data.WriteString(petitionInfo.Choicetext[i]);
|
||||
|
||||
data.WriteString(petitionInfo.Title);
|
||||
@@ -61,7 +60,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Petition::PetitionInfo co
|
||||
|
||||
WorldPacket const* WorldPackets::Petition::QueryPetitionResponse::Write()
|
||||
{
|
||||
_worldPacket << PetitionID;
|
||||
_worldPacket << uint32(PetitionID);
|
||||
_worldPacket.WriteBit(Allow);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -102,13 +101,13 @@ WorldPacket const* WorldPackets::Petition::ServerPetitionShowSignatures::Write()
|
||||
_worldPacket << Item;
|
||||
_worldPacket << Owner;
|
||||
_worldPacket << OwnerAccountID;
|
||||
_worldPacket << PetitionID;
|
||||
_worldPacket << int32(PetitionID);
|
||||
|
||||
_worldPacket << uint32(Signatures.size());
|
||||
for (PetitionSignature signature : Signatures)
|
||||
for (PetitionSignature const& signature : Signatures)
|
||||
{
|
||||
_worldPacket << signature.Signer;
|
||||
_worldPacket << signature.Choice;
|
||||
_worldPacket << int32(signature.Choice);
|
||||
}
|
||||
|
||||
return &_worldPacket;
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace WorldPackets
|
||||
int32 NumChoices = 0;
|
||||
int32 StaticType = 0;
|
||||
uint32 Muid = 0;
|
||||
std::string Choicetext[10];
|
||||
std::array<std::string, 10> Choicetext;
|
||||
};
|
||||
|
||||
class QueryPetitionResponse final : public ServerPacket
|
||||
|
||||
@@ -29,7 +29,7 @@ void WorldPackets::Query::QueryCreature::Read()
|
||||
|
||||
WorldPacket const* WorldPackets::Query::QueryCreatureResponse::Write()
|
||||
{
|
||||
_worldPacket << CreatureID;
|
||||
_worldPacket << uint32(CreatureID);
|
||||
_worldPacket.WriteBit(Allow);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
@@ -61,7 +61,16 @@ WorldPacket const* WorldPackets::Query::QueryCreatureResponse::Write()
|
||||
_worldPacket << int32(Stats.CreatureFamily);
|
||||
_worldPacket << int32(Stats.Classification);
|
||||
_worldPacket.append(Stats.ProxyCreatureID.data(), Stats.ProxyCreatureID.size());
|
||||
_worldPacket.append(Stats.CreatureDisplayID.data(), Stats.CreatureDisplayID.size());
|
||||
_worldPacket << uint32(Stats.Display.CreatureDisplay.size());
|
||||
_worldPacket << float(Stats.Display.TotalProbability);
|
||||
|
||||
for (CreatureXDisplay const& display : Stats.Display.CreatureDisplay)
|
||||
{
|
||||
_worldPacket << uint32(display.CreatureDisplayID);
|
||||
_worldPacket << float(display.Scale);
|
||||
_worldPacket << float(display.Probability);
|
||||
}
|
||||
|
||||
_worldPacket << float(Stats.HpMulti);
|
||||
_worldPacket << float(Stats.EnergyMulti);
|
||||
_worldPacket << uint32(Stats.QuestItems.size());
|
||||
@@ -69,6 +78,7 @@ WorldPacket const* WorldPackets::Query::QueryCreatureResponse::Write()
|
||||
_worldPacket << int32(Stats.HealthScalingExpansion);
|
||||
_worldPacket << int32(Stats.RequiredExpansion);
|
||||
_worldPacket << int32(Stats.VignetteID);
|
||||
_worldPacket << int32(Stats.Class);
|
||||
|
||||
if (!Stats.Title.empty())
|
||||
_worldPacket << Stats.Title;
|
||||
@@ -79,8 +89,8 @@ WorldPacket const* WorldPackets::Query::QueryCreatureResponse::Write()
|
||||
if (!Stats.CursorName.empty())
|
||||
_worldPacket << Stats.CursorName;
|
||||
|
||||
for (int32 questItem : Stats.QuestItems)
|
||||
_worldPacket << questItem;
|
||||
if (!Stats.QuestItems.empty())
|
||||
_worldPacket.append(Stats.QuestItems.data(), Stats.QuestItems.size());
|
||||
}
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -162,6 +172,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Query::PlayerGuidLookupDa
|
||||
data << lookupData.AccountID;
|
||||
data << lookupData.BnetAccountID;
|
||||
data << lookupData.GuidActual;
|
||||
data << uint64(lookupData.GuildClubMemberID);
|
||||
data << uint32(lookupData.VirtualRealmAddress);
|
||||
data << uint8(lookupData.Race);
|
||||
data << uint8(lookupData.Sex);
|
||||
@@ -174,7 +185,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Query::PlayerGuidLookupDa
|
||||
|
||||
WorldPacket const* WorldPackets::Query::QueryPlayerNameResponse::Write()
|
||||
{
|
||||
_worldPacket << Result;
|
||||
_worldPacket << uint8(Result);
|
||||
_worldPacket << Player;
|
||||
|
||||
if (Result == RESPONSE_SUCCESS)
|
||||
@@ -206,7 +217,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Query::QueryPageTextRespo
|
||||
|
||||
WorldPacket const* WorldPackets::Query::QueryPageTextResponse::Write()
|
||||
{
|
||||
_worldPacket << PageTextID;
|
||||
_worldPacket << uint32(PageTextID);
|
||||
_worldPacket.WriteBit(Allow);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
@@ -229,7 +240,7 @@ void WorldPackets::Query::QueryNPCText::Read()
|
||||
|
||||
WorldPacket const* WorldPackets::Query::QueryNPCTextResponse::Write()
|
||||
{
|
||||
_worldPacket << TextID;
|
||||
_worldPacket << uint32(TextID);
|
||||
_worldPacket.WriteBit(Allow);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
@@ -238,10 +249,8 @@ WorldPacket const* WorldPackets::Query::QueryNPCTextResponse::Write()
|
||||
|
||||
if (Allow)
|
||||
{
|
||||
for (uint32 i = 0; i < MAX_NPC_TEXT_OPTIONS; ++i)
|
||||
_worldPacket << Probabilities[i];
|
||||
for (uint32 i = 0; i < MAX_NPC_TEXT_OPTIONS; ++i)
|
||||
_worldPacket << BroadcastTextID[i];
|
||||
_worldPacket.append(Probabilities.data(), Probabilities.size());
|
||||
_worldPacket.append(BroadcastTextID.data(), BroadcastTextID.size());
|
||||
}
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -276,8 +285,8 @@ WorldPacket const* WorldPackets::Query::QueryGameObjectResponse::Write()
|
||||
|
||||
statsData << float(Stats.Size);
|
||||
statsData << uint8(Stats.QuestItems.size());
|
||||
for (int32 questItem : Stats.QuestItems)
|
||||
statsData << int32(questItem);
|
||||
if (!Stats.QuestItems.empty())
|
||||
statsData.append(Stats.QuestItems.data(), Stats.QuestItems.size());
|
||||
|
||||
statsData << int32(Stats.RequiredLevel);
|
||||
}
|
||||
@@ -334,7 +343,7 @@ void WorldPackets::Query::QuestPOIQuery::Read()
|
||||
{
|
||||
_worldPacket >> MissingQuestCount;
|
||||
|
||||
for (uint8 i = 0; i < 50; ++i)
|
||||
for (std::size_t i = 0; i < MissingQuestPOIs.size(); ++i)
|
||||
_worldPacket >> MissingQuestPOIs[i];
|
||||
}
|
||||
|
||||
@@ -356,13 +365,12 @@ WorldPacket const* WorldPackets::Query::QuestPOIQueryResponse::Write()
|
||||
_worldPacket << int32(questPOIBlobData.QuestObjectiveID);
|
||||
_worldPacket << int32(questPOIBlobData.QuestObjectID);
|
||||
_worldPacket << int32(questPOIBlobData.MapID);
|
||||
_worldPacket << int32(questPOIBlobData.WorldMapAreaID);
|
||||
_worldPacket << int32(questPOIBlobData.Floor);
|
||||
_worldPacket << int32(questPOIBlobData.UiMapID);
|
||||
_worldPacket << int32(questPOIBlobData.Priority);
|
||||
_worldPacket << int32(questPOIBlobData.Flags);
|
||||
_worldPacket << int32(questPOIBlobData.WorldEffectID);
|
||||
_worldPacket << int32(questPOIBlobData.PlayerConditionID);
|
||||
_worldPacket << int32(questPOIBlobData.UnkWoD1);
|
||||
_worldPacket << int32(questPOIBlobData.SpawnTrackingID);
|
||||
_worldPacket << int32(questPOIBlobData.QuestPOIBlobPointStats.size());
|
||||
|
||||
for (QuestPOIBlobPoint const& questPOIBlobPoint : questPOIBlobData.QuestPOIBlobPointStats)
|
||||
@@ -381,13 +389,9 @@ WorldPacket const* WorldPackets::Query::QuestPOIQueryResponse::Write()
|
||||
|
||||
void WorldPackets::Query::QueryQuestCompletionNPCs::Read()
|
||||
{
|
||||
uint32 questCount = 0;
|
||||
|
||||
_worldPacket >> questCount;
|
||||
QuestCompletionNPCs.resize(questCount);
|
||||
|
||||
for (int32& QuestID : QuestCompletionNPCs)
|
||||
_worldPacket >> QuestID;
|
||||
QuestCompletionNPCs.resize(_worldPacket.read<uint32>());
|
||||
if (!QuestCompletionNPCs.empty())
|
||||
_worldPacket.read(QuestCompletionNPCs.data(), QuestCompletionNPCs.size());
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Query::QuestCompletionNPCResponse::Write()
|
||||
@@ -396,10 +400,9 @@ WorldPacket const* WorldPackets::Query::QuestCompletionNPCResponse::Write()
|
||||
for (auto& quest : QuestCompletionNPCs)
|
||||
{
|
||||
_worldPacket << int32(quest.QuestID);
|
||||
|
||||
_worldPacket << uint32(quest.NPCs.size());
|
||||
for (int32 const& npc : quest.NPCs)
|
||||
_worldPacket << int32(npc);
|
||||
if (!quest.NPCs.empty())
|
||||
_worldPacket.append(quest.NPCs.data(), quest.NPCs.size());
|
||||
}
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -453,6 +456,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Query::ItemTextCache cons
|
||||
WorldPacket const* WorldPackets::Query::QueryItemTextResponse::Write()
|
||||
{
|
||||
_worldPacket.WriteBit(Valid);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket << Item;
|
||||
_worldPacket << Id;
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "NPCHandler.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "Position.h"
|
||||
#include "QuestDef.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "UnitDefines.h"
|
||||
#include <array>
|
||||
@@ -43,13 +44,25 @@ namespace WorldPackets
|
||||
uint32 CreatureID = 0;
|
||||
};
|
||||
|
||||
struct CreatureXDisplay
|
||||
{
|
||||
uint32 CreatureDisplayID = 0;
|
||||
float Scale = 1.0f;
|
||||
float Probability = 1.0f;
|
||||
};
|
||||
|
||||
struct CreatureDisplayStats
|
||||
{
|
||||
float TotalProbability = 0.0f;
|
||||
std::vector<CreatureXDisplay> CreatureDisplay;
|
||||
};
|
||||
|
||||
struct CreatureStats
|
||||
{
|
||||
CreatureStats()
|
||||
{
|
||||
Flags.fill(0);
|
||||
ProxyCreatureID.fill(0);
|
||||
CreatureDisplayID.fill(0);
|
||||
}
|
||||
|
||||
std::string Title;
|
||||
@@ -58,6 +71,7 @@ namespace WorldPackets
|
||||
int32 CreatureType = 0;
|
||||
int32 CreatureFamily = 0;
|
||||
int32 Classification = 0;
|
||||
CreatureDisplayStats Display;
|
||||
float HpMulti = 0.0f;
|
||||
float EnergyMulti = 0.0f;
|
||||
bool Leader = false;
|
||||
@@ -66,9 +80,9 @@ namespace WorldPackets
|
||||
int32 HealthScalingExpansion = 0;
|
||||
uint32 RequiredExpansion = 0;
|
||||
uint32 VignetteID = 0;
|
||||
int32 Class = 0;
|
||||
std::array<uint32, 2> Flags;
|
||||
std::array<uint32, 2> ProxyCreatureID;
|
||||
std::array<uint32, 4> CreatureDisplayID;
|
||||
std::array<std::string, 4> Name;
|
||||
std::array<std::string, 4> NameAlt;
|
||||
};
|
||||
@@ -110,6 +124,7 @@ namespace WorldPackets
|
||||
ObjectGuid BnetAccountID;
|
||||
ObjectGuid GuidActual;
|
||||
std::string Name;
|
||||
uint64 GuildClubMemberID = 0; // same as bgs.protocol.club.v1.MemberId.unique_id
|
||||
uint32 VirtualRealmAddress = 0;
|
||||
uint8 Race = RACE_NONE;
|
||||
uint8 Sex = GENDER_NONE;
|
||||
@@ -182,8 +197,8 @@ namespace WorldPackets
|
||||
|
||||
uint32 TextID = 0;
|
||||
bool Allow = false;
|
||||
float Probabilities[MAX_NPC_TEXT_OPTIONS];
|
||||
uint32 BroadcastTextID[MAX_NPC_TEXT_OPTIONS];
|
||||
std::array<float, MAX_NPC_TEXT_OPTIONS> Probabilities;
|
||||
std::array<uint32, MAX_NPC_TEXT_OPTIONS> BroadcastTextID;
|
||||
};
|
||||
|
||||
class QueryGameObject final : public ClientPacket
|
||||
@@ -297,7 +312,7 @@ namespace WorldPackets
|
||||
void Read() override;
|
||||
|
||||
int32 MissingQuestCount = 0;
|
||||
int32 MissingQuestPOIs[50];
|
||||
std::array<int32, 100> MissingQuestPOIs;
|
||||
};
|
||||
|
||||
struct QuestPOIBlobPoint
|
||||
@@ -313,13 +328,12 @@ namespace WorldPackets
|
||||
int32 QuestObjectiveID = 0;
|
||||
int32 QuestObjectID = 0;
|
||||
int32 MapID = 0;
|
||||
int32 WorldMapAreaID = 0;
|
||||
int32 Floor = 0;
|
||||
int32 UiMapID = 0;
|
||||
int32 Priority = 0;
|
||||
int32 Flags = 0;
|
||||
int32 WorldEffectID = 0;
|
||||
int32 PlayerConditionID = 0;
|
||||
int32 UnkWoD1 = 0;
|
||||
int32 SpawnTrackingID = 0;
|
||||
std::vector<QuestPOIBlobPoint> QuestPOIBlobPointStats;
|
||||
bool AlwaysAllowMergingBlobs = false;
|
||||
};
|
||||
@@ -347,7 +361,7 @@ namespace WorldPackets
|
||||
|
||||
void Read() override;
|
||||
|
||||
std::vector<int32> QuestCompletionNPCs;
|
||||
Array<int32, 100> QuestCompletionNPCs;
|
||||
};
|
||||
|
||||
struct QuestCompletionNPC
|
||||
|
||||
@@ -65,6 +65,7 @@ WorldPacket const* WorldPackets::Quest::QueryQuestInfoResponse::Write()
|
||||
_worldPacket << int32(Info.QuestID);
|
||||
_worldPacket << int32(Info.QuestType);
|
||||
_worldPacket << int32(Info.QuestLevel);
|
||||
_worldPacket << int32(Info.QuestScalingFactionGroup);
|
||||
_worldPacket << int32(Info.QuestMaxScalingLevel);
|
||||
_worldPacket << int32(Info.QuestPackageID);
|
||||
_worldPacket << int32(Info.QuestMinLevel);
|
||||
@@ -88,6 +89,7 @@ WorldPacket const* WorldPackets::Quest::QueryQuestInfoResponse::Write()
|
||||
_worldPacket << int32(Info.StartItem);
|
||||
_worldPacket << uint32(Info.Flags);
|
||||
_worldPacket << uint32(Info.FlagsEx);
|
||||
_worldPacket << uint32(Info.FlagsEx2);
|
||||
|
||||
for (uint32 i = 0; i < QUEST_REWARD_ITEM_COUNT; ++i)
|
||||
{
|
||||
@@ -115,6 +117,7 @@ WorldPacket const* WorldPackets::Quest::QueryQuestInfoResponse::Write()
|
||||
_worldPacket << int32(Info.RewardNumSkillUps);
|
||||
|
||||
_worldPacket << int32(Info.PortraitGiver);
|
||||
_worldPacket << int32(Info.PortraitGiverMount);
|
||||
_worldPacket << int32(Info.PortraitTurnIn);
|
||||
|
||||
for (uint32 i = 0; i < QUEST_REWARD_REPUTATIONS_COUNT; ++i)
|
||||
@@ -141,7 +144,7 @@ WorldPacket const* WorldPackets::Quest::QueryQuestInfoResponse::Write()
|
||||
|
||||
_worldPacket << uint32(Info.Objectives.size());
|
||||
_worldPacket << uint64(Info.AllowableRaces);
|
||||
_worldPacket << int32(Info.QuestRewardID);
|
||||
_worldPacket << int32(Info.TreasurePickerID);
|
||||
_worldPacket << int32(Info.Expansion);
|
||||
|
||||
_worldPacket.WriteBits(Info.LogTitle.size(), 9);
|
||||
@@ -222,13 +225,6 @@ WorldPacket const* WorldPackets::Quest::QuestUpdateAddPvPCredit::Write()
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Quest::QuestRewards const& questRewards)
|
||||
{
|
||||
data << int32(questRewards.ChoiceItemCount);
|
||||
|
||||
for (uint32 i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
|
||||
{
|
||||
data << int32(questRewards.ChoiceItems[i].ItemID);
|
||||
data << int32(questRewards.ChoiceItems[i].Quantity);
|
||||
}
|
||||
|
||||
data << int32(questRewards.ItemCount);
|
||||
|
||||
for (uint32 i = 0; i < QUEST_REWARD_ITEM_COUNT; ++i)
|
||||
@@ -266,7 +262,13 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Quest::QuestRewards const
|
||||
|
||||
data << int32(questRewards.SkillLineID);
|
||||
data << int32(questRewards.NumSkillUps);
|
||||
data << int32(questRewards.RewardID);
|
||||
data << int32(questRewards.TreasurePickerID);
|
||||
|
||||
for (uint32 i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
|
||||
{
|
||||
data << questRewards.ChoiceItems[i].Item;
|
||||
data << int32(questRewards.ChoiceItems[i].Quantity);
|
||||
}
|
||||
|
||||
data.WriteBit(questRewards.IsBoostSpell);
|
||||
data.FlushBits();
|
||||
@@ -302,6 +304,7 @@ WorldPacket const* WorldPackets::Quest::QuestGiverOfferRewardMessage::Write()
|
||||
_worldPacket << QuestData; // WorldPackets::Quest::QuestGiverOfferReward
|
||||
_worldPacket << int32(QuestPackageID);
|
||||
_worldPacket << int32(PortraitGiver);
|
||||
_worldPacket << int32(PortraitGiverMount);
|
||||
_worldPacket << int32(PortraitTurnIn);
|
||||
|
||||
_worldPacket.WriteBits(QuestTitle.size(), 9);
|
||||
@@ -360,6 +363,7 @@ WorldPacket const* WorldPackets::Quest::QuestGiverQuestDetails::Write()
|
||||
_worldPacket << int32(QuestID);
|
||||
_worldPacket << int32(QuestPackageID);
|
||||
_worldPacket << int32(PortraitGiver);
|
||||
_worldPacket << int32(PortraitGiverMount);
|
||||
_worldPacket << int32(PortraitTurnIn);
|
||||
_worldPacket << uint32(QuestFlags[0]); // Flags
|
||||
_worldPacket << uint32(QuestFlags[1]); // FlagsEx
|
||||
@@ -643,6 +647,9 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Quest::PlayerChoiceRespon
|
||||
{
|
||||
data << int32(playerChoiceResponse.ResponseID);
|
||||
data << int32(playerChoiceResponse.ChoiceArtFileID);
|
||||
data << int32(playerChoiceResponse.Flags);
|
||||
data << uint32(playerChoiceResponse.WidgetSetID);
|
||||
data << uint8(playerChoiceResponse.GroupID);
|
||||
|
||||
data.WriteBits(playerChoiceResponse.Answer.length(), 9);
|
||||
data.WriteBits(playerChoiceResponse.Header.length(), 9);
|
||||
@@ -670,6 +677,7 @@ WorldPacket const* WorldPackets::Quest::DisplayPlayerChoice::Write()
|
||||
_worldPacket.WriteBits(Question.length(), 8);
|
||||
_worldPacket.WriteBit(CloseChoiceFrame);
|
||||
_worldPacket.WriteBit(HideWarboardHeader);
|
||||
_worldPacket.WriteBit(KeepOpenAfterChoice);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
for (PlayerChoiceResponse const& response : Responses)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user