diff options
94 files changed, 3200 insertions, 1520 deletions
diff --git a/cmake/genrev.cmake b/cmake/genrev.cmake index b39a0780b1c..ceeed7bfac7 100644 --- a/cmake/genrev.cmake +++ b/cmake/genrev.cmake @@ -58,7 +58,7 @@ else() # No valid ways available to find/set the revision/hash, so let's force some defaults message(STATUS " Could not find a proper repository signature (hash) - you may need to pull tags with git fetch -t - Continuing anyway - note that the versionstring will be set to \"unknown 1970-01-01 00:00:00 (Archived)"\") + Continuing anyway - note that the versionstring will be set to \"unknown 1970-01-01 00:00:00 (Archived)\"") set(rev_date "1970-01-01 00:00:00 +0000") set(rev_hash "unknown") set(rev_branch "Archived") diff --git a/cmake/showoptions.cmake b/cmake/showoptions.cmake index 08dc2a0cfcb..2d21136d661 100644 --- a/cmake/showoptions.cmake +++ b/cmake/showoptions.cmake @@ -28,7 +28,6 @@ if( SCRIPTS ) add_definitions(-DSCRIPTS) else() message("* Build with scripts : No") - set(USE_SCRIPTPCH 0) endif() if( TOOLS ) diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql index a52d4875314..003b91b6286 100644 --- a/sql/base/auth_database.sql +++ b/sql/base/auth_database.sql @@ -317,7 +317,7 @@ CREATE TABLE `rbac_linked_permissions` ( LOCK TABLES `rbac_linked_permissions` WRITE; /*!40000 ALTER TABLE `rbac_linked_permissions` DISABLE KEYS */; -INSERT INTO `rbac_linked_permissions` VALUES (192,21),(192,42),(192,43),(192,193),(192,196),(193,48),(193,194),(193,197),(194,1),(194,2),(194,11),(194,13),(194,14),(194,15),(194,16),(194,17),(194,18),(194,19),(194,20),(194,22),(194,23),(194,25),(194,26),(194,27),(194,28),(194,29),(194,30),(194,31),(194,32),(194,33),(194,34),(194,35),(194,36),(194,37),(194,38),(194,39),(194,40),(194,41),(194,44),(194,46),(194,47),(194,195),(194,198),(195,3),(195,4),(195,5),(195,6),(195,24),(195,49),(195,199),(196,200),(196,201),(196,226),(196,227),(196,230),(196,231),(196,233),(196,234),(196,235),(196,238),(196,239),(196,240),(196,241),(196,242),(196,243),(196,244),(196,245),(196,246),(196,247),(196,248),(196,249),(196,250),(196,251),(196,252),(196,253),(196,254),(196,255),(196,256),(196,257),(196,258),(196,259),(196,260),(196,261),(196,262),(196,264),(196,265),(196,266),(196,267),(196,268),(196,269),(196,270),(196,271),(196,272),(196,279),(196,280),(196,283),(196,287),(196,288),(196,289),(196,290),(196,291),(196,292),(196,293),(196,294),(196,295),(196,296),(196,297),(196,298),(196,299),(196,302),(196,303),(196,304),(196,305),(196,306),(196,307),(196,308),(196,309),(196,310),(196,313),(196,314),(196,319),(196,320),(196,321),(196,322),(196,323),(196,324),(196,325),(196,326),(196,327),(196,328),(196,329),(196,330),(196,331),(196,332),(196,333),(196,334),(196,335),(196,336),(196,337),(196,338),(196,339),(196,340),(196,341),(196,342),(196,343),(196,344),(196,345),(196,346),(196,347),(196,348),(196,349),(196,350),(196,351),(196,352),(196,353),(196,354),(196,355),(196,356),(196,357),(196,358),(196,359),(196,360),(196,361),(196,362),(196,363),(196,364),(196,365),(196,366),(196,373),(196,375),(196,401),(196,402),(196,403),(196,404),(196,405),(196,406),(196,407),(196,417),(196,418),(196,419),(196,420),(196,421),(196,422),(196,423),(196,424),(196,425),(196,426),(196,427),(196,428),(196,429),(196,434),(196,435),(196,436),(196,437),(196,438),(196,439),(196,440),(196,441),(196,442),(196,443),(196,444),(196,445),(196,446),(196,447),(196,448),(196,449),(196,450),(196,451),(196,452),(196,453),(196,454),(196,455),(196,456),(196,457),(196,458),(196,459),(196,461),(196,463),(196,464),(196,465),(196,472),(196,473),(196,474),(196,475),(196,476),(196,477),(196,478),(196,488),(196,489),(196,491),(196,492),(196,493),(196,495),(196,497),(196,498),(196,499),(196,500),(196,502),(196,503),(196,505),(196,508),(196,511),(196,513),(196,514),(196,516),(196,519),(196,522),(196,523),(196,526),(196,527),(196,529),(196,530),(196,533),(196,535),(196,536),(196,537),(196,538),(196,539),(196,540),(196,541),(196,556),(196,581),(196,582),(196,592),(196,593),(196,596),(196,602),(196,603),(196,604),(196,605),(196,606),(196,607),(196,608),(196,609),(196,610),(196,611),(196,612),(196,613),(196,614),(196,615),(196,616),(196,617),(196,618),(196,619),(196,620),(196,621),(196,622),(196,623),(196,624),(196,625),(196,626),(196,627),(196,628),(196,629),(196,630),(196,631),(196,632),(196,633),(196,634),(196,635),(196,636),(196,637),(196,638),(196,639),(196,640),(196,641),(196,642),(196,643),(196,644),(196,645),(196,646),(196,647),(196,648),(196,649),(196,650),(196,651),(196,652),(196,653),(196,654),(196,655),(196,656),(196,657),(196,658),(196,659),(196,660),(196,661),(196,662),(196,663),(196,664),(196,665),(196,666),(196,667),(196,668),(196,669),(196,670),(196,671),(196,672),(196,673),(196,674),(196,675),(196,676),(196,677),(196,678),(196,679),(196,680),(196,681),(196,682),(196,683),(196,684),(196,685),(196,686),(196,687),(196,688),(196,689),(196,690),(196,691),(196,692),(196,693),(196,694),(196,695),(196,696),(196,697),(196,698),(196,699),(196,700),(196,701),(196,702),(196,703),(196,704),(196,705),(196,706),(196,707),(196,708),(196,709),(196,710),(196,711),(196,712),(196,713),(196,714),(196,715),(196,716),(196,717),(196,718),(196,719),(196,721),(196,722),(196,723),(196,724),(196,725),(196,726),(196,727),(196,728),(196,729),(196,730),(196,733),(196,734),(196,735),(196,736),(196,738),(196,739),(196,748),(196,753),(196,757),(196,773),(197,232),(197,236),(197,237),(197,273),(197,274),(197,275),(197,276),(197,277),(197,284),(197,285),(197,286),(197,301),(197,311),(197,387),(197,388),(197,389),(197,390),(197,391),(197,392),(197,393),(197,394),(197,395),(197,396),(197,397),(197,398),(197,399),(197,479),(197,480),(197,481),(197,482),(197,485),(197,486),(197,487),(197,494),(197,506),(197,509),(197,510),(197,517),(197,518),(197,521),(197,542),(197,543),(197,550),(197,558),(197,568),(197,571),(197,572),(197,573),(197,574),(197,575),(197,576),(197,577),(197,578),(197,579),(197,580),(197,583),(197,584),(197,585),(197,586),(197,587),(197,588),(197,589),(197,590),(197,591),(197,594),(197,595),(197,601),(197,743),(197,750),(197,758),(197,761),(197,762),(197,763),(197,764),(197,765),(197,766),(197,767),(197,768),(197,769),(197,770),(197,771),(197,772),(197,774),(198,218),(198,300),(198,312),(198,315),(198,316),(198,317),(198,318),(198,367),(198,368),(198,369),(198,370),(198,371),(198,372),(198,374),(198,376),(198,377),(198,378),(198,379),(198,380),(198,381),(198,382),(198,383),(198,384),(198,385),(198,386),(198,408),(198,409),(198,410),(198,411),(198,412),(198,413),(198,414),(198,415),(198,416),(198,430),(198,431),(198,432),(198,433),(198,462),(198,466),(198,467),(198,468),(198,469),(198,470),(198,471),(198,483),(198,484),(198,490),(198,504),(198,512),(198,515),(198,520),(198,524),(198,528),(198,531),(198,532),(198,544),(198,545),(198,546),(198,547),(198,548),(198,549),(198,551),(198,552),(198,553),(198,554),(198,555),(198,557),(198,559),(198,560),(198,561),(198,562),(198,563),(198,564),(198,565),(198,566),(198,567),(198,569),(198,570),(198,597),(198,598),(198,599),(198,600),(198,737),(198,740),(198,741),(198,742),(198,744),(198,745),(198,746),(198,747),(198,749),(198,751),(198,752),(198,754),(198,755),(198,756),(198,759),(198,760),(199,217),(199,221),(199,222),(199,223),(199,225),(199,263),(199,496),(199,501),(199,507),(199,525),(199,534); +INSERT INTO `rbac_linked_permissions` VALUES (192,21),(192,42),(192,43),(192,193),(192,196),(193,48),(193,194),(193,197),(194,1),(194,2),(194,11),(194,13),(194,14),(194,15),(194,16),(194,17),(194,18),(194,19),(194,20),(194,22),(194,23),(194,25),(194,26),(194,27),(194,28),(194,29),(194,30),(194,31),(194,32),(194,33),(194,34),(194,35),(194,36),(194,37),(194,38),(194,39),(194,40),(194,41),(194,44),(194,46),(194,47),(194,195),(194,198),(195,3),(195,4),(195,5),(195,6),(195,24),(195,49),(195,199),(196,200),(196,201),(196,226),(196,227),(196,230),(196,231),(196,233),(196,234),(196,235),(196,238),(196,239),(196,240),(196,241),(196,242),(196,243),(196,244),(196,245),(196,246),(196,247),(196,248),(196,249),(196,250),(196,251),(196,252),(196,253),(196,254),(196,255),(196,256),(196,257),(196,258),(196,259),(196,260),(196,261),(196,262),(196,264),(196,265),(196,266),(196,267),(196,268),(196,269),(196,270),(196,271),(196,272),(196,279),(196,280),(196,283),(196,287),(196,288),(196,289),(196,290),(196,291),(196,292),(196,293),(196,294),(196,295),(196,296),(196,297),(196,298),(196,299),(196,302),(196,303),(196,304),(196,305),(196,306),(196,307),(196,308),(196,309),(196,310),(196,313),(196,314),(196,319),(196,320),(196,321),(196,322),(196,323),(196,324),(196,325),(196,326),(196,327),(196,328),(196,329),(196,330),(196,331),(196,332),(196,333),(196,334),(196,335),(196,336),(196,337),(196,338),(196,339),(196,340),(196,341),(196,342),(196,343),(196,344),(196,345),(196,346),(196,347),(196,348),(196,349),(196,350),(196,351),(196,352),(196,353),(196,354),(196,355),(196,356),(196,357),(196,358),(196,359),(196,360),(196,361),(196,362),(196,363),(196,364),(196,365),(196,366),(196,373),(196,375),(196,400),(196,401),(196,402),(196,403),(196,404),(196,405),(196,406),(196,407),(196,417),(196,418),(196,419),(196,420),(196,421),(196,422),(196,423),(196,424),(196,425),(196,426),(196,427),(196,428),(196,429),(196,434),(196,435),(196,436),(196,437),(196,438),(196,439),(196,440),(196,441),(196,442),(196,443),(196,444),(196,445),(196,446),(196,447),(196,448),(196,449),(196,450),(196,451),(196,452),(196,453),(196,454),(196,455),(196,456),(196,457),(196,458),(196,459),(196,461),(196,463),(196,464),(196,465),(196,472),(196,473),(196,474),(196,475),(196,476),(196,477),(196,478),(196,488),(196,489),(196,491),(196,492),(196,493),(196,495),(196,497),(196,498),(196,499),(196,500),(196,502),(196,503),(196,505),(196,508),(196,511),(196,513),(196,514),(196,516),(196,519),(196,522),(196,523),(196,526),(196,527),(196,529),(196,530),(196,533),(196,535),(196,536),(196,537),(196,538),(196,539),(196,540),(196,541),(196,556),(196,581),(196,582),(196,592),(196,593),(196,596),(196,602),(196,603),(196,604),(196,605),(196,606),(196,607),(196,608),(196,609),(196,610),(196,611),(196,612),(196,613),(196,614),(196,615),(196,616),(196,617),(196,618),(196,619),(196,620),(196,621),(196,622),(196,623),(196,624),(196,625),(196,626),(196,627),(196,628),(196,629),(196,630),(196,631),(196,632),(196,633),(196,634),(196,635),(196,636),(196,637),(196,638),(196,639),(196,640),(196,641),(196,642),(196,643),(196,644),(196,645),(196,646),(196,647),(196,648),(196,649),(196,650),(196,651),(196,652),(196,653),(196,654),(196,655),(196,656),(196,657),(196,658),(196,659),(196,660),(196,661),(196,662),(196,663),(196,664),(196,665),(196,666),(196,667),(196,668),(196,669),(196,670),(196,671),(196,672),(196,673),(196,674),(196,675),(196,676),(196,677),(196,678),(196,679),(196,680),(196,681),(196,682),(196,683),(196,684),(196,685),(196,686),(196,687),(196,688),(196,689),(196,690),(196,691),(196,692),(196,693),(196,694),(196,695),(196,696),(196,697),(196,698),(196,699),(196,700),(196,701),(196,702),(196,703),(196,704),(196,705),(196,706),(196,707),(196,708),(196,709),(196,710),(196,711),(196,712),(196,713),(196,714),(196,715),(196,716),(196,717),(196,718),(196,719),(196,721),(196,722),(196,723),(196,724),(196,725),(196,726),(196,727),(196,728),(196,729),(196,730),(196,733),(196,734),(196,735),(196,736),(196,738),(196,739),(196,748),(196,753),(196,757),(196,773),(197,232),(197,236),(197,237),(197,273),(197,274),(197,275),(197,276),(197,277),(197,284),(197,285),(197,286),(197,301),(197,311),(197,387),(197,388),(197,389),(197,390),(197,391),(197,392),(197,393),(197,394),(197,395),(197,396),(197,397),(197,398),(197,399),(197,479),(197,480),(197,481),(197,482),(197,485),(197,486),(197,487),(197,494),(197,506),(197,509),(197,510),(197,517),(197,518),(197,521),(197,542),(197,543),(197,550),(197,558),(197,568),(197,571),(197,572),(197,573),(197,574),(197,575),(197,576),(197,577),(197,578),(197,579),(197,580),(197,583),(197,584),(197,585),(197,586),(197,587),(197,588),(197,589),(197,590),(197,591),(197,594),(197,595),(197,601),(197,743),(197,750),(197,758),(197,761),(197,762),(197,763),(197,764),(197,765),(197,766),(197,767),(197,768),(197,769),(197,770),(197,771),(197,772),(197,774),(198,218),(198,300),(198,312),(198,315),(198,316),(198,317),(198,318),(198,367),(198,368),(198,369),(198,370),(198,371),(198,372),(198,374),(198,376),(198,377),(198,378),(198,379),(198,380),(198,381),(198,382),(198,383),(198,384),(198,385),(198,386),(198,408),(198,409),(198,410),(198,411),(198,412),(198,413),(198,414),(198,415),(198,416),(198,430),(198,431),(198,432),(198,433),(198,462),(198,466),(198,467),(198,468),(198,469),(198,470),(198,471),(198,483),(198,484),(198,490),(198,504),(198,512),(198,515),(198,520),(198,524),(198,528),(198,531),(198,532),(198,544),(198,545),(198,546),(198,547),(198,548),(198,549),(198,551),(198,552),(198,553),(198,554),(198,555),(198,557),(198,559),(198,560),(198,561),(198,562),(198,563),(198,564),(198,565),(198,566),(198,567),(198,569),(198,570),(198,597),(198,598),(198,599),(198,600),(198,737),(198,740),(198,741),(198,742),(198,744),(198,745),(198,746),(198,747),(198,749),(198,751),(198,752),(198,754),(198,755),(198,756),(198,759),(198,760),(199,217),(199,221),(199,222),(199,223),(199,225),(199,263),(199,496),(199,501),(199,507),(199,525),(199,534); /*!40000 ALTER TABLE `rbac_linked_permissions` ENABLE KEYS */; UNLOCK TABLES; @@ -341,7 +341,7 @@ CREATE TABLE `rbac_permissions` ( LOCK TABLES `rbac_permissions` WRITE; /*!40000 ALTER TABLE `rbac_permissions` DISABLE KEYS */; -INSERT INTO `rbac_permissions` VALUES (1,'Instant logout'),(2,'Skip Queue'),(3,'Join Normal Battleground'),(4,'Join Random Battleground'),(5,'Join Arenas'),(6,'Join Dungeon Finder'),(11,'Log GM trades'),(13,'Skip Instance required bosses check'),(14,'Skip character creation team mask check'),(15,'Skip character creation class mask check'),(16,'Skip character creation race mask check'),(17,'Skip character creation reserved name check'),(18,'Skip character creation heroic min level check'),(19,'Skip needed requirements to use channel check'),(20,'Skip disable map check'),(21,'Skip reset talents when used more than allowed check'),(22,'Skip spam chat check'),(23,'Skip over-speed ping check'),(24,'Two side faction characters on the same account'),(25,'Allow say chat between factions'),(26,'Allow channel chat between factions'),(27,'Two side mail interaction'),(28,'See two side who list'),(29,'Add friends of other faction'),(30,'Save character without delay with .save command'),(31,'Use params with .unstuck command'),(32,'Can be assigned tickets with .assign ticket command'),(33,'Notify if a command was not found'),(34,'Check if should appear in list using .gm ingame command'),(35,'See all security levels with who command'),(36,'Filter whispers'),(37,'Use staff badge in chat'),(38,'Resurrect with full Health Points'),(39,'Restore saved gm setting states'),(40,'Allows to add a gm to friend list'),(41,'Use Config option START_GM_LEVEL to assign new character level'),(42,'Allows to use CMSG_WORLD_TELEPORT opcode'),(43,'Allows to use CMSG_WHOIS opcode'),(44,'Receive global GM messages/texts'),(45,'Join channels without announce'),(46,'Change channel settings without being channel moderator'),(47,'Enables lower security than target check'),(48,'Enable IP, Last Login and EMail output in pinfo'),(49,'Forces to enter the email for confirmation on password change'),(50,'Allow user to check his own email with .account'),(192,'Role: Sec Level Administrator'),(193,'Role: Sec Level Gamemaster'),(194,'Role: Sec Level Moderator'),(195,'Role: Sec Level Player'),(196,'Role: Administrator Commands'),(197,'Role: Gamemaster Commands'),(198,'Role: Moderator Commands'),(199,'Role: Player Commands'),(200,'Command: rbac'),(201,'Command: rbac account'),(202,'Command: rbac account list'),(203,'Command: rbac account grant'),(204,'Command: rbac account deny'),(205,'Command: rbac account revoke'),(206,'Command: rbac list'),(217,'Command: account'),(218,'Command: account addon'),(219,'Command: account create'),(220,'Command: account delete'),(221,'Command: account lock'),(222,'Command: account lock country'),(223,'Command: account lock ip'),(224,'Command: account onlinelist'),(225,'Command: account password'),(226,'Command: account set'),(227,'Command: account set addon'),(228,'Command: account set gmlevel'),(229,'Command: account set password'),(230,'Command: achievement'),(231,'Command: achievement add'),(232,'Command: arena'),(233,'Command: arena captain'),(234,'Command: arena create'),(235,'Command: arena disband'),(236,'Command: arena info'),(237,'Command: arena lookup'),(238,'Command: arena rename'),(239,'Command: ban'),(240,'Command: ban account'),(241,'Command: ban character'),(242,'Command: ban ip'),(243,'Command: ban playeraccount'),(244,'Command: baninfo'),(245,'Command: baninfo account'),(246,'Command: baninfo character'),(247,'Command: baninfo ip'),(248,'Command: banlist'),(249,'Command: banlist account'),(250,'Command: banlist character'),(251,'Command: banlist ip'),(252,'Command: unban'),(253,'Command: unban account'),(254,'Command: unban character'),(255,'Command: unban ip'),(256,'Command: unban playeraccount'),(257,'Command: bf'),(258,'Command: bf start'),(259,'Command: bf stop'),(260,'Command: bf switch'),(261,'Command: bf timer'),(262,'Command: bf enable'),(263,'Command: account email'),(264,'Command: account set sec'),(265,'Command: account set sec email'),(266,'Command: account set sec regmail'),(267,'Command: cast'),(268,'Command: cast back'),(269,'Command: cast dist'),(270,'Command: cast self'),(271,'Command: cast target'),(272,'Command: cast dest'),(273,'Command: character'),(274,'Command: character customize'),(275,'Command: character changefaction'),(276,'Command: character changerace'),(277,'Command: character deleted'),(279,'Command: character deleted list'),(280,'Command: character deleted restore'),(283,'Command: character level'),(284,'Command: character rename'),(285,'Command: character reputation'),(286,'Command: character titles'),(287,'Command: levelup'),(288,'Command: pdump'),(289,'Command: pdump load'),(290,'Command: pdump write'),(291,'Command: cheat'),(292,'Command: cheat casttime'),(293,'Command: cheat cooldown'),(294,'Command: cheat explore'),(295,'Command: cheat god'),(296,'Command: cheat power'),(297,'Command: cheat status'),(298,'Command: cheat taxi'),(299,'Command: cheat waterwalk'),(300,'Command: debug'),(301,'Command: debug anim'),(302,'Command: debug areatriggers'),(303,'Command: debug arena'),(304,'Command: debug bg'),(305,'Command: debug entervehicle'),(306,'Command: debug getitemstate'),(307,'Command: debug getitemvalue'),(308,'Command: debug getvalue'),(309,'Command: debug hostil'),(310,'Command: debug itemexpire'),(311,'Command: debug lootrecipient'),(312,'Command: debug los'),(313,'Command: debug mod32value'),(314,'Command: debug moveflags'),(315,'Command: debug play'),(316,'Command: debug play cinematics'),(317,'Command: debug play movie'),(318,'Command: debug play sound'),(319,'Command: debug send'),(320,'Command: debug send buyerror'),(321,'Command: debug send channelnotify'),(322,'Command: debug send chatmessage'),(323,'Command: debug send equiperror'),(324,'Command: debug send largepacket'),(325,'Command: debug send opcode'),(326,'Command: debug send qinvalidmsg'),(327,'Command: debug send qpartymsg'),(328,'Command: debug send sellerror'),(329,'Command: debug send setphaseshift'),(330,'Command: debug send spellfail'),(331,'Command: debug setaurastate'),(332,'Command: debug setbit'),(333,'Command: debug setitemvalue'),(334,'Command: debug setvalue'),(335,'Command: debug setvid'),(336,'Command: debug spawnvehicle'),(337,'Command: debug threat'),(338,'Command: debug update'),(339,'Command: debug uws'),(340,'Command: wpgps'),(341,'Command: deserter'),(342,'Command: deserter bg'),(343,'Command: deserter bg add'),(344,'Command: deserter bg remove'),(345,'Command: deserter instance'),(346,'Command: deserter instance add'),(347,'Command: deserter instance remove'),(348,'Command: disable'),(349,'Command: disable add'),(350,'Command: disable add achievement_criteria'),(351,'Command: disable add battleground'),(352,'Command: disable add map'),(353,'Command: disable add mmap'),(354,'Command: disable add outdoorpvp'),(355,'Command: disable add quest'),(356,'Command: disable add spell'),(357,'Command: disable add vmap'),(358,'Command: disable remove'),(359,'Command: disable remove achievement_criteria'),(360,'Command: disable remove battleground'),(361,'Command: disable remove map'),(362,'Command: disable remove mmap'),(363,'Command: disable remove outdoorpvp'),(364,'Command: disable remove quest'),(365,'Command: disable remove spell'),(366,'Command: disable remove vmap'),(367,'Command: event'),(368,'Command: event activelist'),(369,'Command: event start'),(370,'Command: event stop'),(371,'Command: gm'),(372,'Command: gm chat'),(373,'Command: gm fly'),(374,'Command: gm ingame'),(375,'Command: gm list'),(376,'Command: gm visible'),(377,'Command: go'),(378,'Command: go creature'),(379,'Command: go graveyard'),(380,'Command: go grid'),(381,'Command: go object'),(382,'Command: go taxinode'),(383,'Command: go ticket'),(384,'Command: go trigger'),(385,'Command: go xyz'),(386,'Command: go zonexy'),(387,'Command: gobject'),(388,'Command: gobject activate'),(389,'Command: gobject add'),(390,'Command: gobject add temp'),(391,'Command: gobject delete'),(392,'Command: gobject info'),(393,'Command: gobject move'),(394,'Command: gobject near'),(395,'Command: gobject set'),(396,'Command: gobject set phase'),(397,'Command: gobject set state'),(398,'Command: gobject target'),(399,'Command: gobject turn'),(401,'Command: guild'),(402,'Command: guild create'),(403,'Command: guild delete'),(404,'Command: guild invite'),(405,'Command: guild uninvite'),(406,'Command: guild rank'),(407,'Command: guild rename'),(408,'Command: honor'),(409,'Command: honor add'),(410,'Command: honor add kill'),(411,'Command: honor update'),(412,'Command: instance'),(413,'Command: instance listbinds'),(414,'Command: instance unbind'),(415,'Command: instance stats'),(416,'Command: instance savedata'),(417,'Command: learn'),(418,'Command: learn all'),(419,'Command: learn all my'),(420,'Command: learn all my class'),(421,'Command: learn all my pettalents'),(422,'Command: learn all my spells'),(423,'Command: learn all my talents'),(424,'Command: learn all gm'),(425,'Command: learn all crafts'),(426,'Command: learn all default'),(427,'Command: learn all lang'),(428,'Command: learn all recipes'),(429,'Command: unlearn'),(430,'Command: lfg'),(431,'Command: lfg player'),(432,'Command: lfg group'),(433,'Command: lfg queue'),(434,'Command: lfg clean'),(435,'Command: lfg options'),(436,'Command: list'),(437,'Command: list creature'),(438,'Command: list item'),(439,'Command: list object'),(440,'Command: list auras'),(441,'Command: list mail'),(442,'Command: lookup'),(443,'Command: lookup area'),(444,'Command: lookup creature'),(445,'Command: lookup event'),(446,'Command: lookup faction'),(447,'Command: lookup item'),(448,'Command: lookup itemset'),(449,'Command: lookup object'),(450,'Command: lookup quest'),(451,'Command: lookup player'),(452,'Command: lookup player ip'),(453,'Command: lookup player account'),(454,'Command: lookup player email'),(455,'Command: lookup skill'),(456,'Command: lookup spell'),(457,'Command: lookup spell id'),(458,'Command: lookup taxinode'),(459,'Command: lookup tele'),(460,'Command: lookup title'),(461,'Command: lookup map'),(462,'Command: announce'),(463,'Command: channel'),(464,'Command: channel set'),(465,'Command: channel set ownership'),(466,'Command: gmannounce'),(467,'Command: gmnameannounce'),(468,'Command: gmnotify'),(469,'Command: nameannounce'),(470,'Command: notify'),(471,'Command: whispers'),(472,'Command: group'),(473,'Command: group leader'),(474,'Command: group disband'),(475,'Command: group remove'),(476,'Command: group join'),(477,'Command: group list'),(478,'Command: group summon'),(479,'Command: pet'),(480,'Command: pet create'),(481,'Command: pet learn'),(482,'Command: pet unlearn'),(483,'Command: send'),(484,'Command: send items'),(485,'Command: send mail'),(486,'Command: send message'),(487,'Command: send money'),(488,'Command: additem'),(489,'Command: additemset'),(490,'Command: appear'),(491,'Command: aura'),(492,'Command: bank'),(493,'Command: bindsight'),(494,'Command: combatstop'),(495,'Command: cometome'),(496,'Command: commands'),(497,'Command: cooldown'),(498,'Command: damage'),(499,'Command: dev'),(500,'Command: die'),(501,'Command: dismount'),(502,'Command: distance'),(503,'Command: flusharenapoints'),(504,'Command: freeze'),(505,'Command: gps'),(506,'Command: guid'),(507,'Command: help'),(508,'Command: hidearea'),(509,'Command: itemmove'),(510,'Command: kick'),(511,'Command: linkgrave'),(512,'Command: listfreeze'),(513,'Command: maxskill'),(514,'Command: movegens'),(515,'Command: mute'),(516,'Command: neargrave'),(517,'Command: pinfo'),(518,'Command: playall'),(519,'Command: possess'),(520,'Command: recall'),(521,'Command: repairitems'),(522,'Command: respawn'),(523,'Command: revive'),(524,'Command: saveall'),(525,'Command: save'),(526,'Command: setskill'),(527,'Command: showarea'),(528,'Command: summon'),(529,'Command: unaura'),(530,'Command: unbindsight'),(531,'Command: unfreeze'),(532,'Command: unmute'),(533,'Command: unpossess'),(534,'Command: unstuck'),(535,'Command: wchange'),(536,'Command: mmap'),(537,'Command: mmap loadedtiles'),(538,'Command: mmap loc'),(539,'Command: mmap path'),(540,'Command: mmap stats'),(541,'Command: mmap testarea'),(542,'Command: morph'),(543,'Command: demorph'),(544,'Command: modify'),(545,'Command: modify arenapoints'),(546,'Command: modify bit'),(547,'Command: modify drunk'),(548,'Command: modify energy'),(549,'Command: modify faction'),(550,'Command: modify gender'),(551,'Command: modify honor'),(552,'Command: modify hp'),(553,'Command: modify mana'),(554,'Command: modify money'),(555,'Command: modify mount'),(556,'Command: modify phase'),(557,'Command: modify rage'),(558,'Command: modify reputation'),(559,'Command: modify runicpower'),(560,'Command: modify scale'),(561,'Command: modify speed'),(562,'Command: modify speed all'),(563,'Command: modify speed backwalk'),(564,'Command: modify speed fly'),(565,'Command: modify speed walk'),(566,'Command: modify speed swim'),(567,'Command: modify spell'),(568,'Command: modify standstate'),(569,'Command: modify talentpoints'),(570,'Command: npc'),(571,'Command: npc add'),(572,'Command: npc add formation'),(573,'Command: npc add item'),(574,'Command: npc add move'),(575,'Command: npc add temp'),(576,'Command: npc add delete'),(577,'Command: npc add delete item'),(578,'Command: npc add follow'),(579,'Command: npc add follow stop'),(580,'Command: npc set'),(581,'Command: npc set allowmove'),(582,'Command: npc set entry'),(583,'Command: npc set factionid'),(584,'Command: npc set flag'),(585,'Command: npc set level'),(586,'Command: npc set link'),(587,'Command: npc set model'),(588,'Command: npc set movetype'),(589,'Command: npc set phase'),(590,'Command: npc set spawndist'),(591,'Command: npc set spawntime'),(592,'Command: npc set data'),(593,'Command: npc info'),(594,'Command: npc near'),(595,'Command: npc move'),(596,'Command: npc playemote'),(597,'Command: npc say'),(598,'Command: npc textemote'),(599,'Command: npc whisper'),(600,'Command: npc yell'),(601,'Command: npc tame'),(602,'Command: quest'),(603,'Command: quest add'),(604,'Command: quest complete'),(605,'Command: quest remove'),(606,'Command: quest reward'),(607,'Command: reload'),(608,'Command: reload access_requirement'),(609,'Command: reload achievement_criteria_data'),(610,'Command: reload achievement_reward'),(611,'Command: reload all'),(612,'Command: reload all achievement'),(613,'Command: reload all area'),(614,'Command: reload all eventai'),(615,'Command: reload all gossips'),(616,'Command: reload all item'),(617,'Command: reload all locales'),(618,'Command: reload all loot'),(619,'Command: reload all npc'),(620,'Command: reload all quest'),(621,'Command: reload all scripts'),(622,'Command: reload all spell'),(623,'Command: reload areatrigger_involvedrelation'),(624,'Command: reload areatrigger_tavern'),(625,'Command: reload areatrigger_teleport'),(626,'Command: reload auctions'),(627,'Command: reload autobroadcast'),(628,'Command: reload command'),(629,'Command: reload conditions'),(630,'Command: reload config'),(631,'Command: reload creature_text'),(632,'Command: reload creature_ai_scripts'),(633,'Command: reload creature_ai_texts'),(634,'Command: reload creature_questender'),(635,'Command: reload creature_linked_respawn'),(636,'Command: reload creature_loot_template'),(637,'Command: reload creature_onkill_reputation'),(638,'Command: reload creature_queststarter'),(639,'Command: reload creature_summon_groups'),(640,'Command: reload creature_template'),(641,'Command: reload disables'),(642,'Command: reload disenchant_loot_template'),(643,'Command: reload event_scripts'),(644,'Command: reload fishing_loot_template'),(645,'Command: reload game_graveyard_zone'),(646,'Command: reload game_tele'),(647,'Command: reload gameobject_questender'),(648,'Command: reload gameobject_loot_template'),(649,'Command: reload gameobject_queststarter'),(650,'Command: reload gm_tickets'),(651,'Command: reload gossip_menu'),(652,'Command: reload gossip_menu_option'),(653,'Command: reload item_enchantment_template'),(654,'Command: reload item_loot_template'),(655,'Command: reload item_set_names'),(656,'Command: reload lfg_dungeon_rewards'),(657,'Command: reload locales_achievement_reward'),(658,'Command: reload locales_creature'),(659,'Command: reload locales_creature_text'),(660,'Command: reload locales_gameobject'),(661,'Command: reload locales_gossip_menu_option'),(662,'Command: reload locales_item'),(663,'Command: reload locales_item_set_name'),(664,'Command: reload locales_npc_text'),(665,'Command: reload locales_page_text'),(666,'Command: reload locales_points_of_interest'),(667,'Command: reload locales_quest'),(668,'Command: reload mail_level_reward'),(669,'Command: reload mail_loot_template'),(670,'Command: reload milling_loot_template'),(671,'Command: reload npc_spellclick_spells'),(672,'Command: reload npc_trainer'),(673,'Command: reload npc_vendor'),(674,'Command: reload page_text'),(675,'Command: reload pickpocketing_loot_template'),(676,'Command: reload points_of_interest'),(677,'Command: reload prospecting_loot_template'),(678,'Command: reload quest_poi'),(679,'Command: reload quest_template'),(680,'Command: reload rbac'),(681,'Command: reload reference_loot_template'),(682,'Command: reload reserved_name'),(683,'Command: reload reputation_reward_rate'),(684,'Command: reload reputation_spillover_template'),(685,'Command: reload skill_discovery_template'),(686,'Command: reload skill_extra_item_template'),(687,'Command: reload skill_fishing_base_level'),(688,'Command: reload skinning_loot_template'),(689,'Command: reload smart_scripts'),(690,'Command: reload spell_required'),(691,'Command: reload spell_area'),(692,'Command: reload spell_bonus_data'),(693,'Command: reload spell_group'),(694,'Command: reload spell_learn_spell'),(695,'Command: reload spell_loot_template'),(696,'Command: reload spell_linked_spell'),(697,'Command: reload spell_pet_auras'),(698,'Command: reload spell_proc_event'),(699,'Command: reload spell_proc'),(700,'Command: reload spell_scripts'),(701,'Command: reload spell_target_position'),(702,'Command: reload spell_threats'),(703,'Command: reload spell_group_stack_rules'),(704,'Command: reload trinity_string'),(705,'Command: reload warden_action'),(706,'Command: reload waypoint_scripts'),(707,'Command: reload waypoint_data'),(708,'Command: reload vehicle_accessory'),(709,'Command: reload vehicle_template_accessory'),(710,'Command: reset'),(711,'Command: reset achievements'),(712,'Command: reset honor'),(713,'Command: reset level'),(714,'Command: reset spells'),(715,'Command: reset stats'),(716,'Command: reset talents'),(717,'Command: reset all'),(718,'Command: server'),(719,'Command: server corpses'),(720,'Command: server exit'),(721,'Command: server idlerestart'),(722,'Command: server idlerestart cancel'),(723,'Command: server idleshutdown'),(724,'Command: server idleshutdown cancel'),(725,'Command: server info'),(726,'Command: server plimit'),(727,'Command: server restart'),(728,'Command: server restart cancel'),(729,'Command: server set'),(730,'Command: server set closed'),(731,'Command: server set difftime'),(732,'Command: server set loglevel'),(733,'Command: server set motd'),(734,'Command: server shutdown'),(735,'Command: server shutdown cancel'),(736,'Command: server motd'),(737,'Command: tele'),(738,'Command: tele add'),(739,'Command: tele del'),(740,'Command: tele name'),(741,'Command: tele group'),(742,'Command: ticket'),(743,'Command: ticket assign'),(744,'Command: ticket close'),(745,'Command: ticket closedlist'),(746,'Command: ticket comment'),(747,'Command: ticket complete'),(748,'Command: ticket delete'),(749,'Command: ticket escalate'),(750,'Command: ticket escalatedlist'),(751,'Command: ticket list'),(752,'Command: ticket onlinelist'),(753,'Command: ticket reset'),(754,'Command: ticket response'),(755,'Command: ticket response append'),(756,'Command: ticket response appendln'),(757,'Command: ticket togglesystem'),(758,'Command: ticket unassign'),(759,'Command: ticket viewid'),(760,'Command: ticket viewname'),(761,'Command: titles'),(762,'Command: titles add'),(763,'Command: titles current'),(764,'Command: titles remove'),(765,'Command: titles set'),(766,'Command: titles set mask'),(767,'Command: wp'),(768,'Command: wp add'),(769,'Command: wp event'),(770,'Command: wp load'),(771,'Command: wp modify'),(772,'Command: wp unload'),(773,'Command: wp reload'),(774,'Command: wp show'); +INSERT INTO `rbac_permissions` VALUES (1,'Instant logout'),(2,'Skip Queue'),(3,'Join Normal Battleground'),(4,'Join Random Battleground'),(5,'Join Arenas'),(6,'Join Dungeon Finder'),(11,'Log GM trades'),(13,'Skip Instance required bosses check'),(14,'Skip character creation team mask check'),(15,'Skip character creation class mask check'),(16,'Skip character creation race mask check'),(17,'Skip character creation reserved name check'),(18,'Skip character creation heroic min level check'),(19,'Skip needed requirements to use channel check'),(20,'Skip disable map check'),(21,'Skip reset talents when used more than allowed check'),(22,'Skip spam chat check'),(23,'Skip over-speed ping check'),(24,'Two side faction characters on the same account'),(25,'Allow say chat between factions'),(26,'Allow channel chat between factions'),(27,'Two side mail interaction'),(28,'See two side who list'),(29,'Add friends of other faction'),(30,'Save character without delay with .save command'),(31,'Use params with .unstuck command'),(32,'Can be assigned tickets with .assign ticket command'),(33,'Notify if a command was not found'),(34,'Check if should appear in list using .gm ingame command'),(35,'See all security levels with who command'),(36,'Filter whispers'),(37,'Use staff badge in chat'),(38,'Resurrect with full Health Points'),(39,'Restore saved gm setting states'),(40,'Allows to add a gm to friend list'),(41,'Use Config option START_GM_LEVEL to assign new character level'),(42,'Allows to use CMSG_WORLD_TELEPORT opcode'),(43,'Allows to use CMSG_WHOIS opcode'),(44,'Receive global GM messages/texts'),(45,'Join channels without announce'),(46,'Change channel settings without being channel moderator'),(47,'Enables lower security than target check'),(48,'Enable IP, Last Login and EMail output in pinfo'),(49,'Forces to enter the email for confirmation on password change'),(50,'Allow user to check his own email with .account'),(192,'Role: Sec Level Administrator'),(193,'Role: Sec Level Gamemaster'),(194,'Role: Sec Level Moderator'),(195,'Role: Sec Level Player'),(196,'Role: Administrator Commands'),(197,'Role: Gamemaster Commands'),(198,'Role: Moderator Commands'),(199,'Role: Player Commands'),(200,'Command: rbac'),(201,'Command: rbac account'),(202,'Command: rbac account list'),(203,'Command: rbac account grant'),(204,'Command: rbac account deny'),(205,'Command: rbac account revoke'),(206,'Command: rbac list'),(217,'Command: account'),(218,'Command: account addon'),(219,'Command: account create'),(220,'Command: account delete'),(221,'Command: account lock'),(222,'Command: account lock country'),(223,'Command: account lock ip'),(224,'Command: account onlinelist'),(225,'Command: account password'),(226,'Command: account set'),(227,'Command: account set addon'),(228,'Command: account set gmlevel'),(229,'Command: account set password'),(230,'Command: achievement'),(231,'Command: achievement add'),(232,'Command: arena'),(233,'Command: arena captain'),(234,'Command: arena create'),(235,'Command: arena disband'),(236,'Command: arena info'),(237,'Command: arena lookup'),(238,'Command: arena rename'),(239,'Command: ban'),(240,'Command: ban account'),(241,'Command: ban character'),(242,'Command: ban ip'),(243,'Command: ban playeraccount'),(244,'Command: baninfo'),(245,'Command: baninfo account'),(246,'Command: baninfo character'),(247,'Command: baninfo ip'),(248,'Command: banlist'),(249,'Command: banlist account'),(250,'Command: banlist character'),(251,'Command: banlist ip'),(252,'Command: unban'),(253,'Command: unban account'),(254,'Command: unban character'),(255,'Command: unban ip'),(256,'Command: unban playeraccount'),(257,'Command: bf'),(258,'Command: bf start'),(259,'Command: bf stop'),(260,'Command: bf switch'),(261,'Command: bf timer'),(262,'Command: bf enable'),(263,'Command: account email'),(264,'Command: account set sec'),(265,'Command: account set sec email'),(266,'Command: account set sec regmail'),(267,'Command: cast'),(268,'Command: cast back'),(269,'Command: cast dist'),(270,'Command: cast self'),(271,'Command: cast target'),(272,'Command: cast dest'),(273,'Command: character'),(274,'Command: character customize'),(275,'Command: character changefaction'),(276,'Command: character changerace'),(277,'Command: character deleted'),(279,'Command: character deleted list'),(280,'Command: character deleted restore'),(283,'Command: character level'),(284,'Command: character rename'),(285,'Command: character reputation'),(286,'Command: character titles'),(287,'Command: levelup'),(288,'Command: pdump'),(289,'Command: pdump load'),(290,'Command: pdump write'),(291,'Command: cheat'),(292,'Command: cheat casttime'),(293,'Command: cheat cooldown'),(294,'Command: cheat explore'),(295,'Command: cheat god'),(296,'Command: cheat power'),(297,'Command: cheat status'),(298,'Command: cheat taxi'),(299,'Command: cheat waterwalk'),(300,'Command: debug'),(301,'Command: debug anim'),(302,'Command: debug areatriggers'),(303,'Command: debug arena'),(304,'Command: debug bg'),(305,'Command: debug entervehicle'),(306,'Command: debug getitemstate'),(307,'Command: debug getitemvalue'),(308,'Command: debug getvalue'),(309,'Command: debug hostil'),(310,'Command: debug itemexpire'),(311,'Command: debug lootrecipient'),(312,'Command: debug los'),(313,'Command: debug mod32value'),(314,'Command: debug moveflags'),(315,'Command: debug play'),(316,'Command: debug play cinematics'),(317,'Command: debug play movie'),(318,'Command: debug play sound'),(319,'Command: debug send'),(320,'Command: debug send buyerror'),(321,'Command: debug send channelnotify'),(322,'Command: debug send chatmessage'),(323,'Command: debug send equiperror'),(324,'Command: debug send largepacket'),(325,'Command: debug send opcode'),(326,'Command: debug send qinvalidmsg'),(327,'Command: debug send qpartymsg'),(328,'Command: debug send sellerror'),(329,'Command: debug send setphaseshift'),(330,'Command: debug send spellfail'),(331,'Command: debug setaurastate'),(332,'Command: debug setbit'),(333,'Command: debug setitemvalue'),(334,'Command: debug setvalue'),(335,'Command: debug setvid'),(336,'Command: debug spawnvehicle'),(337,'Command: debug threat'),(338,'Command: debug update'),(339,'Command: debug uws'),(340,'Command: wpgps'),(341,'Command: deserter'),(342,'Command: deserter bg'),(343,'Command: deserter bg add'),(344,'Command: deserter bg remove'),(345,'Command: deserter instance'),(346,'Command: deserter instance add'),(347,'Command: deserter instance remove'),(348,'Command: disable'),(349,'Command: disable add'),(350,'Command: disable add achievement_criteria'),(351,'Command: disable add battleground'),(352,'Command: disable add map'),(353,'Command: disable add mmap'),(354,'Command: disable add outdoorpvp'),(355,'Command: disable add quest'),(356,'Command: disable add spell'),(357,'Command: disable add vmap'),(358,'Command: disable remove'),(359,'Command: disable remove achievement_criteria'),(360,'Command: disable remove battleground'),(361,'Command: disable remove map'),(362,'Command: disable remove mmap'),(363,'Command: disable remove outdoorpvp'),(364,'Command: disable remove quest'),(365,'Command: disable remove spell'),(366,'Command: disable remove vmap'),(367,'Command: event'),(368,'Command: event activelist'),(369,'Command: event start'),(370,'Command: event stop'),(371,'Command: gm'),(372,'Command: gm chat'),(373,'Command: gm fly'),(374,'Command: gm ingame'),(375,'Command: gm list'),(376,'Command: gm visible'),(377,'Command: go'),(378,'Command: go creature'),(379,'Command: go graveyard'),(380,'Command: go grid'),(381,'Command: go object'),(382,'Command: go taxinode'),(383,'Command: go ticket'),(384,'Command: go trigger'),(385,'Command: go xyz'),(386,'Command: go zonexy'),(387,'Command: gobject'),(388,'Command: gobject activate'),(389,'Command: gobject add'),(390,'Command: gobject add temp'),(391,'Command: gobject delete'),(392,'Command: gobject info'),(393,'Command: gobject move'),(394,'Command: gobject near'),(395,'Command: gobject set'),(396,'Command: gobject set phase'),(397,'Command: gobject set state'),(398,'Command: gobject target'),(399,'Command: gobject turn'),(400,'debug transport'),(401,'Command: guild'),(402,'Command: guild create'),(403,'Command: guild delete'),(404,'Command: guild invite'),(405,'Command: guild uninvite'),(406,'Command: guild rank'),(407,'Command: guild rename'),(408,'Command: honor'),(409,'Command: honor add'),(410,'Command: honor add kill'),(411,'Command: honor update'),(412,'Command: instance'),(413,'Command: instance listbinds'),(414,'Command: instance unbind'),(415,'Command: instance stats'),(416,'Command: instance savedata'),(417,'Command: learn'),(418,'Command: learn all'),(419,'Command: learn all my'),(420,'Command: learn all my class'),(421,'Command: learn all my pettalents'),(422,'Command: learn all my spells'),(423,'Command: learn all my talents'),(424,'Command: learn all gm'),(425,'Command: learn all crafts'),(426,'Command: learn all default'),(427,'Command: learn all lang'),(428,'Command: learn all recipes'),(429,'Command: unlearn'),(430,'Command: lfg'),(431,'Command: lfg player'),(432,'Command: lfg group'),(433,'Command: lfg queue'),(434,'Command: lfg clean'),(435,'Command: lfg options'),(436,'Command: list'),(437,'Command: list creature'),(438,'Command: list item'),(439,'Command: list object'),(440,'Command: list auras'),(441,'Command: list mail'),(442,'Command: lookup'),(443,'Command: lookup area'),(444,'Command: lookup creature'),(445,'Command: lookup event'),(446,'Command: lookup faction'),(447,'Command: lookup item'),(448,'Command: lookup itemset'),(449,'Command: lookup object'),(450,'Command: lookup quest'),(451,'Command: lookup player'),(452,'Command: lookup player ip'),(453,'Command: lookup player account'),(454,'Command: lookup player email'),(455,'Command: lookup skill'),(456,'Command: lookup spell'),(457,'Command: lookup spell id'),(458,'Command: lookup taxinode'),(459,'Command: lookup tele'),(460,'Command: lookup title'),(461,'Command: lookup map'),(462,'Command: announce'),(463,'Command: channel'),(464,'Command: channel set'),(465,'Command: channel set ownership'),(466,'Command: gmannounce'),(467,'Command: gmnameannounce'),(468,'Command: gmnotify'),(469,'Command: nameannounce'),(470,'Command: notify'),(471,'Command: whispers'),(472,'Command: group'),(473,'Command: group leader'),(474,'Command: group disband'),(475,'Command: group remove'),(476,'Command: group join'),(477,'Command: group list'),(478,'Command: group summon'),(479,'Command: pet'),(480,'Command: pet create'),(481,'Command: pet learn'),(482,'Command: pet unlearn'),(483,'Command: send'),(484,'Command: send items'),(485,'Command: send mail'),(486,'Command: send message'),(487,'Command: send money'),(488,'Command: additem'),(489,'Command: additemset'),(490,'Command: appear'),(491,'Command: aura'),(492,'Command: bank'),(493,'Command: bindsight'),(494,'Command: combatstop'),(495,'Command: cometome'),(496,'Command: commands'),(497,'Command: cooldown'),(498,'Command: damage'),(499,'Command: dev'),(500,'Command: die'),(501,'Command: dismount'),(502,'Command: distance'),(503,'Command: flusharenapoints'),(504,'Command: freeze'),(505,'Command: gps'),(506,'Command: guid'),(507,'Command: help'),(508,'Command: hidearea'),(509,'Command: itemmove'),(510,'Command: kick'),(511,'Command: linkgrave'),(512,'Command: listfreeze'),(513,'Command: maxskill'),(514,'Command: movegens'),(515,'Command: mute'),(516,'Command: neargrave'),(517,'Command: pinfo'),(518,'Command: playall'),(519,'Command: possess'),(520,'Command: recall'),(521,'Command: repairitems'),(522,'Command: respawn'),(523,'Command: revive'),(524,'Command: saveall'),(525,'Command: save'),(526,'Command: setskill'),(527,'Command: showarea'),(528,'Command: summon'),(529,'Command: unaura'),(530,'Command: unbindsight'),(531,'Command: unfreeze'),(532,'Command: unmute'),(533,'Command: unpossess'),(534,'Command: unstuck'),(535,'Command: wchange'),(536,'Command: mmap'),(537,'Command: mmap loadedtiles'),(538,'Command: mmap loc'),(539,'Command: mmap path'),(540,'Command: mmap stats'),(541,'Command: mmap testarea'),(542,'Command: morph'),(543,'Command: demorph'),(544,'Command: modify'),(545,'Command: modify arenapoints'),(546,'Command: modify bit'),(547,'Command: modify drunk'),(548,'Command: modify energy'),(549,'Command: modify faction'),(550,'Command: modify gender'),(551,'Command: modify honor'),(552,'Command: modify hp'),(553,'Command: modify mana'),(554,'Command: modify money'),(555,'Command: modify mount'),(556,'Command: modify phase'),(557,'Command: modify rage'),(558,'Command: modify reputation'),(559,'Command: modify runicpower'),(560,'Command: modify scale'),(561,'Command: modify speed'),(562,'Command: modify speed all'),(563,'Command: modify speed backwalk'),(564,'Command: modify speed fly'),(565,'Command: modify speed walk'),(566,'Command: modify speed swim'),(567,'Command: modify spell'),(568,'Command: modify standstate'),(569,'Command: modify talentpoints'),(570,'Command: npc'),(571,'Command: npc add'),(572,'Command: npc add formation'),(573,'Command: npc add item'),(574,'Command: npc add move'),(575,'Command: npc add temp'),(576,'Command: npc add delete'),(577,'Command: npc add delete item'),(578,'Command: npc add follow'),(579,'Command: npc add follow stop'),(580,'Command: npc set'),(581,'Command: npc set allowmove'),(582,'Command: npc set entry'),(583,'Command: npc set factionid'),(584,'Command: npc set flag'),(585,'Command: npc set level'),(586,'Command: npc set link'),(587,'Command: npc set model'),(588,'Command: npc set movetype'),(589,'Command: npc set phase'),(590,'Command: npc set spawndist'),(591,'Command: npc set spawntime'),(592,'Command: npc set data'),(593,'Command: npc info'),(594,'Command: npc near'),(595,'Command: npc move'),(596,'Command: npc playemote'),(597,'Command: npc say'),(598,'Command: npc textemote'),(599,'Command: npc whisper'),(600,'Command: npc yell'),(601,'Command: npc tame'),(602,'Command: quest'),(603,'Command: quest add'),(604,'Command: quest complete'),(605,'Command: quest remove'),(606,'Command: quest reward'),(607,'Command: reload'),(608,'Command: reload access_requirement'),(609,'Command: reload achievement_criteria_data'),(610,'Command: reload achievement_reward'),(611,'Command: reload all'),(612,'Command: reload all achievement'),(613,'Command: reload all area'),(614,'Command: reload all eventai'),(615,'Command: reload all gossips'),(616,'Command: reload all item'),(617,'Command: reload all locales'),(618,'Command: reload all loot'),(619,'Command: reload all npc'),(620,'Command: reload all quest'),(621,'Command: reload all scripts'),(622,'Command: reload all spell'),(623,'Command: reload areatrigger_involvedrelation'),(624,'Command: reload areatrigger_tavern'),(625,'Command: reload areatrigger_teleport'),(626,'Command: reload auctions'),(627,'Command: reload autobroadcast'),(628,'Command: reload command'),(629,'Command: reload conditions'),(630,'Command: reload config'),(631,'Command: reload creature_text'),(632,'Command: reload creature_ai_scripts'),(633,'Command: reload creature_ai_texts'),(634,'Command: reload creature_questender'),(635,'Command: reload creature_linked_respawn'),(636,'Command: reload creature_loot_template'),(637,'Command: reload creature_onkill_reputation'),(638,'Command: reload creature_queststarter'),(639,'Command: reload creature_summon_groups'),(640,'Command: reload creature_template'),(641,'Command: reload disables'),(642,'Command: reload disenchant_loot_template'),(643,'Command: reload event_scripts'),(644,'Command: reload fishing_loot_template'),(645,'Command: reload game_graveyard_zone'),(646,'Command: reload game_tele'),(647,'Command: reload gameobject_questender'),(648,'Command: reload gameobject_loot_template'),(649,'Command: reload gameobject_queststarter'),(650,'Command: reload gm_tickets'),(651,'Command: reload gossip_menu'),(652,'Command: reload gossip_menu_option'),(653,'Command: reload item_enchantment_template'),(654,'Command: reload item_loot_template'),(655,'Command: reload item_set_names'),(656,'Command: reload lfg_dungeon_rewards'),(657,'Command: reload locales_achievement_reward'),(658,'Command: reload locales_creature'),(659,'Command: reload locales_creature_text'),(660,'Command: reload locales_gameobject'),(661,'Command: reload locales_gossip_menu_option'),(662,'Command: reload locales_item'),(663,'Command: reload locales_item_set_name'),(664,'Command: reload locales_npc_text'),(665,'Command: reload locales_page_text'),(666,'Command: reload locales_points_of_interest'),(667,'Command: reload locales_quest'),(668,'Command: reload mail_level_reward'),(669,'Command: reload mail_loot_template'),(670,'Command: reload milling_loot_template'),(671,'Command: reload npc_spellclick_spells'),(672,'Command: reload npc_trainer'),(673,'Command: reload npc_vendor'),(674,'Command: reload page_text'),(675,'Command: reload pickpocketing_loot_template'),(676,'Command: reload points_of_interest'),(677,'Command: reload prospecting_loot_template'),(678,'Command: reload quest_poi'),(679,'Command: reload quest_template'),(680,'Command: reload rbac'),(681,'Command: reload reference_loot_template'),(682,'Command: reload reserved_name'),(683,'Command: reload reputation_reward_rate'),(684,'Command: reload reputation_spillover_template'),(685,'Command: reload skill_discovery_template'),(686,'Command: reload skill_extra_item_template'),(687,'Command: reload skill_fishing_base_level'),(688,'Command: reload skinning_loot_template'),(689,'Command: reload smart_scripts'),(690,'Command: reload spell_required'),(691,'Command: reload spell_area'),(692,'Command: reload spell_bonus_data'),(693,'Command: reload spell_group'),(694,'Command: reload spell_learn_spell'),(695,'Command: reload spell_loot_template'),(696,'Command: reload spell_linked_spell'),(697,'Command: reload spell_pet_auras'),(698,'Command: reload spell_proc_event'),(699,'Command: reload spell_proc'),(700,'Command: reload spell_scripts'),(701,'Command: reload spell_target_position'),(702,'Command: reload spell_threats'),(703,'Command: reload spell_group_stack_rules'),(704,'Command: reload trinity_string'),(705,'Command: reload warden_action'),(706,'Command: reload waypoint_scripts'),(707,'Command: reload waypoint_data'),(708,'Command: reload vehicle_accessory'),(709,'Command: reload vehicle_template_accessory'),(710,'Command: reset'),(711,'Command: reset achievements'),(712,'Command: reset honor'),(713,'Command: reset level'),(714,'Command: reset spells'),(715,'Command: reset stats'),(716,'Command: reset talents'),(717,'Command: reset all'),(718,'Command: server'),(719,'Command: server corpses'),(720,'Command: server exit'),(721,'Command: server idlerestart'),(722,'Command: server idlerestart cancel'),(723,'Command: server idleshutdown'),(724,'Command: server idleshutdown cancel'),(725,'Command: server info'),(726,'Command: server plimit'),(727,'Command: server restart'),(728,'Command: server restart cancel'),(729,'Command: server set'),(730,'Command: server set closed'),(731,'Command: server set difftime'),(732,'Command: server set loglevel'),(733,'Command: server set motd'),(734,'Command: server shutdown'),(735,'Command: server shutdown cancel'),(736,'Command: server motd'),(737,'Command: tele'),(738,'Command: tele add'),(739,'Command: tele del'),(740,'Command: tele name'),(741,'Command: tele group'),(742,'Command: ticket'),(743,'Command: ticket assign'),(744,'Command: ticket close'),(745,'Command: ticket closedlist'),(746,'Command: ticket comment'),(747,'Command: ticket complete'),(748,'Command: ticket delete'),(749,'Command: ticket escalate'),(750,'Command: ticket escalatedlist'),(751,'Command: ticket list'),(752,'Command: ticket onlinelist'),(753,'Command: ticket reset'),(754,'Command: ticket response'),(755,'Command: ticket response append'),(756,'Command: ticket response appendln'),(757,'Command: ticket togglesystem'),(758,'Command: ticket unassign'),(759,'Command: ticket viewid'),(760,'Command: ticket viewname'),(761,'Command: titles'),(762,'Command: titles add'),(763,'Command: titles current'),(764,'Command: titles remove'),(765,'Command: titles set'),(766,'Command: titles set mask'),(767,'Command: wp'),(768,'Command: wp add'),(769,'Command: wp event'),(770,'Command: wp load'),(771,'Command: wp modify'),(772,'Command: wp unload'),(773,'Command: wp reload'),(774,'Command: wp show'); /*!40000 ALTER TABLE `rbac_permissions` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/updates/auth/2013_10_16_00_auth_misc.sql b/sql/updates/auth/2013_10_16_00_auth_misc.sql new file mode 100644 index 00000000000..7b51d7a125f --- /dev/null +++ b/sql/updates/auth/2013_10_16_00_auth_misc.sql @@ -0,0 +1,10 @@ +SET @id = 400; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id`=@id; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id, 'debug transport'); + +DELETE FROM `rbac_linked_permissions` WHERE `linkedId`=@id; +INSERT INTO `rbac_linked_permissions` (`id`, `linkedId`) VALUES +(196, @id); diff --git a/sql/updates/world/2013_10_01_00_misc.sql b/sql/updates/world/2013_10_01_00_misc.sql new file mode 100644 index 00000000000..b6283dbd820 --- /dev/null +++ b/sql/updates/world/2013_10_01_00_misc.sql @@ -0,0 +1,9 @@ +UPDATE `creature_template` SET `npcflag`=4227 WHERE `entry`=38316; + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=10996 AND `id`=5; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES +(10996, 5, 1, 'Show me the armor of Scourge lords, Ormus.', 3, 128, 0, 0, 0, 0, ''); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=10996 AND `SourceEntry`=5; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 10996, 5, 0, 0, 15, 0, 32, 0, 0, 0, 0, 0, '', 'Ormus the Penitent - Show gossip option if player is a Death Knight'); diff --git a/sql/updates/world/2013_10_01_00_world_sai.sql b/sql/updates/world/2013_10_01_00_world_sai.sql new file mode 100644 index 00000000000..13f4e825e81 --- /dev/null +++ b/sql/updates/world/2013_10_01_00_world_sai.sql @@ -0,0 +1,6 @@ +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN(10977,10978,7583); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (10977,10978,7583); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(10977, 0, 0, 0, 8, 0, 100, 0, 17166, 0, 0, 0, 33, 10977 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Quixxil - On Spellhit (Release Umis Yeti) - Kill Credit'), +(10978, 0, 0, 0, 8, 0, 100, 0, 17166, 0, 0, 0, 33, 10978 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Legacki - On Spellhit (Release Umis Yeti)- Kill Credit'), +(7583, 0, 0, 0, 8, 0, 100, 0, 17166, 0, 0, 0, 33, 7583 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Sprinkle - On Spellhit (Release Umis Yeti)- Kill Credit'); diff --git a/sql/updates/world/2013_10_05_00_world_sai.sql b/sql/updates/world/2013_10_05_00_world_sai.sql new file mode 100644 index 00000000000..c76916ee053 --- /dev/null +++ b/sql/updates/world/2013_10_05_00_world_sai.sql @@ -0,0 +1,9 @@ +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=48188; + +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 48188, 0, 0, 31, 0, 3, 27349, 0, 0, 0, 0, '', 'Flask of Blight Targets Scarlet Onslaught Prisoner'); + +DELETE FROM `disables` WHERE `sourceType`=0 AND `entry`=48188; + +INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES +(0, 48188, 64, '', '', 'Ignore LOS on Flask of Blight'); diff --git a/sql/updates/world/2013_10_06_00_world_sai.sql b/sql/updates/world/2013_10_06_00_world_sai.sql new file mode 100644 index 00000000000..7891f9741e6 --- /dev/null +++ b/sql/updates/world/2013_10_06_00_world_sai.sql @@ -0,0 +1,105 @@ +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI', `ScriptName`='' WHERE `entry`=184725; +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN(21039,21898,20767,21504) ; + +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=184725; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`IN(21039,21898,20767,21504); +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=2103900; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(184725, 1, 0 ,1, 70, 0, 100, 0, 2, 0, 0,0,45,1,1,0,0,0,0,10,73864,21039,0,0,0,0,0, 'Mana Bomb - On State Changed - Set Data Mana Bomb Kill Credit Trigger'), +(184725, 1, 1 ,2, 61, 0, 100, 0, 0, 0, 0,0,33,21039,0,0,0,0,0,16,0,0,0,0,0,0,0, 'Mana Bomb - Linked with Previous Event - Quest Credit'), +(184725, 1, 2 ,0, 61, 0, 100, 0, 0, 0, 0,0,45,1,1,0,0,0,0,9,16769,0,50,0,0,0,0, 'Mana Bomb - Linked with Previous Event - Set Data'), +-- +(21039, 0, 0 ,1, 38, 0, 100, 0, 1, 1, 0,0,45,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - On Data Set - Set Data'), +(21039, 0, 1 ,2, 61, 0, 100, 0, 0, 0, 0,0,1,0,3000,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - Linked with Previous Event - Say'), +(21039, 0, 2 ,0, 61, 0, 100, 0, 0, 0, 0,0,80,2103900,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - Linked with Previous Event - Run Script'), +(21039, 0, 3 ,4, 52, 0, 100, 0, 0, 21039, 0,0,1,1,3000,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - On Text Over - Say'), +(21039, 0, 4 ,0, 61, 0, 100, 0, 0, 0, 0,0,80,2103900,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - Linked with Previous Event - Run Script'), +(21039, 0, 5 ,6, 52, 0, 100, 0, 1, 21039, 0,0,1,2,3000,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - On Text Over Event - Say'), +(21039, 0, 6 ,0, 61, 0, 100, 0, 0, 0, 0,0,80,2103900,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - Linked with Previous Event - Run Script'), +(21039, 0, 7 ,8, 52, 0, 100, 0, 2, 21039, 0,0,1,3,3000,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - On Text Over - Say'), +(21039, 0, 8 ,0, 61, 0, 100, 0, 0, 0, 0,0,80,2103900,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - Linked with Previous Event - Run Script'), +(21039, 0, 9 ,10, 52, 0, 100, 0, 3, 21039, 0,0,1,4,3000,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - On Text Over - Say'), +(21039, 0, 10 ,0, 61, 0, 100, 0, 0, 0, 0,0,80,2103900,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - Linked with Previous Event - Run Script'), +-- +(21039, 0, 12 ,0, 52, 0, 100, 0, 4, 21039, 0,0,45,1,1,0,0,0,0,9,20767,0,200,0,0,0,0, 'Mana Bomb Kill Credit Trigger - On Text Over - Set Data Mana Bomb Explosion Trigger'), +(20767, 0, 0 ,1, 38, 0, 100, 0, 1, 1, 0,0,45,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Explosion Trigger - On Data Set - Set Data'), +(20767, 0, 1 ,2, 61, 0, 100, 0, 0, 0, 0,0,11,35513,0,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Mana Bomb Explosion Trigger - Linked with Previous Event - Cast Mana Bomb Explosion'), +-- +(21898, 0, 0 ,1, 38, 0, 100, 0, 1, 1, 0,0,45,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Lightning Trigger - On Data Set - Set Data'), +(21898, 0, 1 ,0, 61, 0, 100, 0, 0, 0, 0,0,11,37843,0,0,0,0,0,9,21899,0,200,0, 0, 0, 0, 'Mana Bomb Lightning Trigger - Linked with Previous Event - Cast Mana Bomb Lightning'), +(2103900, 9, 0 ,0, 0, 0, 100, 0, 0, 0, 0,0,45,1,1,0,0,0,0,9,21898,0,200,0, 0, 0, 0, 'Mana Bomb - Script - Set Data'); + + +DELETE FROM `creature_text` WHERE `entry` IN(21039,18554,16769); +DELETE FROM `creature_text` WHERE `entry` =21504 AND `groupid`>3; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(21039,0,0,'5...',41,0,100,0,0,0,'Mana Bomb'), +(21039,1,0,'4...',41,0,100,0,0,0,'Mana Bomb'), +(21039,2,0,'3...',41,0,100,0,0,0,'Mana Bomb'), +(21039,3,0,'2...',41,0,100,0,0,0,'Mana Bomb'), +(21039,4,0,'1...',41,0,100,0,0,0,'Mana Bomb'), +(18554,0,0,'You come into my house and threaten ME? I think not!',12,0,100,0,0,0,'Sharth Voldoun'), +(18554,1,0,'All goes exceedingly well, my lord. Testing of the smaller prototype at the Cenarion Thicket was a complete success. The second bomb is being ritually fueled in the courtyard below even as we speak. And, I''ve sent a courier to Tuurem to bring the rest of the parts to us here.',12,0,100,0,0,0,'Sharth Voldoun'), +(18554,2,0,'You are satisfied?',12,0,100,0,0,0,'Sharth Voldoun'), +(18554,3,0,'I can assure you that we will not fail, my master. I am personally overseeing every aspect of the construction, and I hold the final codes, myself. Within a day''s time, I will have the bomb detonated on those nearby pests.',12,0,100,0,0,0,'Sharth Voldoun'), +(16769,0,0,'Knowing there isn''t enough time, the Firewing Warlock doesn''t even try to run.', 16,0,100,0,0,0,'Firewing Warlock'), +-- +(21504,4,0,'For the time being, yes. However, allow my presence to be a motivator. Prince Kael''thas was displeased with the failure of the crystal experiment on Fallen Sky Ridge. This is one of the reasons for why we chose the Cenarion druids as the testing grounds for the bomb.',12,0,100,0,0,0,'Pathaleon the Calculators Image'), +(21504,5,0,'I need not tell you what will happen should the mana bomb down in the courtyard fail to be used on its target soon? Since moving into the forest, they''ve become increasingly annoying to our operations: here, at Tuurem and to the south at the Bonechewer Ruins.',12,0,100,0,0,0,'Pathaleon the Calculators Image'), +(21504,6,0,'I think that we should teach a lesson to both the Horde and the Alliance. One that they will not soon forget!',12,0,100,0,0,0,'Pathaleon the Calculators Image'), +(21504,7,0,'See to it that you do, Sharth, or I will personally see to your slow torture and death.',12,0,100,0,0,0,'Pathaleon the Calculators Image'), +(21504,8,0,'I believe I may recognize them. Deal with this quickly, Sharth. Then take the mana bomb and destroy their town!',12,0,100,0,0,0,'Pathaleon the Calculators Image'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=35958; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 3, 35958, 0, 0, 31, 0, 3, 16769, 0, 0, 0, '','Mana Bomb Explosion Targets Firewing Warlock'), +(13, 3, 35958, 0, 1, 31, 0, 3, 5355, 0, 0, 0, '','Mana Bomb Explosion Targets Firewing Defender'); + +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 18554; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=18554; +DELETE FROM `smart_scripts` WHERE `entryorguid`=18554; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(21504,0,0,0,38,0,100,0,1,1,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Pathaleon the Calculators Image - On Data Set - Despawn'), +-- +(18554,0,0,0,0,0,100,0,3000,5000,40000,45000,11,15277,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sharth Voldoun - IC - Cast Seal of Reckoning'), +(18554,0,1,0,2,0,100,0,0,40,15000,20000,11,13952,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sharth Voldoun - On Below 40% HP - Cast Holy Light'), +(18554,0,2,3,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,2000,0,0,0,0,0, 'Sharth Voldoun - On Agro - Say'), +(18554,0,3,4,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,21504,0,200,0,0,0,0, 'Sharth Voldoun - Linked with Previous Event - Despawn Pathaleon the Calculators Image'), +(18554,0,4,0,61,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sharth Voldoun - Linked with Previous Event - Set Phase 0'), +-- +(18554,0,5,6,25,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sharth Voldoun - On Reset - Set Phase 2'), +(18554,0,6,0,61,0,100,0,0,0,0,0,12,21504,8,0,0,0,0,8,0,0,0,-2281.936523,3099.178711,152.817734,3.699372, 'Sharth Voldoun - Linked with Previous Event - Spawn Pathaleon the Calculators Image'), +(18554,0,7,0,10,2,100,0,1,200,60000,60000,1,1,6000,0,0,0,0,1,0,0,0,0,0,0,0, 'Sharth Voldoun - Linked with Previous Event - Spawn Pathaleon the Calculators Image'), +(18554,0,8,0,52,2,100,0,1,18554,0,0,1,2,3000,0,0,0,0,1,0,0,0,0,0,0,0, 'Sharth Voldoun - On Text Over Event - Say'), +(18554,0,9,0,52,2,100,0,2,18554,0,0,1,4,6000,0,0,0,0,9,21504,0,200,0,0,0,0, 'Sharth Voldoun - On Text Over Event - Say'), +(18554,0,10,0,52,2,100,0,4,21504,0,0,1,5,6000,0,0,0,0,9,21504,0,200,0,0,0,0, 'Sharth Voldoun - On Text Over Event - Say'), +(18554,0,11,0,52,2,100,0,5,21504,0,0,1,6,6000,0,0,0,0,9,21504,0,200,0,0,0,0, 'Sharth Voldoun - On Text Over Event - Say'), +(18554,0,12,0,52,2,100,0,6,21504,0,0,1,3,6000,0,0,0,0,1,0,0,0,0,0,0,0, 'Sharth Voldoun - On Text Over Event - Say'), +(18554,0,13,0,52,2,100,0,3,18554,0,0,1,7,6000,0,0,0,0,9,21504,0,200,0,0,0,0, 'Sharth Voldoun - On Text Over Event - Say'), +(18554,0,14,0,52,0,100,0,0,18554,0,0,1,8,6000,0,0,0,0,9,21504,0,200,0,0,0,0, 'Sharth Voldoun - On Text Over Event - Say'); + +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 16769; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=16769; +DELETE FROM `smart_scripts` WHERE `entryorguid`=16769; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(16769,0,0,0,25,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - On Reset - Prevent Combat Movement'), +(16769,0,1,2,4,0,100,0,0,0,0,0,11,9613,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Firewing Warlock - On Agro - Cast Shadow Bolt'), +(16769,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - Linked with Previous Event - Set Phase 1'), +(16769,0,3,0,9,1,100,0,0,40,2400,3800,11,9613,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Firewing Warlock - On Range - Cast Shadow Bolt'), +(16769,0,4,5,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Firewing Warlock - On Less than 15% Mana - Allow Combat Movement'), +(16769,0,5,0,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - Linked with Previous Event - Set Phase 2'), +(16769,0,6,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - On Range - Allow Combat Movement'), +(16769,0,7,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - On Range - Prevent Combat Movement'), +(16769,0,8,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - On Range - Allow Combat Movement'), +(16769,0,9,0,3,2,100,0,30,0,0,0,22,1,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Firewing Warlock - On More than 30% Mana - Set Phase 1'), +(16769,0,10,0,0,0,100,0,5000,9000,25000,35000,11,33483,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - IC - Cast Mana Tap'), +(16769,0,11,0,0,0,100,0,9000,15000,15000,20000,11,33390,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Firewing Warlock - IC - Cast Arcane Torrent'), +(16769,0,12,0,0,0,100,0,3000,5000,18000,24000,11,11962,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Firewing Warlock - IC - Cast Immolate'), +(16769,0,13,0,2,0,100,1,0,30,0,0,11,32932,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - On Less than 30% HP - Cast Sun Shield'), +(16769,0,14,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - On Less than 15% HP - Flee for Assist'), +(16769,0,15,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - On Evade - Set Phase 0'), +(16769,0,16,0,38,0,100,0,1,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - On Data Set - Say'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=16769; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 17, 16769, 0, 0, 36, 1, 0, 0, 0, 0, 0, '','Only execute SAI if firewing warlock alive'); diff --git a/sql/updates/world/2013_10_07_00_world_cond.sql b/sql/updates/world/2013_10_07_00_world_cond.sql new file mode 100644 index 00000000000..3d84c4e8496 --- /dev/null +++ b/sql/updates/world/2013_10_07_00_world_cond.sql @@ -0,0 +1,22 @@ +UPDATE `quest_template` SET `ExclusiveGroup`=13104 WHERE `Id` IN (13104,13105); +UPDATE `quest_template` SET `PrevQuestId`=0 WHERE `Id`IN (13110,13122,13118,13125); +UPDATE `quest_template` SET `RequiredClasses`=1503 WHERE `Id`=13104; +UPDATE `quest_template` SET `RequiredClasses`=32 WHERE `Id`=13105; +DELETE FROM `conditions` WHERE `SourceEntry` IN (13122,13110,13118,13125); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(20, 0, 13110, 0, 0, 8, 0, 13104, 0, 0, 0, 0, '', 'The Restless Dead after Once More Unto The Breach, Hero'), +(19, 0, 13110, 0, 0, 8, 0, 13104, 0, 0, 0, 0, '', 'The Restless Dead after Once More Unto The Breach, Hero'), +(20, 0, 13110, 0, 1, 8, 0, 13105, 0, 0, 0, 0, '', 'The Restless Dead after Once More Unto The Breach, Hero'), +(19, 0, 13110, 0, 1, 8, 0, 13105, 0, 0, 0, 0, '', 'The Restless Dead after Once More Unto The Breach, Hero'), +(20, 0, 13122, 0, 0, 8, 0, 13104, 0, 0, 0, 0, '', 'The Scourgestone after Once More Unto The Breach, Hero'), +(19, 0, 13122, 0, 0, 8, 0, 13104, 0, 0, 0, 0, '', 'The Scourgestone after Once More Unto The Breach, Hero'), +(20, 0, 13122, 0, 1, 8, 0, 13105, 0, 0, 0, 0, '', 'The Scourgestone after Once More Unto The Breach, Hero'), +(19, 0, 13122, 0, 1, 8, 0, 13105, 0, 0, 0, 0, '', 'The Scourgestone after Once More Unto The Breach, Hero'), +(20, 0, 13118, 0, 0, 8, 0, 13104, 0, 0, 0, 0, '', 'The Purging Of Scourgeholme after Once More Unto The Breach, Hero'), +(19, 0, 13118, 0, 0, 8, 0, 13104, 0, 0, 0, 0, '', 'The Purging Of Scourgeholme after Once More Unto The Breach, Hero'), +(20, 0, 13118, 0, 1, 8, 0, 13105, 0, 0, 0, 0, '', 'The Purging Of Scourgeholme after Once More Unto The Breach, Hero'), +(19, 0, 13118, 0, 1, 8, 0, 13105, 0, 0, 0, 0, '', 'The Purging Of Scourgeholme after Once More Unto The Breach, Hero'), +(20, 0, 13125, 0, 0, 8, 0, 13104, 0, 0, 0, 0, '', 'The Air Stands Still after Once More Unto The Breach, Hero'), +(19, 0, 13125, 0, 0, 8, 0, 13104, 0, 0, 0, 0, '', 'The Air Stands Still after Once More Unto The Breach, Hero'), +(20, 0, 13125, 0, 1, 8, 0, 13105, 0, 0, 0, 0, '', 'The Air Stands Still after Once More Unto The Breach, Hero'), +(19, 0, 13125, 0, 1, 8, 0, 13105, 0, 0, 0, 0, '', 'The Air Stands Still after Once More Unto The Breach, Hero'); diff --git a/sql/updates/world/2013_10_07_01_world_sai.sql b/sql/updates/world/2013_10_07_01_world_sai.sql new file mode 100644 index 00000000000..3037ad434ce --- /dev/null +++ b/sql/updates/world/2013_10_07_01_world_sai.sql @@ -0,0 +1,70 @@ +-- Shattertusk Bull +SET @ENTRY := 28380; +SET @SOURCETYPE := 0; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=28380; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=@SOURCETYPE; +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,@SOURCETYPE,0,0,0,0,100,0,2000,5000,5000,8000,11,51944,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Shattertusk Bull - In Combat - Cast Trample"), +(@ENTRY,@SOURCETYPE,1,0,0,0,100,0,7000,10000,13000,16000,11,55196,1,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,"Shattertusk Bull - In Combat - Cast Stomp"); + +-- Dreadsaber +SET @ENTRY := 28001; +SET @SOURCETYPE := 0; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=28001; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=@SOURCETYPE; +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,@SOURCETYPE,0,0,0,0,100,0,3000,6000,5000,7000,11,24187,0,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,"Dreadsaber - In Combat - Cast Claw"); + +-- Shardhorn Rhino +SET @ENTRY := 28009; +SET @SOURCETYPE := 0; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=28009; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=@SOURCETYPE; +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,@SOURCETYPE,0,0,4,0,100,0,0,0,0,0,11,55193,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Shardhorn Rhino - On Aggro - Cast Rhino Charge"), +(@ENTRY,@SOURCETYPE,1,0,0,0,100,0,5000,9000,7000,12000,11,32019,32,0,0,0,0,4,0,0,0,0.0,0.0,0.0,0.0,"Shardhorn Rhino - In Combat - Cast Gore"); + +-- Shango +SET @ENTRY := 28297; +SET @SOURCETYPE := 0; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=28297; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=@SOURCETYPE; +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,@SOURCETYPE,0,0,0,0,100,0,5000,9000,7000,12000,11,32019,32,0,0,0,0,4,0,0,0,0.0,0.0,0.0,0.0,"Shango - In Combat - Cast Gore"); + +-- Mangal Crocolisk +SET @ENTRY := 28002; +SET @SOURCETYPE := 0; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=28002; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=@SOURCETYPE; +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,@SOURCETYPE,0,0,4,0,100,0,0,0,0,0,11,50502,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Mangal Crocolisk - On Aggro - Cast Thick Hide"), +(@ENTRY,@SOURCETYPE,1,0,0,0,100,0,3000,6000,6000,9000,11,48287,0,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,"Mangal Crocolisk - In Combat - Cast Powerfull Bite"); + +-- Emperor Cobra +SET @ENTRY := 28011; +SET @SOURCETYPE := 0; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=28011; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=@SOURCETYPE; +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,@SOURCETYPE,0,1,1,0,100,0,0,0,0,0,21,0,0,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - On Spawn - Prevent Combat"), +(@ENTRY,@SOURCETYPE,1,0,61,0,100,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - Link - Set Phase to 0 on Spawn"), +(@ENTRY,@SOURCETYPE,2,3,4,0,100,0,0,0,0,0,11,32093,0,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - On Aggro - Cast Poison"), +(@ENTRY,@SOURCETYPE,3,0,61,0,100,0,0,0,0,0,23,1,0,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - On Link - Set Phase 1"), +(@ENTRY,@SOURCETYPE,4,0,9,1,100,0,0,40,3400,4800,11,32093,32,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - Cast Poison Spit (Phase 1)"), +(@ENTRY,@SOURCETYPE,5,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - Start Combat Movement at 35 Yards (Phase 1)"), +(@ENTRY,@SOURCETYPE,6,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - Prevent Combat Movement at 15 Yards (Phase 1)"), +(@ENTRY,@SOURCETYPE,7,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - Start Combat Movement Below 5 Yards (Phase 1)"), +(@ENTRY,@SOURCETYPE,8,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - Set Phase to 0 on Evade"); diff --git a/sql/updates/world/2013_10_08_00_world_conditions.sql b/sql/updates/world/2013_10_08_00_world_conditions.sql new file mode 100644 index 00000000000..c167921b58c --- /dev/null +++ b/sql/updates/world/2013_10_08_00_world_conditions.sql @@ -0,0 +1,9 @@ +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (69708,70194,69784,70224,70225,69768,69767); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 3, 69708, 0, 0, 31, 0, 3, 36954, 0, 0, 0, 0, '', 'Spell Ice Prison only hits Lich King'), +(13, 3, 70194, 0, 0, 31, 0, 3, 36954, 0, 0, 0, 0, '', 'Spell Dark Binding only hits Lich King'), +(13, 1, 69784, 0, 0, 31, 0, 3, 37014, 0, 0, 0, 0, '', 'Spell Destroy Wall only hits Ice Wall Target'), +(13, 1, 70224, 0, 0, 31, 0, 3, 37014, 0, 0, 0, 0, '', 'Spell Destroy Wall only hits Ice Wall Target'), +(13, 1, 70225, 0, 0, 31, 0, 3, 37014, 0, 0, 0, 0, '', 'Spell Destroy Wall only hits Ice Wall Target'), +(13, 1, 69768, 0, 0, 31, 0, 3, 37014, 0, 0, 0, 0, '', 'Spell Summon Ice Wall only hits Ice Wall Target'), +(13, 5, 69767, 0, 0, 31, 0, 3, 37014, 0, 0, 0, 0, '', 'Spell Summon Ice Wall only hits Ice Wall Target'); diff --git a/sql/updates/world/2013_10_09_00_world_update.sql b/sql/updates/world/2013_10_09_00_world_update.sql new file mode 100644 index 00000000000..c92c84df7fb --- /dev/null +++ b/sql/updates/world/2013_10_09_00_world_update.sql @@ -0,0 +1 @@ +UPDATE `smart_scripts` SET `action_type`=85, `action_param2`=2 WHERE `entryorguid`=32588 AND `source_type`=0 AND `id`=5; diff --git a/sql/updates/world/2013_10_10_00_world_misc.sql b/sql/updates/world/2013_10_10_00_world_misc.sql new file mode 100644 index 00000000000..9dcae219b16 --- /dev/null +++ b/sql/updates/world/2013_10_10_00_world_misc.sql @@ -0,0 +1,8 @@ +UPDATE `creature` SET `spawndist`=0 WHERE `guid`=142524; + +UPDATE `smart_scripts` SET `event_param2`=100 WHERE `entryorguid`=16769 AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `action_param1`=55661 WHERE `entryorguid`=29872 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `action_param1`=55662 WHERE `entryorguid`=29895 AND `source_type`=0 AND `id`=3; + +UPDATE `conditions` SET `SourceGroup`=10059 WHERE `SourceTypeOrReferenceId`=10 AND `SourceGroup`=10058 AND `SourceEntry`=51969; +UPDATE `conditions` SET `SourceGroup`=10058 WHERE `SourceTypeOrReferenceId`=10 AND `SourceGroup`=10059 AND `SourceEntry`=51961; diff --git a/sql/updates/world/2013_10_10_01_world_update.sql b/sql/updates/world/2013_10_10_01_world_update.sql new file mode 100644 index 00000000000..e6aaa90f07f --- /dev/null +++ b/sql/updates/world/2013_10_10_01_world_update.sql @@ -0,0 +1 @@ +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` IN (16325,16326) AND `source_type` = 0 AND `id` = 0 AND `link` = 1; diff --git a/sql/updates/world/2013_10_11_00_world_sai.sql b/sql/updates/world/2013_10_11_00_world_sai.sql new file mode 100644 index 00000000000..ff3e9ccc9f3 --- /dev/null +++ b/sql/updates/world/2013_10_11_00_world_sai.sql @@ -0,0 +1,16 @@ +UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry` IN (18305,18306,18307); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (18305,18306,18307) AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18305,0,0,0,8,0,100,0,32205,0,0,0,33,18305,0,0,0,0,0,7,0,0,0,0,0,0,0,'Burning Blade Pyre (01) - On Spell Hit (Place Maghar Battle Standard)- Give Quest Credit'), +(18306,0,0,0,8,0,100,0,32205,0,0,0,33,18306,0,0,0,0,0,7,0,0,0,0,0,0,0,'Burning Blade Pyre (02) - On Spell Hit (Place Maghar Battle Standard)- Give Quest Credit'), +(18307,0,0,0,8,0,100,0,32205,0,0,0,33,18307,0,0,0,0,0,7,0,0,0,0,0,0,0,'Burning Blade Pyre (03) - On Spell Hit (Place Maghar Battle Standard)- Give Quest Credit'); + +UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry`=23439; +DELETE FROM `smart_scripts` WHERE `entryorguid`= 23439 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(23439,0,0,1,38,0,100,0,1,1,0,0,45,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Hungry Nether Ray - On Data set - Set Data'), +(23439,0,1,0,61,0,100,0,0,0,0,0,11,41427,0,0,0,0,0,23,0,0,0,0,0,0,0,'Hungry Nether Ray - Linked with Previous Event - Cast Lucille Feed Credit Trigger'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=23219 AND `id`=6; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(23219, 0, 6, 0, 6, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 9, 23439, 0, 50, 0, 0, 0, 0, 'Blackwind Warp Chaser - On Death - Set Data Hungry Nether Ray'); diff --git a/sql/updates/world/2013_10_12_00_world_sai.sql b/sql/updates/world/2013_10_12_00_world_sai.sql new file mode 100644 index 00000000000..914fbba5f50 --- /dev/null +++ b/sql/updates/world/2013_10_12_00_world_sai.sql @@ -0,0 +1,74 @@ +-- Fix I've Got a Flying Machine +-- Steel Gate Chief Archaeologist SAI & Text & Condition +SET @ENTRY := 24399; +SET @ENTRY1 := 24418; +SET @ENTRY2 := 24439; +SET @ENTRY3 := 24438; +SET @STALKER := 105997; +SET @MENUID := 8954; +SET @OPTION := 0; + +DELETE FROM `creature_template_addon` WHERE `entry`=24418; +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(24418, 0, 0, 0, 0x1, 0x1, '43775 43889'); -- Steel Gate Flying Machine - Flight Drop Off Buff + +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,62,0,100,0,@MENUID,@OPTION,0,0,11,45973,1,0,0,0,0,7,0,0,0,0,0,0,0, 'Steel Gate Chief Archaeologist - On gossip option select - Cast spell'), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Steel Gate Chief Archaeologist - On Link - Close gossip'), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,11,43767,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Steel Gate Chief Archaeologist - On Link - Cast Invoker'), +(@ENTRY,0,3,4,19,0,100,0,11390,0,0,0,11,45973,1,0,0,0,0,7,0,0,0,0,0,0,0, 'Steel Gate Chief Archaeologist - On Quest Accept - Cast spell'), +(@ENTRY,0,4,0,61,0,100,0,0,0,0,0,11,43767,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Steel Gate Chief Archaeologist - On Link - Cast Invoker'), +(@ENTRY,0,5,6,19,0,100,0,11390,0,0,0,12,@ENTRY3,3,120000,0,0,0,8,0,0,0,1972.773,-3265.381,134.719,0, 'Steel Gate Chief Archaeologist - On Quest Accept - Summon Graple Target'); + +DELETE FROM `spell_area` WHERE `spell`=43889; +INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`, `quest_start_status`, `quest_end_status`) VALUES +(43889, 3999, 11390, 0, 0, 0, 2, 1, 8, 0); + +UPDATE `creature_template` SET `modelid1`=11686, `modelid2`=0, `AIName`= 'SmartAI', `type_flags`=1048576 WHERE `entry`=@ENTRY3; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY3; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY3,0,0,0,54,0,100,0,0,0,0,0,11,43890,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Grapple Target - Just Summoned - Cast Invisibility on self'); + +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`= @ENTRY1; +INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES +(@ENTRY1, 43768, 1, 0); + +-- Gossip conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@MENUID AND `SourceEntry`=@OPTION; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,@MENUID,@OPTION,0,9,11390,0,0,0,'','Show gossip option 0 if player has quest I''ve got a Flying Machine'); + +DELETE FROM `conditions` WHERE `SourceEntry`=@ENTRY1; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(16, 0, @ENTRY1, 0, 23, 3999, 0, 0, 0, '', 'Dismount player when not in intended zone'); +-- Condition for Grappling Hook spell(43770) +DELETE FROM `conditions` WHERE `SourceEntry`=43770; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13, 1, 43770, 0, 31, 3, 24439, 0, 0, '', 'Spell 43770(Grappling Hook) targets npc 24439(Sack of Relics)'); +-- Spell Conditions +DELETE FROM `conditions` WHERE `SourceEntry`IN (43891,43892,43789); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13, 1, 43892, 0, 31, 3, 24439, 0, 0, '', 'Spell 43892 targets npc 24439'), +(13, 1, 43891, 0, 29, @ENTRY2, 1, 0, 0, '', 'Spell 43892 targets npc 24439'), +(13, 1, 43789, 0, 31, 3, 24439, 0, 0, '', 'Spell 43892 targets npc 24439'); + +-- Sack of Relics SAI +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY2 AND `source_type`=0; +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry=@ENTRY2; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY2,0,0,0,8,0,100,0,43770,0,0,0,11,46598,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,'Sack of Relics - On Link - Mount Sack to vehicle'), +(@ENTRY2,0,1,2,8,0,100,1,43892,0,0,0,11,46598,0,0,0,0,0,10,105997,15214,0,0.0,0.0,0.0,0.0,' Sack of Relics - Remove Vehicle - In range'), +(@ENTRY2,0,2,3,61,0,100,1,0,0,0,0,11,36553,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'Sack of Relics - On Link - Cast pet stay(36553)'), +(@ENTRY2,0,3,4,61,0,100,1,0,0,0,0,33,24439,0,0,0,0,0,21,20,0,0,0.0,0.0,0.0,0.0,'Sack of Relics - On Link - Quest Credit'), +(@ENTRY2,0,4,0,61,0,100,1,0,0,0,0,41,10000,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'Sack of Relics - On Link - Despawn'); + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=43770; +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +(43770,43789,1,'Trigger grip beam'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=-@STALKER AND `source_type`=0; +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry=15214; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(-@STALKER,0,0,0,1,0,100,0,0,0,0,0,11,43892,0,0,0,0,0,11,@ENTRY2,10,0,0.0,0.0,0.0,0.0,'Invisible Stalker - OOC - Cast Spell'); diff --git a/sql/updates/world/2013_10_13_00_world_disable.sql b/sql/updates/world/2013_10_13_00_world_disable.sql new file mode 100644 index 00000000000..1c062837397 --- /dev/null +++ b/sql/updates/world/2013_10_13_00_world_disable.sql @@ -0,0 +1,3 @@ +DELETE FROM `disables` WHERE `entry` =56940; +INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES +(0,56940,64,'','','Disable LOS check for Thorim Story Kill Credit'); diff --git a/sql/updates/world/2013_10_13_01_world_spelldifficulty_dbc.sql b/sql/updates/world/2013_10_13_01_world_spelldifficulty_dbc.sql new file mode 100644 index 00000000000..4ebdf253422 --- /dev/null +++ b/sql/updates/world/2013_10_13_01_world_spelldifficulty_dbc.sql @@ -0,0 +1,3 @@ +DELETE FROM `spelldifficulty_dbc` WHERE `id` = 55959; +INSERT INTO `spelldifficulty_dbc` (`id`, `spellid0`, `spellid1`) VALUES +(55959, 55959, 59513); diff --git a/sql/updates/world/2013_10_16_00_world_misc.sql b/sql/updates/world/2013_10_16_00_world_misc.sql new file mode 100644 index 00000000000..ee2e7795f98 --- /dev/null +++ b/sql/updates/world/2013_10_16_00_world_misc.sql @@ -0,0 +1,282 @@ +ALTER TABLE `transports` DROP `period`; + +DELETE FROM `command` WHERE `name` = 'debug transport'; +INSERT INTO `command` (`name`, `permission`, `help`) VALUES +('debug transport', 400, 'Syntax: .debug transport [start/stop]\r\n\r\n Allows to stop a transport at its nearest wait point and start movement of a stopped one. Not all transports can be started or stopped.'); + +DROP TABLE IF EXISTS `creature_transport`; + +SET @GUID := 142717; + +DELETE FROM `creature` WHERE `guid` BETWEEN @GUID+0 AND @GUID+269; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@GUID+0, 24456, 582, 1, 1, 29.5627, 0.150031, 16.6147, 3.18002, 120, 0, 0), +(@GUID+1, 24993, 582, 1, 1, 13.1874, 7.71381, 6.07001, 3.09834, 120, 0, 0), +(@GUID+2, 24995, 582, 1, 1, 13.3456, -7.63689, 6.09325, 3.06064, 120, 0, 0), +(@GUID+3, 24996, 582, 1, 1, -0.258897, -7.62734, 4.80823, 5.66423, 120, 0, 0), +(@GUID+4, 24997, 582, 1, 1, -0.416482, 4.39825, 4.79739, 5.10346, 120, 0, 0), +(@GUID+5, 25007, 582, 1, 1, 21.2462, 1.87803, 11.7334, 3.19572, 120, 0, 0), +(@GUID+6, 25050, 586, 1, 1, 29.8662, -0.374622, 16.6206, 3.09382, 120, 0, 0), +(@GUID+7, 25051, 586, 1, 1, 13.4899, -7.71638, 6.11067, 3.11424, 120, 0, 0), +(@GUID+8, 25052, 586, 1, 1, 13.5093, 7.8287, 6.11039, 3.12838, 120, 0, 0), +(@GUID+9, 25054, 586, 1, 1, -21.8863, -2.61623, 4.33103, 6.14509, 120, 0, 0), +(@GUID+10, 25055, 586, 1, 1, -21.4646, 2.87105, 4.31055, 6.26055, 120, 0, 0), +(@GUID+11, 25056, 586, 1, 1, 20.3045, 1.2971, 11.7088, 3.06319, 120, 0, 0), +(@GUID+12, 3681, 587, 1, 1, -38.6477, -0.071194, 6.08577, 0.0698132, 120, 0, 0), +(@GUID+13, 3681, 587, 1, 1, 29.5623, 0.119925, 24.4539, 0.0872665, 120, 0, 0), +(@GUID+14, 25019, 587, 1, 1, 12.805, -7.60196, 6.10507, 2.9147, 120, 0, 0), +(@GUID+15, 25020, 587, 1, 1, 12.9539, 7.33394, 6.13112, 3.28122, 120, 0, 0), +(@GUID+16, 25021, 587, 1, 1, -21.4174, -2.8336, 4.39169, 6.24828, 120, 0, 0), +(@GUID+17, 25022, 587, 1, 1, 20.8633, -1.28591, 11.809, 2.94961, 120, 0, 0), +(@GUID+18, 25023, 587, 1, 1, -36.7691, 0.169367, 5.97592, 3.1765, 120, 0, 0), +(@GUID+19, 25024, 587, 1, 1, -21.6595, 3.22012, 4.40273, 0.139626, 120, 0, 0), +(@GUID+20, 25025, 587, 1, 1, 31.131, -0.454317, 16.7328, 2.96706, 120, 0, 0), +(@GUID+21, 25009, 588, 1, 1, 25.2165, 6.9111, 16.1459, 3.94958, 120, 0, 0), +(@GUID+22, 25010, 588, 1, 1, 13.2057, -2.817, 6.09989, 3.88733, 120, 0, 0), +(@GUID+23, 25011, 588, 1, 1, 19.2178, -8.20848, 12.1102, 4.81518, 120, 0, 0), +(@GUID+24, 25012, 588, 1, 1, 18.1475, -7.41572, 6.09809, 1.88535, 120, 0, 0), +(@GUID+25, 25013, 588, 1, 1, 0.194107, 9.84585, 6.09941, 3.08731, 120, 0, 0), +(@GUID+26, 25014, 588, 1, 1, -0.532552, -8.68575, 6.09815, 3.19019, 120, 0, 0), +(@GUID+27, 25015, 588, 1, 1, 34.0669, 0.119702, 18.287, 3.17832, 120, 0, 0), +(@GUID+28, 25016, 588, 1, 1, -11.1276, 6.60326, 6.09852, 3.05167, 120, 0, 0), +(@GUID+29, 25017, 588, 1, 1, 6.22581, 9.13103, 11.4836, 1.53614, 120, 0, 0), +(@GUID+30, 25018, 588, 1, 1, 10.2474, 2.78122, 11.803, 3.46823, 120, 0, 0), +(@GUID+31, 24924, 589, 1, 1, -1.2076, -9.94886, -23.6749, 0.15708, 120, 0, 0), +(@GUID+32, 24926, 589, 1, 1, -10.3057, -12.1052, -16.9691, 5.92724, 120, 0, 0), +(@GUID+33, 24927, 589, 1, 1, -1.87417, -7.84711, -23.6872, 3.38594, 120, 0, 0), +(@GUID+34, 24929, 589, 1, 1, 9.08301, -4.96411, -23.5921, 1.59406, 120, 0, 0), +(@GUID+35, 24930, 589, 1, 1, -17.0083, -7.87488, -15.1878, 3.14159, 120, 0, 0), +(@GUID+36, 24931, 589, 1, 1, 7.88492, -11.1513, -17.7623, 4.90483, 120, 0, 0), +(@GUID+37, 24934, 589, 1, 1, 9.20919, -3.50392, -23.5121, 3.12414, 120, 0, 0), +(@GUID+38, 24935, 589, 1, 1, 9.55492, -12.0229, -23.5059, 3.12414, 120, 0, 0), +(@GUID+39, 25075, 589, 1, 1, -2.70556, -7.84588, -23.6967, 0.0349066, 120, 0, 0), +(@GUID+40, 25080, 589, 1, 1, -4.91002, -4.74236, -17.6153, 1.6057, 120, 0, 0), +(@GUID+41, 25081, 589, 1, 1, -4.93939, -10.8049, -17.6109, 4.71239, 120, 0, 0), +(@GUID+42, 24934, 590, 1, 1, 9.63549, -3.67192, -23.588, 6.25904, 120, 0, 0), +(@GUID+43, 24935, 590, 1, 1, 9.79838, -11.8681, -23.5848, 6.25118, 120, 0, 0), +(@GUID+44, 25075, 590, 1, 1, -3.59133, -7.84061, -23.7802, 6.1969, 120, 0, 0), +(@GUID+45, 25100, 590, 1, 1, -0.411733, -5.7239, -23.7457, 3.70414, 120, 0, 0), +(@GUID+46, 25101, 590, 1, 1, 7.56919, -4.02088, -17.7543, 4.77071, 120, 0, 0), +(@GUID+47, 25102, 590, 1, 1, -11.0882, -3.47446, -16.7988, 2.00924, 120, 0, 0), +(@GUID+48, 25103, 590, 1, 1, 7.59398, -11.5166, -17.7745, 1.62204, 120, 0, 0), +(@GUID+49, 25104, 590, 1, 1, -0.898213, -7.76559, -23.7548, 3.11116, 120, 0, 0), +(@GUID+50, 25105, 590, 1, 1, -9.54405, -7.94072, -17.2053, 3.17242, 120, 0, 0), +(@GUID+51, 25106, 590, 1, 1, -4.93938, -10.9634, -17.6988, 4.76285, 120, 0, 0), +(@GUID+52, 25107, 590, 1, 1, -4.98215, -4.67863, -17.696, 1.59455, 120, 0, 0), +(@GUID+53, 15214, 591, 1, 1, 7.0053, -7.64791, -16.1126, 2.89725, 120, 0, 0), +(@GUID+54, 24934, 591, 1, 1, -4.5165, -13.1125, -22.5947, 1.53589, 120, 0, 0), +(@GUID+55, 24935, 591, 1, 1, -6.37827, -13.1838, -22.5939, 4.71239, 120, 0, 0), +(@GUID+56, 25070, 591, 1, 1, -9.40787, -8.02398, -17.1578, 3.1765, 120, 0, 0), +(@GUID+57, 25071, 591, 1, 1, 7.24887, -5.48033, -17.6859, 4.81711, 120, 0, 0), +(@GUID+58, 25072, 591, 1, 1, 8.00807, -10.7134, -17.6737, 1.16937, 120, 0, 0), +(@GUID+59, 25074, 591, 1, 1, 5.02375, -7.69781, -17.7888, 5.98648, 120, 0, 0), +(@GUID+60, 25075, 591, 1, 1, -4.16189, -7.68752, -23.6975, 0, 120, 0, 0), +(@GUID+61, 25075, 591, 1, 1, 4.36215, -2.25417, -23.59, 4.71239, 120, 0, 0), +(@GUID+62, 25075, 591, 1, 1, -3.31418, -6.12881, -23.6984, 4.67748, 120, 0, 0), +(@GUID+63, 25075, 591, 1, 1, 4.48208, -13.4008, -23.59, 1.62316, 120, 0, 0), +(@GUID+64, 25075, 591, 1, 1, -3.30777, -9.47416, -23.6959, 1.55334, 120, 0, 0), +(@GUID+65, 25075, 591, 1, 1, 10.7034, -3.50542, -23.49, 3.24631, 120, 0, 0), +(@GUID+66, 25075, 591, 1, 1, -8.87581, -11.4028, -22.5883, 6.24828, 120, 0, 0), +(@GUID+67, 25075, 591, 1, 1, 10.8261, -12.1854, -23.4895, 3.1765, 120, 0, 0), +(@GUID+68, 25075, 591, 1, 1, 11.7436, -10.4452, -24.2189, 6.16101, 120, 0, 0), +(@GUID+69, 25076, 591, 1, 1, -2.72723, -7.77286, -23.6968, 1.55334, 120, 0, 0), +(@GUID+70, 25077, 591, 1, 1, -19.6886, -8.17058, -14.3765, 3.1765, 120, 0, 0), +(@GUID+71, 25079, 591, 1, 1, -5.1094, -11.1466, -17.606, 4.4855, 120, 0, 0), +(@GUID+72, 25083, 591, 1, 1, -5.2125, -4.92702, -17.5966, 1.43117, 120, 0, 0), +(@GUID+73, 25171, 591, 1, 1, -8.70329, -11.4079, -22.5887, 0.0349066, 120, 0, 0), +(@GUID+74, 25078, 593, 1, 1, 34.095, 3.54049, 17.8892, 5.50987, 120, 0, 0), +(@GUID+75, 25082, 593, 1, 1, 15.6121, 1.09944, 6.09764, 2.52482, 120, 0, 0), +(@GUID+76, 25089, 593, 1, 1, 17.8437, -7.84575, 6.09877, 1.64493, 120, 0, 0), +(@GUID+77, 25093, 593, 1, 1, 15.8067, -5.80051, 11.9732, 1.86484, 120, 0, 0), +(@GUID+78, 25094, 593, 1, 1, 34.0585, -0.04162, 18.2865, 3.17017, 120, 0, 0), +(@GUID+79, 25095, 593, 1, 1, 9.39981, 9.17899, 11.5941, 1.52083, 120, 0, 0), +(@GUID+80, 25097, 593, 1, 1, -11.4014, 6.67999, 6.09785, 2.93715, 120, 0, 0), +(@GUID+81, 25111, 593, 1, 1, 6.20811, 0.005208, 14.0554, 2.54813, 120, 0, 0), +(@GUID+82, 24910, 594, 1, 1, 34.6962, -0.27625, 20.9157, 3.44936, 120, 0, 0), +(@GUID+83, 24911, 594, 1, 1, -3.08712, 11.1947, 8.6042, 1.59543, 120, 0, 0), +(@GUID+84, 24911, 594, 1, 1, -3.00336, -1.39497, 8.72655, 0.455023, 120, 0, 0), +(@GUID+85, 24911, 594, 1, 1, 29.079, 6.02911, 19.504, 1.29931, 120, 0, 0), +(@GUID+86, 24911, 594, 1, 1, -11.92, 6.82298, 8.72743, 2.64628, 120, 0, 0), +(@GUID+87, 24911, 594, 1, 1, 19.1465, -9.70741, 14.7601, 4.79434, 120, 0, 0), +(@GUID+88, 24911, 594, 1, 1, 5.55254, 10.6903, 14.0795, 1.41713, 120, 0, 0), +(@GUID+89, 24911, 594, 1, 1, 5.53691, -10.9158, 14.0808, 4.59956, 120, 0, 0), +(@GUID+90, 24911, 594, 1, 1, 19.1591, 9.74589, 14.7625, 1.55457, 120, 0, 0), +(@GUID+91, 24911, 594, 1, 1, -10.8992, 6.36276, 20.589, 1.29146, 120, 0, 0), +(@GUID+92, 24911, 594, 1, 1, -1.47544, 9.97225, 8.72811, 1.47291, 120, 0, 0), +(@GUID+93, 24911, 594, 1, 1, -15.0531, 6.78103, 21.0344, 1.54279, 120, 0, 0), +(@GUID+94, 24911, 594, 1, 1, 0.568386, 10.818, 8.68709, 1.24593, 120, 0, 0), +(@GUID+95, 24911, 594, 1, 1, -16.544, 7.01147, 21.3668, 1.52708, 120, 0, 0), +(@GUID+96, 24992, 594, 1, 1, -13.669, 5.23144, 19.2894, 1.4721, 120, 0, 0), +(@GUID+97, 25026, 594, 1, 1, 5.50506, 5.17797, 1.39596, 1.53711, 120, 0, 0), +(@GUID+98, 25026, 594, 1, 1, -3.34169, -4.92735, 1.39595, 4.70933, 120, 0, 0), +(@GUID+99, 25026, 594, 1, 1, -2.64281, 5.46732, 1.39595, 0.520802, 120, 0, 0), +(@GUID+100, 25026, 594, 1, 1, 6.52141, 0.490373, 1.39693, 6.00288, 120, 0, 0), +(@GUID+101, 25026, 594, 1, 1, 23.0708, -2.7187, 1.39595, 5.37378, 120, 0, 0), +(@GUID+102, 25026, 594, 1, 1, 15.3122, 6.40496, 1.39596, 4.24673, 120, 0, 0), +(@GUID+103, 25026, 594, 1, 1, 24.9381, 4.10155, 1.44058, 1.07922, 120, 0, 0), +(@GUID+104, 25026, 594, 1, 1, 14.4097, -6.40611, 1.39596, 1.86383, 120, 0, 0), +(@GUID+105, 25026, 594, 1, 1, 5.51407, -5.26758, 1.39596, 4.38889, 120, 0, 0), +(@GUID+106, 25075, 610, 1, 1, 4.36215, -2.25417, -23.59, 4.71239, 120, 0, 0), +(@GUID+107, 31704, 610, 1, 1, 5.21605, -2.36685, -17.8223, 1.04622, 120, 0, 0), +(@GUID+108, 31705, 610, 1, 1, 5.07824, -13.1188, -17.8135, 5.24182, 120, 0, 0), +(@GUID+109, 31706, 610, 1, 1, -16.8964, -10.8497, -15.9745, 4.64346, 120, 0, 0), +(@GUID+110, 31708, 610, 1, 1, -2.74581, -1.47146, -17.7765, 4.67712, 120, 0, 0), +(@GUID+111, 31715, 610, 1, 1, -3.54276, -13.8752, -17.684, 1.53946, 120, 0, 0), +(@GUID+112, 31716, 610, 1, 1, 11.5731, -7.65137, -16.6839, 3.20372, 120, 0, 0), +(@GUID+113, 31759, 612, 1, 1, -9.17065, -9.22241, 9.44523, 4.33964, 120, 0, 0), +(@GUID+114, 31760, 612, 1, 1, -24.342, -1.4956, 11.7907, 4.53119, 120, 0, 0), +(@GUID+115, 31761, 612, 1, 1, 17.25, 3.98267, 9.8274, 1.12707, 120, 0, 0), +(@GUID+116, 31762, 612, 1, 1, 34.0835, -0.002845, 19.7971, 3.12414, 120, 0, 0), +(@GUID+117, 31763, 612, 1, 1, 30.1151, -5.08848, 19.3282, 3.08923, 120, 0, 0), +(@GUID+118, 31764, 612, 1, 1, 26.0707, 2.05775, 19.328, 3.00197, 120, 0, 0), +(@GUID+119, 25075, 613, 1, 1, 9.44542, -7.84947, -16.6006, 0.0523599, 120, 0, 0), +(@GUID+120, 31720, 613, 1, 1, -16.5685, -5.08333, -15.9421, 1.98968, 120, 0, 0), +(@GUID+121, 31723, 613, 1, 1, -10.7552, -12.8129, -16.7745, 4.53786, 120, 0, 0), +(@GUID+122, 31724, 613, 1, 1, 5.77627, -2.00469, -17.7218, 1.64061, 120, 0, 0), +(@GUID+123, 31725, 613, 1, 1, 10.6984, -7.82192, -16.6006, 3.28122, 120, 0, 0), +(@GUID+124, 31726, 613, 1, 1, -3.45307, -13.7896, -17.6111, 1.16964, 120, 0, 0), +(@GUID+125, 31727, 613, 1, 1, -3.38308, -1.91393, -17.6198, 5.47991, 120, 0, 0), +(@GUID+126, 31788, 614, 1, 1, 27.5951, -2.34424, 19.3281, 3.22886, 120, 0, 0), +(@GUID+127, 31789, 614, 1, 1, 28.0998, 5.9939, 19.328, 3.64774, 120, 0, 0), +(@GUID+128, 31790, 614, 1, 1, 34.2236, 0.067648, 19.7627, 3.07178, 120, 0, 0), +(@GUID+129, 31791, 614, 1, 1, 0.919363, 8.75723, 9.43661, 1.25664, 120, 0, 0), +(@GUID+130, 31792, 614, 1, 1, -4.76611, 0.0998535, 9.36669, 4.83456, 120, 0, 0), +(@GUID+131, 31793, 614, 1, 1, 17.146, -3.92139, 9.81305, 5.49708, 120, 0, 0), +(@GUID+132, 29795, 622, 1, 1, 45.6197, 7.29317, 30.0955, 4.67642, 120, 0, 0), +(@GUID+133, 30752, 622, 1, 1, 15.4321, 28.6642, 9.92277, 1.54012, 120, 0, 0), +(@GUID+134, 30752, 622, 1, 1, 2.01988, 28.7211, 9.33565, 1.58332, 120, 0, 0), +(@GUID+135, 30752, 622, 1, 1, -11.241, 28.5576, 9.91826, 1.5519, 120, 0, 0), +(@GUID+136, 30752, 622, 1, 1, 8.25547, -21.6199, 34.8875, 1.73515, 120, 0, 0), +(@GUID+137, 30752, 622, 1, 1, 7.30473, 24.2619, 34.9491, 4.43536, 120, 0, 0), +(@GUID+138, 30753, 622, 1, 1, -26.8391, -10.402, 35.5991, 1.29366, 120, 0, 0), +(@GUID+139, 30753, 622, 1, 1, 2.15579, 17.0338, 9.16353, 1.54405, 120, 0, 0), +(@GUID+140, 30753, 622, 1, 1, -7.63407, 0.007234, 86.0904, 6.2728, 120, 0, 0), +(@GUID+141, 30753, 622, 1, 1, 46.382, 7.89944, 10.4129, 3.96271, 120, 0, 0), +(@GUID+142, 30753, 622, 1, 1, 45.981, -6.55312, 10.3636, 2.23091, 120, 0, 0), +(@GUID+143, 30753, 622, 1, 1, 15.254, -0.009458, 86.0904, 3.14299, 120, 0, 0), +(@GUID+144, 30753, 622, 1, 1, -34.939, -11.6484, 11.4697, 5.50858, 120, 0, 0), +(@GUID+145, 30753, 622, 1, 1, -34.785, 11.9312, 11.4869, 0.836243, 120, 0, 0), +(@GUID+146, 30753, 622, 1, 1, -26.9812, 10.5208, 35.5936, 4.74156, 120, 0, 0), +(@GUID+147, 30753, 622, 1, 1, 1.98831, -18.0873, 9.16057, 4.66993, 120, 0, 0), +(@GUID+148, 30754, 622, 1, 1, -19.0109, 27.0177, 89.9667, 6.22411, 120, 0, 0), +(@GUID+149, 30754, 622, 1, 1, -54.639, -15.3254, 34.3972, 3.83128, 120, 0, 0), +(@GUID+150, 30754, 622, 1, 1, -54.7182, 15.5861, 34.3897, 2.50086, 120, 0, 0), +(@GUID+151, 30754, 622, 1, 1, -18.9215, -26.8371, 89.9664, 0.087792, 120, 0, 0), +(@GUID+152, 30755, 622, 1, 1, -3.46042, 28.0231, 34.2784, 4.66548, 120, 0, 0), +(@GUID+153, 30755, 622, 1, 1, 7.21494, -6.31021, 34.4191, 3.11118, 120, 0, 0), +(@GUID+154, 30755, 622, 1, 1, 24.5852, 6.86575, 7.06382, 3.11055, 120, 0, 0), +(@GUID+155, 30755, 622, 1, 1, 8.85995, 18.8224, 8.7027, 4.69035, 120, 0, 0), +(@GUID+156, 30755, 622, 1, 1, 24.3302, -6.97827, 7.08356, 3.34184, 120, 0, 0), +(@GUID+157, 30755, 622, 1, 1, -4.43012, 18.742, 8.62646, 4.66286, 120, 0, 0), +(@GUID+158, 30755, 622, 1, 1, -5.59682, -28.2501, 34.1226, 1.55058, 120, 0, 0), +(@GUID+159, 30755, 622, 1, 1, -4.46811, -18.5567, 8.62604, 1.53698, 120, 0, 0), +(@GUID+160, 30755, 622, 1, 1, 29.8693, -29.5825, 89.7663, 3.05267, 120, 0, 0), +(@GUID+161, 30755, 622, 1, 1, 8.83021, -4.6978, 84.7137, 2.34582, 120, 0, 0), +(@GUID+162, 30755, 622, 1, 1, 37.6428, -9.00797, 30.0954, 0.004917, 120, 0, 0), +(@GUID+163, 30755, 622, 1, 1, -26.188, -6.1712, 9.33333, 3.14217, 120, 0, 0), +(@GUID+164, 30755, 622, 1, 1, 9.06884, -18.7113, 8.70787, 1.56054, 120, 0, 0), +(@GUID+165, 30755, 622, 1, 1, 8.67689, 4.88796, 84.7137, 3.90012, 120, 0, 0), +(@GUID+166, 30755, 622, 1, 1, 7.49121, 6.05275, 34.4239, 3.16615, 120, 0, 0), +(@GUID+167, 30755, 622, 1, 1, 37.6401, 8.9586, 30.0954, 0.012771, 120, 0, 0), +(@GUID+168, 30755, 622, 1, 1, -26.1511, 6.90449, 9.405, 3.12647, 120, 0, 0), +(@GUID+169, 30755, 622, 1, 1, 29.4588, 29.8761, 89.7684, 3.15321, 120, 0, 0), +(@GUID+170, 30824, 622, 1, 1, 55.5028, 0.080449, 30.5268, 3.15669, 120, 0, 0), +(@GUID+171, 30825, 622, 1, 1, 38.4745, 0.038424, 10.1868, 3.15788, 120, 0, 0), +(@GUID+172, 30826, 622, 1, 1, 55.0542, -3.74557, 30.0955, 2.77577, 120, 0, 0), +(@GUID+173, 30827, 622, 1, 1, 45.884, -8.99976, 30.0955, 1.52942, 120, 0, 0), +(@GUID+174, 30866, 622, 1, 1, -36.528, 23.9373, 33.9184, 1.89617, 120, 0, 0), +(@GUID+175, 30866, 622, 1, 1, 15.9225, 26.2539, 35.4586, 1.60085, 120, 0, 0), +(@GUID+176, 30866, 622, 1, 1, -36.1494, -23.2606, 33.9568, 4.2232, 120, 0, 0), +(@GUID+177, 30866, 622, 1, 1, 17.7216, -26.2695, 35.5686, 5.06367, 120, 0, 0), +(@GUID+178, 31243, 622, 1, 1, -11.2408, 33.2155, 10.5949, 1.58668, 120, 0, 0), +(@GUID+179, 31243, 622, 1, 1, 1.99373, 33.0756, 10.0105, 1.53853, 120, 0, 0), +(@GUID+180, 31243, 622, 1, 1, 15.239, 32.5832, 10.5826, 1.52441, 120, 0, 0), +(@GUID+181, 31243, 622, 1, 1, 15.2483, -33.3678, 10.5837, 4.72649, 120, 0, 0), +(@GUID+182, 31243, 622, 1, 1, 1.91814, -32.9286, 10.0097, 4.6891, 120, 0, 0), +(@GUID+183, 31243, 622, 1, 1, -11.0915, -32.8872, 10.5819, 4.68507, 120, 0, 0), +(@GUID+184, 31261, 622, 1, 1, -24.084, -22.2178, 24.3778, 1.43738, 120, 0, 0), +(@GUID+185, 32301, 622, 1, 1, -3.37706, 0.007499, 34.0151, 4.65055, 120, 0, 0), +(@GUID+186, 29799, 623, 1, 1, 34.5332, -38.5618, 25.0323, 3.15234, 120, 0, 0), +(@GUID+187, 30344, 623, 1, 1, 43.6738, 0.121325, 25.1341, 3.10227, 120, 0, 0), +(@GUID+188, 30345, 623, 1, 1, -48.0654, -0.185737, -4.98898, 3.11436, 120, 0, 0), +(@GUID+189, 30346, 623, 1, 1, 25.0778, -0.047958, 9.59893, 3.13291, 120, 0, 0), +(@GUID+190, 30347, 623, 1, 1, 28.6378, -7.55243, 23.2873, 0.157027, 120, 0, 0), +(@GUID+191, 30350, 623, 1, 1, 16.4056, -2.2827, 20.4235, 3.11453, 120, 0, 0), +(@GUID+192, 30351, 623, 1, 1, 2.42088, -23.0053, 22.5625, 0.046087, 120, 0, 0), +(@GUID+193, 30351, 623, 1, 1, 1.29162, -9.37181, 20.458, 3.17295, 120, 0, 0), +(@GUID+194, 30351, 623, 1, 1, 0.773476, 22.5004, 22.5503, 3.2248, 120, 0, 0), +(@GUID+195, 30351, 623, 1, 1, 39.976, 44.3876, 25.0331, 3.16019, 120, 0, 0), +(@GUID+196, 30351, 623, 1, 1, -36.4471, 6.81573, 20.4485, 4.73177, 120, 0, 0), +(@GUID+197, 30351, 623, 1, 1, -36.1811, -6.90251, 20.4501, 1.6483, 120, 0, 0), +(@GUID+198, 30351, 623, 1, 1, 1.44228, 9.63379, 20.4566, 3.15096, 120, 0, 0), +(@GUID+199, 30352, 623, 1, 1, 48.8649, -8.72834, 40.0818, 3.12642, 120, 0, 0), +(@GUID+200, 30352, 623, 1, 1, -17.337, 3.98796, 20.7652, 3.1541, 120, 0, 0), +(@GUID+201, 30352, 623, 1, 1, 16.5684, 2.46962, 20.4252, 3.1329, 120, 0, 0), +(@GUID+202, 30352, 623, 1, 1, 43.7981, 13.0009, -2.07474, 4.61776, 120, 0, 0), +(@GUID+203, 30352, 623, 1, 1, -67.4841, 3.50927, 9.60209, 5.83577, 120, 0, 0), +(@GUID+204, 30352, 623, 1, 1, -17.2379, -3.94242, 20.7667, 3.1541, 120, 0, 0), +(@GUID+205, 30352, 623, 1, 1, -67.1723, -3.73439, 9.60211, 0.318344, 120, 0, 0), +(@GUID+206, 30352, 623, 1, 1, 36.4909, 6.11523, 9.60666, 3.01117, 120, 0, 0), +(@GUID+207, 30352, 623, 1, 1, -49.1048, 0.044213, 20.6694, 0.029782, 120, 0, 0), +(@GUID+208, 30352, 623, 1, 1, 36.436, -6.06257, 9.60687, 3.09364, 120, 0, 0), +(@GUID+209, 30352, 623, 1, 1, 48.8813, 8.78624, 40.0817, 3.1426, 120, 0, 0), +(@GUID+210, 30352, 623, 1, 1, -60.5592, 0.055898, -5.27774, 0.004184, 120, 0, 0), +(@GUID+211, 30380, 623, 1, 1, -6.13984, 21.6533, 9.991, 1.48436, 120, 0, 0), +(@GUID+212, 30380, 623, 1, 1, 3.99105, -21.2539, 9.67311, 4.9577, 120, 0, 0), +(@GUID+213, 30380, 623, 1, 1, -41.0289, 25.7685, 1.20385, 1.49696, 120, 0, 0), +(@GUID+214, 30380, 623, 1, 1, -17.4619, 22.2092, 9.60018, 1.58254, 120, 0, 0), +(@GUID+215, 30380, 623, 1, 1, -8.79147, 30.0334, -0.157799, 0.471494, 120, 0, 0), +(@GUID+216, 30380, 623, 1, 1, -26.5726, 29.6008, -0.15773, 0.856857, 120, 0, 0), +(@GUID+217, 30380, 623, 1, 1, 45.5093, 6.67955, 30.1788, 5.44543, 120, 0, 0), +(@GUID+218, 30380, 623, 1, 1, 1.92073, 28.7498, 0.101361, 0.232732, 120, 0, 0), +(@GUID+219, 30380, 623, 1, 1, -37.3836, 19.9617, 9.59771, 1.87549, 120, 0, 0), +(@GUID+220, 30380, 623, 1, 1, -37.1975, -20.2765, 9.65711, 4.32467, 120, 0, 0), +(@GUID+221, 30380, 623, 1, 1, -7.54172, -30.0747, 0.101348, 4.17752, 120, 0, 0), +(@GUID+222, 30380, 623, 1, 1, -30.1731, -21.9358, 9.59686, 4.72914, 120, 0, 0), +(@GUID+223, 30380, 623, 1, 1, 3.45962, -28.1289, 0.101388, 4.29376, 120, 0, 0), +(@GUID+224, 30380, 623, 1, 1, -18.0212, -22.0926, 9.60068, 4.66788, 120, 0, 0), +(@GUID+225, 30380, 623, 1, 1, -24.7068, -29.9771, 0.101334, 3.66623, 120, 0, 0), +(@GUID+226, 30380, 623, 1, 1, 3.92454, 20.827, 9.67354, 1.30372, 120, 0, 0), +(@GUID+227, 30380, 623, 1, 1, -6.33308, -21.7722, 9.99575, 4.85167, 120, 0, 0), +(@GUID+228, 30380, 623, 1, 1, -39.6946, -26.8419, 0.82802, 2.93659, 120, 0, 0), +(@GUID+229, 30392, 623, 1, 1, 28.7566, 7.6217, 23.2872, 6.08285, 120, 0, 0), +(@GUID+230, 30394, 623, 1, 1, -14.1505, 23.0373, -5.24869, 0.027745, 120, 0, 0), +(@GUID+231, 30394, 623, 1, 1, -11.7295, -24.7904, 9.58663, 1.63703, 120, 0, 0), +(@GUID+232, 30394, 623, 1, 1, -11.9688, 25.5424, 9.58513, 4.66945, 120, 0, 0), +(@GUID+233, 30394, 623, 1, 1, -57.9337, 6.01148, 23.5029, 1.54855, 120, 0, 0), +(@GUID+234, 30394, 623, 1, 1, -14.3898, -23.2398, -5.25039, 6.16013, 120, 0, 0), +(@GUID+235, 30394, 623, 1, 1, -48.1449, -3.10366, -5.21617, 3.11436, 120, 0, 0), +(@GUID+236, 30833, 623, 1, 1, 6.18656, -0.008156, 20.5756, 6.28313, 120, 0, 0), +(@GUID+237, 30867, 623, 1, 1, -11.0475, -22.7053, 22.5096, 4.51265, 120, 0, 0), +(@GUID+238, 30867, 623, 1, 1, -32.9158, -22.1469, 22.5861, 4.59982, 120, 0, 0), +(@GUID+239, 30867, 623, 1, 1, -10.0824, 23.2226, 22.5129, 1.54405, 120, 0, 0), +(@GUID+240, 30867, 623, 1, 1, 36.8757, 45.226, 25.0331, 2.16509, 120, 0, 0), +(@GUID+241, 30867, 623, 1, 1, -33.4747, 22.2096, 22.5895, 1.56211, 120, 0, 0), +(@GUID+242, 30867, 623, 1, 1, 36.9277, -44.9241, 25.0318, 4.11052, 120, 0, 0), +(@GUID+243, 31259, 623, 1, 1, 16.8761, -17.8635, 20.4597, 2.02864, 120, 0, 0), +(@GUID+244, 32193, 623, 1, 1, -21.6978, 0.127903, -18.1897, 3.12341, 120, 0, 0), +(@GUID+245, 32302, 623, 1, 1, 54.6648, -6.9431, 40.0874, 3.0302, 120, 0, 0), +(@GUID+246, 32566, 623, 1, 1, 34.6465, -41.7087, 25.0325, 3.20731, 120, 0, 0), +(@GUID+247, 32777, 623, 1, 1, 42.9517, 4.20903, 25.1088, 3.47298, 120, 0, 0), +(@GUID+248, 34929, 641, 1, 1, -31.0354, 25.1286, 21.6921, 1.60659, 120, 0, 0), +(@GUID+249, 34929, 641, 1, 1, -21.4492, 25.8326, 21.6309, 1.60659, 120, 0, 0), +(@GUID+250, 34929, 641, 1, 1, -12.4734, 26.321, 21.6237, 1.60659, 120, 0, 0), +(@GUID+251, 34929, 641, 1, 1, -2.81125, 26.2077, 21.6566, 1.60659, 120, 0, 0), +(@GUID+252, 34929, 641, 1, 1, -41.7122, 23.1838, 22.5605, 1.60659, 120, 0, 0), +(@GUID+253, 34935, 642, 1, 1, -21.401, -31.343, 34.173, 4.62057, 120, 0, 0), +(@GUID+254, 34935, 642, 1, 1, -12.1064, -31.9697, 34.3807, 4.62057, 120, 0, 0), +(@GUID+255, 34935, 642, 1, 1, -2.4877, -31.9885, 34.8384, 4.62057, 120, 0, 0), +(@GUID+256, 34935, 642, 1, 1, 10.2664, -32.0713, 35.7357, 4.62057, 120, 0, 0), +(@GUID+257, 34935, 642, 1, 1, 19.4636, -30.794, 36.2254, 4.83106, 120, 0, 0), +(@GUID+258, 3084, 647, 1, 1, -5.20674, -11.3432, -17.6101, 4.71239, 120, 0, 0), +(@GUID+259, 3084, 647, 1, 1, -4.83257, -4.31233, -17.6322, 1.62316, 120, 0, 0), +(@GUID+260, 24934, 647, 1, 1, 10.321, -3.57351, -23.4941, 3.1765, 120, 0, 0), +(@GUID+261, 24935, 647, 1, 1, 10.2871, -12.0272, -23.4942, 3.10669, 120, 0, 0), +(@GUID+262, 25075, 647, 1, 1, -3.3964, -7.90545, -23.6967, 6.24828, 120, 0, 0), +(@GUID+263, 34715, 647, 1, 1, -9.18316, -7.77573, -17.217, 3.28122, 120, 0, 0), +(@GUID+264, 34717, 647, 1, 1, -13.6702, -12.4018, -15.9876, 4.59022, 120, 0, 0), +(@GUID+265, 34718, 647, 1, 1, 13.7451, -5.12846, -24.0452, 0.139626, 120, 0, 0), +(@GUID+266, 34719, 647, 1, 1, 7.62309, -5.02532, -17.6702, 4.92183, 120, 0, 0), +(@GUID+267, 34721, 647, 1, 1, -0.919197, -6.16422, -23.6729, 3.57792, 120, 0, 0), +(@GUID+268, 34723, 647, 1, 1, -17.4797, -5.60698, -14.9281, 3.22886, 120, 0, 0), +(@GUID+269, 34730, 647, 1, 1, -2.16687, -7.85422, -23.6919, 3.38594, 120, 0, 0); diff --git a/sql/updates/world/2013_10_16_01_world_sai.sql b/sql/updates/world/2013_10_16_01_world_sai.sql new file mode 100644 index 00000000000..b387a428088 --- /dev/null +++ b/sql/updates/world/2013_10_16_01_world_sai.sql @@ -0,0 +1,15 @@ +UPDATE `creature_template` SET `AIname`='SmartAI' WHERE `entry`=28389; +DELETE FROM `smart_scripts` WHERE `entryorguid`=28389 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(28389,0,0,0,8,0,100,0,51592,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Primordial Hatchling - On Spel Hit(Pickup Primordial Hatchling) - Despawn'); +-- Creature_AI to Smart_AI Conversion for Primordial Drake Egg (ID 28408) and loot fix for Primordial Hatchling (ID 28389) +UPDATE `creature_template` SET `AIName`= 'SmartAI',`flags_extra`=`flags_extra`|2 WHERE `entry` =28408; +DELETE FROM `creature_ai_scripts` WHERE `creature_id` =28408; +-- Smart AI conversion for Primordial Egg creature ai scripts, also prevents these eggs from moving/auto attacking +DELETE FROM `smart_scripts` WHERE `entryorguid` =28408; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(28408,0,0,1,25,0,100,0,0,0, 0, 0, 21 ,0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Primordial Drake Egg - On Spawn - Prevent Combat Movement"), +(28408,0,1,0,61,0,100,0,0,0, 0, 0, 20 ,0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Primordial Drake Egg - Linked with Previous Event - Disable Combat"), +(28408,0,2,0,6 ,0,100,0,0,0, 0, 0, 11 ,51595, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Primordial Drake Egg - On Death - Cast Summon Primordial Hatchling"); +-- Remove Borean Leather, Icy Dragonscale and Book of Glyph Mastery from Primordial Hatchling as these are not meant to drop from these +DELETE FROM `creature_loot_template` WHERE `entry`=28389 AND `item` IN (33568,38557,45912); diff --git a/sql/updates/world/2013_10_16_02_world_game_graveyard_zone.sql b/sql/updates/world/2013_10_16_02_world_game_graveyard_zone.sql new file mode 100644 index 00000000000..882a8e68697 --- /dev/null +++ b/sql/updates/world/2013_10_16_02_world_game_graveyard_zone.sql @@ -0,0 +1,2 @@ +DELETE FROM `game_graveyard_zone` WHERE `id`=631 AND `ghost_zone`=2159; +UPDATE `game_graveyard_zone` SET `id`=1265, `faction`=0 WHERE `ghost_zone`=2159; -- Dustwallow Marsh, Mudsprocket GY diff --git a/sql/updates/world/2013_10_17_00_world_creature_model_info.sql b/sql/updates/world/2013_10_17_00_world_creature_model_info.sql new file mode 100644 index 00000000000..43906e24135 --- /dev/null +++ b/sql/updates/world/2013_10_17_00_world_creature_model_info.sql @@ -0,0 +1,3 @@ +UPDATE `creature_model_info` SET `gender`=0 WHERE `modelid` IN (16, 17, 18, 19, 20, 23, 26, 31, 33, 40, 42, 49, 51, 53, 55, 57, 59, 68, 74, 79, 86, 87, 88, 89, 101, 102, 103, 104, 105, 106, 107, 108, 112, 113, 115, 125, 126, 127, 128, 129, 130, 138, 139, 143, 149, 150, 152, 160, 163, 164, 166, 167, 170, 172, 173, 177, 182, 184, 188, 190, 191, 194, 195, 196, 197, 198, 202, 203, 208, 210, 211, 212, 214, 218, 221, 226, 227, 231, 240, 242, 243, 244, 251, 262, 263, 267, 275, 277, 280, 282, 286, 298, 299, 300, 301, 308, 309, 310, 312, 314, 316, 317, 326, 337, 338, 341, 346, 348, 351, 355, 363, 365, 369, 371, 373, 374, 385, 386, 390, 391, 415, 416, 428, 429, 430, 433, 441, 448, 456, 459, 467, 478, 486, 487, 495, 496, 504, 506, 508, 511, 515, 516, 517, 522, 523, 524, 527, 529, 531, 534, 536, 540, 553, 555, 556, 563, 564, 565, 567, 574, 575, 576, 578, 584, 585, 586, 588, 590, 591, 592, 593, 597, 605, 606, 610, 611, 616, 617, 627, 628, 634, 636, 637, 638, 652, 655, 656, 657, 658, 661, 664, 665, 679, 680, 691, 692, 693, 716, 721, 722, 723, 726, 729, 730, 736, 742, 743, 757, 763, 764, 765, 774, 790, 791, 792, 793, 794, 795, 796, 797, 803, 809, 810, 816, 820, 824, 825, 830, 832, 837, 838, 839, 840, 841, 842, 843, 844, 845, 852, 853, 924, 927, 929, 931, 933, 934, 947, 950, 976, 983, 990, 991, 1005, 1010, 1013, 1014, 1027, 1031, 1032, 1045, 1050, 1051, 1052, 1054, 1057, 1067, 1076, 1077, 1078, 1079, 1094, 1098, 1099, 1101, 1107, 1110, 1114, 1115, 1120, 1122, 1125, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1142, 1143, 1144, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1163, 1193, 1194, 1214, 1218, 1226, 1233, 1252, 1253, 1254, 1258, 1260, 1262, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1282, 1285, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1298, 1299, 1302, 1304, 1305, 1310, 1311, 1313, 1314, 1315, 1316, 1317, 1318, 1320, 1321, 1323, 1324, 1326, 1327, 1328, 1329, 1330, 1331, 1332, 1334, 1335, 1341, 1342, 1343, 1344, 1345, 1346, 1348, 1349, 1354, 1355, 1356, 1357, 1359, 1362, 1363, 1364, 1366, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1379, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1398, 1399, 1400, 1402, 1403, 1406, 1408, 1409, 1410, 1411, 1412, 1413, 1416, 1417, 1420, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1466, 1468, 1478, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1524, 1525, 1527, 1528, 1541, 1542, 1550, 1552, 1558, 1559, 1562, 1563, 1565, 1567, 1568, 1569, 1570, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1595, 1596, 1597, 1598, 1599, 1600, 1602, 1604, 1605, 1606, 1610, 1611, 1613, 1616, 1617, 1618, 1619, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1635, 1638, 1641, 1644, 1646, 1647, 1648, 1649, 1650, 1652, 1653, 1654, 1655, 1656, 1657, 1659, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1680, 1683, 1684, 1685, 1688, 1689, 1690, 1694, 1695, 1696, 1698, 1699, 1701, 1703, 1704, 1706, 1709, 1711, 1712, 1713, 1715, 1718, 1720, 1722, 1724, 1725, 1729, 1731, 1732, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1748, 1753, 1755, 1756, 1757, 1758, 1759, 1762, 1763, 1764, 1765, 1767, 1769, 1770, 1771, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1787, 1788, 1789, 1790, 1792, 1794, 1795, 1796, 1797, 1798, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1813, 1820, 1821, 1822, 1823, 1826, 1827, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1844, 1845, 1846, 1847, 1848, 1849, 1851, 1854, 1858, 1859, 1860, 1861, 1863, 1864, 1865, 1866, 1867, 1869, 1870, 1871, 1872, 1876, 1877, 1880, 1881, 1883, 1884, 1885, 1886, 1889, 1891, 1892, 1893, 1894, 1895, 1896, 1898, 1899, 1901, 1902, 1903, 1904, 1906, 1909, 1912, 1917, 1925, 1926, 1928, 1929, 1930, 1931, 1934, 1935, 1941, 1943, 1944, 1945, 1947, 1948, 1956, 1963, 1964, 1965, 1967, 1968, 1970, 1971, 1972, 1973, 1976, 1977, 1979, 1983, 1984, 1985, 1991, 1992, 1994, 1995, 2002, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2025, 2026, 2027, 2029, 2032, 2039, 2040, 2041, 2042, 2044, 2045, 2046, 2048, 2051, 2052, 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2070, 2071, 2072, 2073, 2074, 2080, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2128, 2129, 2130, 2131, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2152, 2153, 2160, 2161, 2180, 2181, 2184, 2192, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2283, 2284, 2285, 2286, 2287, 2288, 2290, 2292, 2293, 2299, 2311, 2312, 2313, 2314, 2316, 2318, 2322, 2323, 2324, 2329, 2332, 2335, 2337, 2338, 2340, 2342, 2343, 2345, 2346, 2347, 2350, 2353, 2354, 2357, 2360, 2361, 2363, 2364, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2377, 2380, 2381, 2382, 2383, 2384, 2387, 2388, 2389, 2390, 2392, 2393, 2395, 2397, 2403, 2411, 2416, 2417, 2427, 2432, 2434, 2435, 2436, 2438, 2439, 2440, 2441, 2442, 2444, 2445, 2447, 2449, 2454, 2455, 2456, 2457, 2458, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 2470, 2471, 2472, 2484, 2492, 2493, 2495, 2498, 2499, 2502, 2504, 2506, 2507, 2510, 2511, 2513, 2514, 2517, 2519, 2520, 2522, 2524, 2526, 2528, 2530, 2531, 2532, 2534, 2535, 2554, 2557, 2561, 2562, 2563, 2564, 2565, 2572, 2576, 2578, 2581, 2584, 2586, 2588, 2593, 2594, 2595, 2596, 2597, 2603, 2604, 2605, 2607, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 2650, 2651, 2652, 2653, 2654, 2655, 2675, 2677, 2678, 2679, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 2704, 2725, 2727, 2733, 2735, 2736, 2738, 2739, 2740, 2784, 2785, 2786, 2787, 2789, 2790, 2810, 2830, 2831, 2852, 2853, 2854, 2855, 2856, 2857, 2859, 2860, 2862, 2870, 2871, 2872, 2873, 2875, 2876, 2877, 2878, 2879, 2880, 2882, 2887, 2888, 2890, 2891, 2892, 2894, 2895, 2897, 2898, 2899, 2900, 2903, 2910, 2930, 2950, 2951, 2952, 2953, 2960, 2961, 2962, 2963, 2964, 2965, 2967, 2968, 2969, 2971, 2972, 2974, 2976, 2977, 2978, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, 2989, 2990, 2991, 2992, 2994, 2997, 2998, 3002, 3007, 3010, 3011, 3014, 3015, 3016, 3017, 3036, 3037, 3038, 3040, 3042, 3043, 3044, 3045, 3046, 3047, 3052, 3053, 3054, 3055, 3072, 3073, 3074, 3075, 3076, 3077, 3078, 3079, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, 3103, 3104, 3105, 3107, 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3122, 3129, 3131, 3132, 3134, 3136, 3137, 3138, 3139, 3140, 3141, 3142, 3144, 3166, 3167, 3186, 3187, 3188, 3189, 3190, 3192, 3193, 3206, 3207, 3208, 3209, 3216, 3217, 3219, 3220, 3222, 3223, 3224, 3225, 3226, 3228, 3229, 3231, 3232, 3236, 3237, 3238, 3246, 3249, 3250, 3251, 3252, 3253, 3254, 3256, 3258, 3259, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3298, 3299, 3300, 3301, 3302, 3303, 3304, 3305, 3306, 3307, 3308, 3309, 3310, 3314, 3315, 3316, 3317, 3319, 3324, 3325, 3326, 3327, 3328, 3331, 3332, 3333, 3334, 3336, 3337, 3338, 3340, 3341, 3342, 3343, 3346, 3347, 3348, 3350, 3351, 3352, 3353, 3354, 3355, 3357, 3358, 3359, 3360, 3361, 3362, 3365, 3370, 3372, 3373, 3374, 3376, 3380, 3381, 3382, 3383, 3384, 3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 3400, 3401, 3403, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422, 3423, 3424, 3425, 3426, 3427, 3428, 3429, 3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3439, 3440, 3441, 3442, 3443, 3444, 3446, 3447, 3449, 3451, 3452, 3453, 3454, 3456, 3457, 3458, 3459, 3460, 3461, 3462, 3464, 3465, 3467, 3468, 3469, 3470, 3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, 3479, 3480, 3481, 3482, 3483, 3484, 3487, 3488, 3490, 3491, 3492, 3493, 3494, 3505, 3506, 3508, 3509, 3510, 3511, 3512, 3513, 3514, 3516, 3518, 3519, 3521, 3522, 3523, 3524, 3525, 3526, 3527, 3530, 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539, 3541, 3542, 3545, 3546, 3548, 3550, 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559, 3561, 3563, 3565, 3566, 3568, 3570, 3571, 3572, 3573, 3574, 3575, 3576, 3577, 3578, 3581, 3583, 3585, 3587, 3589, 3592, 3594, 3595, 3596, 3597, 3598, 3599, 3600, 3601, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610, 3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628, 3629, 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, 3640, 3642, 3643, 3644, 3645, 3646, 3647, 3648, 3649, 3652, 3653, 3655, 3656, 3658, 3660, 3661, 3662, 3664, 3665, 3666, 3667, 3669, 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3678, 3679, 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3687, 3688, 3690, 3691, 3692, 3693, 3694, 3695, 3696, 3697, 3698, 3699, 3701, 3702, 3703, 3704, 3705, 3706, 3708, 3709, 3711, 3712, 3714, 3716, 3719, 3720, 3721, 3723, 3725, 3727, 3729, 3732, 3733, 3734, 3736, 3737, 3738, 3739, 3740, 3741, 3742, 3743, 3744, 3745, 3746, 3747, 3748, 3749, 3751, 3752, 3753, 3754, 3755, 3756, 3757, 3758, 3759, 3760, 3761, 3763, 3765, 3767, 3769, 3771, 3773, 3774, 3775, 3776, 3777, 3778, 3782, 3783, 3785, 3787, 3789, 3790, 3792, 3793, 3794, 3795, 3796, 3799, 3800, 3801, 3802, 3803, 3804, 3808, 3809, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 3821, 3822, 3823, 3824, 3826, 3827, 3829, 3832, 3833, 3835, 3837, 3839, 3842, 3843, 3844, 3845, 3846, 3847, 3849, 3851, 3852, 3853, 3854, 3855, 3856, 3857, 3858, 3859, 3862, 3863, 3864, 3865, 3866, 3868, 3869, 3870, 3872, 3873, 3874, 3876, 3877, 3878, 3879, 3880, 3881, 3882, 3884, 3885, 3887, 3888, 3889, 3890, 3894, 3895, 3898, 3899, 3902, 3903, 3905, 3906, 3907, 3908, 3909, 3910, 3911, 3912, 3913, 3914, 3917, 3919, 3920, 3921, 3922, 3923, 3924, 3925, 3926, 3927, 3928, 3929, 3930, 3933, 3934, 3936, 3937, 3939, 3940, 3941, 3946, 3947, 3948, 3950, 3951, 3952, 3954, 3957, 3958, 3959, 3960, 3962, 3963, 3964, 3965, 3967, 3968, 3969, 3970, 3971, 3973, 3974, 3975, 3976, 3981, 3982, 3984, 3985, 3986, 3987, 3989, 3991, 3993, 3995, 3997, 4000, 4001, 4003, 4005, 4006, 4007, 4008, 4011, 4013, 4014, 4016, 4018, 4020, 4021, 4022, 4024, 4028, 4029, 4030, 4032, 4033, 4034, 4036, 4037, 4039, 4040, 4042, 4043, 4044, 4045, 4047, 4048, 4049, 4050, 4051, 4055, 4061, 4062, 4063, 4064, 4066, 4068, 4069, 4070, 4071, 4072, 4073, 4074, 4075, 4076, 4078, 4079, 4081, 4082, 4083, 4086, 4088, 4092, 4093, 4094, 4095, 4096, 4097, 4098, 4099, 4100, 4101, 4102, 4103, 4104, 4105, 4107, 4110, 4111, 4116, 4117, 4118, 4119, 4120, 4121, 4125, 4127, 4130, 4132, 4134, 4136, 4137, 4139, 4141, 4143, 4145, 4148, 4150, 4152, 4154, 4155, 4156, 4157, 4159, 4160, 4161, 4163, 4164, 4165, 4166, 4169, 4170, 4171, 4172, 4173, 4178, 4180, 4183, 4186, 4188, 4190, 4192, 4194, 4197, 4199, 4201, 4202, 4204, 4205, 4206, 4207, 4208, 4209, 4211, 4212, 4213, 4214, 4215, 4216, 4218, 4220, 4222, 4224, 4225, 4226, 4227, 4228, 4229, 4232, 4237, 4238, 4239, 4242, 4243, 4244, 4246, 4248, 4249, 4252, 4253, 4255, 4259, 4261, 4262, 4265, 4271, 4272, 4275, 4276, 4279, 4281, 4283, 4285, 4286, 4287, 4288, 4289, 4291, 4292, 4293, 4294, 4295, 4296, 4297, 4298, 4299, 4300, 4301, 4303, 4304, 4306, 4307, 4308, 4309, 4310, 4311, 4315, 4316, 4318, 4319, 4320, 4321, 4324, 4325, 4326, 4327, 4328, 4329, 4331, 4332, 4333, 4335, 4336, 4338, 4339, 4341, 4342, 4347, 4349, 4353, 4354, 4359, 4360, 4361, 4363, 4364, 4365, 4366, 4367, 4368, 4370, 4371, 4372, 4373, 4374, 4376, 4380, 4381, 4382, 4384, 4386, 4387, 4388, 4389, 4390, 4391, 4392, 4395, 4396, 4397, 4398, 4400, 4401, 4404, 4405, 4407, 4408, 4413, 4414, 4415, 4416, 4417, 4418, 4420, 4422, 4423, 4424, 4426, 4427, 4428, 4429, 4430, 4431, 4432, 4436, 4437, 4438, 4439, 4441, 4443, 4444, 4446, 4449, 4450, 4451, 4452, 4453, 4454, 4455, 4459, 4460, 4461, 4463, 4464, 4469, 4470, 4471, 4474, 4475, 4476, 4477, 4478, 4479, 4482, 4483, 4484, 4485, 4489, 4491, 4492, 4493, 4494, 4495, 4497, 4499, 4501, 4503, 4506, 4508, 4511, 4512, 4514, 4515, 4516, 4517, 4518, 4519, 4520, 4521, 4525, 4527, 4530, 4531, 4532, 4534, 4537, 4539, 4540, 4542, 4543, 4544, 4545, 4547, 4548, 4549, 4550, 4551, 4552, 4553, 4554, 4555, 4556, 4557, 4559, 4560, 4561, 4562, 4563, 4564, 4565, 4567, 4568, 4569, 4570, 4571, 4572, 4573, 4574, 4575, 4576, 4577, 4579, 4580, 4581, 4582, 4583, 4584, 4592, 4593, 4594, 4595, 4596, 4597, 4598, 4599, 4600, 4602, 4604, 4608, 4609, 4610, 4611, 4612, 4616, 4617, 4620, 4621, 4622, 4623, 4624, 4625, 4627, 4628, 4632, 4633, 4634, 4635, 4637, 4638, 4639, 4640, 4641, 4644, 4645, 4646, 4648, 4649, 4652, 4653, 4656, 4657, 4658, 4660, 4661, 4663, 4664, 4666, 4667, 4668, 4671, 4672, 4676, 4678, 4679, 4680, 4684, 4685, 4686, 4688, 4690, 4692, 4693, 4694, 4696, 4697, 4699, 4701, 4703, 4705, 4707, 4709, 4711, 4715, 4717, 4720, 4721, 4725, 4726, 4727, 4745, 4746, 4747, 4748, 4749, 4750, 4751, 4752, 4753, 4755, 4757, 4758, 4762, 4763, 4764, 4765, 4769, 4771, 4773, 4775, 4776, 4778, 4779, 4781, 4785, 4805, 4806, 4807, 4825, 4826, 4827, 4828, 4830, 4831, 4832, 4833, 4834, 4835, 4836, 4837, 4838, 4839, 4840, 4860, 4864, 4865, 4866, 4867, 4873, 4874, 4885, 4886, 4887, 4889, 4890, 4891, 4893, 4895, 4896, 4898, 4899, 4900, 4901, 4902, 4903, 4905, 4908, 4910, 4911, 4916, 4917, 4918, 4919, 4920, 4921, 4922, 4923, 4924, 4925, 4926, 4927, 4928, 4930, 4931, 4932, 4933, 4934, 4935, 4936, 4937, 4938, 4939, 4940, 4942, 4944, 4945, 4946, 4947, 4949, 4950, 4952, 4953, 4954, 4955, 4956, 4957, 4961, 4962, 4963, 4964, 4965, 4969, 4970, 4971, 4986, 4987, 4988, 4989, 4990, 4992, 4993, 4995, 4996, 4997, 4998, 4999, 5000, 5001, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010, 5012, 5013, 5014, 5015, 5016, 5019, 5020, 5021, 5023, 5025, 5028, 5032, 5034, 5035, 5037, 5038, 5039, 5041, 5044, 5047, 5049, 5065, 5070, 5071, 5072, 5073, 5074, 5075, 5076, 5077, 5078, 5079, 5080, 5081, 5082, 5083, 5084, 5085, 5087, 5088, 5089, 5090, 5105, 5106, 5107, 5108, 5128, 5131, 5146, 5166, 5167, 5190, 5205, 5206, 5207, 5225, 5226, 5227, 5230, 5232, 5236, 5237, 5243, 5244, 5245, 5266, 5286, 5293, 5294, 5295, 5296, 5306, 5307, 5325, 5326, 5345, 5346, 5368, 5370, 5372, 5373, 5374, 5376, 5377, 5385, 5405, 5406, 5409, 5410, 5426, 5427, 5428, 5433, 5434, 5436, 5437, 5438, 5440, 5443, 5445, 5447, 5449, 5451, 5465, 5485, 5486, 5507, 5508, 5509, 5525, 5526, 5528, 5529, 5530, 5532, 5534, 5535, 5547, 5548, 5549, 5550, 5551, 5553, 5566, 5567, 5568, 5570, 5571, 5573, 5575, 5576, 5577, 5605, 5606, 5607, 5608, 5609, 5610, 5611, 5612, 5613, 5625, 5626, 5646, 5647, 5648, 5665, 5685, 5705, 5707, 5708, 5709, 5710, 5711, 5726, 5727, 5728, 5729, 5730, 5748, 5749, 5751, 5752, 5753, 5754, 5766, 5767, 5768, 5769, 5770, 5771, 5772, 5775, 5776, 5778, 5779, 5782, 5784, 5785, 5786, 5805, 5806, 5808, 5810, 5812, 5813, 5814, 5816, 5818, 5820, 5821, 5822, 5824, 5826, 5828, 5830, 5831, 5832, 5845, 5846, 5865, 5866, 5885, 5907, 5908, 5945, 5986, 5988, 5991, 6006, 6007, 6009, 6010, 6025, 6026, 6029, 6030, 6031, 6032, 6033, 6034, 6035, 6036, 6037, 6038, 6039, 6040, 6041, 6042, 6043, 6044, 6045, 6046, 6047, 6048, 6049, 6050, 6051, 6052, 6053, 6054, 6055, 6056, 6057, 6059, 6060, 6062, 6063, 6065, 6066, 6067, 6071, 6072, 6074, 6075, 6077, 6078, 6079, 6080, 6084, 6094, 6097, 6103, 6104, 6105, 6106, 6108, 6109, 6114, 6115, 6117, 6118, 6119, 6123, 6124, 6127, 6168, 6170, 6171, 6189, 6190, 6191, 6192, 6194, 6198, 6208, 6228, 6230, 6231, 6232, 6233, 6301, 6308, 6353, 6380, 6388, 6389, 6390, 6393, 6395, 6397, 6399, 6401, 6403, 6405, 6407, 6409, 6410, 6411, 6413, 6415, 6417, 6419, 6421, 6423, 6425, 6427, 6429, 6432, 6433, 6434, 6436, 6439, 6440, 6441, 6442, 6443, 6444, 6446, 6447, 6448, 6449, 6468, 6469, 6470, 6471, 6472, 6473, 6474, 6475, 6476, 6477, 6478, 6479, 6480, 6483, 6485, 6487, 6489, 6491, 6493, 6495, 6497, 6510, 6512, 6514, 6528, 6529, 6530, 6531, 6532, 6533, 6535, 6538, 6540, 6542, 6545, 6546, 6549, 6550, 6552, 6568, 6570, 6571, 6572, 6573, 6574, 6575, 6589, 6590, 6608, 6610, 6628, 6630, 6632, 6649, 6668, 6669, 6670, 6672, 6675, 6678, 6680, 6682, 6686, 6687, 6690, 6692, 6693, 6694, 6695, 6696, 6697, 6698, 6699, 6700, 6701, 6702, 6704, 6705, 6707, 6708, 6709, 6710, 6711, 6713, 6715, 6717, 6719, 6721, 6723, 6725, 6727, 6729, 6731, 6733, 6738, 6740, 6741, 6743, 6744, 6747, 6748, 6751, 6752, 6754, 6760, 6762, 6763, 6764, 6765, 6767, 6769, 6770, 6772, 6775, 6776, 6777, 6778, 6779, 6780, 6784, 6785, 6787, 6789, 6791, 6793, 6795, 6832, 6834, 6836, 6837, 6839, 6843, 6844, 6845, 6846, 6847, 6848, 6849, 6850, 6853, 6854, 6855, 6856, 6857, 6858, 6868, 6869, 6870, 6871, 6872, 6873, 6874, 6875, 6876, 6877, 6878, 6879, 6882, 6883, 6892, 6893, 6894, 6913, 6914, 6916, 6917, 6918, 6920, 6921, 6922, 6923, 6924, 6925, 6926, 6927, 6928, 6929, 6930, 6931, 6932, 6933, 6934, 6935, 6936, 6937, 6938, 6939, 6940, 6944, 6946, 6947, 6949, 6950, 6952, 6953, 6954, 6955, 6957, 6959, 6961, 6962, 6963, 6965, 6966, 6967, 6968, 6973, 6974, 6978, 6979, 6980, 6981, 6983, 6984, 6988, 6989, 6990, 6991, 6994, 6995, 6996, 6997, 7001, 7003, 7004, 7005, 7006, 7007, 7008, 7009, 7011, 7016, 7019, 7021, 7022, 7024, 7026, 7027, 7028, 7031, 7032, 7033, 7034, 7035, 7036, 7037, 7038, 7041, 7042, 7043, 7047, 7048, 7049, 7050, 7051, 7052, 7053, 7054, 7055, 7056, 7057, 7058, 7059, 7060, 7061, 7073, 7074, 7093, 7094, 7095, 7096, 7097, 7098, 7099, 7100, 7101, 7102, 7103, 7104, 7105, 7106, 7107, 7108, 7109, 7110, 7111, 7112, 7113, 7115, 7117, 7120, 7124, 7125, 7126, 7127, 7128, 7129, 7130, 7131, 7132, 7133, 7134, 7135, 7136, 7137, 7153, 7154, 7155, 7156, 7157, 7158, 7159, 7160, 7161, 7162, 7163, 7164, 7165, 7166, 7167, 7168, 7169, 7170, 7171, 7172, 7173, 7174, 7176, 7177, 7178, 7179, 7180, 7181, 7182, 7183, 7184, 7185, 7186, 7187, 7188, 7189, 7190, 7191, 7192, 7193, 7194, 7195, 7196, 7197, 7198, 7199, 7200, 7201, 7202, 7203, 7204, 7205, 7206, 7207, 7208, 7209, 7210, 7211, 7212, 7213, 7214, 7215, 7216, 7217, 7218, 7219, 7220, 7221, 7222, 7223, 7224, 7225, 7226, 7227, 7228, 7229, 7230, 7231, 7232, 7233, 7234, 7235, 7236, 7237, 7238, 7239, 7240, 7241, 7242, 7243, 7244, 7245, 7246, 7247, 7249, 7250, 7269, 7272, 7273, 7308, 7310, 7328, 7329, 7331, 7332, 7333, 7334, 7335, 7336, 7337, 7338, 7340, 7341, 7342, 7343, 7346, 7351, 7353, 7354, 7355, 7356, 7357, 7360, 7361, 7362, 7364, 7366, 7367, 7368, 7370, 7372, 7373, 7374, 7377, 7379, 7380, 7381, 7383, 7384, 7389, 7390, 7429, 7509, 7529, 7530, 7531, 7535, 7537, 7538, 7552, 7570, 7591, 7593, 7594, 7595, 7597, 7598, 7600, 7601, 7604, 7606, 7607, 7609, 7612, 7613, 7614, 7618, 7620, 7622, 7623, 7624, 7626, 7629, 7631, 7632, 7633, 7649, 7670, 7673, 7689, 7709, 7749, 7750, 7751, 7753, 7758, 7759, 7760, 7761, 7762, 7764, 7765, 7766, 7769, 7789, 7790, 7791, 7792, 7793, 7794, 7795, 7796, 7797, 7798, 7799, 7800, 7801, 7803, 7805, 7807, 7809, 7810, 7811, 7813, 7814, 7815, 7816, 7817, 7819, 7820, 7822, 7824, 7826, 7827, 7831, 7832, 7835, 7838, 7841, 7842, 7844, 7846, 7849, 7851, 7852, 7859, 7860, 7861, 7862, 7865, 7866, 7867, 7868, 7871, 7873, 7874, 7875, 7889, 7901, 7902, 7904, 7907, 7910, 7912, 7914, 7915, 7916, 7919, 7921, 7929, 7930, 7931, 7932, 7935, 7951, 7952, 7971, 7990, 7991, 7992, 7993, 7996, 7997, 7998, 7999, 8000, 8001, 8009, 8010, 8012, 8013, 8029, 8054, 8055, 8069, 8089, 8129, 8169, 8170, 8176, 8186, 8229, 8310, 8311, 8313, 8315, 8329, 8331, 8333, 8334, 8335, 8349, 8350, 8351, 8352, 8353, 8354, 8355, 8390, 8413, 8430, 8449, 8474, 8477, 8569, 8575, 8590, 8591, 8592, 8593, 8594, 8595, 8596, 8597, 8598, 8609, 8610, 8611, 8612, 8629, 8631, 8633, 8634, 8649, 8652, 8653, 8654, 8655, 8656, 8658, 8661, 8662, 8663, 8664, 8666, 8667, 8668, 8669, 8670, 8673, 8674, 8677, 8678, 8679, 8681, 8682, 8685, 8686, 8687, 8688, 8689, 8692, 8694, 8696, 8697, 8698, 8699, 8700, 8701, 8702, 8703, 8704, 8706, 8707, 8708, 8709, 8710, 8711, 8717, 8718, 8729, 8749, 8750, 8751, 8752, 8753, 8754, 8755, 8756, 8757, 8758, 8759, 8760, 8762, 8764, 8766, 8767, 8772, 8773, 8777, 8778, 8780, 8781, 8790, 8791, 8792, 8793, 8794, 8798, 8799, 8803, 8804, 8805, 8806, 8807, 8812, 8813, 8814, 8815, 8820, 8821, 8822, 8823, 8825, 8826, 8827, 8828, 8829, 8830, 8832, 8839, 8844, 8845, 8846, 8847, 8848, 8849, 8872, 8891, 8893, 8894, 8895, 8898, 8899, 8900, 8901, 8929, 8989, 9023, 9024, 9026, 9027, 9049, 9051, 9052, 9053, 9054, 9069, 9072, 9073, 9089, 9130, 9133, 9134, 9135, 9149, 9151, 9169, 9211, 9212, 9213, 9230, 9232, 9233, 9234, 9235, 9236, 9250, 9252, 9256, 9258, 9259, 9261, 9265, 9266, 9267, 9268, 9271, 9272, 9274, 9275, 9279, 9281, 9283, 9284, 9285, 9286, 9288, 9289, 9291, 9292, 9293, 9309, 9329, 9332, 9333, 9334, 9335, 9336, 9337, 9340, 9341, 9348, 9349, 9351, 9352, 9353, 9391, 9409, 9410, 9411, 9413, 9414, 9415, 9417, 9418, 9419, 9420, 9421, 9422, 9425, 9426, 9427, 9428, 9430, 9432, 9433, 9434, 9435, 9436, 9437, 9439, 9441, 9442, 9444, 9445, 9446, 9447, 9448, 9470, 9472, 9477, 9489, 9532, 9533, 9549, 9550, 9552, 9554, 9561, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9581, 9596, 9599, 9602, 9603, 9604, 9605, 9606, 9609, 9610, 9613, 9614, 9615, 9616, 9617, 9618, 9619, 9620, 9621, 9623, 9625, 9626, 9627, 9628, 9629, 9630, 9633, 9634, 9635, 9636, 9637, 9638, 9641, 9642, 9643, 9644, 9645, 9648, 9649, 9652, 9653, 9656, 9657, 9660, 9661, 9664, 9665, 9668, 9669, 9670, 9671, 9672, 9673, 9674, 9675, 9678, 9679, 9680, 9681, 9682, 9683, 9686, 9687, 9688, 9689, 9690, 9691, 9692, 9693, 9694, 9695, 9696, 9697, 9698, 9699, 9709, 9710, 9714, 9715, 9716, 9719, 9720, 9724, 9725, 9728, 9729, 9733, 9734, 9735, 9736, 9737, 9738, 9739, 9740, 9741, 9742, 9751, 9752, 9753, 9757, 9761, 9762, 9764, 9766, 9768, 9769, 9770, 9771, 9772, 9773, 9776, 9777, 9778, 9779, 9781, 9792, 9794, 9797, 9798, 9799, 9802, 9803, 9807, 9809, 9814, 9815, 9816, 9817, 9819, 9820, 9824, 9825, 9826, 9898, 9899, 9900, 9901, 9902, 9911, 9912, 9935, 9936, 9939, 9940, 9943, 9944, 9946, 9947, 9952, 9969, 9991, 9999, 10009, 10010, 10032, 10035, 10036, 10038, 10039, 10043, 10049, 10050, 10055, 10057, 10069, 10071, 10089, 10094, 10109, 10110, 10111, 10114, 10115, 10116, 10130, 10131, 10132, 10133, 10135, 10136, 10137, 10139, 10141, 10143, 10146, 10148, 10150, 10151, 10152, 10169, 10170, 10171, 10172, 10173, 10176, 10177, 10181, 10182, 10184, 10186, 10187, 10188, 10189, 10190, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10210, 10213, 10215, 10216, 10217, 10218, 10219, 10222, 10225, 10226, 10229, 10230, 10231, 10235, 10236, 10237, 10240, 10241, 10242, 10243, 10245, 10246, 10247, 10248, 10251, 10252, 10254, 10269, 10275, 10277, 10279, 10285, 10286, 10287, 10290, 10291, 10292, 10295, 10296, 10299, 10300, 10303, 10304, 10307, 10308, 10311, 10312, 10316, 10318, 10319, 10320, 10321, 10324, 10325, 10328, 10329, 10332, 10333, 10336, 10338, 10339, 10340, 10341, 10342, 10343, 10344, 10345, 10348, 10349, 10350, 10351, 10354, 10355, 10356, 10357, 10358, 10359, 10362, 10363, 10364, 10365, 10366, 10367, 10370, 10371, 10374, 10375, 10376, 10377, 10379, 10382, 10383, 10384, 10387, 10388, 10391, 10392, 10395, 10398, 10399, 10403, 10404, 10408, 10409, 10413, 10414, 10417, 10418, 10421, 10422, 10425, 10426, 10427, 10428, 10433, 10434, 10435, 10438, 10441, 10442, 10443, 10444, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10456, 10457, 10458, 10460, 10461, 10462, 10463, 10464, 10466, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10478, 10479, 10482, 10483, 10484, 10488, 10489, 10492, 10493, 10496, 10497, 10500, 10501, 10504, 10505, 10508, 10509, 10512, 10513, 10516, 10517, 10529, 10530, 10535, 10536, 10539, 10540, 10543, 10544, 10545, 10546, 10547, 10548, 10551, 10552, 10554, 10558, 10560, 10561, 10566, 10567, 10570, 10572, 10576, 10577, 10578, 10579, 10580, 10586, 10587, 10588, 10589, 10590, 10611, 10614, 10616, 10617, 10618, 10619, 10622, 10625, 10629, 10631, 10632, 10635, 10636, 10637, 10638, 10641, 10642, 10643, 10644, 10645, 10647, 10649, 10650, 10653, 10655, 10656, 10658, 10660, 10668, 10669, 10674, 10689, 10691, 10693, 10694, 10695, 10696, 10697, 10704, 10705, 10706, 10707, 10708, 10709, 10710, 10714, 10724, 10726, 10727, 10729, 10730, 10735, 10736, 10738, 10739, 10740, 10741, 10742, 10743, 10747, 10748, 10754, 10790, 10791, 10795, 10797, 10811, 10812, 10813, 10815, 10817, 10820, 10821, 10834, 10858, 10878, 10896, 10901, 10907, 10908, 10911, 10912, 10913, 10920, 10921, 10930, 10931, 10935, 10936, 10937, 10938, 10939, 10940, 10943, 10944, 10945, 10946, 10949, 10953, 10954, 10957, 10958, 10969, 10980, 10981, 10982, 10989, 11013, 11014, 11017, 11018, 11021, 11022, 11025, 11027, 11028, 11033, 11035, 11036, 11037, 11038, 11040, 11042, 11049, 11051, 11052, 11053, 11054, 11055, 11056, 11060, 11063, 11070, 11072, 11074, 11075, 11080, 11081, 11100, 11101, 11109, 11110, 11113, 11114, 11117, 11119, 11121, 11123, 11124, 11126, 11127, 11129, 11130, 11132, 11133, 11135, 11136, 11146, 11147, 11149, 11150, 11152, 11153, 11155, 11156, 11158, 11159, 11165, 11166, 11167, 11168, 11179, 11180, 11181, 11182, 11183, 11189, 11190, 11193, 11194, 11197, 11198, 11201, 11202, 11205, 11207, 11209, 11211, 11213, 11215, 11217, 11218, 11221, 11222, 11225, 11226, 11229, 11230, 11233, 11234, 11237, 11238, 11241, 11243, 11245, 11246, 11249, 11251, 11253, 11254, 11255, 11256, 11257, 11258, 11264, 11265, 11267, 11269, 11271, 11272, 11274, 11275, 11276, 11277, 11278, 11279, 11283, 11284, 11286, 11287, 11288, 11289, 11293, 11296, 11297, 11298, 11299, 11301, 11302, 11303, 11305, 11306, 11307, 11309, 11310, 11311, 11312, 11313, 11314, 11320, 11321, 11322, 11325, 11326, 11327, 11328, 11331, 11332, 11333, 11334, 11335, 11336, 11337, 11338, 11339, 11340, 11341, 11342, 11343, 11344, 11345, 11346, 11347, 11349, 11350, 11351, 11353, 11354, 11355, 11357, 11358, 11359, 11360, 11361, 11369, 11370, 11372, 11375, 11376, 11377, 11379, 11380, 11382, 11383, 11384, 11385, 11386, 11387, 11390, 11391, 11394, 11395, 11406, 11409, 11416, 11424, 11425, 11426, 11427, 11428, 11429, 11430, 11431, 11434, 11435, 11438, 11439, 11443, 11456, 11459, 11460, 11461, 11464, 11465, 11466, 11467, 11468, 11469, 11470, 11474, 11475, 11476, 11479, 11509, 11510, 11511, 11513, 11532, 11533, 11534, 11536, 11537, 11538, 11539, 11542, 11543, 11544, 11545, 11546, 11548, 11549, 11550, 11551, 11552, 11553, 11554, 11555, 11556, 11557, 11558, 11559, 11560, 11561, 11562, 11563, 11564, 11565, 11566, 11567, 11568, 11569, 11570, 11571, 11572, 11573, 11574, 11576, 11577, 11578, 11579, 11581, 11582, 11583, 11584, 11585, 11586, 11590, 11591, 11592, 11595, 11609, 11610, 11611, 11629, 11630, 11631, 11632, 11638, 11639, 11640, 11650, 11651, 11652, 11653, 11655, 11656, 11658, 11660, 11661, 11664, 11666, 11667, 11669, 11671, 11674, 11679, 11680, 11685, 11688, 11690, 11693, 11694, 11733, 11736, 11738, 11740, 11743, 11745, 11749, 11751, 11753, 11754, 11755, 11756, 11757, 11758, 11759, 11762, 11763, 11768, 11769, 11772, 11773, 11774, 11776, 11790, 11791, 11792, 11793, 11794, 11795, 11797, 11798, 11799, 11801, 11803, 11804, 11805, 11806, 11809, 11811, 11812, 11814, 11816, 11817, 11818, 11820, 11822, 11825, 11826, 11830, 11831, 11832, 11833, 11834, 11836, 11849, 11851, 11852, 11855, 11856, 11859, 11860, 11863, 11864, 11866, 11868, 11870, 11872, 11874, 11876, 11878, 11880, 11882, 11884, 11886, 11887, 11892, 11893, 11894, 11895, 11896, 11899, 11900, 11902, 11905, 11906, 11907, 11911, 11913, 11930, 11949, 11953, 11955, 11956, 11957, 11961, 11962, 11963, 11965, 11967, 11969, 11972, 11973, 11976, 11977, 11979, 11981, 11984, 11987, 11990, 11991, 11994, 11995, 11996, 11997, 12000, 12001, 12002, 12003, 12005, 12007, 12008, 12010, 12012, 12015, 12016, 12020, 12024, 12025, 12026, 12028, 12029, 12030, 12031, 12032, 12033, 12034, 12036, 12039, 12041, 12044, 12045, 12046, 12047, 12048, 12050, 12052, 12053, 12055, 12057, 12058, 12060, 12061, 12065, 12068, 12075, 12076, 12078, 12080, 12081, 12083, 12089, 12161, 12165, 12167, 12168, 12170, 12171, 12189, 12190, 12230, 12249, 12269, 12272, 12289, 12290, 12329, 12330, 12331, 12332, 12334, 12350, 12369, 12370, 12371, 12372, 12373, 12374, 12390, 12391, 12431, 12435, 12449, 12470, 12471, 12472, 12473, 12474, 12475, 12609, 12610, 12629, 12669, 12671, 12672, 12673, 12676, 12678, 12679, 12709, 12729, 12790, 12809, 12810, 12812, 12813, 12822, 12829, 12832, 12849, 12890, 12891, 12893, 12909, 12910, 12911, 12915, 12917, 12918, 12919, 12920, 12921, 12925, 12926, 12928, 12930, 12932, 12934, 12938, 12942, 12943, 12944, 12945, 12949, 12951, 12953, 12954, 12956, 12957, 12959, 12960, 12961, 12965, 12967, 12969, 12971, 12975, 12977, 12989, 12990, 13029, 13030, 13031, 13032, 13049, 13050, 13089, 13090, 13091, 13093, 13099, 13129, 13130, 13132, 13149, 13151, 13152, 13171, 13249, 13252, 13253, 13254, 13257, 13258, 13260, 13262, 13264, 13266, 13269, 13270, 13273, 13274, 13276, 13278, 13280, 13281, 13282, 13284, 13285, 13286, 13288, 13294, 13296, 13298, 13300, 13301, 13303, 13306, 13308, 13311, 13312, 13315, 13316, 13319, 13320, 13321, 13322, 13325, 13326, 13330, 13334, 13335, 13336, 13338, 13341, 13342, 13343, 13346, 13348, 13349, 13351, 13353, 13356, 13361, 13363, 13364, 13365, 13367, 13369, 13370, 13371, 13374, 13375, 13377, 13379, 13382, 13383, 13384, 13385, 13386, 13388, 13390, 13392, 13394, 13398, 13400, 13409, 13411, 13414, 13415, 13429, 13430, 13432, 13434, 13436, 13438, 13439, 13440, 13442, 13445, 13446, 13449, 13450, 13453, 13454, 13455, 13456, 13457, 13458, 13459, 13460, 13461, 13462, 13463, 13464, 13465, 13466, 13467, 13468, 13469, 13470, 13471, 13472, 13475, 13476, 13532, 13533, 13538, 13540, 13541, 13543, 13544, 13547, 13548, 13552, 13554, 13556, 13558, 13560, 13563, 13565, 13567, 13569, 13571, 13573, 13590, 13592, 13594, 13596, 13598, 13600, 13630, 13632, 13634, 13636, 13638, 13640, 13642, 13644, 13645, 13647, 13650, 13652, 13654, 13656, 13658, 13660, 13662, 13671, 13709, 13711, 13713, 13714, 13715, 13729, 13769, 13771, 13773, 13775, 13777, 13779, 13781, 13783, 13785, 13786, 13789, 13790, 13793, 13795, 13797, 13799, 13801, 13803, 13805, 13807, 13808, 13809, 13811, 13813, 13815, 13817, 13818, 13821, 13822, 13825, 13827, 13828, 13831, 13833, 13835, 13837, 13839, 13841, 13842, 13849, 13850, 13852, 13853, 13854, 13889, 13891, 13893, 13895, 13950, 13952, 13954, 13969, 13989, 13990, 13991, 13992, 14013, 14014, 14017, 14018, 14021, 14022, 14026, 14027, 14030, 14031, 14034, 14035, 14052, 14053, 14056, 14057, 14061, 14063, 14064, 14072, 14092, 14093, 14132, 14172, 14193, 14212, 14216, 14232, 14233, 14234, 14235, 14236, 14292, 14293, 14296, 14304, 14307, 14308, 14309, 14310, 14317, 14320, 14322, 14323, 14326, 14329, 14330, 14332, 14333, 14339, 14340, 14341, 14342, 14343, 14344, 14347, 14352, 14355, 14356, 14357, 14358, 14359, 14360, 14361, 14369, 14371, 14380, 14381, 14384, 14386, 14387, 14388, 14394, 14395, 14396, 14397, 14398, 14401, 14402, 14403, 14404, 14405, 14406, 14407, 14408, 14409, 14412, 14413, 14415, 14416, 14420, 14422, 14423, 14424, 14427, 14429, 14431, 14452, 14453, 14472, 14492, 14493, 14494, 14495, 14496, 14498, 14519, 14526, 14529, 14530, 14531, 14532, 14533, 14534, 14537, 14538, 14544, 14554, 14555, 14556, 14561, 14563, 14564, 14565, 14566, 14576, 14577, 14580, 14586, 14587, 14589, 14591, 14612, 14632, 14634, 14652, 14653, 14654, 14655, 14662, 14664, 14665, 14666, 14668, 14669, 14670, 14671, 14672, 14673, 14694, 14697, 14718, 14719, 14732, 14733, 14752, 14753, 14755, 14756, 14758, 14760, 14761, 14764, 14765, 14766, 14769, 14770, 14772, 14773, 14774, 14775, 14777, 14785, 14786, 14792, 14793, 14794, 14797, 14798, 14812, 14832, 14854, 14855, 14856, 14872, 14875, 14877, 14878, 14879, 14881, 14883, 14885, 14886, 14887, 14888, 14889, 14890, 14894, 14913, 14945, 14948, 14949, 14953, 14954, 14972, 14993, 14994, 14995, 14997, 14998, 15000, 15003, 15004, 15012, 15032, 15093, 15095, 15096, 15097, 15099, 15102, 15113, 15114, 15115, 15134, 15139, 15141, 15142, 15144, 15146, 15147, 15148, 15149, 15152, 15153, 15172, 15173, 15174, 15175, 15176, 15178, 15183, 15184, 15185, 15186, 15187, 15189, 15192, 15193, 15194, 15195, 15196, 15198, 15201, 15202, 15203, 15205, 15206, 15207, 15210, 15211, 15214, 15215, 15216, 15217, 15222, 15224, 15228, 15230, 15233, 15235, 15237, 15238, 15239, 15240, 15243, 15245, 15247, 15248, 15251, 15252, 15259, 15260, 15263, 15265, 15267, 15268, 15269, 15271, 15273, 15274, 15276, 15277, 15278, 15279, 15280, 15281, 15284, 15285, 15289, 15290, 15302, 15303, 15304, 15305, 15309, 15310, 15311, 15313, 15314, 15315, 15318, 15319, 15320, 15322, 15324, 15326, 15329, 15331, 15342, 15350, 15352, 15363, 15365, 15366, 15367, 15370, 15371, 15387, 15389, 15399, 15401, 15403, 15408, 15409, 15411, 15414, 15415, 15416, 15418, 15419, 15421, 15424, 15426, 15427, 15428, 15435, 15441, 15442, 15444, 15445, 15447, 15448, 15451, 15456, 15457, 15460, 15461, 15462, 15473, 15476, 15478, 15479, 15481, 15502, 15504, 15511, 15513, 15515, 15517, 15519, 15521, 15524, 15528, 15532, 15536, 15537, 15540, 15543, 15544, 15548, 15550, 15552, 15553, 15557, 15558, 15559, 15560, 15561, 15562, 15563, 15565, 15566, 15567, 15568, 15569, 15571, 15572, 15573, 15574, 15575, 15577, 15578, 15579, 15581, 15596, 15597, 15600, 15601, 15603, 15604, 15606, 15609, 15610, 15611, 15612, 15613, 15614, 15615, 15616, 15617, 15621, 15622, 15624, 15625, 15626, 15627, 15630, 15632, 15634, 15635, 15636, 15637, 15638, 15641, 15642, 15643, 15644, 15646, 15648, 15649, 15650, 15651, 15660, 15661, 15662, 15665, 15667, 15668, 15684, 15685, 15687, 15688, 15689, 15690, 15691, 15692, 15698, 15701, 15707, 15711, 15714, 15716, 15718, 15720, 15722, 15726, 15728, 15729, 15731, 15732, 15733, 15734, 15735, 15736, 15737, 15744, 15745, 15746, 15747, 15748, 15749, 15750, 15752, 15753, 15755, 15756, 15757, 15758, 15759, 15760, 15761, 15762, 15763, 15766, 15767, 15770, 15771, 15775, 15776, 15778, 15779, 15780, 15782, 15784, 15803, 15804, 15805, 15806, 15807, 15808, 15809, 15811, 15813, 15814, 15815, 15816, 15817, 15818, 15819, 15820, 15821, 15823, 15825, 15827, 15829, 15831, 15833, 15835, 15837, 15838, 15840, 15843, 15844, 15845, 15847, 15849, 15851, 15853, 15855, 15856, 15858, 15860, 15862, 15863, 15864, 15867, 15869, 15870, 15872, 15875, 15879, 15883, 15884, 15887, 15889, 15891, 15893, 15895, 15896, 15901, 15902, 15903, 15904, 15906, 15909, 15912, 15914, 15915, 15916, 15925, 15926, 15927, 15931, 15935, 15936, 15945, 15949, 15951, 15953, 15954, 15955, 15956, 15960, 15966, 15968, 15970, 15971, 15972, 15975, 15976, 15977, 15979, 15981, 15982, 15985, 15986, 15987, 15988, 15989, 15990, 15992, 15993, 15994, 15995, 15996, 15997, 15998, 16003, 16004, 16005, 16006, 16007, 16008, 16012, 16013, 16015, 16020, 16022, 16023, 16024, 16025, 16026, 16027, 16028, 16029, 16037, 16040, 16042, 16047, 16048, 16055, 16057, 16058, 16060, 16063, 16066, 16067, 16068, 16070, 16071, 16072, 16076, 16077, 16079, 16082, 16083, 16088, 16091, 16093, 16096, 16099, 16100, 16102, 16103, 16105, 16106, 16108, 16112, 16118, 16123, 16125, 16127, 16128, 16129, 16130, 16131, 16132, 16134, 16137, 16139, 16144, 16147, 16149, 16151, 16154, 16155, 16157, 16158, 16160, 16163, 16164, 16165, 16166, 16172, 16175, 16176, 16179, 16180, 16182, 16184, 16192, 16195, 16197, 16199, 16201, 16203, 16204, 16207, 16208, 16209, 16212, 16219, 16220, 16224, 16225, 16226, 16228, 16229, 16233, 16234, 16235, 16236, 16237, 16242, 16246, 16248, 16250, 16252, 16253, 16258, 16260, 16262, 16263, 16264, 16265, 16267, 16268, 16269, 16270, 16275, 16276, 16278, 16279, 16280, 16282, 16283, 16284, 16285, 16286, 16287, 16292, 16293, 16294, 16295, 16297, 16300, 16301, 16302, 16303, 16304, 16305, 16306, 16307, 16308, 16309, 16310, 16311, 16312, 16316, 16317, 16319, 16320, 16323, 16324, 16325, 16326, 16328, 16329, 16331, 16332, 16333, 16335, 16336, 16339, 16340, 16341, 16342, 16343, 16354, 16355, 16362, 16364, 16366, 16368, 16369, 16370, 16371, 16373, 16374, 16375, 16376, 16377, 16378, 16379, 16380, 16382, 16383, 16384, 16385, 16386, 16387, 16389, 16391, 16393, 16396, 16397, 16398, 16401, 16402, 16403, 16404, 16405, 16406, 16409, 16411, 16413, 16414, 16416, 16417, 16418, 16419, 16421, 16422, 16423, 16425, 16426, 16427, 16430, 16432, 16433, 16435, 16437, 16438, 16442, 16444, 16446, 16448, 16449, 16451, 16453, 16454, 16455, 16458, 16459, 16464, 16465, 16468, 16469, 16470, 16471, 16472, 16473, 16474, 16475, 16478, 16479, 16480, 16481, 16482, 16483, 16484, 16485, 16486, 16489, 16490, 16491, 16494, 16495, 16498, 16500, 16502, 16503, 16505, 16506, 16508, 16509, 16510, 16513, 16514, 16515, 16519, 16521, 16522, 16523, 16524, 16525, 16528, 16529, 16530, 16533, 16534, 16535, 16536, 16539, 16540, 16555, 16556, 16559, 16560, 16563, 16564, 16567, 16568, 16577, 16578, 16579, 16580, 16581, 16582, 16583, 16584, 16586, 16589, 16590, 16591, 16593, 16594, 16595, 16598, 16599, 16602, 16603, 16605, 16607, 16608, 16609, 16611, 16612, 16614, 16615, 16616, 16617, 16618, 16620, 16621, 16623, 16624, 16625, 16626, 16628, 16629, 16632, 16637, 16638, 16641, 16642, 16643, 16645, 16646, 16648, 16651, 16652, 16655, 16656, 16657, 16658, 16659, 16660, 16661, 16662, 16664, 16665, 16666, 16667, 16669, 16670, 16673, 16674, 16692, 16693, 16697, 16699, 16700, 16701, 16702, 16703, 16704, 16705, 16706, 16707, 16708, 16710, 16712, 16714, 16715, 16717, 16719, 16720, 16721, 16727, 16728, 16729, 16734, 16735, 16737, 16738, 16742, 16743, 16746, 16747, 16755, 16756, 16757, 16758, 16759, 16761, 16762, 16766, 16767, 16768, 16769, 16770, 16771, 16772, 16773, 16774, 16783, 16786, 16787, 16788, 16789, 16790, 16793, 16794, 16806, 16807, 16808, 16809, 16810, 16811, 16813, 16814, 16815, 16816, 16817, 16818, 16819, 16821, 16822, 16823, 16824, 16825, 16826, 16827, 16828, 16829, 16830, 16831, 16832, 16835, 16836, 16837, 16839, 16842, 16843, 16847, 16848, 16849, 16851, 16852, 16854, 16855, 16858, 16860, 16862, 16863, 16868, 16872, 16873, 16903, 16906, 16908, 16912, 16913, 16917, 16918, 16920, 16921, 16922, 16927, 16928, 16929, 16930, 16931, 16933, 16934, 16935, 16941, 16942, 16947, 16950, 16951, 16952, 16954, 16955, 16956, 16957, 16960, 16961, 16962, 16964, 16966, 16967, 16968, 16969, 16971, 16973, 16974, 16978, 16981, 16982, 16983, 16996, 17008, 17013, 17014, 17015, 17016, 17017, 17018, 17020, 17021, 17023, 17024, 17028, 17030, 17032, 17033, 17035, 17036, 17038, 17039, 17040, 17041, 17042, 17043, 17044, 17046, 17048, 17049, 17050, 17051, 17052, 17053, 17064, 17066, 17067, 17077, 17083, 17084, 17085, 17086, 17087, 17088, 17110, 17111, 17112, 17113, 17115, 17117, 17118, 17119, 17122, 17123, 17137, 17141, 17143, 17144, 17145, 17146, 17147, 17148, 17149, 17150, 17151, 17152, 17153, 17154, 17155, 17156, 17158, 17159, 17161, 17162, 17163, 17164, 17166, 17167, 17168, 17169, 17171, 17173, 17175, 17176, 17177, 17181, 17182, 17183, 17184, 17185, 17186, 17187, 17189, 17190, 17193, 17194, 17195, 17196, 17198, 17199, 17201, 17202, 17203, 17206, 17207, 17208, 17209, 17210, 17212, 17213, 17216, 17217, 17218, 17219, 17221, 17222, 17224, 17225, 17227, 17229, 17232, 17233, 17235, 17243, 17244, 17246, 17247, 17248, 17249, 17250, 17252, 17257, 17258, 17259, 17261, 17263, 17264, 17267, 17272, 17273, 17274, 17276, 17277, 17278, 17279, 17280, 17281, 17285, 17287, 17289, 17290, 17291, 17292, 17295, 17296, 17300, 17301, 17302, 17303, 17304, 17305, 17307, 17309, 17314, 17316, 17317, 17318, 17319, 17320, 17322, 17324, 17329, 17330, 17331, 17332, 17333, 17335, 17336, 17337, 17338, 17342, 17343, 17344, 17345, 17348, 17349, 17352, 17353, 17356, 17357, 17360, 17361, 17364, 17365, 17367, 17370, 17371, 17372, 17373, 17376, 17380, 17384, 17385, 17386, 17387, 17402, 17404, 17405, 17406, 17407, 17409, 17410, 17411, 17413, 17414, 17415, 17416, 17417, 17418, 17422, 17425, 17426, 17429, 17430, 17431, 17432, 17433, 17434, 17437, 17438, 17443, 17444, 17446, 17452, 17453, 17454, 17456, 17459, 17460, 17462, 17463, 17464, 17466, 17467, 17468, 17469, 17470, 17473, 17474, 17477, 17478, 17479, 17481, 17485, 17488, 17490, 17494, 17498, 17502, 17503, 17504, 17505, 17507, 17510, 17511, 17512, 17513, 17516, 17518, 17520, 17521, 17523, 17524, 17527, 17530, 17532, 17536, 17537, 17538, 17539, 17540, 17541, 17542, 17544, 17552, 17553, 17554, 17555, 17556, 17557, 17560, 17565, 17568, 17570, 17572, 17575, 17576, 17578, 17580, 17581, 17583, 17584, 17585, 17586, 17587, 17588, 17589, 17590, 17591, 17592, 17593, 17594, 17595, 17597, 17598, 17599, 17600, 17601, 17602, 17603, 17604, 17605, 17606, 17609, 17610, 17611, 17613, 17615, 17616, 17617, 17619, 17620, 17621, 17622, 17626, 17627, 17628, 17630, 17631, 17632, 17633, 17634, 17635, 17637, 17638, 17639, 17644, 17645, 17648, 17650, 17658, 17659, 17661, 17662, 17663, 17664, 17665, 17668, 17672, 17673, 17675, 17677, 17678, 17679, 17680, 17681, 17682, 17688, 17691, 17699, 17700, 17701, 17702, 17705, 17715, 17719, 17720, 17721, 17722, 17724, 17725, 17726, 17727, 17728, 17730, 17731, 17732, 17733, 17735, 17736, 17737, 17741, 17745, 17747, 17748, 17749, 17750, 17755, 17756, 17757, 17760, 17761, 17762, 17763, 17766, 17767, 17768, 17769, 17771, 17773, 17774, 17777, 17778, 17782, 17783, 17787, 17788, 17789, 17792, 17793, 17801, 17802, 17803, 17804, 17807, 17811, 17816, 17817, 17818, 17821, 17822, 17823, 17824, 17825, 17826, 17827, 17829, 17831, 17833, 17835, 17836, 17837, 17838, 17844, 17845, 17847, 17848, 17851, 17852, 17853, 17854, 17855, 17874, 17875, 17880, 17881, 17883, 17886, 17887, 17891, 17892, 17893, 17896, 17897, 17899, 17900, 17901, 17902, 17903, 17904, 17906, 17908, 17909, 17910, 17911, 17913, 17914, 17915, 17918, 17920, 17921, 17924, 17925, 17928, 17929, 17932, 17933, 17936, 17938, 17939, 17942, 17943, 17949, 17950, 17951, 17954, 17955, 17956, 17957, 17958, 17961, 17962, 17965, 17966, 17970, 17971, 17973, 17974, 17976, 17977, 17978, 17982, 17983, 17985, 17988, 17990, 17991, 17992, 18001, 18002, 18004, 18005, 18006, 18007, 18010, 18011, 18013, 18014, 18015, 18016, 18017, 18020, 18023, 18024, 18025, 18026, 18027, 18031, 18032, 18033, 18034, 18037, 18039, 18040, 18045, 18046, 18047, 18048, 18051, 18053, 18054, 18055, 18056, 18058, 18059, 18064, 18070, 18071, 18072, 18074, 18077, 18078, 18085, 18087, 18091, 18092, 18093, 18096, 18099, 18102, 18103, 18104, 18105, 18107, 18109, 18111, 18114, 18118, 18120, 18122, 18124, 18127, 18128, 18130, 18134, 18136, 18141, 18142, 18144, 18145, 18146, 18150, 18157, 18158, 18159, 18160, 18162, 18165, 18172, 18174, 18175, 18176, 18177, 18179, 18181, 18182, 18183, 18186, 18187, 18188, 18189, 18190, 18192, 18195, 18198, 18199, 18202, 18203, 18204, 18207, 18208, 18210, 18211, 18213, 18214, 18215, 18216, 18218, 18219, 18221, 18222, 18231, 18232, 18235, 18236, 18240, 18241, 18242, 18243, 18246, 18249, 18250, 18251, 18253, 18254, 18255, 18258, 18261, 18263, 18264, 18267, 18268, 18270, 18277, 18278, 18280, 18281, 18282, 18284, 18285, 18286, 18289, 18290, 18291, 18292, 18295, 18296, 18297, 18300, 18301, 18302, 18304, 18306, 18307, 18308, 18311, 18320, 18321, 18322, 18323, 18324, 18325, 18326, 18327, 18328, 18329, 18330, 18333, 18334, 18336, 18338, 18339, 18340, 18341, 18343, 18349, 18350, 18354, 18355, 18356, 18357, 18358, 18368, 18369, 18370, 18371, 18384, 18387, 18388, 18389, 18390, 18393, 18394, 18397, 18398, 18399, 18400, 18401, 18405, 18407, 18408, 18409, 18415, 18418, 18420, 18421, 18422, 18423, 18424, 18425, 18426, 18427, 18428, 18429, 18432, 18435, 18437, 18439, 18443, 18444, 18445, 18446, 18448, 18450, 18454, 18456, 18457, 18459, 18460, 18461, 18462, 18463, 18464, 18473, 18474, 18475, 18476, 18477, 18479, 18481, 18483, 18484, 18487, 18492, 18493, 18495, 18497, 18498, 18500, 18501, 18506, 18507, 18511, 18512, 18513, 18514, 18520, 18522, 18523, 18525, 18526, 18527, 18528, 18529, 18530, 18531, 18532, 18535, 18536, 18538, 18539, 18540, 18542, 18543, 18544, 18545, 18546, 18547, 18549, 18551, 18552, 18553, 18554, 18556, 18557, 18558, 18560, 18561, 18562, 18563, 18566, 18567, 18568, 18569, 18570, 18571, 18572, 18573, 18576, 18577, 18578, 18579, 18580, 18581, 18582, 18583, 18584, 18589, 18590, 18591, 18592, 18593, 18594, 18595, 18599, 18600, 18601, 18602, 18603, 18604, 18607, 18609, 18610, 18611, 18616, 18617, 18620, 18622, 18623, 18626, 18627, 18637, 18638, 18639, 18640, 18641, 18642, 18644, 18646, 18647, 18648, 18649, 18650, 18651, 18653, 18655, 18656, 18658, 18659, 18660, 18661, 18664, 18666, 18667, 18668, 18669, 18670, 18672, 18673, 18674, 18675, 18676, 18679, 18681, 18682, 18683, 18686, 18687, 18688, 18689, 18690, 18691, 18692, 18693, 18694, 18695, 18702, 18703, 18704, 18709, 18712, 18714, 18715, 18717, 18718, 18720, 18722, 18725, 18731, 18732, 18733, 18734, 18735, 18738, 18739, 18740, 18741, 18742, 18743, 18744, 18745, 18746, 18747, 18748, 18749, 18750, 18751, 18752, 18754, 18755, 18756, 18759, 18760, 18761, 18762, 18764, 18765, 18766, 18769, 18771, 18772, 18773, 18776, 18779, 18780, 18783, 18784, 18787, 18788, 18789, 18790, 18792, 18793, 18795, 18797, 18799, 18801, 18803, 18805, 18807, 18809, 18811, 18812, 18814, 18815, 18816, 18822, 18824, 18825, 18826, 18828, 18829, 18835, 18836, 18838, 18841, 18843, 18845, 18847, 18849, 18850, 18851, 18852, 18853, 18854, 18855, 18856, 18857, 18859, 18860, 18861, 18862, 18863, 18864, 18865, 18866, 18868, 18870, 18872, 18874, 18876, 18880, 18881, 18882, 18888, 18889, 18890, 18891, 18892, 18893, 18894, 18895, 18896, 18898, 18899, 18900, 18904, 18906, 18908, 18909, 18911, 18912, 18913, 18914, 18915, 18916, 18921, 18924, 18925, 18927, 18928, 18938, 18940, 18941, 18942, 18943, 18948, 18949, 18950, 18952, 18956, 18959, 18960, 18961, 18962, 18963, 18964, 18965, 18966, 18967, 18970, 18971, 18972, 18973, 18980, 18982, 18984, 18992, 18994, 18995, 18999, 19000, 19001, 19005, 19008, 19013, 19015, 19016, 19017, 19022, 19028, 19035, 19037, 19038, 19041, 19043, 19044, 19045, 19046, 19047, 19049, 19051, 19052, 19053, 19054, 19055, 19056, 19057, 19058, 19059, 19060, 19062, 19064, 19065, 19066, 19069, 19076, 19077, 19078, 19079, 19080, 19081, 19082, 19083, 19084, 19087, 19088, 19089, 19092, 19094, 19095, 19099, 19102, 19103, 19104, 19105, 19108, 19111, 19117, 19118, 19123, 19124, 19127, 19128, 19129, 19130, 19131, 19132, 19134, 19135, 19136, 19141, 19142, 19143, 19144, 19145, 19148, 19149, 19150, 19151, 19152, 19153, 19154, 19156, 19157, 19158, 19159, 19160, 19162, 19167, 19168, 19170, 19172, 19174, 19176, 19178, 19180, 19182, 19184, 19186, 19188, 19192, 19194, 19197, 19198, 19202, 19203, 19205, 19206, 19208, 19209, 19211, 19212, 19213, 19214, 19216, 19222, 19224, 19226, 19228, 19231, 19232, 19233, 19234, 19235, 19236, 19237, 19238, 19239, 19244, 19246, 19247, 19248, 19253, 19254, 19255, 19256, 19261, 19262, 19263, 19264, 19265, 19266, 19267, 19273, 19274, 19275, 19276, 19277, 19279, 19284, 19294, 19296, 19297, 19305, 19308, 19309, 19312, 19313, 19314, 19317, 19319, 19320, 19321, 19322, 19323, 19326, 19328, 19336, 19337, 19342, 19343, 19344, 19345, 19346, 19349, 19350, 19351, 19353, 19354, 19356, 19358, 19359, 19360, 19361, 19362, 19363, 19364, 19368, 19372, 19374, 19382, 19384, 19385, 19386, 19388, 19390, 19392, 19394, 19396, 19398, 19402, 19409, 19411, 19412, 19415, 19417, 19418, 19419, 19423, 19426, 19427, 19429, 19430, 19432, 19433, 19434, 19437, 19439, 19440, 19445, 19446, 19447, 19448, 19449, 19452, 19453, 19459, 19460, 19463, 19468, 19469, 19470, 19472, 19474, 19476, 19481, 19485, 19486, 19489, 19490, 19492, 19495, 19496, 19497, 19499, 19502, 19503, 19505, 19507, 19509, 19513, 19514, 19515, 19516, 19520, 19521, 19522, 19523, 19524, 19532, 19533, 19536, 19538, 19539, 19541, 19542, 19543, 19544, 19546, 19547, 19548, 19549, 19550, 19551, 19552, 19553, 19555, 19556, 19557, 19558, 19559, 19560, 19561, 19562, 19563, 19564, 19565, 19566, 19567, 19568, 19569, 19575, 19576, 19577, 19578, 19579, 19580, 19581, 19582, 19583, 19584, 19585, 19591, 19595, 19597, 19599, 19601, 19602, 19612, 19614, 19615, 19617, 19619, 19620, 19622, 19623, 19624, 19625, 19626, 19627, 19628, 19629, 19630, 19631, 19632, 19633, 19635, 19636, 19637, 19638, 19639, 19641, 19642, 19643, 19644, 19645, 19646, 19647, 19648, 19649, 19650, 19651, 19652, 19653, 19654, 19655, 19656, 19657, 19661, 19666, 19668, 19671, 19675, 19676, 19679, 19680, 19683, 19684, 19686, 19692, 19693, 19697, 19698, 19699, 19703, 19706, 19707, 19708, 19710, 19711, 19712, 19715, 19720, 19721, 19722, 19723, 19725, 19737, 19738, 19739, 19740, 19744, 19745, 19746, 19747, 19748, 19749, 19750, 19751, 19752, 19753, 19755, 19756, 19762, 19765, 19772, 19773, 19774, 19778, 19780, 19782, 19787, 19789, 19791, 19795, 19797, 19798, 19799, 19800, 19801, 19802, 19805, 19807, 19808, 19813, 19814, 19815, 19817, 19821, 19822, 19824, 19825, 19827, 19829, 19831, 19833, 19835, 19837, 19840, 19841, 19842, 19843, 19845, 19847, 19848, 19849, 19851, 19854, 19871, 19872, 19873, 19877, 19878, 19885, 19886, 19889, 19890, 19894, 19895, 19896, 19899, 19900, 19903, 19904, 19905, 19906, 19907, 19908, 19909, 19914, 19915, 19918, 19920, 19921, 19922, 19923, 19924, 19925, 19926, 19927, 19928, 19929, 19930, 19931, 19932, 19933, 19934, 19935, 19936, 19937, 19938, 19939, 19940, 19941, 19942, 19945, 19946, 19949, 19950, 19953, 19954, 19955, 19956, 19957, 19958, 19959, 19960, 19964, 19965, 19966, 19970, 19977, 19978, 19981, 19982, 19983, 19989, 19990, 19991, 19993, 20000, 20002, 20003, 20004, 20005, 20016, 20017, 20018, 20019, 20020, 20023, 20028, 20031, 20032, 20033, 20036, 20040, 20041, 20043, 20044, 20045, 20046, 20047, 20050, 20051, 20052, 20054, 20055, 20056, 20057, 20060, 20063, 20065, 20068, 20070, 20071, 20072, 20073, 20074, 20075, 20077, 20078, 20081, 20082, 20085, 20086, 20091, 20092, 20095, 20096, 20100, 20105, 20106, 20110, 20111, 20113, 20114, 20117, 20121, 20122, 20124, 20125, 20127, 20128, 20129, 20130, 20131, 20132, 20133, 20134, 20136, 20140, 20141, 20145, 20147, 20150, 20155, 20156, 20157, 20158, 20160, 20161, 20163, 20164, 20165, 20166, 20167, 20168, 20171, 20172, 20173, 20174, 20175, 20177, 20178, 20179, 20182, 20185, 20186, 20187, 20188, 20191, 20192, 20193, 20194, 20195, 20196, 20197, 20198, 20199, 20200, 20201, 20203, 20204, 20205, 20207, 20208, 20209, 20216, 20217, 20218, 20219, 20221, 20225, 20228, 20233, 20234, 20235, 20236, 20240, 20241, 20243, 20244, 20251, 20252, 20254, 20255, 20258, 20262, 20266, 20268, 20269, 20275, 20277, 20279, 20280, 20283, 20284, 20285, 20287, 20288, 20289, 20290, 20291, 20295, 20296, 20301, 20302, 20303, 20304, 20310, 20311, 20312, 20313, 20315, 20317, 20318, 20319, 20321, 20325, 20326, 20328, 20330, 20331, 20333, 20334, 20335, 20336, 20337, 20338, 20339, 20340, 20341, 20342, 20343, 20350, 20351, 20352, 20353, 20354, 20355, 20356, 20357, 20358, 20360, 20361, 20362, 20363, 20367, 20368, 20369, 20372, 20373, 20374, 20377, 20380, 20381, 20382, 20383, 20386, 20388, 20393, 20394, 20395, 20397, 20398, 20416, 20418, 20419, 20421, 20422, 20423, 20425, 20426, 20427, 20428, 20429, 20434, 20435, 20436, 20437, 20438, 20439, 20440, 20441, 20442, 20443, 20444, 20447, 20448, 20449, 20450, 20451, 20453, 20455, 20457, 20458, 20459, 20461, 20462, 20463, 20464, 20465, 20466, 20467, 20468, 20470, 20472, 20474, 20475, 20478, 20479, 20480, 20481, 20483, 20484, 20487, 20488, 20489, 20490, 20493, 20494, 20499, 20500, 20501, 20502, 20507, 20508, 20509, 20510, 20511, 20512, 20513, 20514, 20515, 20518, 20523, 20524, 20525, 20526, 20527, 20528, 20529, 20532, 20533, 20534, 20536, 20537, 20543, 20545, 20548, 20550, 20551, 20557, 20559, 20561, 20562, 20564, 20565, 20566, 20567, 20568, 20569, 20578, 20580, 20582, 20585, 20590, 20597, 20607, 20610, 20612, 20613, 20615, 20618, 20619, 20620, 20621, 20623, 20624, 20625, 20626, 20627, 20631, 20633, 20635, 20636, 20637, 20638, 20639, 20640, 20643, 20644, 20646, 20647, 20648, 20649, 20651, 20654, 20655, 20657, 20660, 20661, 20662, 20663, 20665, 20666, 20668, 20670, 20671, 20674, 20676, 20677, 20678, 20679, 20680, 20681, 20692, 20694, 20695, 20699, 20703, 20704, 20707, 20708, 20711, 20712, 20713, 20716, 20717, 20720, 20721, 20726, 20731, 20732, 20733, 20734, 20735, 20736, 20737, 20739, 20741, 20742, 20743, 20744, 20751, 20752, 20753, 20756, 20757, 20758, 20759, 20761, 20762, 20765, 20767, 20772, 20773, 20774, 20776, 20777, 20778, 20779, 20780, 20781, 20783, 20784, 20785, 20786, 20787, 20788, 20789, 20791, 20792, 20793, 20794, 20795, 20798, 20799, 20800, 20802, 20803, 20805, 20807, 20813, 20822, 20823, 20824, 20825, 20836, 20852, 20856, 20865, 20867, 20868, 20871, 20876, 20878, 20879, 20890, 20891, 20892, 20893, 20895, 20896, 20897, 20898, 20899, 20904, 20906, 20907, 20913, 20915, 20916, 20918, 20921, 20924, 20925, 20926, 20927, 20928, 20929, 20930, 20933, 20935, 20936, 20938, 20939, 20940, 20941, 20943, 20945, 20946, 20949, 20950, 20952, 20953, 20954, 20958, 20961, 20962, 20965, 20966, 20967, 20968, 20969, 20970, 20972, 20975, 20976, 20978, 20983, 20984, 20985, 20986, 20987, 20988, 20989, 20990, 20991, 20993, 20995, 21002, 21004, 21005, 21007, 21008, 21009, 21010, 21011, 21015, 21016, 21017, 21018, 21019, 21020, 21021, 21023, 21024, 21025, 21026, 21027, 21028, 21029, 21030, 21031, 21033, 21034, 21035, 21036, 21037, 21038, 21039, 21044, 21045, 21046, 21051, 21053, 21054, 21055, 21056, 21057, 21058, 21059, 21060, 21061, 21065, 21066, 21067, 21069, 21078, 21080, 21081, 21082, 21083, 21086, 21088, 21090, 21092, 21093, 21094, 21096, 21097, 21098, 21099, 21101, 21102, 21103, 21105, 21106, 21107, 21108, 21109, 21110, 21111, 21112, 21113, 21115, 21116, 21117, 21118, 21120, 21121, 21122, 21123, 21127, 21129, 21132, 21134, 21135, 21137, 21139, 21142, 21143, 21144, 21151, 21153, 21154, 21159, 21160, 21161, 21165, 21166, 21169, 21174, 21176, 21177, 21179, 21182, 21184, 21185, 21188, 21189, 21191, 21194, 21195, 21196, 21197, 21198, 21199, 21200, 21201, 21202, 21203, 21204, 21205, 21206, 21212, 21215, 21217, 21220, 21221, 21227, 21228, 21229, 21230, 21233, 21236, 21239, 21245, 21253, 21254, 21256, 21259, 21262, 21264, 21265, 21266, 21267, 21269, 21272, 21273, 21274, 21275, 21276, 21277, 21278, 21279, 21280, 21281, 21283, 21284, 21285, 21286, 21287, 21288, 21289, 21290, 21291, 21292, 21294, 21295, 21299, 21302, 21308, 21309, 21312, 21313, 21316, 21318, 21322, 21323, 21327, 21329, 21331, 21333, 21334, 21337, 21341, 21342, 21344, 21345, 21346, 21347, 21348, 21350, 21351, 21353, 21354, 21357, 21358, 21359, 21361, 21363, 21364, 21365, 21366, 21367, 21368, 21369, 21370, 21372, 21373, 21374, 21375, 21376, 21377, 21378, 21379, 21380, 21383, 21384, 21385, 21386, 21387, 21388, 21389, 21393, 21395, 21398, 21400, 21402, 21403, 21404, 21405, 21406, 21407, 21408, 21409, 21410, 21411, 21413, 21414, 21416, 21417, 21418, 21421, 21422, 21424, 21426, 21428, 21432, 21433, 21438, 21440, 21441, 21442, 21443, 21445, 21447, 21448, 21459, 21461, 21462, 21463, 21466, 21467, 21468, 21469, 21471, 21472, 21475, 21476, 21478, 21483, 21484, 21488, 21489, 21490, 21491, 21493, 21496, 21497, 21499, 21500, 21501, 21504, 21505, 21506, 21507, 21509, 21513, 21515, 21516, 21519, 21526, 21528, 21529, 21530, 21531, 21532, 21535, 21536, 21537, 21538, 21539, 21543, 21544, 21546, 21547, 21549, 21550, 21551, 21552, 21553, 21554, 21555, 21556, 21557, 21560, 21561, 21562, 21563, 21564, 21565, 21568, 21569, 21572, 21573, 21574, 21575, 21576, 21586, 21588, 21589, 21591, 21592, 21593, 21594, 21595, 21596, 21597, 21598, 21599, 21600, 21601, 21602, 21605, 21606, 21607, 21608, 21609, 21610, 21611, 21612, 21613, 21614, 21615, 21617, 21618, 21620, 21622, 21623, 21624, 21625, 21626, 21627, 21630, 21631, 21632, 21633, 21634, 21637, 21638, 21639, 21640, 21641, 21642, 21643, 21644, 21646, 21648, 21649, 21651, 21652, 21653, 21654, 21657, 21658, 21659, 21661, 21662, 21663, 21664, 21665, 21666, 21668, 21670, 21672, 21673, 21675, 21677, 21679, 21682, 21684, 21685, 21687, 21688, 21689, 21690, 21692, 21693, 21694, 21695, 21696, 21697, 21698, 21699, 21700, 21702, 21703, 21706, 21707, 21708, 21709, 21711, 21713, 21715, 21716, 21718, 21719, 21723, 21724, 21725, 21726, 21727, 21728, 21729, 21737, 21738, 21739, 21742, 21744, 21748, 21749, 21750, 21752, 21753, 21754, 21755, 21756, 21757, 21758, 21759, 21760, 21762, 21764, 21767, 21768, 21769, 21770, 21774, 21777, 21779, 21780, 21782, 21784, 21785, 21786, 21787, 21794, 21795, 21797, 21798, 21801, 21802, 21805, 21806, 21807, 21810, 21811, 21814, 21816, 21820, 21823, 21824, 21826, 21827, 21833, 21835, 21839, 21841, 21844, 21845, 21846, 21847, 21851, 21853, 21854, 21855, 21859, 21861, 21863, 21865, 21867, 21869, 21870, 21872, 21875, 21877, 21879, 21881, 21882, 21885, 21886, 21889, 21891, 21892, 21893, 21894, 21897, 21898, 21899, 21902, 21903, 21911, 21913, 21914, 21915, 21916, 21917, 21918, 21919, 21920, 21921, 21922, 21926, 21927, 21929, 21931, 21932, 21933, 21934, 21935, 21937, 21938, 21940, 21941, 21943, 21945, 21947, 21948, 21951, 21952, 21953, 21954, 21956, 21957, 21958, 21959, 21961, 21963, 21965, 21966, 21967, 21968, 21970, 21976, 21982, 21983, 21984, 21985, 21986, 21987, 21988, 21989, 21990, 21991, 21992, 21993, 21994, 21995, 21997, 21998, 22002, 22003, 22004, 22005, 22006, 22007, 22010, 22012, 22013, 22015, 22018, 22021, 22022, 22023, 22024, 22025, 22026, 22027, 22030, 22032, 22033, 22034, 22036, 22038, 22040, 22041, 22042, 22043, 22044, 22046, 22048, 22049, 22050, 22051, 22053, 22054, 22055, 22056, 22059, 22060, 22061, 22062, 22063, 22064, 22065, 22066, 22068, 22069, 22070, 22071, 22072, 22073, 22074, 22075, 22076, 22077, 22078, 22079, 22080, 22081, 22082, 22083, 22084, 22085, 22086, 22087, 22088, 22089, 22090, 22091, 22094, 22096, 22098, 22100, 22103, 22105, 22107, 22108, 22109, 22111, 22113, 22114, 22115, 22116, 22117, 22118, 22126, 22128, 22133, 22134, 22136, 22137, 22138, 22139, 22140, 22143, 22144, 22145, 22146, 22147, 22148, 22149, 22150, 22154, 22155, 22156, 22157, 22158, 22159, 22160, 22161, 22162, 22163, 22164, 22166, 22169, 22170, 22171, 22172, 22174, 22176, 22177, 22178, 22179, 22180, 22182, 22183, 22184, 22186, 22189, 22191, 22192, 22193, 22194, 22195, 22196, 22197, 22199, 22200, 22201, 22202, 22203, 22205, 22207, 22208, 22209, 22211, 22212, 22213, 22214, 22215, 22216, 22217, 22218, 22219, 22221, 22223, 22225, 22227, 22228, 22229, 22232, 22233, 22234, 22235, 22238, 22239, 22240, 22241, 22243, 22244, 22247, 22248, 22251, 22258, 22259, 22260, 22261, 22262, 22263, 22264, 22265, 22266, 22267, 22268, 22269, 22270, 22271, 22272, 22273, 22274, 22275, 22276, 22277, 22278, 22279, 22280, 22281, 22282, 22283, 22284, 22285, 22286, 22287, 22288, 22289, 22290, 22291, 22292, 22293, 22294, 22295, 22296, 22297, 22298, 22299, 22301, 22302, 22303, 22304, 22305, 22306, 22307, 22308, 22309, 22310, 22311, 22312, 22313, 22314, 22315, 22316, 22322, 22323, 22324, 22325, 22326, 22327, 22329, 22330, 22332, 22333, 22334, 22337, 22338, 22339, 22340, 22342, 22343, 22344, 22345, 22346, 22347, 22348, 22350, 22351, 22352, 22353, 22354, 22355, 22357, 22358, 22361, 22363, 22365, 22367, 22369, 22371, 22373, 22375, 22377, 22379, 22381, 22384, 22386, 22387, 22390, 22391, 22392, 22394, 22395, 22396, 22397, 22398, 22399, 22400, 22401, 22404, 22405, 22406, 22410, 22411, 22412, 22413, 22417, 22419, 22420, 22423, 22424, 22425, 22426, 22430, 22433, 22435, 22436, 22437, 22440, 22441, 22442, 22443, 22444, 22445, 22446, 22447, 22449, 22450, 22451, 22453, 22454, 22455, 22461, 22462, 22463, 22464, 22465, 22466, 22467, 22475, 22479, 22480, 22486, 22487, 22488, 22489, 22490, 22491, 22492, 22493, 22494, 22495, 22497, 22498, 22501, 22502, 22505, 22507, 22508, 22509, 22510, 22513, 22514, 22516, 22520, 22521, 22525, 22526, 22527, 22528, 22530, 22531, 22532, 22533, 22534, 22535, 22536, 22537, 22538, 22539, 22540, 22541, 22542, 22543, 22544, 22545, 22547, 22549, 22550, 22551, 22553, 22554, 22556, 22566, 22567, 22568, 22569, 22570, 22571, 22572, 22573, 22574, 22575, 22576, 22577, 22578, 22580, 22581, 22582, 22583, 22584, 22585, 22586, 22592, 22593, 22595, 22598, 22599, 22603, 22604, 22605, 22607, 22610, 22611, 22614, 22617, 22622, 22623, 22624, 22626, 22627, 22628, 22629, 22630, 22631, 22632, 22634, 22635, 22638, 22642, 22645, 22647, 22648, 22649, 22650, 22651, 22652, 22657, 22659, 22661, 22662, 22663, 22664, 22667, 22668, 22676, 22677, 22678, 22680, 22682, 22684, 22686, 22688, 22690, 22692, 22694, 22696, 22698, 22703, 22704, 22705, 22706, 22708, 22709, 22710, 22711, 22713, 22714, 22716, 22718, 22722, 22723, 22724, 22725, 22727, 22732, 22735, 22736, 22739, 22743, 22744, 22745, 22746, 22747, 22749, 22752, 22753, 22754, 22757, 22758, 22759, 22760, 22761, 22762, 22763, 22764, 22765, 22770, 22771, 22772, 22774, 22782, 22783, 22784, 22785, 22786, 22787, 22788, 22789, 22792, 22793, 22794, 22795, 22796, 22797, 22798, 22799, 22800, 22801, 22802, 22803, 22805, 22806, 22808, 22811, 22812, 22816, 22817, 22818, 22819, 22820, 22824, 22825, 22832, 22833, 22834, 22837, 22839, 22843, 22844, 22845, 22846, 22848, 22849, 22852, 22856, 22857, 22858, 22859, 22861, 22874, 22875, 22876, 22877, 22879, 22880, 22882, 22883, 22884, 22885, 22886, 22887, 22888, 22889, 22891, 22892, 22893, 22894, 22895, 22896, 22899, 22902, 22905, 22906, 22907, 22908, 22909, 22911, 22912, 22913, 22914, 22919, 22920, 22921, 22922, 22923, 22924, 22925, 22928, 22929, 22930, 22931, 22932, 22933, 22934, 22942, 22943, 22944, 22945, 22946, 22947, 22948, 22949, 22950, 22951, 22952, 22953, 22956, 22958, 22960, 22961, 22962, 22963, 22964, 22967, 22968, 22969, 22970, 22972, 22974, 22976, 22977, 22978, 22979, 22982, 22983, 22984, 22985, 22994, 22995, 22996, 22997, 22998, 22999, 23003, 23004, 23005, 23006, 23007, 23008, 23009, 23010, 23011, 23012, 23013, 23014, 23015, 23017, 23019, 23022, 23023, 23024, 23026, 23027, 23028, 23029, 23030, 23031, 23032, 23033, 23034, 23037, 23038, 23039, 23040, 23041, 23042, 23043, 23044, 23045, 23046, 23047, 23048, 23049, 23052, 23054, 23055, 23056, 23059, 23061, 23063, 23064, 23066, 23068, 23069, 23072, 23073, 23074, 23076, 23077, 23078, 23081, 23082, 23084, 23087, 23090, 23091, 23094, 23097, 23103, 23104, 23105, 23106, 23107, 23108, 23113, 23115, 23116, 23117, 23118, 23119, 23120, 23123, 23124, 23125, 23127, 23128, 23131, 23132, 23133, 23134, 23145, 23147, 23149, 23150, 23151, 23153, 23154, 23156, 23157, 23158, 23159, 23161, 23164, 23167, 23170, 23171, 23172, 23173, 23176, 23179, 23180, 23181, 23182, 23185, 23187, 23188, 23189, 23190, 23191, 23192, 23193, 23194, 23195, 23197, 23198, 23200, 23201, 23202, 23203, 23206, 23208, 23209, 23210, 23212, 23213, 23214, 23215, 23216, 23217, 23218, 23219, 23221, 23222, 23223, 23224, 23227, 23228, 23230, 23231, 23232, 23233, 23235, 23236, 23238, 23242, 23245, 23246, 23247, 23249, 23250, 23252, 23253, 23254, 23256, 23262, 23263, 23264, 23266, 23267, 23270, 23273, 23275, 23276, 23277, 23279, 23280, 23283, 23284, 23285, 23286, 23287, 23288, 23290, 23291, 23294, 23297, 23301, 23305, 23309, 23312, 23317, 23318, 23319, 23320, 23321, 23322, 23323, 23324, 23326, 23331, 23332, 23335, 23336, 23337, 23338, 23339, 23340, 23341, 23342, 23344, 23345, 23346, 23347, 23350, 23351, 23352, 23353, 23356, 23357, 23359, 23360, 23362, 23364, 23366, 23367, 23373, 23374, 23378, 23381, 23383, 23384, 23385, 23386, 23387, 23389, 23390, 23392, 23394, 23397, 23400, 23402, 23405, 23409, 23410, 23412, 23414, 23415, 23416, 23417, 23418, 23419, 23420, 23421, 23424, 23425, 23426, 23427, 23429, 23430, 23432, 23433, 23434, 23435, 23436, 23437, 23438, 23439, 23440, 23441, 23442, 23443, 23444, 23445, 23447, 23449, 23450, 23451, 23453, 23454, 23455, 23456, 23457, 23459, 23460, 23461, 23462, 23463, 23464, 23465, 23466, 23467, 23468, 23471, 23477, 23478, 23479, 23487, 23488, 23489, 23490, 23491, 23492, 23493, 23494, 23496, 23497, 23498, 23499, 23500, 23502, 23508, 23509, 23510, 23511, 23512, 23525, 23526, 23529, 23530, 23533, 23536, 23539, 23542, 23545, 23548, 23549, 23551, 23553, 23554, 23555, 23557, 23558, 23559, 23561, 23562, 23563, 23564, 23565, 23566, 23567, 23568, 23571, 23572, 23573, 23577, 23578, 23587, 23590, 23592, 23593, 23596, 23597, 23642, 23643, 23645, 23648, 23649, 23650, 23653, 23655, 23659, 23662, 23663, 23665, 23667, 23668, 23671, 23672, 23677, 23678, 23682, 23683, 23685, 23687, 23688, 23690, 23691, 23694, 23695, 23701, 23703, 23704, 23705, 23706, 23712, 23714, 23715, 23716, 23721, 23723, 23724, 23726, 23727, 23731, 23733, 23734, 23735, 23740, 23743, 23749, 23757, 23759, 23762, 23763, 23764, 23766, 23768, 23769, 23770, 23772, 23773, 23774, 23775, 23776, 23777, 23779, 23782, 23783, 23784, 23788, 23789, 23790, 23791, 23792, 23793, 23795, 23796, 23797, 23798, 23799, 23800, 23806, 23807, 23808, 23809, 23810, 23812, 23813, 23815, 23816, 23819, 23820, 23824, 23825, 23826, 23827, 23828, 23831, 23832, 23834, 23836, 23837, 23838, 23839, 23840, 23844, 23845, 23846, 23855, 23857, 23859, 23862, 23864, 23865, 23866, 23867, 23869, 23871, 23872, 23874, 23875, 23876, 23877, 23878, 23880, 23881, 23882, 23883, 23885, 23887, 23889, 23892, 23893, 23894, 23896, 23898, 23900, 23903, 23904, 23905, 23906, 23907, 23908, 23911, 23919, 23920, 23922, 23923, 23924, 23925, 23926, 23927, 23928, 23932, 23933, 23937, 23942, 23943, 23951, 23952, 23953, 23957, 23961, 23963, 23965, 23966, 23968, 23969, 23971, 23972, 23974, 23977, 23978, 23979, 23982, 23984, 23987, 23988, 23989, 23994, 23995, 23996, 23999, 24003, 24007, 24008, 24010, 24011, 24012, 24015, 24016, 24017, 24020, 24022, 24023, 24025, 24027, 24028, 24029, 24032, 24035, 24036, 24037, 24038, 24039, 24040, 24041, 24042, 24044, 24045, 24046, 24047, 24048, 24051, 24052, 24053, 24054, 24055, 24056, 24057, 24059, 24061, 24063, 24065, 24068, 24069, 24070, 24073, 24074, 24079, 24080, 24081, 24084, 24085, 24086, 24087, 24088, 24090, 24091, 24092, 24094, 24096, 24097, 24098, 24099, 24100, 24101, 24102, 24110, 24124, 24125, 24126, 24128, 24129, 24130, 24131, 24132, 24133, 24134, 24136, 24145, 24146, 24147, 24148, 24150, 24152, 24153, 24154, 24155, 24156, 24157, 24158, 24161, 24162, 24163, 24164, 24170, 24171, 24172, 24178, 24180, 24181, 24182, 24183, 24184, 24185, 24186, 24188, 24189, 24191, 24195, 24197, 24200, 24201, 24206, 24207, 24208, 24209, 24213, 24214, 24217, 24218, 24219, 24220, 24221, 24222, 24223, 24224, 24225, 24228, 24229, 24231, 24235, 24238, 24239, 24241, 24243, 24244, 24245, 24246, 24247, 24248, 24252, 24254, 24255, 24257, 24259, 24262, 24264, 24265, 24266, 24267, 24268, 24269, 24272, 24275, 24277, 24278, 24279, 24280, 24281, 24282, 24284, 24287, 24288, 24289, 24291, 24293, 24295, 24297, 24301, 24302, 24303, 24305, 24306, 24309, 24311, 24312, 24314, 24316, 24319, 24320, 24322, 24325, 24328, 24329, 24330, 24332, 24333, 24334, 24335, 24336, 24337, 24338, 24339, 24344, 24345, 24346, 24347, 24348, 24350, 24351, 24352, 24353, 24354, 24356, 24358, 24359, 24360, 24361, 24362, 24364, 24365, 24366, 24367, 24369, 24370, 24373, 24374, 24375, 24376, 24379, 24380, 24381, 24382, 24383, 24384, 24385, 24386, 24387, 24388, 24389, 24390, 24391, 24394, 24395, 24396, 24399, 24400, 24401, 24402, 24408, 24409, 24410, 24411, 24412, 24415, 24416, 24417, 24418, 24419, 24420, 24421, 24422, 24423, 24424, 24425, 24426, 24427, 24428, 24429, 24430, 24431, 24432, 24433, 24434, 24435, 24436, 24437, 24438, 24439, 24440, 24441, 24443, 24444, 24445, 24446, 24447, 24448, 24449, 24450, 24451, 24452, 24454, 24458, 24459, 24460, 24463, 24464, 24475, 24476, 24480, 24481, 24482, 24483, 24484, 24487, 24488, 24489, 24491, 24492, 24496, 24498, 24500, 24502, 24503, 24505, 24508, 24509, 24510, 24511, 24512, 24513, 24514, 24515, 24516, 24517, 24518, 24530, 24531, 24532, 24534, 24535, 24536, 24537, 24538, 24541, 24543, 24544, 24545, 24549, 24551, 24553, 24556, 24560, 24561, 24562, 24563, 24568, 24570, 24571, 24572, 24573, 24574, 24575, 24577, 24578, 24580, 24583, 24584, 24585, 24587, 24588, 24589, 24591, 24592, 24593, 24596, 24597, 24598, 24599, 24600, 24601, 24602, 24603, 24604, 24605, 24606, 24607, 24609, 24610, 24611, 24617, 24618, 24619, 24621, 24623, 24624, 24625, 24626, 24631, 24632, 24633, 24636, 24639, 24640, 24641, 24642, 24643, 24644, 24645, 24646, 24647, 24648, 24649, 24650, 24652, 24654, 24655, 24656, 24657, 24658, 24659, 24660, 24661, 24662, 24663, 24666, 24667, 24669, 24670, 24671, 24672, 24673, 24675, 24676, 24677, 24679, 24680, 24681, 24682, 24685, 24686, 24687, 24689, 24690, 24691, 24692, 24695, 24696, 24700, 24701, 24703, 24704, 24706, 24708, 24713, 24716, 24717, 24718, 24726, 24728, 24730, 24731, 24732, 24735, 24738, 24746, 24747, 24748, 24754, 24755, 24759, 24760, 24761, 24763, 24764, 24766, 24767, 24768, 24769, 24771, 24773, 24775, 24777, 24779, 24783, 24785, 24787, 24789, 24791, 24793, 24797, 24799, 24800, 24801, 24802, 24804, 24805, 24806, 24809, 24810, 24811, 24817, 24818, 24819, 24820, 24823, 24830, 24834, 24835, 24836, 24837, 24838, 24839, 24840, 24841, 24842, 24843, 24844, 24845, 24846, 24847, 24848, 24849, 24850, 24851, 24852, 24853, 24854, 24855, 24856, 24857, 24858, 24859, 24863, 24867, 24870, 24871, 24872, 24873, 24874, 24875, 24878, 24879, 24880, 24881, 24885, 24887, 24888, 24891, 24893, 24894, 24899, 24900, 24903, 24904, 24911, 24912, 24913, 24917, 24924, 24937, 24938, 24941, 24942, 24949, 24951, 24953, 24954, 24957, 24958, 24959, 24967, 24968, 24969, 24970, 24971, 24972, 24973, 24974, 24976, 25002, 25006, 25010, 25011, 25012, 25016, 25020, 25021, 25022, 25023, 25025, 25027, 25029, 25032, 25033, 25034, 25035, 25036, 25037, 25038, 25039, 25040, 25041, 25042, 25055, 25057, 25058, 25059, 25061, 25062, 25063, 25064, 25065, 25066, 25067, 25068, 25069, 25070, 25072, 25073, 25074, 25077, 25078, 25079, 25080, 25088, 25095, 25096, 25097, 25098, 25102, 25113, 25114, 25117, 25118, 25122, 25123, 25124, 25125, 25128, 25131, 25132, 25133, 25134, 25135, 25137, 25140, 25141, 25145, 25149, 25150, 25151, 25155, 25157, 25158, 25160, 25165, 25166, 25168, 25169, 25171, 25172, 25173, 25175, 25180, 25181, 25182, 25183, 25184, 25187, 25188, 25189, 25190, 25191, 25192, 25195, 25196, 25197, 25198, 25200, 25204, 25205, 25207, 25212, 25213, 25216, 25217, 25218, 25219, 25222, 25225, 25226, 25229, 25230, 25231, 25232, 25237, 25239, 25240, 25241, 25242, 25243, 25244, 25245, 25246, 25248, 25251, 25252, 25253, 25254, 25255, 25257, 25259, 25260, 25261, 25262, 25263, 25269, 25270, 25272, 25273, 25275, 25276, 25293, 25295, 25297, 25299, 25300, 25302, 25303, 25304, 25308, 25310, 25316, 25319, 25320, 25321, 25322, 25325, 25335, 25336, 25337, 25338, 25339, 25342, 25344, 25345, 25346, 25348, 25349, 25350, 25351, 25354, 25356, 25357, 25358, 25359, 25364, 25365, 25366, 25367, 25373, 25374, 25375, 25395, 25400, 25413, 25414, 25415, 25416, 25417, 25418, 25419, 25420, 25421, 25422, 25423, 25424, 25425, 25426, 25427, 25428, 25429, 25430, 25442, 25444, 25446, 25447, 25448, 25454, 25455, 25459, 25461, 25464, 25465, 25468, 25469, 25470, 25471, 25474, 25476, 25477, 25479, 25481, 25482, 25483, 25484, 25485, 25486, 25487, 25489, 25490, 25491, 25493, 25494, 25495, 25496, 25497, 25498, 25500, 25502, 25503, 25504, 25507, 25508, 25510, 25513, 25514, 25515, 25516, 25519, 25520, 25521, 25522, 25524, 25525, 25529, 25530, 25531, 25532, 25533, 25534, 25535, 25536, 25541, 25545, 25546, 25558, 25559, 25560, 25561, 25566, 25567, 25568, 25569, 25575, 25576, 25577, 25578, 25580, 25582, 25584, 25586, 25588, 25589, 25590, 25595, 25596, 25597, 25601, 25604, 25606, 25609, 25610, 25611, 25612, 25613, 25614, 25615, 25617, 25618, 25623, 25624, 25631, 25632, 25633, 25641, 25642, 25643, 25644, 25646, 25650, 25651, 25652, 25653, 25656, 25659, 25660, 25661, 25662, 25663, 25665, 25667, 25668, 25670, 25671, 25673, 25677, 25684, 25686, 25689, 25690, 25691, 25694, 25698, 25699, 25700, 25701, 25702, 25705, 25706, 25709, 25712, 25714, 25715, 25716, 25719, 25722, 25725, 25726, 25729, 25732, 25734, 25738, 25739, 25740, 25741, 25743, 25746, 25747, 25748, 25750, 25751, 25752, 25754, 25755, 25756, 25757, 25758, 25759, 25760, 25761, 25762, 25765, 25767, 25768, 25769, 25770, 25772, 25773, 25774, 25775, 25781, 25782, 25783, 25784, 25786, 25787, 25788, 25789, 25790, 25792, 25793, 25794, 25795, 25802, 25806, 25808, 25837, 25838, 25839, 25841, 25842, 25843, 25844, 25845, 25846, 25847, 25848, 25850, 25851, 25863, 25865, 25876, 25877, 25882, 25885, 25886, 25890, 25891, 25892, 25893, 25894, 25895, 25897, 25899, 25900, 25901, 25902, 25903, 25905, 25906, 25907, 25908, 25909, 25910, 25911, 25912, 25916, 25917, 25919, 25920, 25921, 25923, 25924, 25926, 25927, 25928, 25932, 25934, 25936, 25940, 25943, 25950, 25951, 25952, 25953, 25954, 25956, 25957, 25961, 25962, 25963, 25964, 25965, 25966, 25967, 25968, 25969, 25970, 25972, 25973, 25974, 25975, 25976, 25977, 25978, 25979, 25980, 25981, 25986, 25987, 25988, 25989, 25990, 25991, 25992, 25993, 25994, 25995, 25997, 25998, 25999, 26000, 26001, 26054, 26057, 26058, 26059, 26060, 26061, 26062, 26065, 26066, 26067, 26068, 26071, 26072, 26075, 26078, 26090, 26091, 26092, 26093, 26094, 26098, 26099, 26100, 26104, 26105, 26106, 26107, 26108, 26109, 26110, 26111, 26112, 26115, 26116, 26117, 26118, 26119, 26121, 26122, 26126, 26127, 26138, 26166, 26167, 26170, 26171, 26178, 26179, 26185, 26187, 26189, 26190, 26193, 26194, 26195, 26197, 26200, 26201, 26202, 26203, 26209, 26210, 26212, 26213, 26218, 26220, 26222, 26224, 26225, 26226, 26228, 26229, 26230, 26232, 26233, 26234, 26235, 26236, 26237, 26239, 26241, 26242, 26244, 26246, 26247, 26248, 26251, 26253, 26254, 26256, 26257, 26258, 26261, 26271, 26272, 26290, 26291, 26292, 26300, 26301, 26303, 26305, 26307, 26308, 26309, 26310, 26312, 26313, 26316, 26318, 26321, 26323, 26325, 26326, 26328, 26331, 26336, 26337, 26338, 26343, 26344, 26345, 26346, 26349, 26350, 26351, 26352, 26353, 26356, 26357, 26358, 26360, 26361, 26362, 26363, 26364, 26366, 26367, 26371, 26372, 26373, 26374, 26376, 26387, 26388, 26391, 26392, 26394, 26395, 26399, 26400, 26401, 26402, 26407, 26408, 26409, 26410, 26411, 26413, 26417, 26421, 26422, 26426, 26427, 26428, 26431, 26432, 26434, 26435, 26437, 26443, 26444, 26445, 26446, 26447, 26449, 26450, 26451, 26452, 26453, 26454, 26455, 26456, 26457, 26458, 26459, 26460, 26461, 26462, 26463, 26465, 26480, 26481, 26497, 26498, 26507, 26508, 26543, 26546, 26549, 26550, 26551, 26555, 26560, 26561, 26562, 26564, 26567, 26568, 26569, 26571, 26574, 26575, 26580, 26581, 26582, 26583, 26590, 26591, 26593, 26596, 26597, 26598, 26599, 26602, 26603, 26606, 26607, 26608, 26613, 26614, 26616, 26618, 26623, 26626, 26627, 26628, 26629, 26630, 26633, 26634, 26635, 26637, 26638, 26641, 26642, 26643, 26644, 26646, 26652, 26653, 26656, 26658, 26659, 26660, 26662, 26663, 26664, 26665, 26666, 26667, 26668, 26669, 26670, 26673, 26674, 26675, 26676, 26677, 26678, 26679, 26680, 26682, 26683, 26684, 26686, 26688, 26691, 26695, 26696, 26699, 26700, 26701, 26702, 26703, 26708, 26709, 26710, 26711, 26712, 26713, 26714, 26715, 26726, 26727, 26728, 26729, 26730, 26731, 26732, 26733, 26734, 26735, 26736, 26737, 26738, 26739, 26740, 26741, 26744, 26745, 26746, 26747, 26748, 26749, 26750, 26752, 26761, 26765, 26766, 26767, 26770, 26772, 26778, 26779, 26781, 26782, 26783, 26784, 26785, 26786, 26798, 26802, 26803, 26804, 26808, 26809, 26810, 26811, 26812, 26813, 26814, 26815, 26820, 26823, 26824, 26827, 26829, 26830, 26832, 26834, 26836, 26838, 26839, 26840, 26842, 26843, 26845, 26847, 26848, 26849, 26851, 26852, 26853, 26854, 26855, 26856, 26857, 26858, 26859, 26860, 26861, 26862, 26863, 26864, 26865, 26866, 26867, 26868, 26869, 26870, 26871, 26873, 26877, 26878, 26885, 26886, 26889, 26891, 26893, 26894, 26895, 26899, 26901, 26902, 26903, 26904, 26908, 26909, 26910, 26911, 26912, 26913, 26914, 26920, 26921, 26922, 26923, 26924, 26933, 26934, 26938, 26945, 26947, 26949, 26950, 26951, 26952, 26953, 26954, 26955, 26956, 26957, 26958, 26959, 26960, 26961, 26962, 26963, 26964, 26966, 26967, 26971, 26972, 26974, 26975, 26976, 26977, 26978, 26979, 26980, 26982, 26983, 26984, 26985, 26987, 26988, 26989, 26990, 26993, 26994, 26996, 26997, 26998, 26999, 27000, 27002, 27003, 27004, 27007, 27008, 27009, 27012, 27013, 27018, 27019, 27020, 27021, 27022, 27023, 27025, 27027, 27030, 27031, 27032, 27033, 27039, 27042, 27043, 27044, 27045, 27046, 27047, 27048, 27049, 27050, 27051, 27056, 27057, 27058, 27059, 27060, 27061, 27062, 27068, 27069, 27070, 27071, 27075, 27076, 27077, 27078, 27079, 27080, 27081, 27083, 27084, 27085, 27086, 27087, 27088, 27089, 27090, 27092, 27093, 27094, 27095, 27096, 27097, 27098, 27099, 27100, 27102, 27104, 27108, 27109, 27110, 27111, 27112, 27118, 27122, 27123, 27124, 27126, 27127, 27130, 27131, 27132, 27134, 27135, 27136, 27138, 27139, 27140, 27145, 27148, 27149, 27150, 27153, 27154, 27155, 27157, 27158, 27159, 27160, 27161, 27163, 27165, 27166, 27170, 27171, 27172, 27173, 27174, 27175, 27176, 27177, 27178, 27179, 27180, 27181, 27182, 27183, 27184, 27185, 27186, 27187, 27188, 27190, 27191, 27192, 27193, 27194, 27195, 27200, 27201, 27202, 27203, 27204, 27206, 27207, 27209, 27213, 27215, 27216, 27217, 27218, 27219, 27220, 27221, 27225, 27226, 27228, 27229, 27230, 27231, 27249, 27250, 27251, 27252, 27253, 27254, 27255, 27256, 27257, 27258, 27262, 27263, 27264, 27284, 27288, 27290, 27291, 27292, 27293, 27294, 27295, 27298, 27300, 27303, 27304, 27307, 27308, 27309, 27310, 27313, 27314, 27318, 27319, 27320, 27322, 27324, 27325, 27328, 27329, 27330, 27332, 27334, 27335, 27336, 27337, 27338, 27339, 27342, 27343, 27347, 27349, 27350, 27352, 27353, 27354, 27358, 27359, 27361, 27364, 27365, 27367, 27369, 27370, 27373, 27374, 27375, 27376, 27378, 27381, 27382, 27383, 27386, 27388, 27394, 27395, 27397, 27398, 27400, 27402, 27404, 27406, 27407, 27409, 27410, 27412, 27414, 27417, 27418, 27419, 27420, 27421, 27422, 27423, 27424, 27425, 27427, 27428, 27430, 27431, 27433, 27436, 27437, 27438, 27439, 27444, 27445, 27446, 27447, 27449, 27453, 27455, 27457, 27459, 27461, 27464, 27465, 27466, 27467, 27468, 27474, 27475, 27481, 27485, 27486, 27490, 27492, 27494, 27496, 27498, 27500, 27502, 27504, 27505, 27506, 27509, 27511, 27512, 27516, 27518, 27521, 27522, 27523, 27526, 27527, 27530, 27531, 27532, 27539, 27540, 27544, 27545, 27546, 27550, 27551, 27552, 27553, 27554, 27555, 27558, 27559, 27560, 27562, 27564, 27565, 27567, 27570, 27571, 27573, 27576, 27577, 27578, 27579, 27580, 27582, 27583, 27584, 27585, 27586, 27587, 27588, 27589, 27590, 27591, 27592, 27595, 27601, 27603, 27605, 27607, 27610, 27611, 27612, 27615, 27629, 27630, 27631, 27632, 27633, 27636, 27638, 27639, 27641, 27642, 27646, 27649, 27650, 27651, 27656, 27657, 27659, 27660, 27662, 27663, 27664, 27671, 27672, 27673, 27674, 27675, 27676, 27684, 27685, 27686, 27687, 27689, 27693, 27696, 27697, 27702, 27708, 27709, 27714, 27716, 27717, 27723, 27724, 27725, 27728, 27729, 27730, 27731, 27732, 27734, 27736, 27737, 27738, 27739, 27740, 27741, 27744, 27746, 27747, 27748, 27749, 27750, 27751, 27752, 27757, 27759, 27762, 27764, 27765, 27766, 27768, 27771, 27772, 27773, 27774, 27775, 27776, 27778, 27779, 27780, 27788, 27791, 27794, 27795, 27799, 27800, 27801, 27805, 27807, 27808, 27813, 27814, 27816, 27817, 27818, 27819, 27820, 27821, 27825, 27826, 27827, 27828, 27829, 27830, 27831, 27832, 27833, 27835, 27837, 27838, 27839, 27840, 27841, 27842, 27843, 27844, 27845, 27846, 27847, 27850, 27851, 27852, 27853, 27854, 27856, 27857, 27858, 27862, 27863, 27864, 27865, 27866, 27867, 27868, 27869, 27870, 27871, 27872, 27873, 27874, 27875, 27876, 27877, 27878, 27884, 27886, 27887, 27888, 27894, 27895, 27897, 27898, 27899, 27900, 27901, 27902, 27903, 27905, 27906, 27910, 27911, 27914, 27915, 27918, 27919, 27920, 27925, 27926, 27927, 27929, 27930, 27934, 27935, 27938, 27939, 27942, 27945, 27948, 27949, 27953, 27955, 27957, 27958, 27978, 27979, 27980, 27984, 27988, 27990, 27994, 27996, 27998, 28000, 28001, 28006, 28013, 28018, 28019, 28021, 28022, 28023, 28025, 28027, 28028, 28030, 28031, 28034, 28035, 28038, 28054, 28055, 28056, 28057, 28066, 28068, 28069, 28070, 28071, 28072, 28078, 28079, 28085, 28086, 28087, 28088, 28090, 28091, 28092, 28093, 28097, 28098, 28099, 28102, 28104, 28105, 28108, 28109, 28111, 28119, 28120, 28121, 28122, 28123, 28124, 28126, 28127, 28129, 28131, 28132, 28135, 28137, 28140, 28143, 28144, 28145, 28148, 28149, 28151, 28154, 28156, 28157, 28158, 28159, 28161, 28162, 28164, 28167, 28169, 28170, 28172, 28173, 28174, 28179, 28180, 28181, 28182, 28183, 28184, 28186, 28188, 28193, 28194, 28196, 28198, 28199, 28201, 28203, 28204, 28205, 28206, 28207, 28216, 28217, 28218, 28219, 28220, 28221, 28223, 28224, 28225, 28226, 28228, 28229, 28230, 28231, 28232, 28233, 28234, 28236, 28237, 28238, 28239, 28240, 28241, 28242, 28243, 28244, 28245, 28246, 28247, 28248, 28249, 28250, 28251, 28252, 28253, 28254, 28255, 28256, 28257, 28258, 28259, 28260, 28261, 28262, 28263, 28264, 28265, 28266, 28267, 28268, 28269, 28270, 28271, 28272, 28273, 28274, 28275, 28276, 28277, 28278, 28279, 28280, 28281, 28285, 28300, 28301, 28303, 28304, 28306, 28308, 28311, 28313, 28315, 28316, 28320, 28324, 28344, 28345, 28349, 28350, 28351, 28352, 28353, 28358, 28364, 28368, 28370, 28371, 28393, 28395, 28396, 28398, 28399, 28400, 28405, 28406, 28407, 28410, 28411, 28412, 28413, 28420, 28421, 28428, 28439, 28440, 28456, 28464, 28466, 28483, 28516, 28517, 28532, 28533, 28534, 28535, 28545, 28549, 28559, 28560, 28561, 28563, 28565, 28580, 28581, 28586, 28587, 28588, 28589, 28597, 28600, 28606, 28612, 28617, 28618, 28621, 28622, 28626, 28629, 28632, 28633, 28636, 28638, 28639, 28641, 28643, 28644, 28645, 28654, 28662, 28663, 28664, 28669, 28670, 28671, 28672, 28673, 28674, 28676, 28677, 28678, 28679, 28680, 28688, 28690, 28691, 28697, 28698, 28699, 28700, 28701, 28703, 28704, 28706, 28707, 28708, 28709, 28710, 28712, 28717, 28730, 28733, 28735, 28736, 28739, 28740, 28743, 28745, 28746, 28748, 28752, 28753, 28754, 28755, 28757, 28760, 28761, 28765, 28767, 28770, 28771, 28780, 28781, 28786, 28788, 28789, 28793, 28795, 28796, 28797, 28799, 28800, 28804, 28806, 28807, 28808, 28818, 28821, 28822, 28834, 28835, 28836, 28837, 28838, 28840, 28842, 28843, 28848, 28849, 28850, 28851, 28854, 28855, 28858, 28860, 28861, 28862, 28863, 28864, 28865, 28878, 28879, 28885, 28891, 28892, 28893, 28896, 28897, 28898, 28899, 28900, 28901, 28902, 28903, 28904, 28905, 28908, 28909, 28913, 28914, 28920, 28921, 28922, 28924, 28925, 28926, 28927, 28928, 28929, 28932, 28933, 28934, 28937, 28941, 28942, 28946, 28947, 28948, 28965, 28967, 28969, 28970, 28971, 28975, 28976, 28977, 28984, 28985, 28986, 28987, 28993, 28994, 28995, 28996, 28997, 29005, 29007, 29008, 29010, 29011, 29012, 29013, 29015, 29019, 29020, 29021, 29022, 29023, 29025, 29026, 29030, 29031, 29033, 29034, 29036, 29037, 29039, 29044, 29047, 29048, 29050, 29051, 29052, 29053, 29054, 29055, 29059, 29072, 29076, 29077, 29078, 29079, 29085, 29087, 29088, 29089, 29090, 29091, 29092, 29093, 29098, 29099, 29102, 29103, 29110, 29111, 29114, 29121, 29132, 29145, 29146, 29147, 29148, 29154, 29161, 29178, 29185, 29203, 29227, 29228, 29229, 29230, 29231, 29232, 29233, 29234, 29243, 29250, 29255, 29256, 29258, 29261, 29265, 29268, 29325, 29337, 29338, 29339, 29344, 29366, 29368, 29369, 29371, 29375, 29378, 29379, 29391, 29392, 29395, 29398, 29403, 29404, 29426, 29428, 29429, 29435, 29444, 29477, 29478, 29480, 29484, 29491, 29493, 29496, 29497, 29499, 29500, 29502, 29504, 29506, 29507, 29508, 29510, 29512, 29514, 29516, 29518, 29522, 29524, 29526, 29529, 29530, 29531, 29532, 29535, 29536, 29537, 29541, 29542, 29543, 29546, 29547, 29551, 29553, 29556, 29557, 29558, 29562, 29568, 29569, 29570, 29571, 29573, 29574, 29575, 29576, 29577, 29578, 29579, 29580, 29581, 29582, 29583, 29588, 29589, 29591, 29592, 29599, 29601, 29602, 29603, 29604, 29609, 29614, 29615, 29616, 29623, 29624, 29634, 29635, 29636, 29637, 29639, 29640, 29643, 29645, 29646, 29648, 29649, 29650, 29651, 29652, 29653, 29654, 29659, 29660, 29673, 29679, 29682, 29683, 29684, 29685, 29686, 29687, 29690, 29691, 29697, 29699, 29701, 29704, 29706, 29708, 29710, 29712, 29714, 29716, 29717, 29719, 29720, 29723, 29724, 29728, 29729, 29733, 29738, 29755, 29758, 29759, 29762, 29765, 29767, 29768, 29772, 29773, 29774, 29775, 29779, 29782, 29783, 29784, 29787, 29788, 29789, 29791, 29792, 29793, 29795, 29796, 29812, 29813, 29814, 29817, 29818, 29820, 29824, 29825, 29829, 29830, 29833, 29835, 29836, 29837, 29842, 29843, 29844, 29845, 29846, 29852, 29853, 29855, 29856, 29858, 29859, 29860, 29862, 29864, 29866, 29867, 29870, 29871, 29881, 29882, 29888, 29893, 29894, 29895, 29896, 29898, 29899, 29900, 29901, 29903, 29904, 29915, 29970, 29984, 29989, 29990, 29991, 29995, 29996, 29997, 30000, 30005, 30007, 30008, 30019, 30020, 30021, 30022, 30041, 30048, 30065, 30066, 30069, 30075, 30120, 30141, 30148, 30149, 30151, 30156, 30163, 30178, 30193, 30196, 30197, 30199, 30226, 30259, 30260, 30268, 30269, 30270, 30271, 30272, 30277, 30283, 30285, 30300, 30310, 30324, 30326, 30331, 30340, 30341, 30342, 30350, 30357, 30358, 30359, 30360, 30363, 30364, 30365, 30368, 30369, 30372, 30374, 30376, 30377, 30380, 30381, 30384, 30386, 30388, 30390, 30401, 30414, 30416, 30417, 30439, 30450, 30453, 30454, 30455, 30457, 30459, 30468, 30469, 30472, 30473, 30475, 30476, 30481, 30484, 30485, 30488, 30489, 30507, 30508, 30509, 30511, 30528, 30530, 30534, 30570, 30571, 30576, 30577, 30582, 30583, 30591, 30592, 30597, 30598, 30599, 30600, 30602, 30603, 30604, 30606, 30607, 30608, 30611, 30616, 30617, 30618, 30619, 30620, 30621, 30630, 30631, 30633, 30635, 30636, 30637, 30638, 30640, 30652, 30657, 30659, 30663, 30665, 30667, 30668, 30671, 30672, 30673, 30674, 30676, 30678, 30680, 30681, 30683, 30685, 30688, 30690, 30693, 30694, 30696, 30697, 30708, 30709, 30712, 30716, 30721, 30725, 30728, 30731, 30739, 30740, 30741, 30742, 30745, 30746, 30747, 30748, 30750, 30751, 30768, 30769, 30770, 30772, 30773, 30775, 30790, 30793, 30797, 30798, 30800, 30801, 30802, 30804, 30807, 30809, 30810, 30815, 30816, 30821, 30826, 30838, 30840, 30841, 30842, 30843, 30850, 30851, 30856, 30857, 30858, 30859, 30860, 30862, 30868, 30869, 30878, 30879, 30880, 30881, 30883, 30893, 30895, 30897, 30900, 30901, 30907, 30908, 30909, 30910, 30911, 30912, 30965, 30967, 30972, 30973, 30975, 30978, 30979, 30980, 30981, 30982, 30983, 30987, 30991, 30993, 31005, 31006, 31008, 31011, 31012, 31014, 31015, 31016, 31020, 31021, 31022, 31025, 31026, 31028, 31029, 31030, 31031, 31033, 31034, 31037, 31039, 31040, 31050, 31082, 31089, 31095, 31097, 31103, 31112, 31117, 31124, 31127, 31128, 31133, 31134, 31135, 31166, 31167, 31168, 31170, 31175, 31176, 31182, 31187, 31194, 31195, 31197, 31201, 31286, 31299, 31300, 31301, 31302, 31306, 31346, 31347, 31410, 31413, 31414, 31428, 31465, 31472, 31474, 31522, 31526, 31548, 31564, 31565, 31574, 31578, 31613, 31614, 31616, 31647, 31648, 31649, 31650, 31651, 31652, 31653, 31654, 31656, 31657, 31658, 31659, 31661, 31662, 31663, 31676, 31677, 31678, 31679, 31680, 31682, 31683, 31684, 31703, 31706, 31707, 31709, 31713, 31726, 31730, 31736, 31737, 31749, 31751, 31752, 31753, 31761, 31762, 31778, 31788, 31812, 31813, 31819, 31821, 31823, 31833, 31839, 31840, 31842, 31847, 31848, 31851, 31852, 31892, 32104, 32105, 32179); +UPDATE `creature_model_info` SET `gender`=1 WHERE `modelid` IN (39, 50, 52, 54, 56, 58, 60, 80, 93, 94, 95, 96, 97, 98, 99, 100, 109, 140, 148, 159, 162, 186, 213, 215, 224, 225, 228, 232, 252, 257, 258, 278, 285, 302, 327, 330, 344, 375, 423, 424, 425, 427, 560, 660, 696, 751, 752, 753, 754, 876, 883, 900, 915, 964, 967, 968, 969, 970, 971, 972, 974, 1029, 1048, 1049, 1165, 1223, 1225, 1237, 1255, 1256, 1286, 1287, 1295, 1296, 1297, 1300, 1312, 1319, 1322, 1325, 1333, 1350, 1351, 1352, 1358, 1360, 1361, 1367, 1378, 1380, 1381, 1389, 1401, 1404, 1407, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1469, 1470, 1471, 1472, 1473, 1474, 1477, 1479, 1480, 1481, 1482, 1483, 1495, 1496, 1497, 1498, 1520, 1521, 1522, 1523, 1526, 1543, 1544, 1546, 1564, 1571, 1592, 1593, 1594, 1601, 1603, 1607, 1608, 1612, 1614, 1615, 1620, 1632, 1633, 1634, 1636, 1637, 1639, 1640, 1643, 1645, 1651, 1658, 1670, 1679, 1681, 1682, 1691, 1692, 1697, 1700, 1702, 1705, 1707, 1708, 1710, 1714, 1716, 1717, 1719, 1721, 1723, 1726, 1727, 1728, 1730, 1733, 1743, 1745, 1750, 1760, 1766, 1768, 1786, 1791, 1793, 1799, 1811, 1812, 1814, 1815, 1828, 1839, 1840, 1841, 1842, 1843, 1850, 1852, 1853, 1855, 1856, 1857, 1862, 1868, 1874, 1875, 1878, 1879, 1882, 1890, 1897, 1900, 1905, 1907, 1908, 1914, 1915, 1916, 1927, 1932, 1933, 1937, 1942, 1957, 1969, 1978, 1980, 1981, 1982, 2031, 2034, 2035, 2036, 2037, 2038, 2043, 2047, 2049, 2050, 2053, 2054, 2055, 2056, 2057, 2058, 2068, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2132, 2133, 2143, 2162, 2163, 2164, 2165, 2166, 2167, 2178, 2182, 2183, 2191, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 2230, 2231, 2232, 2233, 2240, 2279, 2294, 2295, 2296, 2306, 2315, 2317, 2319, 2321, 2330, 2331, 2333, 2336, 2339, 2341, 2344, 2348, 2349, 2355, 2358, 2359, 2362, 2365, 2366, 2374, 2375, 2379, 2386, 2391, 2394, 2396, 2398, 2399, 2400, 2401, 2407, 2412, 2413, 2415, 2422, 2443, 2448, 2459, 2460, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 2480, 2481, 2482, 2483, 2494, 2496, 2497, 2500, 2501, 2503, 2505, 2508, 2509, 2512, 2515, 2516, 2518, 2521, 2523, 2525, 2529, 2558, 2575, 2577, 2579, 2583, 2585, 2587, 2589, 2590, 2591, 2608, 2656, 2657, 2658, 2659, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 2670, 2671, 2672, 2673, 2674, 2718, 2721, 2722, 2723, 2734, 2737, 2788, 2811, 2834, 2858, 2861, 2863, 2865, 2866, 2867, 2869, 2874, 2883, 2884, 2885, 2886, 2889, 2893, 2896, 2901, 2959, 2966, 2970, 2973, 2979, 2980, 2993, 2999, 3000, 3001, 3003, 3012, 3013, 3021, 3022, 3039, 3041, 3048, 3049, 3050, 3051, 3056, 3057, 3058, 3059, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 3070, 3071, 3106, 3108, 3119, 3120, 3121, 3124, 3125, 3128, 3130, 3133, 3135, 3143, 3145, 3218, 3227, 3230, 3234, 3257, 3260, 3268, 3269, 3270, 3287, 3288, 3289, 3290, 3291, 3292, 3293, 3295, 3296, 3297, 3311, 3312, 3313, 3318, 3320, 3321, 3322, 3323, 3329, 3330, 3335, 3339, 3344, 3345, 3349, 3356, 3363, 3364, 3366, 3367, 3368, 3369, 3371, 3375, 3377, 3378, 3379, 3405, 3445, 3448, 3450, 3455, 3463, 3466, 3485, 3486, 3489, 3515, 3517, 3520, 3528, 3529, 3540, 3543, 3544, 3547, 3549, 3560, 3562, 3564, 3567, 3569, 3579, 3580, 3582, 3584, 3586, 3588, 3590, 3591, 3593, 3602, 3611, 3630, 3641, 3650, 3651, 3654, 3657, 3659, 3663, 3677, 3689, 3707, 3710, 3713, 3715, 3717, 3718, 3722, 3724, 3726, 3728, 3730, 3735, 3750, 3762, 3764, 3766, 3768, 3770, 3772, 3779, 3780, 3781, 3784, 3786, 3788, 3791, 3797, 3798, 3806, 3807, 3820, 3828, 3830, 3834, 3836, 3838, 3840, 3841, 3848, 3850, 3860, 3861, 3867, 3871, 3875, 3883, 3892, 3893, 3896, 3897, 3901, 3904, 3915, 3918, 3931, 3932, 3935, 3938, 3943, 3944, 3945, 3949, 3953, 3961, 3966, 3972, 3977, 3978, 3979, 3980, 3983, 3988, 3990, 3992, 3994, 3996, 3998, 3999, 4002, 4004, 4009, 4010, 4012, 4015, 4017, 4019, 4023, 4025, 4026, 4027, 4031, 4035, 4038, 4041, 4046, 4052, 4053, 4054, 4056, 4057, 4058, 4059, 4060, 4077, 4080, 4084, 4085, 4087, 4089, 4106, 4108, 4109, 4112, 4113, 4114, 4115, 4122, 4123, 4126, 4128, 4129, 4131, 4133, 4135, 4138, 4140, 4144, 4146, 4147, 4149, 4151, 4153, 4158, 4162, 4168, 4175, 4176, 4177, 4179, 4181, 4182, 4187, 4189, 4191, 4193, 4195, 4196, 4198, 4210, 4217, 4219, 4221, 4223, 4230, 4231, 4233, 4234, 4235, 4236, 4240, 4241, 4247, 4250, 4251, 4254, 4260, 4263, 4264, 4273, 4274, 4277, 4278, 4280, 4282, 4284, 4290, 4302, 4313, 4314, 4322, 4323, 4330, 4334, 4337, 4340, 4345, 4346, 4348, 4350, 4351, 4352, 4355, 4356, 4357, 4358, 4362, 4369, 4375, 4377, 4378, 4379, 4383, 4385, 4393, 4394, 4399, 4402, 4403, 4406, 4409, 4410, 4411, 4412, 4419, 4421, 4433, 4462, 4481, 4487, 4488, 4490, 4496, 4498, 4500, 4502, 4504, 4510, 4513, 4522, 4523, 4524, 4526, 4528, 4529, 4533, 4536, 4538, 4541, 4546, 4558, 4578, 4601, 4605, 4614, 4618, 4619, 4642, 4643, 4647, 4665, 4669, 4670, 4673, 4674, 4675, 4677, 4681, 4682, 4691, 4695, 4698, 4700, 4702, 4704, 4706, 4708, 4710, 4712, 4718, 4728, 4729, 4730, 4731, 4756, 4770, 4772, 4774, 4777, 4780, 4782, 4841, 4842, 4843, 4844, 4845, 4846, 4847, 4848, 4849, 4850, 4851, 4852, 4853, 4854, 4855, 4856, 4857, 4858, 4859, 4861, 4862, 4871, 4875, 4888, 4892, 4894, 4897, 4909, 4912, 4913, 4914, 4915, 4929, 4941, 4943, 4948, 4951, 4958, 4966, 4967, 4968, 4972, 4973, 4974, 4975, 4976, 4977, 4978, 4979, 4980, 4981, 4982, 4983, 4985, 4991, 4994, 5017, 5018, 5022, 5029, 5033, 5036, 5040, 5042, 5043, 5086, 5091, 5092, 5093, 5129, 5130, 5165, 5186, 5233, 5235, 5365, 5366, 5367, 5371, 5375, 5378, 5407, 5408, 5425, 5429, 5435, 5439, 5441, 5442, 5444, 5446, 5487, 5499, 5506, 5527, 5531, 5533, 5545, 5546, 5552, 5565, 5569, 5572, 5574, 5706, 5725, 5745, 5765, 5774, 5777, 5783, 5807, 5809, 5811, 5815, 5817, 5819, 5823, 5825, 5827, 5829, 5847, 5909, 5910, 6005, 6058, 6061, 6064, 6088, 6089, 6090, 6091, 6092, 6093, 6095, 6096, 6098, 6099, 6100, 6101, 6102, 6110, 6111, 6112, 6113, 6116, 6120, 6128, 6210, 6213, 6214, 6229, 6234, 6248, 6328, 6348, 6349, 6391, 6392, 6394, 6396, 6398, 6400, 6402, 6404, 6406, 6408, 6412, 6414, 6416, 6418, 6420, 6422, 6424, 6426, 6428, 6430, 6435, 6437, 6438, 6481, 6482, 6484, 6486, 6488, 6490, 6492, 6494, 6496, 6498, 6508, 6509, 6511, 6513, 6515, 6536, 6539, 6541, 6543, 6547, 6548, 6551, 6553, 6554, 6588, 6609, 6611, 6629, 6631, 6671, 6673, 6676, 6677, 6679, 6681, 6684, 6685, 6703, 6712, 6714, 6716, 6718, 6720, 6722, 6724, 6726, 6728, 6730, 6732, 6734, 6739, 6742, 6749, 6750, 6753, 6755, 6761, 6766, 6768, 6771, 6773, 6781, 6782, 6783, 6786, 6788, 6790, 6792, 6794, 6796, 6797, 6812, 6813, 6814, 6815, 6831, 6833, 6835, 6840, 6880, 6881, 6895, 6919, 6941, 6945, 6948, 6951, 6956, 6958, 6960, 6964, 6975, 6976, 6982, 6985, 6986, 6987, 6992, 6993, 6998, 6999, 7000, 7002, 7012, 7013, 7014, 7015, 7017, 7018, 7020, 7023, 7025, 7030, 7039, 7040, 7044, 7045, 7116, 7118, 7119, 7121, 7122, 7123, 7138, 7175, 7248, 7268, 7270, 7274, 7275, 7309, 7311, 7330, 7358, 7359, 7363, 7365, 7369, 7371, 7375, 7376, 7378, 7382, 7532, 7536, 7589, 7590, 7592, 7596, 7599, 7602, 7603, 7605, 7608, 7610, 7611, 7615, 7621, 7625, 7627, 7628, 7669, 7729, 7730, 7754, 7756, 7802, 7808, 7812, 7818, 7821, 7823, 7825, 7828, 7830, 7833, 7834, 7850, 7863, 7870, 7872, 7876, 7895, 7905, 7909, 7911, 7913, 7917, 7918, 7922, 7923, 7934, 7936, 7969, 7974, 7989, 7994, 7995, 8171, 8185, 8190, 8191, 8249, 8309, 8312, 8314, 8316, 8330, 8332, 8356, 8429, 8476, 8478, 8479, 8489, 8570, 8572, 8630, 8632, 8650, 8651, 8657, 8659, 8660, 8665, 8671, 8672, 8675, 8676, 8680, 8683, 8684, 8690, 8691, 8693, 8695, 8705, 8761, 8763, 8765, 8768, 8769, 8774, 8776, 8779, 8789, 8795, 8796, 8800, 8801, 8809, 8831, 8889, 8890, 8892, 8896, 8897, 8949, 9025, 9055, 9070, 9071, 9109, 9131, 9132, 9136, 9150, 9249, 9251, 9253, 9254, 9255, 9257, 9260, 9262, 9263, 9264, 9269, 9270, 9273, 9282, 9290, 9294, 9295, 9330, 9331, 9338, 9339, 9342, 9343, 9344, 9346, 9347, 9350, 9392, 9412, 9416, 9423, 9424, 9429, 9431, 9438, 9440, 9443, 9529, 9530, 9531, 9534, 9551, 9553, 9676, 9677, 9684, 9685, 9711, 9712, 9717, 9718, 9721, 9722, 9726, 9727, 9730, 9731, 9732, 9754, 9763, 9765, 9767, 9774, 9775, 9780, 9791, 9795, 9796, 9800, 9801, 9804, 9805, 9808, 9810, 9811, 9812, 9813, 9818, 9821, 9822, 9823, 9849, 9850, 9851, 9852, 9853, 9854, 9855, 9856, 9857, 9858, 9859, 9860, 9861, 9862, 9863, 9864, 9865, 9866, 9867, 9868, 9869, 9870, 9871, 9872, 9873, 9874, 9875, 9876, 9877, 9878, 9879, 9880, 9881, 9882, 9883, 9884, 9885, 9886, 9887, 9888, 9889, 9890, 9891, 9892, 9893, 9894, 9895, 9896, 9897, 9937, 9938, 9941, 9942, 9949, 9950, 9951, 9953, 9954, 9955, 9956, 9957, 9958, 10004, 10008, 10034, 10051, 10052, 10054, 10070, 10092, 10093, 10113, 10129, 10134, 10138, 10140, 10142, 10144, 10145, 10147, 10149, 10153, 10174, 10175, 10178, 10179, 10180, 10185, 10191, 10199, 10211, 10212, 10214, 10220, 10221, 10223, 10224, 10227, 10228, 10232, 10233, 10234, 10238, 10239, 10249, 10250, 10253, 10280, 10281, 10282, 10288, 10289, 10293, 10294, 10297, 10298, 10301, 10302, 10305, 10306, 10309, 10310, 10313, 10314, 10322, 10323, 10326, 10327, 10330, 10331, 10334, 10335, 10337, 10346, 10347, 10352, 10353, 10360, 10361, 10368, 10369, 10372, 10373, 10378, 10380, 10381, 10385, 10386, 10389, 10390, 10393, 10394, 10396, 10397, 10400, 10401, 10402, 10405, 10406, 10407, 10410, 10411, 10412, 10415, 10416, 10419, 10420, 10423, 10424, 10429, 10430, 10431, 10432, 10436, 10437, 10439, 10440, 10445, 10446, 10447, 10455, 10459, 10465, 10477, 10480, 10481, 10485, 10486, 10490, 10491, 10494, 10495, 10498, 10499, 10502, 10503, 10506, 10507, 10510, 10511, 10514, 10515, 10518, 10519, 10531, 10532, 10533, 10534, 10537, 10538, 10541, 10542, 10549, 10550, 10557, 10559, 10562, 10563, 10564, 10565, 10569, 10571, 10573, 10574, 10575, 10581, 10582, 10591, 10592, 10609, 10610, 10615, 10620, 10623, 10624, 10633, 10634, 10639, 10640, 10646, 10651, 10652, 10654, 10657, 10659, 10663, 10665, 10690, 10692, 10702, 10722, 10723, 10725, 10731, 10732, 10733, 10734, 10737, 10744, 10745, 10746, 10749, 10750, 10751, 10752, 10822, 10823, 10857, 10869, 10870, 10871, 10872, 10873, 10874, 10875, 10876, 10877, 10895, 10909, 10910, 10923, 10924, 10925, 10926, 10927, 10928, 10929, 10941, 10942, 10948, 10955, 10956, 10994, 10995, 11015, 11016, 11019, 11020, 11023, 11024, 11026, 11039, 11041, 11043, 11044, 11045, 11046, 11047, 11048, 11050, 11057, 11058, 11059, 11061, 11062, 11069, 11073, 11076, 11077, 11082, 11083, 11102, 11103, 11111, 11112, 11115, 11116, 11118, 11120, 11122, 11125, 11128, 11131, 11134, 11145, 11148, 11151, 11154, 11157, 11160, 11161, 11162, 11163, 11164, 11169, 11170, 11173, 11175, 11176, 11177, 11184, 11185, 11191, 11192, 11195, 11196, 11199, 11200, 11203, 11204, 11206, 11208, 11210, 11212, 11214, 11216, 11219, 11220, 11223, 11224, 11227, 11228, 11231, 11232, 11235, 11236, 11239, 11240, 11242, 11244, 11247, 11248, 11250, 11252, 11259, 11260, 11261, 11262, 11263, 11266, 11268, 11270, 11273, 11280, 11281, 11282, 11285, 11290, 11291, 11292, 11294, 11295, 11300, 11304, 11308, 11323, 11324, 11329, 11330, 11352, 11356, 11381, 11388, 11389, 11392, 11393, 11407, 11408, 11423, 11432, 11433, 11436, 11437, 11440, 11441, 11442, 11444, 11445, 11446, 11457, 11458, 11462, 11463, 11477, 11478, 11512, 11589, 11593, 11594, 11596, 11637, 11654, 11657, 11662, 11663, 11665, 11668, 11670, 11672, 11673, 11675, 11676, 11681, 11682, 11683, 11684, 11687, 11689, 11691, 11692, 11714, 11729, 11734, 11735, 11737, 11739, 11741, 11742, 11744, 11746, 11747, 11748, 11750, 11752, 11760, 11761, 11764, 11765, 11766, 11767, 11770, 11771, 11775, 11777, 11789, 11796, 11800, 11802, 11810, 11813, 11815, 11819, 11821, 11823, 11824, 11827, 11835, 11850, 11853, 11854, 11857, 11858, 11861, 11862, 11865, 11867, 11869, 11871, 11873, 11875, 11877, 11879, 11881, 11883, 11885, 11888, 11889, 11890, 11898, 11901, 11903, 11904, 11929, 11950, 11951, 11952, 11954, 11958, 11959, 11960, 11964, 11966, 11968, 11970, 11971, 11974, 11975, 11978, 11980, 11983, 11985, 11988, 11989, 11992, 11993, 11998, 11999, 12004, 12006, 12009, 12011, 12013, 12014, 12017, 12019, 12021, 12022, 12023, 12027, 12035, 12037, 12038, 12040, 12042, 12043, 12049, 12054, 12056, 12059, 12062, 12063, 12064, 12066, 12067, 12069, 12070, 12071, 12072, 12077, 12079, 12082, 12084, 12166, 12169, 12229, 12270, 12271, 12291, 12292, 12337, 12392, 12409, 12430, 12469, 12476, 12477, 12549, 12569, 12649, 12670, 12674, 12675, 12677, 12680, 12681, 12689, 12749, 12789, 12811, 12823, 12824, 12830, 12831, 12889, 12892, 12894, 12912, 12913, 12914, 12916, 12922, 12923, 12924, 12927, 12931, 12933, 12935, 12936, 12940, 12941, 12946, 12948, 12950, 12952, 12955, 12958, 12964, 12968, 12970, 12972, 12973, 12974, 12976, 12991, 12992, 13169, 13189, 13190, 13229, 13230, 13231, 13232, 13250, 13251, 13255, 13256, 13259, 13261, 13263, 13265, 13267, 13268, 13271, 13272, 13275, 13277, 13279, 13283, 13287, 13289, 13290, 13291, 13292, 13293, 13295, 13297, 13299, 13302, 13304, 13305, 13307, 13309, 13313, 13314, 13317, 13318, 13323, 13328, 13331, 13337, 13339, 13344, 13345, 13347, 13350, 13352, 13354, 13355, 13357, 13358, 13359, 13360, 13362, 13366, 13368, 13372, 13373, 13376, 13378, 13380, 13381, 13387, 13389, 13391, 13393, 13395, 13399, 13401, 13402, 13403, 13410, 13412, 13413, 13431, 13433, 13435, 13437, 13441, 13443, 13451, 13452, 13473, 13474, 13477, 13478, 13529, 13531, 13534, 13536, 13537, 13539, 13542, 13545, 13546, 13549, 13550, 13551, 13553, 13555, 13557, 13559, 13561, 13562, 13564, 13566, 13568, 13570, 13572, 13574, 13591, 13593, 13595, 13597, 13599, 13601, 13631, 13633, 13635, 13637, 13639, 13641, 13643, 13646, 13648, 13651, 13653, 13655, 13657, 13659, 13661, 13669, 13670, 13672, 13673, 13674, 13675, 13676, 13677, 13678, 13679, 13680, 13681, 13682, 13683, 13684, 13685, 13686, 13687, 13688, 13689, 13710, 13712, 13770, 13772, 13774, 13776, 13778, 13780, 13782, 13784, 13787, 13788, 13791, 13792, 13794, 13796, 13798, 13800, 13802, 13804, 13806, 13810, 13812, 13814, 13816, 13819, 13820, 13823, 13824, 13826, 13829, 13830, 13832, 13834, 13836, 13838, 13840, 13843, 13851, 13855, 13856, 13890, 13892, 13894, 13896, 13909, 13949, 13951, 13953, 13970, 14015, 14016, 14019, 14020, 14023, 14024, 14028, 14029, 14032, 14033, 14036, 14037, 14054, 14055, 14058, 14059, 14060, 14062, 14192, 14215, 14294, 14295, 14298, 14299, 14300, 14301, 14302, 14303, 14305, 14306, 14314, 14321, 14324, 14325, 14327, 14353, 14362, 14363, 14364, 14370, 14378, 14393, 14399, 14400, 14410, 14411, 14414, 14417, 14418, 14419, 14421, 14425, 14426, 14454, 14499, 14500, 14535, 14536, 14539, 14540, 14545, 14588, 14613, 14614, 14615, 14616, 14656, 14663, 14709, 14712, 14713, 14714, 14715, 14716, 14717, 14754, 14757, 14759, 14762, 14763, 14767, 14768, 14771, 14781, 14784, 14795, 14796, 14799, 14800, 14813, 14873, 14874, 14876, 14880, 14882, 14912, 14914, 14943, 14944, 14946, 14947, 14973, 14974, 14975, 14976, 14977, 14978, 14979, 14980, 14981, 14982, 14983, 14984, 14996, 14999, 15001, 15002, 15013, 15033, 15094, 15098, 15100, 15112, 15116, 15140, 15143, 15154, 15155, 15177, 15179, 15188, 15190, 15191, 15197, 15199, 15208, 15209, 15212, 15213, 15218, 15219, 15220, 15223, 15225, 15226, 15229, 15232, 15236, 15241, 15242, 15244, 15246, 15249, 15250, 15253, 15254, 15255, 15256, 15257, 15258, 15262, 15264, 15266, 15272, 15282, 15283, 15286, 15287, 15300, 15306, 15307, 15308, 15312, 15316, 15317, 15321, 15323, 15325, 15328, 15330, 15332, 15341, 15349, 15353, 15358, 15368, 15372, 15373, 15377, 15388, 15390, 15391, 15407, 15410, 15420, 15425, 15429, 15430, 15443, 15446, 15449, 15450, 15453, 15454, 15455, 15458, 15459, 15466, 15472, 15475, 15477, 15480, 15482, 15503, 15505, 15508, 15510, 15514, 15516, 15518, 15520, 15522, 15523, 15525, 15526, 15527, 15529, 15530, 15531, 15535, 15539, 15541, 15542, 15549, 15551, 15564, 15570, 15580, 15585, 15594, 15598, 15599, 15602, 15605, 15607, 15608, 15618, 15619, 15620, 15623, 15628, 15629, 15631, 15633, 15639, 15640, 15645, 15647, 15652, 15653, 15663, 15664, 15666, 15669, 15670, 15702, 15708, 15712, 15715, 15717, 15719, 15721, 15723, 15724, 15725, 15727, 15730, 15751, 15754, 15764, 15765, 15768, 15769, 15772, 15773, 15777, 15781, 15783, 15795, 15796, 15797, 15798, 15799, 15800, 15801, 15802, 15810, 15812, 15822, 15824, 15826, 15828, 15830, 15832, 15834, 15836, 15839, 15841, 15842, 15846, 15848, 15850, 15852, 15854, 15857, 15859, 15861, 15865, 15871, 15873, 15874, 15876, 15877, 15885, 15886, 15888, 15890, 15892, 15894, 15897, 15898, 15899, 15907, 15908, 15910, 15911, 15913, 15917, 15919, 15924, 15928, 15930, 15933, 15940, 15947, 15950, 15952, 15957, 15959, 15965, 15967, 15974, 15980, 15999, 16000, 16009, 16010, 16014, 16016, 16018, 16019, 16030, 16031, 16036, 16038, 16046, 16059, 16062, 16065, 16069, 16073, 16078, 16080, 16084, 16085, 16086, 16087, 16090, 16092, 16094, 16095, 16104, 16107, 16113, 16115, 16116, 16117, 16119, 16120, 16121, 16122, 16124, 16126, 16133, 16148, 16150, 16152, 16153, 16161, 16171, 16183, 16185, 16186, 16187, 16193, 16196, 16198, 16200, 16202, 16210, 16211, 16218, 16221, 16222, 16223, 16227, 16230, 16231, 16232, 16238, 16239, 16240, 16247, 16249, 16281, 16288, 16289, 16290, 16291, 16296, 16298, 16299, 16315, 16318, 16321, 16322, 16327, 16334, 16337, 16338, 16344, 16345, 16363, 16365, 16367, 16372, 16381, 16388, 16390, 16392, 16394, 16399, 16400, 16410, 16412, 16420, 16424, 16429, 16431, 16434, 16436, 16440, 16441, 16443, 16445, 16447, 16450, 16456, 16457, 16460, 16461, 16462, 16466, 16467, 16477, 16487, 16488, 16492, 16493, 16496, 16497, 16499, 16501, 16504, 16507, 16511, 16512, 16516, 16517, 16518, 16520, 16526, 16527, 16531, 16532, 16537, 16538, 16541, 16543, 16544, 16545, 16546, 16547, 16548, 16549, 16550, 16551, 16552, 16553, 16554, 16557, 16558, 16561, 16562, 16565, 16566, 16569, 16585, 16588, 16592, 16596, 16597, 16600, 16601, 16604, 16606, 16610, 16613, 16627, 16636, 16639, 16640, 16644, 16647, 16649, 16650, 16653, 16654, 16663, 16668, 16671, 16672, 16675, 16676, 16677, 16678, 16679, 16680, 16681, 16682, 16683, 16684, 16685, 16686, 16687, 16688, 16689, 16690, 16691, 16694, 16695, 16696, 16698, 16709, 16713, 16716, 16718, 16722, 16725, 16726, 16732, 16733, 16736, 16739, 16740, 16744, 16745, 16748, 16749, 16750, 16751, 16752, 16753, 16754, 16760, 16763, 16764, 16765, 16775, 16776, 16777, 16778, 16779, 16780, 16781, 16782, 16785, 16791, 16792, 16795, 16796, 16797, 16798, 16799, 16800, 16801, 16802, 16803, 16804, 16805, 16812, 16820, 16833, 16834, 16845, 16846, 16850, 16853, 16856, 16857, 16859, 16864, 16865, 16867, 16869, 16905, 16907, 16911, 16914, 16923, 16924, 16926, 16932, 16936, 16945, 16948, 16949, 16959, 16963, 16965, 16976, 16979, 16980, 17001, 17004, 17007, 17022, 17025, 17026, 17027, 17031, 17037, 17047, 17068, 17069, 17082, 17090, 17114, 17116, 17120, 17121, 17124, 17136, 17138, 17160, 17165, 17172, 17174, 17178, 17179, 17180, 17197, 17211, 17214, 17215, 17220, 17223, 17226, 17230, 17231, 17234, 17236, 17241, 17242, 17245, 17251, 17260, 17265, 17266, 17268, 17269, 17271, 17275, 17282, 17284, 17293, 17294, 17297, 17306, 17311, 17313, 17315, 17325, 17326, 17327, 17334, 17339, 17340, 17341, 17346, 17350, 17351, 17354, 17355, 17358, 17359, 17362, 17363, 17366, 17368, 17369, 17374, 17375, 17377, 17381, 17388, 17403, 17412, 17419, 17420, 17421, 17424, 17427, 17428, 17435, 17436, 17439, 17440, 17441, 17442, 17448, 17449, 17458, 17465, 17471, 17475, 17476, 17480, 17482, 17483, 17484, 17486, 17487, 17489, 17491, 17492, 17493, 17495, 17496, 17497, 17499, 17500, 17501, 17506, 17508, 17509, 17514, 17515, 17517, 17529, 17531, 17534, 17543, 17548, 17550, 17551, 17564, 17566, 17567, 17571, 17577, 17579, 17582, 17614, 17623, 17624, 17629, 17636, 17640, 17641, 17651, 17652, 17660, 17666, 17667, 17669, 17670, 17671, 17676, 17683, 17684, 17690, 17723, 17734, 17742, 17744, 17770, 17775, 17776, 17779, 17780, 17785, 17790, 17791, 17810, 17813, 17814, 17815, 17819, 17820, 17828, 17830, 17842, 17843, 17849, 17850, 17873, 17878, 17882, 17884, 17894, 17895, 17898, 17905, 17907, 17912, 17916, 17917, 17919, 17922, 17923, 17926, 17927, 17930, 17931, 17934, 17935, 17937, 17940, 17941, 17944, 17945, 17947, 17948, 17952, 17953, 17959, 17960, 17963, 17964, 17967, 17968, 17969, 17979, 17980, 17981, 17987, 17999, 18000, 18003, 18008, 18009, 18018, 18019, 18021, 18022, 18041, 18043, 18044, 18049, 18052, 18057, 18060, 18061, 18067, 18073, 18079, 18080, 18086, 18090, 18095, 18097, 18100, 18106, 18108, 18110, 18112, 18113, 18119, 18121, 18123, 18125, 18126, 18129, 18132, 18133, 18137, 18148, 18149, 18151, 18153, 18161, 18171, 18173, 18180, 18184, 18185, 18191, 18196, 18197, 18200, 18201, 18205, 18206, 18212, 18217, 18220, 18233, 18234, 18239, 18247, 18248, 18252, 18256, 18257, 18259, 18260, 18262, 18265, 18266, 18276, 18293, 18298, 18299, 18305, 18309, 18318, 18319, 18331, 18332, 18335, 18337, 18344, 18346, 18348, 18386, 18391, 18392, 18395, 18396, 18419, 18433, 18436, 18438, 18440, 18441, 18442, 18447, 18451, 18452, 18453, 18455, 18458, 18465, 18466, 18468, 18469, 18472, 18478, 18482, 18486, 18488, 18491, 18496, 18499, 18508, 18521, 18524, 18537, 18541, 18548, 18550, 18555, 18559, 18564, 18565, 18574, 18575, 18585, 18586, 18587, 18588, 18596, 18597, 18598, 18605, 18606, 18608, 18612, 18613, 18614, 18618, 18619, 18625, 18629, 18630, 18663, 18665, 18677, 18678, 18680, 18699, 18705, 18706, 18707, 18708, 18711, 18716, 18729, 18730, 18737, 18757, 18758, 18763, 18767, 18768, 18770, 18774, 18775, 18777, 18778, 18781, 18782, 18785, 18791, 18794, 18796, 18798, 18800, 18802, 18804, 18806, 18808, 18810, 18827, 18830, 18831, 18840, 18842, 18844, 18846, 18858, 18867, 18869, 18871, 18873, 18875, 18883, 18884, 18897, 18903, 18905, 18907, 18910, 18917, 18918, 18923, 18926, 18929, 18931, 18932, 18939, 18968, 18969, 18978, 18979, 18981, 18983, 18985, 18986, 18991, 18993, 19002, 19004, 19019, 19048, 19050, 19061, 19063, 19086, 19091, 19100, 19101, 19106, 19107, 19115, 19116, 19119, 19120, 19121, 19122, 19125, 19126, 19137, 19138, 19140, 19147, 19155, 19161, 19166, 19169, 19171, 19173, 19175, 19177, 19179, 19181, 19183, 19185, 19187, 19193, 19195, 19199, 19204, 19207, 19210, 19217, 19225, 19229, 19242, 19243, 19245, 19250, 19268, 19271, 19278, 19280, 19281, 19282, 19306, 19307, 19310, 19311, 19315, 19316, 19318, 19327, 19333, 19334, 19335, 19339, 19340, 19341, 19348, 19355, 19365, 19366, 19379, 19380, 19381, 19387, 19391, 19393, 19397, 19399, 19413, 19420, 19421, 19424, 19425, 19428, 19431, 19441, 19442, 19443, 19444, 19450, 19451, 19461, 19462, 19464, 19465, 19466, 19467, 19471, 19473, 19475, 19477, 19487, 19488, 19491, 19493, 19494, 19498, 19500, 19504, 19506, 19508, 19510, 19511, 19512, 19517, 19518, 19519, 19525, 19526, 19534, 19535, 19545, 19570, 19571, 19572, 19573, 19574, 19586, 19587, 19588, 19589, 19596, 19598, 19613, 19640, 19660, 19664, 19665, 19713, 19714, 19716, 19717, 19724, 19729, 19730, 19785, 19790, 19792, 19794, 19803, 19804, 19806, 19809, 19810, 19811, 19812, 19816, 19818, 19819, 19820, 19823, 19826, 19828, 19830, 19832, 19834, 19836, 19846, 19881, 19887, 19888, 19912, 19919, 19947, 19948, 19967, 19968, 19975, 19984, 19992, 19994, 20006, 20022, 20034, 20035, 20038, 20053, 20058, 20059, 20061, 20079, 20080, 20083, 20084, 20087, 20088, 20097, 20099, 20102, 20107, 20108, 20109, 20112, 20115, 20116, 20118, 20119, 20120, 20123, 20126, 20143, 20149, 20169, 20170, 20176, 20181, 20183, 20184, 20189, 20190, 20202, 20206, 20210, 20212, 20214, 20215, 20220, 20222, 20232, 20237, 20253, 20256, 20257, 20267, 20270, 20286, 20305, 20314, 20316, 20320, 20322, 20323, 20332, 20365, 20370, 20371, 20378, 20379, 20384, 20385, 20387, 20391, 20392, 20396, 20420, 20430, 20445, 20446, 20452, 20454, 20460, 20482, 20485, 20486, 20491, 20492, 20495, 20496, 20497, 20498, 20503, 20504, 20505, 20506, 20520, 20535, 20542, 20546, 20552, 20553, 20558, 20563, 20579, 20581, 20583, 20584, 20614, 20616, 20622, 20628, 20632, 20641, 20642, 20650, 20652, 20653, 20656, 20659, 20664, 20669, 20672, 20693, 20696, 20700, 20702, 20705, 20706, 20709, 20710, 20714, 20715, 20718, 20719, 20722, 20723, 20740, 20748, 20754, 20755, 20768, 20771, 20796, 20797, 20804, 20806, 20811, 20840, 20855, 20861, 20866, 20869, 20873, 20875, 20877, 20880, 20884, 20886, 20887, 20888, 20889, 20905, 20920, 20942, 20947, 20948, 20951, 20955, 20956, 20981, 20982, 20992, 20994, 21000, 21001, 21006, 21012, 21013, 21014, 21022, 21041, 21042, 21043, 21047, 21050, 21052, 21062, 21064, 21068, 21084, 21085, 21089, 21091, 21095, 21100, 21104, 21128, 21136, 21162, 21163, 21164, 21167, 21172, 21175, 21178, 21180, 21181, 21183, 21186, 21187, 21190, 21207, 21208, 21216, 21218, 21219, 21222, 21223, 21231, 21232, 21237, 21252, 21255, 21258, 21270, 21271, 21293, 21310, 21311, 21314, 21315, 21332, 21335, 21336, 21338, 21339, 21340, 21349, 21390, 21399, 21401, 21415, 21419, 21420, 21436, 21449, 21450, 21451, 21452, 21453, 21454, 21455, 21456, 21458, 21464, 21465, 21470, 21480, 21485, 21494, 21495, 21498, 21502, 21503, 21508, 21510, 21511, 21512, 21514, 21517, 21518, 21527, 21533, 21534, 21540, 21541, 21542, 21558, 21559, 21566, 21567, 21570, 21571, 21590, 21604, 21619, 21621, 21629, 21645, 21647, 21650, 21655, 21656, 21660, 21667, 21669, 21671, 21674, 21676, 21678, 21680, 21681, 21683, 21686, 21701, 21704, 21710, 21712, 21714, 21720, 21740, 21741, 21743, 21745, 21746, 21751, 21761, 21766, 21771, 21772, 21775, 21776, 21778, 21781, 21783, 21799, 21800, 21803, 21804, 21808, 21809, 21812, 21813, 21815, 21817, 21818, 21819, 21821, 21828, 21829, 21836, 21837, 21838, 21840, 21842, 21843, 21848, 21849, 21850, 21852, 21856, 21857, 21858, 21860, 21862, 21864, 21866, 21868, 21871, 21873, 21874, 21876, 21878, 21880, 21883, 21884, 21887, 21904, 21905, 21923, 21924, 21928, 21930, 21942, 21944, 21946, 21949, 21964, 21972, 21996, 22001, 22008, 22009, 22011, 22014, 22016, 22017, 22020, 22028, 22029, 22031, 22035, 22037, 22039, 22045, 22047, 22052, 22057, 22058, 22092, 22093, 22095, 22097, 22099, 22102, 22110, 22112, 22119, 22120, 22121, 22127, 22129, 22141, 22142, 22151, 22152, 22153, 22165, 22187, 22188, 22210, 22220, 22222, 22224, 22226, 22230, 22231, 22242, 22245, 22246, 22250, 22252, 22328, 22331, 22360, 22362, 22364, 22366, 22368, 22370, 22372, 22374, 22376, 22378, 22380, 22385, 22393, 22402, 22403, 22408, 22414, 22422, 22427, 22434, 22438, 22439, 22456, 22476, 22481, 22482, 22483, 22484, 22485, 22499, 22504, 22515, 22518, 22519, 22529, 22555, 22557, 22558, 22559, 22560, 22561, 22562, 22563, 22564, 22565, 22590, 22594, 22596, 22600, 22602, 22608, 22609, 22612, 22613, 22615, 22616, 22618, 22619, 22636, 22660, 22665, 22666, 22671, 22679, 22681, 22683, 22685, 22687, 22689, 22691, 22693, 22695, 22697, 22699, 22717, 22730, 22737, 22738, 22740, 22741, 22755, 22766, 22767, 22768, 22775, 22780, 22781, 22804, 22807, 22815, 22821, 22822, 22826, 22827, 22828, 22829, 22830, 22831, 22835, 22836, 22838, 22842, 22847, 22850, 22851, 22853, 22854, 22863, 22864, 22865, 22866, 22867, 22868, 22869, 22870, 22871, 22872, 22881, 22890, 22897, 22898, 22900, 22904, 22910, 22915, 22916, 22917, 22918, 22926, 22927, 22935, 22936, 22937, 22939, 22940, 22941, 22954, 22955, 22957, 22959, 22965, 22971, 22973, 22975, 22980, 23001, 23016, 23018, 23020, 23021, 23025, 23035, 23050, 23053, 23062, 23065, 23067, 23070, 23071, 23075, 23079, 23080, 23083, 23085, 23086, 23088, 23089, 23092, 23093, 23095, 23096, 23098, 23099, 23100, 23109, 23110, 23111, 23112, 23121, 23126, 23129, 23130, 23152, 23162, 23163, 23166, 23168, 23169, 23174, 23175, 23177, 23178, 23183, 23184, 23186, 23196, 23204, 23205, 23220, 23225, 23226, 23239, 23248, 23251, 23255, 23260, 23261, 23271, 23272, 23274, 23281, 23282, 23292, 23293, 23295, 23296, 23307, 23327, 23330, 23334, 23354, 23368, 23369, 23375, 23376, 23380, 23388, 23391, 23393, 23395, 23398, 23399, 23401, 23423, 23446, 23448, 23452, 23469, 23470, 23472, 23473, 23474, 23475, 23476, 23480, 23503, 23527, 23528, 23531, 23532, 23534, 23535, 23537, 23538, 23540, 23541, 23543, 23544, 23546, 23547, 23550, 23552, 23556, 23560, 23588, 23589, 23591, 23594, 23595, 23644, 23651, 23652, 23661, 23664, 23666, 23669, 23670, 23673, 23674, 23675, 23676, 23686, 23689, 23692, 23696, 23697, 23713, 23717, 23722, 23728, 23729, 23737, 23738, 23742, 23746, 23750, 23758, 23760, 23761, 23765, 23771, 23778, 23780, 23781, 23794, 23801, 23802, 23803, 23804, 23805, 23811, 23814, 23830, 23833, 23841, 23843, 23847, 23849, 23850, 23851, 23852, 23853, 23858, 23860, 23863, 23886, 23888, 23891, 23899, 23901, 23909, 23910, 23912, 23918, 23921, 23931, 23934, 23935, 23936, 23938, 23939, 23949, 23955, 23956, 23967, 23970, 23973, 23975, 23976, 23983, 23986, 23991, 24000, 24004, 24005, 24006, 24014, 24018, 24024, 24026, 24030, 24031, 24033, 24034, 24043, 24049, 24050, 24058, 24060, 24062, 24064, 24066, 24067, 24072, 24075, 24076, 24078, 24089, 24093, 24095, 24135, 24143, 24144, 24149, 24151, 24159, 24160, 24168, 24169, 24179, 24187, 24190, 24192, 24194, 24196, 24198, 24199, 24202, 24203, 24204, 24205, 24210, 24211, 24212, 24215, 24216, 24230, 24232, 24233, 24234, 24236, 24237, 24242, 24249, 24250, 24251, 24253, 24258, 24260, 24261, 24263, 24270, 24271, 24276, 24283, 24285, 24286, 24290, 24292, 24294, 24296, 24298, 24299, 24300, 24307, 24308, 24310, 24313, 24315, 24317, 24318, 24321, 24323, 24326, 24327, 24331, 24340, 24341, 24342, 24343, 24349, 24355, 24357, 24363, 24368, 24371, 24372, 24397, 24398, 24403, 24404, 24405, 24406, 24407, 24413, 24414, 24442, 24462, 24469, 24473, 24474, 24479, 24485, 24486, 24501, 24504, 24507, 24519, 24520, 24521, 24522, 24523, 24524, 24525, 24526, 24527, 24528, 24529, 24533, 24539, 24540, 24542, 24546, 24547, 24548, 24550, 24552, 24554, 24557, 24558, 24559, 24565, 24566, 24567, 24576, 24581, 24582, 24586, 24595, 24612, 24613, 24615, 24616, 24638, 24651, 24664, 24668, 24674, 24678, 24683, 24694, 24697, 24702, 24705, 24709, 24715, 24727, 24729, 24739, 24740, 24742, 24744, 24749, 24750, 24756, 24765, 24770, 24772, 24774, 24776, 24778, 24786, 24790, 24794, 24796, 24808, 24814, 24815, 24816, 24821, 24822, 24824, 24864, 24865, 24866, 24877, 24886, 24901, 24902, 24915, 24916, 24918, 24919, 24920, 24921, 24930, 24935, 24936, 24940, 24945, 24952, 24955, 24956, 24965, 24966, 24979, 24980, 24981, 24982, 24983, 24984, 24985, 24986, 24987, 24988, 24989, 24990, 24991, 25005, 25019, 25024, 25028, 25043, 25044, 25045, 25046, 25047, 25048, 25049, 25050, 25051, 25052, 25053, 25054, 25056, 25060, 25075, 25076, 25082, 25083, 25084, 25085, 25086, 25087, 25099, 25100, 25105, 25110, 25111, 25116, 25142, 25143, 25161, 25162, 25185, 25186, 25193, 25208, 25210, 25211, 25233, 25234, 25235, 25236, 25247, 25249, 25250, 25264, 25271, 25274, 25291, 25294, 25305, 25306, 25307, 25311, 25312, 25313, 25314, 25323, 25324, 25343, 25352, 25355, 25360, 25361, 25362, 25363, 25368, 25369, 25370, 25371, 25372, 25377, 25393, 25403, 25404, 25405, 25406, 25407, 25408, 25409, 25410, 25411, 25412, 25431, 25432, 25433, 25434, 25435, 25436, 25437, 25438, 25439, 25440, 25452, 25458, 25462, 25463, 25472, 25473, 25475, 25478, 25480, 25488, 25492, 25505, 25506, 25509, 25512, 25517, 25518, 25523, 25544, 25547, 25548, 25554, 25555, 25556, 25557, 25562, 25563, 25564, 25565, 25581, 25583, 25591, 25594, 25598, 25599, 25600, 25602, 25603, 25605, 25607, 25608, 25616, 25619, 25620, 25621, 25622, 25634, 25635, 25636, 25637, 25645, 25647, 25648, 25649, 25655, 25657, 25658, 25666, 25674, 25681, 25685, 25687, 25688, 25693, 25695, 25696, 25697, 25704, 25707, 25711, 25713, 25717, 25718, 25735, 25736, 25737, 25745, 25763, 25764, 25766, 25771, 25777, 25778, 25779, 25780, 25791, 25796, 25797, 25798, 25799, 25800, 25801, 25805, 25807, 25810, 25811, 25812, 25813, 25814, 25815, 25816, 25817, 25818, 25819, 25820, 25821, 25822, 25823, 25824, 25825, 25826, 25827, 25828, 25829, 25830, 25875, 25878, 25879, 25880, 25881, 25883, 25884, 25887, 25888, 25896, 25898, 25904, 25913, 25914, 25922, 25935, 25939, 25941, 25944, 25945, 25946, 25947, 25948, 25949, 25955, 25959, 25960, 25971, 25983, 26063, 26069, 26070, 26073, 26074, 26077, 26096, 26097, 26101, 26103, 26113, 26114, 26123, 26168, 26169, 26172, 26173, 26180, 26181, 26186, 26188, 26191, 26192, 26206, 26217, 26227, 26231, 26238, 26243, 26245, 26249, 26250, 26260, 26293, 26299, 26306, 26311, 26317, 26330, 26335, 26339, 26342, 26347, 26354, 26355, 26365, 26369, 26375, 26377, 26378, 26386, 26390, 26396, 26397, 26398, 26404, 26405, 26406, 26412, 26414, 26438, 26439, 26440, 26441, 26448, 26464, 26471, 26482, 26493, 26516, 26525, 26542, 26544, 26548, 26552, 26553, 26554, 26600, 26601, 26604, 26605, 26631, 26632, 26636, 26639, 26640, 26654, 26657, 26671, 26672, 26697, 26716, 26725, 26743, 26762, 26769, 26771, 26777, 26799, 26800, 26801, 26806, 26807, 26821, 26825, 26835, 26837, 26841, 26844, 26850, 26872, 26874, 26875, 26879, 26880, 26887, 26888, 26890, 26892, 26896, 26897, 26898, 26900, 26906, 26907, 26939, 26943, 26986, 26991, 26992, 26995, 27001, 27010, 27015, 27016, 27017, 27024, 27026, 27052, 27053, 27054, 27055, 27063, 27067, 27074, 27082, 27113, 27114, 27115, 27116, 27117, 27119, 27120, 27128, 27129, 27133, 27141, 27142, 27143, 27144, 27146, 27147, 27151, 27156, 27162, 27164, 27168, 27189, 27208, 27212, 27214, 27222, 27224, 27227, 27259, 27260, 27261, 27274, 27285, 27286, 27287, 27289, 27296, 27297, 27299, 27302, 27305, 27306, 27315, 27317, 27321, 27326, 27327, 27331, 27333, 27340, 27344, 27345, 27348, 27351, 27360, 27362, 27363, 27366, 27368, 27371, 27372, 27377, 27379, 27380, 27384, 27385, 27387, 27389, 27401, 27403, 27411, 27413, 27415, 27416, 27432, 27434, 27435, 27440, 27441, 27442, 27448, 27452, 27463, 27473, 27476, 27489, 27491, 27493, 27495, 27497, 27499, 27501, 27503, 27508, 27519, 27524, 27528, 27533, 27534, 27541, 27547, 27548, 27549, 27556, 27557, 27566, 27568, 27569, 27572, 27593, 27594, 27596, 27597, 27598, 27599, 27600, 27602, 27604, 27606, 27608, 27609, 27613, 27614, 27616, 27628, 27634, 27644, 27647, 27652, 27654, 27661, 27688, 27694, 27695, 27698, 27704, 27710, 27711, 27712, 27713, 27715, 27742, 27756, 27758, 27760, 27763, 27777, 27782, 27792, 27793, 27809, 27822, 27824, 27834, 27836, 27848, 27889, 27890, 27891, 27892, 27893, 27904, 27908, 27909, 27912, 27916, 27917, 27921, 27922, 27923, 27924, 27928, 27931, 27933, 27936, 27937, 27940, 27941, 27944, 27946, 27947, 27952, 27954, 27956, 27959, 27960, 27961, 27962, 27963, 27965, 27970, 27971, 27983, 27995, 27997, 27999, 28008, 28009, 28017, 28024, 28026, 28029, 28032, 28033, 28036, 28037, 28039, 28050, 28058, 28059, 28094, 28095, 28096, 28100, 28118, 28125, 28128, 28130, 28136, 28138, 28139, 28142, 28146, 28147, 28150, 28152, 28153, 28155, 28160, 28163, 28165, 28166, 28168, 28171, 28175, 28176, 28177, 28178, 28185, 28187, 28189, 28190, 28191, 28192, 28195, 28197, 28200, 28202, 28208, 28213, 28222, 28227, 28302, 28305, 28307, 28309, 28312, 28314, 28317, 28362, 28363, 28365, 28366, 28369, 28372, 28403, 28404, 28408, 28409, 28429, 28430, 28431, 28432, 28433, 28441, 28488, 28503, 28536, 28537, 28538, 28546, 28562, 28564, 28570, 28630, 28631, 28637, 28640, 28651, 28655, 28659, 28660, 28661, 28689, 28692, 28693, 28694, 28695, 28696, 28702, 28705, 28711, 28713, 28714, 28715, 28716, 28720, 28721, 28722, 28723, 28724, 28744, 28747, 28749, 28750, 28751, 28756, 28759, 28762, 28766, 28768, 28769, 28772, 28777, 28787, 28790, 28791, 28792, 28794, 28798, 28801, 28802, 28803, 28805, 28809, 28826, 28839, 28852, 28853, 28856, 28857, 28859, 28884, 28886, 28894, 28906, 28907, 28910, 28923, 28930, 28935, 28936, 28939, 28940, 28944, 28949, 28952, 28955, 28956, 28957, 28958, 28959, 28960, 28961, 28962, 28963, 28964, 28966, 28968, 28972, 28973, 28974, 29006, 29009, 29014, 29016, 29017, 29018, 29032, 29035, 29045, 29046, 29049, 29083, 29101, 29109, 29112, 29116, 29117, 29131, 29182, 29201, 29204, 29226, 29235, 29236, 29240, 29249, 29267, 29324, 29329, 29330, 29340, 29341, 29342, 29353, 29354, 29365, 29367, 29370, 29388, 29393, 29394, 29396, 29397, 29399, 29400, 29401, 29427, 29430, 29442, 29475, 29479, 29481, 29483, 29487, 29490, 29492, 29494, 29501, 29503, 29509, 29511, 29513, 29515, 29517, 29519, 29520, 29521, 29527, 29528, 29533, 29534, 29545, 29549, 29572, 29590, 29598, 29600, 29608, 29610, 29611, 29625, 29626, 29638, 29641, 29644, 29647, 29655, 29658, 29688, 29689, 29692, 29693, 29698, 29700, 29702, 29703, 29705, 29707, 29709, 29711, 29713, 29715, 29718, 29721, 29725, 29726, 29730, 29731, 29732, 29735, 29739, 29760, 29761, 29763, 29769, 29770, 29776, 29777, 29778, 29785, 29786, 29790, 29831, 29832, 29834, 29850, 29851, 29854, 29857, 29861, 29865, 29868, 29869, 29872, 29873, 29883, 29884, 29897, 29902, 29921, 29988, 30006, 30042, 30049, 30050, 30063, 30064, 30071, 30072, 30073, 30150, 30152, 30168, 30169, 30190, 30191, 30194, 30198, 30200, 30201, 30202, 30240, 30242, 30311, 30323, 30327, 30362, 30370, 30371, 30373, 30375, 30378, 30379, 30382, 30383, 30385, 30387, 30389, 30391, 30403, 30438, 30452, 30463, 30465, 30467, 30470, 30471, 30474, 30477, 30478, 30479, 30480, 30482, 30486, 30487, 30490, 30521, 30529, 30531, 30532, 30535, 30536, 30578, 30579, 30581, 30590, 30601, 30605, 30609, 30610, 30628, 30629, 30632, 30634, 30662, 30664, 30666, 30669, 30670, 30675, 30677, 30679, 30682, 30684, 30686, 30687, 30689, 30691, 30692, 30711, 30713, 30743, 30744, 30749, 30752, 30764, 30766, 30767, 30771, 30774, 30776, 30794, 30806, 30817, 30818, 30848, 30849, 30861, 30863, 30864, 30865, 30866, 30867, 30882, 30884, 30894, 30896, 30898, 30899, 30976, 30977, 31013, 31023, 31024, 31035, 31036, 31038, 31041, 31093, 31125, 31165, 31169, 31181, 31192, 31312, 31391, 31415, 31416, 31521, 31525, 31568, 31569, 31577, 31580, 31609, 31610, 31624, 31645, 31646, 31655, 31681, 31704, 31708, 31719, 31734, 31735, 31738, 31754, 31765, 31822, 31824, 31834, 31841, 31849, 31850, 31881, 31953, 31962); +UPDATE `creature_model_info` SET `gender`=2 WHERE `modelid` IN (4, 13, 14, 15, 21, 22, 30, 38, 62, 64, 65, 69, 71, 73, 91, 92, 110, 123, 134, 137, 141, 145, 146, 151, 157, 158, 161, 165, 168, 169, 171, 174, 175, 176, 178, 179, 180, 181, 193, 200, 201, 204, 207, 229, 235, 236, 237, 238, 239, 245, 246, 247, 268, 269, 283, 295, 304, 320, 321, 322, 328, 332, 336, 342, 347, 352, 358, 360, 366, 367, 368, 370, 372, 376, 377, 378, 379, 380, 381, 382, 383, 384, 387, 388, 389, 397, 399, 400, 410, 413, 414, 418, 447, 453, 457, 470, 471, 473, 479, 480, 481, 482, 483, 488, 489, 490, 491, 492, 493, 494, 497, 498, 499, 500, 501, 502, 503, 505, 507, 512, 513, 514, 518, 519, 520, 525, 528, 533, 535, 538, 539, 543, 544, 545, 546, 547, 548, 549, 550, 551, 557, 558, 559, 561, 566, 568, 569, 570, 571, 580, 589, 598, 599, 601, 603, 604, 607, 609, 612, 613, 614, 615, 621, 622, 623, 624, 625, 631, 632, 633, 641, 643, 644, 646, 647, 648, 649, 651, 654, 659, 662, 666, 667, 668, 670, 671, 672, 673, 674, 675, 676, 677, 681, 682, 694, 695, 697, 698, 699, 703, 704, 705, 706, 707, 709, 711, 713, 714, 715, 719, 720, 732, 733, 734, 735, 741, 744, 748, 749, 755, 759, 760, 762, 767, 768, 775, 776, 780, 781, 782, 783, 784, 785, 787, 788, 798, 800, 801, 802, 806, 807, 814, 815, 821, 822, 827, 828, 829, 831, 833, 834, 835, 836, 846, 847, 848, 850, 855, 856, 857, 858, 859, 860, 862, 863, 864, 865, 867, 868, 869, 870, 892, 897, 901, 902, 903, 904, 907, 908, 909, 910, 911, 913, 917, 918, 925, 935, 936, 937, 945, 948, 949, 953, 954, 955, 956, 957, 958, 959, 960, 961, 963, 965, 975, 979, 981, 982, 984, 985, 986, 987, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1004, 1006, 1007, 1008, 1011, 1012, 1015, 1016, 1017, 1018, 1019, 1021, 1023, 1025, 1030, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1055, 1056, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1068, 1070, 1072, 1073, 1074, 1075, 1080, 1081, 1082, 1083, 1084, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1095, 1097, 1100, 1102, 1103, 1104, 1105, 1106, 1108, 1109, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1141, 1145, 1146, 1147, 1148, 1149, 1157, 1159, 1160, 1161, 1162, 1164, 1166, 1167, 1170, 1176, 1185, 1192, 1196, 1197, 1198, 1200, 1201, 1202, 1204, 1206, 1207, 1208, 1210, 1213, 1216, 1217, 1219, 1220, 1221, 1222, 1228, 1229, 1230, 1231, 1232, 1236, 1241, 1244, 1245, 1246, 1247, 1248, 1250, 1251, 1259, 1261, 1267, 1269, 1281, 1283, 1284, 1303, 1306, 1307, 1308, 1309, 1336, 1337, 1338, 1339, 1340, 1397, 1405, 1415, 1418, 1421, 1451, 1452, 1453, 1454, 1455, 1460, 1461, 1467, 1529, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1545, 1547, 1548, 1549, 1551, 1555, 1556, 1557, 1560, 1561, 1566, 1609, 1686, 1687, 1693, 1742, 1744, 1746, 1747, 1749, 1751, 1752, 1754, 1761, 1772, 1816, 1817, 1818, 1819, 1824, 1825, 1873, 1887, 1888, 1910, 1911, 1913, 1918, 1921, 1923, 1924, 1936, 1938, 1939, 1940, 1950, 1951, 1952, 1954, 1955, 1958, 1959, 1960, 1961, 1962, 1974, 1975, 1986, 1987, 1988, 1989, 1990, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2022, 2023, 2024, 2028, 2030, 2033, 2069, 2075, 2076, 2077, 2078, 2079, 2154, 2155, 2156, 2157, 2158, 2168, 2169, 2170, 2172, 2173, 2174, 2175, 2176, 2177, 2179, 2185, 2186, 2187, 2188, 2189, 2190, 2193, 2194, 2195, 2234, 2236, 2237, 2238, 2239, 2278, 2281, 2289, 2297, 2298, 2300, 2301, 2302, 2303, 2305, 2307, 2308, 2309, 2320, 2325, 2326, 2327, 2328, 2352, 2378, 2402, 2404, 2405, 2408, 2409, 2410, 2414, 2418, 2419, 2420, 2421, 2423, 2424, 2425, 2426, 2428, 2429, 2433, 2437, 2446, 2450, 2451, 2452, 2453, 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2533, 2536, 2537, 2538, 2539, 2540, 2541, 2542, 2543, 2544, 2545, 2546, 2548, 2549, 2550, 2552, 2567, 2568, 2569, 2570, 2571, 2573, 2574, 2582, 2592, 2598, 2599, 2600, 2601, 2602, 2606, 2609, 2676, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 2700, 2702, 2703, 2705, 2706, 2707, 2708, 2709, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2719, 2720, 2726, 2728, 2729, 2730, 2731, 2732, 2741, 2742, 2743, 2764, 2765, 2766, 2767, 2768, 2832, 2835, 2836, 2837, 2838, 2850, 2851, 2864, 2902, 2954, 2955, 2956, 2957, 2958, 2975, 2995, 2996, 3004, 3005, 3006, 3018, 3019, 3020, 3023, 3024, 3026, 3027, 3028, 3029, 3030, 3031, 3032, 3033, 3034, 3035, 3123, 3126, 3127, 3146, 3194, 3195, 3196, 3197, 3198, 3199, 3200, 3201, 3202, 3203, 3204, 3205, 3210, 3211, 3212, 3213, 3214, 3215, 3233, 3235, 3247, 3248, 3255, 3386, 3507, 3668, 3731, 3886, 3900, 3916, 3942, 3956, 4065, 4067, 4090, 4091, 4124, 4167, 4185, 4200, 4203, 4256, 4266, 4267, 4268, 4269, 4270, 4305, 4312, 4317, 4343, 4434, 4435, 4440, 4442, 4445, 4447, 4448, 4456, 4457, 4458, 4465, 4466, 4467, 4468, 4472, 4473, 4480, 4486, 4535, 4566, 4585, 4587, 4588, 4589, 4590, 4591, 4603, 4606, 4607, 4613, 4615, 4626, 4629, 4631, 4636, 4683, 4689, 4713, 4714, 4716, 4732, 4733, 4734, 4735, 4754, 4759, 4761, 4766, 4767, 4768, 4829, 4868, 4869, 4870, 4872, 4877, 4878, 4906, 4907, 4959, 4960, 5026, 5027, 5030, 5048, 5050, 5051, 5052, 5066, 5067, 5068, 5069, 5125, 5126, 5127, 5145, 5187, 5228, 5229, 5231, 5234, 5238, 5239, 5240, 5241, 5242, 5246, 5265, 5285, 5287, 5288, 5289, 5290, 5291, 5292, 5297, 5299, 5305, 5327, 5369, 5379, 5386, 5430, 5431, 5432, 5448, 5450, 5488, 5489, 5490, 5491, 5492, 5493, 5494, 5497, 5498, 5505, 5510, 5554, 5555, 5556, 5557, 5558, 5559, 5560, 5561, 5562, 5563, 5564, 5585, 5586, 5645, 5712, 5746, 5747, 5773, 5780, 5781, 5848, 5849, 5850, 5851, 5905, 5906, 5925, 5926, 5927, 5965, 5966, 5985, 5987, 5989, 5990, 6028, 6068, 6069, 6070, 6073, 6076, 6081, 6082, 6083, 6085, 6086, 6087, 6121, 6122, 6126, 6148, 6172, 6173, 6193, 6195, 6196, 6197, 6209, 6211, 6212, 6268, 6269, 6270, 6271, 6288, 6290, 6291, 6292, 6293, 6294, 6295, 6296, 6297, 6298, 6299, 6300, 6302, 6303, 6350, 6351, 6352, 6368, 6369, 6370, 6371, 6372, 6373, 6374, 6375, 6376, 6377, 6378, 6379, 6431, 6534, 6537, 6544, 6569, 6633, 6674, 6688, 6735, 6736, 6737, 6745, 6746, 6756, 6757, 6758, 6759, 6774, 6798, 6799, 6800, 6801, 6802, 6803, 6804, 6805, 6806, 6807, 6808, 6809, 6810, 6811, 6817, 6818, 6819, 6820, 6821, 6822, 6823, 6824, 6825, 6826, 6827, 6828, 6829, 6830, 6838, 6841, 6842, 6851, 6852, 6884, 6888, 6889, 6890, 6891, 6908, 6909, 6910, 6912, 6915, 6942, 6943, 6977, 7029, 7046, 7114, 7271, 7288, 7289, 7339, 7344, 7345, 7347, 7348, 7349, 7350, 7352, 7409, 7449, 7469, 7470, 7489, 7510, 7511, 7533, 7534, 7549, 7550, 7553, 7554, 7555, 7569, 7571, 7572, 7616, 7617, 7619, 7671, 7672, 7690, 7691, 7752, 7755, 7757, 7763, 7804, 7806, 7829, 7836, 7837, 7839, 7840, 7845, 7847, 7848, 7853, 7854, 7855, 7856, 7857, 7858, 7864, 7869, 7890, 7891, 7892, 7893, 7894, 7896, 7897, 7898, 7899, 7900, 7903, 7906, 7908, 7920, 7933, 7937, 7949, 7950, 7970, 7972, 7975, 7976, 8011, 8014, 8015, 8049, 8050, 8053, 8109, 8149, 8150, 8151, 8152, 8172, 8173, 8174, 8175, 8177, 8178, 8179, 8180, 8181, 8182, 8183, 8184, 8189, 8209, 8269, 8270, 8271, 8289, 8317, 8318, 8369, 8389, 8391, 8392, 8395, 8409, 8410, 8411, 8412, 8469, 8470, 8471, 8472, 8473, 8475, 8509, 8510, 8511, 8512, 8529, 8549, 8550, 8571, 8573, 8574, 8589, 8712, 8713, 8714, 8715, 8716, 8782, 8783, 8797, 8802, 8808, 8810, 8811, 8816, 8817, 8818, 8819, 8824, 8833, 8834, 8837, 8838, 8840, 8841, 8842, 8843, 8869, 8870, 8871, 8909, 8910, 8969, 8970, 8971, 8972, 9009, 9010, 9011, 9012, 9013, 9014, 9015, 9016, 9017, 9018, 9019, 9020, 9021, 9022, 9028, 9029, 9030, 9031, 9032, 9033, 9050, 9074, 9129, 9189, 9209, 9210, 9229, 9231, 9276, 9277, 9278, 9280, 9287, 9345, 9354, 9369, 9370, 9371, 9372, 9389, 9390, 9449, 9469, 9471, 9473, 9474, 9475, 9476, 9490, 9491, 9492, 9509, 9510, 9511, 9535, 9555, 9556, 9557, 9558, 9560, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9582, 9583, 9584, 9585, 9586, 9587, 9588, 9589, 9590, 9591, 9592, 9593, 9594, 9595, 9723, 9749, 9750, 9755, 9756, 9758, 9760, 9782, 9783, 9784, 9785, 9786, 9787, 9788, 9789, 9790, 9793, 9806, 9829, 9832, 9903, 9904, 9905, 9906, 9909, 9910, 9913, 9929, 9934, 9989, 9990, 9992, 9993, 9994, 9995, 9996, 9997, 10000, 10001, 10002, 10003, 10005, 10006, 10007, 10015, 10029, 10030, 10031, 10033, 10037, 10040, 10041, 10042, 10044, 10045, 10046, 10056, 10090, 10091, 10095, 10183, 10209, 10244, 10255, 10256, 10270, 10271, 10273, 10274, 10278, 10283, 10284, 10315, 10317, 10487, 10553, 10583, 10584, 10585, 10612, 10613, 10621, 10626, 10627, 10628, 10630, 10648, 10661, 10662, 10664, 10666, 10667, 10670, 10671, 10672, 10673, 10698, 10699, 10700, 10701, 10703, 10718, 10719, 10720, 10721, 10728, 10753, 10771, 10772, 10789, 10792, 10793, 10794, 10796, 10798, 10799, 10800, 10801, 10802, 10803, 10804, 10805, 10806, 10807, 10808, 10809, 10810, 10814, 10816, 10818, 10819, 10824, 10825, 10826, 10827, 10828, 10829, 10830, 10831, 10832, 10833, 10849, 10850, 10851, 10852, 10853, 10854, 10855, 10856, 10889, 10890, 10891, 10892, 10893, 10894, 10897, 10898, 10899, 10900, 10902, 10903, 10904, 10905, 10906, 10914, 10915, 10916, 10917, 10918, 10919, 10922, 10932, 10933, 10934, 10947, 10950, 10951, 10952, 10970, 10971, 10972, 10973, 10974, 10975, 10976, 10977, 10978, 10979, 10983, 10984, 10985, 10986, 10987, 10988, 10990, 10991, 10992, 10993, 10996, 11009, 11010, 11011, 11012, 11029, 11031, 11032, 11034, 11071, 11078, 11079, 11084, 11085, 11086, 11087, 11088, 11089, 11090, 11091, 11092, 11093, 11094, 11095, 11096, 11097, 11098, 11099, 11104, 11105, 11106, 11107, 11108, 11137, 11138, 11139, 11140, 11141, 11142, 11143, 11144, 11171, 11172, 11174, 11178, 11315, 11316, 11317, 11318, 11319, 11348, 11362, 11363, 11371, 11373, 11374, 11396, 11397, 11398, 11399, 11400, 11401, 11402, 11403, 11404, 11405, 11410, 11411, 11412, 11413, 11414, 11415, 11417, 11418, 11419, 11420, 11421, 11422, 11447, 11448, 11449, 11450, 11451, 11452, 11453, 11454, 11455, 11471, 11472, 11473, 11489, 11490, 11491, 11492, 11633, 11634, 11635, 11636, 11641, 11649, 11659, 11686, 11709, 11710, 11711, 11712, 11713, 11730, 11731, 11828, 11829, 11908, 11909, 11910, 11912, 11914, 11986, 12051, 12073, 12074, 12109, 12110, 12129, 12149, 12150, 12151, 12152, 12153, 12154, 12155, 12156, 12157, 12158, 12159, 12160, 12162, 12163, 12164, 12191, 12192, 12193, 12194, 12195, 12196, 12197, 12198, 12199, 12200, 12201, 12202, 12203, 12204, 12205, 12206, 12207, 12208, 12209, 12210, 12231, 12232, 12233, 12234, 12235, 12236, 12237, 12238, 12239, 12240, 12241, 12242, 12243, 12244, 12245, 12246, 12247, 12293, 12309, 12310, 12333, 12335, 12336, 12338, 12339, 12340, 12341, 12342, 12343, 12344, 12345, 12346, 12347, 12348, 12349, 12389, 12429, 12432, 12433, 12434, 12436, 12489, 12509, 12529, 12530, 12589, 12682, 12683, 12750, 12769, 12814, 12815, 12816, 12817, 12818, 12819, 12820, 12821, 12869, 12929, 12962, 12963, 12966, 13009, 13069, 13095, 13096, 13097, 13098, 13109, 13110, 13111, 13170, 13172, 13173, 13174, 13209, 13210, 13211, 13212, 13310, 13340, 13444, 13489, 13490, 13509, 13530, 13589, 13609, 13610, 13629, 13649, 13730, 13731, 13732, 13749, 13869, 13929, 13971, 13972, 13993, 14012, 14025, 14112, 14152, 14173, 14213, 14214, 14252, 14253, 14254, 14255, 14256, 14257, 14272, 14273, 14312, 14313, 14315, 14316, 14318, 14319, 14328, 14331, 14334, 14335, 14336, 14337, 14338, 14345, 14346, 14348, 14349, 14350, 14354, 14365, 14366, 14367, 14368, 14372, 14373, 14374, 14375, 14376, 14377, 14379, 14382, 14383, 14385, 14389, 14390, 14391, 14392, 14428, 14430, 14473, 14497, 14501, 14502, 14503, 14504, 14505, 14506, 14507, 14508, 14509, 14510, 14511, 14512, 14513, 14514, 14515, 14516, 14517, 14518, 14520, 14521, 14522, 14523, 14524, 14525, 14527, 14528, 14541, 14542, 14546, 14547, 14548, 14549, 14550, 14551, 14552, 14553, 14557, 14558, 14559, 14560, 14562, 14567, 14572, 14573, 14574, 14575, 14578, 14579, 14581, 14582, 14583, 14584, 14585, 14590, 14592, 14593, 14594, 14633, 14657, 14658, 14659, 14660, 14661, 14674, 14675, 14692, 14693, 14695, 14696, 14698, 14699, 14700, 14701, 14702, 14703, 14704, 14705, 14706, 14707, 14708, 14710, 14720, 14776, 14778, 14779, 14780, 14782, 14783, 14852, 14853, 14884, 14932, 14933, 14934, 14935, 14936, 14937, 14938, 14939, 14940, 14941, 14942, 14950, 14951, 14952, 14985, 14992, 15072, 15092, 15101, 15132, 15133, 15135, 15136, 15137, 15138, 15145, 15150, 15151, 15180, 15181, 15182, 15200, 15204, 15221, 15227, 15231, 15234, 15275, 15288, 15291, 15292, 15293, 15294, 15295, 15296, 15297, 15298, 15301, 15327, 15333, 15334, 15335, 15336, 15337, 15338, 15339, 15340, 15343, 15344, 15345, 15346, 15347, 15351, 15354, 15355, 15356, 15357, 15359, 15360, 15361, 15362, 15364, 15369, 15374, 15375, 15376, 15378, 15379, 15380, 15381, 15382, 15383, 15384, 15385, 15386, 15392, 15393, 15394, 15395, 15396, 15397, 15398, 15400, 15402, 15404, 15405, 15406, 15412, 15413, 15417, 15422, 15423, 15431, 15432, 15433, 15434, 15436, 15437, 15438, 15439, 15452, 15463, 15464, 15465, 15467, 15468, 15469, 15470, 15471, 15474, 15483, 15484, 15485, 15486, 15487, 15488, 15489, 15490, 15491, 15492, 15493, 15494, 15495, 15496, 15497, 15498, 15499, 15500, 15501, 15506, 15507, 15509, 15512, 15533, 15534, 15538, 15545, 15546, 15547, 15554, 15555, 15556, 15576, 15582, 15583, 15584, 15586, 15587, 15588, 15589, 15590, 15591, 15592, 15593, 15595, 15654, 15655, 15656, 15657, 15658, 15659, 15671, 15672, 15673, 15674, 15675, 15676, 15677, 15678, 15679, 15680, 15681, 15682, 15683, 15686, 15693, 15694, 15695, 15696, 15697, 15699, 15700, 15703, 15704, 15705, 15706, 15709, 15710, 15738, 15739, 15740, 15741, 15742, 15743, 15774, 15785, 15786, 15787, 15788, 15789, 15790, 15791, 15792, 15793, 15794, 15866, 15868, 15878, 15880, 15881, 15882, 15900, 15905, 15918, 15920, 15921, 15922, 15923, 15929, 15932, 15934, 15937, 15938, 15939, 15941, 15942, 15946, 15948, 15958, 15961, 15962, 15963, 15964, 15969, 15978, 15983, 15984, 15991, 16011, 16017, 16021, 16032, 16033, 16034, 16035, 16039, 16041, 16043, 16044, 16045, 16049, 16050, 16051, 16052, 16053, 16054, 16064, 16074, 16075, 16081, 16109, 16110, 16111, 16135, 16136, 16138, 16143, 16145, 16146, 16156, 16159, 16162, 16167, 16168, 16169, 16170, 16173, 16174, 16177, 16178, 16181, 16188, 16189, 16191, 16205, 16206, 16213, 16214, 16215, 16216, 16217, 16241, 16243, 16244, 16245, 16251, 16254, 16255, 16256, 16257, 16259, 16266, 16271, 16272, 16273, 16274, 16277, 16313, 16314, 16346, 16347, 16348, 16349, 16350, 16351, 16352, 16353, 16356, 16357, 16358, 16359, 16360, 16361, 16395, 16407, 16408, 16415, 16428, 16452, 16463, 16476, 16571, 16572, 16573, 16574, 16575, 16576, 16587, 16622, 16630, 16631, 16633, 16634, 16635, 16711, 16723, 16724, 16730, 16731, 16741, 16784, 16838, 16840, 16841, 16861, 16866, 16870, 16871, 16874, 16875, 16876, 16877, 16878, 16879, 16880, 16881, 16882, 16883, 16884, 16885, 16886, 16887, 16888, 16889, 16890, 16891, 16892, 16893, 16894, 16895, 16896, 16897, 16898, 16899, 16900, 16901, 16902, 16910, 16915, 16916, 16919, 16925, 16937, 16938, 16939, 16940, 16943, 16944, 16946, 16953, 16958, 16970, 16972, 16975, 16977, 16984, 16985, 16986, 16987, 16988, 16989, 16990, 16992, 16993, 16995, 16997, 16998, 16999, 17000, 17002, 17003, 17005, 17006, 17009, 17010, 17011, 17012, 17019, 17029, 17034, 17045, 17054, 17055, 17056, 17057, 17058, 17059, 17060, 17061, 17062, 17063, 17065, 17070, 17071, 17072, 17073, 17074, 17075, 17076, 17078, 17079, 17080, 17081, 17089, 17091, 17092, 17093, 17094, 17095, 17096, 17097, 17098, 17099, 17100, 17101, 17102, 17103, 17104, 17105, 17106, 17107, 17108, 17109, 17142, 17170, 17188, 17191, 17192, 17200, 17204, 17205, 17228, 17237, 17238, 17239, 17240, 17253, 17254, 17255, 17256, 17262, 17270, 17283, 17286, 17288, 17298, 17308, 17310, 17312, 17321, 17323, 17328, 17378, 17389, 17408, 17423, 17445, 17447, 17450, 17455, 17457, 17461, 17472, 17519, 17522, 17525, 17526, 17528, 17533, 17535, 17545, 17546, 17547, 17549, 17558, 17559, 17562, 17563, 17569, 17573, 17574, 17596, 17607, 17608, 17612, 17618, 17625, 17642, 17643, 17646, 17647, 17653, 17654, 17655, 17656, 17657, 17674, 17685, 17686, 17687, 17689, 17693, 17694, 17695, 17696, 17697, 17698, 17703, 17704, 17707, 17709, 17711, 17712, 17713, 17714, 17716, 17717, 17718, 17729, 17739, 17740, 17743, 17746, 17751, 17752, 17753, 17754, 17758, 17759, 17764, 17765, 17772, 17781, 17784, 17794, 17795, 17796, 17797, 17798, 17800, 17805, 17806, 17808, 17809, 17812, 17832, 17834, 17839, 17840, 17841, 17846, 17856, 17857, 17858, 17859, 17860, 17864, 17865, 17866, 17867, 17868, 17869, 17870, 17871, 17872, 17876, 17877, 17879, 17888, 17889, 17890, 17946, 17972, 18012, 18028, 18029, 18030, 18036, 18038, 18042, 18050, 18062, 18063, 18065, 18066, 18069, 18075, 18081, 18082, 18083, 18084, 18088, 18089, 18094, 18115, 18116, 18117, 18135, 18138, 18139, 18140, 18143, 18147, 18154, 18155, 18156, 18163, 18164, 18166, 18167, 18168, 18169, 18170, 18178, 18193, 18194, 18209, 18223, 18224, 18227, 18228, 18229, 18237, 18238, 18244, 18245, 18269, 18271, 18272, 18273, 18274, 18275, 18279, 18287, 18288, 18303, 18310, 18312, 18313, 18314, 18315, 18316, 18317, 18342, 18345, 18347, 18351, 18352, 18353, 18359, 18360, 18361, 18362, 18363, 18364, 18365, 18366, 18372, 18373, 18374, 18375, 18376, 18377, 18378, 18379, 18380, 18381, 18382, 18383, 18402, 18403, 18404, 18406, 18410, 18411, 18412, 18413, 18414, 18416, 18417, 18430, 18431, 18434, 18449, 18467, 18470, 18471, 18480, 18485, 18489, 18494, 18502, 18503, 18504, 18505, 18509, 18510, 18515, 18516, 18517, 18518, 18519, 18533, 18534, 18615, 18621, 18624, 18628, 18631, 18632, 18633, 18634, 18635, 18636, 18643, 18645, 18652, 18654, 18657, 18662, 18671, 18684, 18685, 18696, 18697, 18698, 18700, 18701, 18713, 18719, 18721, 18723, 18724, 18726, 18728, 18736, 18753, 18786, 18813, 18817, 18818, 18819, 18820, 18821, 18823, 18832, 18833, 18834, 18837, 18839, 18848, 18877, 18878, 18879, 18885, 18886, 18887, 18901, 18902, 18919, 18920, 18922, 18930, 18933, 18944, 18945, 18946, 18947, 18951, 18953, 18954, 18955, 18957, 18958, 18987, 18988, 18989, 18990, 18996, 18997, 18998, 19003, 19006, 19007, 19009, 19010, 19011, 19012, 19014, 19018, 19020, 19021, 19023, 19024, 19025, 19026, 19027, 19029, 19030, 19031, 19033, 19034, 19036, 19039, 19040, 19042, 19067, 19070, 19071, 19072, 19073, 19074, 19075, 19085, 19090, 19093, 19096, 19097, 19098, 19109, 19110, 19112, 19113, 19114, 19139, 19163, 19164, 19165, 19189, 19190, 19191, 19196, 19200, 19201, 19215, 19218, 19219, 19220, 19221, 19223, 19227, 19230, 19240, 19241, 19249, 19251, 19252, 19257, 19258, 19259, 19260, 19269, 19270, 19272, 19283, 19285, 19286, 19287, 19288, 19289, 19290, 19291, 19292, 19293, 19295, 19298, 19299, 19300, 19301, 19302, 19303, 19304, 19324, 19325, 19329, 19330, 19331, 19332, 19338, 19347, 19357, 19367, 19369, 19370, 19371, 19373, 19375, 19376, 19377, 19378, 19383, 19400, 19401, 19403, 19404, 19405, 19406, 19407, 19408, 19410, 19414, 19416, 19422, 19435, 19436, 19438, 19454, 19455, 19456, 19458, 19478, 19479, 19480, 19482, 19483, 19484, 19501, 19527, 19528, 19529, 19530, 19531, 19537, 19540, 19554, 19590, 19592, 19593, 19594, 19600, 19603, 19604, 19605, 19606, 19607, 19608, 19609, 19610, 19611, 19616, 19618, 19621, 19634, 19658, 19659, 19662, 19663, 19667, 19669, 19670, 19672, 19673, 19674, 19677, 19678, 19681, 19682, 19685, 19687, 19688, 19689, 19690, 19691, 19694, 19695, 19696, 19701, 19702, 19704, 19705, 19709, 19718, 19719, 19726, 19727, 19728, 19732, 19733, 19734, 19735, 19736, 19742, 19743, 19754, 19757, 19758, 19759, 19760, 19763, 19764, 19766, 19767, 19768, 19770, 19771, 19775, 19776, 19777, 19779, 19781, 19783, 19784, 19786, 19788, 19793, 19796, 19838, 19839, 19844, 19850, 19852, 19853, 19855, 19856, 19857, 19858, 19859, 19860, 19861, 19862, 19863, 19864, 19865, 19866, 19867, 19868, 19869, 19870, 19874, 19875, 19876, 19879, 19880, 19882, 19883, 19884, 19891, 19892, 19893, 19897, 19898, 19901, 19902, 19910, 19911, 19913, 19916, 19917, 19943, 19944, 19951, 19952, 19961, 19962, 19963, 19971, 19972, 19973, 19974, 19976, 19979, 19980, 19985, 19986, 19987, 19988, 19995, 19996, 19997, 19998, 19999, 20001, 20007, 20008, 20009, 20010, 20011, 20012, 20013, 20014, 20015, 20021, 20024, 20025, 20026, 20027, 20029, 20030, 20037, 20039, 20042, 20048, 20049, 20062, 20064, 20066, 20067, 20069, 20076, 20089, 20090, 20093, 20094, 20098, 20101, 20103, 20104, 20135, 20137, 20138, 20139, 20142, 20144, 20146, 20148, 20151, 20152, 20153, 20154, 20162, 20180, 20211, 20213, 20223, 20224, 20226, 20227, 20229, 20230, 20231, 20238, 20239, 20242, 20245, 20247, 20249, 20250, 20259, 20260, 20261, 20263, 20264, 20265, 20271, 20272, 20273, 20274, 20276, 20278, 20281, 20282, 20292, 20293, 20294, 20297, 20298, 20299, 20300, 20306, 20307, 20308, 20309, 20324, 20327, 20329, 20344, 20345, 20346, 20347, 20348, 20349, 20359, 20364, 20366, 20375, 20376, 20389, 20390, 20399, 20400, 20401, 20402, 20403, 20404, 20405, 20406, 20407, 20408, 20409, 20410, 20411, 20412, 20413, 20414, 20415, 20417, 20424, 20431, 20432, 20433, 20456, 20469, 20471, 20473, 20476, 20477, 20516, 20517, 20519, 20521, 20522, 20530, 20531, 20538, 20539, 20540, 20541, 20544, 20547, 20554, 20555, 20556, 20560, 20570, 20571, 20572, 20573, 20574, 20575, 20576, 20577, 20586, 20587, 20588, 20589, 20591, 20592, 20593, 20594, 20595, 20596, 20598, 20599, 20600, 20601, 20602, 20603, 20604, 20605, 20606, 20608, 20609, 20611, 20617, 20630, 20634, 20645, 20658, 20673, 20675, 20682, 20683, 20684, 20685, 20686, 20687, 20689, 20691, 20701, 20724, 20725, 20727, 20728, 20729, 20730, 20738, 20745, 20746, 20747, 20749, 20750, 20760, 20763, 20764, 20766, 20769, 20775, 20782, 20790, 20801, 20808, 20809, 20810, 20812, 20814, 20815, 20816, 20817, 20818, 20819, 20820, 20821, 20826, 20827, 20828, 20829, 20830, 20831, 20832, 20833, 20834, 20835, 20837, 20838, 20839, 20841, 20842, 20843, 20844, 20845, 20846, 20847, 20848, 20849, 20850, 20851, 20853, 20854, 20857, 20858, 20860, 20862, 20863, 20864, 20872, 20874, 20881, 20882, 20883, 20885, 20894, 20900, 20901, 20903, 20908, 20909, 20910, 20911, 20912, 20914, 20917, 20919, 20922, 20923, 20931, 20932, 20934, 20937, 20944, 20957, 20959, 20960, 20963, 20964, 20971, 20973, 20974, 20977, 20979, 20996, 20997, 20998, 20999, 21003, 21032, 21040, 21048, 21049, 21063, 21070, 21072, 21073, 21074, 21075, 21076, 21077, 21079, 21087, 21114, 21119, 21124, 21125, 21126, 21130, 21131, 21133, 21138, 21140, 21141, 21145, 21146, 21147, 21150, 21152, 21155, 21156, 21157, 21158, 21168, 21170, 21171, 21173, 21192, 21193, 21209, 21210, 21211, 21213, 21214, 21224, 21225, 21226, 21234, 21235, 21238, 21240, 21241, 21242, 21243, 21244, 21246, 21247, 21257, 21260, 21261, 21268, 21282, 21296, 21297, 21298, 21300, 21301, 21303, 21304, 21305, 21306, 21307, 21317, 21319, 21320, 21321, 21324, 21325, 21326, 21328, 21330, 21343, 21352, 21355, 21356, 21360, 21362, 21371, 21381, 21382, 21391, 21392, 21394, 21396, 21397, 21412, 21423, 21425, 21427, 21429, 21430, 21431, 21434, 21435, 21437, 21439, 21444, 21446, 21457, 21460, 21473, 21474, 21479, 21481, 21482, 21486, 21487, 21492, 21520, 21521, 21522, 21523, 21524, 21525, 21545, 21548, 21582, 21583, 21584, 21585, 21587, 21603, 21616, 21628, 21635, 21636, 21691, 21717, 21721, 21722, 21732, 21733, 21734, 21735, 21736, 21747, 21763, 21773, 21788, 21793, 21796, 21822, 21825, 21830, 21831, 21832, 21834, 21888, 21895, 21896, 21900, 21901, 21906, 21907, 21908, 21910, 21912, 21925, 21936, 21939, 21950, 21955, 21960, 21962, 21971, 21973, 21974, 21975, 21977, 21978, 21979, 21980, 21981, 21999, 22000, 22067, 22101, 22104, 22106, 22122, 22123, 22124, 22125, 22130, 22131, 22132, 22167, 22168, 22173, 22175, 22181, 22185, 22190, 22198, 22204, 22206, 22236, 22237, 22249, 22253, 22254, 22255, 22256, 22257, 22317, 22318, 22319, 22320, 22321, 22335, 22336, 22349, 22356, 22359, 22382, 22383, 22388, 22389, 22409, 22415, 22416, 22418, 22421, 22428, 22429, 22431, 22432, 22448, 22452, 22457, 22458, 22459, 22460, 22468, 22469, 22470, 22471, 22472, 22473, 22474, 22496, 22500, 22503, 22506, 22517, 22522, 22523, 22524, 22546, 22548, 22552, 22579, 22587, 22588, 22589, 22591, 22597, 22601, 22606, 22620, 22621, 22625, 22633, 22637, 22639, 22640, 22641, 22643, 22644, 22646, 22653, 22654, 22655, 22656, 22658, 22669, 22670, 22673, 22674, 22675, 22700, 22701, 22702, 22707, 22712, 22719, 22720, 22721, 22726, 22728, 22729, 22731, 22733, 22734, 22742, 22748, 22750, 22751, 22756, 22769, 22773, 22776, 22777, 22778, 22779, 22790, 22791, 22809, 22810, 22814, 22823, 22840, 22841, 22855, 22860, 22862, 22873, 22878, 22901, 22903, 22938, 22966, 22981, 22986, 22987, 22988, 22989, 22990, 22991, 22992, 22993, 23000, 23002, 23036, 23051, 23057, 23058, 23060, 23102, 23114, 23135, 23136, 23137, 23138, 23139, 23140, 23141, 23142, 23143, 23144, 23146, 23148, 23155, 23165, 23199, 23207, 23211, 23229, 23234, 23237, 23240, 23241, 23243, 23244, 23257, 23258, 23259, 23265, 23268, 23269, 23278, 23289, 23298, 23299, 23300, 23302, 23303, 23304, 23306, 23308, 23310, 23311, 23313, 23315, 23316, 23325, 23328, 23329, 23333, 23343, 23348, 23349, 23355, 23358, 23361, 23363, 23365, 23370, 23371, 23372, 23377, 23379, 23382, 23396, 23403, 23404, 23406, 23407, 23408, 23411, 23413, 23422, 23428, 23431, 23458, 23481, 23482, 23483, 23484, 23485, 23486, 23495, 23501, 23504, 23505, 23506, 23507, 23513, 23514, 23515, 23516, 23517, 23518, 23519, 23520, 23521, 23522, 23523, 23524, 23569, 23570, 23574, 23575, 23579, 23580, 23581, 23646, 23647, 23656, 23657, 23658, 23679, 23680, 23681, 23684, 23693, 23698, 23699, 23700, 23702, 23707, 23708, 23709, 23710, 23711, 23718, 23719, 23720, 23725, 23730, 23732, 23739, 23744, 23745, 23747, 23748, 23751, 23752, 23753, 23754, 23755, 23756, 23767, 23785, 23786, 23787, 23817, 23818, 23821, 23822, 23823, 23829, 23835, 23842, 23848, 23856, 23861, 23868, 23870, 23873, 23879, 23884, 23890, 23895, 23902, 23913, 23914, 23915, 23916, 23917, 23930, 23940, 23941, 23944, 23945, 23946, 23947, 23948, 23950, 23954, 23958, 23959, 23960, 23962, 23964, 23980, 23981, 23985, 23990, 23992, 23993, 23997, 23998, 24001, 24002, 24009, 24013, 24019, 24021, 24071, 24082, 24083, 24103, 24104, 24105, 24106, 24107, 24108, 24109, 24111, 24112, 24113, 24114, 24115, 24116, 24117, 24118, 24119, 24120, 24121, 24122, 24123, 24127, 24137, 24139, 24140, 24141, 24142, 24165, 24166, 24167, 24173, 24174, 24175, 24176, 24177, 24193, 24227, 24240, 24256, 24273, 24274, 24324, 24377, 24378, 24392, 24393, 24453, 24455, 24456, 24457, 24461, 24465, 24466, 24467, 24468, 24470, 24471, 24472, 24477, 24478, 24490, 24493, 24494, 24495, 24497, 24499, 24506, 24555, 24564, 24569, 24579, 24590, 24594, 24608, 24614, 24620, 24622, 24627, 24628, 24629, 24630, 24635, 24637, 24653, 24665, 24684, 24688, 24693, 24698, 24699, 24707, 24710, 24711, 24712, 24714, 24719, 24720, 24721, 24722, 24723, 24724, 24725, 24733, 24734, 24736, 24737, 24741, 24743, 24745, 24751, 24752, 24753, 24757, 24758, 24762, 24780, 24781, 24782, 24784, 24788, 24792, 24795, 24798, 24803, 24807, 24812, 24813, 24825, 24826, 24827, 24828, 24829, 24831, 24832, 24833, 24860, 24861, 24862, 24868, 24869, 24876, 24882, 24889, 24890, 24892, 24895, 24896, 24897, 24898, 24905, 24906, 24907, 24908, 24909, 24910, 24914, 24922, 24923, 24925, 24926, 24927, 24928, 24929, 24931, 24932, 24933, 24934, 24939, 24943, 24944, 24946, 24947, 24948, 24950, 24960, 24961, 24962, 24963, 24964, 24975, 24977, 24978, 24992, 24993, 24994, 24995, 24996, 24997, 24998, 24999, 25000, 25001, 25003, 25004, 25007, 25008, 25009, 25013, 25014, 25015, 25017, 25026, 25030, 25031, 25071, 25081, 25089, 25090, 25091, 25092, 25093, 25101, 25103, 25104, 25106, 25107, 25108, 25109, 25112, 25119, 25120, 25121, 25126, 25127, 25129, 25130, 25136, 25138, 25139, 25144, 25146, 25147, 25148, 25152, 25153, 25154, 25156, 25159, 25163, 25164, 25167, 25170, 25174, 25176, 25177, 25178, 25179, 25194, 25199, 25201, 25202, 25203, 25206, 25209, 25214, 25215, 25221, 25224, 25228, 25238, 25256, 25258, 25265, 25266, 25267, 25268, 25277, 25278, 25279, 25280, 25281, 25282, 25283, 25284, 25285, 25286, 25287, 25288, 25289, 25290, 25292, 25296, 25298, 25301, 25315, 25317, 25318, 25326, 25327, 25328, 25329, 25330, 25331, 25332, 25333, 25334, 25340, 25341, 25347, 25353, 25376, 25378, 25379, 25380, 25381, 25382, 25383, 25384, 25385, 25386, 25387, 25388, 25389, 25390, 25391, 25392, 25394, 25396, 25397, 25398, 25399, 25401, 25402, 25441, 25443, 25445, 25449, 25450, 25451, 25453, 25457, 25460, 25466, 25467, 25499, 25501, 25511, 25526, 25527, 25528, 25537, 25538, 25539, 25540, 25542, 25543, 25549, 25550, 25551, 25552, 25553, 25570, 25571, 25572, 25573, 25574, 25579, 25585, 25587, 25592, 25593, 25625, 25626, 25627, 25628, 25629, 25630, 25638, 25639, 25640, 25654, 25664, 25669, 25672, 25675, 25676, 25678, 25679, 25680, 25682, 25683, 25692, 25703, 25708, 25710, 25720, 25721, 25723, 25724, 25727, 25728, 25730, 25731, 25733, 25742, 25744, 25749, 25753, 25785, 25803, 25809, 25831, 25832, 25833, 25834, 25835, 25836, 25840, 25849, 25852, 25853, 25854, 25855, 25856, 25857, 25858, 25859, 25860, 25861, 25862, 25864, 25866, 25867, 25868, 25869, 25870, 25871, 25872, 25873, 25874, 25889, 25915, 25918, 25925, 25929, 25930, 25931, 25933, 25937, 25938, 25942, 25958, 25982, 25984, 25985, 26002, 26003, 26053, 26055, 26056, 26064, 26076, 26079, 26080, 26081, 26082, 26083, 26084, 26085, 26086, 26087, 26088, 26089, 26102, 26120, 26125, 26128, 26129, 26130, 26131, 26132, 26133, 26134, 26135, 26136, 26137, 26139, 26140, 26141, 26142, 26143, 26144, 26145, 26146, 26147, 26148, 26149, 26150, 26151, 26152, 26153, 26154, 26155, 26156, 26157, 26158, 26159, 26160, 26161, 26162, 26163, 26164, 26165, 26174, 26175, 26176, 26177, 26182, 26183, 26184, 26196, 26198, 26199, 26204, 26205, 26207, 26208, 26211, 26214, 26215, 26216, 26219, 26221, 26223, 26240, 26252, 26255, 26259, 26262, 26263, 26264, 26265, 26266, 26267, 26268, 26269, 26270, 26273, 26274, 26275, 26276, 26277, 26278, 26279, 26280, 26281, 26282, 26283, 26284, 26285, 26286, 26287, 26288, 26289, 26294, 26295, 26296, 26297, 26298, 26302, 26304, 26314, 26315, 26319, 26320, 26324, 26327, 26329, 26332, 26333, 26334, 26340, 26341, 26348, 26359, 26379, 26380, 26381, 26382, 26383, 26384, 26385, 26389, 26393, 26403, 26415, 26416, 26418, 26419, 26420, 26423, 26424, 26425, 26429, 26430, 26433, 26436, 26442, 26466, 26472, 26473, 26474, 26475, 26476, 26477, 26478, 26479, 26483, 26484, 26485, 26486, 26487, 26488, 26489, 26490, 26491, 26494, 26495, 26496, 26499, 26500, 26501, 26502, 26503, 26504, 26505, 26506, 26509, 26510, 26511, 26512, 26513, 26514, 26515, 26517, 26518, 26519, 26521, 26522, 26523, 26524, 26526, 26527, 26528, 26529, 26530, 26531, 26532, 26533, 26534, 26535, 26536, 26537, 26538, 26539, 26540, 26541, 26547, 26556, 26557, 26558, 26559, 26563, 26565, 26566, 26570, 26572, 26573, 26576, 26577, 26578, 26579, 26584, 26585, 26586, 26587, 26588, 26589, 26592, 26594, 26595, 26609, 26610, 26611, 26612, 26615, 26617, 26619, 26620, 26621, 26622, 26624, 26625, 26645, 26647, 26648, 26649, 26650, 26651, 26655, 26661, 26681, 26685, 26687, 26689, 26690, 26692, 26693, 26694, 26698, 26704, 26705, 26706, 26707, 26717, 26718, 26719, 26720, 26721, 26722, 26723, 26724, 26742, 26751, 26753, 26754, 26755, 26756, 26757, 26758, 26759, 26760, 26763, 26764, 26768, 26773, 26774, 26775, 26776, 26787, 26788, 26789, 26790, 26791, 26792, 26793, 26794, 26795, 26796, 26797, 26805, 26816, 26818, 26819, 26822, 26828, 26831, 26833, 26846, 26876, 26881, 26882, 26883, 26884, 26905, 26915, 26916, 26917, 26918, 26919, 26926, 26927, 26928, 26929, 26930, 26931, 26932, 26935, 26936, 26937, 26940, 26941, 26942, 26944, 26946, 26948, 26965, 26968, 26969, 26970, 26973, 26981, 27005, 27006, 27011, 27014, 27028, 27029, 27034, 27035, 27036, 27037, 27038, 27040, 27041, 27064, 27065, 27066, 27072, 27073, 27101, 27103, 27105, 27106, 27107, 27121, 27125, 27137, 27152, 27167, 27196, 27197, 27198, 27199, 27205, 27210, 27211, 27232, 27233, 27234, 27235, 27236, 27237, 27238, 27239, 27240, 27241, 27242, 27243, 27244, 27245, 27246, 27247, 27248, 27265, 27266, 27267, 27268, 27269, 27270, 27271, 27272, 27273, 27275, 27276, 27277, 27278, 27279, 27280, 27281, 27282, 27283, 27301, 27311, 27312, 27316, 27323, 27341, 27346, 27355, 27356, 27357, 27390, 27391, 27392, 27393, 27396, 27399, 27405, 27408, 27426, 27443, 27450, 27451, 27454, 27462, 27469, 27470, 27471, 27472, 27477, 27478, 27479, 27480, 27482, 27483, 27484, 27487, 27488, 27507, 27510, 27514, 27515, 27517, 27520, 27525, 27529, 27535, 27536, 27537, 27538, 27542, 27543, 27561, 27563, 27581, 27617, 27619, 27620, 27624, 27625, 27626, 27627, 27635, 27637, 27640, 27643, 27645, 27648, 27653, 27655, 27658, 27665, 27666, 27667, 27668, 27669, 27670, 27677, 27678, 27679, 27680, 27681, 27682, 27683, 27690, 27692, 27700, 27701, 27703, 27705, 27706, 27707, 27718, 27719, 27720, 27721, 27722, 27726, 27727, 27735, 27743, 27745, 27753, 27754, 27755, 27761, 27767, 27769, 27770, 27781, 27783, 27784, 27785, 27786, 27787, 27789, 27790, 27796, 27797, 27798, 27802, 27803, 27804, 27806, 27810, 27811, 27812, 27815, 27823, 27849, 27855, 27861, 27879, 27880, 27881, 27882, 27883, 27885, 27896, 27907, 27913, 27932, 27943, 27950, 27951, 27964, 27966, 27967, 27968, 27969, 27972, 27973, 27974, 27975, 27976, 27977, 27981, 27982, 27985, 27986, 27987, 27989, 27991, 27992, 27993, 28002, 28003, 28004, 28007, 28010, 28011, 28012, 28014, 28015, 28016, 28040, 28041, 28042, 28043, 28044, 28045, 28046, 28047, 28048, 28049, 28051, 28052, 28053, 28060, 28061, 28063, 28064, 28065, 28067, 28073, 28074, 28075, 28076, 28077, 28080, 28081, 28082, 28083, 28084, 28089, 28103, 28106, 28107, 28110, 28112, 28113, 28114, 28115, 28116, 28117, 28133, 28134, 28141, 28209, 28210, 28211, 28212, 28214, 28215, 28235, 28282, 28283, 28284, 28286, 28287, 28288, 28289, 28290, 28291, 28292, 28293, 28294, 28295, 28296, 28297, 28298, 28299, 28310, 28318, 28319, 28354, 28355, 28359, 28360, 28361, 28375, 28376, 28379, 28381, 28397, 28401, 28402, 28417, 28418, 28419, 28434, 28435, 28442, 28449, 28450, 28457, 28460, 28463, 28465, 28467, 28468, 28469, 28470, 28471, 28475, 28476, 28482, 28489, 28493, 28499, 28501, 28502, 28505, 28506, 28507, 28508, 28509, 28524, 28525, 28526, 28531, 28539, 28547, 28548, 28550, 28551, 28556, 28571, 28572, 28573, 28574, 28575, 28577, 28578, 28579, 28583, 28585, 28598, 28599, 28605, 28607, 28611, 28619, 28620, 28623, 28624, 28625, 28634, 28646, 28647, 28648, 28649, 28650, 28652, 28656, 28657, 28658, 28665, 28666, 28667, 28675, 28681, 28682, 28683, 28684, 28685, 28686, 28687, 28718, 28719, 28725, 28726, 28727, 28728, 28729, 28731, 28732, 28734, 28737, 28738, 28741, 28758, 28763, 28764, 28782, 28783, 28784, 28785, 28810, 28811, 28813, 28814, 28815, 28816, 28817, 28819, 28820, 28827, 28828, 28829, 28830, 28831, 28833, 28841, 28844, 28845, 28846, 28847, 28866, 28867, 28868, 28869, 28870, 28871, 28872, 28874, 28875, 28876, 28880, 28883, 28887, 28888, 28889, 28890, 28911, 28912, 28916, 28917, 28918, 28919, 28931, 28938, 28943, 28945, 28951, 28953, 28954, 28978, 28979, 28980, 28982, 28983, 28988, 28989, 28991, 28992, 28998, 28999, 29000, 29001, 29002, 29004, 29024, 29038, 29040, 29041, 29042, 29043, 29056, 29057, 29058, 29060, 29062, 29064, 29065, 29066, 29070, 29071, 29073, 29074, 29075, 29080, 29081, 29082, 29094, 29096, 29100, 29104, 29113, 29115, 29118, 29120, 29122, 29123, 29129, 29130, 29133, 29150, 29151, 29152, 29153, 29155, 29156, 29157, 29158, 29159, 29160, 29164, 29168, 29169, 29170, 29171, 29174, 29175, 29176, 29183, 29205, 29251, 29257, 29259, 29260, 29262, 29270, 29274, 29275, 29276, 29279, 29280, 29281, 29283, 29284, 29286, 29308, 29309, 29331, 29348, 29352, 29362, 29363, 29372, 29409, 29412, 29419, 29421, 29424, 29438, 29440, 29441, 29485, 29486, 29488, 29489, 29525, 29540, 29552, 29605, 29627, 29628, 29629, 29642, 29695, 29696, 29734, 29736, 29740, 29742, 29743, 29744, 29754, 29756, 29764, 29766, 29771, 29780, 29781, 29794, 29802, 29803, 29805, 29806, 29807, 29808, 29809, 29810, 29815, 29816, 29819, 29828, 29878, 29879, 29880, 29886, 29890, 29937, 29938, 29971, 29972, 29974, 29975, 29976, 30039, 30045, 30046, 30047, 30059, 30060, 30070, 30076, 30080, 30157, 30166, 30171, 30172, 30173, 30233, 30243, 30297, 30318, 30343, 30346, 30347, 30352, 30356, 30402, 30404, 30405, 30409, 30412, 30413, 30415, 30462, 30483, 30491, 30503, 30516, 30518, 30520, 30547, 30615, 30641, 30643, 30644, 30645, 30646, 30647, 30648, 30649, 30650, 30651, 30653, 30654, 30656, 30695, 30707, 30736, 30753, 30754, 30755, 30756, 30757, 30758, 30759, 30760, 30761, 30762, 30763, 30792, 30799, 30803, 30805, 30808, 30822, 30844, 30846, 30852, 30874, 30877, 30885, 30886, 30890, 30902, 30903, 30906, 30966, 30968, 30986, 30989, 30995, 30996, 30998, 31004, 31007, 31043, 31044, 31047, 31048, 31049, 31073, 31088, 31092, 31094, 31096, 31107, 31119, 31126, 31154, 31156, 31163, 31164, 31174, 31196, 31248, 31373, 31471, 31515, 31553, 31583, 31627, 31664, 31670, 31687, 31692, 31720, 31721, 31722, 31723, 31725, 31727, 31756, 31803, 31831, 31836, 31837, 31853, 31878, 31952, 31956, 31957, 31958, 31992, 32031, 32106, 32670, 32754); diff --git a/sql/updates/world/2013_10_19_00_world_gossip.sql b/sql/updates/world/2013_10_19_00_world_gossip.sql new file mode 100644 index 00000000000..00559b3b9bb --- /dev/null +++ b/sql/updates/world/2013_10_19_00_world_gossip.sql @@ -0,0 +1,14 @@ +DELETE FROM `gossip_menu` WHERE (`entry`=9578 AND `text_id`=12926) OR (`entry`=4825 AND `text_id`=5881) OR (`entry`=8891 AND `text_id`=11645); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(9578, 12926), -- 27705 +(4825, 5881), -- 5957 +(8891, 11645); -- 186267 + +DELETE FROM `gossip_menu_option` WHERE (`menu_id`=9578 AND `id`=0) OR (`menu_id`=4825 AND `id`=0) OR (`menu_id`=8891 AND `id`=0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `box_coded`, `box_money`, `box_text`) VALUES +(9578, 0, 3, 'Please teach me.', 0, 0, ''), -- 27705 +(4825, 0, 3, 'Please teach me.', 0, 0, ''), -- 5957 +(8891, 0, 0, 'Call the Headless Horseman.', 0, 0, ''); -- 186267 + +UPDATE `creature_template` SET `gossip_menu_id`=9578 WHERE `entry`=27705; +UPDATE `creature_template` SET `gossip_menu_id`=4825 WHERE `entry`=5957; diff --git a/sql/updates/world/2013_10_19_01_world_gameobject_template.sql b/sql/updates/world/2013_10_19_01_world_gameobject_template.sql new file mode 100644 index 00000000000..bb0f518701b --- /dev/null +++ b/sql/updates/world/2013_10_19_01_world_gameobject_template.sql @@ -0,0 +1,6 @@ +DELETE FROM `gameobject_template` WHERE `entry` IN (180609, 180610, 180611, 184633); +INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `size`, `WDBVerified`) VALUES +(180609, 7, 39, 'Doodad_GeneralChairLoEnd02', '', '', '', 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17359), -- -Unknown- +(180610, 7, 39, 'Doodad_GeneralChairLoEnd04', '', '', '', 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17359), -- -Unknown- +(180611, 7, 39, 'Doodad_GeneralChairLoEnd05', '', '', '', 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17359), -- -Unknown- +(184633, 8, 233, 'Forge', '', '', '', 3, 10, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17359); -- -Unknown- diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp index 1ab9ae6eb62..4a9d3ce7faf 100644 --- a/src/server/authserver/Server/AuthSocket.cpp +++ b/src/server/authserver/Server/AuthSocket.cpp @@ -222,12 +222,25 @@ void AuthSocket::OnClose(void) // Read the packet from the client void AuthSocket::OnRead() { + #define MAX_AUTH_LOGON_CHALLENGES_IN_A_ROW 3 + uint32 challengesInARow = 0; uint8 _cmd; while (1) { if (!socket().recv_soft((char *)&_cmd, 1)) return; + if (_cmd == AUTH_LOGON_CHALLENGE) + { + ++challengesInARow; + if (challengesInARow == MAX_AUTH_LOGON_CHALLENGES_IN_A_ROW) + { + TC_LOG_WARN(LOG_FILTER_AUTHSERVER, "Got %u AUTH_LOGON_CHALLENGE in a row from '%s', possible ongoing DoS", challengesInARow, socket().getRemoteAddress().c_str()); + socket().shutdown(); + return; + } + } + size_t i; // Circle through known commands and call the correct command handler diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 3823f7ba287..f01d0d1ab03 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -34,6 +34,7 @@ #include "SmartScript.h" #include "SpellMgr.h" #include "Vehicle.h" +#include "MoveSplineInit.h" #include "GameEventMgr.h" class TrinityStringTextBuilder @@ -507,18 +508,20 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { - if (IsUnit(*itr)) + if (!IsUnit(*itr)) + continue; + + if (!(e.action.cast.flags & SMARTCAST_AURA_NOT_PRESENT) || !(*itr)->ToUnit()->HasAura(e.action.cast.spell)) { if (e.action.cast.flags & SMARTCAST_INTERRUPT_PREVIOUS) me->InterruptNonMeleeSpells(false); - if (!(e.action.cast.flags & SMARTCAST_AURA_NOT_PRESENT) || !(*itr)->ToUnit()->HasAura(e.action.cast.spell)) - me->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false); - else - TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*itr)->GetGUID(), (*itr)->GetEntry(), uint32((*itr)->GetTypeId())); + me->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false); TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_CAST:: Creature %u casts spell %u on target %u with castflags %u", me->GetGUIDLow(), e.action.cast.spell, (*itr)->GetGUIDLow(), e.action.cast.flags); } + else + TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*itr)->GetGUID(), (*itr)->GetEntry(), uint32((*itr)->GetTypeId())); } delete targets; @@ -536,19 +539,20 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { - if (IsUnit(*itr)) - { - if (e.action.cast.flags & SMARTCAST_INTERRUPT_PREVIOUS) - tempLastInvoker->InterruptNonMeleeSpells(false); + if (!IsUnit(*itr)) + continue; if (!(e.action.cast.flags & SMARTCAST_AURA_NOT_PRESENT) || !(*itr)->ToUnit()->HasAura(e.action.cast.spell)) + { + if (e.action.cast.flags & SMARTCAST_INTERRUPT_PREVIOUS) + tempLastInvoker->InterruptNonMeleeSpells(false); + tempLastInvoker->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false); + TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_INVOKER_CAST: Invoker %u casts spell %u on target %u with castflags %u", + tempLastInvoker->GetGUIDLow(), e.action.cast.spell, (*itr)->GetGUIDLow(), e.action.cast.flags); + } else TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*itr)->GetGUID(), (*itr)->GetEntry(), uint32((*itr)->GetTypeId())); - - TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_INVOKER_CAST: Invoker %u casts spell %u on target %u with castflags %u", - tempLastInvoker->GetGUIDLow(), e.action.cast.spell, (*itr)->GetGUIDLow(), e.action.cast.flags); - } } delete targets; @@ -1350,7 +1354,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u break; if (e.GetTargetType() == SMART_TARGET_SELF) - me->SetFacingTo(me->GetHomePosition().GetOrientation()); + me->SetFacingTo((me->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) && me->GetTransGUID() ? + me->GetTransportHomePosition() : me->GetHomePosition()).GetOrientation()); else if (e.GetTargetType() == SMART_TARGET_POSITION) me->SetFacingTo(e.target.o); else if (ObjectList* targets = GetTargets(e, unit)) @@ -1403,7 +1408,14 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u } if (!target) - me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, e.target.x, e.target.y, e.target.z); + { + G3D::Vector3 dest(e.target.x, e.target.y, e.target.z); + if (e.action.MoveToPos.transport) + if (TransportBase* trans = me->GetDirectTransport()) + trans->CalculatePassengerPosition(dest.x, dest.y, dest.z); + + me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, dest.x, dest.y, dest.z); + } else me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()); break; @@ -1659,21 +1671,28 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u for (ObjectList::const_iterator itr = casters->begin(); itr != casters->end(); ++itr) { - if (IsUnit(*itr)) + if (!IsUnit(*itr)) + continue; + + bool interruptedSpell = false; + + for (ObjectList::const_iterator it = targets->begin(); it != targets->end(); ++it) { - if (e.action.cast.flags & SMARTCAST_INTERRUPT_PREVIOUS) - (*itr)->ToUnit()->InterruptNonMeleeSpells(false); + if (!IsUnit(*it)) + continue; - for (ObjectList::const_iterator it = targets->begin(); it != targets->end(); ++it) + if (!(e.action.cast.flags & SMARTCAST_AURA_NOT_PRESENT) || !(*it)->ToUnit()->HasAura(e.action.cast.spell)) { - if (IsUnit(*it)) + if (!interruptedSpell && e.action.cast.flags & SMARTCAST_INTERRUPT_PREVIOUS) { - if (!(e.action.cast.flags & SMARTCAST_AURA_NOT_PRESENT) || !(*it)->ToUnit()->HasAura(e.action.cast.spell)) - (*itr)->ToUnit()->CastSpell((*it)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false); - else - TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*it)->GetGUID(), (*it)->GetEntry(), uint32((*it)->GetTypeId())); + (*itr)->ToUnit()->InterruptNonMeleeSpells(false); + interruptedSpell = true; } + + (*itr)->ToUnit()->CastSpell((*it)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false); } + else + TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*it)->GetGUID(), (*it)->GetEntry(), uint32((*it)->GetTypeId())); } } diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 56fa7ed1275..f12f2ab69c0 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -907,6 +907,7 @@ struct SmartAction struct { uint32 pointId; + uint32 transport; } MoveToPos; struct diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp index 6d79c6c77a1..1cff80ba10d 100644 --- a/src/server/game/Accounts/AccountMgr.cpp +++ b/src/server/game/Accounts/AccountMgr.cpp @@ -466,7 +466,7 @@ void AccountMgr::LoadRBAC() secId = newId; permissions = &_defaultPermissions[secId]; } - + permissions->insert(field[1].GetUInt32()); ++count3; } diff --git a/src/server/game/Accounts/RBAC.cpp b/src/server/game/Accounts/RBAC.cpp index 8cd70721976..f7c9444cdb0 100644 --- a/src/server/game/Accounts/RBAC.cpp +++ b/src/server/game/Accounts/RBAC.cpp @@ -231,13 +231,13 @@ void RBACData::ExpandPermissions(RBACPermissionContainer& permissions) {
RBACPermissionContainer toCheck = permissions;
permissions.clear();
-
+
while (!toCheck.empty())
{
// remove the permission from original list
uint32 permissionId = *toCheck.begin();
toCheck.erase(toCheck.begin());
-
+
RBACPermission const* permission = sAccountMgr->GetRBACPermission(permissionId);
if (!permission)
continue;
diff --git a/src/server/game/Accounts/RBAC.h b/src/server/game/Accounts/RBAC.h index e12e6835cb8..bcc4122ea5b 100644 --- a/src/server/game/Accounts/RBAC.h +++ b/src/server/game/Accounts/RBAC.h @@ -303,7 +303,7 @@ enum RBACPermissions RBAC_PERM_COMMAND_GOBJECT_SET_STATE = 397, RBAC_PERM_COMMAND_GOBJECT_TARGET = 398, RBAC_PERM_COMMAND_GOBJECT_TURN = 399, - // 400 - reuse + RBAC_PERM_COMMAND_DEBUG_TRANSPORT = 400, RBAC_PERM_COMMAND_GUILD = 401, RBAC_PERM_COMMAND_GUILD_CREATE = 402, RBAC_PERM_COMMAND_GUILD_DELETE = 403, diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index 29d4e4124c0..82d7de0d9bf 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -58,8 +58,17 @@ BattlegroundIC::BattlegroundIC() BattlegroundIC::~BattlegroundIC() { - delete gunshipHorde; - delete gunshipAlliance; + if (gunshipHorde) + { + gunshipHorde->RemoveFromWorld(); + delete gunshipHorde; + } + + if (gunshipAlliance) + { + gunshipAlliance->RemoveFromWorld(); + delete gunshipAlliance; + } } void BattlegroundIC::HandlePlayerResurrect(Player* player) @@ -71,22 +80,6 @@ void BattlegroundIC::HandlePlayerResurrect(Player* player) player->CastSpell(player, SPELL_OIL_REFINERY, true); } -void BattlegroundIC::SendTransportInit(Player* player) -{ - if (!gunshipAlliance || !gunshipHorde) - return; - - UpdateData transData; - - gunshipAlliance->BuildCreateUpdateBlockForPlayer(&transData, player); - gunshipHorde->BuildCreateUpdateBlockForPlayer(&transData, player); - - WorldPacket packet; - - transData.BuildPacket(&packet); - player->SendDirectMessage(&packet); -} - void BattlegroundIC::DoAction(uint32 action, uint64 var) { if (action != ACTION_TELEPORT_PLAYER_TO_TRANSPORT) @@ -300,8 +293,6 @@ void BattlegroundIC::AddPlayer(Player* player) if (nodePoint[NODE_TYPE_REFINERY].nodeState == (player->GetTeamId() == TEAM_ALLIANCE ? NODE_STATE_CONTROLLED_A : NODE_STATE_CONTROLLED_H)) player->CastSpell(player, SPELL_OIL_REFINERY, true); - - SendTransportInit(player); } void BattlegroundIC::RemovePlayer(Player* player, uint64 /*guid*/, uint32 /*team*/) @@ -409,8 +400,8 @@ bool BattlegroundIC::SetupBattleground() return false; } - gunshipHorde = CreateTransport(GO_HORDE_GUNSHIP, TRANSPORT_PERIOD_TIME); - gunshipAlliance = CreateTransport(GO_ALLIANCE_GUNSHIP, TRANSPORT_PERIOD_TIME); + gunshipHorde = sTransportMgr->CreateTransport(GO_HORDE_GUNSHIP, 0, GetBgMap()); + gunshipAlliance = sTransportMgr->CreateTransport(GO_ALLIANCE_GUNSHIP, 0, GetBgMap()); if (!gunshipAlliance || !gunshipHorde) { @@ -420,10 +411,8 @@ bool BattlegroundIC::SetupBattleground() //Send transport init packet to all player in map for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) - { if (Player* player = ObjectAccessor::FindPlayer(itr->first)) - SendTransportInit(player); - } + GetBgMap()->SendInitTransports(player); // setting correct factions for Keep Cannons for (uint8 i = BG_IC_NPC_KEEP_CANNON_1; i < BG_IC_NPC_KEEP_CANNON_12; ++i) @@ -616,8 +605,8 @@ void BattlegroundIC::HandleContestedNodes(ICNodePoint* nodePoint) { if (nodePoint->nodeType == NODE_TYPE_HANGAR) { - if (gunshipAlliance && gunshipHorde) - (nodePoint->faction == TEAM_ALLIANCE ? gunshipHorde : gunshipAlliance)->BuildStopMovePacket(GetBgMap()); + if (gunshipAlliance && gunshipHorde) + (nodePoint->faction == TEAM_ALLIANCE ? gunshipHorde : gunshipAlliance)->EnableMovement(false); for (uint8 u = BG_IC_GO_HANGAR_TELEPORTER_1; u < BG_IC_GO_HANGAR_TELEPORTER_3; ++u) DelObject(u); @@ -656,8 +645,8 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture) //TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BG_IC_GO_HANGAR_BANNER CAPTURED Faction: %u", nodePoint->faction); - (nodePoint->faction == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde)->BuildStartMovePacket(GetBgMap()); - (nodePoint->faction == TEAM_ALLIANCE ? gunshipHorde : gunshipAlliance)->BuildStopMovePacket(GetBgMap()); + (nodePoint->faction == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde)->EnableMovement(true); + (nodePoint->faction == TEAM_ALLIANCE ? gunshipHorde : gunshipAlliance)->EnableMovement(false); // we should spawn teleporters break; case BG_IC_GO_QUARRY_BANNER: @@ -865,7 +854,6 @@ void BattlegroundIC::DestroyGate(Player* player, GameObject* go) void BattlegroundIC::EventPlayerDamagedGO(Player* /*player*/, GameObject* /*go*/, uint32 /*eventType*/) { - } WorldSafeLocsEntry const* BattlegroundIC::GetClosestGraveYard(Player* player) @@ -907,52 +895,6 @@ WorldSafeLocsEntry const* BattlegroundIC::GetClosestGraveYard(Player* player) return good_entry; } -Transport* BattlegroundIC::CreateTransport(uint32 goEntry, uint32 period) -{ - Transport* t = new Transport(period, 0); - - GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(goEntry); - - if (!goinfo) - { - TC_LOG_ERROR(LOG_FILTER_SQL, "Transport ID: %u will not be loaded, gameobject_template missing", goEntry); - delete t; - return NULL; - } - - std::set<uint32> mapsUsed; - - if (!t->GenerateWaypoints(goinfo->moTransport.taxiPathId, mapsUsed)) - // skip transports with empty waypoints list - { - TC_LOG_ERROR(LOG_FILTER_SQL, "Transport (path id %u) path size = 0. Transport ignored, check DBC files or transport GO data0 field.", goinfo->moTransport.taxiPathId); - delete t; - return NULL; - } - - uint32 mapid = t->m_WayPoints[0].mapid; - - float x = t->m_WayPoints[0].x; - float y = t->m_WayPoints[0].y; - float z = t->m_WayPoints[0].z; - float o = 1; - - // creates the Gameobject - if (!t->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_MO_TRANSPORT), goEntry, mapid, x, y, z, o, 255, 0)) - { - delete t; - return NULL; - } - - //If we someday decide to use the grid to track transports, here: - t->SetMap(GetBgMap()); - - for (uint8 i = 0; i < 5; ++i) - t->AddNPCPassenger(0, (goEntry == GO_HORDE_GUNSHIP ? NPC_HORDE_GUNSHIP_CANNON : NPC_ALLIANCE_GUNSHIP_CANNON), (goEntry == GO_HORDE_GUNSHIP ? hordeGunshipPassengers[i].GetPositionX() : allianceGunshipPassengers[i].GetPositionX()), (goEntry == GO_HORDE_GUNSHIP ? hordeGunshipPassengers[i].GetPositionY() : allianceGunshipPassengers[i].GetPositionY()), (goEntry == GO_HORDE_GUNSHIP ? hordeGunshipPassengers[i].GetPositionZ() : allianceGunshipPassengers[i].GetPositionZ()), (goEntry == GO_HORDE_GUNSHIP ? hordeGunshipPassengers[i].GetOrientation() : allianceGunshipPassengers[i].GetOrientation())); - - return t; -} - bool BattlegroundIC::IsAllNodesControlledByTeam(uint32 team) const { uint32 count = 0; @@ -983,4 +925,4 @@ bool BattlegroundIC::IsSpellAllowed(uint32 spellId, Player const* player) const } return true; -}
\ No newline at end of file +} diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h index 6fdc97f25c5..acb5046444c 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h @@ -956,8 +956,6 @@ class BattlegroundIC : public Battleground void UpdateNodeWorldState(ICNodePoint* nodePoint); void HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture); void HandleContestedNodes(ICNodePoint* nodePoint); - Transport* CreateTransport(uint32 goEntry, uint32 period); - void SendTransportInit(Player* player); }; #endif diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index aaa630ce4b8..6d806336315 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -344,7 +344,7 @@ bool ChatHandler::ExecuteCommandInTable(ChatCommand* table, const char* text, st Player* player = m_session->GetPlayer(); if (!AccountMgr::IsPlayerAccount(m_session->GetSecurity())) { - uint64 guid = player->GetSelection(); + uint64 guid = player->GetTarget(); uint32 areaId = player->GetAreaId(); std::string areaName = "Unknown"; std::string zoneName = "Unknown"; @@ -713,12 +713,11 @@ Player* ChatHandler::getSelectedPlayer() if (!m_session) return NULL; - uint64 guid = m_session->GetPlayer()->GetSelection(); - - if (guid == 0) + uint64 selected = m_session->GetPlayer()->GetTarget(); + if (!selected) return m_session->GetPlayer(); - return ObjectAccessor::FindPlayer(guid); + return ObjectAccessor::FindPlayer(selected); } Unit* ChatHandler::getSelectedUnit() @@ -726,12 +725,10 @@ Unit* ChatHandler::getSelectedUnit() if (!m_session) return NULL; - uint64 guid = m_session->GetPlayer()->GetSelection(); - - if (guid == 0) - return m_session->GetPlayer(); + if (Unit* selected = m_session->GetPlayer()->GetSelectedUnit()) + return selected; - return ObjectAccessor::GetUnit(*m_session->GetPlayer(), guid); + return m_session->GetPlayer(); } WorldObject* ChatHandler::getSelectedObject() @@ -739,7 +736,7 @@ WorldObject* ChatHandler::getSelectedObject() if (!m_session) return NULL; - uint64 guid = m_session->GetPlayer()->GetSelection(); + uint64 guid = m_session->GetPlayer()->GetTarget(); if (guid == 0) return GetNearbyGameObject(); @@ -752,7 +749,7 @@ Creature* ChatHandler::getSelectedCreature() if (!m_session) return NULL; - return ObjectAccessor::GetCreatureOrPetOrVehicle(*m_session->GetPlayer(), m_session->GetPlayer()->GetSelection()); + return ObjectAccessor::GetCreatureOrPetOrVehicle(*m_session->GetPlayer(), m_session->GetPlayer()->GetTarget()); } char* ChatHandler::extractKeyFromLink(char* text, char const* linkType, char** something1) diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 71fbf1c62b2..95592cd87d9 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -20,6 +20,7 @@ #include "Log.h" #include "SharedDefines.h" #include "SpellMgr.h" +#include "TransportMgr.h" #include "DBCfmt.h" #include "Timer.h" #include "ObjectDefines.h" @@ -190,6 +191,8 @@ static DBCStorage <TaxiPathNodeEntry> sTaxiPathNodeStore(TaxiPathNodeEntryfmt); DBCStorage <TeamContributionPointsEntry> sTeamContributionPointsStore(TeamContributionPointsfmt); DBCStorage <TotemCategoryEntry> sTotemCategoryStore(TotemCategoryEntryfmt); +DBCStorage <TransportAnimationEntry> sTransportAnimationStore(TransportAnimationfmt); +DBCStorage <TransportRotationEntry> sTransportRotationStore(TransportRotationfmt); DBCStorage <VehicleEntry> sVehicleStore(VehicleEntryfmt); DBCStorage <VehicleSeatEntry> sVehicleSeatStore(VehicleSeatEntryfmt); DBCStorage <WMOAreaTableEntry> sWMOAreaTableStore(WMOAreaTableEntryfmt); @@ -604,6 +607,25 @@ void LoadDBCStores(const std::string& dataPath) LoadDBC(availableDbcLocales, bad_dbc_files, sTeamContributionPointsStore, dbcPath, "TeamContributionPoints.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sTotemCategoryStore, dbcPath, "TotemCategory.dbc"); + LoadDBC(availableDbcLocales, bad_dbc_files, sTransportAnimationStore, dbcPath, "TransportAnimation.dbc"); + for (uint32 i = 0; i < sTransportAnimationStore.GetNumRows(); ++i) + { + TransportAnimationEntry const* anim = sTransportAnimationStore.LookupEntry(i); + if (!anim) + continue; + + sTransportMgr->AddPathNodeToTransport(anim->TransportEntry, anim->TimeSeg, anim); + } + + LoadDBC(availableDbcLocales, bad_dbc_files, sTransportRotationStore, dbcPath, "TransportRotation.dbc"); + for (uint32 i = 0; i < sTransportRotationStore.GetNumRows(); ++i) + { + TransportRotationEntry const* rot = sTransportRotationStore.LookupEntry(i); + if (!rot) + continue; + + sTransportMgr->AddPathRotationToTransport(rot->TransportEntry, rot->TimeSeg, rot); + } LoadDBC(availableDbcLocales, bad_dbc_files, sVehicleStore, dbcPath, "Vehicle.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sVehicleSeatStore, dbcPath, "VehicleSeat.dbc"); diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index e12f70baa41..aff54f75a40 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1875,6 +1875,28 @@ struct TotemCategoryEntry uint32 categoryMask; // 19 (compatibility mask for same type: different for totems, compatible from high to low for rods) }; +struct TransportAnimationEntry +{ + //uint32 Id; + uint32 TransportEntry; + uint32 TimeSeg; + float X; + float Y; + float Z; + //uint32 MovementId; +}; + +struct TransportRotationEntry +{ + //uint32 Id; + uint32 TransportEntry; + uint32 TimeSeg; + float X; + float Y; + float Z; + float W; +}; + #define MAX_VEHICLE_SEATS 8 struct VehicleEntry diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index a81eec51338..5326ab70fa3 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -120,6 +120,8 @@ char const TaxiPathEntryfmt[] = "niii"; char const TaxiPathNodeEntryfmt[] = "diiifffiiii"; char const TeamContributionPointsfmt[] = "df"; char const TotemCategoryEntryfmt[] = "nxxxxxxxxxxxxxxxxxii"; +char const TransportAnimationfmt[] = "diifffx"; +char const TransportRotationfmt[] = "diiffff"; char const VehicleEntryfmt[] = "niffffiiiiiiiifffffffffffffffssssfifiixx"; char const VehicleSeatEntryfmt[] = "niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiiixxxxxxxxxxxx"; char const WMOAreaTableEntryfmt[] = "niiixxxxxiixxxxxxxxxxxxxxxxx"; diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 06f88f0f37f..f68d87de2f4 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -52,7 +52,7 @@ #include "World.h" #include "WorldPacket.h" -// apply implementation of the singletons +#include "Transport.h" TrainerSpell const* TrainerSpellData::Find(uint32 spell_id) const { @@ -141,7 +141,7 @@ bool ForcedDespawnDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/) return true; } -Creature::Creature(bool isWorldObject): Unit(isWorldObject), MapCreature(), +Creature::Creature(bool isWorldObject): Unit(isWorldObject), MapObject(), lootForPickPocketed(false), lootForBody(false), m_groupLootTimer(0), lootingGroupLowGUID(0), m_PlayerDamageReq(0), m_lootRecipient(0), m_lootRecipientGroup(0), m_corpseRemoveTime(0), m_respawnTime(0), m_respawnDelay(300), m_corpseDelay(60), m_respawnradius(0.0f), m_reactState(REACT_AGGRESSIVE), @@ -165,6 +165,7 @@ m_creatureInfo(NULL), m_creatureData(NULL), m_path_id(0), m_formation(NULL) ResetLootMode(); // restore default loot mode TriggerJustRespawned = false; m_isTempWorldObject = false; + _focusSpell = NULL; } Creature::~Creature() @@ -933,7 +934,8 @@ void Creature::SaveToDB() return; } - SaveToDB(GetMapId(), data->spawnMask, GetPhaseMask()); + uint32 mapId = GetTransport() ? GetTransport()->GetGOInfo()->moTransport.mapID : GetMapId(); + SaveToDB(mapId, data->spawnMask, GetPhaseMask()); } void Creature::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask) @@ -972,10 +974,21 @@ void Creature::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask) data.phaseMask = phaseMask; data.displayid = displayId; data.equipmentId = GetCurrentEquipmentId(); - data.posX = GetPositionX(); - data.posY = GetPositionY(); - data.posZ = GetPositionZMinusOffset(); - data.orientation = GetOrientation(); + if (!GetTransport()) + { + data.posX = GetPositionX(); + data.posY = GetPositionY(); + data.posZ = GetPositionZMinusOffset(); + data.orientation = GetOrientation(); + } + else + { + data.posX = GetTransOffsetX(); + data.posY = GetTransOffsetY(); + data.posZ = GetTransOffsetZ(); + data.orientation = GetTransOffsetO(); + } + data.spawntimesecs = m_respawnDelay; // prevent add data integrity problems data.spawndist = GetDefaultMovementType() == IDLE_MOTION_TYPE ? 0.0f : m_respawnradius; @@ -2640,3 +2653,41 @@ void Creature::SetDisplayId(uint32 modelId) SetFloatValue(UNIT_FIELD_COMBATREACH, minfo->combat_reach * GetObjectScale()); } } + +void Creature::SetTarget(uint64 guid) +{ + if (!_focusSpell) + SetUInt64Value(UNIT_FIELD_TARGET, guid); +} + +void Creature::FocusTarget(Spell const* focusSpell, WorldObject const* target) +{ + // already focused + if (_focusSpell) + return; + + _focusSpell = focusSpell; + SetUInt64Value(UNIT_FIELD_TARGET, target->GetGUID()); + if (focusSpell->GetSpellInfo()->AttributesEx5 & SPELL_ATTR5_DONT_TURN_DURING_CAST) + AddUnitState(UNIT_STATE_ROTATING); + + // Set serverside orientation if needed (needs to be after attribute check) + SetInFront(target); +} + +void Creature::ReleaseFocus(Spell const* focusSpell) +{ + // focused to something else + if (focusSpell != _focusSpell) + return; + + _focusSpell = NULL; + if (Unit* victim = GetVictim()) + SetUInt64Value(UNIT_FIELD_TARGET, victim->GetGUID()); + else + SetUInt64Value(UNIT_FIELD_TARGET, 0); + + if (focusSpell->GetSpellInfo()->AttributesEx5 & SPELL_ATTR5_DONT_TURN_DURING_CAST) + ClearUnitState(UNIT_STATE_ROTATING); +} + diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index bb9cc40ace1..a555469da63 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -415,36 +415,7 @@ typedef std::map<uint32, time_t> CreatureSpellCooldowns; #define MAX_VENDOR_ITEMS 150 // Limitation in 3.x.x item count in SMSG_LIST_INVENTORY -enum CreatureCellMoveState -{ - CREATURE_CELL_MOVE_NONE, // not in move list - CREATURE_CELL_MOVE_ACTIVE, // in move list - CREATURE_CELL_MOVE_INACTIVE // in move list but should not move -}; - -class MapCreature -{ - friend class Map; // map for moving creatures - friend class ObjectGridLoader; // grid loader for loading creatures - -protected: - MapCreature() : _moveState(CREATURE_CELL_MOVE_NONE) {} - -private: - Cell _currentCell; - Cell const& GetCurrentCell() const { return _currentCell; } - void SetCurrentCell(Cell const& cell) { _currentCell = cell; } - - CreatureCellMoveState _moveState; - Position _newPosition; - void SetNewCellPosition(float x, float y, float z, float o) - { - _moveState = CREATURE_CELL_MOVE_ACTIVE; - _newPosition.Relocate(x, y, z, o); - } -}; - -class Creature : public Unit, public GridObject<Creature>, public MapCreature +class Creature : public Unit, public GridObject<Creature>, public MapObject { public: @@ -703,6 +674,11 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature bool m_isTempWorldObject; //true when possessed + // Handling caster facing during spellcast + void SetTarget(uint64 guid); + void FocusTarget(Spell const* focusSpell, WorldObject const* target); + void ReleaseFocus(Spell const* focusSpell); + protected: bool CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint32 team, const CreatureData* data = NULL); bool InitEntry(uint32 entry, uint32 team=ALLIANCE, const CreatureData* data=NULL); @@ -762,6 +738,8 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature //Formation var CreatureGroup* m_formation; bool TriggerJustRespawned; + + Spell const* _focusSpell; ///> Locks the target during spell cast for proper facing }; class AssistDelayEvent : public BasicEvent diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 15e7eb436e1..af92f0e9df4 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -16,6 +16,7 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <G3D/Quat.h> #include "GameObjectAI.h" #include "Battleground.h" #include "CellImpl.h" @@ -32,8 +33,10 @@ #include "SpellMgr.h" #include "UpdateFieldFlags.h" #include "World.h" +#include "Transport.h" -GameObject::GameObject(): WorldObject(false), m_model(NULL), m_goValue(), m_AI(NULL) +GameObject::GameObject() : WorldObject(false), MapObject(), + m_model(NULL), m_goValue(), m_AI(NULL) { m_objectType |= TYPEMASK_GAMEOBJECT; m_objectTypeId = TYPEID_GAMEOBJECT; @@ -100,6 +103,9 @@ void GameObject::CleanupsBeforeDelete(bool /*finalCleanup*/) if (m_uint32Values) // field array can be not exist if GameOBject not loaded RemoveFromOwner(); + + if (GetTransport() && !ToTransport()) + GetTransport()->RemovePassenger(this); } void GameObject::RemoveFromOwner() @@ -169,6 +175,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa SetMap(map); Relocate(x, y, z, ang); + m_stationaryPosition.Relocate(x, y, z, ang); if (!IsPositionValid()) { TC_LOG_ERROR(LOG_FILTER_GENERAL, "Gameobject (GUID: %u Entry: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", guidlow, name_id, x, y); @@ -192,6 +199,9 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa return false; } + if (goinfo->type == GAMEOBJECT_TYPE_TRANSPORT) + m_updateFlag = (m_updateFlag | UPDATEFLAG_TRANSPORT) & ~UPDATEFLAG_POSITION; + Object::_Create(guidlow, goinfo->entry, HIGHGUID_GAMEOBJECT); m_goInfo = goinfo; @@ -238,9 +248,11 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa break; case GAMEOBJECT_TYPE_TRANSPORT: SetUInt32Value(GAMEOBJECT_LEVEL, goinfo->transport.pause); - if (goinfo->transport.startOpen) - SetGoState(GO_STATE_ACTIVE); + SetGoState(goinfo->transport.startOpen ? GO_STATE_ACTIVE : GO_STATE_READY); SetGoAnimProgress(animprogress); + m_goValue.Transport.PathProgress = 0; + m_goValue.Transport.AnimationInfo = sTransportMgr->GetTransportAnimInfo(goinfo->entry); + m_goValue.Transport.CurrentSeg = 0; break; case GAMEOBJECT_TYPE_FISHINGNODE: SetGoAnimProgress(0); @@ -274,18 +286,10 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa void GameObject::Update(uint32 diff) { - if (!AI()) - { - if (!AIM_Initialize()) - TC_LOG_ERROR(LOG_FILTER_GENERAL, "Could not initialize GameObjectAI"); - } else + if (AI()) AI()->UpdateAI(diff); - - if (IS_MO_TRANSPORT_GUID(GetGUID())) - { - //((Transport*)this)->Update(p_time); - return; - } + else if (!AIM_Initialize()) + TC_LOG_ERROR(LOG_FILTER_GENERAL, "Could not initialize GameObjectAI"); switch (m_lootState) { @@ -308,6 +312,38 @@ void GameObject::Update(uint32 diff) m_lootState = GO_READY; break; } + /* TODO: Fix movement in unloaded grid - currently GO will just disappear + case GAMEOBJECT_TYPE_TRANSPORT: + { + if (!m_goValue.Transport.AnimationInfo) + break; + + if (GetGoState() == GO_STATE_READY) + { + m_goValue.Transport.PathProgress += diff; + uint32 timer = m_goValue.Transport.PathProgress % m_goValue.Transport.AnimationInfo->TotalTime; + TransportAnimationEntry const* node = m_goValue.Transport.AnimationInfo->GetAnimNode(timer); + if (node && m_goValue.Transport.CurrentSeg != node->TimeSeg) + { + m_goValue.Transport.CurrentSeg = node->TimeSeg; + + G3D::Quat rotation = m_goValue.Transport.AnimationInfo->GetAnimRotation(timer); + G3D::Vector3 pos = rotation.toRotationMatrix() + * G3D::Matrix3::fromEulerAnglesZYX(GetOrientation(), 0.0f, 0.0f) + * G3D::Vector3(node->X, node->Y, node->Z); + + pos += G3D::Vector3(GetStationaryX(), GetStationaryY(), GetStationaryZ()); + + G3D::Vector3 src(GetPositionX(), GetPositionY(), GetPositionZ()); + + sLog->outInfo(LOG_FILTER_GENERAL, "Src: %s Dest: %s", src.toString().c_str(), pos.toString().c_str()); + + GetMap()->GameObjectRelocation(this, pos.x, pos.y, pos.z, GetOrientation()); + } + } + break; + } + */ case GAMEOBJECT_TYPE_FISHINGNODE: { // fishing code (bobber ready) @@ -1182,10 +1218,12 @@ void GameObject::Use(Unit* user) if (itr->second) { if (Player* ChairUser = ObjectAccessor::FindPlayer(itr->second)) + { if (ChairUser->IsSitState() && ChairUser->getStandState() != UNIT_STAND_STATE_SIT && ChairUser->GetExactDist2d(x_i, y_i) < 0.1f) continue; // This seat is already occupied by ChairUser. NOTE: Not sure if the ChairUser->getStandState() != UNIT_STAND_STATE_SIT check is required. else itr->second = 0; // This seat is unoccupied. + } else itr->second = 0; // The seat may of had an occupant, but they're offline. } @@ -1508,7 +1546,7 @@ void GameObject::Use(Unit* user) Player* player = user->ToPlayer(); - Player* targetPlayer = ObjectAccessor::FindPlayer(player->GetSelection()); + Player* targetPlayer = ObjectAccessor::FindPlayer(player->GetTarget()); // accept only use by player from same raid as caster, except caster itself if (!targetPlayer || targetPlayer == player || !targetPlayer->IsInSameRaidWith(player)) @@ -2102,6 +2140,7 @@ void GameObject::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* t if (index == GAMEOBJECT_DYNAMIC) { uint16 dynFlags = 0; + int16 pathProgress = -1; switch (GetGoType()) { case GAMEOBJECT_TYPE_CHEST: @@ -2115,12 +2154,15 @@ void GameObject::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* t if (ActivateToQuest(target)) dynFlags |= GO_DYNFLAG_LO_SPARKLE; break; + case GAMEOBJECT_TYPE_MO_TRANSPORT: + pathProgress = int16(float(m_goValue.Transport.PathProgress) / float(GetUInt32Value(GAMEOBJECT_LEVEL)) * 65535.0f); + break; default: break; } fieldBuffer << uint16(dynFlags); - fieldBuffer << uint16(-1); + fieldBuffer << int16(pathProgress); } else if (index == GAMEOBJECT_FLAGS) { @@ -2140,3 +2182,25 @@ void GameObject::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* t updateMask.AppendToPacket(data); data->append(fieldBuffer); } + +void GameObject::GetRespawnPosition(float &x, float &y, float &z, float* ori /* = NULL*/) const +{ + if (m_DBTableGuid) + { + if (GameObjectData const* data = sObjectMgr->GetGOData(GetDBTableGUIDLow())) + { + x = data->posX; + y = data->posY; + z = data->posZ; + if (ori) + *ori = data->orientation; + return; + } + } + + x = GetPositionX(); + y = GetPositionY(); + z = GetPositionZ(); + if (ori) + *ori = GetOrientation(); +} diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index 3bddac81ee9..de92257893b 100644 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -28,6 +28,7 @@ class GameObjectAI; class Group; +class Transport; #define MAX_GAMEOBJECT_QUEST_ITEMS 6 @@ -229,6 +230,7 @@ struct GameObjectTemplate uint32 transportPhysics; //5 uint32 mapID; //6 uint32 worldState1; //7 + uint32 canBeStopped; //8 } moTransport; //16 GAMEOBJECT_TYPE_DUELFLAG - empty //17 GAMEOBJECT_TYPE_FISHINGNODE - empty @@ -539,9 +541,17 @@ struct GameObjectTemplate typedef UNORDERED_MAP<uint32, GameObjectTemplate> GameObjectTemplateContainer; class OPvPCapturePoint; +struct TransportAnimation; union GameObjectValue { + //11 GAMEOBJECT_TYPE_TRANSPORT + struct + { + uint32 PathProgress; + TransportAnimation const* AnimationInfo; + uint32 CurrentSeg; + } Transport; //25 GAMEOBJECT_TYPE_FISHINGHOLE struct { @@ -617,7 +627,7 @@ class GameObjectModel; // 5 sec for bobber catch #define FISHING_BOBBER_READY_TIME 5 -class GameObject : public WorldObject, public GridObject<GameObject> +class GameObject : public WorldObject, public GridObject<GameObject>, public MapObject { public: explicit GameObject(); @@ -811,8 +821,19 @@ class GameObject : public WorldObject, public GridObject<GameObject> uint32 GetDisplayId() const { return GetUInt32Value(GAMEOBJECT_DISPLAYID); } GameObjectModel* m_model; + void GetRespawnPosition(float &x, float &y, float &z, float* ori = NULL) const; + + Transport* ToTransport() { if (GetGOInfo()->type == GAMEOBJECT_TYPE_MO_TRANSPORT) return reinterpret_cast<Transport*>(this); else return NULL; } + Transport const* ToTransport() const { if (GetGOInfo()->type == GAMEOBJECT_TYPE_MO_TRANSPORT) return reinterpret_cast<Transport const*>(this); else return NULL; } + + float GetStationaryX() const { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionX(); return GetPositionX(); } + float GetStationaryY() const { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionY(); return GetPositionY(); } + float GetStationaryZ() const { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionZ(); return GetPositionZ(); } + float GetStationaryO() const { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetOrientation(); return GetOrientation(); } + protected: bool AIM_Initialize(); + void UpdateModel(); // updates model in case displayId were changed uint32 m_spellId; time_t m_respawnTime; // (secs) time of next respawn (or despawn if GO have owner()), uint32 m_respawnDelayTime; // (secs) if 0 then current GO state no dependent from timer @@ -835,6 +856,7 @@ class GameObject : public WorldObject, public GridObject<GameObject> GameObjectValue m_goValue; uint64 m_rotation; + Position m_stationaryPosition; uint64 m_lootRecipient; uint32 m_lootRecipientGroup; @@ -842,7 +864,6 @@ class GameObject : public WorldObject, public GridObject<GameObject> private: void RemoveFromOwner(); void SwitchDoorOrButton(bool activate, bool alternative = false); - void UpdateModel(); // updates model in case displayId were changed //! Object distance/size - overridden from Object::_IsWithinDist. Needs to take in account proper GO size. bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool /*is3D*/) const diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 9d77e144c0b..1471e966045 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -219,9 +219,6 @@ void Object::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) c case GAMEOBJECT_TYPE_FLAGDROP: updateType = UPDATETYPE_CREATE_OBJECT2; break; - case GAMEOBJECT_TYPE_TRANSPORT: - flags |= UPDATEFLAG_TRANSPORT; - break; default: break; } @@ -414,13 +411,10 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint16 flags) const // 0x40 if (flags & UPDATEFLAG_STATIONARY_POSITION) { - *data << object->GetPositionX(); - *data << object->GetPositionY(); - if (isType(TYPEMASK_UNIT)) - *data << unit->GetPositionZMinusOffset(); - else - *data << object->GetPositionZ(); - *data << object->GetOrientation(); + *data << object->GetStationaryX(); + *data << object->GetStationaryY(); + *data << object->GetStationaryZ(); + *data << object->GetStationaryO(); } } } @@ -473,7 +467,11 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint16 flags) const // 0x2 if (flags & UPDATEFLAG_TRANSPORT) { - *data << uint32(getMSTime()); // Unknown - getMSTime is wrong. + GameObject const* go = ToGameObject(); + if (go && go->IsTransport()) + *data << uint32(go->GetGOValue()->Transport.PathProgress); + else + *data << uint32(getMSTime()); } // 0x80 @@ -2675,7 +2673,8 @@ void WorldObject::MovePosition(Position &pos, float dist, float angle) // Prevent invalid coordinates here, position is unchanged if (!Trinity::IsValidMapCoord(destx, desty, pos.m_positionZ)) { - TC_LOG_FATAL(LOG_FILTER_GENERAL, "WorldObject::MovePosition invalid coordinates X: %f and Y: %f were passed!", destx, desty); + TC_LOG_FATAL(LOG_FILTER_GENERAL, "WorldObject::MovePosition: Object (TypeId: %u Entry: %u GUID: %u) has invalid coordinates X: %f and Y: %f were passed!", + GetTypeId(), GetEntry(), GetGUIDLow(), destx, desty); return; } diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index 66b3a737e0c..3e010fa98a2 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -523,6 +523,35 @@ class FlaggedValuesArray32 T_FLAGS m_flags; }; +enum MapObjectCellMoveState +{ + MAP_OBJECT_CELL_MOVE_NONE, //not in move list + MAP_OBJECT_CELL_MOVE_ACTIVE, //in move list + MAP_OBJECT_CELL_MOVE_INACTIVE, //in move list but should not move +}; + +class MapObject +{ + friend class Map; //map for moving creatures + friend class ObjectGridLoader; //grid loader for loading creatures + + protected: + MapObject() : _moveState(MAP_OBJECT_CELL_MOVE_NONE) {} + + private: + Cell _currentCell; + Cell const& GetCurrentCell() const { return _currentCell; } + void SetCurrentCell(Cell const& cell) { _currentCell = cell; } + + MapObjectCellMoveState _moveState; + Position _newPosition; + void SetNewCellPosition(float x, float y, float z, float o) + { + _moveState = MAP_OBJECT_CELL_MOVE_ACTIVE; + _newPosition.Relocate(x, y, z, o); + } +}; + class WorldObject : public Object, public WorldLocation { protected: @@ -700,16 +729,22 @@ class WorldObject : public Object, public WorldLocation // Transports Transport* GetTransport() const { return m_transport; } - virtual float GetTransOffsetX() const { return 0; } - virtual float GetTransOffsetY() const { return 0; } - virtual float GetTransOffsetZ() const { return 0; } - virtual float GetTransOffsetO() const { return 0; } - virtual uint32 GetTransTime() const { return 0; } - virtual int8 GetTransSeat() const { return -1; } + float GetTransOffsetX() const { return m_movementInfo.transport.pos.GetPositionX(); } + float GetTransOffsetY() const { return m_movementInfo.transport.pos.GetPositionY(); } + float GetTransOffsetZ() const { return m_movementInfo.transport.pos.GetPositionZ(); } + float GetTransOffsetO() const { return m_movementInfo.transport.pos.GetOrientation(); } + uint32 GetTransTime() const { return m_movementInfo.transport.time; } + int8 GetTransSeat() const { return m_movementInfo.transport.seat; } virtual uint64 GetTransGUID() const; void SetTransport(Transport* t) { m_transport = t; } MovementInfo m_movementInfo; + + virtual float GetStationaryX() const { return GetPositionX(); } + virtual float GetStationaryY() const { return GetPositionY(); } + virtual float GetStationaryZ() const { return GetPositionZ(); } + virtual float GetStationaryO() const { return GetOrientation(); } + protected: std::string m_name; bool m_isActive; @@ -739,7 +774,6 @@ class WorldObject : public Object, public WorldLocation uint16 m_notifyflags; uint16 m_executed_notifies; - virtual bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D) const; bool CanNeverSee(WorldObject const* obj) const; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 09ae919618a..40dbe6c2fe7 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -673,7 +673,6 @@ Player::Player(WorldSession* session): Unit(true) if (!GetSession()->HasPermission(rbac::RBAC_PERM_CAN_FILTER_WHISPERS)) SetAcceptWhispers(true); - m_curSelection = 0; m_lootGuid = 0; m_comboTarget = 0; @@ -17183,17 +17182,15 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) } else { - for (MapManager::TransportSet::iterator iter = sMapMgr->m_Transports.begin(); iter != sMapMgr->m_Transports.end(); ++iter) + if (GameObject* go = HashMapHolder<GameObject>::Find(m_movementInfo.transport.guid)) + m_transport = go->ToTransport(); + + if (m_transport) { - if ((*iter)->GetGUIDLow() == transGUID) - { - m_transport = *iter; - m_transport->AddPassenger(this); - mapId = (m_transport->GetMapId()); - break; - } + m_transport->AddPassenger(this); + mapId = m_transport->GetMapId(); } - if (!m_transport) + else { TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player (guidlow %d) have problems with transport guid (%u). Teleport to bind location.", guid, transGUID); @@ -22166,7 +22163,7 @@ inline void UpdateVisibilityOf_helper(std::set<uint64>& s64, T* target, std::set template<> inline void UpdateVisibilityOf_helper(std::set<uint64>& s64, GameObject* target, std::set<Unit*>& /*v*/) { - // Don't update only GAMEOBJECT_TYPE_TRANSPORT (or all transports and destructible buildings?) + // @HACK: This is to prevent objects like deeprun tram from disappearing when player moves far from its spawn point while riding it if ((target->GetGOInfo()->type != GAMEOBJECT_TYPE_TRANSPORT)) s64.insert(target->GetGUID()); } @@ -22218,9 +22215,6 @@ void Player::UpdateVisibilityOf(WorldObject* target) { if (CanSeeOrDetect(target, false, true)) { - //if (target->isType(TYPEMASK_UNIT) && ((Unit*)target)->m_Vehicle) - // UpdateVisibilityOf(((Unit*)target)->m_Vehicle); - target->SendUpdateToPlayer(this); m_clientGUIDs.insert(target->GetGUID()); @@ -22309,9 +22303,6 @@ void Player::UpdateVisibilityOf(T* target, UpdateData& data, std::set<Unit*>& vi { if (CanSeeOrDetect(target, false, true)) { - //if (target->isType(TYPEMASK_UNIT) && ((Unit*)target)->m_Vehicle) - // UpdateVisibilityOf(((Unit*)target)->m_Vehicle, data, visibleNow); - target->BuildCreateUpdateBlockForPlayer(&data, this); UpdateVisibilityOf_helper(m_clientGUIDs, target, visibleNow); @@ -22397,15 +22388,15 @@ bool Player::IsQuestRewarded(uint32 quest_id) const Unit* Player::GetSelectedUnit() const { - if (m_curSelection) - return ObjectAccessor::GetUnit(*this, m_curSelection); + if (uint64 selectionGUID = GetUInt64Value(UNIT_FIELD_TARGET)) + return ObjectAccessor::GetUnit(*this, selectionGUID); return NULL; } Player* Player::GetSelectedPlayer() const { - if (m_curSelection) - return ObjectAccessor::GetPlayer(*this, m_curSelection); + if (uint64 selectionGUID = GetUInt64Value(UNIT_FIELD_TARGET)) + return ObjectAccessor::GetPlayer(*this, selectionGUID); return NULL; } diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index bac794422be..fee542a752e 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1506,10 +1506,11 @@ class Player : public Unit, public GridObject<Player> size_t GetRewardedQuestCount() const { return m_RewardedQuests.size(); } bool IsQuestRewarded(uint32 quest_id) const; - uint64 GetSelection() const { return m_curSelection; } Unit* GetSelectedUnit() const; Player* GetSelectedPlayer() const; - void SetSelection(uint64 guid) { m_curSelection = guid; SetUInt64Value(UNIT_FIELD_TARGET, guid); } + + void SetTarget(uint64 /*guid*/) OVERRIDE { } /// Used for serverside target changes, does not apply to players + void SetSelection(uint64 guid) { SetUInt64Value(UNIT_FIELD_TARGET, guid); } uint8 GetComboPoints() const { return m_comboPoints; } uint64 GetComboTarget() const { return m_comboTarget; } @@ -2424,7 +2425,6 @@ class Player : public Unit, public GridObject<Player> bool m_itemUpdateQueueBlocked; uint32 m_ExtraFlags; - uint64 m_curSelection; uint64 m_comboTarget; int8 m_comboPoints; diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index 23197b40ad0..06af4244246 100644 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -26,166 +26,26 @@ #include "DBCStores.h" #include "World.h" #include "GameObjectAI.h" +#include "Vehicle.h" +#include "MapReference.h" #include "Player.h" +#include "Cell.h" +#include "CellImpl.h" -void MapManager::LoadTransports() +Transport::Transport() : GameObject(), + _transportInfo(NULL), _isMoving(true), _pendingStop(false) { - uint32 oldMSTime = getMSTime(); - - QueryResult result = WorldDatabase.Query("SELECT guid, entry, name, period, ScriptName FROM transports"); - - if (!result) - { - TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 transports. DB table `transports` is empty!"); - return; - } - - uint32 count = 0; - - do - { - - Field* fields = result->Fetch(); - uint32 lowguid = fields[0].GetUInt32(); - uint32 entry = fields[1].GetUInt32(); - std::string name = fields[2].GetString(); - uint32 period = fields[3].GetUInt32(); - uint32 scriptId = sObjectMgr->GetScriptId(fields[4].GetCString()); - - GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(entry); - - if (!goinfo) - { - TC_LOG_ERROR(LOG_FILTER_SQL, "Transport ID:%u, Name: %s, will not be loaded, gameobject_template missing", entry, name.c_str()); - continue; - } - - if (goinfo->type != GAMEOBJECT_TYPE_MO_TRANSPORT) - { - TC_LOG_ERROR(LOG_FILTER_SQL, "Transport ID:%u, Name: %s, will not be loaded, gameobject_template type wrong", entry, name.c_str()); - continue; - } - - // TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading transport %d between %s, %s", entry, name.c_str(), goinfo->name); - - std::set<uint32> mapsUsed; - - Transport* t = new Transport(period, scriptId); - if (!t->GenerateWaypoints(goinfo->moTransport.taxiPathId, mapsUsed)) - // skip transports with empty waypoints list - { - TC_LOG_ERROR(LOG_FILTER_SQL, "Transport (path id %u) path size = 0. Transport ignored, check DBC files or transport GO data0 field.", goinfo->moTransport.taxiPathId); - delete t; - continue; - } - - float x = t->m_WayPoints[0].x; - float y = t->m_WayPoints[0].y; - float z = t->m_WayPoints[0].z; - uint32 mapid = t->m_WayPoints[0].mapid; - float o = 1.0f; - - // creates the Gameobject - if (!t->Create(lowguid, entry, mapid, x, y, z, o, 255, 0)) - { - delete t; - continue; - } - - m_Transports.insert(t); - - for (std::set<uint32>::const_iterator i = mapsUsed.begin(); i != mapsUsed.end(); ++i) - m_TransportsByMap[*i].insert(t); - - //If we someday decide to use the grid to track transports, here: - t->SetMap(sMapMgr->CreateBaseMap(mapid)); - t->AddToWorld(); - - ++count; - } - while (result->NextRow()); - - // check transport data DB integrity - result = WorldDatabase.Query("SELECT gameobject.guid, gameobject.id, transports.name FROM gameobject, transports WHERE gameobject.id = transports.entry"); - if (result) // wrong data found - { - do - { - Field* fields = result->Fetch(); - - uint32 guid = fields[0].GetUInt32(); - uint32 entry = fields[1].GetUInt32(); - std::string name = fields[2].GetString(); - TC_LOG_ERROR(LOG_FILTER_SQL, "Transport %u '%s' have record (GUID: %u) in `gameobject`. Transports must not have any records in `gameobject` or its behavior will be unpredictable/bugged.", entry, name.c_str(), guid); - } - while (result->NextRow()); - } - - TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); -} - -void MapManager::LoadTransportNPCs() -{ - uint32 oldMSTime = getMSTime(); - - // 0 1 2 3 4 5 6 7 - QueryResult result = WorldDatabase.Query("SELECT guid, npc_entry, transport_entry, TransOffsetX, TransOffsetY, TransOffsetZ, TransOffsetO, emote FROM creature_transport"); - - if (!result) - { - TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 transport NPCs. DB table `creature_transport` is empty!"); - return; - } - - uint32 count = 0; - - do - { - Field* fields = result->Fetch(); - uint32 guid = fields[0].GetInt32(); - uint32 entry = fields[1].GetInt32(); - uint32 transportEntry = fields[2].GetInt32(); - float tX = fields[3].GetFloat(); - float tY = fields[4].GetFloat(); - float tZ = fields[5].GetFloat(); - float tO = fields[6].GetFloat(); - uint32 anim = fields[7].GetInt32(); - - for (MapManager::TransportSet::iterator itr = m_Transports.begin(); itr != m_Transports.end(); ++itr) - { - if ((*itr)->GetEntry() == transportEntry) - { - (*itr)->AddNPCPassenger(guid, entry, tX, tY, tZ, tO, anim); - break; - } - } - - ++count; - } - while (result->NextRow()); - - TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u transport npcs in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); -} - -Transport::Transport(uint32 period, uint32 script) : GameObject(), m_pathTime(0), m_timer(0), -currenttguid(0), m_period(period), ScriptId(script), m_nextNodeTime(0) -{ - m_updateFlag = (UPDATEFLAG_TRANSPORT | UPDATEFLAG_LOWGUID | UPDATEFLAG_STATIONARY_POSITION | UPDATEFLAG_ROTATION); + m_updateFlag = UPDATEFLAG_TRANSPORT | UPDATEFLAG_LOWGUID | UPDATEFLAG_STATIONARY_POSITION | UPDATEFLAG_ROTATION; } Transport::~Transport() { - for (CreatureSet::iterator itr = m_NPCPassengerSet.begin(); itr != m_NPCPassengerSet.end(); ++itr) - { - (*itr)->SetTransport(NULL); - GetMap()->AddObjectToRemoveList(*itr); - } + UnloadStaticPassengers(); } -bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, float y, float z, float ang, uint32 animprogress, uint32 dynflags) +bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, float y, float z, float ang, uint32 animprogress) { Relocate(x, y, z, ang); - // instance id and phaseMask isn't set to values different from std. if (!IsPositionValid()) { @@ -206,520 +66,516 @@ bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, floa m_goInfo = goinfo; - SetObjectScale(goinfo->size); + TransportTemplate const* tInfo = sTransportMgr->GetTransportTemplate(entry); + if (!tInfo) + { + TC_LOG_ERROR(LOG_FILTER_SQL, "Transport %u (name: %s) will not be created, missing `transport_template` entry.", entry, goinfo->name.c_str()); + return false; + } + + _transportInfo = tInfo; + // initialize waypoints + _nextFrame = tInfo->keyFrames.begin(); + _currentFrame = _nextFrame++; + _triggeredArrivalEvent = false; + _triggeredDepartureEvent = false; + + m_goValue.Transport.PathProgress = 0; + SetFloatValue(OBJECT_FIELD_SCALE_X, goinfo->size); SetUInt32Value(GAMEOBJECT_FACTION, goinfo->faction); SetUInt32Value(GAMEOBJECT_FLAGS, goinfo->flags); - SetUInt32Value(GAMEOBJECT_LEVEL, m_period); + SetPeriod(tInfo->pathTime); SetEntry(goinfo->entry); - SetDisplayId(goinfo->displayId); - SetGoState(GO_STATE_READY); - SetGoType(GameobjectTypes(goinfo->type)); - + _pendingStop = goinfo->moTransport.canBeStopped != 0; + SetGoType(GAMEOBJECT_TYPE_MO_TRANSPORT); SetGoAnimProgress(animprogress); - if (dynflags) - SetUInt32Value(GAMEOBJECT_DYNAMIC, MAKE_PAIR32(0, dynflags)); - SetName(goinfo->name); - - SetZoneScript(); - + UpdateRotationFields(0.0f, 1.0f); return true; } -struct keyFrame +void Transport::Update(uint32 diff) { - explicit keyFrame(TaxiPathNodeEntry const& _node) : node(&_node), - distSinceStop(-1.0f), distUntilStop(-1.0f), distFromPrev(-1.0f), tFrom(0.0f), tTo(0.0f) - { - } + uint32 const positionUpdateDelay = 200; - TaxiPathNodeEntry const* node; + if (AI()) + AI()->UpdateAI(diff); + else if (!AIM_Initialize()) + TC_LOG_ERROR(LOG_FILTER_TRANSPORTS, "Could not initialize GameObjectAI for Transport"); - float distSinceStop; - float distUntilStop; - float distFromPrev; - float tFrom, tTo; -}; + if (GetKeyFrames().size() <= 1) + return; -bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids) -{ - if (pathid >= sTaxiPathNodesByPath.size()) - return false; + m_goValue.Transport.PathProgress += diff; - TaxiPathNodeList const& path = sTaxiPathNodesByPath[pathid]; + uint32 timer = m_goValue.Transport.PathProgress % GetPeriod(); - std::vector<keyFrame> keyFrames; - int mapChange = 0; - mapids.clear(); - for (size_t i = 1; i < path.size() - 1; ++i) + // Set current waypoint + // Desired outcome: _currentFrame->DepartureTime < timer < _nextFrame->ArriveTime + // ... arrive | ... delay ... | departure + // event / event / + for (;;) { - if (mapChange == 0) + if (timer >= _currentFrame->ArriveTime) { - TaxiPathNodeEntry const& node_i = path[i]; - if (node_i.mapid == path[i+1].mapid) + if (!_triggeredArrivalEvent) { - keyFrame k(node_i); - keyFrames.push_back(k); - mapids.insert(k.node->mapid); + DoEventIfAny(*_currentFrame, false); + _triggeredArrivalEvent = true; } - else + + if (timer < _currentFrame->DepartureTime) { - mapChange = 1; + SetMoving(false); + if (_pendingStop) + SetGoState(GO_STATE_READY); + break; // its a stop frame and we are waiting } } - else - { - --mapChange; - } - } - - int lastStop = -1; - int firstStop = -1; - // first cell is arrived at by teleportation :S - keyFrames[0].distFromPrev = 0; - if (keyFrames[0].node->actionFlag == 2) - { - lastStop = 0; - } - - // find the rest of the distances between key points - for (size_t i = 1; i < keyFrames.size(); ++i) - { - if ((keyFrames[i].node->actionFlag == 1) || (keyFrames[i].node->mapid != keyFrames[i-1].node->mapid)) + if (_pendingStop && timer >= _currentFrame->DepartureTime && GetGoState() == GO_STATE_READY) { - keyFrames[i].distFromPrev = 0; + m_goValue.Transport.PathProgress = (m_goValue.Transport.PathProgress / GetPeriod()); + m_goValue.Transport.PathProgress *= GetPeriod(); + m_goValue.Transport.PathProgress += _currentFrame->ArriveTime; + break; } - else - { - keyFrames[i].distFromPrev = - sqrt(pow(keyFrames[i].node->x - keyFrames[i - 1].node->x, 2) + - pow(keyFrames[i].node->y - keyFrames[i - 1].node->y, 2) + - pow(keyFrames[i].node->z - keyFrames[i - 1].node->z, 2)); - } - if (keyFrames[i].node->actionFlag == 2) + + if (timer >= _currentFrame->DepartureTime && !_triggeredDepartureEvent) { - // remember first stop frame - if (firstStop == -1) - firstStop = i; - lastStop = i; + DoEventIfAny(*_currentFrame, true); // departure event + _triggeredDepartureEvent = true; } - } - - float tmpDist = 0; - for (size_t i = 0; i < keyFrames.size(); ++i) - { - int j = (i + lastStop) % keyFrames.size(); - if (keyFrames[j].node->actionFlag == 2) - tmpDist = 0; - else - tmpDist += keyFrames[j].distFromPrev; - keyFrames[j].distSinceStop = tmpDist; - } - for (int i = int(keyFrames.size()) - 1; i >= 0; i--) - { - int j = (i + (firstStop+1)) % keyFrames.size(); - tmpDist += keyFrames[(j + 1) % keyFrames.size()].distFromPrev; - keyFrames[j].distUntilStop = tmpDist; - if (keyFrames[j].node->actionFlag == 2) - tmpDist = 0; - } + if (timer >= _currentFrame->DepartureTime && timer < _currentFrame->NextArriveTime) + break; // found current waypoint - for (size_t i = 0; i < keyFrames.size(); ++i) - { - if (keyFrames[i].distSinceStop < (30 * 30 * 0.5f)) - keyFrames[i].tFrom = sqrt(2 * keyFrames[i].distSinceStop); - else - keyFrames[i].tFrom = ((keyFrames[i].distSinceStop - (30 * 30 * 0.5f)) / 30) + 30; + MoveToNextWaypoint(); - if (keyFrames[i].distUntilStop < (30 * 30 * 0.5f)) - keyFrames[i].tTo = sqrt(2 * keyFrames[i].distUntilStop); - else - keyFrames[i].tTo = ((keyFrames[i].distUntilStop - (30 * 30 * 0.5f)) / 30) + 30; + // not waiting anymore + SetMoving(true); - keyFrames[i].tFrom *= 1000; - keyFrames[i].tTo *= 1000; - } - - // for (int i = 0; i < keyFrames.size(); ++i) { - // TC_LOG_INFO(LOG_FILTER_TRANSPORTS, "%f, %f, %f, %f, %f, %f, %f", keyFrames[i].x, keyFrames[i].y, keyFrames[i].distUntilStop, keyFrames[i].distSinceStop, keyFrames[i].distFromPrev, keyFrames[i].tFrom, keyFrames[i].tTo); - // } + // Enable movement + if (GetGOInfo()->moTransport.canBeStopped) + SetGoState(GO_STATE_ACTIVE); - // Now we're completely set up; we can move along the length of each waypoint at 100 ms intervals - // speed = max(30, t) (remember x = 0.5s^2, and when accelerating, a = 1 unit/s^2 - int t = 0; - bool teleport = false; - if (keyFrames[keyFrames.size() - 1].node->mapid != keyFrames[0].node->mapid) - teleport = true; + // Departure event + if (_currentFrame->IsTeleportFrame()) + TeleportTransport(_nextFrame->Node->mapid, _nextFrame->Node->x, _nextFrame->Node->y, _nextFrame->Node->z); - m_WayPoints[0] = WayPoint(keyFrames[0].node->mapid, keyFrames[0].node->x, keyFrames[0].node->y, keyFrames[0].node->z, teleport, 0, - keyFrames[0].node->arrivalEventID, keyFrames[0].node->departureEventID); + sScriptMgr->OnRelocate(this, _currentFrame->Node->index, _currentFrame->Node->mapid, _currentFrame->Node->x, _currentFrame->Node->y, _currentFrame->Node->z); - t += keyFrames[0].node->delay * 1000; + TC_LOG_DEBUG(LOG_FILTER_TRANSPORTS, "Transport %u (%s) moved to node %u %u %f %f %f", GetEntry(), GetName().c_str(), _currentFrame->Node->index, _currentFrame->Node->mapid, _currentFrame->Node->x, _currentFrame->Node->y, _currentFrame->Node->z); + } - uint32 cM = keyFrames[0].node->mapid; - for (size_t i = 0; i < keyFrames.size() - 1; ++i) + // Set position + _positionChangeTimer.Update(diff); + if (_positionChangeTimer.Passed()) { - float d = 0; - float tFrom = keyFrames[i].tFrom; - float tTo = keyFrames[i].tTo; - - // keep the generation of all these points; we use only a few now, but may need the others later - if (((d < keyFrames[i + 1].distFromPrev) && (tTo > 0))) + _positionChangeTimer.Reset(positionUpdateDelay); + if (IsMoving()) { - while ((d < keyFrames[i + 1].distFromPrev) && (tTo > 0)) - { - tFrom += 100; - tTo -= 100; - - if (d > 0) - { - float newX = keyFrames[i].node->x + (keyFrames[i + 1].node->x - keyFrames[i].node->x) * d / keyFrames[i + 1].distFromPrev; - float newY = keyFrames[i].node->y + (keyFrames[i + 1].node->y - keyFrames[i].node->y) * d / keyFrames[i + 1].distFromPrev; - float newZ = keyFrames[i].node->z + (keyFrames[i + 1].node->z - keyFrames[i].node->z) * d / keyFrames[i + 1].distFromPrev; - - teleport = false; - if (keyFrames[i].node->mapid != cM) - { - teleport = true; - cM = keyFrames[i].node->mapid; - } - - // TC_LOG_INFO(LOG_FILTER_TRANSPORTS, "T: %d, D: %f, x: %f, y: %f, z: %f", t, d, newX, newY, newZ); - if (teleport) - m_WayPoints[t] = WayPoint(keyFrames[i].node->mapid, newX, newY, newZ, teleport, 0); - } - - if (tFrom < tTo) // caught in tFrom dock's "gravitational pull" - { - if (tFrom <= 30000) - { - d = 0.5f * (tFrom / 1000) * (tFrom / 1000); - } - else - { - d = 0.5f * 30 * 30 + 30 * ((tFrom - 30000) / 1000); - } - d = d - keyFrames[i].distSinceStop; - } - else - { - if (tTo <= 30000) - { - d = 0.5f * (tTo / 1000) * (tTo / 1000); - } - else - { - d = 0.5f * 30 * 30 + 30 * ((tTo - 30000) / 1000); - } - d = keyFrames[i].distUntilStop - d; - } - t += 100; - } - t -= 100; + float t = CalculateSegmentPos(float(timer) * 0.001f); + G3D::Vector3 pos, dir; + _currentFrame->Spline->evaluate_percent(_currentFrame->Index, t, pos); + //_currentFrame->Spline->evaluate_derivative(_currentFrame->Index, t, dir); + UpdatePosition(pos.x, pos.y, pos.z, 0.0f/*atan2(dir.x, dir.y)*/); } - - if (keyFrames[i + 1].tFrom > keyFrames[i + 1].tTo) - t += 100 - ((long)keyFrames[i + 1].tTo % 100); - else - t += (long)keyFrames[i + 1].tTo % 100; - - teleport = false; - if ((keyFrames[i + 1].node->actionFlag == 1) || (keyFrames[i + 1].node->mapid != keyFrames[i].node->mapid)) - { - teleport = true; - cM = keyFrames[i + 1].node->mapid; - } - - m_WayPoints[t] = WayPoint(keyFrames[i + 1].node->mapid, keyFrames[i + 1].node->x, keyFrames[i + 1].node->y, keyFrames[i + 1].node->z, teleport, - 0, keyFrames[i + 1].node->arrivalEventID, keyFrames[i + 1].node->departureEventID); - // TC_LOG_INFO(LOG_FILTER_TRANSPORTS, "T: %d, x: %f, y: %f, z: %f, t:%d", t, pos.x, pos.y, pos.z, teleport); - - t += keyFrames[i + 1].node->delay * 1000; } - uint32 timer = t; - - // TC_LOG_INFO(LOG_FILTER_TRANSPORTS, " Generated %lu waypoints, total time %u.", (unsigned long)m_WayPoints.size(), timer); - - m_curr = m_WayPoints.begin(); - m_next = GetNextWayPoint(); - m_pathTime = timer; + sScriptMgr->OnTransportUpdate(this, diff); +} - m_nextNodeTime = m_curr->first; +void Transport::AddPassenger(WorldObject* passenger) +{ + if (_passengers.insert(passenger).second) + TC_LOG_DEBUG(LOG_FILTER_TRANSPORTS, "Object %s boarded transport %s.", passenger->GetName().c_str(), GetName().c_str()); - return true; + if (Player* plr = passenger->ToPlayer()) + sScriptMgr->OnAddPassenger(this, plr); } -Transport::WayPointMap::const_iterator Transport::GetNextWayPoint() +void Transport::RemovePassenger(WorldObject* passenger) { - WayPointMap::const_iterator iter = m_curr; - ++iter; - if (iter == m_WayPoints.end()) - iter = m_WayPoints.begin(); - return iter; + if (_passengers.erase(passenger) || _staticPassengers.erase(passenger)) // static passenger can remove itself in case of grid unload + TC_LOG_DEBUG(LOG_FILTER_TRANSPORTS, "Object %s removed from transport %s.", passenger->GetName().c_str(), GetName().c_str()); + + + if (Player* plr = passenger->ToPlayer()) + sScriptMgr->OnRemovePassenger(this, plr); } -void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z) +Creature* Transport::CreateNPCPassenger(uint32 guid, CreatureData const* data) { - Map const* oldMap = GetMap(); - Relocate(x, y, z); + Map* map = GetMap(); + Creature* creature = new Creature(); - for (PlayerSet::const_iterator itr = m_passengers.begin(); itr != m_passengers.end();) + if (!creature->LoadCreatureFromDB(guid, map, false)) { - Player* player = *itr; - ++itr; - - if (player->isDead() && !player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST)) - player->ResurrectPlayer(1.0f); - - player->TeleportTo(newMapid, x, y, z, GetOrientation(), TELE_TO_NOT_LEAVE_TRANSPORT); + delete creature; + return NULL; } - //we need to create and save new Map object with 'newMapid' because if not done -> lead to invalid Map object reference... - //player far teleport would try to create same instance, but we need it NOW for transport... + float x = data->posX; + float y = data->posY; + float z = data->posZ; + float o = data->orientation; - RemoveFromWorld(); - ResetMap(); - Map* newMap = sMapMgr->CreateBaseMap(newMapid); - SetMap(newMap); - ASSERT(GetMap()); - AddToWorld(); + creature->SetTransport(this); + creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); + creature->m_movementInfo.transport.guid = GetGUID(); + creature->m_movementInfo.transport.pos.Relocate(x, y, z, o); + CalculatePassengerPosition(x, y, z, &o); + creature->Relocate(x, y, z, o); + creature->SetHomePosition(creature->GetPositionX(), creature->GetPositionY(), creature->GetPositionZ(), creature->GetOrientation()); + creature->SetTransportHomePosition(creature->m_movementInfo.transport.pos); - if (oldMap != newMap) + if (!creature->IsPositionValid()) { - UpdateForMap(oldMap); - UpdateForMap(newMap); + TC_LOG_ERROR(LOG_FILTER_TRANSPORTS, "Creature (guidlow %d, entry %d) not created. Suggested coordinates aren't valid (X: %f Y: %f)",creature->GetGUIDLow(),creature->GetEntry(),creature->GetPositionX(),creature->GetPositionY()); + delete creature; + return NULL; } - for (CreatureSet::iterator itr = m_NPCPassengerSet.begin(); itr != m_NPCPassengerSet.end(); ++itr) - (*itr)->FarTeleportTo(newMap, x, y, z, (*itr)->GetOrientation()); -} - -bool Transport::AddPassenger(Player* passenger) -{ - if (m_passengers.insert(passenger).second) - TC_LOG_INFO(LOG_FILTER_TRANSPORTS, "Player %s boarded transport %s.", passenger->GetName().c_str(), GetName().c_str()); + map->AddToMap(creature); + _staticPassengers.insert(creature); - sScriptMgr->OnAddPassenger(this, passenger); - return true; + sScriptMgr->OnAddCreaturePassenger(this, creature); + return creature; } -bool Transport::RemovePassenger(Player* passenger) +GameObject* Transport::CreateGOPassenger(uint32 guid, GameObjectData const* data) { - if (m_passengers.erase(passenger)) - TC_LOG_INFO(LOG_FILTER_TRANSPORTS, "Player %s removed from transport %s.", passenger->GetName().c_str(), GetName().c_str()); - - sScriptMgr->OnRemovePassenger(this, passenger); - return true; -} + Map* map = GetMap(); + GameObject* go = new GameObject(); -void Transport::Update(uint32 p_diff) -{ - if (!AI()) + if (!go->LoadGameObjectFromDB(guid, map, false)) { - if (!AIM_Initialize()) - TC_LOG_ERROR(LOG_FILTER_TRANSPORTS, "Could not initialize GameObjectAI for Transport"); - } else - AI()->UpdateAI(p_diff); + delete go; + return NULL; + } - if (m_WayPoints.size() <= 1) - return; + float x = data->posX; + float y = data->posY; + float z = data->posZ; + float o = data->orientation; - m_timer = getMSTime() % m_period; - while (((m_timer - m_curr->first) % m_pathTime) > ((m_next->first - m_curr->first) % m_pathTime)) - { - DoEventIfAny(*m_curr, true); + go->SetTransport(this); + go->m_movementInfo.transport.guid = GetGUID(); + go->m_movementInfo.transport.pos.Relocate(x, y, z, o); + CalculatePassengerPosition(x, y, z, &o); + go->Relocate(x, y, z, o); - m_curr = GetNextWayPoint(); - m_next = GetNextWayPoint(); + if (!go->IsPositionValid()) + { + TC_LOG_ERROR(LOG_FILTER_TRANSPORTS, "GameObject (guidlow %d, entry %d) not created. Suggested coordinates aren't valid (X: %f Y: %f)", go->GetGUIDLow(), go->GetEntry(), go->GetPositionX(), go->GetPositionY()); + delete go; + return NULL; + } - DoEventIfAny(*m_curr, false); + map->AddToMap(go); + _staticPassengers.insert(go); - // first check help in case client-server transport coordinates de-synchronization - if (m_curr->second.mapid != GetMapId() || m_curr->second.teleport) - { - TeleportTransport(m_curr->second.mapid, m_curr->second.x, m_curr->second.y, m_curr->second.z); - } - else - { - Relocate(m_curr->second.x, m_curr->second.y, m_curr->second.z, GetAngle(m_next->second.x, m_next->second.y) + float(M_PI)); - UpdatePassengerPositions(); // COME BACK MARKER - } - - sScriptMgr->OnRelocate(this, m_curr->first, m_curr->second.mapid, m_curr->second.x, m_curr->second.y, m_curr->second.z); + //sScriptMgr->OnAddCreaturePassenger(this, go); + return go; +} - m_nextNodeTime = m_curr->first; +void Transport::CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= NULL*/) const +{ + float inx = x, iny = y, inz = z; + if (o) + *o = Position::NormalizeOrientation(GetOrientation() + *o); - if (m_curr == m_WayPoints.begin()) - TC_LOG_DEBUG(LOG_FILTER_TRANSPORTS, " ************ BEGIN ************** %s", m_name.c_str()); + x = GetPositionX() + inx * std::cos(GetOrientation()) - iny * std::sin(GetOrientation()); + y = GetPositionY() + iny * std::cos(GetOrientation()) + inx * std::sin(GetOrientation()); + z = GetPositionZ() + inz; +} - TC_LOG_DEBUG(LOG_FILTER_TRANSPORTS, "%s moved to %d %f %f %f %d", m_name.c_str(), m_curr->second.id, m_curr->second.x, m_curr->second.y, m_curr->second.z, m_curr->second.mapid); - } +void Transport::CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= NULL*/) const +{ + if (o) + *o = Position::NormalizeOrientation(*o - GetOrientation()); - sScriptMgr->OnTransportUpdate(this, p_diff); + z -= GetPositionZ(); + y -= GetPositionY(); // y = searchedY * std::cos(o) + searchedX * std::sin(o) + x -= GetPositionX(); // x = searchedX * std::cos(o) + searchedY * std::sin(o + pi) + float inx = x, iny = y; + y = (iny - inx * std::tan(GetOrientation())) / (std::cos(GetOrientation()) + std::sin(GetOrientation()) * std::tan(GetOrientation())); + x = (inx + iny * std::tan(GetOrientation())) / (std::cos(GetOrientation()) + std::sin(GetOrientation()) * std::tan(GetOrientation())); } -void Transport::UpdateForMap(Map const* targetMap) +void Transport::UpdatePosition(float x, float y, float z, float o) { - Map::PlayerList const& player = targetMap->GetPlayers(); - if (player.isEmpty()) - return; + bool newActive = GetMap()->IsGridLoaded(x, y); + + Relocate(x, y, z, o); + + UpdatePassengerPositions(_passengers); + + /* There are four possible scenarios that trigger loading/unloading passengers: + 1. transport moves from inactive to active grid + 2. the grid that transport is currently in becomes active + 3. transport moves from active to inactive grid + 4. the grid that transport is currently in unloads + */ + if (_staticPassengers.empty() && newActive) // 1. and 2. + LoadStaticPassengers(); + else if (!_staticPassengers.empty() && !newActive && Cell(x, y).DiffGrid(Cell(GetPositionX(), GetPositionY()))) // 3. + UnloadStaticPassengers(); + else + UpdatePassengerPositions(_staticPassengers); + // 4. is handed by grid unload +} - if (GetMapId() == targetMap->GetId()) +void Transport::LoadStaticPassengers() +{ + if (uint32 mapId = GetGOInfo()->moTransport.mapID) { - for (Map::PlayerList::const_iterator itr = player.begin(); itr != player.end(); ++itr) + CellObjectGuidsMap const& cells = sObjectMgr->GetMapObjectGuids(mapId, GetMap()->GetSpawnMode()); + CellGuidSet::const_iterator guidEnd; + for (CellObjectGuidsMap::const_iterator cellItr = cells.begin(); cellItr != cells.end(); ++cellItr) { - if (this != itr->GetSource()->GetTransport()) - { - UpdateData transData; - BuildCreateUpdateBlockForPlayer(&transData, itr->GetSource()); - WorldPacket packet; - transData.BuildPacket(&packet); - itr->GetSource()->SendDirectMessage(&packet); - } + // Creatures on transport + guidEnd = cellItr->second.creatures.end(); + for (CellGuidSet::const_iterator guidItr = cellItr->second.creatures.begin(); guidItr != guidEnd; ++guidItr) + CreateNPCPassenger(*guidItr, sObjectMgr->GetCreatureData(*guidItr)); + + // GameObjects on transport + guidEnd = cellItr->second.gameobjects.end(); + for (CellGuidSet::const_iterator guidItr = cellItr->second.gameobjects.begin(); guidItr != guidEnd; ++guidItr) + CreateGOPassenger(*guidItr, sObjectMgr->GetGOData(*guidItr)); } } - else - { - UpdateData transData; - BuildOutOfRangeUpdateBlock(&transData); - WorldPacket out_packet; - transData.BuildPacket(&out_packet); - - for (Map::PlayerList::const_iterator itr = player.begin(); itr != player.end(); ++itr) - if (this != itr->GetSource()->GetTransport()) - itr->GetSource()->SendDirectMessage(&out_packet); - } } -void Transport::DoEventIfAny(WayPointMap::value_type const& node, bool departure) +void Transport::UnloadStaticPassengers() { - if (uint32 eventid = departure ? node.second.departureEventID : node.second.arrivalEventID) + while (!_staticPassengers.empty()) { - TC_LOG_DEBUG(LOG_FILTER_MAPSCRIPTS, "Taxi %s event %u of node %u of %s path", departure ? "departure" : "arrival", eventid, node.first, GetName().c_str()); - GetMap()->ScriptsStart(sEventScripts, eventid, this, this); - EventInform(eventid); + WorldObject* obj = *_staticPassengers.begin(); + obj->AddObjectToRemoveList(); // also removes from _staticPassengers } } -void Transport::BuildStartMovePacket(Map const* targetMap) +void Transport::EnableMovement(bool enabled) { - SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); - SetGoState(GO_STATE_ACTIVE); - UpdateForMap(targetMap); + if (!GetGOInfo()->moTransport.canBeStopped) + return; + + _pendingStop = !enabled; } -void Transport::BuildStopMovePacket(Map const* targetMap) +void Transport::MoveToNextWaypoint() { - RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); - SetGoState(GO_STATE_READY); - UpdateForMap(targetMap); + // Clear events flagging + _triggeredArrivalEvent = false; + _triggeredDepartureEvent = false; + + // Set frames + _currentFrame = _nextFrame++; + if (_nextFrame == GetKeyFrames().end()) + _nextFrame = GetKeyFrames().begin(); } -uint32 Transport::AddNPCPassenger(uint32 tguid, uint32 entry, float x, float y, float z, float o, uint32 anim) +float Transport::CalculateSegmentPos(float now) { - Map* map = GetMap(); - //make it world object so it will not be unloaded with grid - Creature* creature = new Creature(true); - - if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, GetPhaseMask(), entry, 0, GetGOInfo()->faction, 0, 0, 0, 0)) + KeyFrame const& frame = *_currentFrame; + const float speed = float(m_goInfo->moTransport.moveSpeed); + const float accel = float(m_goInfo->moTransport.accelRate); + float timeSinceStop = frame.TimeFrom + (now - (1.0f/IN_MILLISECONDS) * frame.DepartureTime); + float timeUntilStop = frame.TimeTo - (now - (1.0f/IN_MILLISECONDS) * frame.DepartureTime); + float segmentPos, dist; + float accelTime = _transportInfo->accelTime; + float accelDist = _transportInfo->accelDist; + // calculate from nearest stop, less confusing calculation... + if (timeSinceStop < timeUntilStop) { - delete creature; - return 0; + if (timeSinceStop < accelTime) + dist = 0.5f * accel * timeSinceStop * timeSinceStop; + else + dist = accelDist + (timeSinceStop - accelTime) * speed; + segmentPos = dist - frame.DistSinceStop; + } + else + { + if (timeUntilStop < _transportInfo->accelTime) + dist = 0.5f * accel * timeUntilStop * timeUntilStop; + else + dist = accelDist + (timeUntilStop - accelTime) * speed; + segmentPos = frame.DistUntilStop - dist; } - creature->SetTransport(this); - creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); - creature->m_movementInfo.guid = GetGUID(); - creature->m_movementInfo.transport.pos.Relocate(x, y, z, o); + return segmentPos / frame.NextDistFromPrev; +} - if (anim) - creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, anim); +void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z) +{ + Map const* oldMap = GetMap(); - creature->Relocate( - GetPositionX() + (x * std::cos(GetOrientation()) + y * std::sin(GetOrientation() + float(M_PI))), - GetPositionY() + (y * std::cos(GetOrientation()) + x * std::sin(GetOrientation())), - z + GetPositionZ(), - o + GetOrientation()); + if (oldMap->GetId() != newMapid) + { + Map* newMap = sMapMgr->CreateBaseMap(newMapid); + Map::PlayerList const& oldPlayers = GetMap()->GetPlayers(); + if (!oldPlayers.isEmpty()) + { + UpdateData data; + BuildOutOfRangeUpdateBlock(&data); + WorldPacket packet; + data.BuildPacket(&packet); + for (Map::PlayerList::const_iterator itr = oldPlayers.begin(); itr != oldPlayers.end(); ++itr) + if (itr->GetSource()->GetTransport() != this) + itr->GetSource()->SendDirectMessage(&packet); + } - creature->SetHomePosition(creature->GetPositionX(), creature->GetPositionY(), creature->GetPositionZ(), creature->GetOrientation()); - creature->SetTransportHomePosition(creature->m_movementInfo.transport.pos); + UnloadStaticPassengers(); + GetMap()->RemoveFromMap<Transport>(this, false); + SetMap(newMap); - if (!creature->IsPositionValid()) - { - TC_LOG_ERROR(LOG_FILTER_TRANSPORTS, "Creature (guidlow %d, entry %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)", creature->GetGUIDLow(), creature->GetEntry(), creature->GetPositionX(), creature->GetPositionY()); - delete creature; - return 0; - } + Map::PlayerList const& newPlayers = GetMap()->GetPlayers(); + if (!newPlayers.isEmpty()) + { + for (Map::PlayerList::const_iterator itr = newPlayers.begin(); itr != newPlayers.end(); ++itr) + { + if (itr->GetSource()->GetTransport() != this) + { + UpdateData data; + BuildCreateUpdateBlockForPlayer(&data, itr->GetSource()); + WorldPacket packet; + data.BuildPacket(&packet); + itr->GetSource()->SendDirectMessage(&packet); + } + } + } - map->AddToMap(creature); - m_NPCPassengerSet.insert(creature); + // Teleport passengers after everyone on destination map are sent create packet + // but before transport itself is registered there and begins updating + for (std::set<WorldObject*>::iterator itr = _staticPassengers.begin(); itr != _staticPassengers.end(); ++itr) + { + switch ((*itr)->GetTypeId()) + { + case TYPEID_UNIT: + (*itr)->ToCreature()->FarTeleportTo(newMap, x, y, z, (*itr)->GetOrientation()); + break; + case TYPEID_GAMEOBJECT: + { + GameObject* go = (*itr)->ToGameObject(); + go->GetMap()->RemoveFromMap(go, false); + Relocate(x, y, z, go->GetOrientation()); + SetMap(newMap); + newMap->AddToMap(go); + break; + } + default: + break; + } + } - if (tguid == 0) - { - ++currenttguid; - tguid = currenttguid; + for (std::set<WorldObject*>::iterator itr = _passengers.begin(); itr != _passengers.end(); ++itr) + { + switch ((*itr)->GetTypeId()) + { + case TYPEID_UNIT: + if (!IS_PLAYER_GUID((*itr)->ToUnit()->GetOwnerGUID())) // pets should be teleported with player + (*itr)->ToCreature()->FarTeleportTo(newMap, x, y, z, (*itr)->GetOrientation()); + break; + case TYPEID_GAMEOBJECT: + { + GameObject* go = (*itr)->ToGameObject(); + go->GetMap()->RemoveFromMap(go, false); + Relocate(x, y, z, go->GetOrientation()); + SetMap(newMap); + newMap->AddToMap(go); + break; + } + case TYPEID_PLAYER: + (*itr)->ToPlayer()->TeleportTo(newMapid, x, y, z, (*itr)->GetOrientation(), TELE_TO_NOT_LEAVE_TRANSPORT); + break; + default: + break; + } + } + + GetMap()->AddToMap<Transport>(this); } else - currenttguid = std::max(tguid, currenttguid); - - creature->SetGUIDTransport(tguid); - sScriptMgr->OnAddCreaturePassenger(this, creature); - return tguid; -} - -void Transport::UpdatePosition(MovementInfo* mi) -{ - float transport_o = mi->pos.GetOrientation() - mi->transport.pos.GetOrientation(); - float transport_x = mi->pos.m_positionX - (mi->transport.pos.m_positionX * std::cos(transport_o) - mi->transport.pos.m_positionY * std::sin(transport_o)); - float transport_y = mi->pos.m_positionY - (mi->transport.pos.m_positionY * std::cos(transport_o) + mi->transport.pos.m_positionX * std::sin(transport_o)); - float transport_z = mi->pos.m_positionZ - mi->transport.pos.m_positionZ; + { + // Teleport players, they need to know it + for (std::set<WorldObject*>::iterator itr = _passengers.begin(); itr != _passengers.end(); ++itr) + if ((*itr)->GetTypeId() == TYPEID_PLAYER) + (*itr)->ToUnit()->NearTeleportTo(x, y, z, GetOrientation()); + } - Relocate(transport_x, transport_y, transport_z, transport_o); - UpdatePassengerPositions(); + UpdatePosition(x, y, z, GetOrientation()); } -void Transport::UpdatePassengerPositions() +void Transport::UpdatePassengerPositions(std::set<WorldObject*>& passengers) { - for (CreatureSet::iterator itr = m_NPCPassengerSet.begin(); itr != m_NPCPassengerSet.end(); ++itr) + for (std::set<WorldObject*>::iterator itr = passengers.begin(); itr != passengers.end(); ++itr) { - Creature* npc = *itr; + WorldObject* passenger = *itr; + // transport teleported but passenger not yet (can happen for players) + if (passenger->GetMap() != GetMap()) + continue; + + // if passenger is on vehicle we have to assume the vehicle is also on transport + // and its the vehicle that will be updating its passengers + if (Unit* unit = passenger->ToUnit()) + if (unit->GetVehicle()) + continue; + // Do not use Unit::UpdatePosition here, we don't want to remove auras + // as if regular movement occurred float x, y, z, o; - npc->m_movementInfo.transport.pos.GetPosition(x, y, z, o); + passenger->m_movementInfo.transport.pos.GetPosition(x, y, z, o); CalculatePassengerPosition(x, y, z, &o); - GetMap()->CreatureRelocation(npc, x, y, z, o, false); - npc->GetTransportHomePosition(x, y, z, o); - CalculatePassengerPosition(x, y, z, &o); - npc->SetHomePosition(x, y, z, o); + switch (passenger->GetTypeId()) + { + case TYPEID_UNIT: + { + Creature* creature = passenger->ToCreature(); + GetMap()->CreatureRelocation(creature, x, y, z, o, false); + creature->GetTransportHomePosition(x, y, z, o); + CalculatePassengerPosition(x, y, z, &o); + creature->SetHomePosition(x, y, z, o); + break; + } + case TYPEID_PLAYER: + GetMap()->PlayerRelocation(passenger->ToPlayer(), x, y, z, o); + break; + case TYPEID_GAMEOBJECT: + GetMap()->GameObjectRelocation(passenger->ToGameObject(), x, y, z, o, false); + break; + default: + break; + } + + if (Unit* unit = passenger->ToUnit()) + if (Vehicle* vehicle = unit->GetVehicleKit()) + vehicle->RelocatePassengers(); } } -void Transport::CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= NULL*/) const +void Transport::DoEventIfAny(KeyFrame const& node, bool departure) { - float inx = x, iny = y, inz = z; - if (o) - *o = Position::NormalizeOrientation(GetOrientation() + *o); - - x = GetPositionX() + inx * std::cos(GetOrientation()) - iny * std::sin(GetOrientation()); - y = GetPositionY() + iny * std::cos(GetOrientation()) + inx * std::sin(GetOrientation()); - z = GetPositionZ() + inz; + if (uint32 eventid = departure ? node.Node->departureEventID : node.Node->arrivalEventID) + { + TC_LOG_DEBUG(LOG_FILTER_MAPSCRIPTS, "Taxi %s event %u of node %u of %s path", departure ? "departure" : "arrival", eventid, node.Node->index, GetName().c_str()); + GetMap()->ScriptsStart(sEventScripts, eventid, this, this); + EventInform(eventid); + } } -void Transport::CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= NULL*/) const +void Transport::BuildUpdate(UpdateDataMapType& data_map) { - if (o) - *o = Position::NormalizeOrientation(*o - GetOrientation()); + Map::PlayerList const& players = GetMap()->GetPlayers(); + if (players.isEmpty()) + return; - z -= GetPositionZ(); - y -= GetPositionY(); // y = searchedY * std::cos(o) + searchedX * std::sin(o) - x -= GetPositionX(); // x = searchedX * std::cos(o) + searchedY * std::sin(o + pi) - float inx = x, iny = y; - y = (iny - inx * std::tan(GetOrientation())) / (std::cos(GetOrientation()) + std::sin(GetOrientation()) * std::tan(GetOrientation())); - x = (inx + iny * std::tan(GetOrientation())) / (std::cos(GetOrientation()) + std::sin(GetOrientation()) * std::tan(GetOrientation())); + for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + BuildFieldsUpdate(itr->GetSource(), data_map); + + ClearUpdateMask(true); } diff --git a/src/server/game/Entities/Transport/Transport.h b/src/server/game/Entities/Transport/Transport.h index 445bec456fd..0d020fe2c34 100644 --- a/src/server/game/Entities/Transport/Transport.h +++ b/src/server/game/Entities/Transport/Transport.h @@ -20,34 +20,30 @@ #define TRANSPORTS_H #include "GameObject.h" +#include "TransportMgr.h" #include "VehicleDefines.h" -#include <map> -#include <set> -#include <string> +struct CreatureData; class Transport : public GameObject, public TransportBase { + friend Transport* TransportMgr::CreateTransport(uint32, uint32, Map*); + + Transport(); public: - Transport(uint32 period, uint32 script); ~Transport(); - bool Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, float y, float z, float ang, uint32 animprogress, uint32 dynflags); - bool GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids); - void Update(uint32 p_time); - bool AddPassenger(Player* passenger); - bool RemovePassenger(Player* passenger); + bool Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, float y, float z, float ang, uint32 animprogress); + void Update(uint32 diff); - void RemovePassenger(Creature* passenger) { m_NPCPassengerSet.erase(passenger); } + void BuildUpdate(UpdateDataMapType& data_map); - typedef std::set<Player*> PlayerSet; - PlayerSet const& GetPassengers() const { return m_passengers; } + void AddPassenger(WorldObject* passenger); + void RemovePassenger(WorldObject* passenger); + std::set<WorldObject*> const& GetPassengers() const { return _passengers; } - typedef std::set<Creature*> CreatureSet; - CreatureSet m_NPCPassengerSet; - uint32 AddNPCPassenger(uint32 tguid, uint32 entry, float x, float y, float z, float o, uint32 anim=0); - void UpdatePosition(MovementInfo* mi); - void UpdatePassengerPositions(); + Creature* CreateNPCPassenger(uint32 guid, CreatureData const* data); + GameObject* CreateGOPassenger(uint32 guid, GameObjectData const* data); /// This method transforms supplied transport offsets into global coordinates void CalculatePassengerPosition(float& x, float& y, float& z, float* o = NULL) const; @@ -55,50 +51,50 @@ class Transport : public GameObject, public TransportBase /// This method transforms supplied global coordinates into local offsets void CalculatePassengerOffset(float& x, float& y, float& z, float* o = NULL) const; - void BuildStartMovePacket(Map const* targetMap); - void BuildStopMovePacket(Map const* targetMap); - uint32 GetScriptId() const { return ScriptId; } - private: - struct WayPoint - { - WayPoint() : mapid(0), x(0), y(0), z(0), teleport(false), id(0) {} - WayPoint(uint32 _mapid, float _x, float _y, float _z, bool _teleport, uint32 _id = 0, - uint32 _arrivalEventID = 0, uint32 _departureEventID = 0) - : mapid(_mapid), x(_x), y(_y), z(_z), teleport(_teleport), id(_id), - arrivalEventID(_arrivalEventID), departureEventID(_departureEventID) - { - } - uint32 mapid; - float x; - float y; - float z; - bool teleport; - uint32 id; - uint32 arrivalEventID; - uint32 departureEventID; - }; - - typedef std::map<uint32, WayPoint> WayPointMap; - - WayPointMap::const_iterator m_curr; - WayPointMap::const_iterator m_next; - uint32 m_pathTime; - uint32 m_timer; - - PlayerSet m_passengers; - - uint32 currenttguid; - uint32 m_period; - uint32 ScriptId; - public: - WayPointMap m_WayPoints; - uint32 m_nextNodeTime; + uint32 GetPeriod() const { return GetUInt32Value(GAMEOBJECT_LEVEL); } + void SetPeriod(uint32 period) { SetUInt32Value(GAMEOBJECT_LEVEL, period); } + uint32 GetTimer() const { return GetGOValue()->Transport.PathProgress; } + + KeyFrameVec const& GetKeyFrames() const { return _transportInfo->keyFrames; } + + void UpdatePosition(float x, float y, float z, float o); + + //! Needed when transport moves from inactive to active grid + void LoadStaticPassengers(); + + //! Needed when transport enters inactive grid + void UnloadStaticPassengers(); + + void EnableMovement(bool enabled); + + TransportTemplate const* GetTransportTemplate() const { return _transportInfo; } private: + void MoveToNextWaypoint(); + float CalculateSegmentPos(float perc); void TeleportTransport(uint32 newMapid, float x, float y, float z); - void UpdateForMap(Map const* map); - void DoEventIfAny(WayPointMap::value_type const& node, bool departure); - WayPointMap::const_iterator GetNextWayPoint(); + void UpdatePassengerPositions(std::set<WorldObject*>& passengers); + void DoEventIfAny(KeyFrame const& node, bool departure); + + //! Helpers to know if stop frame was reached + bool IsMoving() const { return _isMoving; } + void SetMoving(bool val) { _isMoving = val; } + + TransportTemplate const* _transportInfo; + + KeyFrameVec::const_iterator _currentFrame; + KeyFrameVec::const_iterator _nextFrame; + uint32 _moveTimer; + TimeTrackerSmall _positionChangeTimer; + bool _isMoving; + bool _pendingStop; + + //! These are needed to properly control events triggering only once for each frame + bool _triggeredArrivalEvent; + bool _triggeredDepartureEvent; + + std::set<WorldObject*> _passengers; + std::set<WorldObject*> _staticPassengers; }; -#endif +#endif diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index c34768c9851..2fd1c500305 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -259,7 +259,6 @@ Unit::Unit(bool isWorldObject) : m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_ALIVE); - _focusSpell = NULL; _lastLiquid = NULL; _isWalkingBeforeCharm = false; } @@ -568,6 +567,9 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam if (IsAIEnabled) GetAI()->DamageDealt(victim, damage, damagetype); + // Hook for OnDamage Event + sScriptMgr->OnDamage(this, victim, damage); + if (victim->GetTypeId() == TYPEID_PLAYER && this != victim) { // Signal to pets that their owner was attacked @@ -2483,7 +2485,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spellInfo SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spellInfo) { // Can`t miss on dead target (on skinning for example) - if (!victim->IsAlive() && victim->GetTypeId() != TYPEID_PLAYER) + if ((!victim->IsAlive() && victim->GetTypeId() != TYPEID_PLAYER) || spellInfo->AttributesEx3 & SPELL_ATTR3_IGNORE_HIT_RESULT) return SPELL_MISS_NONE; SpellSchoolMask schoolMask = spellInfo->GetSchoolMask(); @@ -2508,19 +2510,15 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spellInfo // Increase from attacker SPELL_AURA_MOD_INCREASES_SPELL_PCT_TO_HIT auras modHitChance += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_INCREASES_SPELL_PCT_TO_HIT, schoolMask); - // Spells with SPELL_ATTR3_IGNORE_HIT_RESULT will ignore target's avoidance effects - if (!(spellInfo->AttributesEx3 & SPELL_ATTR3_IGNORE_HIT_RESULT)) - { - // Chance hit from victim SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE auras - modHitChance += victim->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE, schoolMask); - // Reduce spell hit chance for Area of effect spells from victim SPELL_AURA_MOD_AOE_AVOIDANCE aura - if (spellInfo->IsTargetingArea()) - modHitChance -= victim->GetTotalAuraModifier(SPELL_AURA_MOD_AOE_AVOIDANCE); + // Chance hit from victim SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE auras + modHitChance += victim->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE, schoolMask); + // Reduce spell hit chance for Area of effect spells from victim SPELL_AURA_MOD_AOE_AVOIDANCE aura + if (spellInfo->IsTargetingArea()) + modHitChance -= victim->GetTotalAuraModifier(SPELL_AURA_MOD_AOE_AVOIDANCE); - // Decrease hit chance from victim rating bonus - if (victim->GetTypeId() == TYPEID_PLAYER) - modHitChance -= int32(victim->ToPlayer()->GetRatingBonusValue(CR_HIT_TAKEN_SPELL)); - } + // Decrease hit chance from victim rating bonus + if (victim->GetTypeId() == TYPEID_PLAYER) + modHitChance -= int32(victim->ToPlayer()->GetRatingBonusValue(CR_HIT_TAKEN_SPELL)); int32 HitChance = modHitChance * 100; // Increase hit chance from attacker SPELL_AURA_MOD_SPELL_HIT_CHANCE and attacker ratings @@ -2535,11 +2533,6 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spellInfo if (rand < tmp) return SPELL_MISS_MISS; - // Spells with SPELL_ATTR3_IGNORE_HIT_RESULT will additionally fully ignore - // resist and deflect chances - if (spellInfo->AttributesEx3 & SPELL_ATTR3_IGNORE_HIT_RESULT) - return SPELL_MISS_NONE; - // Chance resist mechanic (select max value from every mechanic spell effect) int32 resist_chance = victim->GetMechanicResistChance(spellInfo) * 100; tmp += resist_chance; @@ -2564,7 +2557,7 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spellInfo } } - // Roll chance + // Roll chance if (rand < tmp) return SPELL_MISS_RESIST; @@ -5258,18 +5251,19 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere // cast 45429 Arcane Bolt if Exalted by Scryers case 45481: { - if (GetTypeId() != TYPEID_PLAYER) + Player* player = ToPlayer(); + if (!player) return false; // Get Aldor reputation rank - if (ToPlayer()->GetReputationRank(932) == REP_EXALTED) + if (player->GetReputationRank(932) == REP_EXALTED) { target = this; triggered_spell_id = 45479; break; } // Get Scryers reputation rank - if (ToPlayer()->GetReputationRank(934) == REP_EXALTED) + if (player->GetReputationRank(934) == REP_EXALTED) { // triggered at positive/self casts also, current attack target used then if (target && IsFriendlyTo(target)) @@ -5277,8 +5271,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere target = GetVictim(); if (!target) { - uint64 selected_guid = ToPlayer()->GetSelection(); - target = ObjectAccessor::GetUnit(*this, selected_guid); + target = player->GetSelectedUnit(); if (!target) return false; } @@ -9588,6 +9581,9 @@ int32 Unit::DealHeal(Unit* victim, uint32 addhealth) if (addhealth) gain = victim->ModifyHealth(int32(addhealth)); + // Hook for OnHeal Event + sScriptMgr->OnHeal(this, victim, (uint32&)gain); + Unit* unit = this; if (GetTypeId() == TYPEID_UNIT && ToCreature()->IsTotem()) @@ -16904,7 +16900,7 @@ void Unit::_ExitVehicle(Position const* exitPosition) if (vehicle->GetBase()->HasUnitTypeMask(UNIT_MASK_MINION) && vehicle->GetBase()->GetTypeId() == TYPEID_UNIT) if (((Minion*)vehicle->GetBase())->GetOwner() == this) - vehicle->GetBase()->ToCreature()->DespawnOrUnsummon(); + vehicle->GetBase()->ToCreature()->DespawnOrUnsummon(1); if (HasUnitTypeMask(UNIT_MASK_ACCESSORY)) { @@ -17333,6 +17329,8 @@ void Unit::SetFacingTo(float ori) { Movement::MoveSplineInit init(this); init.MoveTo(GetPositionX(), GetPositionY(), GetPositionZMinusOffset(), false); + if (HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) && GetTransGUID()) + init.DisableTransportPathTransformations(); // It makes no sense to target global orientation init.SetFacing(ori); init.Launch(); } @@ -17344,7 +17342,10 @@ void Unit::SetFacingToObject(WorldObject* object) return; /// @todo figure out under what conditions creature will move towards object instead of facing it where it currently is. - SetFacingTo(GetAngle(object)); + Movement::MoveSplineInit init(this); + init.MoveTo(GetPositionX(), GetPositionY(), GetPositionZMinusOffset()); + init.SetFacing(GetAngle(object)); // when on transport, GetAngle will still return global coordinates (and angle) that needs transforming + init.Launch(); } bool Unit::SetWalk(bool enable) @@ -17471,43 +17472,6 @@ bool Unit::SetHover(bool enable, bool /*packetOnly = false*/) return true; } -void Unit::SetTarget(uint64 guid) -{ - if (!_focusSpell) - SetUInt64Value(UNIT_FIELD_TARGET, guid); -} - -void Unit::FocusTarget(Spell const* focusSpell, WorldObject const* target) -{ - // already focused - if (_focusSpell) - return; - - _focusSpell = focusSpell; - SetUInt64Value(UNIT_FIELD_TARGET, target->GetGUID()); - if (focusSpell->GetSpellInfo()->AttributesEx5 & SPELL_ATTR5_DONT_TURN_DURING_CAST) - AddUnitState(UNIT_STATE_ROTATING); - - // Set serverside orientation if needed (needs to be after attribute check) - SetInFront(target); -} - -void Unit::ReleaseFocus(Spell const* focusSpell) -{ - // focused to something else - if (focusSpell != _focusSpell) - return; - - _focusSpell = NULL; - if (Unit* victim = GetVictim()) - SetUInt64Value(UNIT_FIELD_TARGET, victim->GetGUID()); - else - SetUInt64Value(UNIT_FIELD_TARGET, 0); - - if (focusSpell->GetSpellInfo()->AttributesEx5 & SPELL_ATTR5_DONT_TURN_DURING_CAST) - ClearUnitState(UNIT_STATE_ROTATING); -} - void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target) const { if (!target) diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 119a1dd1966..25352a924ef 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -2078,12 +2078,6 @@ class Unit : public WorldObject bool IsOnVehicle(const Unit* vehicle) const; Unit* GetVehicleBase() const; Creature* GetVehicleCreatureBase() const; - float GetTransOffsetX() const { return m_movementInfo.transport.pos.GetPositionX(); } - float GetTransOffsetY() const { return m_movementInfo.transport.pos.GetPositionY(); } - float GetTransOffsetZ() const { return m_movementInfo.transport.pos.GetPositionZ(); } - float GetTransOffsetO() const { return m_movementInfo.transport.pos.GetOrientation(); } - uint32 GetTransTime() const { return m_movementInfo.transport.time; } - int8 GetTransSeat() const { return m_movementInfo.transport.seat; } uint64 GetTransGUID() const; /// Returns the transport this unit is on directly (if on vehicle and transport, return vehicle) TransportBase* GetDirectTransport() const; @@ -2124,11 +2118,8 @@ class Unit : public WorldObject TempSummon* ToTempSummon() { if (IsSummon()) return reinterpret_cast<TempSummon*>(this); else return NULL; } TempSummon const* ToTempSummon() const { if (IsSummon()) return reinterpret_cast<TempSummon const*>(this); else return NULL; } - void SetTarget(uint64 guid); - - // Handling caster facing during spellcast - void FocusTarget(Spell const* focusSpell, WorldObject const* target); - void ReleaseFocus(Spell const* focusSpell); + uint64 GetTarget() const { return GetUInt64Value(UNIT_FIELD_TARGET); } + virtual void SetTarget(uint64 /*guid*/) = 0; // Movement info Movement::MoveSpline * movespline; @@ -2253,7 +2244,6 @@ class Unit : public WorldObject bool m_cleanupDone; // lock made to not add stuff after cleanup before delete bool m_duringRemoveFromWorld; // lock made to not add stuff after begining removing from world - Spell const* _focusSpell; ///> Locks the target during spell cast for proper facing bool _isWalkingBeforeCharm; // Are we walking before we were charmed? time_t _lastDamagedTime; // Part of Evade mechanics diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp index afc27b74ecc..67474c1dca0 100644 --- a/src/server/game/Globals/ObjectAccessor.cpp +++ b/src/server/game/Globals/ObjectAccessor.cpp @@ -147,6 +147,15 @@ GameObject* ObjectAccessor::GetGameObject(WorldObject const& u, uint64 guid) return GetObjectInMap(guid, u.GetMap(), (GameObject*)NULL); } +Transport* ObjectAccessor::GetTransport(WorldObject const& u, uint64 guid) +{ + if (GUID_HIPART(guid) != HIGHGUID_MO_TRANSPORT) + return NULL; + + GameObject* go = GetGameObject(u, guid); + return go ? go->ToTransport() : NULL; +} + DynamicObject* ObjectAccessor::GetDynamicObject(WorldObject const& u, uint64 guid) { return GetObjectInMap(guid, u.GetMap(), (DynamicObject*)NULL); diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h index 1abe3550729..a2707920c63 100644 --- a/src/server/game/Globals/ObjectAccessor.h +++ b/src/server/game/Globals/ObjectAccessor.h @@ -40,6 +40,7 @@ class WorldObject; class Vehicle; class Map; class WorldRunnable; +class Transport; template <class T> class HashMapHolder @@ -145,6 +146,7 @@ class ObjectAccessor static Object* GetObjectByTypeMask(WorldObject const&, uint64, uint32 typemask); static Corpse* GetCorpse(WorldObject const& u, uint64 guid); static GameObject* GetGameObject(WorldObject const& u, uint64 guid); + static Transport* GetTransport(WorldObject const& u, uint64 guid); static DynamicObject* GetDynamicObject(WorldObject const& u, uint64 guid); static Unit* GetUnit(WorldObject const&, uint64 guid); static Creature* GetCreature(WorldObject const& u, uint64 guid); diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 2f309c07cce..86e6963b1de 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -804,6 +804,18 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) if ((cInfo->npcflag & UNIT_NPC_FLAG_TRAINER) && cInfo->trainer_type >= MAX_TRAINER_TYPE) TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong trainer type %u.", cInfo->Entry, cInfo->trainer_type); + if (cInfo->speed_walk == 0.0f) + { + TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong value (%f) in speed_walk, set to 1.", cInfo->Entry, cInfo->speed_walk); + const_cast<CreatureTemplate*>(cInfo)->speed_walk = 1.0f; + } + + if (cInfo->speed_run == 0.0f) + { + TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong value (%f) in speed_run, set to 1.14286.", cInfo->Entry, cInfo->speed_run); + const_cast<CreatureTemplate*>(cInfo)->speed_run = 1.14286f; + } + if (cInfo->type && !sCreatureTypeStore.LookupEntry(cInfo->type)) { TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has invalid creature type (%u) in `type`.", cInfo->Entry, cInfo->type); diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index e44333c4a7a..752cc3b56ab 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -1019,6 +1019,11 @@ class ObjectMgr return _mapObjectGuidsStore[MAKE_PAIR32(mapid, spawnMode)][cell_id]; } + CellObjectGuidsMap const& GetMapObjectGuids(uint16 mapid, uint8 spawnMode) + { + return _mapObjectGuidsStore[MAKE_PAIR32(mapid, spawnMode)]; + } + /** * Gets temp summon data for all creatures of specified group. * diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp index b8ab75f213b..00b1e82a0ea 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp +++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp @@ -35,16 +35,28 @@ void VisibleNotifier::SendToSelf() // at this moment i_clientGUIDs have guids that not iterate at grid level checks // but exist one case when this possible and object not out of range: transports if (Transport* transport = i_player.GetTransport()) - for (Transport::PlayerSet::const_iterator itr = transport->GetPassengers().begin();itr != transport->GetPassengers().end();++itr) + for (std::set<WorldObject*>::const_iterator itr = transport->GetPassengers().begin(); itr != transport->GetPassengers().end();++itr) { if (vis_guids.find((*itr)->GetGUID()) != vis_guids.end()) { vis_guids.erase((*itr)->GetGUID()); - i_player.UpdateVisibilityOf((*itr), i_data, i_visibleNow); - - if (!(*itr)->isNeedNotify(NOTIFY_VISIBILITY_CHANGED)) - (*itr)->UpdateVisibilityOf(&i_player); + switch ((*itr)->GetTypeId()) + { + case TYPEID_GAMEOBJECT: + i_player.UpdateVisibilityOf((*itr)->ToGameObject(), i_data, i_visibleNow); + break; + case TYPEID_PLAYER: + i_player.UpdateVisibilityOf((*itr)->ToPlayer(), i_data, i_visibleNow); + if (!(*itr)->isNeedNotify(NOTIFY_VISIBILITY_CHANGED)) + (*itr)->ToPlayer()->UpdateVisibilityOf(&i_player); + break; + case TYPEID_UNIT: + i_player.UpdateVisibilityOf((*itr)->ToCreature(), i_data, i_visibleNow); + break; + default: + break; + } } } @@ -324,10 +336,8 @@ template<class T> void ObjectUpdater::Visit(GridRefManager<T> &m) { for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter) - { if (iter->GetSource()->IsInWorld()) iter->GetSource()->Update(i_timeDiff); - } } bool AnyDeadUnitObjectInRangeCheck::operator()(Player* u) @@ -360,5 +370,6 @@ bool AnyDeadUnitSpellTargetInRangeCheck::operator()(Creature* u) return AnyDeadUnitObjectInRangeCheck::operator()(u) && i_check(u); } -template void ObjectUpdater::Visit<GameObject>(GameObjectMapType &); -template void ObjectUpdater::Visit<DynamicObject>(DynamicObjectMapType &); +template void ObjectUpdater::Visit<Creature>(CreatureMapType&); +template void ObjectUpdater::Visit<GameObject>(GameObjectMapType&); +template void ObjectUpdater::Visit<DynamicObject>(DynamicObjectMapType&); diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp index 58a5bbbff06..05dff6823be 100644 --- a/src/server/game/Grids/ObjectGridLoader.cpp +++ b/src/server/game/Grids/ObjectGridLoader.cpp @@ -43,6 +43,20 @@ void ObjectGridEvacuator::Visit(CreatureMapType &m) } } +void ObjectGridEvacuator::Visit(GameObjectMapType &m) +{ + // gameobject in unloading grid can have respawn point in another grid + // if it will be unloaded then it will not respawn in original grid until unload/load original grid + // move to respawn point to prevent this case. For player view in respawn grid this will be normal respawn. + for (GameObjectMapType::iterator iter = m.begin(); iter != m.end();) + { + GameObject* go = iter->GetSource(); + ++iter; + + go->GetMap()->GameObjectRespawnRelocation(go, true); + } +} + // for loading world object at grid loading (Corpses) /// @todo to implement npc on transport, also need to load npcs at grid loading class ObjectWorldLoader @@ -70,12 +84,26 @@ template<class T> void ObjectGridLoader::SetObjectCell(T* /*obj*/, CellCoord con template<> void ObjectGridLoader::SetObjectCell(Creature* obj, CellCoord const& cellCoord) { Cell cell(cellCoord); + obj->SetCurrentCell(cell); +} +template<> void ObjectGridLoader::SetObjectCell(GameObject* obj, CellCoord const& cellCoord) +{ + Cell cell(cellCoord); obj->SetCurrentCell(cell); } template <class T> -void AddObjectHelper(CellCoord &cell, GridRefManager<T> &m, uint32 &count, Map* map, T *obj) +void AddObjectHelper(CellCoord &cell, GridRefManager<T> &m, uint32 &count, Map* /*map*/, T *obj) +{ + obj->AddToGrid(m); + ObjectGridLoader::SetObjectCell(obj, cell); + obj->AddToWorld(); + ++count; +} + +template <> +void AddObjectHelper(CellCoord &cell, CreatureMapType &m, uint32 &count, Map* map, Creature *obj) { obj->AddToGrid(m); ObjectGridLoader::SetObjectCell(obj, cell); diff --git a/src/server/game/Grids/ObjectGridLoader.h b/src/server/game/Grids/ObjectGridLoader.h index 11f91670a5f..b858b92da32 100644 --- a/src/server/game/Grids/ObjectGridLoader.h +++ b/src/server/game/Grids/ObjectGridLoader.h @@ -67,6 +67,7 @@ class ObjectGridEvacuator { public: void Visit(CreatureMapType &m); + void Visit(GameObjectMapType &m); template<class T> void Visit(GridRefManager<T> &) {} }; diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 031febc3806..1a3e48c8217 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -1764,7 +1764,7 @@ bool Guild::HandleMemberWithdrawMoney(WorldSession* session, uint32 amount, bool { //clamp amount to MAX_MONEY_AMOUNT, Players can't hold more than that anyway amount = std::min(amount, uint32(MAX_MONEY_AMOUNT)); - + if (m_bankMoney < amount) // Not enough money in bank return false; diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index f65641eaa76..71453581ed0 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -1167,8 +1167,6 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recvData) TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_INSPECT"); - _player->SetSelection(guid); - Player* player = ObjectAccessor::FindPlayer(guid); if (!player) { diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index 1faa68b6ea4..36d1e1cb1ea 100644 --- a/src/server/game/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -303,30 +303,21 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData) { if (!plrMover->GetTransport()) { - // elevators also cause the client to send MOVEMENTFLAG_ONTRANSPORT - just dismount if the guid can be found in the transport list - for (MapManager::TransportSet::const_iterator iter = sMapMgr->m_Transports.begin(); iter != sMapMgr->m_Transports.end(); ++iter) + if (Transport* transport = plrMover->GetMap()->GetTransport(movementInfo.transport.guid)) { - if ((*iter)->GetGUID() == movementInfo.transport.guid) - { - plrMover->m_transport = *iter; - (*iter)->AddPassenger(plrMover); - break; - } + plrMover->m_transport = transport; + transport->AddPassenger(plrMover); } } else if (plrMover->GetTransport()->GetGUID() != movementInfo.transport.guid) { bool foundNewTransport = false; plrMover->m_transport->RemovePassenger(plrMover); - for (MapManager::TransportSet::const_iterator iter = sMapMgr->m_Transports.begin(); iter != sMapMgr->m_Transports.end(); ++iter) + if (Transport* transport = plrMover->GetMap()->GetTransport(movementInfo.transport.guid)) { - if ((*iter)->GetGUID() == movementInfo.transport.guid) - { - foundNewTransport = true; - plrMover->m_transport = *iter; - (*iter)->AddPassenger(plrMover); - break; - } + foundNewTransport = true; + plrMover->m_transport = transport; + transport->AddPassenger(plrMover); } if (!foundNewTransport) diff --git a/src/server/game/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp index 5a94d5b391b..4638e05ee3d 100644 --- a/src/server/game/Handlers/QueryHandler.cpp +++ b/src/server/game/Handlers/QueryHandler.cpp @@ -267,7 +267,6 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket& recvData) TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_NPC_TEXT_QUERY ID '%u'", textID); recvData >> guid; - GetPlayer()->SetSelection(guid); GossipText const* pGossip = sObjectMgr->GetGossipText(textID); diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 4660489004d..9abb78187a9 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -63,6 +63,17 @@ Map::~Map() obj->ResetMap(); } + for (TransportsContainer::iterator itr = _transports.begin(); itr != _transports.end(); ++itr) + { + Transport* transport = *itr; + // Destroy local transports + if (transport->GetTransportTemplate()->inInstance) + { + transport->RemoveFromWorld(); + delete transport; + } + } + if (!m_scriptSchedule.empty()) sScriptMgr->DecreaseScheduledScriptCount(m_scriptSchedule.size()); @@ -217,10 +228,12 @@ void Map::DeleteStateMachine() } Map::Map(uint32 id, time_t expiry, uint32 InstanceId, uint8 SpawnMode, Map* _parent): -_creatureToMoveLock(false), i_mapEntry (sMapStore.LookupEntry(id)), i_spawnMode(SpawnMode), i_InstanceId(InstanceId), +_creatureToMoveLock(false), _gameObjectsToMoveLock(false), +i_mapEntry(sMapStore.LookupEntry(id)), i_spawnMode(SpawnMode), i_InstanceId(InstanceId), m_unloadTimer(0), m_VisibleDistance(DEFAULT_VISIBILITY_DISTANCE), m_VisibilityNotifyPeriod(DEFAULT_VISIBILITY_NOTIFY_PERIOD), -m_activeNonPlayersIter(m_activeNonPlayers.end()), i_gridExpiry(expiry), +m_activeNonPlayersIter(m_activeNonPlayers.end()), _transportsUpdateIter(_transports.end()), +i_gridExpiry(expiry), i_scriptLock(false) { m_parentMap = (_parent ? _parent : this); @@ -270,6 +283,21 @@ void Map::AddToGrid(Creature* obj, Cell const& cell) obj->SetCurrentCell(cell); } +template<> +void Map::AddToGrid(GameObject* obj, Cell const& cell) +{ + NGridType* grid = getNGrid(cell.GridX(), cell.GridY()); + grid->GetGridType(cell.CellX(), cell.CellY()).AddGridObject(obj); + + obj->SetCurrentCell(cell); +} + +template<class T> +void Map::SwitchGridContainers(T* /*obj*/, bool /*on*/) +{ +} + +template<> void Map::SwitchGridContainers(Creature* obj, bool on) { ASSERT(!obj->IsPermanentWorldObject()); @@ -291,6 +319,7 @@ void Map::SwitchGridContainers(Creature* obj, bool on) GridType &grid = ngrid->GetGridType(cell.CellX(), cell.CellY()); obj->RemoveFromGrid(); //This step is not really necessary but we want to do ASSERT in remove/add + if (on) { grid.AddWorldObject(obj); @@ -301,9 +330,45 @@ void Map::SwitchGridContainers(Creature* obj, bool on) grid.AddGridObject(obj); RemoveWorldObject(obj); } + obj->m_isTempWorldObject = on; } +template<> +void Map::SwitchGridContainers(GameObject* obj, bool on) +{ + ASSERT(!obj->IsPermanentWorldObject()); + CellCoord p = Trinity::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY()); + if (!p.IsCoordValid()) + { + TC_LOG_ERROR(LOG_FILTER_MAPS, "Map::SwitchGridContainers: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord); + return; + } + + Cell cell(p); + if (!IsGridLoaded(GridCoord(cell.data.Part.grid_x, cell.data.Part.grid_y))) + return; + + TC_LOG_DEBUG(LOG_FILTER_MAPS, "Switch object " UI64FMTD " from grid[%u, %u] %u", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y, on); + NGridType *ngrid = getNGrid(cell.GridX(), cell.GridY()); + ASSERT(ngrid != NULL); + + GridType &grid = ngrid->GetGridType(cell.CellX(), cell.CellY()); + + obj->RemoveFromGrid(); //This step is not really necessary but we want to do ASSERT in remove/add + + if (on) + { + grid.AddWorldObject(obj); + AddWorldObject(obj); + } + else + { + grid.AddGridObject(obj); + RemoveWorldObject(obj); + } +} + template<class T> void Map::DeleteFromWorld(T* obj) { @@ -432,11 +497,17 @@ void Map::InitializeObject(T* /*obj*/) template<> void Map::InitializeObject(Creature* obj) { - obj->_moveState = CREATURE_CELL_MOVE_NONE; + obj->_moveState = MAP_OBJECT_CELL_MOVE_NONE; +} + +template<> +void Map::InitializeObject(GameObject* obj) +{ + obj->_moveState = MAP_OBJECT_CELL_MOVE_NONE; } template<class T> -bool Map::AddToMap(T *obj) +bool Map::AddToMap(T* obj) { /// @todo Needs clean up. An object should not be added to map twice. if (obj->IsInWorld()) @@ -480,6 +551,26 @@ bool Map::AddToMap(T *obj) return true; } +template<> +bool Map::AddToMap(Transport* obj) +{ + //TODO: Needs clean up. An object should not be added to map twice. + if (obj->IsInWorld()) + return true; + + CellCoord cellCoord = Trinity::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY()); + if (!cellCoord.IsCoordValid()) + { + TC_LOG_ERROR(LOG_FILTER_MAPS, "Map::Add: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord); + return false; //Should delete object + } + + obj->AddToWorld(); + _transports.insert(obj); + + return true; +} + bool Map::IsGridLoaded(const GridCoord &p) const { return (getNGrid(p.x_coord, p.y_coord) && isGridObjectDataLoaded(p.x_coord, p.y_coord)); @@ -565,6 +656,17 @@ void Map::Update(const uint32 t_diff) VisitNearbyCellsOf(obj, grid_object_update, world_object_update); } + for (_transportsUpdateIter = _transports.begin(); _transportsUpdateIter != _transports.end();) + { + WorldObject* obj = *_transportsUpdateIter; + ++_transportsUpdateIter; + + if (!obj->IsInWorld()) + continue; + + obj->Update(t_diff); + } + ///- Process necessary scripts if (!m_scriptSchedule.empty()) { @@ -574,6 +676,7 @@ void Map::Update(const uint32 t_diff) } MoveAllCreaturesInMoveList(); + MoveAllGameObjectsInMoveList(); if (!m_mapRefManager.isEmpty() || !m_activeNonPlayers.empty()) ProcessRelocationNotifies(t_diff); @@ -708,6 +811,34 @@ void Map::RemoveFromMap(T *obj, bool remove) } } +template<> +void Map::RemoveFromMap(Transport* obj, bool remove) +{ + obj->RemoveFromWorld(); + + if (_transportsUpdateIter != _transports.end()) + { + TransportsContainer::iterator itr = _transports.find(obj); + if (itr == _transports.end()) + return; + if (itr == _transportsUpdateIter) + ++_transportsUpdateIter; + _transports.erase(itr); + } + else + _transports.erase(obj); + + obj->ResetMap(); + + if (remove) + { + // if option set then object already saved at this moment + if (!sWorld->getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY)) + obj->SaveRespawnTime(); + DeleteFromWorld(obj); + } +} + void Map::PlayerRelocation(Player* player, float x, float y, float z, float orientation) { ASSERT(player); @@ -777,12 +908,44 @@ void Map::CreatureRelocation(Creature* creature, float x, float y, float z, floa ASSERT(CheckGridIntegrity(creature, true)); } +void Map::GameObjectRelocation(GameObject* go, float x, float y, float z, float orientation, bool respawnRelocationOnFail) +{ + Cell integrity_check(go->GetPositionX(), go->GetPositionY()); + Cell old_cell = go->GetCurrentCell(); + + ASSERT(integrity_check == old_cell); + Cell new_cell(x, y); + + if (!respawnRelocationOnFail && !getNGrid(new_cell.GridX(), new_cell.GridY())) + return; + + // delay creature move for grid/cell to grid/cell moves + if (old_cell.DiffCell(new_cell) || old_cell.DiffGrid(new_cell)) + { +#ifdef TRINITY_DEBUG + TC_LOG_DEBUG(LOG_FILTER_MAPS, "GameObject (GUID: %u Entry: %u) added to moving list from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); +#endif + AddGameObjectToMoveList(go, x, y, z, orientation); + // in diffcell/diffgrid case notifiers called at finishing move go in Map::MoveAllGameObjectsInMoveList + } + else + { + go->Relocate(x, y, z, orientation); + go->UpdateObjectVisibility(false); + RemoveGameObjectFromMoveList(go); + } + + old_cell = go->GetCurrentCell(); + integrity_check = Cell(go->GetPositionX(), go->GetPositionY()); + ASSERT(integrity_check == old_cell); +} + void Map::AddCreatureToMoveList(Creature* c, float x, float y, float z, float ang) { if (_creatureToMoveLock) //can this happen? return; - if (c->_moveState == CREATURE_CELL_MOVE_NONE) + if (c->_moveState == MAP_OBJECT_CELL_MOVE_NONE) _creaturesToMove.push_back(c); c->SetNewCellPosition(x, y, z, ang); } @@ -792,8 +955,27 @@ void Map::RemoveCreatureFromMoveList(Creature* c) if (_creatureToMoveLock) //can this happen? return; - if (c->_moveState == CREATURE_CELL_MOVE_ACTIVE) - c->_moveState = CREATURE_CELL_MOVE_INACTIVE; + if (c->_moveState == MAP_OBJECT_CELL_MOVE_ACTIVE) + c->_moveState = MAP_OBJECT_CELL_MOVE_INACTIVE; +} + +void Map::AddGameObjectToMoveList(GameObject* go, float x, float y, float z, float ang) +{ + if (_gameObjectsToMoveLock) //can this happen? + return; + + if (go->_moveState == MAP_OBJECT_CELL_MOVE_NONE) + _gameObjectsToMove.push_back(go); + go->SetNewCellPosition(x, y, z, ang); +} + +void Map::RemoveGameObjectFromMoveList(GameObject* go) +{ + if (_gameObjectsToMoveLock) //can this happen? + return; + + if (go->_moveState == MAP_OBJECT_CELL_MOVE_ACTIVE) + go->_moveState = MAP_OBJECT_CELL_MOVE_INACTIVE; } void Map::MoveAllCreaturesInMoveList() @@ -805,13 +987,13 @@ void Map::MoveAllCreaturesInMoveList() if (c->FindMap() != this) //pet is teleported to another map continue; - if (c->_moveState != CREATURE_CELL_MOVE_ACTIVE) + if (c->_moveState != MAP_OBJECT_CELL_MOVE_ACTIVE) { - c->_moveState = CREATURE_CELL_MOVE_NONE; + c->_moveState = MAP_OBJECT_CELL_MOVE_NONE; continue; } - c->_moveState = CREATURE_CELL_MOVE_NONE; + c->_moveState = MAP_OBJECT_CELL_MOVE_NONE; if (!c->IsInWorld()) continue; @@ -852,6 +1034,50 @@ void Map::MoveAllCreaturesInMoveList() _creatureToMoveLock = false; } +void Map::MoveAllGameObjectsInMoveList() +{ + _gameObjectsToMoveLock = true; + for (std::vector<GameObject*>::iterator itr = _gameObjectsToMove.begin(); itr != _gameObjectsToMove.end(); ++itr) + { + GameObject* go = *itr; + if (go->FindMap() != this) //transport is teleported to another map + continue; + + if (go->_moveState != MAP_OBJECT_CELL_MOVE_ACTIVE) + { + go->_moveState = MAP_OBJECT_CELL_MOVE_NONE; + continue; + } + + go->_moveState = MAP_OBJECT_CELL_MOVE_NONE; + if (!go->IsInWorld()) + continue; + + // do move or do move to respawn or remove creature if previous all fail + if (GameObjectCellRelocation(go, Cell(go->_newPosition.m_positionX, go->_newPosition.m_positionY))) + { + // update pos + go->Relocate(go->_newPosition); + go->UpdateObjectVisibility(false); + } + else + { + // if GameObject can't be move in new cell/grid (not loaded) move it to repawn cell/grid + // GameObject coordinates will be updated and notifiers send + if (!GameObjectRespawnRelocation(go, false)) + { + // ... or unload (if respawn grid also not loaded) +#ifdef TRINITY_DEBUG + sLog->outDebug(LOG_FILTER_MAPS, "GameObject (GUID: %u Entry: %u) cannot be move to unloaded respawn grid.", go->GetGUIDLow(), go->GetEntry()); +#endif + AddObjectToRemoveList(go); + } + } + } + _gameObjectsToMove.clear(); + _gameObjectsToMoveLock = false; +} + bool Map::CreatureCellRelocation(Creature* c, Cell new_cell) { Cell const& old_cell = c->GetCurrentCell(); @@ -913,6 +1139,67 @@ bool Map::CreatureCellRelocation(Creature* c, Cell new_cell) return false; } +bool Map::GameObjectCellRelocation(GameObject* go, Cell new_cell) +{ + Cell const& old_cell = go->GetCurrentCell(); + if (!old_cell.DiffGrid(new_cell)) // in same grid + { + // if in same cell then none do + if (old_cell.DiffCell(new_cell)) + { + #ifdef TRINITY_DEBUG + TC_LOG_DEBUG(LOG_FILTER_MAPS, "GameObject (GUID: %u Entry: %u) moved in grid[%u, %u] from cell[%u, %u] to cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY()); + #endif + + go->RemoveFromGrid(); + AddToGrid(go, new_cell); + } + else + { + #ifdef TRINITY_DEBUG + TC_LOG_DEBUG(LOG_FILTER_MAPS, "GameObject (GUID: %u Entry: %u) moved in same grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY()); + #endif + } + + return true; + } + + // in diff. grids but active GameObject + if (go->isActiveObject()) + { + EnsureGridLoadedForActiveObject(new_cell, go); + + #ifdef TRINITY_DEBUG + TC_LOG_DEBUG(LOG_FILTER_MAPS, "Active GameObject (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + #endif + + go->RemoveFromGrid(); + AddToGrid(go, new_cell); + + return true; + } + + // in diff. loaded grid normal GameObject + if (IsGridLoaded(GridCoord(new_cell.GridX(), new_cell.GridY()))) + { + #ifdef TRINITY_DEBUG + TC_LOG_DEBUG(LOG_FILTER_MAPS, "GameObject (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + #endif + + go->RemoveFromGrid(); + EnsureGridCreated(GridCoord(new_cell.GridX(), new_cell.GridY())); + AddToGrid(go, new_cell); + + return true; + } + + // fail to move: normal GameObject attempt move to unloaded grid + #ifdef TRINITY_DEBUG + TC_LOG_DEBUG(LOG_FILTER_MAPS, "GameObject (GUID: %u Entry: %u) attempted to move from grid[%u, %u]cell[%u, %u] to unloaded grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + #endif + return false; +} + bool Map::CreatureRespawnRelocation(Creature* c, bool diffGridOnly) { float resp_x, resp_y, resp_z, resp_o; @@ -943,6 +1230,31 @@ bool Map::CreatureRespawnRelocation(Creature* c, bool diffGridOnly) return false; } +bool Map::GameObjectRespawnRelocation(GameObject* go, bool diffGridOnly) +{ + float resp_x, resp_y, resp_z, resp_o; + go->GetRespawnPosition(resp_x, resp_y, resp_z, &resp_o); + Cell resp_cell(resp_x, resp_y); + + //GameObject will be unloaded with grid + if (diffGridOnly && !go->GetCurrentCell().DiffGrid(resp_cell)) + return true; + + #ifdef TRINITY_DEBUG + TC_LOG_DEBUG(LOG_FILTER_MAPS, "GameObject (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to respawn grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), go->GetCurrentCell().GridX(), go->GetCurrentCell().GridY(), go->GetCurrentCell().CellX(), go->GetCurrentCell().CellY(), resp_cell.GridX(), resp_cell.GridY(), resp_cell.CellX(), resp_cell.CellY()); + #endif + + // teleport it to respawn point (like normal respawn if player see) + if (GameObjectCellRelocation(go, resp_cell)) + { + go->Relocate(resp_x, resp_y, resp_z, resp_o); + go->UpdateObjectVisibility(false); + return true; + } + + return false; +} + bool Map::UnloadGrid(NGridType& ngrid, bool unloadAll) { const uint32 x = ngrid.getX(); @@ -966,6 +1278,7 @@ bool Map::UnloadGrid(NGridType& ngrid, bool unloadAll) // Finish creature moves, remove and delete all creatures with delayed remove before moving to respawn grids // Must know real mob position before move MoveAllCreaturesInMoveList(); + MoveAllGameObjectsInMoveList(); // move creatures to respawn grids if this is diff.grid or to remove list ObjectGridEvacuator worker; @@ -974,6 +1287,7 @@ bool Map::UnloadGrid(NGridType& ngrid, bool unloadAll) // Finish creature moves, remove and delete all creatures with delayed remove before unload MoveAllCreaturesInMoveList(); + MoveAllGameObjectsInMoveList(); } { @@ -1041,6 +1355,7 @@ void Map::UnloadAll() { // clear all delayed moves, useless anyway do this moves before map unload. _creaturesToMove.clear(); + _gameObjectsToMove.clear(); for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end();) { @@ -2008,7 +2323,7 @@ void Map::SendInitSelf(Player* player) // build other passengers at transport also (they always visible and marked as visible and will not send at visibility update at add to map if (Transport* transport = player->GetTransport()) { - for (Transport::PlayerSet::const_iterator itr = transport->GetPassengers().begin(); itr != transport->GetPassengers().end(); ++itr) + for (std::set<WorldObject*>::const_iterator itr = transport->GetPassengers().begin(); itr != transport->GetPassengers().end(); ++itr) { if (player != (*itr) && player->HaveAtClient(*itr)) { @@ -2025,24 +2340,10 @@ void Map::SendInitSelf(Player* player) void Map::SendInitTransports(Player* player) { // Hack to send out transports - MapManager::TransportMap& tmap = sMapMgr->m_TransportsByMap; - - // no transports at map - if (tmap.find(player->GetMapId()) == tmap.end()) - return; - UpdateData transData; - - MapManager::TransportSet& tset = tmap[player->GetMapId()]; - - for (MapManager::TransportSet::const_iterator i = tset.begin(); i != tset.end(); ++i) - { - // send data for current transport in other place - if ((*i) != player->GetTransport() && (*i)->GetMapId() == GetId()) - { + for (TransportsContainer::const_iterator i = _transports.begin(); i != _transports.end(); ++i) + if (*i != player->GetTransport()) (*i)->BuildCreateUpdateBlockForPlayer(&transData, player); - } - } WorldPacket packet; transData.BuildPacket(&packet); @@ -2052,19 +2353,9 @@ void Map::SendInitTransports(Player* player) void Map::SendRemoveTransports(Player* player) { // Hack to send out transports - MapManager::TransportMap& tmap = sMapMgr->m_TransportsByMap; - - // no transports at map - if (tmap.find(player->GetMapId()) == tmap.end()) - return; - UpdateData transData; - - MapManager::TransportSet& tset = tmap[player->GetMapId()]; - - // except used transport - for (MapManager::TransportSet::const_iterator i = tset.begin(); i != tset.end(); ++i) - if ((*i) != player->GetTransport() && (*i)->GetMapId() != GetId()) + for (TransportsContainer::const_iterator i = _transports.begin(); i != _transports.end(); ++i) + if (*i != player->GetTransport()) (*i)->BuildOutOfRangeUpdateBlock(&transData); WorldPacket packet; @@ -2116,7 +2407,7 @@ void Map::AddObjectToSwitchList(WorldObject* obj, bool on) ASSERT(obj->GetMapId() == GetId() && obj->GetInstanceId() == GetInstanceId()); // i_objectsToSwitch is iterated only in Map::RemoveAllObjectsInRemoveList() and it uses // the contained objects only if GetTypeId() == TYPEID_UNIT , so we can return in all other cases - if (obj->GetTypeId() != TYPEID_UNIT) + if (obj->GetTypeId() != TYPEID_UNIT && obj->GetTypeId() != TYPEID_GAMEOBJECT) return; std::map<WorldObject*, bool>::iterator itr = i_objectsToSwitch.find(obj); @@ -2137,8 +2428,8 @@ void Map::RemoveAllObjectsInRemoveList() bool on = itr->second; i_objectsToSwitch.erase(itr); - if (obj->GetTypeId() == TYPEID_UNIT && !obj->IsPermanentWorldObject()) - SwitchGridContainers(obj->ToCreature(), on); + if ((obj->GetTypeId() == TYPEID_UNIT || obj->GetTypeId() == TYPEID_GAMEOBJECT) && !obj->IsPermanentWorldObject()) + SwitchGridContainers(obj, on); } //TC_LOG_DEBUG(LOG_FILTER_MAPS, "Object remover 1 check."); @@ -2233,6 +2524,13 @@ bool Map::ActiveObjectsNearGrid(NGridType const& ngrid) const return false; } +template<class T> +void Map::AddToActive(T* obj) +{ + AddToActiveHelper(obj); +} + +template <> void Map::AddToActive(Creature* c) { AddToActiveHelper(c); @@ -2254,6 +2552,18 @@ void Map::AddToActive(Creature* c) } } +template<> +void Map::AddToActive(DynamicObject* d) +{ + AddToActiveHelper(d); +} + +template<class T> +void Map::RemoveFromActive(T* /*obj*/) +{ +} + +template <> void Map::RemoveFromActive(Creature* c) { RemoveFromActiveHelper(c); @@ -2275,6 +2585,12 @@ void Map::RemoveFromActive(Creature* c) } } +template<> +void Map::RemoveFromActive(DynamicObject* obj) +{ + RemoveFromActiveHelper(obj); +} + template bool Map::AddToMap(Corpse*); template bool Map::AddToMap(Creature*); template bool Map::AddToMap(GameObject*); @@ -2772,6 +3088,15 @@ GameObject* Map::GetGameObject(uint64 guid) return ObjectAccessor::GetObjectInMap(guid, this, (GameObject*)NULL); } +Transport* Map::GetTransport(uint64 guid) +{ + if (GUID_HIPART(guid) != HIGHGUID_MO_TRANSPORT) + return NULL; + + GameObject* go = GetGameObject(guid); + return go ? go->ToTransport() : NULL; +} + DynamicObject* Map::GetDynamicObject(uint64 guid) { return ObjectAccessor::GetObjectInMap(guid, this, (DynamicObject*)NULL); diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 3deeb4e04b1..932f3e213ae 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -52,6 +52,7 @@ struct Position; class Battleground; class MapInstanced; class InstanceMap; +class Transport; namespace Trinity { struct ObjectUpdater; } struct ScriptAction @@ -278,6 +279,7 @@ class Map : public GridRefManager<NGridType> void PlayerRelocation(Player*, float x, float y, float z, float orientation); void CreatureRelocation(Creature* creature, float x, float y, float z, float ang, bool respawnRelocationOnFail = true); + void GameObjectRelocation(GameObject* go, float x, float y, float z, float orientation, bool respawnRelocationOnFail = true); template<class T, class CONTAINER> void Visit(const Cell& cell, TypeContainerVisitor<T, CONTAINER> &visitor); @@ -350,11 +352,13 @@ class Map : public GridRefManager<NGridType> } void MoveAllCreaturesInMoveList(); + void MoveAllGameObjectsInMoveList(); void RemoveAllObjectsInRemoveList(); virtual void RemoveAllPlayers(); // used only in MoveAllCreaturesInMoveList and ObjectGridUnloader bool CreatureRespawnRelocation(Creature* c, bool diffGridOnly); + bool GameObjectRespawnRelocation(GameObject* go, bool diffGridOnly); // assert print helper bool CheckGridIntegrity(Creature* c, bool moved) const; @@ -415,17 +419,13 @@ class Map : public GridRefManager<NGridType> // must called with AddToWorld template<class T> - void AddToActive(T* obj) { AddToActiveHelper(obj); } - - void AddToActive(Creature* obj); + void AddToActive(T* obj); // must called with RemoveFromWorld template<class T> - void RemoveFromActive(T* obj) { RemoveFromActiveHelper(obj); } - - void RemoveFromActive(Creature* obj); + void RemoveFromActive(T* obj); - void SwitchGridContainers(Creature* creature, bool toWorldContainer); + template<class T> void SwitchGridContainers(T* obj, bool on); template<class NOTIFIER> void VisitAll(const float &x, const float &y, float radius, NOTIFIER ¬ifier); template<class NOTIFIER> void VisitFirstFound(const float &x, const float &y, float radius, NOTIFIER ¬ifier); template<class NOTIFIER> void VisitWorld(const float &x, const float &y, float radius, NOTIFIER ¬ifier); @@ -438,6 +438,7 @@ class Map : public GridRefManager<NGridType> void SummonCreatureGroup(uint8 group, std::list<TempSummon*>* list = NULL); Creature* GetCreature(uint64 guid); GameObject* GetGameObject(uint64 guid); + Transport* GetTransport(uint64 guid); DynamicObject* GetDynamicObject(uint64 guid); MapInstanced* ToMapInstanced(){ if (Instanceable()) return reinterpret_cast<MapInstanced*>(this); else return NULL; } @@ -485,6 +486,9 @@ class Map : public GridRefManager<NGridType> static void DeleteRespawnTimesInDB(uint16 mapId, uint32 instanceId); + void SendInitTransports(Player* player); + void SendRemoveTransports(Player* player); + private: void LoadMapAndVMap(int gx, int gy); void LoadVMap(int gx, int gy); @@ -496,18 +500,21 @@ class Map : public GridRefManager<NGridType> void SendInitSelf(Player* player); - void SendInitTransports(Player* player); - void SendRemoveTransports(Player* player); - bool CreatureCellRelocation(Creature* creature, Cell new_cell); + bool GameObjectCellRelocation(GameObject* go, Cell new_cell); template<class T> void InitializeObject(T* obj); void AddCreatureToMoveList(Creature* c, float x, float y, float z, float ang); void RemoveCreatureFromMoveList(Creature* c); + void AddGameObjectToMoveList(GameObject* go, float x, float y, float z, float ang); + void RemoveGameObjectFromMoveList(GameObject* go); bool _creatureToMoveLock; std::vector<Creature*> _creaturesToMove; + bool _gameObjectsToMoveLock; + std::vector<GameObject*> _gameObjectsToMove; + bool IsGridLoaded(const GridCoord &) const; void EnsureGridCreated(const GridCoord &); void EnsureGridCreated_i(const GridCoord &); @@ -516,9 +523,6 @@ class Map : public GridRefManager<NGridType> void buildNGridLinkage(NGridType* pNGridType) { pNGridType->link(this); } - template<class T> void AddType(T *obj); - template<class T> void RemoveType(T *obj, bool); - NGridType* getNGrid(uint32 x, uint32 y) const { ASSERT(x < MAX_NUMBER_OF_GRIDS && y < MAX_NUMBER_OF_GRIDS); @@ -555,6 +559,11 @@ class Map : public GridRefManager<NGridType> ActiveNonPlayers m_activeNonPlayers; ActiveNonPlayers::iterator m_activeNonPlayersIter; + // Objects that must update even in inactive grids without activating them + typedef std::set<Transport*> TransportsContainer; + TransportsContainer _transports; + TransportsContainer::iterator _transportsUpdateIter; + private: Player* _GetScriptPlayerSourceOrTarget(Object* source, Object* target, const ScriptInfo* scriptInfo) const; Creature* _GetScriptCreatureSourceOrTarget(Object* source, Object* target, const ScriptInfo* scriptInfo, bool bReverse = false) const; @@ -589,19 +598,17 @@ class Map : public GridRefManager<NGridType> // Type specific code for add/remove to/from grid template<class T> - void AddToGrid(T* object, Cell const& cell); + void AddToGrid(T* object, Cell const& cell); template<class T> - void DeleteFromWorld(T*); + void DeleteFromWorld(T*); - template<class T> - void AddToActiveHelper(T* obj) + void AddToActiveHelper(WorldObject* obj) { m_activeNonPlayers.insert(obj); } - template<class T> - void RemoveFromActiveHelper(T* obj) + void RemoveFromActiveHelper(WorldObject* obj) { // Map::Update for active object in proccess if (m_activeNonPlayersIter != m_activeNonPlayers.end()) diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp index 60ebd3f8699..5aa8b85fbca 100644 --- a/src/server/game/Maps/MapManager.cpp +++ b/src/server/game/Maps/MapManager.cpp @@ -292,8 +292,6 @@ void MapManager::Update(uint32 diff) iter->second->DelayedUpdate(uint32(i_timer.GetCurrent())); sObjectAccessor->Update(uint32(i_timer.GetCurrent())); - for (TransportSet::iterator itr = m_Transports.begin(); itr != m_Transports.end(); ++itr) - (*itr)->Update(uint32(i_timer.GetCurrent())); i_timer.SetCurrent(0); } @@ -326,12 +324,6 @@ bool MapManager::IsValidMAP(uint32 mapid, bool startUp) void MapManager::UnloadAll() { - for (TransportSet::iterator i = m_Transports.begin(); i != m_Transports.end(); ++i) - { - (*i)->RemoveFromWorld(); - delete *i; - } - for (MapMapType::iterator iter = i_maps.begin(); iter != i_maps.end();) { iter->second->UnloadAll(); diff --git a/src/server/game/Maps/MapManager.h b/src/server/game/Maps/MapManager.h index 8af609c61e2..230b4648f4a 100644 --- a/src/server/game/Maps/MapManager.h +++ b/src/server/game/Maps/MapManager.h @@ -107,15 +107,6 @@ class MapManager void DoDelayedMovesAndRemoves(); - void LoadTransports(); - void LoadTransportNPCs(); - - typedef std::set<Transport*> TransportSet; - TransportSet m_Transports; - - typedef std::map<uint32, TransportSet> TransportMap; - TransportMap m_TransportsByMap; - bool CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck = false); void InitializeVisibilityDistanceInfo(); diff --git a/src/server/game/Maps/TransportMgr.cpp b/src/server/game/Maps/TransportMgr.cpp new file mode 100644 index 00000000000..bd79cd793d5 --- /dev/null +++ b/src/server/game/Maps/TransportMgr.cpp @@ -0,0 +1,453 @@ +/* + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "TransportMgr.h" +#include "Transport.h" +#include "InstanceScript.h" +#include "MoveSpline.h" +#include "MapManager.h" + +TransportTemplate::~TransportTemplate() +{ + // Collect shared pointers into a set to avoid deleting the same memory more than once + std::set<TransportSpline*> splines; + for (size_t i = 0; i < keyFrames.size(); ++i) + splines.insert(keyFrames[i].Spline); + + for (std::set<TransportSpline*>::iterator itr = splines.begin(); itr != splines.end(); ++itr) + delete *itr; +} + +TransportMgr::TransportMgr() +{ +} + +TransportMgr::~TransportMgr() +{ +} + +void TransportMgr::Unload() +{ + _transportTemplates.clear(); +} + +void TransportMgr::LoadTransportTemplates() +{ + uint32 oldMSTime = getMSTime(); + + QueryResult result = WorldDatabase.Query("SELECT entry FROM gameobject_template WHERE type = 15 ORDER BY entry ASC"); + + if (!result) + { + TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 transport templates. DB table `gameobject_template` has no transports!"); + return; + } + + uint32 count = 0; + + do + { + Field* fields = result->Fetch(); + uint32 entry = fields[0].GetUInt32(); + GameObjectTemplate const* goInfo = sObjectMgr->GetGameObjectTemplate(entry); + if (goInfo->moTransport.taxiPathId >= sTaxiPathNodesByPath.size()) + { + TC_LOG_ERROR(LOG_FILTER_SQL, "Transport %u (name: %s) has an invalid path specified in `gameobject_template`.`data0` (%u) field, skipped.", entry, goInfo->name.c_str(), goInfo->moTransport.taxiPathId); + continue; + } + + // paths are generated per template, saves us from generating it again in case of instanced transports + TransportTemplate& transport = _transportTemplates[entry]; + transport.entry = entry; + GeneratePath(goInfo, &transport); + + // transports in instance are only on one map + if (transport.inInstance) + _instanceTransports[*transport.mapsUsed.begin()].insert(entry); + + ++count; + } while (result->NextRow()); + + TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u transport templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); +} + +void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTemplate* transport) +{ + uint32 pathId = goInfo->moTransport.taxiPathId; + TaxiPathNodeList const& path = sTaxiPathNodesByPath[pathId]; + std::vector<KeyFrame>& keyFrames = transport->keyFrames; + Movement::PointsArray splinePath; + bool mapChange = false; + bool cyclic = true; + for (size_t i = 1; i < path.size() - 1; ++i) + { + if (!mapChange) + { + TaxiPathNodeEntry const& node_i = path[i]; + if (node_i.actionFlag == 1 || node_i.mapid != path[i + 1].mapid) + { + cyclic = false; + keyFrames.back().Teleport = true; + mapChange = true; + } + else + { + KeyFrame k(node_i); + keyFrames.push_back(k); + splinePath.push_back(G3D::Vector3(node_i.x, node_i.y, node_i.z)); + transport->mapsUsed.insert(k.Node->mapid); + } + } + else + mapChange = false; + } + + if (transport->mapsUsed.size() > 1) + { + for (std::set<uint32>::const_iterator itr = transport->mapsUsed.begin(); itr != transport->mapsUsed.end(); ++itr) + ASSERT(!sMapStore.LookupEntry(*itr)->Instanceable()); + + transport->inInstance = false; + } + else + transport->inInstance = sMapStore.LookupEntry(*transport->mapsUsed.begin())->Instanceable(); + + // last to first is always "teleport", even for closed paths + keyFrames.back().Teleport = true; + + const float speed = float(goInfo->moTransport.moveSpeed); + const float accel = float(goInfo->moTransport.accelRate); + const float accel_dist = 0.5f * speed * speed / accel; + + transport->accelTime = speed / accel; + transport->accelDist = accel_dist; + + int32 firstStop = -1; + int32 lastStop = -1; + + // first cell is arrived at by teleportation :S + keyFrames[0].DistFromPrev = 0; + keyFrames[0].Index = 1; + if (keyFrames[0].IsStopFrame()) + { + firstStop = 0; + lastStop = 0; + } + + // find the rest of the distances between key points + // Every path segment has its own spline + if (cyclic) + { + TransportSpline* spline = new TransportSpline(); + spline->init_cyclic_spline(&splinePath[0], splinePath.size(), Movement::SplineBase::ModeCatmullrom, 0); + spline->initLengths(); + keyFrames[0].DistFromPrev = spline->length(spline->last() - 2, spline->last() - 1); + keyFrames[0].Spline = spline; + for (size_t i = 1; i < keyFrames.size(); ++i) + { + keyFrames[i].Index = i + 1; + keyFrames[i].DistFromPrev = spline->length(i, i + 1); + keyFrames[i - 1].NextDistFromPrev = keyFrames[i].DistFromPrev; + keyFrames[i].Spline = spline; + if (keyFrames[i].IsStopFrame()) + { + // remember first stop frame + if (firstStop == -1) + firstStop = i; + lastStop = i; + } + } + } + else + { + size_t start = 0; + for (size_t i = 1; i < keyFrames.size(); ++i) + { + if (keyFrames[i - 1].Teleport || i + 1 == keyFrames.size()) + { + size_t extra = !keyFrames[i - 1].Teleport ? 1 : 0; + TransportSpline* spline = new TransportSpline(); + spline->init_spline(&splinePath[start], i - start + extra, Movement::SplineBase::ModeCatmullrom); + spline->initLengths(); + for (size_t j = start; j < i + extra; ++j) + { + keyFrames[j].Index = j - start + 1; + keyFrames[j].DistFromPrev = spline->length(j - start, j + 1 - start); + if (j > 0) + keyFrames[j - 1].NextDistFromPrev = keyFrames[j].DistFromPrev; + keyFrames[j].Spline = spline; + } + + if (keyFrames[i - 1].Teleport) + { + keyFrames[i].Index = i - start + 1; + keyFrames[i].DistFromPrev = 0.0f; + keyFrames[i - 1].NextDistFromPrev = 0.0f; + keyFrames[i].Spline = spline; + } + + start = i; + } + + if (keyFrames[i].IsStopFrame()) + { + // remember first stop frame + if (firstStop == -1) + firstStop = i; + lastStop = i; + } + } + } + + keyFrames.back().NextDistFromPrev = keyFrames.front().DistFromPrev; + + // at stopping keyframes, we define distSinceStop == 0, + // and distUntilStop is to the next stopping keyframe. + // this is required to properly handle cases of two stopping frames in a row (yes they do exist) + float tmpDist = 0.0f; + for (size_t i = 0; i < keyFrames.size(); ++i) + { + int32 j = (i + lastStop) % keyFrames.size(); + if (keyFrames[j].IsStopFrame()) + tmpDist = 0.0f; + else + tmpDist += keyFrames[j].DistFromPrev; + keyFrames[j].DistSinceStop = tmpDist; + } + + tmpDist = 0.0f; + for (int32 i = int32(keyFrames.size()) - 1; i >= 0; i--) + { + int32 j = (i + firstStop) % keyFrames.size(); + tmpDist += keyFrames[(j + 1) % keyFrames.size()].DistFromPrev; + keyFrames[j].DistUntilStop = tmpDist; + if (keyFrames[j].IsStopFrame()) + tmpDist = 0.0f; + } + + for (size_t i = 0; i < keyFrames.size(); ++i) + { + float total_dist = keyFrames[i].DistSinceStop + keyFrames[i].DistUntilStop; + if (total_dist < 2 * accel_dist) // won't reach full speed + { + if (keyFrames[i].DistSinceStop < keyFrames[i].DistUntilStop) // is still accelerating + { + // calculate accel+brake time for this short segment + float segment_time = 2.0f * sqrt((keyFrames[i].DistUntilStop + keyFrames[i].DistSinceStop) / accel); + // substract acceleration time + keyFrames[i].TimeTo = segment_time - sqrt(2 * keyFrames[i].DistSinceStop / accel); + } + else // slowing down + keyFrames[i].TimeTo = sqrt(2 * keyFrames[i].DistUntilStop / accel); + } + else if (keyFrames[i].DistSinceStop < accel_dist) // still accelerating (but will reach full speed) + { + // calculate accel + cruise + brake time for this long segment + float segment_time = (keyFrames[i].DistUntilStop + keyFrames[i].DistSinceStop) / speed + (speed / accel); + // substract acceleration time + keyFrames[i].TimeTo = segment_time - sqrt(2 * keyFrames[i].DistSinceStop / accel); + } + else if (keyFrames[i].DistUntilStop < accel_dist) // already slowing down (but reached full speed) + keyFrames[i].TimeTo = sqrt(2 * keyFrames[i].DistUntilStop / accel); + else // at full speed + keyFrames[i].TimeTo = (keyFrames[i].DistUntilStop / speed) + (0.5f * speed / accel); + } + + // calculate tFrom times from tTo times + float segmentTime = 0.0f; + for (size_t i = 0; i < keyFrames.size(); ++i) + { + int32 j = (i + lastStop) % keyFrames.size(); + if (keyFrames[j].IsStopFrame()) + segmentTime = keyFrames[j].TimeTo; + keyFrames[j].TimeFrom = segmentTime - keyFrames[j].TimeTo; + } + + // calculate path times + keyFrames[0].ArriveTime = 0; + float curPathTime = 0.0f; + if (keyFrames[0].IsStopFrame()) + { + curPathTime = float(keyFrames[0].Node->delay); + keyFrames[0].DepartureTime = uint32(curPathTime * IN_MILLISECONDS); + } + + for (size_t i = 1; i < keyFrames.size(); ++i) + { + curPathTime += keyFrames[i-1].TimeTo; + if (keyFrames[i].IsStopFrame()) + { + keyFrames[i].ArriveTime = uint32(curPathTime * IN_MILLISECONDS); + keyFrames[i - 1].NextArriveTime = keyFrames[i].ArriveTime; + curPathTime += (float)keyFrames[i].Node->delay; + keyFrames[i].DepartureTime = uint32(curPathTime * IN_MILLISECONDS); + } + else + { + curPathTime -= keyFrames[i].TimeTo; + keyFrames[i].ArriveTime = uint32(curPathTime * IN_MILLISECONDS); + keyFrames[i - 1].NextArriveTime = keyFrames[i].ArriveTime; + keyFrames[i].DepartureTime = keyFrames[i].ArriveTime; + } + } + keyFrames.back().NextArriveTime = keyFrames.back().DepartureTime; + + transport->pathTime = keyFrames.back().DepartureTime; + //WorldDatabase.DirectPExecute("UPDATE `transports` SET `period_gen`=%u WHERE `entry`=%u", transport->pathTime, transport->entry); +} + +void TransportMgr::AddPathNodeToTransport(uint32 transportEntry, uint32 timeSeg, TransportAnimationEntry const* node) +{ + TransportAnimation& animNode = _transportAnimations[transportEntry]; + if (animNode.TotalTime < timeSeg) + animNode.TotalTime = timeSeg; + + animNode.Path[timeSeg] = node; +} + +Transport* TransportMgr::CreateTransport(uint32 entry, uint32 guid /*= 0*/, Map* map /*= NULL*/) +{ + // instance case, execute GetGameObjectEntry hook + if (map) + { + // SetZoneScript() is called after adding to map, so fetch the script using map + if (map->IsDungeon()) + if (InstanceScript* instance = static_cast<InstanceMap*>(map)->GetInstanceScript()) + entry = instance->GetGameObjectEntry(0, entry); + + if (!entry) + return NULL; + } + + TransportTemplate const* tInfo = GetTransportTemplate(entry); + if (!tInfo) + { + TC_LOG_ERROR(LOG_FILTER_SQL, "Transport %u will not be loaded, `transport_template` missing", entry); + return NULL; + } + + // create transport... + Transport* trans = new Transport(); + + // ...at first waypoint + TaxiPathNodeEntry const* startNode = tInfo->keyFrames.begin()->Node; + uint32 mapId = startNode->mapid; + float x = startNode->x; + float y = startNode->y; + float z = startNode->z; + float o = 0.0f; + + // initialize the gameobject base + uint32 guidLow = guid ? guid : sObjectMgr->GenerateLowGuid(HIGHGUID_MO_TRANSPORT); + if (!trans->Create(guidLow, entry, mapId, x, y, z, o, 255)) + { + delete trans; + return NULL; + } + + if (MapEntry const* mapEntry = sMapStore.LookupEntry(mapId)) + { + if (mapEntry->Instanceable() != tInfo->inInstance) + { + TC_LOG_ERROR(LOG_FILTER_TRANSPORTS, "Transport %u (name: %s) attempted creation in instance map (id: %u) but it is not an instanced transport!", entry, trans->GetName().c_str(), mapId); + delete trans; + return NULL; + } + } + + // use preset map for instances (need to know which instance) + trans->SetMap(map ? map : sMapMgr->CreateMap(mapId, NULL)); + if (map && map->IsDungeon()) + trans->m_zoneScript = map->ToInstanceMap()->GetInstanceScript(); + + // Passengers will be loaded once a player is near + + trans->GetMap()->AddToMap<Transport>(trans); + return trans; +} + +void TransportMgr::SpawnContinentTransports() +{ + if (_transportTemplates.empty()) + return; + + uint32 oldMSTime = getMSTime(); + + QueryResult result = WorldDatabase.Query("SELECT guid, entry FROM transports"); + + uint32 count = 0; + if (result) + { + do + { + Field* fields = result->Fetch(); + uint32 guid = fields[0].GetUInt32(); + uint32 entry = fields[1].GetUInt32(); + + if (TransportTemplate const* tInfo = GetTransportTemplate(entry)) + if (!tInfo->inInstance) + if (CreateTransport(entry, guid)) + ++count; + + } while (result->NextRow()); + } + + TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Spawned %u continent transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); +} + +void TransportMgr::CreateInstanceTransports(Map* map) +{ + TransportInstanceMap::const_iterator mapTransports = _instanceTransports.find(map->GetId()); + + // no transports here + if (mapTransports == _instanceTransports.end() || mapTransports->second.empty()) + return; + + // create transports + for (std::set<uint32>::const_iterator itr = mapTransports->second.begin(); itr != mapTransports->second.end(); ++itr) + CreateTransport(*itr, 0, map); +} + +TransportAnimationEntry const* TransportAnimation::GetAnimNode(uint32 time) const +{ + if (Path.empty()) + return NULL; + + for (TransportPathContainer::const_reverse_iterator itr2 = Path.rbegin(); itr2 != Path.rend(); ++itr2) + if (time >= itr2->first) + return itr2->second; + + return Path.begin()->second; +} + +G3D::Quat TransportAnimation::GetAnimRotation(uint32 time) const +{ + if (Rotations.empty()) + return G3D::Quat(0.0f, 0.0f, 0.0f, 1.0f); + + TransportRotationEntry const* rot = Rotations.begin()->second; + for (TransportPathRotationContainer::const_reverse_iterator itr2 = Rotations.rbegin(); itr2 != Rotations.rend(); ++itr2) + { + if (time >= itr2->first) + { + rot = itr2->second; + break; + } + } + + return G3D::Quat(rot->X, rot->Y, rot->Z, rot->W); +} diff --git a/src/server/game/Maps/TransportMgr.h b/src/server/game/Maps/TransportMgr.h new file mode 100644 index 00000000000..250a2c50bb1 --- /dev/null +++ b/src/server/game/Maps/TransportMgr.h @@ -0,0 +1,159 @@ +/* + * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef TRANSPORTMGR_H +#define TRANSPORTMGR_H + +#include <ace/Singleton.h> +#include <G3D/Quat.h> +#include "Spline.h" +#include "DBCStores.h" + +struct KeyFrame; +struct GameObjectTemplate; +struct TransportTemplate; +class Transport; +class Map; + +typedef Movement::Spline<double> TransportSpline; +typedef std::vector<KeyFrame> KeyFrameVec; +typedef UNORDERED_MAP<uint32, TransportTemplate> TransportTemplates; +typedef std::set<Transport*> TransportSet; +typedef UNORDERED_MAP<uint32, TransportSet> TransportMap; +typedef UNORDERED_MAP<uint32, std::set<uint32> > TransportInstanceMap; + +struct KeyFrame +{ + explicit KeyFrame(TaxiPathNodeEntry const& _node) : Node(&_node), + DistSinceStop(-1.0f), DistUntilStop(-1.0f), DistFromPrev(-1.0f), TimeFrom(0.0f), TimeTo(0.0f), + Teleport(false), ArriveTime(0), DepartureTime(0), Spline(NULL), NextDistFromPrev(0.0f), NextArriveTime(0) + { + } + + uint32 Index; + TaxiPathNodeEntry const* Node; + float DistSinceStop; + float DistUntilStop; + float DistFromPrev; + float TimeFrom; + float TimeTo; + bool Teleport; + uint32 ArriveTime; + uint32 DepartureTime; + TransportSpline* Spline; + + // Data needed for next frame + float NextDistFromPrev; + uint32 NextArriveTime; + + bool IsTeleportFrame() const { return Teleport; } + bool IsStopFrame() const { return Node->actionFlag == 2; } +}; + +struct TransportTemplate +{ + TransportTemplate() : pathTime(0), accelTime(0.0f), accelDist(0.0f) { } + ~TransportTemplate(); + + std::set<uint32> mapsUsed; + bool inInstance; + uint32 pathTime; + KeyFrameVec keyFrames; + float accelTime; + float accelDist; + uint32 entry; +}; + +typedef std::map<uint32, TransportAnimationEntry const*> TransportPathContainer; +typedef std::map<uint32, TransportRotationEntry const*> TransportPathRotationContainer; + +struct TransportAnimation +{ + TransportPathContainer Path; + TransportPathRotationContainer Rotations; + uint32 TotalTime; + + TransportAnimationEntry const* GetAnimNode(uint32 time) const; + G3D::Quat GetAnimRotation(uint32 time) const; +}; + +typedef std::map<uint32, TransportAnimation> TransportAnimationContainer; + +class TransportMgr +{ + friend class ACE_Singleton<TransportMgr, ACE_Thread_Mutex>; + friend void LoadDBCStores(std::string const&); + + public: + void Unload(); + + void LoadTransportTemplates(); + + // Creates a transport using given GameObject template entry + Transport* CreateTransport(uint32 entry, uint32 guid = 0, Map* map = NULL); + + // Spawns all continent transports, used at core startup + void SpawnContinentTransports(); + + // creates all transports for instance + void CreateInstanceTransports(Map* map); + + TransportTemplate const* GetTransportTemplate(uint32 entry) const + { + TransportTemplates::const_iterator itr = _transportTemplates.find(entry); + if (itr != _transportTemplates.end()) + return &itr->second; + return NULL; + } + + TransportAnimation const* GetTransportAnimInfo(uint32 entry) const + { + TransportAnimationContainer::const_iterator itr = _transportAnimations.find(entry); + if (itr != _transportAnimations.end()) + return &itr->second; + + return NULL; + } + + private: + TransportMgr(); + ~TransportMgr(); + TransportMgr(TransportMgr const&); + TransportMgr& operator=(TransportMgr const&); + + // Generates and precaches a path for transport to avoid generation each time transport instance is created + void GeneratePath(GameObjectTemplate const* goInfo, TransportTemplate* transport); + + void AddPathNodeToTransport(uint32 transportEntry, uint32 timeSeg, TransportAnimationEntry const* node); + + void AddPathRotationToTransport(uint32 transportEntry, uint32 timeSeg, TransportRotationEntry const* node) + { + _transportAnimations[transportEntry].Rotations[timeSeg] = node; + } + + // Container storing transport templates + TransportTemplates _transportTemplates; + + // Container storing transport entries to create for instanced maps + TransportInstanceMap _instanceTransports; + + TransportAnimationContainer _transportAnimations; +}; + +#define sTransportMgr ACE_Singleton<TransportMgr, ACE_Thread_Mutex>::instance() + +#endif // TRANSPORTMGR_H diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index c50db983845..327d7ed69fd 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -104,7 +104,7 @@ enum TrinityStrings LANG_RBAC_PERM_REVOKED = 78, LANG_RBAC_PERM_REVOKED_NOT_IN_LIST = 79, // Free 80 - 95 - + LANG_GUILD_RENAME_ALREADY_EXISTS = 96, LANG_GUILD_RENAME_DONE = 97, diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index e561d37ed36..02f5965836f 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -1495,7 +1495,8 @@ enum GameObjectDynamicLowFlags GO_DYNFLAG_LO_ACTIVATE = 0x01, // enables interaction with GO GO_DYNFLAG_LO_ANIMATE = 0x02, // possibly more distinct animation of GO GO_DYNFLAG_LO_NO_INTERACT = 0x04, // appears to disable interaction (not fully verified) - GO_DYNFLAG_LO_SPARKLE = 0x08 // makes GO sparkle + GO_DYNFLAG_LO_SPARKLE = 0x08, // makes GO sparkle + GO_DYNFLAG_LO_STOPPED = 0x10 // Transport is stopped }; enum GameObjectDestructibleState diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp index 6311e629641..5506f74b221 100755 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp @@ -20,6 +20,7 @@ //Extended headers #include "ObjectMgr.h" #include "World.h" +#include "Transport.h" //Flightmaster grid preloading #include "MapManager.h" //Creature-specific headers @@ -92,14 +93,37 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature) { if (!i_path || i_path->empty()) return false; + if (Stopped()) return true; + bool transportPath = creature->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) && creature->GetTransGUID(); + if (m_isArrivalDone) { if ((i_currentNode == i_path->size() - 1) && !repeating) // If that's our last waypoint { - creature->SetHomePosition(i_path->at(i_currentNode)->x, i_path->at(i_currentNode)->y, i_path->at(i_currentNode)->z, creature->GetOrientation()); + float x = i_path->at(i_currentNode)->x; + float y = i_path->at(i_currentNode)->y; + float z = i_path->at(i_currentNode)->z; + float o = creature->GetOrientation(); + + if (!transportPath) + creature->SetHomePosition(x, y, z, o); + else + { + if (Transport* trans = creature->GetTransport()) + { + o -= trans->GetOrientation(); + creature->SetTransportHomePosition(x, y, z, o); + trans->CalculatePassengerPosition(x, y, z, &o); + creature->SetHomePosition(x, y, z, o); + } + else + transportPath = false; + // else if (vehicle) - this should never happen, vehicle offsets are const + } + creature->GetMotionMaster()->Initialize(); return false; } @@ -113,7 +137,19 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature) creature->AddUnitState(UNIT_STATE_ROAMING_MOVE); + Movement::Location formationDest(node->x, node->y, node->z, 0.0f); Movement::MoveSplineInit init(creature); + + //! If creature is on transport, we assume waypoints set in DB are already transport offsets + if (transportPath) + { + init.DisableTransportPathTransformations(); + if (TransportBase* trans = creature->GetDirectTransport()) + trans->CalculatePassengerPosition(formationDest.x, formationDest.y, formationDest.z, &formationDest.orientation); + } + + //! Do not use formationDest here, MoveTo requires transport offsets due to DisableTransportPathTransformations() call + //! but formationDest contains global coordinates init.MoveTo(node->x, node->y, node->z); //! Accepts angles such as 0.00001 and -0.00001, 0 must be ignored, default value in waypoint table @@ -125,7 +161,7 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature) //Call for creature group update if (creature->GetFormation() && creature->GetFormation()->getLeader() == creature) - creature->GetFormation()->LeaderMoveTo(node->x, node->y, node->z); + creature->GetFormation()->LeaderMoveTo(formationDest.x, formationDest.y, formationDest.z); return true; } diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp index c37cdf80730..ff133272724 100644 --- a/src/server/game/Scripting/MapScripts.cpp +++ b/src/server/game/Scripting/MapScripts.cpp @@ -315,6 +315,7 @@ void Map::ScriptsProcess() case HIGHGUID_PLAYER: source = HashMapHolder<Player>::Find(step.sourceGUID); break; + case HIGHGUID_TRANSPORT: case HIGHGUID_GAMEOBJECT: source = HashMapHolder<GameObject>::Find(step.sourceGUID); break; @@ -322,15 +323,11 @@ void Map::ScriptsProcess() source = HashMapHolder<Corpse>::Find(step.sourceGUID); break; case HIGHGUID_MO_TRANSPORT: - for (MapManager::TransportSet::iterator itr2 = sMapMgr->m_Transports.begin(); itr2 != sMapMgr->m_Transports.end(); ++itr2) - { - if ((*itr2)->GetGUID() == step.sourceGUID) - { - source = *itr2; - break; - } - } + { + GameObject* go = HashMapHolder<GameObject>::Find(step.sourceGUID); + source = go ? go->ToTransport() : NULL; break; + } default: TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source with unsupported high guid (GUID: " UI64FMTD ", high guid: %u).", step.script->GetDebugInfo().c_str(), step.sourceGUID, GUID_HIPART(step.sourceGUID)); @@ -353,12 +350,19 @@ void Map::ScriptsProcess() case HIGHGUID_PLAYER: // empty GUID case also target = HashMapHolder<Player>::Find(step.targetGUID); break; + case HIGHGUID_TRANSPORT: case HIGHGUID_GAMEOBJECT: target = HashMapHolder<GameObject>::Find(step.targetGUID); break; case HIGHGUID_CORPSE: target = HashMapHolder<Corpse>::Find(step.targetGUID); break; + case HIGHGUID_MO_TRANSPORT: + { + GameObject* go = HashMapHolder<GameObject>::Find(step.targetGUID); + target = go ? go->ToTransport() : NULL; + break; + } default: TC_LOG_ERROR(LOG_FILTER_TSCR, "%s target with unsupported high guid (GUID: " UI64FMTD ", high guid: %u).", step.script->GetDebugInfo().c_str(), step.targetGUID, GUID_HIPART(step.targetGUID)); diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 966b3edfcb9..26b3bb5f78f 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -1363,6 +1363,16 @@ void ScriptMgr::OnGroupDisband(Group* group) } // Unit +void ScriptMgr::OnHeal(Unit* healer, Unit* reciever, uint32& gain) +{ + FOREACH_SCRIPT(UnitScript)->OnHeal(healer, reciever, gain); +} + +void ScriptMgr::OnDamage(Unit* attacker, Unit* victim, uint32& damage) +{ + FOREACH_SCRIPT(UnitScript)->OnDamage(attacker, victim, damage); +} + void ScriptMgr::ModifyPeriodicDamageAurasTick(Unit* target, Unit* attacker, uint32& damage) { FOREACH_SCRIPT(UnitScript)->ModifyPeriodicDamageAurasTick(target, attacker, damage); diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index e7946501616..37a95c77254 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -396,6 +396,12 @@ class UnitScript : public ScriptObject UnitScript(const char* name, bool addToScripts = true); public: + // Called when a unit deals healing to another unit + virtual void OnHeal(Unit* /*healer*/, Unit* /*reciever*/, uint32& /*gain*/) { } + + // Called when a unit deals damage to another unit + virtual void OnDamage(Unit* /*attacker*/, Unit* /*victim*/, uint32& /*damage*/) { } + // Called when DoT's Tick Damage is being Dealt virtual void ModifyPeriodicDamageAurasTick(Unit* /*target*/, Unit* /*attacker*/, uint32& /*damage*/) { } @@ -1054,6 +1060,8 @@ class ScriptMgr public: /* UnitScript */ + void OnHeal(Unit* healer, Unit* reciever, uint32& gain); + void OnDamage(Unit* attacker, Unit* victim, uint32& damage); void ModifyPeriodicDamageAurasTick(Unit* target, Unit* attacker, uint32& damage); void ModifyMeleeDamage(Unit* target, Unit* attacker, uint32& damage); void ModifySpellDamageTaken(Unit* target, Unit* attacker, int32& damage); diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index c60b09438c1..c33c12ae5d4 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -272,6 +272,8 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) //! delayed packets that were re-enqueued due to improper timing. To prevent an infinite //! loop caused by re-enqueueing the same packets over and over again, we stop updating this session //! and continue updating others. The re-enqueued packets will be handled in the next Update call for this session. + uint32 processedPackets = 0; + while (m_Socket && !m_Socket->IsClosed() && !_recvQueue.empty() && _recvQueue.peek(true) != firstDelayedPacket && _recvQueue.next(packet, updater)) @@ -383,6 +385,14 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) delete packet; deletePacket = true; + +#define MAX_PROCESSED_PACKETS_IN_SAME_WORLDSESSION_UPDATE 100 + processedPackets++; + + //process only a max amout of packets in 1 Update() call. + //Any leftover will be processed in next update + if (processedPackets > MAX_PROCESSED_PACKETS_IN_SAME_WORLDSESSION_UPDATE) + break; } if (m_Socket && !m_Socket->IsClosed() && _warden) @@ -786,10 +796,6 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo* mi) if (mi->HasExtraMovementFlag(MOVEMENTFLAG2_INTERPOLATED_MOVEMENT)) data >> mi->transport.time2; - - if (mi->pos.m_positionX != mi->transport.pos.m_positionX) - if (GetPlayer()->GetTransport()) - GetPlayer()->GetTransport()->UpdatePosition(mi); } if (mi->HasMovementFlag(MovementFlags(MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING)) || (mi->HasExtraMovementFlag(MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING))) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 866cd888c3e..2eee80924a4 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -643,7 +643,7 @@ void Spell::InitExplicitTargets(SpellCastTargets const& targets) if (Player* playerCaster = m_caster->ToPlayer()) { // selection has to be found and to be valid target for the spell - if (Unit* selectedUnit = ObjectAccessor::GetUnit(*m_caster, playerCaster->GetSelection())) + if (Unit* selectedUnit = ObjectAccessor::GetUnit(*m_caster, playerCaster->GetTarget())) if (m_spellInfo->CheckExplicitTarget(m_caster, selectedUnit) == SPELL_CAST_OK) unit = selectedUnit; } @@ -1777,9 +1777,9 @@ void Spell::SelectEffectTypeImplicitTargets(uint8 effIndex) { case SPELL_EFFECT_SUMMON_RAF_FRIEND: case SPELL_EFFECT_SUMMON_PLAYER: - if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->ToPlayer()->GetSelection()) + if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->GetTarget()) { - WorldObject* target = ObjectAccessor::FindPlayer(m_caster->ToPlayer()->GetSelection()); + WorldObject* target = ObjectAccessor::FindPlayer(m_caster->GetTarget()); CallScriptObjectTargetSelectHandlers(target, SpellEffIndex(effIndex)); @@ -3095,7 +3095,7 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered // set target for proper facing if ((m_casttime || m_spellInfo->IsChanneled()) && !(_triggeredCastFlags & TRIGGERED_IGNORE_SET_FACING)) if (m_caster->GetTypeId() == TYPEID_UNIT && m_targets.GetObjectTarget() && m_caster != m_targets.GetObjectTarget()) - m_caster->FocusTarget(this, m_targets.GetObjectTarget()); + m_caster->ToCreature()->FocusTarget(this, m_targets.GetObjectTarget()); if (!(_triggeredCastFlags & TRIGGERED_IGNORE_GCD)) TriggerGlobalCooldown(); @@ -3661,8 +3661,8 @@ void Spell::finish(bool ok) ((Puppet*)charm)->UnSummon(); } - if (m_caster->GetTypeId() == TYPEID_UNIT) - m_caster->ReleaseFocus(this); + if (Creature* creatureCaster = m_caster->ToCreature()) + creatureCaster->ReleaseFocus(this); if (!ok) return; @@ -5323,10 +5323,10 @@ SpellCastResult Spell::CheckCast(bool strict) { if (m_caster->GetTypeId() != TYPEID_PLAYER) return SPELL_FAILED_BAD_TARGETS; - if (!m_caster->ToPlayer()->GetSelection()) + if (!m_caster->GetTarget()) return SPELL_FAILED_BAD_TARGETS; - Player* target = ObjectAccessor::FindPlayer(m_caster->ToPlayer()->GetSelection()); + Player* target = ObjectAccessor::FindPlayer(m_caster->ToPlayer()->GetTarget()); if (!target || m_caster->ToPlayer() == target || (!target->IsInSameRaidWith(m_caster->ToPlayer()) && m_spellInfo->Id != 48955)) // refer-a-friend spell return SPELL_FAILED_BAD_TARGETS; @@ -5358,10 +5358,10 @@ SpellCastResult Spell::CheckCast(bool strict) Player* playerCaster = m_caster->ToPlayer(); // - if (!(playerCaster->GetSelection())) + if (!(playerCaster->GetTarget())) return SPELL_FAILED_BAD_TARGETS; - Player* target = ObjectAccessor::FindPlayer(playerCaster->GetSelection()); + Player* target = playerCaster->GetSelectedPlayer(); if (!target || !(target->GetSession()->GetRecruiterId() == playerCaster->GetSession()->GetAccountId() || target->GetSession()->GetAccountId() == playerCaster->GetSession()->GetRecruiterId())) diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 29a869cf458..ff89cc61f6f 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -1855,7 +1855,7 @@ void SpellMgr::LoadSpellProcEvents() } if (!spellInfo->ProcFlags && !spellProcEvent.procFlags) - TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_proc_event` probally not triggered spell", spellInfo->Id); + TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_proc_event` probably not triggered spell", spellInfo->Id); mSpellProcEventMap[spellInfo->Id] = spellProcEvent; diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 8ca2e1db56e..7ad7b68b210 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -80,6 +80,7 @@ #include "Warden.h" #include "CalendarMgr.h" #include "BattlefieldMgr.h" +#include "TransportMgr.h" ACE_Atomic_Op<ACE_Thread_Mutex, bool> World::m_stopEvent = false; uint8 World::m_ExitCode = SHUTDOWN_EXIT_CODE; @@ -1374,6 +1375,9 @@ void World::SetInitialWorldSettings() TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Object Templates..."); // must be after LoadPageTexts sObjectMgr->LoadGameObjectTemplate(); + TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Transport templates..."); + sTransportMgr->LoadTransportTemplates(); + TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Spell Rank Data..."); sSpellMgr->LoadSpellRanks(); @@ -1784,10 +1788,7 @@ void World::SetInitialWorldSettings() sBattlefieldMgr->InitBattlefield(); TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Transports..."); - sMapMgr->LoadTransports(); - - TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Transport NPCs..."); - sMapMgr->LoadTransportNPCs(); + sTransportMgr->SpawnContinentTransports(); ///- Initialize Warden TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Warden Checks..."); diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 332169ebd00..45ab88e9688 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -450,12 +450,12 @@ public: uint32 pwConfig = sWorld->getIntConfig(CONFIG_ACC_PASSCHANGESEC); // 0 - PW_NONE, 1 - PW_EMAIL, 2 - PW_RBAC // Command is supposed to be: .account password [$oldpassword] [$newpassword] [$newpasswordconfirmation] [$emailconfirmation] - char* oldPassword = strtok((char*)args, " "); // This extracts [$oldpassword] - char* newPassword = strtok(NULL, " "); // This extracts [$newpassword] - char* passwordConfirmation = strtok(NULL, " "); // This extracts [$newpasswordconfirmation] - const char* emailConfirmation; // This defines the emailConfirmation variable, which is optional depending on sec type. - if (!(emailConfirmation = strtok(NULL, " "))) // This extracts [$emailconfirmation]. If it doesn't exist, however... - emailConfirmation = ""; // ... it's simply "" for emailConfirmation. + char* oldPassword = strtok((char*)args, " "); // This extracts [$oldpassword] + char* newPassword = strtok(NULL, " "); // This extracts [$newpassword] + char* passwordConfirmation = strtok(NULL, " "); // This extracts [$newpasswordconfirmation] + char const* emailConfirmation = strtok(NULL, " "); // This defines the emailConfirmation variable, which is optional depending on sec type. + if (!emailConfirmation) // This extracts [$emailconfirmation]. If it doesn't exist, however... + emailConfirmation = ""; // ... it's simply "" for emailConfirmation. //Is any of those variables missing for any reason ? We return false. if (!oldPassword || !newPassword || !passwordConfirmation) diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 6c831520d59..f33e583522e 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -31,6 +31,7 @@ EndScriptData */ #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "GossipDef.h" +#include "Transport.h" #include "Language.h" #include <fstream> @@ -91,6 +92,7 @@ public: { "areatriggers", rbac::RBAC_PERM_COMMAND_DEBUG_AREATRIGGERS, false, &HandleDebugAreaTriggersCommand, "", NULL }, { "los", rbac::RBAC_PERM_COMMAND_DEBUG_LOS, false, &HandleDebugLoSCommand, "", NULL }, { "moveflags", rbac::RBAC_PERM_COMMAND_DEBUG_MOVEFLAGS, false, &HandleDebugMoveflagsCommand, "", NULL }, + { "transport", rbac::RBAC_PERM_COMMAND_DEBUG_TRANSPORT, false, &HandleDebugTransportCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; static ChatCommand commandTable[] = @@ -179,7 +181,7 @@ public: return false; } - if (handler->GetSession()->GetPlayer()->GetSelection()) + if (handler->GetSession()->GetPlayer()->GetTarget()) unit->PlayDistanceSound(soundId, handler->GetSession()->GetPlayer()); else unit->PlayDirectSound(soundId, handler->GetSession()->GetPlayer()); @@ -1363,6 +1365,30 @@ public: handler->PSendSysMessage("Waypoint SQL written to SQL Developer log"); return true; } + + static bool HandleDebugTransportCommand(ChatHandler* handler, char const* args) + { + Transport* transport = handler->GetSession()->GetPlayer()->GetTransport(); + if (!transport) + return false; + + bool start = false; + if (!stricmp(args, "stop")) + transport->EnableMovement(false); + else if (!stricmp(args, "start")) + { + transport->EnableMovement(true); + start = true; + } + else + { + handler->PSendSysMessage("Transport %s is %s", transport->GetName().c_str(), transport->GetGoState() == GO_STATE_READY ? "stopped" : "moving"); + return true; + } + + handler->PSendSysMessage("Transport %s %s", transport->GetName().c_str(), start ? "started" : "stopped"); + return true; + } }; void AddSC_debug_commandscript() diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 513d378287b..3d531cee1f5 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -529,7 +529,7 @@ public: { Unit* target = handler->getSelectedUnit(); - if (!target || !handler->GetSession()->GetPlayer()->GetSelection()) + if (!target || !handler->GetSession()->GetPlayer()->GetTarget()) { handler->SendSysMessage(LANG_SELECT_CHAR_OR_CREATURE); handler->SetSentErrorMessage(true); @@ -597,7 +597,7 @@ public: static bool HandleGUIDCommand(ChatHandler* handler, char const* /*args*/) { - uint64 guid = handler->GetSession()->GetPlayer()->GetSelection(); + uint64 guid = handler->GetSession()->GetPlayer()->GetTarget(); if (guid == 0) { @@ -1762,7 +1762,7 @@ public: // accept only explicitly selected target (not implicitly self targeting case) Unit* target = handler->getSelectedUnit(); - if (player->GetSelection() && target) + if (player->GetTarget() && target) { if (target->GetTypeId() != TYPEID_UNIT || target->IsPet()) { @@ -2107,7 +2107,7 @@ public: } Unit* target = handler->getSelectedUnit(); - if (!target || !handler->GetSession()->GetPlayer()->GetSelection()) + if (!target || !handler->GetSession()->GetPlayer()->GetTarget()) { handler->SendSysMessage(LANG_SELECT_CHAR_OR_CREATURE); handler->SetSentErrorMessage(true); diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index f10a929c675..a1b23fd5935 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -245,24 +245,22 @@ public: float o = chr->GetOrientation(); Map* map = chr->GetMap(); - if (chr->GetTransport()) + if (Transport* trans = chr->GetTransport()) { - uint32 tguid = chr->GetTransport()->AddNPCPassenger(0, id, chr->GetTransOffsetX(), chr->GetTransOffsetY(), chr->GetTransOffsetZ(), chr->GetTransOffsetO()); - if (tguid > 0) - { - PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_CREATURE_TRANSPORT); + uint32 guid = sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT); + CreatureData& data = sObjectMgr->NewOrExistCreatureData(guid); + data.id = id; + data.phaseMask = chr->GetPhaseMaskForSpawn(); + data.posX = chr->GetTransOffsetX(); + data.posY = chr->GetTransOffsetY(); + data.posZ = chr->GetTransOffsetZ(); + data.orientation = chr->GetTransOffsetO(); - stmt->setInt32(0, int32(tguid)); - stmt->setInt32(1, int32(id)); - stmt->setInt32(2, int32(chr->GetTransport()->GetEntry())); - stmt->setFloat(3, chr->GetTransOffsetX()); - stmt->setFloat(4, chr->GetTransOffsetY()); - stmt->setFloat(5, chr->GetTransOffsetZ()); - stmt->setFloat(6, chr->GetTransOffsetO()); + Creature* creature = trans->CreateNPCPassenger(guid, &data); - WorldDatabase.Execute(stmt); - } + creature->SaveToDB(trans->GetGOInfo()->moTransport.mapID, 1 << map->GetSpawnMode(), chr->GetPhaseMaskForSpawn()); + sObjectMgr->AddCreatureToGrid(guid, &data); return true; } @@ -899,17 +897,6 @@ public: return false; } - if (target->GetTransport() && target->GetGUIDTransport()) - { - PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_TRANSPORT_EMOTE); - - stmt->setInt32(0, int32(emote)); - stmt->setInt32(1, target->GetTransport()->GetEntry()); - stmt->setInt32(2, target->GetGUIDTransport()); - - WorldDatabase.Execute(stmt); - } - target->SetUInt32Value(UNIT_NPC_EMOTESTATE, emote); return true; @@ -1297,22 +1284,17 @@ public: char* receiver_str = strtok((char*)args, " "); char* text = strtok(NULL, ""); - uint64 guid = handler->GetSession()->GetPlayer()->GetSelection(); - Creature* creature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(guid); - + Creature* creature = handler->getSelectedCreature(); if (!creature || !receiver_str || !text) - { return false; - } - uint64 receiver_guid= atol(receiver_str); + uint64 receiver_guid = atol(receiver_str); // check online security if (handler->HasLowerSecurity(ObjectAccessor::FindPlayer(receiver_guid), 0)) return false; creature->MonsterWhisper(text, receiver_guid); - return true; } @@ -1342,7 +1324,8 @@ public: { if (!*args) return false; - char* charID = strtok((char*)args, " "); + + char* charID = handler->extractKeyFromLink((char*)args, "Hcreature_entry"); if (!charID) return false; diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index fb2d8374c18..1b5d0a80eda 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -580,7 +580,11 @@ public: Map::PlayerList const& players = me->GetMap()->GetPlayers(); if (!players.isEmpty()) - sLFGMgr->FinishDungeon(players.begin()->GetSource()->GetGroup()->GetGUID(), 285); + { + if (Group* group = players.begin()->GetSource()->GetGroup()) + if (group->isLFGGroup()) + sLFGMgr->FinishDungeon(group->GetGUID(), 285); + } } void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp index d8dfa2f5cf6..19024172aa0 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp @@ -196,7 +196,7 @@ public: TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance The Black Morass: Starting event."); InitWorldState(); m_auiEncounter[1] = IN_PROGRESS; - Events.ScheduleEvent(EVENT_NEXT_PORTAL, 15000); + ScheduleEventNextPortal(15000); } if (data == DONE) @@ -228,7 +228,7 @@ public: if (data == SPECIAL) { if (mRiftPortalCount < 7) - Events.ScheduleEvent(EVENT_NEXT_PORTAL, 5000); + ScheduleEventNextPortal(5000); } else m_auiEncounter[1] = data; @@ -336,10 +336,16 @@ public: ++mRiftPortalCount; DoUpdateWorldState(WORLD_STATE_BM_RIFT, mRiftPortalCount); DoSpawnPortal(); - Events.ScheduleEvent(EVENT_NEXT_PORTAL, RiftWaves[GetRiftWaveId()].NextPortalTime); + ScheduleEventNextPortal(RiftWaves[GetRiftWaveId()].NextPortalTime); } } + void ScheduleEventNextPortal(uint32 nextPortalTime) + { + if (nextPortalTime > 0) + Events.RescheduleEvent(EVENT_NEXT_PORTAL, nextPortalTime); + } + protected: EventMap Events; }; diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp index 2f01cc734e6..e0098570923 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp @@ -17,6 +17,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "Player.h" #include "ahnkahet.h" enum Spells @@ -29,11 +30,9 @@ enum Spells SPELL_FLAME_SPHERE_SPAWN_EFFECT = 55891, SPELL_FLAME_SPHERE_VISUAL = 55928, SPELL_FLAME_SPHERE_PERIODIC = 55926, - H_SPELL_FLAME_SPHERE_PERIODIC = 59508, SPELL_FLAME_SPHERE_DEATH_EFFECT = 55947, SPELL_BEAM_VISUAL = 60342, SPELL_EMBRACE_OF_THE_VAMPYR = 55959, - H_SPELL_EMBRACE_OF_THE_VAMPYR = 59513, SPELL_VANISH = 55964, CREATURE_FLAME_SPHERE = 30106, H_CREATURE_FLAME_SPHERE_1 = 31686, @@ -48,8 +47,8 @@ enum Misc DATA_SPHERE_DISTANCE = 15 }; -#define DATA_SPHERE_ANGLE_OFFSET 0.7f -#define DATA_GROUND_POSITION_Z 11.30809f +#define DATA_SPHERE_ANGLE_OFFSET 0.7f +#define DATA_GROUND_POSITION_Z 11.30809f enum Yells { @@ -61,315 +60,299 @@ enum Yells SAY_FEED = 5, SAY_VANISH = 6 }; -enum CombatPhase + +enum Events +{ + EVENT_CASTING_FLAME_SPHERES = 1, + EVENT_JUST_VANISHED, + EVENT_VANISHED, + EVENT_FEEDING, + + EVENT_BLOODTHIRST, + EVENT_FLAME_SPHERE, + EVENT_VANISH +}; + +enum Phase { - NORMAL, - CASTING_FLAME_SPHERES, - JUST_VANISHED, - VANISHED, - FEEDING + PHASE_NORMAL = 1, + PHASE_SPECIAL = 2 }; class boss_taldaram : public CreatureScript { -public: - boss_taldaram() : CreatureScript("boss_taldaram") { } + public: + boss_taldaram() : CreatureScript("boss_taldaram") { } - struct boss_taldaramAI : public ScriptedAI - { - boss_taldaramAI(Creature* creature) : ScriptedAI(creature) + struct boss_taldaramAI : public BossAI { - instance = creature->GetInstanceScript(); - me->SetDisableGravity(true); - } - - uint32 uiBloodthirstTimer; - uint32 uiVanishTimer; - uint32 uiWaitTimer; - uint32 uiEmbraceTimer; - uint32 uiEmbraceTakenDamage; - uint32 uiFlamesphereTimer; - uint32 uiPhaseTimer; + boss_taldaramAI(Creature* creature) : BossAI(creature, DATA_PRINCE_TALDARAM) + { + me->SetDisableGravity(true); + } - uint64 uiEmbraceTarget; + void Reset() OVERRIDE + { + _Reset(); + _embraceTargetGUID = 0; + _embraceTakenDamage = 0; + } - CombatPhase Phase; + void EnterCombat(Unit* /*who*/) OVERRIDE + { + _EnterCombat(); + Talk(SAY_AGGRO); + events.SetPhase(PHASE_NORMAL); + events.ScheduleEvent(EVENT_BLOODTHIRST, 10000); + events.ScheduleEvent(EVENT_VANISH, urand(25000, 35000)); + events.ScheduleEvent(EVENT_FLAME_SPHERE, 5000); + } - InstanceScript* instance; + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; - void Reset() OVERRIDE - { - uiBloodthirstTimer = 10*IN_MILLISECONDS; - uiVanishTimer = urand(25*IN_MILLISECONDS, 35*IN_MILLISECONDS); - uiEmbraceTimer = 20*IN_MILLISECONDS; - uiFlamesphereTimer = 5*IN_MILLISECONDS; - uiEmbraceTakenDamage = 0; - Phase = NORMAL; - uiPhaseTimer = 0; - uiEmbraceTarget = 0; - if (instance) - instance->SetBossState(DATA_PRINCE_TALDARAM, NOT_STARTED); - } + events.Update(diff); - void EnterCombat(Unit* /*who*/) OVERRIDE - { - if (instance) - instance->SetBossState(DATA_PRINCE_TALDARAM, IN_PROGRESS); - Talk(SAY_AGGRO); - } + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - if (uiPhaseTimer <= diff) - { - switch (Phase) + while (uint32 eventId = events.ExecuteEvent()) { - case CASTING_FLAME_SPHERES: + switch (eventId) { - Creature* pSpheres[3]; - - //DoCast(me, SPELL_FLAME_SPHERE_SUMMON_1); - pSpheres[0] = DoSpawnCreature(CREATURE_FLAME_SPHERE, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS); - Unit* pSphereTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); - if (pSphereTarget && pSpheres[0]) - { - float angle, x, y; - angle = pSpheres[0]->GetAngle(pSphereTarget); - x = pSpheres[0]->GetPositionX() + DATA_SPHERE_DISTANCE * std::cos(angle); - y = pSpheres[0]->GetPositionY() + DATA_SPHERE_DISTANCE * std::sin(angle); - pSpheres[0]->GetMotionMaster()->MovePoint(0, x, y, pSpheres[0]->GetPositionZ()); - } - if (IsHeroic()) + if (events.IsInPhase(PHASE_NORMAL)) { - //DoCast(me, H_SPELL_FLAME_SPHERE_SUMMON_1); - pSpheres[1] = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_1, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS); - //DoCast(me, H_SPELL_FLAME_SPHERE_SUMMON_2); - pSpheres[2] = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_2, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS); - if (pSphereTarget && pSpheres[1] && pSpheres[2]) + case EVENT_BLOODTHIRST: + DoCast(me, SPELL_BLOODTHIRST); + events.ScheduleEvent(EVENT_BLOODTHIRST, 10000); + break; + case EVENT_FLAME_SPHERE: + DoCastVictim(SPELL_CONJURE_FLAME_SPHERE); + events.SetPhase(PHASE_SPECIAL); + events.ScheduleEvent(EVENT_CASTING_FLAME_SPHERES, 3000); + events.ScheduleEvent(EVENT_FLAME_SPHERE, 15000); + break; + case EVENT_VANISH: { - float angle, x, y; - angle = pSpheres[1]->GetAngle(pSphereTarget) + DATA_SPHERE_ANGLE_OFFSET; - x = pSpheres[1]->GetPositionX() + DATA_SPHERE_DISTANCE/2 * std::cos(angle); - y = pSpheres[1]->GetPositionY() + DATA_SPHERE_DISTANCE/2 * std::sin(angle); - pSpheres[1]->GetMotionMaster()->MovePoint(0, x, y, pSpheres[1]->GetPositionZ()); - angle = pSpheres[2]->GetAngle(pSphereTarget) - DATA_SPHERE_ANGLE_OFFSET; - x = pSpheres[2]->GetPositionX() + DATA_SPHERE_DISTANCE/2 * std::cos(angle); - y = pSpheres[2]->GetPositionY() + DATA_SPHERE_DISTANCE/2 * std::sin(angle); - pSpheres[2]->GetMotionMaster()->MovePoint(0, x, y, pSpheres[2]->GetPositionZ()); + Map::PlayerList const& players = me->GetMap()->GetPlayers(); + uint32 targets = 0; + for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i) + { + Player* player = i->GetSource(); + if (player && player->IsAlive()) + ++targets; + } + + if (targets > 2) + { + Talk(SAY_VANISH); + DoCast(me, SPELL_VANISH); + events.SetPhase(PHASE_SPECIAL); + events.ScheduleEvent(EVENT_JUST_VANISHED, 500); + if (Unit* embraceTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + _embraceTargetGUID = embraceTarget->GetGUID(); + } + events.ScheduleEvent(EVENT_VANISH, urand(25000, 35000)); + break; } } - - Phase = NORMAL; - uiPhaseTimer = 0; - break; - } - case JUST_VANISHED: - if (Unit* pEmbraceTarget = GetEmbraceTarget()) - { - me->GetMotionMaster()->Clear(); - me->SetSpeed(MOVE_WALK, 2.0f, true); - me->GetMotionMaster()->MoveChase(pEmbraceTarget); - } - Phase = VANISHED; - uiPhaseTimer = 1300; - break; - case VANISHED: - if (Unit* pEmbraceTarget = GetEmbraceTarget()) - DoCast(pEmbraceTarget, DUNGEON_MODE(SPELL_EMBRACE_OF_THE_VAMPYR, H_SPELL_EMBRACE_OF_THE_VAMPYR)); - Talk(SAY_FEED); - me->GetMotionMaster()->Clear(); - me->SetSpeed(MOVE_WALK, 1.0f, true); - me->GetMotionMaster()->MoveChase(me->GetVictim()); - Phase = FEEDING; - uiPhaseTimer = 20*IN_MILLISECONDS; - break; - case FEEDING: - Phase = NORMAL; - uiPhaseTimer = 0; - uiEmbraceTarget = 0; - break; - case NORMAL: - if (uiBloodthirstTimer <= diff) + case EVENT_CASTING_FLAME_SPHERES: { - DoCast(me, SPELL_BLOODTHIRST); - uiBloodthirstTimer = 10*IN_MILLISECONDS; - } else uiBloodthirstTimer -= diff; + events.SetPhase(PHASE_NORMAL); + Unit* sphereTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); + if (!sphereTarget) + break; - if (uiFlamesphereTimer <= diff) - { - // because TARGET_UNIT_TARGET_ENEMY we need a target selected to cast - DoCastVictim(SPELL_CONJURE_FLAME_SPHERE); - Phase = CASTING_FLAME_SPHERES; - uiPhaseTimer = 3*IN_MILLISECONDS + diff; - uiFlamesphereTimer = 15*IN_MILLISECONDS; - } else uiFlamesphereTimer -= diff; - - if (uiVanishTimer <= diff) - { - //Count alive players - Unit* target = NULL; - std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); - std::vector<Unit*> target_list; - for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + float angle, x, y; + + //DoCast(me, SPELL_FLAME_SPHERE_SUMMON_1); + if (Creature* sphere = DoSpawnCreature(CREATURE_FLAME_SPHERE, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10 * IN_MILLISECONDS)) { - target = Unit::GetUnit(*me, (*itr)->getUnitGuid()); - // exclude pets & totems - if (target && target->GetTypeId() == TYPEID_PLAYER && target->IsAlive()) - target_list.push_back(target); - target = NULL; + angle = sphere->GetAngle(sphereTarget); + x = sphere->GetPositionX() + DATA_SPHERE_DISTANCE * std::cos(angle); + y = sphere->GetPositionY() + DATA_SPHERE_DISTANCE * std::sin(angle); + sphere->GetMotionMaster()->MovePoint(0, x, y, sphere->GetPositionZ()); } - //He only vanishes if there are 3 or more alive players - if (target_list.size() > 2) - { - Talk(SAY_VANISH); - DoCast(me, SPELL_VANISH); - Phase = JUST_VANISHED; - uiPhaseTimer = 500; - if (Unit* pEmbraceTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - uiEmbraceTarget = pEmbraceTarget->GetGUID(); + if (IsHeroic()) + { + //DoCast(me, H_SPELL_FLAME_SPHERE_SUMMON_1); + if (Creature* sphere = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_1, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10 * IN_MILLISECONDS)) + { + angle = sphere->GetAngle(sphereTarget) + DATA_SPHERE_ANGLE_OFFSET; + x = sphere->GetPositionX() + DATA_SPHERE_DISTANCE/2 * std::cos(angle); + y = sphere->GetPositionY() + DATA_SPHERE_DISTANCE/2 * std::sin(angle); + sphere->GetMotionMaster()->MovePoint(0, x, y, sphere->GetPositionZ()); + } + + //DoCast(me, H_SPELL_FLAME_SPHERE_SUMMON_2); + if (Creature* sphere = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_2, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10 * IN_MILLISECONDS)) + { + angle = sphere->GetAngle(sphereTarget) - DATA_SPHERE_ANGLE_OFFSET; + x = sphere->GetPositionX() + DATA_SPHERE_DISTANCE/2 * std::cos(angle); + y = sphere->GetPositionY() + DATA_SPHERE_DISTANCE/2 * std::sin(angle); + sphere->GetMotionMaster()->MovePoint(0, x, y, sphere->GetPositionZ()); + } } - uiVanishTimer = urand(25*IN_MILLISECONDS, 35*IN_MILLISECONDS); - } else uiVanishTimer -= diff; - - DoMeleeAttackIfReady(); - break; + break; + } + case EVENT_JUST_VANISHED: + if (Unit* embraceTarget = GetEmbraceTarget()) + { + me->GetMotionMaster()->Clear(); + me->SetSpeed(MOVE_WALK, 2.0f, true); + me->GetMotionMaster()->MoveChase(embraceTarget); + } + events.ScheduleEvent(EVENT_VANISHED, 1300); + break; + case EVENT_VANISHED: + if (Unit* embraceTarget = GetEmbraceTarget()) + DoCast(embraceTarget, SPELL_EMBRACE_OF_THE_VAMPYR); + Talk(SAY_FEED); + me->GetMotionMaster()->Clear(); + me->SetSpeed(MOVE_WALK, 1.0f, true); + me->GetMotionMaster()->MoveChase(me->GetVictim()); + events.ScheduleEvent(EVENT_FEEDING, 20000); + break; + case EVENT_FEEDING: + _embraceTargetGUID = 0; + events.SetPhase(PHASE_NORMAL); + break; + default: + break; + } } - } else uiPhaseTimer -= diff; - } - void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE - { - Unit* pEmbraceTarget = GetEmbraceTarget(); + DoMeleeAttackIfReady(); + } - if (Phase == FEEDING && pEmbraceTarget && pEmbraceTarget->IsAlive()) + void DamageTaken(Unit* /*doneBy*/, uint32& damage) OVERRIDE { - uiEmbraceTakenDamage += damage; - if (uiEmbraceTakenDamage > (uint32) DUNGEON_MODE(DATA_EMBRACE_DMG, H_DATA_EMBRACE_DMG)) - { - Phase = NORMAL; - uiPhaseTimer = 0; - uiEmbraceTarget = 0; - me->CastStop(); - } + Unit* embraceTarget = GetEmbraceTarget(); + + if (events.IsInPhase(PHASE_SPECIAL) && embraceTarget && embraceTarget->IsAlive()) + { + _embraceTakenDamage += damage; + if (_embraceTakenDamage > DUNGEON_MODE<uint32>(DATA_EMBRACE_DMG, H_DATA_EMBRACE_DMG)) + { + _embraceTargetGUID = 0; + events.SetPhase(PHASE_NORMAL); + me->CastStop(); + } + } } - } - void JustDied(Unit* /*killer*/) OVERRIDE - { - Talk(SAY_DEATH); + void JustDied(Unit* /*killer*/) OVERRIDE + { + Talk(SAY_DEATH); + _JustDied(); + } - if (instance) - instance->SetBossState(DATA_PRINCE_TALDARAM, DONE); - } + void KilledUnit(Unit* victim) OVERRIDE + { + if (victim->GetTypeId() != TYPEID_PLAYER) + return; - void KilledUnit(Unit* victim) OVERRIDE - { - if (victim->GetTypeId() != TYPEID_PLAYER) - return; + Unit* embraceTarget = GetEmbraceTarget(); + if (events.IsInPhase(PHASE_SPECIAL) && embraceTarget && victim == embraceTarget) + { + _embraceTargetGUID = 0; + events.SetPhase(PHASE_NORMAL); + } + Talk(SAY_SLAY); + } - Unit* pEmbraceTarget = GetEmbraceTarget(); - if (Phase == FEEDING && pEmbraceTarget && victim == pEmbraceTarget) + bool CheckSpheres() { - Phase = NORMAL; - uiPhaseTimer = 0; - uiEmbraceTarget = 0; - } - Talk(SAY_SLAY); - } + for (uint8 i = 0; i < 2; ++i) + if (!instance->GetData(DATA_SPHERE_1 + i)) + return false; - bool CheckSpheres() - { - for (uint8 i = 0; i < 2; ++i) - if (!instance->GetData(DATA_SPHERE_1 + i)) - return false; + RemovePrison(); + return true; + } - RemovePrison(); - return true; - } + Unit* GetEmbraceTarget() + { + if (_embraceTargetGUID) + return ObjectAccessor::GetUnit(*me, _embraceTargetGUID); - Unit* GetEmbraceTarget() - { - if (!uiEmbraceTarget) return NULL; + } - return Unit::GetUnit(*me, uiEmbraceTarget); - } + void RemovePrison() + { + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->RemoveAurasDueToSpell(SPELL_BEAM_VISUAL); + me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), DATA_GROUND_POSITION_Z, me->GetOrientation()); + DoCast(SPELL_HOVER_FALL); + me->SetDisableGravity(false); + me->GetMotionMaster()->MovePoint(0, me->GetHomePosition()); + Talk(SAY_WARNING); + instance->HandleGameObject(instance->GetData64(DATA_PRINCE_TALDARAM_PLATFORM), true); + } + + private: + uint64 _embraceTargetGUID; + uint32 _embraceTakenDamage; + }; - void RemovePrison() + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - if (!instance) - return; - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->RemoveAurasDueToSpell(SPELL_BEAM_VISUAL); - me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), DATA_GROUND_POSITION_Z, me->GetOrientation()); - DoCast(SPELL_HOVER_FALL); - me->SetDisableGravity(false); - me->GetMotionMaster()->MovePoint(0, me->GetHomePosition()); - Talk(SAY_WARNING); - uint64 prison_GUID = instance->GetData64(DATA_PRINCE_TALDARAM_PLATFORM); - instance->HandleGameObject(prison_GUID, true); + return GetAhnKahetAI<boss_taldaramAI>(creature); } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return GetAhnKahetAI<boss_taldaramAI>(creature); - } }; class npc_taldaram_flamesphere : public CreatureScript { -public: - npc_taldaram_flamesphere() : CreatureScript("npc_taldaram_flamesphere") { } + public: + npc_taldaram_flamesphere() : CreatureScript("npc_taldaram_flamesphere") { } - struct npc_taldaram_flamesphereAI : public ScriptedAI - { - npc_taldaram_flamesphereAI(Creature* creature) : ScriptedAI(creature) + struct npc_taldaram_flamesphereAI : public ScriptedAI { - instance = creature->GetInstanceScript(); - } + npc_taldaram_flamesphereAI(Creature* creature) : ScriptedAI(creature) + { + } - uint32 uiDespawnTimer; - InstanceScript* instance; + void Reset() OVERRIDE + { + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + //! HACK: Creature's can't have MOVEMENTFLAG_FLYING + me->AddUnitMovementFlag(MOVEMENTFLAG_FLYING); + me->setFaction(16); + me->SetObjectScale(1.0f); + DoCast(me, SPELL_FLAME_SPHERE_VISUAL); + DoCast(me, SPELL_FLAME_SPHERE_SPAWN_EFFECT); + DoCast(me, SPELL_FLAME_SPHERE_PERIODIC); + _despawnTimer = 10 * IN_MILLISECONDS; + } - void Reset() OVERRIDE - { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - //! HACK: Creature's can't have MOVEMENTFLAG_FLYING - me->AddUnitMovementFlag(MOVEMENTFLAG_FLYING); - me->setFaction(16); - me->SetObjectScale(1.0f); - DoCast(me, SPELL_FLAME_SPHERE_VISUAL); - DoCast(me, SPELL_FLAME_SPHERE_SPAWN_EFFECT); - DoCast(me, SPELL_FLAME_SPHERE_PERIODIC); - uiDespawnTimer = 10*IN_MILLISECONDS; - } + void EnterCombat(Unit* /*who*/) OVERRIDE { } + void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { } - void EnterCombat(Unit* /*who*/) OVERRIDE {} - void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {} + void JustDied(Unit* /*killer*/) OVERRIDE + { + DoCast(me, SPELL_FLAME_SPHERE_DEATH_EFFECT); + } + void UpdateAI(uint32 diff) OVERRIDE + { + if (_despawnTimer <= diff) + me->DisappearAndDie(); + else + _despawnTimer -= diff; + } - void JustDied(Unit* /*killer*/) OVERRIDE - { - DoCast(me, SPELL_FLAME_SPHERE_DEATH_EFFECT); - } + private: + uint32 _despawnTimer; + }; - void UpdateAI(uint32 diff) OVERRIDE + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - if (uiDespawnTimer <= diff) - me->DisappearAndDie(); - else - uiDespawnTimer -= diff; + return new npc_taldaram_flamesphereAI(creature); } - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_taldaram_flamesphereAI(creature); - } }; class prince_taldaram_sphere : public GameObjectScript @@ -377,7 +360,7 @@ class prince_taldaram_sphere : public GameObjectScript public: prince_taldaram_sphere() : GameObjectScript("prince_taldaram_sphere") { } - bool OnGossipHello(Player* /*player*/, GameObject* go) + bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE { InstanceScript* instance = go->GetInstanceScript(); if (!instance) diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp index 987807c2080..04145b8784e 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp @@ -181,7 +181,7 @@ enum Events EVENT_ESCAPE_13, EVENT_ESCAPE_14, EVENT_ESCAPE_15, - EVENT_ESCAPE_16, + //EVENT_ESCAPE_16, EVENT_ESCAPE_17, EVENT_ESCAPE_18, EVENT_ESCAPE_19, @@ -226,7 +226,7 @@ enum Spells SPELL_SOUL_REAPER = 69409, // Lich King Soul Reaper SPELL_FURY_OF_FROSTMOURNE = 70063, // Lich King Fury of FrostMourne SPELL_JAINA_DESTROY_ICE_WALL = 69784, // Jaina - SPELL_SYLVANAS_DESTROY_ICE_WALL = 70225, // Sylvanas + SPELL_SYLVANAS_DESTROY_ICE_WALL = 70224, // Sylvanas SPELL_SYLVANAS_JUMP = 68339, // Sylvanas Jump SPELL_RAISE_DEAD = 69818, SPELL_HARVEST_SOUL = 70070, @@ -234,16 +234,16 @@ enum Spells SPELL_SUMMON_LUMBERING_ABOMINATION = 69835, SPELL_SUMMON_ICE_WALL = 69768, // Visual effect and icewall summoning - //Raging gnoul + // Raging Ghoul SPELL_EMERGE_VISUAL = 50142, SPELL_GHOUL_JUMP = 70150, - //Witch Doctor + // Witch Doctor SPELL_COURSE_OF_DOOM = 70144, SPELL_SHADOW_BOLT_VOLLEY = 70145, SPELL_SHADOW_BOLT = 70080, - //Lumbering Abomination + // Lumbering Abomination SPELL_ABON_STRIKE = 40505, SPELL_VOMIT_SPRAY = 70176, }; @@ -344,6 +344,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript void UpdateAI(uint32 diff) OVERRIDE { _events.Update(diff); + switch (_events.ExecuteEvent()) { case EVENT_WALK_INTRO1: @@ -398,7 +399,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_A2_5, 2000); break; case EVENT_INTRO_A2_5: - if (Creature* uther = me->GetCreature(*me, _utherGUID)) + if (Creature* uther = ObjectAccessor::GetCreature(*me, _utherGUID)) uther->AI()->Talk(SAY_UTHER_INTRO_A2_1); _events.ScheduleEvent(EVENT_INTRO_A2_6, 3000); break; @@ -407,7 +408,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_A2_7, 7000); break; case EVENT_INTRO_A2_7: - if (Creature* uther = me->GetCreature(*me, _utherGUID)) + if (Creature* uther = ObjectAccessor::GetCreature(*me, _utherGUID)) uther->AI()->Talk(SAY_UTHER_INTRO_A2_2); _events.ScheduleEvent(EVENT_INTRO_A2_8, 7000); break; @@ -416,7 +417,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_A2_9, 1200); break; case EVENT_INTRO_A2_9: - if (Creature* uther = me->GetCreature(*me, _utherGUID)) + if (Creature* uther = ObjectAccessor::GetCreature(*me, _utherGUID)) uther->AI()->Talk(SAY_UTHER_INTRO_A2_3); _events.ScheduleEvent(EVENT_INTRO_A2_10, 11000); break; @@ -425,7 +426,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_A2_11, 6000); break; case EVENT_INTRO_A2_11: - if (Creature* uther = me->GetCreature(*me, _utherGUID)) + if (Creature* uther = ObjectAccessor::GetCreature(*me, _utherGUID)) uther->AI()->Talk(SAY_UTHER_INTRO_A2_4); _events.ScheduleEvent(EVENT_INTRO_A2_12, 12000); break; @@ -434,7 +435,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_A2_13, 6000); break; case EVENT_INTRO_A2_13: - if (Creature* uther = me->GetCreature(*me, _utherGUID)) + if (Creature* uther = ObjectAccessor::GetCreature(*me, _utherGUID)) uther->AI()->Talk(SAY_UTHER_INTRO_A2_5); _events.ScheduleEvent(EVENT_INTRO_A2_14, 13000); break; @@ -443,12 +444,12 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_A2_15, 12000); break; case EVENT_INTRO_A2_15: - if (Creature* uther = me->GetCreature(*me, _utherGUID)) + if (Creature* uther = ObjectAccessor::GetCreature(*me, _utherGUID)) uther->AI()->Talk(SAY_UTHER_INTRO_A2_6); _events.ScheduleEvent(EVENT_INTRO_A2_16, 25000); break; case EVENT_INTRO_A2_16: - if (Creature* uther = me->GetCreature(*me, _utherGUID)) + if (Creature* uther = ObjectAccessor::GetCreature(*me, _utherGUID)) uther->AI()->Talk(SAY_UTHER_INTRO_A2_7); _events.ScheduleEvent(EVENT_INTRO_A2_17, 6000); break; @@ -457,7 +458,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_A2_18, 5000); break; case EVENT_INTRO_A2_18: - if (Creature* uther = me->GetCreature(*me, _utherGUID)) + if (Creature* uther = ObjectAccessor::GetCreature(*me, _utherGUID)) { uther->HandleEmoteCommand(EMOTE_ONESHOT_NO); uther->AI()->Talk(SAY_UTHER_INTRO_A2_8); @@ -494,7 +495,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_H2_5, 2000); break; case EVENT_INTRO_H2_5: - if (Creature* uther = me->GetCreature(*me, _utherGUID)) + if (Creature* uther = ObjectAccessor::GetCreature(*me, _utherGUID)) uther->AI()->Talk(SAY_UTHER_INTRO_H2_1); _events.ScheduleEvent(EVENT_INTRO_H2_6, 11000); break; @@ -503,7 +504,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_H2_7, 3000); break; case EVENT_INTRO_H2_7: - if (Creature* uther = me->GetCreature(*me, _utherGUID)) + if (Creature* uther = ObjectAccessor::GetCreature(*me, _utherGUID)) uther->AI()->Talk(SAY_UTHER_INTRO_H2_2); _events.ScheduleEvent(EVENT_INTRO_H2_8, 6000); break; @@ -512,7 +513,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_H2_9, 5000); break; case EVENT_INTRO_H2_9: - if (Creature* uther = me->GetCreature(*me, _utherGUID)) + if (Creature* uther = ObjectAccessor::GetCreature(*me, _utherGUID)) uther->AI()->Talk(SAY_UTHER_INTRO_H2_3); _events.ScheduleEvent(EVENT_INTRO_H2_10, 19000); break; @@ -521,7 +522,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_H2_11, 1500); break; case EVENT_INTRO_H2_11: - if (Creature* uther = me->GetCreature(*me, _utherGUID)) + if (Creature* uther = ObjectAccessor::GetCreature(*me, _utherGUID)) uther->AI()->Talk(SAY_UTHER_INTRO_H2_4); _events.ScheduleEvent(EVENT_INTRO_H2_12, 19500); break; @@ -530,7 +531,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_H2_13, 2000); break; case EVENT_INTRO_H2_13: - if (Creature* uther = me->GetCreature(*me, _utherGUID)) + if (Creature* uther = ObjectAccessor::GetCreature(*me, _utherGUID)) { uther->HandleEmoteCommand(EMOTE_ONESHOT_NO); uther->AI()->Talk(SAY_UTHER_INTRO_H2_5); @@ -538,7 +539,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_H2_14, 12000); break; case EVENT_INTRO_H2_14: - if (Creature* uther = me->GetCreature(*me, _utherGUID)) + if (Creature* uther = ObjectAccessor::GetCreature(*me, _utherGUID)) uther->AI()->Talk(SAY_UTHER_INTRO_H2_6); _events.ScheduleEvent(EVENT_INTRO_H2_15, 8000); break; @@ -557,7 +558,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_OPEN_FROSTWORN_DOOR, 0); _events.ScheduleEvent(EVENT_CLOSE_FROSTWORN_DOOR, 4000); } - if (Creature* uther = me->GetCreature(*me, _utherGUID)) + if (Creature* uther = ObjectAccessor::GetCreature(*me, _utherGUID)) { uther->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_COWER); if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) @@ -568,13 +569,13 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_LK_2, 10000); break; case EVENT_INTRO_LK_2: - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) lichking->AI()->Talk(SAY_LK_INTRO_1); _events.ScheduleEvent(EVENT_INTRO_LK_3, 1000); break; case EVENT_INTRO_LK_3: // The Lich King banishes Uther to the abyss. - if (Creature* uther = me->GetCreature(*me, _utherGUID)) + if (Creature* uther = ObjectAccessor::GetCreature(*me, _utherGUID)) { uther->CastSpell(uther, SPELL_UTHER_DESPAWN, true); uther->DespawnOrUnsummon(5000); @@ -584,7 +585,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript break; case EVENT_INTRO_LK_4: // He steps forward and removes the runeblade from the heap of skulls. - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) { if (GameObject* frostmourne = ObjectAccessor::GetGameObject(*me, _instance->GetData64(DATA_FROSTMOURNE))) frostmourne->SetPhaseMask(2, true); @@ -594,7 +595,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_LK_5, 8000); break; case EVENT_INTRO_LK_5: - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) lichking->AI()->Talk(SAY_LK_INTRO_2); _events.ScheduleEvent(EVENT_INTRO_LK_6, 10000); break; @@ -610,7 +611,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript marwyn->CastSpell(marwyn, SPELL_BOSS_SPAWN_AURA, true); marwyn->SetVisible(true); } - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) { lichking->AI()->Talk(SAY_LK_INTRO_3); lichking->SetWalk(true); @@ -653,7 +654,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript _events.ScheduleEvent(EVENT_INTRO_LK_11, 5000); break; case EVENT_INTRO_LK_11: - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) { if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) lichking->AI()->Talk(SAY_LK_JAINA_INTRO_END); @@ -666,7 +667,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript if (_instance) _instance->SetData(DATA_INTRO_EVENT, DONE); // Loralen or Koreln disappearAndDie() - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) { lichking->DespawnOrUnsummon(5000); _lichkingGUID = 0; @@ -702,7 +703,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_jaina_or_sylvanas_horAI(creature); + return GetHallsOfReflectionAI<npc_jaina_or_sylvanas_horAI>(creature); } }; @@ -716,9 +717,8 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript { npc_jaina_or_sylvanas_escape_horAI(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()), _lichkingGUID(0), _walltargetGUID(0), - _icewallGUID(0), _icewall(0), _isattackingwall(0) + _icewallGUID(0), _icewall(0) { - _instance = me->GetInstanceScript(); } InstanceScript* _instance; @@ -726,33 +726,29 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript uint64 _walltargetGUID; // dummy uint64 _icewallGUID; // object uint32 _icewall; // icewall number - uint32 _isattackingwall; //sylvannas attacking icewall EventMap _events; - void Reset() OVERRIDE { _events.Reset(); - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) lichking->DespawnOrUnsummon(1); _lichkingGUID = 0; _walltargetGUID = 0; _icewallGUID = 0; _icewall = 0; - _isattackingwall = false; _events.ScheduleEvent(EVENT_ESCAPE, 0); } void JustDied(Unit* /*Killer*/) OVERRIDE { - if (_instance) _instance->SetData(DATA_ESCAPE_EVENT, FAIL); } - void DoAction(int32 actionID) OVERRIDE + void DoAction(int32 actionId) OVERRIDE { - switch (actionID) + switch (actionId) { case ACTION_START_ESCAPING: // called by InstanceScript when we need to start the escaping event _events.ScheduleEvent(EVENT_ESCAPE_1, 1000); @@ -760,10 +756,9 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript case ACTION_WALL_BROKEN: _icewall++; if (_icewall != 4) - _events.ScheduleEvent(EVENT_ESCAPE_17,3000); + _events.ScheduleEvent(EVENT_ESCAPE_17, 3000); else - _events.ScheduleEvent(EVENT_ESCAPE_23,3000); - _isattackingwall = false; + _events.ScheduleEvent(EVENT_ESCAPE_23, 3000); break; } } @@ -781,6 +776,19 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript } } + void DestroyIceWall() + { + if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) + me->RemoveAurasDueToSpell(SPELL_JAINA_DESTROY_ICE_WALL); + else + me->RemoveAurasDueToSpell(SPELL_SYLVANAS_DESTROY_ICE_WALL); + + _instance->HandleGameObject(_icewallGUID, true); + + if (Creature* wallTarget = ObjectAccessor::GetCreature(*me, _walltargetGUID)) + wallTarget->DespawnOrUnsummon(); + } + void UpdateAI(uint32 diff) OVERRIDE { _events.Update(diff); @@ -792,21 +800,21 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript case EVENT_ESCAPE: if (Creature* lichking = me->SummonCreature(NPC_LICH_KING_PART2, LichKingSpawnPos2, TEMPSUMMON_MANUAL_DESPAWN)) { - me->Attack(lichking,true); - lichking->Attack(me,true); + me->Attack(lichking, true); + lichking->Attack(me, true); me->SetReactState(REACT_PASSIVE); lichking->SetReactState(REACT_PASSIVE); _lichkingGUID = lichking->GetGUID(); if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) - me->AI()->DoCast(me, SPELL_JAINA_ICEBARRIER); + DoCast(me, SPELL_JAINA_ICEBARRIER); else - me->AI()->DoCast(me, SPELL_SYLVANAS_CLOAKOFDARKNESS); + DoCast(me, SPELL_SYLVANAS_CLOAKOFDARKNESS); } me->SetHealth(252000); break; case EVENT_ESCAPE_1: _instance->SetData(DATA_ESCAPE_EVENT, IN_PROGRESS); - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) { if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) lichking->AI()->Talk(SAY_LK_ESCAPE_1); @@ -817,30 +825,27 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript break; case EVENT_ESCAPE_2: if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) - me->AI()->DoCast(me,SPELL_CAST_VISUAL,true); + DoCast(me, SPELL_CAST_VISUAL, true); else - me->AI()->DoCast(me,SPELL_SYLVANAS_JUMP,true); + DoCast(me, SPELL_SYLVANAS_JUMP, true); _events.ScheduleEvent(EVENT_ESCAPE_3, 1000); break; case EVENT_ESCAPE_3: - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) - { - if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) - lichking->AI()->DoCast(lichking, SPELL_JAINA_ICEPRISON, true); - else - lichking->AI()->DoCast(lichking, SPELL_SYLVANAS_DARKBINDING, true); - } + if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) + DoCastAOE(SPELL_JAINA_ICEPRISON, true); + else + DoCastAOE(SPELL_SYLVANAS_DARKBINDING, true); _events.ScheduleEvent(EVENT_ESCAPE_4, 2000); break; case EVENT_ESCAPE_4: if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) - me->AI()->Talk(SAY_JAINA_ESCAPE_1); + Talk(SAY_JAINA_ESCAPE_1); else - me->AI()->Talk(SAY_SYLVANAS_ESCAPE_1); + Talk(SAY_SYLVANAS_ESCAPE_1); _events.ScheduleEvent(EVENT_ESCAPE_5, 2000); break; case EVENT_ESCAPE_5: - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) lichking->CombatStop(); me->GetMotionMaster()->MovePoint(0, JainaShadowThroneDoor); if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) @@ -853,7 +858,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP|UNIT_NPC_FLAG_QUESTGIVER); break; case EVENT_ESCAPE_7: - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) { if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) lichking->RemoveAurasDueToSpell(SPELL_JAINA_ICEPRISON); @@ -863,13 +868,13 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript _events.ScheduleEvent(EVENT_ESCAPE_8, 1000); break; case EVENT_ESCAPE_8: - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) lichking->HandleEmoteCommand(TEXT_EMOTE_ROAR); me->GetMotionMaster()->MovePoint(0, NpcJainaOrSylvanasEscapeRoute[0]); _events.ScheduleEvent(EVENT_ESCAPE_9, 3000); break; case EVENT_ESCAPE_9: - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) lichking->GetMotionMaster()->MovePoint(0, NpcJainaOrSylvanasEscapeRoute[0]); _events.ScheduleEvent(EVENT_ESCAPE_10, 1000); break; @@ -879,39 +884,39 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript break; case EVENT_ESCAPE_11: me->GetMotionMaster()->MovePoint(0, NpcJainaOrSylvanasEscapeRoute[2]); - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) lichking->GetMotionMaster()->MovePoint(0, LichKingFirstSummon); _events.ScheduleEvent(EVENT_ESCAPE_12, 6000); break; case EVENT_ESCAPE_12: - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) { lichking->AI()->Talk(SAY_LK_ESCAPE_3); lichking->AI()->DoCast(me, SPELL_RAISE_DEAD); - lichking->Attack(me,true); + lichking->Attack(me, true); } _events.ScheduleEvent(EVENT_ESCAPE_13, 4000); break; case EVENT_ESCAPE_13: - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) { lichking->AI()->DoCast(lichking, SPELL_REMORSELESS_WINTER, true); lichking->AI()->DoCast(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR); lichking->GetMotionMaster()->MoveIdle(); lichking->GetMotionMaster()->MoveChase(me); } - if (Creature* walltarget = me->SummonCreature(NPC_ICE_WALL,IceWalls[0].GetPositionX(), IceWalls[0].GetPositionY(), IceWalls[0].GetPositionZ(), IceWalls[0].GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN, 720000)) + if (Creature* walltarget = me->SummonCreature(NPC_ICE_WALL, IceWalls[0], TEMPSUMMON_MANUAL_DESPAWN, 720000)) { _walltargetGUID = walltarget->GetGUID(); walltarget->AI()->DoCast(walltarget, SPELL_SUMMON_ICE_WALL); walltarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); - me->Attack(walltarget,false); + me->Attack(walltarget, false); } me->GetMotionMaster()->MovePoint(0, NpcJainaOrSylvanasEscapeRoute[3]); _events.ScheduleEvent(EVENT_ESCAPE_14, 8000); break; case EVENT_ESCAPE_14: - if (Creature* walltarget = me->GetCreature(*me, _walltargetGUID)) + if (Creature* walltarget = ObjectAccessor::GetCreature(*me, _walltargetGUID)) { if (GameObject* icewall = walltarget->FindNearestGameObject(GO_ICE_WALL, 50.00f)) { @@ -919,61 +924,42 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript icewall->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND); _instance->HandleGameObject(0, false, icewall); if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) - me->AI()->Talk(SAY_JAINA_ESCAPE_2); + Talk(SAY_JAINA_ESCAPE_2); else - me->AI()->Talk(SAY_SYLVANAS_ESCAPE_2); + Talk(SAY_SYLVANAS_ESCAPE_2); } } _events.ScheduleEvent(EVENT_ESCAPE_15, 1000); break; case EVENT_ESCAPE_15: - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) { lichking->GetMotionMaster()->MoveIdle(); lichking->GetMotionMaster()->MoveChase(me); lichking->SetReactState(REACT_PASSIVE); } if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) - me->AI()->DoCast(me, SPELL_JAINA_DESTROY_ICE_WALL, false); + DoCast(me, SPELL_JAINA_DESTROY_ICE_WALL, true); else - { - _isattackingwall = true; - me->AI()->DoCast(me, SPELL_SYLVANAS_DESTROY_ICE_WALL, false); - _events.ScheduleEvent(EVENT_ESCAPE_16, 1000); - } - break; - case EVENT_ESCAPE_16: - if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE) - { - me->AI()->DoCast(me, SPELL_SYLVANAS_DESTROY_ICE_WALL, false); - if (_isattackingwall) - _events.ScheduleEvent(EVENT_ESCAPE_16, 1000); - } + DoCast(me, SPELL_SYLVANAS_DESTROY_ICE_WALL, true); break; case EVENT_ESCAPE_17:// ICEWALL BROKEN me->GetMotionMaster()->MoveIdle(); - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) { lichking->StopMoving(); lichking->AI()->Talk(SAY_LK_ESCAPE_3); lichking->AI()->DoCast(me, SPELL_RAISE_DEAD); } - if (Creature* walltarget = me->GetCreature(*me, _walltargetGUID)) - walltarget->DespawnOrUnsummon(0); - if (GameObject* icewall = ObjectAccessor::GetGameObject(*me, _icewallGUID)) - { - _instance->HandleGameObject(0 ,true, icewall); - if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) - me->RemoveAurasDueToSpell(SPELL_JAINA_DESTROY_ICE_WALL); - else - me->RemoveAurasDueToSpell(SPELL_SYLVANAS_DESTROY_ICE_WALL); - } + + DestroyIceWall(); + if (_icewall && _icewall < 4) me->GetMotionMaster()->MovePoint(0, NpcJainaOrSylvanasEscapeRoute[_icewall + 3]); _events.ScheduleEvent(EVENT_ESCAPE_18, 2000); break; case EVENT_ESCAPE_18: - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) { lichking->GetMotionMaster()->MoveIdle(); lichking->GetMotionMaster()->MoveChase(me); @@ -981,29 +967,29 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript _events.ScheduleEvent(EVENT_ESCAPE_19, 6000); break; case EVENT_ESCAPE_19: - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) { if (_icewall && _icewall < 4) lichking->AI()->DoCast(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR); lichking->GetMotionMaster()->MoveIdle(); lichking->GetMotionMaster()->MoveChase(me); lichking->SetReactState(REACT_PASSIVE); - lichking->Attack(me,true); + lichking->Attack(me, true); } if (_icewall < 4) { - if (Creature* walltarget = me->SummonCreature(NPC_ICE_WALL, IceWalls[_icewall].GetPositionX(), IceWalls[_icewall].GetPositionY(), IceWalls[_icewall].GetPositionZ(), IceWalls[_icewall].GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN, 720000)) + if (Creature* walltarget = me->SummonCreature(NPC_ICE_WALL, IceWalls[_icewall], TEMPSUMMON_MANUAL_DESPAWN, 720000)) { _walltargetGUID = walltarget->GetGUID(); walltarget->AI()->DoCast(walltarget, SPELL_SUMMON_ICE_WALL); walltarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); - me->Attack(walltarget,false); + me->Attack(walltarget, false); } } _events.ScheduleEvent(EVENT_ESCAPE_20, 3000); break; case EVENT_ESCAPE_20: - if (Creature* walltarget = me->GetCreature(*me, _walltargetGUID)) + if (Creature* walltarget = ObjectAccessor::GetCreature(*me, _walltargetGUID)) { if (GameObject* icewall = walltarget->FindNearestGameObject(GO_ICE_WALL, 50.00f)) { @@ -1013,24 +999,24 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) { if (_icewall == 1) - me->AI()->Talk(SAY_JAINA_ESCAPE_3); + Talk(SAY_JAINA_ESCAPE_3); else if (_icewall == 2) - me->AI()->Talk(SAY_JAINA_ESCAPE_4); + Talk(SAY_JAINA_ESCAPE_4); else if (_icewall == 3) - me->AI()->Talk(SAY_JAINA_ESCAPE_5); + Talk(SAY_JAINA_ESCAPE_5); } else if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE) { if (_icewall == 1) - me->AI()->Talk(SAY_SYLVANAS_ESCAPE_3); + Talk(SAY_SYLVANAS_ESCAPE_3); else if (_icewall == 2) - me->AI()->Talk(SAY_SYLVANAS_ESCAPE_4); + Talk(SAY_SYLVANAS_ESCAPE_4); else if (_icewall == 3) - me->AI()->Talk(SAY_SYLVANAS_ESCAPE_5); + Talk(SAY_SYLVANAS_ESCAPE_5); } } } - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) { if (_icewall && _icewall < 3) lichking->AI()->DoCast(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR); @@ -1044,53 +1030,37 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript break; case EVENT_ESCAPE_21: if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) - me->AI()->DoCast(me, SPELL_JAINA_DESTROY_ICE_WALL, false); + DoCast(me, SPELL_JAINA_DESTROY_ICE_WALL, true); else - { - me->AI()->DoCast(me, SPELL_SYLVANAS_DESTROY_ICE_WALL, false); - _isattackingwall = true; - _events.ScheduleEvent(EVENT_ESCAPE_22, 1000); - } - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + DoCast(me, SPELL_SYLVANAS_DESTROY_ICE_WALL, true); + + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) { if (_icewall == 1) lichking->AI()->DoCast(lichking, SPELL_SUMMON_LUMBERING_ABOMINATION); else if (_icewall > 1 && _icewall < 4) + { lichking->AI()->DoCast(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR); + _events.ScheduleEvent(EVENT_ESCAPE_22, 1000); + } } break; case EVENT_ESCAPE_22: - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) { if (_icewall >= 2 && _icewall < 4) lichking->AI()->DoCast(lichking, SPELL_SUMMON_LUMBERING_ABOMINATION); } - if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE) - { - me->AI()->DoCast(me, SPELL_SYLVANAS_DESTROY_ICE_WALL, false); - if (_isattackingwall) - _events.ScheduleEvent(EVENT_ESCAPE_22, 1000); - } break; + case EVENT_ESCAPE_23: // FINAL PART + DestroyIceWall(); - case EVENT_ESCAPE_23:// FINAL PART - if (Creature* walltarget = me->GetCreature(*me, _walltargetGUID)) - walltarget->DespawnOrUnsummon(0); - if (GameObject* icewall = ObjectAccessor::GetGameObject(*me, _icewallGUID)) - { - _instance->HandleGameObject(0 ,true, icewall); - if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) - { - me->RemoveAurasDueToSpell(SPELL_JAINA_DESTROY_ICE_WALL); - me->AI()->Talk(SAY_JAINA_ESCAPE_6); - } - else - { - me->RemoveAurasDueToSpell(SPELL_SYLVANAS_DESTROY_ICE_WALL); - me->AI()->Talk(SAY_SYLVANAS_ESCAPE_6); - } - } - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) + Talk(SAY_JAINA_ESCAPE_6); + else + Talk(SAY_SYLVANAS_ESCAPE_6); + + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) { lichking->GetMotionMaster()->MovePoint(0, LichKingFinalPos); lichking->AI()->Talk(SAY_LK_ESCAPE_11); @@ -1100,21 +1070,21 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript break; case EVENT_ESCAPE_24: if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) - me->AI()->Talk(SAY_JAINA_ESCAPE_8); + Talk(SAY_JAINA_ESCAPE_8); else - me->AI()->Talk(SAY_SYLVANAS_ESCAPE_8); + Talk(SAY_SYLVANAS_ESCAPE_8); _events.ScheduleEvent(EVENT_ESCAPE_25, 5000); break; case EVENT_ESCAPE_25: - if (GameObject* cave = _instance->instance->GetGameObject(_instance->GetData64(DATA_CAVE_IN))) - cave->SetGoState(GO_STATE_READY); + if (GameObject* cave = ObjectAccessor::GetGameObject(*me, _instance->GetData64(DATA_CAVE_IN))) + cave->SetGoState(GO_STATE_READY); _events.ScheduleEvent(EVENT_ESCAPE_26, 4000); break; case EVENT_ESCAPE_26: if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE) - me->AI()->Talk(SAY_JAINA_ESCAPE_10); + Talk(SAY_JAINA_ESCAPE_10); else - me->AI()->Talk(SAY_SYLVANAS_ESCAPE_9); + Talk(SAY_SYLVANAS_ESCAPE_9); _events.ScheduleEvent(EVENT_ESCAPE_27, 4000); break; case EVENT_ESCAPE_27: @@ -1123,7 +1093,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript else me->SummonGameObject(GO_CAPTAIN_CHEST_3, ChestPos.GetPositionX(), ChestPos.GetPositionY(), ChestPos.GetPositionZ(), ChestPos.GetOrientation(), 0, 0, 0, 0, 720000); me->SummonGameObject(GO_PORTAL, FinalPortalPos.GetPositionX(), FinalPortalPos.GetPositionY(), FinalPortalPos.GetPositionZ(), FinalPortalPos.GetOrientation(), 0, 0, 0, 0, 720000); - if (Creature* lichking = me->GetCreature(*me, _lichkingGUID)) + if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID)) lichking->DespawnOrUnsummon(1); break; } @@ -1133,7 +1103,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_jaina_or_sylvanas_escape_horAI(creature); + return GetHallsOfReflectionAI<npc_jaina_or_sylvanas_escape_horAI>(creature); } }; diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h index 3223ecf66a5..d8d4f2d5524 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h @@ -175,4 +175,10 @@ struct boss_horAI : ScriptedAI } }; +template<class AI> +AI* GetHallsOfReflectionAI(Creature* creature) +{ + return GetInstanceAI<AI>(creature, HoRScriptName); +} + #endif diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp index 532ede3f849..3a2d5c592fe 100644 --- a/src/server/scripts/Northrend/zone_zuldrak.cpp +++ b/src/server/scripts/Northrend/zone_zuldrak.cpp @@ -1815,7 +1815,7 @@ class spell_fetch_ingredient_aura : public SpellScriptLoader } }; -enum StormCloud +enum StormCloud { STORM_COULD = 29939, HEALING_WINDS = 55549, @@ -1842,7 +1842,7 @@ public: { Reset(); } - + void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE { if (spell->Id != GYMERS_GRAB) diff --git a/src/server/shared/Database/Implementation/WorldDatabase.cpp b/src/server/shared/Database/Implementation/WorldDatabase.cpp index 41280471bd4..f27ee2b72e0 100644 --- a/src/server/shared/Database/Implementation/WorldDatabase.cpp +++ b/src/server/shared/Database/Implementation/WorldDatabase.cpp @@ -75,8 +75,6 @@ void WorldDatabaseConnection::DoPrepareStatements() PrepareStatement(WORLD_UPD_WAYPOINT_SCRIPT_O, "UPDATE waypoint_scripts SET o = ? WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(WORLD_SEL_WAYPOINT_SCRIPT_ID_BY_GUID, "SELECT id FROM waypoint_scripts WHERE guid = ?", CONNECTION_SYNCH); PrepareStatement(WORLD_DEL_CREATURE, "DELETE FROM creature WHERE guid = ?", CONNECTION_ASYNC); - PrepareStatement(WORLD_INS_CREATURE_TRANSPORT, "INSERT INTO creature_transport (guid, npc_entry, transport_entry, TransOffsetX, TransOffsetY, TransOffsetZ, TransOffsetO) values (?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); - PrepareStatement(WORLD_UPD_CREATURE_TRANSPORT_EMOTE, "UPDATE creature_transport SET emote = ? WHERE transport_entry = ? AND guid = ?", CONNECTION_ASYNC); PrepareStatement(WORLD_SEL_COMMANDS, "SELECT name, permission, help FROM command", CONNECTION_SYNCH); PrepareStatement(WORLD_SEL_CREATURE_TEMPLATE, "SELECT difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, modelid4, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, faction_A, faction_H, npcflag, speed_walk, speed_run, scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, unit_flags2, dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, type, type_flags, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, HoverHeight, Health_mod, Mana_mod, Armor_mod, RacialLeader, questItem1, questItem2, questItem3, questItem4, questItem5, questItem6, movementId, RegenHealth, mechanic_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = ?", CONNECTION_SYNCH); PrepareStatement(WORLD_SEL_WAYPOINT_SCRIPT_BY_ID, "SELECT guid, delay, command, datalong, datalong2, dataint, x, y, z, o FROM waypoint_scripts WHERE id = ?", CONNECTION_SYNCH); diff --git a/src/server/shared/Database/Implementation/WorldDatabase.h b/src/server/shared/Database/Implementation/WorldDatabase.h index 171627bb83a..b17aa0dedbb 100644 --- a/src/server/shared/Database/Implementation/WorldDatabase.h +++ b/src/server/shared/Database/Implementation/WorldDatabase.h @@ -95,8 +95,6 @@ enum WorldDatabaseStatements WORLD_UPD_WAYPOINT_SCRIPT_O, WORLD_SEL_WAYPOINT_SCRIPT_ID_BY_GUID, WORLD_DEL_CREATURE, - WORLD_INS_CREATURE_TRANSPORT, - WORLD_UPD_CREATURE_TRANSPORT_EMOTE, WORLD_SEL_COMMANDS, WORLD_SEL_CREATURE_TEMPLATE, WORLD_SEL_WAYPOINT_SCRIPT_BY_ID, diff --git a/src/tools/mesh_extractor/ContinentBuilder.cpp b/src/tools/mesh_extractor/ContinentBuilder.cpp index be74357d1f0..c90a6e527f7 100644 --- a/src/tools/mesh_extractor/ContinentBuilder.cpp +++ b/src/tools/mesh_extractor/ContinentBuilder.cpp @@ -153,9 +153,9 @@ void ContinentBuilder::Build() } else { - params.maxPolys = 1 << STATIC_POLY_BITS; - params.maxTiles = TileMap->TileTable.size(); - rcVcopy(params.orig, bmin); + params.maxPolys = 32768; + params.maxTiles = 4096; + rcVcopy(params.orig, Constants::Origin); params.tileHeight = Constants::TileSize; params.tileWidth = Constants::TileSize; fwrite(¶ms, sizeof(dtNavMeshParams), 1, mmap); diff --git a/src/tools/mesh_extractor/Geometry.cpp b/src/tools/mesh_extractor/Geometry.cpp index 658c312a6e8..df828dcd573 100644 --- a/src/tools/mesh_extractor/Geometry.cpp +++ b/src/tools/mesh_extractor/Geometry.cpp @@ -17,7 +17,7 @@ void Geometry::CalculateBoundingBox( float*& min, float*& max ) max = new float[3]; for (int i = 0; i < 3; ++i) { - max[i] = std::numeric_limits<float>::min(); + max[i] = std::numeric_limits<float>::lowest(); min[i] = std::numeric_limits<float>::max(); } @@ -43,7 +43,7 @@ void Geometry::CalculateBoundingBox( float*& min, float*& max ) void Geometry::CalculateMinMaxHeight( float& min, float& max ) { min = std::numeric_limits<float>::max(); - max = std::numeric_limits<float>::min(); + max = std::numeric_limits<float>::lowest(); for (std::vector<Vector3>::iterator itr = Vertices.begin(); itr != Vertices.end(); ++itr) { diff --git a/src/tools/mesh_extractor/MPQ.h b/src/tools/mesh_extractor/MPQ.h index 2f8b082f526..30e11741550 100644 --- a/src/tools/mesh_extractor/MPQ.h +++ b/src/tools/mesh_extractor/MPQ.h @@ -26,7 +26,8 @@ public: libmpq__off_t size, transferred; libmpq__file_unpacked_size(mpq_a, filenum, &size); - char *buffer = new char[size]; + char* buffer = new char[size + 1]; + buffer[size] = '\0'; libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred); diff --git a/src/tools/mesh_extractor/MPQManager.cpp b/src/tools/mesh_extractor/MPQManager.cpp index e1ce4b92bf9..4d3ab808a2e 100644 --- a/src/tools/mesh_extractor/MPQManager.cpp +++ b/src/tools/mesh_extractor/MPQManager.cpp @@ -109,5 +109,7 @@ FILE* MPQManager::GetFileFrom(const std::string& path, MPQArchive* file ) exit(1); } fwrite(buffer, sizeof(uint8), size, ret); + fseek(ret, 0, SEEK_SET); + delete[] buffer; return ret; } diff --git a/src/tools/mesh_extractor/MeshExtractor.cpp b/src/tools/mesh_extractor/MeshExtractor.cpp index 3443b3d9e0a..0d9160a610b 100644 --- a/src/tools/mesh_extractor/MeshExtractor.cpp +++ b/src/tools/mesh_extractor/MeshExtractor.cpp @@ -76,7 +76,7 @@ void ExtractDBCs() std::string component = "component.wow-" + std::string(MPQManager::Languages[*itr]) + ".txt"; // Extract the component file - Utils::SaveToDisk(MPQHandler->GetFile(component), path + component); + Utils::SaveToDisk(MPQHandler->GetFileFrom(component, MPQHandler->LocaleFiles[*itr]), path + component); // Extract the DBC files for the given locale for (std::set<std::string>::iterator itr2 = DBCFiles.begin(); itr2 != DBCFiles.end(); ++itr2) Utils::SaveToDisk(MPQHandler->GetFileFrom(*itr2, MPQHandler->LocaleFiles[*itr]), path + (itr2->c_str() + folderLen)); @@ -378,8 +378,8 @@ int main(int argc, char* argv[]) if (extractFlags & Constants::EXTRACT_FLAG_TEST) { - float start[] = { -44.641f, -34.606f, -1.045f }; - float end[] = { -66.18f, 20.222f, -1.128f }; + float start[] = { 16226.200195f, 16257.000000f, 13.202200f }; + float end[] = { 16245.725586f, 16382.465820f, 47.384956f }; // float m_spos[3]; @@ -408,7 +408,7 @@ int main(int argc, char* argv[]) dtPolyRef m_startRef; dtPolyRef m_endRef; - FILE* mmap = fopen("mmaps/555.mmap", "rb"); + FILE* mmap = fopen("mmaps/001.mmap", "rb"); dtNavMeshParams params; int count = fread(¶ms, sizeof(dtNavMeshParams), 1, mmap); fclose(mmap); @@ -427,7 +427,7 @@ int main(int argc, char* argv[]) for (int j = 0; j <= 32; ++j) { char buff[100]; - sprintf(buff, "mmaps/555%02i%02i.mmtile", i, j); + sprintf(buff, "mmaps/001%02i%02i.mmtile", i, j); LoadTile(navMesh, buff); } } diff --git a/src/tools/mesh_extractor/TileBuilder.cpp b/src/tools/mesh_extractor/TileBuilder.cpp index 13566456329..51df91d2652 100644 --- a/src/tools/mesh_extractor/TileBuilder.cpp +++ b/src/tools/mesh_extractor/TileBuilder.cpp @@ -283,6 +283,15 @@ uint8* TileBuilder::BuildTiled(dtNavMeshParams& navMeshParams) rcPolyMeshDetail* dmesh = rcAllocPolyMeshDetail(); rcBuildPolyMeshDetail(Context, *pmesh, *chf, Config.detailSampleDist, Config.detailSampleMaxError, *dmesh); + // Set flags according to area types (e.g. Swim for Water) + for (int i = 0; i < pmesh->npolys; i++) + { + if (pmesh->areas[i] == Constants::POLY_AREA_ROAD || pmesh->areas[i] == Constants::POLY_AREA_TERRAIN) + pmesh->flags[i] = Constants::POLY_FLAG_WALK; + else if (pmesh->areas[i] == Constants::POLY_AREA_WATER) + pmesh->flags[i] = Constants::POLY_FLAG_SWIM; + } + dtNavMeshCreateParams params; memset(¶ms, 0, sizeof(params)); // PolyMesh data @@ -299,21 +308,25 @@ uint8* TileBuilder::BuildTiled(dtNavMeshParams& navMeshParams) params.detailVertsCount = dmesh->nverts; params.detailTris = dmesh->tris; params.detailTriCount = dmesh->ntris; - rcVcopy(params.bmin, pmesh->bmin); - rcVcopy(params.bmax, pmesh->bmax); // General settings - params.ch = InstanceConfig.ch; - params.cs = InstanceConfig.cs; - params.walkableClimb = InstanceConfig.walkableClimb * InstanceConfig.ch; - params.walkableHeight = InstanceConfig.walkableHeight * InstanceConfig.ch; - params.walkableRadius = InstanceConfig.walkableRadius * InstanceConfig.cs; + params.ch = Config.ch; + params.cs = Config.cs; + params.walkableClimb = Config.walkableClimb * Config.ch; + params.walkableHeight = Config.walkableHeight * Config.ch; + params.walkableRadius = Config.walkableRadius * Config.cs; params.tileX = X; params.tileY = Y; params.tileLayer = 0; params.buildBvTree = true; - rcVcopy(params.bmax, bmax); - rcVcopy(params.bmin, bmin); + // Recalculate the bounds with the added geometry + float* bmin2 = NULL, *bmax2 = NULL; + CalculateTileBounds(bmin2, bmax2, navMeshParams); + bmin2[1] = bmin[1]; + bmax2[1] = bmax[1]; + + rcVcopy(params.bmax, bmax2); + rcVcopy(params.bmin, bmin2); // Offmesh-connection settings params.offMeshConCount = 0; // none for now diff --git a/src/tools/mesh_extractor/Utils.cpp b/src/tools/mesh_extractor/Utils.cpp index e7ffc0ed919..24cfb5cd1db 100644 --- a/src/tools/mesh_extractor/Utils.cpp +++ b/src/tools/mesh_extractor/Utils.cpp @@ -173,24 +173,38 @@ void Utils::SaveToDisk( FILE* stream, const std::string& path ) if (!disk) { printf("SaveToDisk: Could not save file %s to disk, please verify that you have write permissions on that directory\n", path.c_str()); + fclose(stream); return; } uint32 size = Utils::Size(stream); uint8* data = new uint8[size]; // Read the data to an array - if (fread(data, 1, size, stream) != 1) + size_t read = fread(data, size, 1, stream); + if (read != 1) { - printf("SaveToDisk: Error reading from Stream while trying to save file %s to disck.\n", path.c_str()); + printf("SaveToDisk: Error reading from Stream while trying to save file %s to disk.\n", path.c_str()); + fclose(disk); + fclose(stream); return; } + // And write it in the file - fwrite(data, 1, size, disk); + size_t wrote = fwrite(data, size, 1, disk); + if (wrote != 1) + { + printf("SaveToDisk: Error writing to the file while trying to save %s to disk.\n", path.c_str()); + fclose(stream); + fclose(disk); + return; + } // Close the filestream fclose(disk); + fclose(stream); + // Free the used memory - delete [] data; + delete[] data; } Vector3 Utils::ToWoWCoords(const Vector3& vec ) |