diff options
author | Discover- <amort11@hotmail.com> | 2013-09-23 16:47:47 +0200 |
---|---|---|
committer | Discover- <amort11@hotmail.com> | 2013-09-23 16:47:47 +0200 |
commit | a0db0728f2f48e7ca4156115b03e63d7ff2164c1 (patch) | |
tree | c17b6d0bdc34f0a8297216f21dd7deb5df4eddcc | |
parent | 9653576cb4cc9449898d6af691c045d68e9361c5 (diff) | |
parent | 4498ac0062d56aa0a0f2b9a21358f12f83c4b1f7 (diff) |
Merge branch 'master' of https://github.com/TrinityCore/TrinityCore
158 files changed, 5660 insertions, 2417 deletions
diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql index 2f52b5f33f2..c9e0f874457 100644 --- a/sql/base/auth_database.sql +++ b/sql/base/auth_database.sql @@ -112,11 +112,12 @@ LOCK TABLES `account_banned` WRITE; UNLOCK TABLES; -- --- Dumping data for table `autobroadcast` +-- Table structure for table `autobroadcast` -- DROP TABLE IF EXISTS `autobroadcast`; - +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `autobroadcast` ( `realmid` int(11) NOT NULL DEFAULT '-1', `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, @@ -124,38 +125,47 @@ CREATE TABLE `autobroadcast` ( `text` longtext NOT NULL, PRIMARY KEY (`id`,`realmid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `ip_banned` +-- Dumping data for table `autobroadcast` -- -DROP TABLE IF EXISTS `ip_banned`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `ip_banned` ( - `ip` varchar(15) NOT NULL DEFAULT '127.0.0.1', - `bandate` int(10) unsigned NOT NULL, - `unbandate` int(10) unsigned NOT NULL, - `bannedby` varchar(50) NOT NULL DEFAULT '[Console]', - `banreason` varchar(255) NOT NULL DEFAULT 'no reason', - PRIMARY KEY (`ip`,`bandate`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Banned IPs'; -/*!40101 SET character_set_client = @saved_cs_client */; +LOCK TABLES `autobroadcast` WRITE; +/*!40000 ALTER TABLE `autobroadcast` DISABLE KEYS */; +/*!40000 ALTER TABLE `autobroadcast` ENABLE KEYS */; +UNLOCK TABLES; -/*Table structure for table `ip2nation` */ +-- +-- Table structure for table `ip2nation` +-- DROP TABLE IF EXISTS `ip2nation`; - +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `ip2nation` ( `ip` int(11) unsigned NOT NULL DEFAULT '0', `country` char(2) NOT NULL DEFAULT '', KEY `ip` (`ip`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; -/*Table structure for table `ip2nationCountries` */ +-- +-- Dumping data for table `ip2nation` +-- -DROP TABLE IF EXISTS `ip2nationCountries`; +LOCK TABLES `ip2nation` WRITE; +/*!40000 ALTER TABLE `ip2nation` DISABLE KEYS */; +/*!40000 ALTER TABLE `ip2nation` ENABLE KEYS */; +UNLOCK TABLES; +-- +-- Table structure for table `ip2nationCountries` +-- + +DROP TABLE IF EXISTS `ip2nationCountries`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `ip2nationCountries` ( `code` varchar(4) NOT NULL DEFAULT '', `iso_code_2` varchar(2) NOT NULL DEFAULT '', @@ -167,6 +177,33 @@ CREATE TABLE `ip2nationCountries` ( PRIMARY KEY (`code`), KEY `code` (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ip2nationCountries` +-- + +LOCK TABLES `ip2nationCountries` WRITE; +/*!40000 ALTER TABLE `ip2nationCountries` DISABLE KEYS */; +/*!40000 ALTER TABLE `ip2nationCountries` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ip_banned` +-- + +DROP TABLE IF EXISTS `ip_banned`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ip_banned` ( + `ip` varchar(15) NOT NULL DEFAULT '127.0.0.1', + `bandate` int(10) unsigned NOT NULL, + `unbandate` int(10) unsigned NOT NULL, + `bannedby` varchar(50) NOT NULL DEFAULT '[Console]', + `banreason` varchar(255) NOT NULL DEFAULT 'no reason', + PRIMARY KEY (`ip`,`bandate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Banned IPs'; +/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `ip_banned` @@ -356,7 +393,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'),(7,'Player Commands (Temporal till commands moved to rbac)'),(8,'Moderator Commands (Temporal till commands moved to rbac)'),(9,'GameMaster Commands (Temporal till commands moved to rbac)'),(10,'Administrator Commands (Temporal till commands moved to rbac)'),(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'); +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'),(200,'Command: .rbac'),(201,'Command: .rbac account'),(202,'Command: .rbac account group'),(203,'Command: .rbac account group add'),(204,'Command: .rbac account group remove'),(205,'Command: .rbac account role'),(206,'Command: .rbac account role grant'),(207,'Command: .rbac account role deny'),(208,'Command: .rbac account role revoke'),(209,'Command: .rbac account permission'),(210,'Command: .rbac account permission grant'),(211,'Command: .rbac account permission deny'),(212,'Command: .rbac account permission revoke'),(213,'Command: .rbac list'),(214,'Command: .rbac list groups'),(215,'Command: .rbac list roles'),(216,'Command: .rbac list permissions'),(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,'achievement'),(231,'achievement add'),(232,'arena'),(233,'arena captain'),(234,'arena create'),(235,'arena disband'),(236,'arena info'),(237,'arena lookup'),(238,'arena rename'),(239,'ban'),(240,'ban account'),(241,'ban character'),(242,'ban ip'),(243,'ban playeraccount'),(244,'baninfo'),(245,'baninfo account'),(246,'baninfo character'),(247,'baninfo ip'),(248,'banlist'),(249,'banlist account'),(250,'banlist character'),(251,'banlist ip'),(252,'unban'),(253,'unban account'),(254,'unban character'),(255,'unban ip'),(256,'unban playeraccount'),(257,'bf'),(258,'bf start'),(259,'bf stop'),(260,'bf switch'),(261,'bf timer'),(262,'bf enable'),(263,'account email'),(264,'account set sec'),(265,'account set sec email'),(266,'account set sec regmail'),(267,'cast'),(268,'cast back'),(269,'cast dist'),(270,'cast self'),(271,'cast target'),(272,'cast dest'),(273,'character'),(274,'character customize'),(275,'character changefaction'),(276,'character changerace'),(277,'character deleted'),(279,'character deleted list'),(280,'character deleted restore'),(283,'character level'),(284,'character rename'),(285,'character reputation'),(286,'character titles'),(287,'levelup'),(288,'pdump'),(289,'pdump load'),(290,'pdump write'),(291,'cheat'),(292,'cheat casttime'),(293,'cheat cooldown'),(294,'cheat explore'),(295,'cheat god'),(296,'cheat power'),(297,'cheat status'),(298,'cheat taxi'),(299,'cheat waterwalk'),(300,'debug'),(301,'debug anim'),(302,'debug areatriggers'),(303,'debug arena'),(304,'debug bg'),(305,'debug entervehicle'),(306,'debug getitemstate'),(307,'debug getitemvalue'),(308,'debug getvalue'),(309,'debug hostil'),(310,'debug itemexpire'),(311,'debug lootrecipient'),(312,'debug los'),(313,'debug mod32value'),(314,'debug moveflags'),(315,'debug play'),(316,'debug play cinematics'),(317,'debug play movie'),(318,'debug play sound'),(319,'debug send'),(320,'debug send buyerror'),(321,'debug send channelnotify'),(322,'debug send chatmessage'),(323,'debug send equiperror'),(324,'debug send largepacket'),(325,'debug send opcode'),(326,'debug send qinvalidmsg'),(327,'debug send qpartymsg'),(328,'debug send sellerror'),(329,'debug send setphaseshift'),(330,'debug send spellfail'),(331,'debug setaurastate'),(332,'debug setbit'),(333,'debug setitemvalue'),(334,'debug setvalue'),(335,'debug setvid'),(336,'debug spawnvehicle'),(337,'debug threat'),(338,'debug update'),(339,'debug uws'),(340,'wpgps'),(341,'deserter'),(342,'deserter bg'),(343,'deserter bg add'),(344,'deserter bg remove'),(345,'deserter instance'),(346,'deserter instance add'),(347,'deserter instance remove'),(348,'disable'),(349,'disable add'),(350,'disable add achievement_criteria'),(351,'disable add battleground'),(352,'disable add map'),(353,'disable add mmap'),(354,'disable add outdoorpvp'),(355,'disable add quest'),(356,'disable add spell'),(357,'disable add vmap'),(358,'disable remove'),(359,'disable remove achievement_criteria'),(360,'disable remove battleground'),(361,'disable remove map'),(362,'disable remove mmap'),(363,'disable remove outdoorpvp'),(364,'disable remove quest'),(365,'disable remove spell'),(366,'disable remove vmap'),(367,'event'),(368,'event activelist'),(369,'event start'),(370,'event stop'),(371,'gm'),(372,'gm chat'),(373,'gm fly'),(374,'gm ingame'),(375,'gm list'),(376,'gm visible'),(377,'go'),(378,'go creature'),(379,'go graveyard'),(380,'go grid'),(381,'go object'),(382,'go taxinode'),(383,'go ticket'),(384,'go trigger'),(385,'go xyz'),(386,'go zonexy'),(387,'gobject'),(388,'gobject activate'),(389,'gobject add'),(390,'gobject add temp'),(391,'gobject delete'),(392,'gobject info'),(393,'gobject move'),(394,'gobject near'),(395,'gobject set'),(396,'gobject set phase'),(397,'gobject set state'),(398,'gobject target'),(399,'gobject turn'),(401,'guild'),(402,'guild create'),(403,'guild delete'),(404,'guild invite'),(405,'guild uninvite'),(406,'guild rank'),(407,'guild rename'),(408,'honor'),(409,'honor add'),(410,'honor add kill'),(411,'honor update'),(412,'instance'),(413,'instance listbinds'),(414,'instance unbind'),(415,'instance stats'),(416,'instance savedata'),(417,'learn'),(418,'learn all'),(419,'learn all my'),(420,'learn all my class'),(421,'learn all my pettalents'),(422,'learn all my spells'),(423,'learn all my talents'),(424,'learn all gm'),(425,'learn all crafts'),(426,'learn all default'),(427,'learn all lang'),(428,'learn all recipes'),(429,'unlearn'),(430,'lfg'),(431,'lfg player'),(432,'lfg group'),(433,'lfg queue'),(434,'lfg clean'),(435,'lfg options'),(436,'list'),(437,'list creature'),(438,'list item'),(439,'list object'),(440,'list auras'),(441,'list mail'),(442,'lookup'),(443,'lookup area'),(444,'lookup creature'),(445,'lookup event'),(446,'lookup faction'),(447,'lookup item'),(448,'lookup itemset'),(449,'lookup object'),(450,'lookup quest'),(451,'lookup player'),(452,'lookup player ip'),(453,'lookup player account'),(454,'lookup player email'),(455,'lookup skill'),(456,'lookup spell'),(457,'lookup spell id'),(458,'lookup taxinode'),(459,'lookup tele'),(460,'lookup title'),(461,'lookup map'),(462,'announce'),(463,'channel'),(464,'channel set'),(465,'channel set ownership'),(466,'gmannounce'),(467,'gmnameannounce'),(468,'gmnotify'),(469,'nameannounce'),(470,'notify'),(471,'whispers'),(472,'group'),(473,'group leader'),(474,'group disband'),(475,'group remove'),(476,'group join'),(477,'group list'),(478,'group summon'),(479,'pet'),(480,'pet create'),(481,'pet learn'),(482,'pet unlearn'),(483,'send'),(484,'send items'),(485,'send mail'),(486,'send message'),(487,'send money'),(488,'additem'),(489,'additemset'),(490,'appear'),(491,'aura'),(492,'bank'),(493,'bindsight'),(494,'combatstop'),(495,'cometome'),(496,'commands'),(497,'cooldown'),(498,'damage'),(499,'dev'),(500,'die'),(501,'dismount'),(502,'distance'),(503,'flusharenapoints'),(504,'freeze'),(505,'gps'),(506,'guid'),(507,'help'),(508,'hidearea'),(509,'itemmove'),(510,'kick'),(511,'linkgrave'),(512,'listfreeze'),(513,'maxskill'),(514,'movegens'),(515,'mute'),(516,'neargrave'),(517,'pinfo'),(518,'playall'),(519,'possess'),(520,'recall'),(521,'repairitems'),(522,'respawn'),(523,'revive'),(524,'saveall'),(525,'save'),(526,'setskill'),(527,'showarea'),(528,'summon'),(529,'unaura'),(530,'unbindsight'),(531,'unfreeze'),(532,'unmute'),(533,'unpossess'),(534,'unstuck'),(535,'wchange'),(536,'mmap'),(537,'mmap loadedtiles'),(538,'mmap loc'),(539,'mmap path'),(540,'mmap stats'),(541,'mmap testarea'),(542,'morph'),(543,'demorph'),(544,'modify'),(545,'modify arenapoints'),(546,'modify bit'),(547,'modify drunk'),(548,'modify energy'),(549,'modify faction'),(550,'modify gender'),(551,'modify honor'),(552,'modify hp'),(553,'modify mana'),(554,'modify money'),(555,'modify mount'),(556,'modify phase'),(557,'modify rage'),(558,'modify reputation'),(559,'modify runicpower'),(560,'modify scale'),(561,'modify speed'),(562,'modify speed all'),(563,'modify speed backwalk'),(564,'modify speed fly'),(565,'modify speed walk'),(566,'modify speed swim'),(567,'modify spell'),(568,'modify standstate'),(569,'modify talentpoints'),(570,'npc'),(571,'npc add'),(572,'npc add formation'),(573,'npc add item'),(574,'npc add move'),(575,'npc add temp'),(576,'npc add delete'),(577,'npc add delete item'),(578,'npc add follow'),(579,'npc add follow stop'),(580,'npc set'),(581,'npc set allowmove'),(582,'npc set entry'),(583,'npc set factionid'),(584,'npc set flag'),(585,'npc set level'),(586,'npc set link'),(587,'npc set model'),(588,'npc set movetype'),(589,'npc set phase'),(590,'npc set spawndist'),(591,'npc set spawntime'),(592,'npc set data'),(593,'npc info'),(594,'npc near'),(595,'npc move'),(596,'npc playemote'),(597,'npc say'),(598,'npc textemote'),(599,'npc whisper'),(600,'npc yell'),(601,'npc tame'),(602,'quest'),(603,'quest add'),(604,'quest complete'),(605,'quest remove'),(606,'quest reward'),(607,'reload'),(608,'reload access_requirement'),(609,'reload achievement_criteria_data'),(610,'reload achievement_reward'),(611,'reload all'),(612,'reload all achievement'),(613,'reload all area'),(614,'reload all eventai'),(615,'reload all gossips'),(616,'reload all item'),(617,'reload all locales'),(618,'reload all loot'),(619,'reload all npc'),(620,'reload all quest'),(621,'reload all scripts'),(622,'reload all spell'),(623,'reload areatrigger_involvedrelation'),(624,'reload areatrigger_tavern'),(625,'reload areatrigger_teleport'),(626,'reload auctions'),(627,'reload autobroadcast'),(628,'reload command'),(629,'reload conditions'),(630,'reload config'),(631,'reload creature_text'),(632,'reload creature_ai_scripts'),(633,'reload creature_ai_texts'),(634,'reload creature_questender'),(635,'reload creature_linked_respawn'),(636,'reload creature_loot_template'),(637,'reload creature_onkill_reputation'),(638,'reload creature_queststarter'),(639,'reload creature_summon_groups'),(640,'reload creature_template'),(641,'reload disables'),(642,'reload disenchant_loot_template'),(643,'reload event_scripts'),(644,'reload fishing_loot_template'),(645,'reload game_graveyard_zone'),(646,'reload game_tele'),(647,'reload gameobject_questender'),(648,'reload gameobject_loot_template'),(649,'reload gameobject_queststarter'),(650,'reload gm_tickets'),(651,'reload gossip_menu'),(652,'reload gossip_menu_option'),(653,'reload item_enchantment_template'),(654,'reload item_loot_template'),(655,'reload item_set_names'),(656,'reload lfg_dungeon_rewards'),(657,'reload locales_achievement_reward'),(658,'reload locales_creature'),(659,'reload locales_creature_text'),(660,'reload locales_gameobject'),(661,'reload locales_gossip_menu_option'),(662,'reload locales_item'),(663,'reload locales_item_set_name'),(664,'reload locales_npc_text'),(665,'reload locales_page_text'),(666,'reload locales_points_of_interest'),(667,'reload locales_quest'),(668,'reload mail_level_reward'),(669,'reload mail_loot_template'),(670,'reload milling_loot_template'),(671,'reload npc_spellclick_spells'),(672,'reload npc_trainer'),(673,'reload npc_vendor'),(674,'reload page_text'),(675,'reload pickpocketing_loot_template'),(676,'reload points_of_interest'),(677,'reload prospecting_loot_template'),(678,'reload quest_poi'),(679,'reload quest_template'),(680,'reload rbac'),(681,'reload reference_loot_template'),(682,'reload reserved_name'),(683,'reload reputation_reward_rate'),(684,'reload reputation_spillover_template'),(685,'reload skill_discovery_template'),(686,'reload skill_extra_item_template'),(687,'reload skill_fishing_base_level'),(688,'reload skinning_loot_template'),(689,'reload smart_scripts'),(690,'reload spell_required'),(691,'reload spell_area'),(692,'reload spell_bonus_data'),(693,'reload spell_group'),(694,'reload spell_learn_spell'),(695,'reload spell_loot_template'),(696,'reload spell_linked_spell'),(697,'reload spell_pet_auras'),(698,'reload spell_proc_event'),(699,'reload spell_proc'),(700,'reload spell_scripts'),(701,'reload spell_target_position'),(702,'reload spell_threats'),(703,'reload spell_group_stack_rules'),(704,'reload trinity_string'),(705,'reload warden_action'),(706,'reload waypoint_scripts'),(707,'reload waypoint_data'),(708,'reload vehicle_accessory'),(709,'reload vehicle_template_accessory'),(710,'reset'),(711,'reset achievements'),(712,'reset honor'),(713,'reset level'),(714,'reset spells'),(715,'reset stats'),(716,'reset talents'),(717,'reset all'),(718,'server'),(719,'server corpses'),(720,'server exit'),(721,'server idlerestart'),(722,'server idlerestart cancel'),(723,'server idleshutdown'),(724,'server idleshutdown cancel'),(725,'server info'),(726,'server plimit'),(727,'server restart'),(728,'server restart cancel'),(729,'server set'),(730,'server set closed'),(731,'server set difftime'),(732,'server set loglevel'),(733,'server set motd'),(734,'server shutdown'),(735,'server shutdown cancel'),(736,'server motd'),(737,'tele'),(738,'tele add'),(739,'tele del'),(740,'tele name'),(741,'tele group'),(742,'ticket'),(743,'ticket assign'),(744,'ticket close'),(745,'ticket closedlist'),(746,'ticket comment'),(747,'ticket complete'),(748,'ticket delete'),(749,'ticket escalate'),(750,'ticket escalatedlist'),(751,'ticket list'),(752,'ticket onlinelist'),(753,'ticket reset'),(754,'ticket response'),(755,'ticket response append'),(756,'ticket response appendln'),(757,'ticket togglesystem'),(758,'ticket unassign'),(759,'ticket viewid'),(760,'ticket viewname'),(761,'titles'),(762,'titles add'),(763,'titles current'),(764,'titles remove'),(765,'titles set'),(766,'titles set mask'),(767,'wp'),(768,'wp add'),(769,'wp event'),(770,'wp load'),(771,'wp modify'),(772,'wp unload'),(773,'wp reload'),(774,'wp show'); /*!40000 ALTER TABLE `rbac_permissions` ENABLE KEYS */; UNLOCK TABLES; @@ -383,7 +420,7 @@ CREATE TABLE `rbac_role_permissions` ( LOCK TABLES `rbac_role_permissions` WRITE; /*!40000 ALTER TABLE `rbac_role_permissions` DISABLE KEYS */; -INSERT INTO `rbac_role_permissions` VALUES (5,1),(5,2),(6,3),(6,4),(6,5),(7,6),(1,7),(2,8),(3,9),(4,10),(8,11),(9,13),(33,14),(33,15),(33,16),(33,17),(33,18),(27,19),(22,20),(23,21),(24,22),(17,23),(34,24),(28,25),(30,26),(19,27),(35,28),(36,29),(11,30),(12,31),(10,32),(20,33),(14,34),(37,35),(29,36),(15,37),(13,38),(25,39),(38,40),(26,41),(18,42),(18,43),(16,44),(31,45),(32,46),(21,47),(39,48),(40,49), (41,50); +INSERT INTO `rbac_role_permissions` VALUES (5,1),(5,2),(6,3),(6,4),(6,5),(7,6),(8,11),(9,13),(33,14),(33,15),(33,16),(33,17),(33,18),(27,19),(22,20),(23,21),(24,22),(17,23),(34,24),(28,25),(30,26),(19,27),(35,28),(36,29),(11,30),(12,31),(10,32),(20,33),(14,34),(37,35),(29,36),(15,37),(13,38),(25,39),(38,40),(26,41),(18,42),(18,43),(16,44),(31,45),(32,46),(21,47),(39,48),(40,49),(41,50),(4,200),(4,201),(4,202),(4,203),(4,204),(4,205),(4,206),(4,207),(4,208),(4,209),(4,210),(4,211),(4,212),(4,213),(4,214),(4,215),(4,216),(1,217),(2,218),(1,221),(1,222),(1,223),(1,225),(4,226),(4,227),(4,230),(4,231),(3,232),(4,233),(4,234),(4,235),(3,236),(3,237),(4,238),(4,239),(4,240),(4,241),(4,242),(4,243),(4,244),(4,245),(4,246),(4,247),(4,248),(4,249),(4,250),(4,251),(4,252),(4,253),(4,254),(4,255),(4,256),(4,257),(4,258),(4,259),(4,260),(4,261),(4,262),(1,263),(2,263),(3,263),(4,263),(4,264),(4,265),(4,266),(4,267),(4,268),(4,269),(4,270),(4,271),(4,272),(3,273),(3,274),(3,275),(3,276),(3,277),(4,279),(4,280),(4,283),(3,284),(3,285),(3,286),(4,287),(4,288),(4,289),(4,290),(4,291),(4,292),(4,293),(4,294),(4,295),(4,296),(4,297),(4,298),(4,299),(2,300),(3,301),(4,302),(4,303),(4,304),(4,305),(4,306),(4,307),(4,308),(4,309),(4,310),(3,311),(2,312),(4,313),(4,314),(2,315),(2,316),(2,317),(2,318),(4,319),(4,320),(4,321),(4,322),(4,323),(4,324),(4,325),(4,326),(4,327),(4,328),(4,329),(4,330),(4,331),(4,332),(4,333),(4,334),(4,335),(4,336),(4,337),(4,338),(4,339),(4,340),(4,341),(4,342),(4,343),(4,344),(4,345),(4,346),(4,347),(4,348),(4,349),(4,350),(4,351),(4,352),(4,353),(4,354),(4,355),(4,356),(4,357),(4,358),(4,359),(4,360),(4,361),(4,362),(4,363),(4,364),(4,365),(4,366),(2,367),(2,368),(2,369),(2,370),(2,371),(2,372),(4,373),(2,374),(4,375),(2,376),(2,377),(2,378),(2,379),(2,380),(2,381),(2,382),(2,383),(2,384),(2,385),(2,386),(3,387),(3,388),(3,389),(3,390),(3,391),(3,392),(3,393),(3,394),(3,395),(3,396),(3,397),(3,398),(3,399),(4,401),(4,402),(4,403),(4,404),(4,405),(4,406),(4,407),(2,408),(2,409),(2,410),(2,411),(2,412),(2,413),(2,414),(2,415),(2,416),(4,417),(4,418),(4,419),(4,420),(4,421),(4,422),(4,423),(4,424),(4,425),(4,426),(4,427),(4,428),(4,429),(2,430),(2,431),(2,432),(2,433),(4,434),(4,435),(4,436),(4,437),(4,438),(4,439),(4,440),(4,441),(4,442),(4,443),(4,444),(4,445),(4,446),(4,447),(4,448),(4,449),(4,450),(4,451),(4,452),(4,453),(4,454),(4,455),(4,456),(4,457),(4,458),(4,459),(4,461),(2,462),(4,463),(4,464),(4,465),(2,466),(2,467),(2,468),(2,469),(2,470),(2,471),(4,472),(4,473),(4,474),(4,475),(4,476),(4,477),(4,478),(3,479),(3,480),(3,481),(3,482),(2,483),(2,484),(3,485),(3,486),(3,487),(4,488),(4,489),(2,490),(4,491),(4,492),(4,493),(3,494),(4,495),(1,496),(4,497),(4,498),(4,499),(4,500),(1,501),(4,502),(4,503),(2,504),(4,505),(3,506),(1,507),(4,508),(3,509),(3,510),(4,511),(2,512),(4,513),(4,514),(2,515),(4,516),(3,517),(3,518),(4,519),(2,520),(3,521),(4,522),(4,523),(2,524),(1,525),(4,526),(4,527),(2,528),(4,529),(4,530),(2,531),(2,532),(4,533),(1,534),(4,535),(4,536),(4,537),(4,538),(4,539),(4,540),(4,541),(3,542),(3,543),(2,544),(2,545),(2,546),(2,547),(2,548),(2,549),(3,550),(2,551),(2,552),(2,553),(2,554),(2,555),(4,556),(2,557),(3,558),(2,559),(2,560),(2,561),(2,562),(2,563),(2,564),(2,565),(2,566),(2,567),(3,568),(2,569),(2,570),(3,571),(3,572),(3,573),(3,574),(3,575),(3,576),(3,577),(3,578),(3,579),(3,580),(4,581),(4,582),(3,583),(3,584),(3,585),(3,586),(3,587),(3,588),(3,589),(3,590),(3,591),(4,592),(4,593),(3,594),(3,595),(4,596),(2,597),(2,598),(2,599),(2,600),(3,601),(4,602),(4,603),(4,604),(4,605),(4,606),(4,607),(4,608),(4,609),(4,610),(4,611),(4,612),(4,613),(4,614),(4,615),(4,616),(4,617),(4,618),(4,619),(4,620),(4,621),(4,622),(4,623),(4,624),(4,625),(4,626),(4,627),(4,628),(4,629),(4,630),(4,631),(4,632),(4,633),(4,634),(4,635),(4,636),(4,637),(4,638),(4,639),(4,640),(4,641),(4,642),(4,643),(4,644),(4,645),(4,646),(4,647),(4,648),(4,649),(4,650),(4,651),(4,652),(4,653),(4,654),(4,655),(4,656),(4,657),(4,658),(4,659),(4,660),(4,661),(4,662),(4,663),(4,664),(4,665),(4,666),(4,667),(4,668),(4,669),(4,670),(4,671),(4,672),(4,673),(4,674),(4,675),(4,676),(4,677),(4,678),(4,679),(4,680),(4,681),(4,682),(4,683),(4,684),(4,685),(4,686),(4,687),(4,688),(4,689),(4,690),(4,691),(4,692),(4,693),(4,694),(4,695),(4,696),(4,697),(4,698),(4,699),(4,700),(4,701),(4,702),(4,703),(4,704),(4,705),(4,706),(4,707),(4,708),(4,709),(4,710),(4,711),(4,712),(4,713),(4,714),(4,715),(4,716),(4,717),(4,718),(4,719),(4,721),(4,722),(4,723),(4,724),(4,725),(4,726),(4,727),(4,728),(4,729),(4,730),(4,733),(4,734),(4,735),(4,736),(2,737),(4,738),(4,739),(2,740),(2,741),(2,742),(3,743),(2,744),(2,745),(2,746),(2,747),(4,748),(2,749),(3,750),(2,751),(2,752),(4,753),(2,754),(2,755),(2,756),(4,757),(3,758),(2,759),(2,760),(3,761),(3,762),(3,763),(3,764),(3,765),(3,766),(3,767),(3,768),(3,769),(3,770),(3,771),(3,772),(4,773),(3,774); /*!40000 ALTER TABLE `rbac_role_permissions` ENABLE KEYS */; UNLOCK TABLES; @@ -532,4 +569,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2013-03-09 17:57:13 +-- Dump completed on 2013-09-10 23:18:53 diff --git a/sql/updates/auth/2013_09_10_00_auth_misc.sql b/sql/updates/auth/2013_09_10_00_auth_misc.sql new file mode 100644 index 00000000000..f62ecd83cab --- /dev/null +++ b/sql/updates/auth/2013_09_10_00_auth_misc.sql @@ -0,0 +1,25 @@ +/* cs_group.cpp */ + +SET @id = 472; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+6; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0 , 'group'), +(@id+1 , 'group leader'), +(@id+2 , 'group disband'), +(@id+3 , 'group remove'), +(@id+4 , 'group join'), +(@id+5 , 'group list'), +(@id+6 , 'group summon'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+6; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(4, @id+0), +(4, @id+1), +(4, @id+2), +(4, @id+3), +(4, @id+4), +(4, @id+5), +(4, @id+6); diff --git a/sql/updates/auth/2013_09_10_01_auth_misc.sql b/sql/updates/auth/2013_09_10_01_auth_misc.sql new file mode 100644 index 00000000000..2dbfbcaaf46 --- /dev/null +++ b/sql/updates/auth/2013_09_10_01_auth_misc.sql @@ -0,0 +1,19 @@ +/* cs_pet.cpp */ + +SET @id = 479; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+3; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0 , 'pet'), +(@id+1 , 'pet create'), +(@id+2 , 'pet learn'), +(@id+3 , 'pet unlearn'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+3; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(3, @id+0), +(3, @id+1), +(3, @id+2), +(3, @id+3); diff --git a/sql/updates/auth/2013_09_10_02_auth_misc.sql b/sql/updates/auth/2013_09_10_02_auth_misc.sql new file mode 100644 index 00000000000..2049cda2ffc --- /dev/null +++ b/sql/updates/auth/2013_09_10_02_auth_misc.sql @@ -0,0 +1,21 @@ +/* cs_send.cpp */ + +SET @id = 483; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+4; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0 , 'send'), +(@id+1 , 'send items'), +(@id+2 , 'send mail'), +(@id+3 , 'send message'), +(@id+4 , 'send money'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+4; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(2, @id+0), +(2, @id+1), +(3, @id+2), +(3, @id+3), +(3, @id+4); diff --git a/sql/updates/auth/2013_09_10_03_auth_misc.sql b/sql/updates/auth/2013_09_10_03_auth_misc.sql new file mode 100644 index 00000000000..553830f6ecb --- /dev/null +++ b/sql/updates/auth/2013_09_10_03_auth_misc.sql @@ -0,0 +1,107 @@ +/* cs_misc.cpp */ + +SET @id = 488; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+47; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'additem'), +(@id+1, 'additemset'), +(@id+2, 'appear'), +(@id+3, 'aura'), +(@id+4, 'bank'), +(@id+5, 'bindsight'), +(@id+6, 'combatstop'), +(@id+7, 'cometome'), +(@id+8, 'commands'), +(@id+9, 'cooldown'), +(@id+10, 'damage'), +(@id+11, 'dev'), +(@id+12, 'die'), +(@id+13, 'dismount'), +(@id+14, 'distance'), +(@id+15, 'flusharenapoints'), +(@id+16, 'freeze'), +(@id+17, 'gps'), +(@id+18, 'guid'), +(@id+19, 'help'), +(@id+20, 'hidearea'), +(@id+21, 'itemmove'), +(@id+22, 'kick'), +(@id+23, 'linkgrave'), +(@id+24, 'listfreeze'), +(@id+25, 'maxskill'), +(@id+26, 'movegens'), +(@id+27, 'mute'), +(@id+28, 'neargrave'), +(@id+29, 'pinfo'), +(@id+30, 'playall'), +(@id+31, 'possess'), +(@id+32, 'recall'), +(@id+33, 'repairitems'), +(@id+34, 'respawn'), +(@id+35, 'revive'), +(@id+36, 'saveall'), +(@id+37, 'save'), +(@id+38, 'setskill'), +(@id+39, 'showarea'), +(@id+40, 'summon'), +(@id+41, 'unaura'), +(@id+42, 'unbindsight'), +(@id+43, 'unfreeze'), +(@id+44, 'unmute'), +(@id+45, 'unpossess'), +(@id+46, 'unstuck'), +(@id+47, 'wchange'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+47; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(4, @id+0), +(4, @id+1), +(2, @id+2), +(4, @id+3), +(4, @id+4), +(4, @id+5), +(3, @id+6), +(4, @id+7), +(1, @id+8), +(4, @id+9), +(4, @id+10), +(4, @id+11), +(4, @id+12), +(1, @id+13), +(4, @id+14), +(4, @id+15), +(2, @id+16), +(4, @id+17), +(3, @id+18), +(1, @id+19), +(4, @id+20), +(3, @id+21), +(3, @id+22), +(4, @id+23), +(2, @id+24), +(4, @id+25), +(4, @id+26), +(2, @id+27), +(4, @id+28), +(3, @id+29), +(3, @id+30), +(4, @id+31), +(2, @id+32), +(3, @id+33), +(4, @id+34), +(4, @id+35), +(2, @id+36), +(1, @id+37), +(4, @id+38), +(4, @id+39), +(2, @id+40), +(4, @id+41), +(4, @id+42), +(2, @id+43), +(2, @id+44), +(4, @id+45), +(1, @id+46), +(4, @id+47); diff --git a/sql/updates/auth/2013_09_10_04_auth_misc.sql b/sql/updates/auth/2013_09_10_04_auth_misc.sql new file mode 100644 index 00000000000..9b1f48f2914 --- /dev/null +++ b/sql/updates/auth/2013_09_10_04_auth_misc.sql @@ -0,0 +1,23 @@ +/* cs_mmaps.cpp */ + +SET @id = 536; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+5; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'mmap'), +(@id+1, 'mmap loadedtiles'), +(@id+2, 'mmap loc'), +(@id+3, 'mmap path'), +(@id+4, 'mmap stats'), +(@id+5, 'mmap testarea'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+5; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(4, @id+0), +(4, @id+1), +(4, @id+2), +(4, @id+3), +(4, @id+4), +(4, @id+5); diff --git a/sql/updates/auth/2013_09_10_05_auth_misc.sql b/sql/updates/auth/2013_09_10_05_auth_misc.sql new file mode 100644 index 00000000000..607821854d3 --- /dev/null +++ b/sql/updates/auth/2013_09_10_05_auth_misc.sql @@ -0,0 +1,68 @@ +/* cs_modify.cpp */ + +SET @id = 542; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+27; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'morph'), +(@id+1, 'demorph'), +(@id+2, 'modify'), +(@id+3, 'modify arenapoints'), +(@id+4, 'modify bit'), +(@id+5, 'modify drunk'), +(@id+6, 'modify energy'), +(@id+7, 'modify faction'), +(@id+8, 'modify gender'), +(@id+9, 'modify honor'), +(@id+10, 'modify hp'), +(@id+11, 'modify mana'), +(@id+12, 'modify money'), +(@id+13, 'modify mount'), +(@id+14, 'modify phase'), +(@id+15, 'modify rage'), +(@id+16, 'modify reputation'), +(@id+17, 'modify runicpower'), +(@id+18, 'modify scale'), +(@id+19, 'modify speed'), +(@id+20, 'modify speed all'), +(@id+21, 'modify speed backwalk'), +(@id+22, 'modify speed fly'), +(@id+23, 'modify speed walk'), +(@id+24, 'modify speed swim'), +(@id+25, 'modify spell'), +(@id+26, 'modify standstate'), +(@id+27, 'modify talentpoints'); + + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+27; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(3, @id+0), +(3, @id+1), +(2, @id+2), +(2, @id+3), +(2, @id+4), +(2, @id+5), +(2, @id+6), +(2, @id+7), +(3, @id+8), +(2, @id+9), +(2, @id+10), +(2, @id+11), +(2, @id+12), +(2, @id+13), +(4, @id+14), +(2, @id+15), +(3, @id+16), +(2, @id+17), +(2, @id+18), +(2, @id+19), +(2, @id+20), +(2, @id+21), +(2, @id+22), +(2, @id+23), +(2, @id+24), +(2, @id+25), +(3, @id+26), +(2, @id+27); diff --git a/sql/updates/auth/2013_09_10_06_auth_misc.sql b/sql/updates/auth/2013_09_10_06_auth_misc.sql new file mode 100644 index 00000000000..e83e5e3cdf4 --- /dev/null +++ b/sql/updates/auth/2013_09_10_06_auth_misc.sql @@ -0,0 +1,75 @@ +/* cs_npc.cpp */ + +SET @id = 570; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+31; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'npc'), +(@id+1, 'npc add'), +(@id+2, 'npc add formation'), +(@id+3, 'npc add item'), +(@id+4, 'npc add move'), +(@id+5, 'npc add temp'), +(@id+6, 'npc add delete'), +(@id+7, 'npc add delete item'), +(@id+8, 'npc add follow'), +(@id+9, 'npc add follow stop'), +(@id+10, 'npc set'), +(@id+11, 'npc set allowmove'), +(@id+12, 'npc set entry'), +(@id+13, 'npc set factionid'), +(@id+14, 'npc set flag'), +(@id+15, 'npc set level'), +(@id+16, 'npc set link'), +(@id+17, 'npc set model'), +(@id+18, 'npc set movetype'), +(@id+19, 'npc set phase'), +(@id+20, 'npc set spawndist'), +(@id+21, 'npc set spawntime'), +(@id+22, 'npc set data'), +(@id+23, 'npc info'), +(@id+24, 'npc near'), +(@id+25, 'npc move'), +(@id+26, 'npc playemote'), +(@id+27, 'npc say'), +(@id+28, 'npc textemote'), +(@id+29, 'npc whisper'), +(@id+30, 'npc yell'), +(@id+31, 'npc tame'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+31; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(2, @id+0), +(3, @id+1), +(3, @id+2), +(3, @id+3), +(3, @id+4), +(3, @id+5), +(3, @id+6), +(3, @id+7), +(3, @id+8), +(3, @id+9), +(3, @id+10), +(4, @id+11), +(4, @id+12), +(3, @id+13), +(3, @id+14), +(3, @id+15), +(3, @id+16), +(3, @id+17), +(3, @id+18), +(3, @id+19), +(3, @id+20), +(3, @id+21), +(4, @id+22), +(4, @id+23), +(3, @id+24), +(3, @id+25), +(4, @id+26), +(2, @id+27), +(2, @id+28), +(2, @id+29), +(2, @id+30), +(3, @id+31); diff --git a/sql/updates/auth/2013_09_10_07_auth_misc.sql b/sql/updates/auth/2013_09_10_07_auth_misc.sql new file mode 100644 index 00000000000..9988220d878 --- /dev/null +++ b/sql/updates/auth/2013_09_10_07_auth_misc.sql @@ -0,0 +1,21 @@ +/* cs_quest.cpp */ + +SET @id = 602; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+4; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'quest'), +(@id+1, 'quest add'), +(@id+2, 'quest complete'), +(@id+3, 'quest remove'), +(@id+4, 'quest reward'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+4; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(4, @id+0), +(4, @id+1), +(4, @id+2), +(4, @id+3), +(4, @id+4); diff --git a/sql/updates/auth/2013_09_10_08_auth_misc.sql b/sql/updates/auth/2013_09_10_08_auth_misc.sql new file mode 100644 index 00000000000..c735009b7da --- /dev/null +++ b/sql/updates/auth/2013_09_10_08_auth_misc.sql @@ -0,0 +1,217 @@ +/* cs_reload.cpp */ + +SET @id = 607; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+102; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'reload'), +(@id+1, 'reload access_requirement'), +(@id+2, 'reload achievement_criteria_data'), +(@id+3, 'reload achievement_reward'), +(@id+4, 'reload all'), +(@id+5, 'reload all achievement'), +(@id+6, 'reload all area'), +(@id+7, 'reload all eventai'), +(@id+8, 'reload all gossips'), +(@id+9, 'reload all item'), +(@id+10, 'reload all locales'), +(@id+11, 'reload all loot'), +(@id+12, 'reload all npc'), +(@id+13, 'reload all quest'), +(@id+14, 'reload all scripts'), +(@id+15, 'reload all spell'), +(@id+16, 'reload areatrigger_involvedrelation'), +(@id+17, 'reload areatrigger_tavern'), +(@id+18, 'reload areatrigger_teleport'), +(@id+19, 'reload auctions'), +(@id+20, 'reload autobroadcast'), +(@id+21, 'reload command'), +(@id+22, 'reload conditions'), +(@id+23, 'reload config'), +(@id+24, 'reload creature_text'), +(@id+25, 'reload creature_ai_scripts'), +(@id+26, 'reload creature_ai_texts'), +(@id+27, 'reload creature_questender'), +(@id+28, 'reload creature_linked_respawn'), +(@id+29, 'reload creature_loot_template'), +(@id+30, 'reload creature_onkill_reputation'), +(@id+31, 'reload creature_queststarter'), +(@id+32, 'reload creature_summon_groups'), +(@id+33, 'reload creature_template'), +(@id+34, 'reload disables'), +(@id+35, 'reload disenchant_loot_template'), +(@id+36, 'reload event_scripts'), +(@id+37, 'reload fishing_loot_template'), +(@id+38, 'reload game_graveyard_zone'), +(@id+39, 'reload game_tele'), +(@id+40, 'reload gameobject_questender'), +(@id+41, 'reload gameobject_loot_template'), +(@id+42, 'reload gameobject_queststarter'), +(@id+43, 'reload gm_tickets'), +(@id+44, 'reload gossip_menu'), +(@id+45, 'reload gossip_menu_option'), +(@id+46, 'reload item_enchantment_template'), +(@id+47, 'reload item_loot_template'), +(@id+48, 'reload item_set_names'), +(@id+49, 'reload lfg_dungeon_rewards'), +(@id+50, 'reload locales_achievement_reward'), +(@id+51, 'reload locales_creature'), +(@id+52, 'reload locales_creature_text'), +(@id+53, 'reload locales_gameobject'), +(@id+54, 'reload locales_gossip_menu_option'), +(@id+55, 'reload locales_item'), +(@id+56, 'reload locales_item_set_name'), +(@id+57, 'reload locales_npc_text'), +(@id+58, 'reload locales_page_text'), +(@id+59, 'reload locales_points_of_interest'), +(@id+60, 'reload locales_quest'), +(@id+61, 'reload mail_level_reward'), +(@id+62, 'reload mail_loot_template'), +(@id+63, 'reload milling_loot_template'), +(@id+64, 'reload npc_spellclick_spells'), +(@id+65, 'reload npc_trainer'), +(@id+66, 'reload npc_vendor'), +(@id+67, 'reload page_text'), +(@id+68, 'reload pickpocketing_loot_template'), +(@id+69, 'reload points_of_interest'), +(@id+70, 'reload prospecting_loot_template'), +(@id+71, 'reload quest_poi'), +(@id+72, 'reload quest_template'), +(@id+73, 'reload rbac'), +(@id+74, 'reload reference_loot_template'), +(@id+75, 'reload reserved_name'), +(@id+76, 'reload reputation_reward_rate'), +(@id+77, 'reload reputation_spillover_template'), +(@id+78, 'reload skill_discovery_template'), +(@id+79, 'reload skill_extra_item_template'), +(@id+80, 'reload skill_fishing_base_level'), +(@id+81, 'reload skinning_loot_template'), +(@id+82, 'reload smart_scripts'), +(@id+83, 'reload spell_required'), +(@id+84, 'reload spell_area'), +(@id+85, 'reload spell_bonus_data'), +(@id+86, 'reload spell_group'), +(@id+87, 'reload spell_learn_spell'), +(@id+88, 'reload spell_loot_template'), +(@id+89, 'reload spell_linked_spell'), +(@id+90, 'reload spell_pet_auras'), +(@id+91, 'reload spell_proc_event'), +(@id+92, 'reload spell_proc'), +(@id+93, 'reload spell_scripts'), +(@id+94, 'reload spell_target_position'), +(@id+95, 'reload spell_threats'), +(@id+96, 'reload spell_group_stack_rules'), +(@id+97, 'reload trinity_string'), +(@id+98, 'reload warden_action'), +(@id+99, 'reload waypoint_scripts'), +(@id+100, 'reload waypoint_data'), +(@id+101, 'reload vehicle_accessory'), +(@id+102, 'reload vehicle_template_accessory'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+102; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(4, @id+0), +(4, @id+1), +(4, @id+2), +(4, @id+3), +(4, @id+4), +(4, @id+5), +(4, @id+6), +(4, @id+7), +(4, @id+8), +(4, @id+9), +(4, @id+10), +(4, @id+11), +(4, @id+12), +(4, @id+13), +(4, @id+14), +(4, @id+15), +(4, @id+16), +(4, @id+17), +(4, @id+18), +(4, @id+19), +(4, @id+20), +(4, @id+21), +(4, @id+22), +(4, @id+23), +(4, @id+24), +(4, @id+25), +(4, @id+26), +(4, @id+27), +(4, @id+28), +(4, @id+29), +(4, @id+30), +(4, @id+31), +(4, @id+32), +(4, @id+33), +(4, @id+34), +(4, @id+35), +(4, @id+36), +(4, @id+37), +(4, @id+38), +(4, @id+39), +(4, @id+40), +(4, @id+41), +(4, @id+42), +(4, @id+43), +(4, @id+44), +(4, @id+45), +(4, @id+46), +(4, @id+47), +(4, @id+48), +(4, @id+49), +(4, @id+50), +(4, @id+51), +(4, @id+52), +(4, @id+53), +(4, @id+54), +(4, @id+55), +(4, @id+56), +(4, @id+57), +(4, @id+58), +(4, @id+59), +(4, @id+60), +(4, @id+61), +(4, @id+62), +(4, @id+63), +(4, @id+64), +(4, @id+65), +(4, @id+66), +(4, @id+67), +(4, @id+68), +(4, @id+69), +(4, @id+70), +(4, @id+71), +(4, @id+72), +(4, @id+73), +(4, @id+74), +(4, @id+75), +(4, @id+76), +(4, @id+77), +(4, @id+78), +(4, @id+79), +(4, @id+80), +(4, @id+81), +(4, @id+82), +(4, @id+83), +(4, @id+84), +(4, @id+85), +(4, @id+86), +(4, @id+87), +(4, @id+88), +(4, @id+89), +(4, @id+90), +(4, @id+91), +(4, @id+92), +(4, @id+93), +(4, @id+94), +(4, @id+95), +(4, @id+96), +(4, @id+97), +(4, @id+98), +(4, @id+99), +(4, @id+100), +(4, @id+101), +(4, @id+102); diff --git a/sql/updates/auth/2013_09_10_09_auth_misc.sql b/sql/updates/auth/2013_09_10_09_auth_misc.sql new file mode 100644 index 00000000000..8e0e340bfec --- /dev/null +++ b/sql/updates/auth/2013_09_10_09_auth_misc.sql @@ -0,0 +1,27 @@ +/* cs_reset.cpp */ + +SET @id = 710; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+7; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'reset'), +(@id+1, 'reset achievements'), +(@id+2, 'reset honor'), +(@id+3, 'reset level'), +(@id+4, 'reset spells'), +(@id+5, 'reset stats'), +(@id+6, 'reset talents'), +(@id+7, 'reset all'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+7; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(4, @id+0), +(4, @id+1), +(4, @id+2), +(4, @id+3), +(4, @id+4), +(4, @id+5), +(4, @id+6), +(4, @id+7); diff --git a/sql/updates/auth/2013_09_10_10_auth_misc.sql b/sql/updates/auth/2013_09_10_10_auth_misc.sql new file mode 100644 index 00000000000..a0587f75bf4 --- /dev/null +++ b/sql/updates/auth/2013_09_10_10_auth_misc.sql @@ -0,0 +1,46 @@ +/* cs_server.cpp */ + +SET @id = 718; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+18; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'server'), +(@id+1, 'server corpses'), +(@id+2, 'server exit'), +(@id+3, 'server idlerestart'), +(@id+4, 'server idlerestart cancel'), +(@id+5, 'server idleshutdown'), +(@id+6, 'server idleshutdown cancel'), +(@id+7, 'server info'), +(@id+8, 'server plimit'), +(@id+9, 'server restart'), +(@id+10, 'server restart cancel'), +(@id+11, 'server set'), +(@id+12, 'server set closed'), +(@id+13, 'server set difftime'), +(@id+14, 'server set loglevel'), +(@id+15, 'server set motd'), +(@id+16, 'server shutdown'), +(@id+17, 'server shutdown cancel'), +(@id+18, 'server motd'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+18; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(4, @id+0), +(4, @id+1), +(4, @id+3), +(4, @id+4), +(4, @id+5), +(4, @id+6), +(4, @id+7), +(4, @id+8), +(4, @id+9), +(4, @id+10), +(4, @id+11), +(4, @id+12), +(4, @id+15), +(4, @id+16), +(4, @id+17), +(4, @id+18); diff --git a/sql/updates/auth/2013_09_10_11_auth_misc.sql b/sql/updates/auth/2013_09_10_11_auth_misc.sql new file mode 100644 index 00000000000..e92c1cb3fae --- /dev/null +++ b/sql/updates/auth/2013_09_10_11_auth_misc.sql @@ -0,0 +1,21 @@ +/* cs_tele.cpp */ + +SET @id = 737; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+4; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'tele'), +(@id+1, 'tele add'), +(@id+2, 'tele del'), +(@id+3, 'tele name'), +(@id+4, 'tele group'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+4; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(2, @id+0), +(4, @id+1), +(4, @id+2), +(2, @id+3), +(2, @id+4); diff --git a/sql/updates/auth/2013_09_10_12_auth_misc.sql b/sql/updates/auth/2013_09_10_12_auth_misc.sql new file mode 100644 index 00000000000..fbf78e175c6 --- /dev/null +++ b/sql/updates/auth/2013_09_10_12_auth_misc.sql @@ -0,0 +1,49 @@ +/* cs_ticket.cpp */ + +SET @id = 742; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+18; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'ticket'), +(@id+1, 'ticket assign'), +(@id+2, 'ticket close'), +(@id+3, 'ticket closedlist'), +(@id+4, 'ticket comment'), +(@id+5, 'ticket complete'), +(@id+6, 'ticket delete'), +(@id+7, 'ticket escalate'), +(@id+8, 'ticket escalatedlist'), +(@id+9, 'ticket list'), +(@id+10, 'ticket onlinelist'), +(@id+11, 'ticket reset'), +(@id+12, 'ticket response'), +(@id+13, 'ticket response append'), +(@id+14, 'ticket response appendln'), +(@id+15, 'ticket togglesystem'), +(@id+16, 'ticket unassign'), +(@id+17, 'ticket viewid'), +(@id+18, 'ticket viewname'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+18; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(2, @id+0), +(3, @id+1), +(2, @id+2), +(2, @id+3), +(2, @id+4), +(2, @id+5), +(4, @id+6), +(2, @id+7), +(3, @id+8), +(2, @id+9), +(2, @id+10), +(4, @id+11), +(2, @id+12), +(2, @id+13), +(2, @id+14), +(4, @id+15), +(3, @id+16), +(2, @id+17), +(2, @id+18); diff --git a/sql/updates/auth/2013_09_10_13_auth_misc.sql b/sql/updates/auth/2013_09_10_13_auth_misc.sql new file mode 100644 index 00000000000..becedad564d --- /dev/null +++ b/sql/updates/auth/2013_09_10_13_auth_misc.sql @@ -0,0 +1,39 @@ +/* cs_titles.cpp & cs_wp.cpp */ + +SET @id = 761; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+13; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'titles'), +(@id+1, 'titles add'), +(@id+2, 'titles current'), +(@id+3, 'titles remove'), +(@id+4, 'titles set'), +(@id+5, 'titles set mask'), +(@id+6, 'wp'), +(@id+7, 'wp add'), +(@id+8, 'wp event'), +(@id+9, 'wp load'), +(@id+10, 'wp modify'), +(@id+11, 'wp unload'), +(@id+12, 'wp reload'), +(@id+13, 'wp show'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+13; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(3, @id+0), +(3, @id+1), +(3, @id+2), +(3, @id+3), +(3, @id+4), +(3, @id+5), +(3, @id+6), +(3, @id+7), +(3, @id+8), +(3, @id+9), +(3, @id+10), +(3, @id+11), +(4, @id+12), +(3, @id+13); diff --git a/sql/updates/auth/2013_09_10_14_auth_misc.sql b/sql/updates/auth/2013_09_10_14_auth_misc.sql new file mode 100644 index 00000000000..0f24f96ca99 --- /dev/null +++ b/sql/updates/auth/2013_09_10_14_auth_misc.sql @@ -0,0 +1,4 @@ +-- Remove obsolete permissions + +DELETE FROM `rbac_role_permissions` WHERE `permissionId` IN (7, 8, 9, 10, 12); +DELETE FROM `rbac_permissions` WHERE `id` IN (7, 8, 9, 10, 12); diff --git a/sql/updates/auth/2013_09_10_15_auth_misc.sql b/sql/updates/auth/2013_09_10_15_auth_misc.sql new file mode 100644 index 00000000000..8280024f74c --- /dev/null +++ b/sql/updates/auth/2013_09_10_15_auth_misc.sql @@ -0,0 +1,92 @@ +/* account email */ +SET @amail = 263; + +-- Add new permissions for account mail +DELETE FROM `rbac_permissions` WHERE `id` = @amail; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@amail, 'account email'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` = @amail; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(1, @amail), +(2, @amail), +(3, @amail), +(4, @amail); + + +/* account set sec email + account set sec regmail */ +SET @setsec = 264; + +-- Add new permissions for account set sec +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @setsec AND @setsec+2; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@setsec+0, 'account set sec'), +(@setsec+1, 'account set sec email'), +(@setsec+2, 'account set sec regmail'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @setsec AND @setsec+2; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(4, @setsec+0), +(4, @setsec+1), +(4, @setsec+2); + +/* cs_cast.cpp */ + +SET @id = 267; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+5; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'cast'), +(@id+1, 'cast back'), +(@id+2, 'cast dist'), +(@id+3, 'cast self'), +(@id+4, 'cast target'), +(@id+5, 'cast dest'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+5; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(4, @id+0), +(4, @id+1), +(4, @id+2), +(4, @id+3), +(4, @id+4), +(4, @id+5); + +/* cs_go.cpp */ + +SET @id = 377; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+9; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'go'), +(@id+1, 'go creature'), +(@id+2, 'go graveyard'), +(@id+3, 'go grid'), +(@id+4, 'go object'), +(@id+5, 'go taxinode'), +(@id+6, 'go ticket'), +(@id+7, 'go trigger'), +(@id+8, 'go xyz'), +(@id+9, 'go zonexy'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+9; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(2, @id+0), +(2, @id+1), +(2, @id+2), +(2, @id+3), +(2, @id+4), +(2, @id+5), +(2, @id+6), +(2, @id+7), +(2, @id+8), +(2, @id+9); + +UPDATE `rbac_permissions` SET `name`='bf enable' WHERE `id`=262; diff --git a/sql/updates/world/2013_08_30_02_world_command.sql b/sql/updates/world/2013_08_30_02_world_command.sql index 7cf91342101..b6d859d5b45 100644 --- a/sql/updates/world/2013_08_30_02_world_command.sql +++ b/sql/updates/world/2013_08_30_02_world_command.sql @@ -1,16 +1,16 @@ -- Update command table with new RBAC permissions -UPDATE `command` SET `permission` = 201 WHERE `name` = '.rbac account'; -UPDATE `command` SET `permission` = 202 WHERE `name` = '.rbac account group'; -UPDATE `command` SET `permission` = 203 WHERE `name` = '.rbac account group add'; -UPDATE `command` SET `permission` = 204 WHERE `name` = '.rbac account group remove'; -UPDATE `command` SET `permission` = 205 WHERE `name` = '.rbac account role'; -UPDATE `command` SET `permission` = 206 WHERE `name` = '.rbac account role grant'; -UPDATE `command` SET `permission` = 207 WHERE `name` = '.rbac account role deny'; -UPDATE `command` SET `permission` = 208 WHERE `name` = '.rbac account role revoke'; -UPDATE `command` SET `permission` = 209 WHERE `name` = '.rbac account permission'; -UPDATE `command` SET `permission` = 210 WHERE `name` = '.rbac account permission grant'; -UPDATE `command` SET `permission` = 211 WHERE `name` = '.rbac account permission deny'; -UPDATE `command` SET `permission` = 212 WHERE `name` = '.rbac account permission revoke'; -UPDATE `command` SET `permission` = 214 WHERE `name` = '.rbac account list groups'; -UPDATE `command` SET `permission` = 215 WHERE `name` = '.rbac account list roles'; -UPDATE `command` SET `permission` = 216 WHERE `name` = '.rbac account list permissions'; +UPDATE `command` SET `permission` = 201 WHERE `name` = 'rbac account'; +UPDATE `command` SET `permission` = 202 WHERE `name` = 'rbac account group'; +UPDATE `command` SET `permission` = 203 WHERE `name` = 'rbac account group add'; +UPDATE `command` SET `permission` = 204 WHERE `name` = 'rbac account group remove'; +UPDATE `command` SET `permission` = 205 WHERE `name` = 'rbac account role'; +UPDATE `command` SET `permission` = 206 WHERE `name` = 'rbac account role grant'; +UPDATE `command` SET `permission` = 207 WHERE `name` = 'rbac account role deny'; +UPDATE `command` SET `permission` = 208 WHERE `name` = 'rbac account role revoke'; +UPDATE `command` SET `permission` = 209 WHERE `name` = 'rbac account permission'; +UPDATE `command` SET `permission` = 210 WHERE `name` = 'rbac account permission grant'; +UPDATE `command` SET `permission` = 211 WHERE `name` = 'rbac account permission deny'; +UPDATE `command` SET `permission` = 212 WHERE `name` = 'rbac account permission revoke'; +UPDATE `command` SET `permission` = 214 WHERE `name` = 'rbac account list groups'; +UPDATE `command` SET `permission` = 215 WHERE `name` = 'rbac account list roles'; +UPDATE `command` SET `permission` = 216 WHERE `name` = 'rbac account list permissions'; diff --git a/sql/updates/world/2013_09_04_00_world_sai.sql b/sql/updates/world/2013_09_04_00_world_sai.sql new file mode 100644 index 00000000000..a4614deca75 --- /dev/null +++ b/sql/updates/world/2013_09_04_00_world_sai.sql @@ -0,0 +1,52 @@ +-- Putting Olakin Back Together Again (13220) +SET @QUEST := 13220; +SET @NPC_OLAKIN := 31235; -- Crusader Olakin Sainrith +SET @GO_CLEAVER := 193092; -- The Doctor's Cleaver +SET @GO_SPOOL := 193091; -- Spool of Thread +SET @EVENT_SCRIPT := 20269; -- Event from 58856 Reanimate Crusader Olakin +SET @SPELL_FD := 35356; -- Feign Death +SET @SPELL_FAKE_BLOOD := 37692; -- Fake Blood Spurt +SET @SPELL_RESURRECTION := 58854; -- Resurrection + +DELETE FROM `gameobject` WHERE `id` IN (@GO_CLEAVER,@GO_SPOOL); +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(16974,@GO_SPOOL,571,1,1,6668.17,3268.54,669.539,2.54818,0,0,0.956304,0.292373,120,255, 1), +(16976,@GO_CLEAVER,571,1,1,6601.1,3147.78,666.916,-2.77507,0,0,-0.983254,0.182238,120,255,1); + +DELETE FROM `event_scripts` WHERE `id`=@EVENT_SCRIPT; +INSERT INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES +(@EVENT_SCRIPT,0,10,@NPC_OLAKIN,60000,0,6636.792,3211.102,668.6439,0.8901179); + +DELETE FROM `creature_template_addon` WHERE `entry`=@NPC_OLAKIN; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES +(@NPC_OLAKIN,0,0x0,0x1,'35356'); -- 31235 - 35356 + +DELETE FROM `creature_text` WHERE `entry`=@NPC_OLAKIN; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@NPC_OLAKIN,0,0,'Thank the Light for granting me another chance. And thank you, $N.',12,0,100,1,0,0,'Crusader Olakin Sainrith'), +(@NPC_OLAKIN,1,0,'Without your help, I would''ve been doomed to a life of undeath among the Lich King''s gruesome creations.', 12,0,100,1,0,0,'Crusader Olakin Sainrith'), +(@NPC_OLAKIN,2,0,'There will be time for a proper thanks later, but there is still a battle to be fought!', 12,0,100,25,0,0,'Crusader Olakin Sainrith'); + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@NPC_OLAKIN; +DELETE FROM `smart_scripts` WHERE (`source_type`=0 AND `entryorguid`=@NPC_OLAKIN) OR (`source_type`=9 AND `entryorguid`=@NPC_OLAKIN*100); +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 +(@NPC_OLAKIN,0,0,0,54,0,100,0,0,0,0,0,80,@NPC_OLAKIN*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crusader Olakin Sainrith - On Just summoned - Run Script'), +(@NPC_OLAKIN,0,1,0,40,0,100,0,3,0,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crusader Olakin Sainrith - On WP Reached - Despawn'), +-- 17,26 +(@NPC_OLAKIN*100,9,0,0,0,0,100,0,2000,2000,0,0,11,@SPELL_FAKE_BLOOD,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crusader Olakin Sainrith - On Script - Cast Spell'), +(@NPC_OLAKIN*100,9,1,0,0,0,100,0,2000,2000,0,0,11,@SPELL_RESURRECTION,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crusader Olakin Sainrith - On Script - Cast Spell'), +(@NPC_OLAKIN*100,9,2,0,0,0,100,0,0,0,0,0,28,@SPELL_FD,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crusader Olakin Sainrith - On Script - Remove Aura'), +(@NPC_OLAKIN*100,9,3,0,0,0,100,0,0,0,0,0,96,32,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crusader Olakin Sainrith - On Script - Remove dynamic flag'), +(@NPC_OLAKIN*100,9,4,0,0,0,100,0,1000,1000,0,0,19,1,1,0,0,0,0,1,0,0,0,0,0,0,0,'Crusader Olakin Sainrith - On Script - Remove Unit Flag_2 1 {dead)'), +(@NPC_OLAKIN*100,9,5,0,0,0,100,0,4000,4000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crusader Olakin Sainrith - On Script - Say 0'), +(@NPC_OLAKIN*100,9,6,0,0,0,100,0,4000,4000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crusader Olakin Sainrith - On Script - Say 1'), +(@NPC_OLAKIN*100,9,7,0,0,0,100,0,4000,4000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crusader Olakin Sainrith - On Script - Say 2'), +(@NPC_OLAKIN*100,9,8,0,0,0,100,0,3000,3000,0,0,33,@NPC_OLAKIN,0,0,0,0,0,17,0,30,0,0,0,0,0,'Crusader Olakin Sainrith - On Script - Quest Credit'), +(@NPC_OLAKIN*100,9,9,0,0,0,100,0,0,0,0,0,53,1,@NPC_OLAKIN,0,0,0,0,1,0,0,0,0,0,0,0,'Crusader Olakin Sainrith - On Script -Start WP movement'); + +DELETE FROM `waypoints` WHERE entry =@NPC_OLAKIN; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(@NPC_OLAKIN, 1, 6632.227, 3223.6350, 666.7750,'Olakin'), +(@NPC_OLAKIN, 2, 6624.2558, 3230.2343, 666.857, 'Olakin'), +(@NPC_OLAKIN, 3, 6608.985, 3234.5588, 668.779, 'Olakin'); + diff --git a/sql/updates/world/2013_09_04_01_world_sai.sql b/sql/updates/world/2013_09_04_01_world_sai.sql new file mode 100644 index 00000000000..9d9412b87e7 --- /dev/null +++ b/sql/updates/world/2013_09_04_01_world_sai.sql @@ -0,0 +1,41 @@ +-- A Cleansing Song (12735) +SET @KOOSU := 29034; +SET @HA_KHALAN := 29018; +SET @ATHA := 29033; + +-- Spirit of Koosu +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@KOOSU; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@KOOSU; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@KOOSU; +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 +(@KOOSU,0,0,0,4,0,100,1,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Spirit of Koosu - Set Phase 1 - on Aggro'), +(@KOOSU,0,1,0,4,1,100,1,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Spirit of Koosu - Stop Moving - on Aggro'), +(@KOOSU,0,2,0,4,1,100,1,0,0,0,0,11,21971,0,0,0,0,0,2,0,0,0,0,0,0,0,'Spirit of Koosu - Cast bolt - on Aggro'), +(@KOOSU,0,3,0,9,1,100,0,5,30,3500,4100,11,21971,0,0,0,0,0,2,0,0,0,0,0,0,0,'Spirit of Koosu - Cast bolt - In Range'), +(@KOOSU,0,4,0,9,1,100,0,30,100,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Spirit of Koosu - Start Moving - When not in bolt Range'), +(@KOOSU,0,5,0,9,1,100,0,9,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Spirit of Koosu - Stop Moving - 15 Yards'), +(@KOOSU,0,6,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Spirit of Koosu - Start Moving - when not in bolt Range'), +(@KOOSU,0,7,0,9,1,100,0,5,30,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Spirit of Koosu - Stop Moving - when in bolt Range'); + +-- Spirit of Ha-Khalan +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@HA_KHALAN; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@HA_KHALAN; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@HA_KHALAN; +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 +(@HA_KHALAN,0,0,0,0,0,100,0,1000,1000,125000,125000,11,50502,0,0,0,0,0,1,0,0,0,0,0,0,0,'Spirit of Ha-Khalan - IC - Cast Thick Hide'), +(@HA_KHALAN,0,1,0,0,0,100,0,5000,10000,12000,16000,11,34370,0,0,0,0,0,2,0,0,0,0,0,0,0,'Spirit of Ha-Khalan - IC - Cast Jagged Tooth Snap'), +(@HA_KHALAN,0,2,0,0,0,100,0,3000,5000,7000,11000,11,48287,0,0,0,0,0,2,0,0,0,0,0,0,0,'Spirit of Ha-Khalan - IC - Cast Powerful Bite'); + +-- Spirit of Atha +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ATHA; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ATHA; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ATHA; +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 +(@ATHA,0,0,0,0,0,100,0,8000,13000,12000,16000,11,21790,0,0,0,0,0,1,0,0,0,0,0,0,0,'Spirit of Atha - IC - Cast Aqua Jet'), +(@ATHA,0,1,0,0,0,100,0,2000,4000,5000,7000,11,3391,0,0,0,0,0,1,0,0,0,0,0,0,0,'Spirit of Atha - IC - Cast Thrash'); + +UPDATE `creature_template` SET `unit_flags`=`unit_flags`|8 WHERE `entry`=29018; -- Spirit of Ha-Khalan +-- Addon data for creature 29018 (Spirit of Ha-Khalan) +DELETE FROM `creature_template_addon` WHERE `entry`=29018; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(29018,0,0,1,0,''); -- Spirit of Ha-Khalan diff --git a/sql/updates/world/2013_09_04_02_world_spawns_sai.sql b/sql/updates/world/2013_09_04_02_world_spawns_sai.sql new file mode 100644 index 00000000000..40e238d04a2 --- /dev/null +++ b/sql/updates/world/2013_09_04_02_world_spawns_sai.sql @@ -0,0 +1,38 @@ +-- Corpulen Horror spawns in area The Fleshwerks +SET @CGUID = 127272; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=30696; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=30696; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=30696; +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 +(30696,0,0,0,9,0,100,0,8,40,3500,4100,11,50335,0,0,0,0,0,2,0,0,0,0,0,0,0,'Corpulent Horror - Cast Scourge Hook - In Range'); + +DELETE FROM `creature_template_addon` WHERE `entry`=30696; +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(30696, 0, 0x0, 0x1, ''); -- Corpulent Horror + +UPDATE `creature_template` SET `faction_A`=2102, `faction_H`=2102, `speed_walk`=1.142857, `speed_run`=1, `rangeattacktime`=2000, `unit_flags`=32768, `dynamicflags`=0 WHERE `entry`=30696; -- Corpulent Horror +DELETE FROM `creature` WHERE `id` = 30696; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(@CGUID+0, 30696, 571, 1, 1, 0, 0, 6975.386, 3462.006, 710.9403, 6.126106, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+1, 30696, 571, 1, 1, 0, 0, 6982.377, 3478.588, 710.9403, 5.811946, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+2, 30696, 571, 1, 1, 0, 0, 6920.697, 3446.544, 710.2005, 3.097477, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+3, 30696, 571, 1, 1, 0, 0, 6932.927, 3502.471, 705.0461, 3.281219, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+4, 30696, 571, 1, 1, 0, 0, 6903.668, 3478.428, 700.0414, 3.093731, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+5, 30696, 571, 1, 1, 0, 0, 6895.87, 3460.794, 700.7824, 1.592374, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+6, 30696, 571, 1, 1, 0, 0, 6868.874, 3435.562, 705.6059, 1.542484, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+7, 30696, 571, 1, 1, 0, 0, 6869.054, 3493.792, 695.7783, 5.440073, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+8, 30696, 571, 1, 1, 0, 0, 6875.154, 3513.065, 698.8162, 3.944444, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+9, 30696, 571, 1, 1, 0, 0, 6836.296, 3505.824, 690.3577, 0.5061455, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+10, 30696, 571, 1, 1, 0, 0, 6823.636, 3484.259, 688.4615, 6.278303, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+11, 30696, 571, 1, 1, 0, 0, 6729.185, 3433.822, 682.3103, 2.64319, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+12, 30696, 571, 1, 1, 0, 0, 6676.063, 3349.062, 704.616, 2.582512, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+13, 30696, 571, 1, 1, 0, 0, 6699.958, 3422.957, 679.4948, 3.363122, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+14, 30696, 571, 1, 1, 0, 0, 6548.099, 3309.558, 665.8171, 2.951326, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+15, 30696, 571, 1, 1, 0, 0, 6535.431, 3322.088, 664.9422, 5.877358, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+16, 30696, 571, 1, 1, 0, 0, 6530.748, 3296.081, 664.9409, 3.446935, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+17, 30696, 571, 1, 1, 0, 0, 6534.971, 3260.271, 666.9742, 0.2021571, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+18, 30696, 571, 1, 1, 0, 0, 6477.204, 3257.901, 643.6331, 3.804818, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+19, 30696, 571, 1, 1, 0, 0, 6488.242, 3194.719, 652.9039, 1.48353, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks) +(@CGUID+20, 30696, 571, 1, 1, 0, 0, 6412.273, 3236.912, 640.3326, 0.7460284, 120, 0, 0, 0, 0, 0, 0, 0, 0), -- Corpulent Horror (Area: The Fleshwerks +(@CGUID+21, 30696, 571, 1, 1, 0, 0, 6413.427, 3218.029, 638.4678, 0.122173, 120, 0, 0, 0, 0, 0, 0, 0, 0); -- Corpulent Horror (Area: The Fleshwerks) diff --git a/sql/updates/world/2013_09_04_03_world_isle_of_conquest.sql b/sql/updates/world/2013_09_04_03_world_isle_of_conquest.sql new file mode 100644 index 00000000000..471ee3adefb --- /dev/null +++ b/sql/updates/world/2013_09_04_03_world_isle_of_conquest.sql @@ -0,0 +1,26 @@ +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (66548,66549,66550,66551); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (66550,66551); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,66550,0,0,31,0,3,22515,0,0,0,0,'','Isle of Conquest - Teleport Fortress Out'), +(13,1,66550,0,0,35,0,1,10,1,0,0,0,'','Isle of Conquest - Teleport Fortress Out'), +(13,1,66551,0,0,31,0,3,22515,0,0,0,0,'','Isle of Conquest - Teleport Fortress In'), +(13,1,66551,0,0,35,0,1,10,1,0,0,0,'','Isle of Conquest - Teleport Fortress In'); + +SET @CGUID := 90179; +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+13; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 22515, 628, 3, 1, 392.4965, -859.4583, 48.99871, 3.036873, 7200, 0, 0), -- A IN +(@CGUID+1, 22515, 628, 3, 1, 313.2344, -918.0452, 48.85597, 4.869469, 7200, 0, 0), -- A OUT +(@CGUID+2, 22515, 628, 3, 1, 279.8698, -832.8073, 51.55094, 0, 7200, 0, 0), -- A CENTER +(@CGUID+3, 22515, 628, 3, 1, 323.4965, -883.8021, 48.99959, 1.466077, 7200, 0, 0), -- A IN +(@CGUID+4, 22515, 628, 3, 1, 430.6007, -857.0052, 48.31177, 0.1396263, 7200, 0, 0), -- A OUT +(@CGUID+5, 22515, 628, 3, 1, 325.9167, -781.8993, 49.00521, 4.590216, 7200, 0, 0), -- A IN +(@CGUID+6, 22515, 628, 3, 1, 326.2135, -744.0243, 49.43576, 1.308997, 7200, 0, 0), -- A OUT +(@CGUID+7, 22515, 628, 3, 1, 1139.498, -779.4739, 48.73496, 3.001966, 7200, 0, 0), -- H OUT +(@CGUID+8, 22515, 628, 3, 1, 1162.913, -745.908, 48.71506, 0.1396263, 7200, 0, 0), -- H IN +(@CGUID+9, 22515, 628, 3, 1, 1234.304, -688.2986, 49.22296, 4.677482, 7200, 0, 0), -- H IN +(@CGUID+10, 22515, 628, 3, 1, 1232.524, -666.3246, 48.13402, 2.303835, 7200, 0, 0), -- H OUT +(@CGUID+11, 22515, 628, 3, 1, 1233.106, -838.316, 48.99958, 1.466077, 7200, 0, 0), -- H IN +(@CGUID+12, 22515, 628, 3, 1, 1232.387, -861.0243, 48.99959, 3.560472, 7200, 0, 0), -- H OUT +(@CGUID+13, 22515, 628, 3, 1, 1296.526, -766.1823, 50.70293, 3.089233, 7200, 0, 0); -- H CENTER diff --git a/sql/updates/world/2013_09_06_00_world_misc.sql b/sql/updates/world/2013_09_06_00_world_misc.sql new file mode 100644 index 00000000000..872dc840a8b --- /dev/null +++ b/sql/updates/world/2013_09_06_00_world_misc.sql @@ -0,0 +1,4 @@ +-- Fix few startup errors +UPDATE `smart_scripts` SET `event_param3`=12555 WHERE `entryorguid`=27727 AND `source_type`=0 AND `id`=2 AND `link`=0; +DELETE FROM `creature_addon` WHERE `guid`=66177; +DELETE FROM `waypoint_data` WHERE `id`=661770; diff --git a/sql/updates/world/2013_09_06_01_world_misc.sql b/sql/updates/world/2013_09_06_01_world_misc.sql new file mode 100644 index 00000000000..10533e8354c --- /dev/null +++ b/sql/updates/world/2013_09_06_01_world_misc.sql @@ -0,0 +1,13 @@ +DELETE FROM `smart_scripts` WHERE `entryorguid`=28481 AND `source_type`=0; +UPDATE `creature_template` SET `AIName`='' WHERE `entry`=28481; + +DELETE FROM `spell_script_names` WHERE `spell_id` IN (51769,51770,58941); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(51769,'spell_q12619_emblazon_runeblade'), +(51770,'spell_q12619_emblazon_runeblade_effect'), +(58941,'spell_archavon_rock_shards'); + +DELETE FROM `spelldifficulty_dbc` WHERE `id` IN (58695,58696); +INSERT INTO `spelldifficulty_dbc`(`id`,`spellid0`,`spellid1`) VALUES +(58695,58695,60883), +(58696,58696,60884); diff --git a/sql/updates/world/2013_09_06_02_world_misc.sql b/sql/updates/world/2013_09_06_02_world_misc.sql new file mode 100644 index 00000000000..47ac870f977 --- /dev/null +++ b/sql/updates/world/2013_09_06_02_world_misc.sql @@ -0,0 +1,4 @@ +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=28481; +DELETE FROM `smart_scripts` WHERE `entryorguid`=28481 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 +(28481, 0, 0, 0, 8, 0, 100, 0, 51769, 0, 0, 0, 11, 51738, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Runeforge (SE) - On Spellhit Emblazon Runeblade - Cast Shadow Storm'); diff --git a/sql/updates/world/2013_09_07_00_world_updates.sql b/sql/updates/world/2013_09_07_00_world_updates.sql new file mode 100644 index 00000000000..93999e6202a --- /dev/null +++ b/sql/updates/world/2013_09_07_00_world_updates.sql @@ -0,0 +1,6 @@ +-- Scourge Tactics +UPDATE `smart_scripts` SET `link`=1 WHERE `entryorguid`=30273 AND `id`=0; +UPDATE `smart_scripts` SET `event_type`=61 WHERE `entryorguid`=30273 AND `id`=1; +-- Abjurist Belmara & Conjurer Luminrath +UPDATE `smart_scripts` SET `target_type`=7 WHERE `entryorguid`=19546 AND `id`=2; +UPDATE `smart_scripts` SET `target_type`=7, `target_param1`=0 WHERE `entryorguid`=19580 AND `id`=2; diff --git a/sql/updates/world/2013_09_07_01_world_sai.sql b/sql/updates/world/2013_09_07_01_world_sai.sql new file mode 100644 index 00000000000..6afbe15f7b2 --- /dev/null +++ b/sql/updates/world/2013_09_07_01_world_sai.sql @@ -0,0 +1,4 @@ +-- Do not delete query id 0 +DELETE FROM `smart_scripts` WHERE `entryorguid` =21797 AND `source_type`=0 AND `id`>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 +(21797, 0, 1, 0, 19, 0, 100, 0, 10645, 0, 0, 0, 80, 2179700, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Quest Accept - Run Script'); diff --git a/sql/updates/world/2013_09_08_00_world_sai.sql b/sql/updates/world/2013_09_08_00_world_sai.sql new file mode 100644 index 00000000000..9a65ea92910 --- /dev/null +++ b/sql/updates/world/2013_09_08_00_world_sai.sql @@ -0,0 +1,68 @@ +-- Trapping the Light Fantastic (10674) & Gather the Orbs (10859) +SET @GOB_TRAP := 185011; -- Multi-Spectrum Light Trap +SET @NPC_BUNNY := 21926; -- Multi-Spectrum Light Trap Bunny +SET @ORB_TOTEM := 22333; -- Orb Collecting Totem +SET @NPC_CREDIT := 21929; -- Trapping the Light Kill Credit Trigger +SET @NPC_ORB1 := 20635; -- Razaani Light Orb +SET @NPC_ORB2 := 20771; -- Razaani Light Orb - Mini +SET @SPELL_PULL := 28337; -- Magnetic Pull +SET @ARC_EXPLOSION := 35426; -- Arcane Explosion + +DELETE FROM `creature_template_addon` WHERE `entry` IN (@NPC_ORB1,@NPC_ORB2); +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(20635,0,0,0,4097,0,'32566'), +(20771,0,0,0,4097,0,'32566'); + +UPDATE `creature_template` SET `AIName`='SmartAI',`unit_flags`=unit_flags|0x02000000,`flags_extra`=130,`ScriptName`='' WHERE `entry` IN (@NPC_ORB1,@NPC_ORB2); +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (@NPC_ORB1,@NPC_ORB2); +UPDATE `creature` SET `MovementType`=0 WHERE `id`=@NPC_ORB1; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_ORB1,@NPC_ORB1*100,@NPC_ORB1*101,@NPC_ORB2,@NPC_ORB2*100,@NPC_ORB2*101) AND `source_type` IN (0,9); +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 +-- Alliance Version +(@NPC_ORB1,0,0,0,8,0,100,0,@SPELL_PULL,0,0,0,80,@NPC_ORB1*100,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Orb Bunny - On Spellhit - Start Action Script'), +(@NPC_ORB1*100,9,0,0,0,0,100,0,1000,1000,0,0,11,@ARC_EXPLOSION,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Orb Bunny - On Script - Cast Arcane Explosion'), +(@NPC_ORB1*100,9,1,0,0,0,100,0,500,500,0,0,45,1,1,0,0,0,0,19,@NPC_BUNNY,5,0,0,0,0,0, 'Orb Bunny - On Script - Cast Arcane Explosion'), +(@NPC_ORB1*100,9,2,0,0,0,100,0,0,0,0,0,41,100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Orb Bunny - On Script - Despawn'), +-- Horde Version +(@NPC_ORB1,0,1,0,38,0,100,0,0,1,30000,30000,69,1,0,0,0,0,0,19,@ORB_TOTEM,20,0,0,0,0,0, 'Light Orb - On Data Set 0 1 - Move to totem'), +(@NPC_ORB1,0,2,3,34,0,100,1,8,1,0,0,11,@ARC_EXPLOSION,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Light Orb - On point 1 reached - Cast arcane explosion'), +(@NPC_ORB1,0,3,4,61,0,100,0,0,0,0,0,33,@NPC_CREDIT,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Light Orb - On Link - Call kill credit'), +(@NPC_ORB1,0,4,0,61,0,100,0,0,0,0,0,80,@NPC_ORB1*101,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Light Orb - On Link - Start action list to display arcase explosion'), +(@NPC_ORB1*101,9,0,0,0,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Light Orb - Action 0 - Set unseen'), +(@NPC_ORB1*101,9,1,0,0,0,100,0,0,0,0,0,41,100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Light Orb - Action 1 - Despawn in 100 ms'), +-- Alliance Version +(@NPC_ORB2,0,0,0,8,0,100,0,@SPELL_PULL,0,0,0,80,@NPC_ORB2*100,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Orb Bunny - On Spellhit - Start Action Script'), +(@NPC_ORB2*100,9,0,0,0,0,100,0,1000,1000,0,0,11,@ARC_EXPLOSION,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Orb Bunny - On Script - Cast Arcane Explosion'), +(@NPC_ORB2*100,9,1,0,0,0,100,0,500,500,0,0,45,1,1,0,0,0,0,19,@NPC_BUNNY,5,0,0,0,0,0, 'Orb Bunny - On Script - Cast Arcane Explosion'), +(@NPC_ORB2*100,9,2,0,0,0,100,0,0,0,0,0,41,100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Orb Bunny - On Script - Despawn'), +-- Horde Version +(@NPC_ORB2,0,1,0,38,0,100,0,1,1,30000,30000,69,1,0,0,0,0,0,19,@ORB_TOTEM,20,0,0,0,0,0, 'Light Orb - On Data Set 0 1 - Move to totem'), +(@NPC_ORB2,0,2,3,34,0,100,1,8,1,0,0,11,@ARC_EXPLOSION,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Light Orb - On point 1 reached - Cast arcane explosion'), +(@NPC_ORB2,0,3,4,61,0,100,0,0,0,0,0,33,@NPC_CREDIT,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Light Orb - On Link - Call kill credit'), +(@NPC_ORB2,0,4,0,61,0,100,0,0,0,0,0,80,@NPC_ORB2*101,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Light Orb - On Link - Start action list to display arcase explosion'), +(@NPC_ORB2*101,9,0,0,0,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Light Orb - Action 0 - Set unseen'), +(@NPC_ORB2*101,9,1,0,0,0,100,0,0,0,0,0,41,100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Light Orb - Action 1 - Despawn in 100 ms'); + +-- Alliance Multi-Spectrum Light Trap +UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=130,`ScriptName`='' WHERE `entry`=@NPC_BUNNY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_BUNNY; +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 +(@NPC_BUNNY,0,0,0,54,0,100,1,0,0,0,0,50,@GOB_TRAP,30000,0,0,0,0,1,0,0,0,0,0,0,0, 'Multi-Spectrum Light Trap - On spawn - Summon gob'), +(@NPC_BUNNY,0,1,0,1,0,100,1,0,0,0,0,9,0,0,0,0,0,0,15,@GOB_TRAP,0,0,0,0,0,0, 'Multi-Spectrum Light Trap - OOC - Activate gob'), +-- +(@NPC_BUNNY,0,2,0,1,0,100,1,3000,3000,3000,3000,11,@SPELL_PULL,0,0,0,0,0,19,@NPC_ORB1,20,0,0,0,0,0, 'Multi-Spectrum Light Trap - OOC 3 sec - Pull Razaani Light Orb'), +(@NPC_BUNNY,0,3,0,1,0,100,1,3000,3000,3000,3000,11,@SPELL_PULL,0,0,0,0,0,19,@NPC_ORB2,20,0,0,0,0,0, 'Multi-Spectrum Light Trap - OOC 3 sec - Pull Razaani Light Orb - Mini'), +(@NPC_BUNNY,0,4,5,38,0,100,1,1,1,0,0,33,@NPC_CREDIT,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Multi-Spectrum Light Trap - On Data Set - Give Quest Credit'), +(@NPC_BUNNY,0,5,0,61,0,100,1,0,0,0,0,9,0,0,0,0,0,0,15,@GOB_TRAP,0,0,0,0,0,0, 'Link - Activate gob - Gob'); + +-- Horde Totem +UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=0,`ScriptName`='' WHERE `entry`=@ORB_TOTEM; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ORB_TOTEM; +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 +(@ORB_TOTEM,0,0,1,54,0,100,0,0,0,0,0,45,0,1,0,0,0,0,19,@NPC_ORB1,20,0,0,0,0,0, 'Orb collecting totem - On spawned - Set Data 0 1'), +(@ORB_TOTEM,0,1,2,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Orb collecting totem - On Link - Store invoker'), +(@ORB_TOTEM,0,2,0,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,@NPC_ORB1,20,0,0,0,0,0, 'Orb collecting totem - On Link - Send stored target list 1'), +-- +(@ORB_TOTEM,0,3,4,54,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,@NPC_ORB2,20,0,0,0,0,0, 'Orb collecting totem - On spawned - Set Data 0 1'), +(@ORB_TOTEM,0,4,5,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Orb collecting totem - On Link - Store invoker'), +(@ORB_TOTEM,0,5,0,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,@NPC_ORB2,20,0,0,0,0,0, 'Orb collecting totem - On Link - Send stored target list 1'); diff --git a/sql/updates/world/2013_09_08_01_world_update.sql b/sql/updates/world/2013_09_08_01_world_update.sql new file mode 100644 index 00000000000..e2046f0267d --- /dev/null +++ b/sql/updates/world/2013_09_08_01_world_update.sql @@ -0,0 +1,2 @@ +-- -.- >.> <.< -_- ._. +UPDATE `creature` SET `spawndist`=0 WHERE`id`=20635; diff --git a/sql/updates/world/2013_09_09_00_world_sai.sql b/sql/updates/world/2013_09_09_00_world_sai.sql new file mode 100644 index 00000000000..b2491651bbf --- /dev/null +++ b/sql/updates/world/2013_09_09_00_world_sai.sql @@ -0,0 +1,15 @@ +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN (30135,30144,29974); +DELETE FROM `smart_scripts` WHERE entryorguid IN (30135,30144,29974); +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 +-- Niffelem Forefather +(29974, 0, 0, 0, 0, 0, 100, 0, 1000, 5000, 8000, 13000, 11, 57454, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Niffelem Forefather - IC - Cast Ice Spike'), +(29974, 0, 1, 2, 8, 0, 100, 0, 55983, 0, 0, 0, 33, 30138, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Niffelem Forefather - On Spellhit - Give Kill Credit'), +(29974, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Niffelem Forefather - Linked with Previous Event Despawn'), +-- Restless Frostborn Warrior +(30135, 0, 0, 0, 0, 0, 100, 0, 1000, 5000, 8000, 13000, 11, 57456, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Restless Frostborn Warrior - IC - Cast Frostbite'), +(30135, 0, 1, 2, 8, 0, 100, 0, 55983, 0, 0, 0, 33, 30139, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Restless Frostborn Warrior - On Spellhit - Give Kill Credit'), +(30135, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Restless Frostborn Warrior - Linked with Previous Event Despawn'), +-- Restless Frostborn Ghost +(30144, 0, 0, 0, 0, 0, 100, 0, 1000, 5000, 8000, 13000, 11, 57456, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Restless Frostborn Ghost - IC - Cast Frostbite'), +(30144, 0, 1, 2, 8, 0, 100, 0, 55983, 0, 0, 0, 33, 30139, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Restless Frostborn Ghost - On Spellhit - Give Kill Credit'), +(30144, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Restless Frostborn Ghost - Linked with Previous Event Despawn'); diff --git a/sql/updates/world/2013_09_10_00_world_conditions.sql b/sql/updates/world/2013_09_10_00_world_conditions.sql new file mode 100644 index 00000000000..b18a660563a --- /dev/null +++ b/sql/updates/world/2013_09_10_00_world_conditions.sql @@ -0,0 +1,8 @@ +DELETE FROM `conditions` WHERE `SourceEntry` = 55983; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 55983, 0, 0, 31, 1, 3, 29974, 0, 0, 0, 0, '', 'Blow Hodir''s Horn can hit Niffelem Forefather'), +(17, 0, 55983, 0, 0, 36, 1, 0, 0, 0, 1, 0, 0, '', 'Blow Hodir''s Horn can only hit dead Niffelem Forefather'), +(17, 0, 55983, 0, 1, 31, 1, 3, 30144, 0, 0, 0, 0, '', 'Blow Hodir''s Horn can hit Restless Frostborn Ghost'), +(17, 0, 55983, 0, 1, 36, 1, 0, 0, 0, 1, 0, 0, '', 'Blow Hodir''s Horn can only hit dead Restless Frostborn Ghost'), +(17, 0, 55983, 0, 2, 31, 1, 3, 30135, 0, 0, 0, 0, '', 'Blow Hodir''s Horn can hit Restless Frostborn Warrior'), +(17, 0, 55983, 0, 2, 36, 1, 0, 0, 0, 1, 0, 0, '', 'Blow Hodir''s Horn can only hit dead Restless Frostborn Warrior'); diff --git a/sql/updates/world/2013_09_10_01_world_command.sql b/sql/updates/world/2013_09_10_01_world_command.sql new file mode 100644 index 00000000000..3c287422cac --- /dev/null +++ b/sql/updates/world/2013_09_10_01_world_command.sql @@ -0,0 +1,15 @@ +/* cs_group.cpp */ + +SET @id = 472; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'group'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'group leader'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'group disband'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'group remove'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'group join'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'group list'; + +UPDATE `command` SET `permission` = @id+6, `name` = 'group summon', `help` = +'Syntax: .group summon [$charactername]\r\n\r\nTeleport the given character and his group to you. Teleported only online characters but original selected group member can be offline.' +WHERE `name` = 'groupsummon'; diff --git a/sql/updates/world/2013_09_10_02_world_command.sql b/sql/updates/world/2013_09_10_02_world_command.sql new file mode 100644 index 00000000000..b3eaff43691 --- /dev/null +++ b/sql/updates/world/2013_09_10_02_world_command.sql @@ -0,0 +1,9 @@ +/* cs_pet.cpp */ + +SET @id = 479; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'pet'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'pet create'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'pet learn'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'pet unlearn'; diff --git a/sql/updates/world/2013_09_10_03_world_sai.sql b/sql/updates/world/2013_09_10_03_world_sai.sql new file mode 100644 index 00000000000..26816b6f72f --- /dev/null +++ b/sql/updates/world/2013_09_10_03_world_sai.sql @@ -0,0 +1,136 @@ +-- Test Flight Quests +-- 10557 - The Zephyrium Capacitorium(part 1) +-- 10710 - The Singing Ridge(part 2) +-- 10711 - Razaan's Landing +-- 10712 - Ruuan Weald +SET @ENTRY := 21461; -- Rally Zapnabber +SET @ENTRY2 := 21393; -- Cannon Channeler Dummy npc +SET @BEAM := 36795; -- Cannon Channel(dnd) - Visual cannon beam +SET @MENUID := 8304; -- Gossip +SET @A_MENU := 8454; -- Action Gossip +SET @A_MENU2 := 8455; -- Action Gossip 2 +SET @OPTION := 0; +SET @SPEACH := 10360; -- Text 1 +SET @SPEACH2 := 10561; -- Text 2 + +-- Disable obsolete quest +DELETE FROM `disables` WHERE `entry`=10716; +INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES +(1,10716,0,'','','Deprecated quest Test Flight: Raven''s Wood'); +-- Make Canon Channeler float & Update position to match cannon +UPDATE `creature_template` SET `InhabitType`=4, `modelid1`= 11686 ,`modelid2`=0 WHERE `entry`=@ENTRY2; +UPDATE `creature` SET `position_x`=1924.6457, `position_y`= 5575.660, `position_z`=272.1429 WHERE `guid`=74872;-- Gossip & menus 1924.1457, 5575.647, 272.1429 + +UPDATE `creature_template` SET `gossip_menu_id`=@MENUID, `AIName`= 'SmartAI' WHERE `entry`=@ENTRY; +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ENTRY2; +DELETE FROM `gossip_menu` WHERE `entry` IN (@MENUID,@A_MENU); +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(@MENUID,@SPEACH), +(@A_MENU,@SPEACH2); + +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (@MENUID,@A_MENU2,@A_MENU); +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 +(@MENUID,@OPTION+0,0,'I''m ready for my test flight!',1,1,0,0,0,0,''), -- Test Flight: The Zephyrium Capacitorium +(@MENUID,@OPTION+1,0,'Take me to Singing Ridge!',1,1,@A_MENU,0,0,0,''), -- Test Flight: The Singing Ridge +(@MENUID,@OPTION+2,0,'Take me to Razaan''s Landing!',1,1,0,0,0,0,''), -- Test Flight: Razaan's Landing +(@MENUID,@OPTION+3,0,'Take me to Ruuan Weald!',1,1,0,0,0,0,''), -- Test Flight: Ruuan Weald +(@MENUID,@OPTION+4,0,'I want to fly to an old location!',1,1,@A_MENU2,0,0,0,''), -- Old locations from completed quests +(@A_MENU2,@OPTION+1,0,'Take me to Singing Ridge.',1,1,0,0,0,0,''), +(@A_MENU2,@OPTION+2,0,'Take me to Razaan''s Landing.',1,1,0,0,0,0,''), +(@A_MENU2,@OPTION+3,0,'Take me to Ruuan Weald.',1,1,0,0,0,0,''), +(@A_MENU,@OPTION+0,0,'I have the signed Waiver! Fire me into The Singing Ridge!',1,1,0,0,0,0,''); + +-- Fix teleport spell position +DELETE FROM `spell_target_position` WHERE `Id` IN(37908,24831); +INSERT INTO `spell_target_position` (`id`, `effIndex`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES +(24831, 0, 530, 1920.07, 5582.04, 269.222, 5.1846); + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`= 37908; +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(37908, 24831, 0, 'Aura Visual Teleport - teleport'); + +-- SAI +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100,@ENTRY*101,@ENTRY*102,@ENTRY*103,@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 +(@ENTRY,0,0,1,62,0,100,0,@MENUID,@OPTION+0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rally Zapnabber - On gossip option select - Run script'), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rally Zapnabber - On gossip option select - Close gossip'), +(@ENTRY,0,2,3,62,0,100,0,@A_MENU,@OPTION+0,0,0,80,@ENTRY*101,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rally Zapnabber - On gossip option select - Run script'), +(@ENTRY,0,3,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rally Zapnabber - On gossip option select - Close gossip'), +(@ENTRY,0,4,5,62,0,100,0,@MENUID,@OPTION+2,0,0,80,@ENTRY*102,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rally Zapnabber - On gossip option select - Run script'), +(@ENTRY,0,5,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rally Zapnabber - On gossip option select - Close gossip'), +(@ENTRY,0,6,7,62,0,100,0,@MENUID,@OPTION+3,0,0,80,@ENTRY*103,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rally Zapnabber - On gossip option select - Run script'), +(@ENTRY,0,7,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rally Zapnabber - On gossip option select - Close gossip'), + +(@ENTRY,0,8,9,62,0,100,0,@A_MENU2,@OPTION+1,0,0,80,@ENTRY*101,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rally Zapnabber - On gossip option select - Run script'), +(@ENTRY,0,9,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rally Zapnabber - On gossip option select - Close gossip'), +(@ENTRY,0,10,11,62,0,100,0,@A_MENU2,@OPTION+2,0,0,80,@ENTRY*102,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rally Zapnabber - On gossip option select - Run script'), +(@ENTRY,0,11,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rally Zapnabber - On gossip option select - Close gossip'), +(@ENTRY,0,12,13,62,0,100,0,@A_MENU2,@OPTION+3,0,0,80,@ENTRY*103,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rally Zapnabber - On gossip option select - Run script'), +(@ENTRY,0,13,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rally Zapnabber - On gossip option select - Close gossip'), +-- +(@ENTRY*100,9,0,0,1,0,100,0,2000,2000,2000,2000,85,37908,0,0,0,0,0,7,0,0,0,0,0,0,0,'The Zephyrium Capacitorium - After 2 seconds - Port visual'), +(@ENTRY*100,9,1,0,1,0,100,0,2000,2000,2000,2000,45,1,1,0,0,0,0,10,74872,@ENTRY2,0,0,0,0,0,'The Zephyrium Capacitorium - After 2 seconds - Port visual'), +(@ENTRY*100,9,2,0,1,0,100,0,3000,3000,3000,3000,85,36790,0,0,0,0,0,7,0,0,0,0,0,0,0,'The Zephyrium Capacitorium - OOC Update - Invoker,cast charge state 2'), +(@ENTRY*100,9,3,0,1,0,100,0,3000,3000,3000,3000,85,36792,0,0,0,0,0,7,0,0,0,0,0,0,0,'The Zephyrium Capacitorium - OOC Update - Invoker,cast charge state 3'), +(@ENTRY*100,9,4,0,1,0,100,0,3000,3000,3000,3000,85,36800,0,0,0,0,0,7,0,0,0,0,0,0,0,'The Zephyrium Capacitorium - OOC Update - Invoker,cast charge state 4'), +(@ENTRY*100,9,5,0,1,0,100,0,3000,3000,3000,3000,85,37910,0,0,0,0,0,7,0,0,0,0,0,0,0,'The Zephyrium Capacitorium - OOC Update - Invoker,cast Soar&Credit'), +(@ENTRY*100,9,6,0,1,0,100,0,0,0,0,0,85,37108,0,0,0,0,0,7,0,0,0,0,0,0,0,'The Zephyrium Capacitorium - OOC Update - Invoker,cast Debuff'), +-- +(@ENTRY*101,9,0,0,1,0,100,0,2000,2000,2000,2000,85,37908,0,0,0,0,0,7,0,0,0,0,0,0,0,'The Singing Ridge - After 2 seconds - Port visual'), +(@ENTRY*101,9,1,0,1,0,100,0,2000,2000,2000,2000,45,1,1,0,0,0,0,10,74872,@ENTRY2,0,0,0,0,0,'The Zephyrium Capacitorium - After 2 seconds - Set Data on Channeler'), +(@ENTRY*101,9,2,0,1,0,100,0,3000,3000,3000,3000,85,36790,0,0,0,0,0,7,0,0,0,0,0,0,0,'The Singing Ridge - OOC Update - Invoker,cast charge state 2'), +(@ENTRY*101,9,3,0,1,0,100,0,3000,3000,3000,3000,85,36792,0,0,0,0,0,7,0,0,0,0,0,0,0,'The Singing Ridge - OOC Update - Invoker,cast charge state 3'), +(@ENTRY*101,9,4,0,1,0,100,0,3000,3000,3000,3000,85,36800,0,0,0,0,0,7,0,0,0,0,0,0,0,'The Singing Ridge - OOC Update - Invoker,cast charge state 4'), +(@ENTRY*101,9,5,0,1,0,100,0,3000,3000,3000,3000,85,37962,0,0,0,0,0,7,0,0,0,0,0,0,0,'The Singing Ridge - OOC Update - Invoker,cast Soar&Credit'), +(@ENTRY*101,9,6,0,1,0,100,0,0,0,0,0,85,37108,0,0,0,0,0,7,0,0,0,0,0,0,0,'The Singing Ridge - OOC Update - Invoker,cast Debuff'), +-- +(@ENTRY*102,9,0,0,1,0,100,0,2000,2000,2000,2000,85,37908,0,0,0,0,0,7,0,0,0,0,0,0,0,'Razaan''s Landing - After 2 seconds - Port visual'), +(@ENTRY*102,9,1,0,1,0,100,0,2000,2000,2000,2000,45,1,1,0,0,0,0,10,74872,@ENTRY2,0,0,0,0,0,'The Zephyrium Capacitorium - After 2 seconds - Set Data on Channeler'), +(@ENTRY*102,9,2,0,1,0,100,0,3000,3000,3000,3000,85,36790,0,0,0,0,0,7,0,0,0,0,0,0,0,'Razaan''s Landing - OOC Update - Invoker,cast charge state 2'), +(@ENTRY*102,9,3,0,1,0,100,0,3000,3000,3000,3000,85,36792,0,0,0,0,0,7,0,0,0,0,0,0,0,'Razaan''s Landing - OOC Update - Invoker,cast charge state 3'), +(@ENTRY*102,9,4,0,1,0,100,0,3000,3000,3000,3000,85,36800,0,0,0,0,0,7,0,0,0,0,0,0,0,'Razaan''s Landing - OOC Update - Invoker,cast charge state 4'), +(@ENTRY*102,9,5,0,1,0,100,0,3000,3000,3000,3000,85,36812,0,0,0,0,0,7,0,0,0,0,0,0,0,'Razaan''s Landing - OOC Update - Invoker,cast Soar&Credit'), +(@ENTRY*102,9,6,0,1,0,100,0,0,0,0,0,85,37108,0,0,0,0,0,7,0,0,0,0,0,0,0,'Razaan''s Landing - OOC Update - Invoker,cast Debuff'), +-- +(@ENTRY*103,9,0,0,1,0,100,0,2000,2000,2000,2000,85,37908,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ruuan Weald - After 2 seconds - Port visual'), +(@ENTRY*103,9,1,0,1,0,100,0,2000,2000,2000,2000,45,1,1,0,0,0,0,10,74872,@ENTRY2,0,0,0,0,0,'The Zephyrium Capacitorium - After 2 seconds - Set Data on Channeler'), +(@ENTRY*103,9,2,0,1,0,100,0,3000,3000,3000,3000,85,36790,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ruuan Weald - OOC Update - Invoker,cast charge state 2'), +(@ENTRY*103,9,3,0,1,0,100,0,3000,3000,3000,3000,85,36792,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ruuan Weald - OOC Update - Invoker,cast charge state 3'), +(@ENTRY*103,9,4,0,1,0,100,0,3000,3000,3000,3000,85,36800,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ruuan Weald - OOC Update - Invoker,cast charge state 4'), +(@ENTRY*103,9,5,0,1,0,100,0,3000,3000,3000,3000,85,37968,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ruuan Weald - OOC Update - Invoker,cast Soar&Credit'), +(@ENTRY*103,9,6,0,1,0,100,0,0,0,0,0,85,37108,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ruuan Weald - OOC Update - Invoker,cast Debuff'), +-- +(@ENTRY2,0,0,0,38,0,100,0,1,1,0,0,11,36795,0,0,0,0,0,1,0,0,0,0,0,0,0,'Beam Channel Bunny - On Data Set - Cast Cannon Beam'); + +DELETE FROM `conditions` WHERE `SourceEntry`=@BEAM OR `SourceGroup` IN (@MENUID,@A_MENU2,@A_MENU); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, @A_MENU2, 3, 0, 0, 1, 0, 37108, 0, 0, 1, 0, 0, '', 'Show gossip option 3 if player does not have aura Zephyrium Charged'), +(15, @A_MENU2, 3, 0, 0, 8, 0, 10712, 0, 0, 0, 0, 0, '', 'Show gossip option 3 if player has quest Ruuan Weald marked as rewarded'), +(15, @A_MENU2, 2, 0, 0, 8, 0, 10711, 0, 0, 0, 0, 0, '', 'Show gossip option 2 if player has quest Razaan''s Landing marked as rewarded'), +(15, @A_MENU2, 2, 0, 0, 1, 0, 37108, 0, 0, 1, 0, 0, '', 'Show gossip option 2 if player does not have aura Zephyrium Charged'), +(15, @A_MENU2, 1, 0, 0, 1, 0, 37108, 0, 0, 1, 0, 0, '', 'Show gossip option 1 if player does not have aura Zephyrium Charged'), +(15, @A_MENU2, 1, 0, 0, 8, 0, 10710, 0, 0, 0, 0, 0, '', 'Show gossip option 1 if player has quest The Singing Ridge marked as rewarded'), +(15, @A_MENU2, 4, 0, 0, 8, 0, 10557, 0, 0, 0, 0, 0, '', 'Show gossip option 4 if player has quest The Zephyrium Capacitorium marked as rewarded'), +(15, @A_MENU, 0, 0, 0, 2, 0, 30539, 1, 0, 0, 0, 0, '', 'Show gossip option 0 if player has item Tally''s Waiver (Signed)'), +(15, @MENUID, 3, 0, 0, 9, 0, 10712, 0, 0, 0, 0, 0, '', 'Show gossip option 3 if player has quest Ruuan Weald marked as taken'), +(15, @MENUID, 3, 0, 0, 1, 0, 37108, 0, 0, 1, 0, 0, '', 'Show gossip option 3 if player does not have aura Zephyrium Charged'), +(15, @MENUID, 2, 0, 0, 9, 0, 10711, 0, 0, 0, 0, 0, '', 'Show gossip option 2 if player has quest Razaan''s Landing marked as taken'), +(15, @MENUID, 2, 0, 0, 1, 0, 37108, 0, 0, 1, 0, 0, '', 'Show gossip option 2 if player does not have aura Zephyrium Charged'), +(15, @MENUID, 1, 0, 0, 9, 0, 10710, 0, 0, 0, 0, 0, '', 'Show gossip option 1 if player has quest The Singing Ridge marked as taken'), +(15, @MENUID, 1, 0, 0, 1, 0, 37108, 0, 0, 1, 0, 0, '', 'Show gossip option 1 if player does not have aura Zephyrium Charged'), +(15, @MENUID, 0, 0, 0, 9, 0, 10557, 0, 0, 0, 0, 0, '', 'Show gossip option 0 if player has quest The Zephyrium Capacitorium marked as taken'), +(15, @MENUID, 0, 0, 0, 1, 0, 37108, 0, 0, 1, 0, 0, '', 'Show gossip option 0 if player does not have aura Zephyrium Charged'), +-- +(13, 1, 36795, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Spell Cannon Channel(dnd) target player'); + +-- SAI for Rally (Questgiver) +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=21460; +DELETE FROM `smart_scripts` WHERE `entryorguid`=21460; +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 +(21460,0,0,1,62,0,100,0,8303,0,0,0,56,30540,1,0,0,0,0,7,0,0,0,0,0,0,0,'Rally Zapnabber - On gossip option select - Give Item '), +(21460,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rally Zapnabber - On gossip option select - Close gossip'); + +DELETE FROM `conditions` WHERE `SourceGroup` = 8303; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 8303, 0, 0, 0, 2, 0, 30540, 1, 1, 1, 0, 0, '', 'Only allow gossip option to be visible if player doesn''t have item'), +(15, 8303, 0, 0, 0, 9, 0, 10710, 0, 0, 0, 0, 0, '', 'Only allow gossip option to be visible if player has quest taken'); diff --git a/sql/updates/world/2013_09_10_04_world_command.sql b/sql/updates/world/2013_09_10_04_world_command.sql new file mode 100644 index 00000000000..a49c65fe9e5 --- /dev/null +++ b/sql/updates/world/2013_09_10_04_world_command.sql @@ -0,0 +1,10 @@ +/* cs_send.cpp */ + +SET @id = 483; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'send'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'send items'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'send mail'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'send message'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'send money'; diff --git a/sql/updates/world/2013_09_10_05_world_command.sql b/sql/updates/world/2013_09_10_05_world_command.sql new file mode 100644 index 00000000000..3cb64e7c02d --- /dev/null +++ b/sql/updates/world/2013_09_10_05_world_command.sql @@ -0,0 +1,53 @@ +/* cs_misc.cpp */ + +SET @id = 488; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'additem'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'additemset'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'appear'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'aura'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'bank'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'bindsight'; +UPDATE `command` SET `permission` = @id+6 WHERE `name` = 'combatstop'; +UPDATE `command` SET `permission` = @id+7 WHERE `name` = 'cometome'; +UPDATE `command` SET `permission` = @id+8 WHERE `name` = 'commands'; +UPDATE `command` SET `permission` = @id+9 WHERE `name` = 'cooldown'; +UPDATE `command` SET `permission` = @id+10 WHERE `name` = 'damage'; +UPDATE `command` SET `permission` = @id+11 WHERE `name` = 'dev'; +UPDATE `command` SET `permission` = @id+12 WHERE `name` = 'die'; +UPDATE `command` SET `permission` = @id+13 WHERE `name` = 'dismount'; +UPDATE `command` SET `permission` = @id+14 WHERE `name` = 'distance'; +UPDATE `command` SET `permission` = @id+15 WHERE `name` = 'flusharenapoints'; +UPDATE `command` SET `permission` = @id+16 WHERE `name` = 'freeze'; +UPDATE `command` SET `permission` = @id+17 WHERE `name` = 'gps'; +UPDATE `command` SET `permission` = @id+18 WHERE `name` = 'guid'; +UPDATE `command` SET `permission` = @id+19 WHERE `name` = 'help'; +UPDATE `command` SET `permission` = @id+20 WHERE `name` = 'hidearea'; +UPDATE `command` SET `permission` = @id+21 WHERE `name` = 'itemmove'; +UPDATE `command` SET `permission` = @id+22 WHERE `name` = 'kick'; +UPDATE `command` SET `permission` = @id+23 WHERE `name` = 'linkgrave'; +UPDATE `command` SET `permission` = @id+24 WHERE `name` = 'listfreeze'; +UPDATE `command` SET `permission` = @id+25 WHERE `name` = 'maxskill'; +UPDATE `command` SET `permission` = @id+26 WHERE `name` = 'movegens'; +UPDATE `command` SET `permission` = @id+27 WHERE `name` = 'mute'; +UPDATE `command` SET `permission` = @id+28 WHERE `name` = 'neargrave'; +UPDATE `command` SET `permission` = @id+29 WHERE `name` = 'pinfo'; +UPDATE `command` SET `permission` = @id+30 WHERE `name` = 'playall'; +UPDATE `command` SET `permission` = @id+31 WHERE `name` = 'possess'; +UPDATE `command` SET `permission` = @id+32 WHERE `name` = 'recall'; +UPDATE `command` SET `permission` = @id+33 WHERE `name` = 'repairitems'; +UPDATE `command` SET `permission` = @id+34 WHERE `name` = 'respawn'; +UPDATE `command` SET `permission` = @id+35 WHERE `name` = 'revive'; +UPDATE `command` SET `permission` = @id+36 WHERE `name` = 'saveall'; +UPDATE `command` SET `permission` = @id+37 WHERE `name` = 'save'; +UPDATE `command` SET `permission` = @id+38 WHERE `name` = 'setskill'; +UPDATE `command` SET `permission` = @id+39 WHERE `name` = 'showarea'; +UPDATE `command` SET `permission` = @id+40 WHERE `name` = 'summon'; +UPDATE `command` SET `permission` = @id+41 WHERE `name` = 'unaura'; +UPDATE `command` SET `permission` = @id+42 WHERE `name` = 'unbindsight'; +UPDATE `command` SET `permission` = @id+43 WHERE `name` = 'unfreeze'; +UPDATE `command` SET `permission` = @id+44 WHERE `name` = 'unmute'; +UPDATE `command` SET `permission` = @id+45 WHERE `name` = 'unpossess'; +UPDATE `command` SET `permission` = @id+46 WHERE `name` = 'unstuck'; +UPDATE `command` SET `permission` = @id+47 WHERE `name` = 'wchange'; diff --git a/sql/updates/world/2013_09_10_06_world_command.sql b/sql/updates/world/2013_09_10_06_world_command.sql new file mode 100644 index 00000000000..57aba9eadaa --- /dev/null +++ b/sql/updates/world/2013_09_10_06_world_command.sql @@ -0,0 +1,11 @@ +/* cs_mmaps.cpp */ + +SET @id = 536; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'mmap'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'mmap loadedtiles'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'mmap loc'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'mmap path'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'mmap stats'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'mmap testarea'; diff --git a/sql/updates/world/2013_09_10_07_world_command.sql b/sql/updates/world/2013_09_10_07_world_command.sql new file mode 100644 index 00000000000..b07da9730d1 --- /dev/null +++ b/sql/updates/world/2013_09_10_07_world_command.sql @@ -0,0 +1,33 @@ +/* cs_modify.cpp */ + +SET @id = 542; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'morph'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'demorph'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'modify'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'modify arenapoints'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'modify bit'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'modify drunk'; +UPDATE `command` SET `permission` = @id+6 WHERE `name` = 'modify energy'; +UPDATE `command` SET `permission` = @id+7 WHERE `name` = 'modify faction'; +UPDATE `command` SET `permission` = @id+8 WHERE `name` = 'modify gender'; +UPDATE `command` SET `permission` = @id+9 WHERE `name` = 'modify honor'; +UPDATE `command` SET `permission` = @id+10 WHERE `name` = 'modify hp'; +UPDATE `command` SET `permission` = @id+11 WHERE `name` = 'modify mana'; +UPDATE `command` SET `permission` = @id+12 WHERE `name` = 'modify money'; +UPDATE `command` SET `permission` = @id+13 WHERE `name` = 'modify mount'; +UPDATE `command` SET `permission` = @id+14 WHERE `name` = 'modify phase'; +UPDATE `command` SET `permission` = @id+15 WHERE `name` = 'modify rage'; +UPDATE `command` SET `permission` = @id+16 WHERE `name` = 'modify reputation'; +UPDATE `command` SET `permission` = @id+17 WHERE `name` = 'modify runicpower'; +UPDATE `command` SET `permission` = @id+18 WHERE `name` = 'modify scale'; +UPDATE `command` SET `permission` = @id+19 WHERE `name` = 'modify speed'; +UPDATE `command` SET `permission` = @id+20 WHERE `name` = 'modify speed all'; +UPDATE `command` SET `permission` = @id+21 WHERE `name` = 'modify speed backwalk'; +UPDATE `command` SET `permission` = @id+22 WHERE `name` = 'modify speed fly'; +UPDATE `command` SET `permission` = @id+23 WHERE `name` = 'modify speed walk'; +UPDATE `command` SET `permission` = @id+24 WHERE `name` = 'modify speed swim'; +UPDATE `command` SET `permission` = @id+25 WHERE `name` = 'modify spell'; +UPDATE `command` SET `permission` = @id+26 WHERE `name` = 'modify standstate'; +UPDATE `command` SET `permission` = @id+27 WHERE `name` = 'modify talentpoints'; diff --git a/sql/updates/world/2013_09_10_08_world_command.sql b/sql/updates/world/2013_09_10_08_world_command.sql new file mode 100644 index 00000000000..5567a5fd248 --- /dev/null +++ b/sql/updates/world/2013_09_10_08_world_command.sql @@ -0,0 +1,37 @@ +/* cs_npc.cpp */ + +SET @id = 570; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'npc'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'npc add'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'npc add formation'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'npc add item'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'npc add move'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'npc add temp'; +UPDATE `command` SET `permission` = @id+6 WHERE `name` = 'npc add delete'; +UPDATE `command` SET `permission` = @id+7 WHERE `name` = 'npc add delete item'; +UPDATE `command` SET `permission` = @id+8 WHERE `name` = 'npc add follow'; +UPDATE `command` SET `permission` = @id+9 WHERE `name` = 'npc add follow stop'; +UPDATE `command` SET `permission` = @id+10 WHERE `name` = 'npc set'; +UPDATE `command` SET `permission` = @id+11 WHERE `name` = 'npc set allowmove'; +UPDATE `command` SET `permission` = @id+12 WHERE `name` = 'npc set entry'; +UPDATE `command` SET `permission` = @id+13 WHERE `name` = 'npc set factionid'; +UPDATE `command` SET `permission` = @id+14 WHERE `name` = 'npc set flag'; +UPDATE `command` SET `permission` = @id+15 WHERE `name` = 'npc set level'; +UPDATE `command` SET `permission` = @id+16 WHERE `name` = 'npc set link'; +UPDATE `command` SET `permission` = @id+17 WHERE `name` = 'npc set model'; +UPDATE `command` SET `permission` = @id+18 WHERE `name` = 'npc set movetype'; +UPDATE `command` SET `permission` = @id+19 WHERE `name` = 'npc set phase'; +UPDATE `command` SET `permission` = @id+20 WHERE `name` = 'npc set spawndist'; +UPDATE `command` SET `permission` = @id+21 WHERE `name` = 'npc set spawntime'; +UPDATE `command` SET `permission` = @id+22 WHERE `name` = 'npc set data'; +UPDATE `command` SET `permission` = @id+23 WHERE `name` = 'npc info'; +UPDATE `command` SET `permission` = @id+24 WHERE `name` = 'npc near'; +UPDATE `command` SET `permission` = @id+25 WHERE `name` = 'npc move'; +UPDATE `command` SET `permission` = @id+26 WHERE `name` = 'npc playemote'; +UPDATE `command` SET `permission` = @id+27 WHERE `name` = 'npc say'; +UPDATE `command` SET `permission` = @id+28 WHERE `name` = 'npc textemote'; +UPDATE `command` SET `permission` = @id+29 WHERE `name` = 'npc whisper'; +UPDATE `command` SET `permission` = @id+30 WHERE `name` = 'npc yell'; +UPDATE `command` SET `permission` = @id+31 WHERE `name` = 'npc tame'; diff --git a/sql/updates/world/2013_09_10_09_world_command.sql b/sql/updates/world/2013_09_10_09_world_command.sql new file mode 100644 index 00000000000..6f4070ed588 --- /dev/null +++ b/sql/updates/world/2013_09_10_09_world_command.sql @@ -0,0 +1,10 @@ +/* cs_quest.cpp */ + +SET @id = 602; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'quest'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'quest add'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'quest complete'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'quest remove'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'quest reward'; diff --git a/sql/updates/world/2013_09_10_10_world_command.sql b/sql/updates/world/2013_09_10_10_world_command.sql new file mode 100644 index 00000000000..f7c74f01537 --- /dev/null +++ b/sql/updates/world/2013_09_10_10_world_command.sql @@ -0,0 +1,108 @@ +/* cs_reload.cpp */ + +SET @id = 607; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'reload'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'reload access_requirement'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'reload achievement_criteria_data'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'reload achievement_reward'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'reload all'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'reload all achievement'; +UPDATE `command` SET `permission` = @id+6 WHERE `name` = 'reload all area'; +UPDATE `command` SET `permission` = @id+7 WHERE `name` = 'reload all eventai'; +UPDATE `command` SET `permission` = @id+8 WHERE `name` = 'reload all gossips'; +UPDATE `command` SET `permission` = @id+9 WHERE `name` = 'reload all item'; +UPDATE `command` SET `permission` = @id+10 WHERE `name` = 'reload all locales'; +UPDATE `command` SET `permission` = @id+11 WHERE `name` = 'reload all loot'; +UPDATE `command` SET `permission` = @id+12 WHERE `name` = 'reload all npc'; +UPDATE `command` SET `permission` = @id+13 WHERE `name` = 'reload all quest'; +UPDATE `command` SET `permission` = @id+14 WHERE `name` = 'reload all scripts'; +UPDATE `command` SET `permission` = @id+15 WHERE `name` = 'reload all spell'; +UPDATE `command` SET `permission` = @id+16 WHERE `name` = 'reload areatrigger_involvedrelation'; +UPDATE `command` SET `permission` = @id+17 WHERE `name` = 'reload areatrigger_tavern'; +UPDATE `command` SET `permission` = @id+18 WHERE `name` = 'reload areatrigger_teleport'; +UPDATE `command` SET `permission` = @id+19 WHERE `name` = 'reload auctions'; +UPDATE `command` SET `permission` = @id+20 WHERE `name` = 'reload autobroadcast'; +UPDATE `command` SET `permission` = @id+21 WHERE `name` = 'reload command'; +UPDATE `command` SET `permission` = @id+22 WHERE `name` = 'reload conditions'; +UPDATE `command` SET `permission` = @id+23 WHERE `name` = 'reload config'; +UPDATE `command` SET `permission` = @id+24 WHERE `name` = 'reload creature_text'; +UPDATE `command` SET `permission` = @id+25 WHERE `name` = 'reload creature_ai_scripts'; +UPDATE `command` SET `permission` = @id+26 WHERE `name` = 'reload creature_ai_texts'; +UPDATE `command` SET `permission` = @id+27 WHERE `name` = 'reload creature_questender'; +UPDATE `command` SET `permission` = @id+28 WHERE `name` = 'reload creature_linked_respawn'; +UPDATE `command` SET `permission` = @id+29 WHERE `name` = 'reload creature_loot_template'; +UPDATE `command` SET `permission` = @id+30 WHERE `name` = 'reload creature_onkill_reputation'; +UPDATE `command` SET `permission` = @id+31 WHERE `name` = 'reload creature_queststarter'; +UPDATE `command` SET `permission` = @id+32 WHERE `name` = 'reload creature_summon_groups'; +UPDATE `command` SET `permission` = @id+33 WHERE `name` = 'reload creature_template'; +UPDATE `command` SET `permission` = @id+34 WHERE `name` = 'reload disables'; +UPDATE `command` SET `permission` = @id+35 WHERE `name` = 'reload disenchant_loot_template'; +UPDATE `command` SET `permission` = @id+36 WHERE `name` = 'reload event_scripts'; +UPDATE `command` SET `permission` = @id+37 WHERE `name` = 'reload fishing_loot_template'; +UPDATE `command` SET `permission` = @id+38 WHERE `name` = 'reload game_graveyard_zone'; +UPDATE `command` SET `permission` = @id+39 WHERE `name` = 'reload game_tele'; +UPDATE `command` SET `permission` = @id+40 WHERE `name` = 'reload gameobject_questender'; +UPDATE `command` SET `permission` = @id+41 WHERE `name` = 'reload gameobject_loot_template'; +UPDATE `command` SET `permission` = @id+42 WHERE `name` = 'reload gameobject_queststarter'; +UPDATE `command` SET `permission` = @id+43 WHERE `name` = 'reload gm_tickets'; +UPDATE `command` SET `permission` = @id+44 WHERE `name` = 'reload gossip_menu'; +UPDATE `command` SET `permission` = @id+45 WHERE `name` = 'reload gossip_menu_option'; +UPDATE `command` SET `permission` = @id+46 WHERE `name` = 'reload item_enchantment_template'; +UPDATE `command` SET `permission` = @id+47 WHERE `name` = 'reload item_loot_template'; +UPDATE `command` SET `permission` = @id+48 WHERE `name` = 'reload item_set_names'; +UPDATE `command` SET `permission` = @id+49 WHERE `name` = 'reload lfg_dungeon_rewards'; +UPDATE `command` SET `permission` = @id+50 WHERE `name` = 'reload locales_achievement_reward'; +UPDATE `command` SET `permission` = @id+51 WHERE `name` = 'reload locales_creature'; +UPDATE `command` SET `permission` = @id+52 WHERE `name` = 'reload locales_creature_text'; +UPDATE `command` SET `permission` = @id+53 WHERE `name` = 'reload locales_gameobject'; +UPDATE `command` SET `permission` = @id+54 WHERE `name` = 'reload locales_gossip_menu_option'; +UPDATE `command` SET `permission` = @id+55 WHERE `name` = 'reload locales_item'; +UPDATE `command` SET `permission` = @id+56 WHERE `name` = 'reload locales_item_set_name'; +UPDATE `command` SET `permission` = @id+57 WHERE `name` = 'reload locales_npc_text'; +UPDATE `command` SET `permission` = @id+58 WHERE `name` = 'reload locales_page_text'; +UPDATE `command` SET `permission` = @id+59 WHERE `name` = 'reload locales_points_of_interest'; +UPDATE `command` SET `permission` = @id+60 WHERE `name` = 'reload locales_quest'; +UPDATE `command` SET `permission` = @id+61 WHERE `name` = 'reload mail_level_reward'; +UPDATE `command` SET `permission` = @id+62 WHERE `name` = 'reload mail_loot_template'; +UPDATE `command` SET `permission` = @id+63 WHERE `name` = 'reload milling_loot_template'; +UPDATE `command` SET `permission` = @id+64 WHERE `name` = 'reload npc_spellclick_spells'; +UPDATE `command` SET `permission` = @id+65 WHERE `name` = 'reload npc_trainer'; +UPDATE `command` SET `permission` = @id+66 WHERE `name` = 'reload npc_vendor'; +UPDATE `command` SET `permission` = @id+67 WHERE `name` = 'reload page_text'; +UPDATE `command` SET `permission` = @id+68 WHERE `name` = 'reload pickpocketing_loot_template'; +UPDATE `command` SET `permission` = @id+69 WHERE `name` = 'reload points_of_interest'; +UPDATE `command` SET `permission` = @id+70 WHERE `name` = 'reload prospecting_loot_template'; +UPDATE `command` SET `permission` = @id+71 WHERE `name` = 'reload quest_poi'; +UPDATE `command` SET `permission` = @id+72 WHERE `name` = 'reload quest_template'; +UPDATE `command` SET `permission` = @id+73 WHERE `name` = 'reload rbac'; +UPDATE `command` SET `permission` = @id+74 WHERE `name` = 'reload reference_loot_template'; +UPDATE `command` SET `permission` = @id+75 WHERE `name` = 'reload reserved_name'; +UPDATE `command` SET `permission` = @id+76 WHERE `name` = 'reload reputation_reward_rate'; +UPDATE `command` SET `permission` = @id+77 WHERE `name` = 'reload reputation_spillover_template'; +UPDATE `command` SET `permission` = @id+78 WHERE `name` = 'reload skill_discovery_template'; +UPDATE `command` SET `permission` = @id+79 WHERE `name` = 'reload skill_extra_item_template'; +UPDATE `command` SET `permission` = @id+80 WHERE `name` = 'reload skill_fishing_base_level'; +UPDATE `command` SET `permission` = @id+81 WHERE `name` = 'reload skinning_loot_template'; +UPDATE `command` SET `permission` = @id+82 WHERE `name` = 'reload smart_scripts'; +UPDATE `command` SET `permission` = @id+83 WHERE `name` = 'reload spell_required'; +UPDATE `command` SET `permission` = @id+84 WHERE `name` = 'reload spell_area'; +UPDATE `command` SET `permission` = @id+85 WHERE `name` = 'reload spell_bonus_data'; +UPDATE `command` SET `permission` = @id+86 WHERE `name` = 'reload spell_group'; +UPDATE `command` SET `permission` = @id+87 WHERE `name` = 'reload spell_learn_spell'; +UPDATE `command` SET `permission` = @id+88 WHERE `name` = 'reload spell_loot_template'; +UPDATE `command` SET `permission` = @id+89 WHERE `name` = 'reload spell_linked_spell'; +UPDATE `command` SET `permission` = @id+90 WHERE `name` = 'reload spell_pet_auras'; +UPDATE `command` SET `permission` = @id+91 WHERE `name` = 'reload spell_proc_event'; +UPDATE `command` SET `permission` = @id+92 WHERE `name` = 'reload spell_proc'; +UPDATE `command` SET `permission` = @id+93 WHERE `name` = 'reload spell_scripts'; +UPDATE `command` SET `permission` = @id+94 WHERE `name` = 'reload spell_target_position'; +UPDATE `command` SET `permission` = @id+95 WHERE `name` = 'reload spell_threats'; +UPDATE `command` SET `permission` = @id+96 WHERE `name` = 'reload spell_group_stack_rules'; +UPDATE `command` SET `permission` = @id+97 WHERE `name` = 'reload trinity_string'; +UPDATE `command` SET `permission` = @id+98 WHERE `name` = 'reload warden_action'; +UPDATE `command` SET `permission` = @id+99 WHERE `name` = 'reload waypoint_scripts'; +UPDATE `command` SET `permission` = @id+100 WHERE `name` = 'reload waypoint_data'; +UPDATE `command` SET `permission` = @id+101 WHERE `name` = 'reload vehicle_accessory'; +UPDATE `command` SET `permission` = @id+102 WHERE `name` = 'reload vehicle_template_accessory'; diff --git a/sql/updates/world/2013_09_10_11_world_command.sql b/sql/updates/world/2013_09_10_11_world_command.sql new file mode 100644 index 00000000000..3a0dc18e804 --- /dev/null +++ b/sql/updates/world/2013_09_10_11_world_command.sql @@ -0,0 +1,13 @@ +/* cs_reset.cpp */ + +SET @id = 710; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'reset'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'reset achievements'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'reset honor'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'reset level'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'reset spells'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'reset stats'; +UPDATE `command` SET `permission` = @id+6 WHERE `name` = 'reset talents'; +UPDATE `command` SET `permission` = @id+7 WHERE `name` = 'reset all'; diff --git a/sql/updates/world/2013_09_10_12_world_command.sql b/sql/updates/world/2013_09_10_12_world_command.sql new file mode 100644 index 00000000000..58542e5a10b --- /dev/null +++ b/sql/updates/world/2013_09_10_12_world_command.sql @@ -0,0 +1,24 @@ +/* cs_server.cpp */ + +SET @id = 718; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'server'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'server corpses'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'server exit'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'server idlerestart'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'server idlerestart cancel'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'server idleshutdown'; +UPDATE `command` SET `permission` = @id+6 WHERE `name` = 'server idleshutdown cancel'; +UPDATE `command` SET `permission` = @id+7 WHERE `name` = 'server info'; +UPDATE `command` SET `permission` = @id+8 WHERE `name` = 'server plimit'; +UPDATE `command` SET `permission` = @id+9 WHERE `name` = 'server restart'; +UPDATE `command` SET `permission` = @id+10 WHERE `name` = 'server restart cancel'; +UPDATE `command` SET `permission` = @id+11 WHERE `name` = 'server set'; +UPDATE `command` SET `permission` = @id+12 WHERE `name` = 'server set closed'; +UPDATE `command` SET `permission` = @id+13 WHERE `name` = 'server set difftime'; +UPDATE `command` SET `permission` = @id+14 WHERE `name` = 'server set loglevel'; +UPDATE `command` SET `permission` = @id+15 WHERE `name` = 'server set motd'; +UPDATE `command` SET `permission` = @id+16 WHERE `name` = 'server shutdown'; +UPDATE `command` SET `permission` = @id+17 WHERE `name` = 'server shutdown cancel'; +UPDATE `command` SET `permission` = @id+18 WHERE `name` = 'server motd'; diff --git a/sql/updates/world/2013_09_10_13_world_command.sql b/sql/updates/world/2013_09_10_13_world_command.sql new file mode 100644 index 00000000000..a81b90f21bb --- /dev/null +++ b/sql/updates/world/2013_09_10_13_world_command.sql @@ -0,0 +1,10 @@ +/* cs_tele.cpp */ + +SET @id = 737; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'tele'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'tele add'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'tele del'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'tele name'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'tele group'; diff --git a/sql/updates/world/2013_09_10_14_world_command.sql b/sql/updates/world/2013_09_10_14_world_command.sql new file mode 100644 index 00000000000..36723992ed0 --- /dev/null +++ b/sql/updates/world/2013_09_10_14_world_command.sql @@ -0,0 +1,24 @@ +/* cs_ticket.cpp */ + +SET @id = 742; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'ticket'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'ticket assign'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'ticket close'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'ticket closedlist'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'ticket comment'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'ticket complete'; +UPDATE `command` SET `permission` = @id+6 WHERE `name` = 'ticket delete'; +UPDATE `command` SET `permission` = @id+7 WHERE `name` = 'ticket escalate'; +UPDATE `command` SET `permission` = @id+8 WHERE `name` = 'ticket escalatedlist'; +UPDATE `command` SET `permission` = @id+9 WHERE `name` = 'ticket list'; +UPDATE `command` SET `permission` = @id+10 WHERE `name` = 'ticket onlinelist'; +UPDATE `command` SET `permission` = @id+11 WHERE `name` = 'ticket reset'; +UPDATE `command` SET `permission` = @id+12 WHERE `name` = 'ticket response'; +UPDATE `command` SET `permission` = @id+13 WHERE `name` = 'ticket response append'; +UPDATE `command` SET `permission` = @id+14 WHERE `name` = 'ticket response appendln'; +UPDATE `command` SET `permission` = @id+15 WHERE `name` = 'ticket togglesystem'; +UPDATE `command` SET `permission` = @id+16 WHERE `name` = 'ticket unassign'; +UPDATE `command` SET `permission` = @id+17 WHERE `name` = 'ticket viewid'; +UPDATE `command` SET `permission` = @id+18 WHERE `name` = 'ticket viewname'; diff --git a/sql/updates/world/2013_09_10_15_world_command.sql b/sql/updates/world/2013_09_10_15_world_command.sql new file mode 100644 index 00000000000..1f90dfdf2a4 --- /dev/null +++ b/sql/updates/world/2013_09_10_15_world_command.sql @@ -0,0 +1,19 @@ +/* cs_titles.cpp & cs_wp.cpp */ + +SET @id = 761; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'titles'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'titles add'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'titles current'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'titles remove'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'titles set'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'titles set mask'; +UPDATE `command` SET `permission` = @id+6 WHERE `name` = 'wp'; +UPDATE `command` SET `permission` = @id+7 WHERE `name` = 'wp add'; +UPDATE `command` SET `permission` = @id+8 WHERE `name` = 'wp event'; +UPDATE `command` SET `permission` = @id+9 WHERE `name` = 'wp load'; +UPDATE `command` SET `permission` = @id+10 WHERE `name` = 'wp modify'; +UPDATE `command` SET `permission` = @id+11 WHERE `name` = 'wp unload'; +UPDATE `command` SET `permission` = @id+12 WHERE `name` = 'wp reload'; +UPDATE `command` SET `permission` = @id+13 WHERE `name` = 'wp show'; diff --git a/sql/updates/world/2013_09_10_16_world_command.sql b/sql/updates/world/2013_09_10_16_world_command.sql new file mode 100644 index 00000000000..3a3baf206b8 --- /dev/null +++ b/sql/updates/world/2013_09_10_16_world_command.sql @@ -0,0 +1,2 @@ +-- Update command table and remove obsolete permissions (0 = non existent permission) +UPDATE `command` SET `permission` = 0 WHERE `permission` IN (7, 8, 9, 10, 12); diff --git a/sql/updates/world/2013_09_10_17_world_command.sql b/sql/updates/world/2013_09_10_17_world_command.sql new file mode 100644 index 00000000000..b6d859d5b45 --- /dev/null +++ b/sql/updates/world/2013_09_10_17_world_command.sql @@ -0,0 +1,16 @@ +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = 201 WHERE `name` = 'rbac account'; +UPDATE `command` SET `permission` = 202 WHERE `name` = 'rbac account group'; +UPDATE `command` SET `permission` = 203 WHERE `name` = 'rbac account group add'; +UPDATE `command` SET `permission` = 204 WHERE `name` = 'rbac account group remove'; +UPDATE `command` SET `permission` = 205 WHERE `name` = 'rbac account role'; +UPDATE `command` SET `permission` = 206 WHERE `name` = 'rbac account role grant'; +UPDATE `command` SET `permission` = 207 WHERE `name` = 'rbac account role deny'; +UPDATE `command` SET `permission` = 208 WHERE `name` = 'rbac account role revoke'; +UPDATE `command` SET `permission` = 209 WHERE `name` = 'rbac account permission'; +UPDATE `command` SET `permission` = 210 WHERE `name` = 'rbac account permission grant'; +UPDATE `command` SET `permission` = 211 WHERE `name` = 'rbac account permission deny'; +UPDATE `command` SET `permission` = 212 WHERE `name` = 'rbac account permission revoke'; +UPDATE `command` SET `permission` = 214 WHERE `name` = 'rbac account list groups'; +UPDATE `command` SET `permission` = 215 WHERE `name` = 'rbac account list roles'; +UPDATE `command` SET `permission` = 216 WHERE `name` = 'rbac account list permissions'; diff --git a/sql/updates/world/2013_09_10_18_world_command.sql b/sql/updates/world/2013_09_10_18_world_command.sql new file mode 100644 index 00000000000..8fa30cc3851 --- /dev/null +++ b/sql/updates/world/2013_09_10_18_world_command.sql @@ -0,0 +1,9 @@ +UPDATE `command` SET `permission`=214 WHERE `name`='rbac list groups'; +UPDATE `command` SET `permission`=215 WHERE `name`='rbac list roles'; +UPDATE `command` SET `permission`=216 WHERE `name`='rbac list permissions'; +UPDATE `command` SET `permission`=262 WHERE `name`='bf enable'; +UPDATE `command` SET `permission`=576 WHERE `name`='npc delete'; +UPDATE `command` SET `permission`=577 WHERE `name`='npc delete item'; +UPDATE `command` SET `permission`=578 WHERE `name`='npc follow'; +UPDATE `command` SET `permission`=579 WHERE `name`='npc follow stop'; +UPDATE `command` SET `permission`=316 WHERE `name`='debug play cinematic'; diff --git a/sql/updates/world/2013_09_10_19_world_command.sql b/sql/updates/world/2013_09_10_19_world_command.sql new file mode 100644 index 00000000000..8efdbd3353f --- /dev/null +++ b/sql/updates/world/2013_09_10_19_world_command.sql @@ -0,0 +1,66 @@ +DELETE FROM `command` WHERE `name` = 'account email'; +DELETE FROM `command` WHERE `name` = 'account set sec email'; +DELETE FROM `command` WHERE `name` = 'account set sec regmail'; + +INSERT INTO `command` (`name`, `permission`, `help`) VALUES +('account email', 263, 'Syntax: .account email $oldemail $currentpassword $newemail $newemailconfirmation\r\n\r\n Change your account email. You may need to check the actual security mode to see if email input is necessary for password change'), +('account set sec email', 265, 'Syntax: .account set sec email $accountname $email $emailconfirmation\r\n\r\nSet the email for entered player account.'), +('account set sec regmail', 266, 'Syntax: .account set sec regmail $account $regmail $regmailconfirmation\r\n\r\nSets the regmail for entered player account.'); + +/* cs_cast.cpp */ + +SET @id = 267; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'cast'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'cast back'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'cast dist'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'cast self'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'cast target'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'cast dest'; + +/* cs_go.cpp */ + +SET @id = 377; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'go'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'go creature'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'go graveyard'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'go grid'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'go object'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'go taxinode'; +UPDATE `command` SET `permission` = @id+6 WHERE `name` = 'go ticket'; +UPDATE `command` SET `permission` = @id+7 WHERE `name` = 'go trigger'; +UPDATE `command` SET `permission` = @id+8 WHERE `name` = 'go xyz'; +UPDATE `command` SET `permission` = @id+9 WHERE `name` = 'go zonexy'; + +/* cs_gobject.cpp */ + +SET @id = 387; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'gobject'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'gobject activate'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'gobject add'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'gobject add temp'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'gobject delete'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'gobject info'; +UPDATE `command` SET `permission` = @id+6 WHERE `name` = 'gobject move'; +UPDATE `command` SET `permission` = @id+7 WHERE `name` = 'gobject near'; +UPDATE `command` SET `permission` = @id+8 WHERE `name` = 'gobject set'; +UPDATE `command` SET `permission` = @id+9 WHERE `name` = 'gobject set phase'; +UPDATE `command` SET `permission` = @id+10 WHERE `name` = 'gobject set state'; +UPDATE `command` SET `permission` = @id+11 WHERE `name` = 'gobject target'; +UPDATE `command` SET `permission` = @id+12 WHERE `name` = 'gobject turn'; + +/* cs_instance.cpp */ + +SET @id = 412; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'instance'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'instance listbinds'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'instance unbind'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'instance stats'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'instance savedata'; diff --git a/sql/updates/world/2013_09_10_20_world_creature_template.sql b/sql/updates/world/2013_09_10_20_world_creature_template.sql new file mode 100644 index 00000000000..e4f1cc77e09 --- /dev/null +++ b/sql/updates/world/2013_09_10_20_world_creature_template.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `modelid1`=1126,`modelid2`=16925 WHERE `entry`=21393; diff --git a/sql/updates/world/2013_09_10_21_world_updates.sql b/sql/updates/world/2013_09_10_21_world_updates.sql new file mode 100644 index 00000000000..1ee4261624c --- /dev/null +++ b/sql/updates/world/2013_09_10_21_world_updates.sql @@ -0,0 +1,7 @@ +-- Update for Forgotten npcs to award credit. +UPDATE `smart_scripts` SET `action_type`=85 WHERE `entryorguid`=27224 AND `source_type`=0 AND `id`=0 AND `link`=1; +UPDATE `smart_scripts` SET `action_type`=85 WHERE `entryorguid`=27225 AND `source_type`=0 AND `id`=0 AND `link`=1; +UPDATE `smart_scripts` SET `action_type`=85 WHERE `entryorguid`=27229 AND `source_type`=0 AND `id`=0 AND `link`=1; +UPDATE `smart_scripts` SET `action_type`=85 WHERE `entryorguid`=27226 AND `source_type`=0 AND `id`=0 AND `link`=1; +-- Forced model for Channel Bunny... should've used that earlier. +UPDATE `creature` SET `modelid`=16925, `position_x`=1924.63, `position_y`=5574.76, `position_z`=273.122 WHERE `guid`=74872; diff --git a/sql/updates/world/2013_09_11_00_world_cond.sql b/sql/updates/world/2013_09_11_00_world_cond.sql new file mode 100644 index 00000000000..4b0f307ef44 --- /dev/null +++ b/sql/updates/world/2013_09_11_00_world_cond.sql @@ -0,0 +1 @@ +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=8455 AND `SourceEntry`=4; diff --git a/sql/updates/world/2013_09_11_01_world_sai.sql b/sql/updates/world/2013_09_11_01_world_sai.sql new file mode 100644 index 00000000000..cb65806b29e --- /dev/null +++ b/sql/updates/world/2013_09_11_01_world_sai.sql @@ -0,0 +1,5 @@ +UPDATE `creature_template` SET`AIName`='SmartAI' WHERE `entry`=26321; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=26321; +DELETE FROM `smart_scripts` WHERE `entryorguid`=26321; +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 +(26321,0,0,0,8,0,100,1,47530,0,0,0,33,26321,0,0,0,0,0,7,0,0,0,0,0,0,0,'Lothalor Ancient - On Spellhit - Give Credit to Invoker'); diff --git a/sql/updates/world/2013_09_12_00_world_sai.sql b/sql/updates/world/2013_09_12_00_world_sai.sql new file mode 100644 index 00000000000..449eebbc258 --- /dev/null +++ b/sql/updates/world/2013_09_12_00_world_sai.sql @@ -0,0 +1,17 @@ +-- [QUEST] War Is Hell +UPDATE `creature` SET `spawntimesecs`=60 WHERE `id` IN (24009,24010); + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (24009,24010); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (24009,24010) 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 +-- Alliance Corpse +(24009, 0, 0, 1, 8, 0, 100, 1, 42793, 0, 0, 0, 11, 43297, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Alliance Corpse - SMART_EVENT_SPELLHIT - SMART_ACTION_CAST'), +(24009, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Alliance Corpse - SMART_EVENT_LINK - SMART_ACTION_FORCE_DESPAWN'), +-- Forsaken Corpse +(24010, 0, 0, 1, 8, 0, 100, 1, 42793, 0, 0, 0, 11, 43297, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Forsaken Corpse - SMART_EVENT_SPELLHIT - SMART_ACTION_CAST'), +(24010, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Forsaken Corpse - SMART_EVENT_LINK - SMART_ACTION_FORCE_DESPAWN'); + +DELETE FROM `conditions` WHERE `SourceEntry`=42793 AND `SourceTypeOrReferenceId`=17; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 42793, 0, 0, 31, 1, 3, 24009, 0, 0, 0, 0, '', ''), +(17, 0, 42793, 0, 1, 31, 1, 3, 24010, 0, 0, 0, 0, '', ''); diff --git a/sql/updates/world/2013_09_13_00_world_conditions.sql b/sql/updates/world/2013_09_13_00_world_conditions.sql new file mode 100644 index 00000000000..8f8dc774e54 --- /dev/null +++ b/sql/updates/world/2013_09_13_00_world_conditions.sql @@ -0,0 +1 @@ +UPDATE `conditions` SET `ElseGroup`=2 WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=75509; diff --git a/sql/updates/world/2013_09_14_00_world_update.sql b/sql/updates/world/2013_09_14_00_world_update.sql new file mode 100644 index 00000000000..03a7515e6b3 --- /dev/null +++ b/sql/updates/world/2013_09_14_00_world_update.sql @@ -0,0 +1 @@ +UPDATE `smart_scripts` SET `target_type`=24 WHERE `entryorguid`=2935200 AND `source_type`=9 AND `id`=0 AND `link`=0; diff --git a/sql/updates/world/2013_09_14_01_world_gobject.sql b/sql/updates/world/2013_09_14_01_world_gobject.sql new file mode 100644 index 00000000000..b2b59b0d794 --- /dev/null +++ b/sql/updates/world/2013_09_14_01_world_gobject.sql @@ -0,0 +1,3 @@ +DELETE FROM `gameobject` WHERE `id`= 15885; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(99849, 15885, 1, 1, 1, 7853.95, -2212.3, 456.397, 0, 0, 0, 0, 0, 0, 0, 1); diff --git a/sql/updates/world/2013_09_16_00_world_sai.sql b/sql/updates/world/2013_09_16_00_world_sai.sql new file mode 100644 index 00000000000..a254f55e691 --- /dev/null +++ b/sql/updates/world/2013_09_16_00_world_sai.sql @@ -0,0 +1,132 @@ +-- Fate of the Titans (12986) +-- http://www.youtube.com/watch?v=H6HED6PaxIs + +SET @NPC_DISK := 30313; -- Mobile Databank +SET @NPC_BUNNY_INVENTION := 30315; -- Temple of Invention Bunny +SET @NPC_BUNNY_LIFE := 30316; -- Temple of Life Bunny +SET @NPC_BUNNY_WINTER := 30317; -- Temple of Winter Bunny +SET @NPC_BUNNY_ORDER := 30318; -- Temple of Order Bunny +SET @NPC_BUNNY_DATASCAN := 30889; -- Data Scan Target Bunny +SET @SPELL_DATASCAN := 56523; -- Data Scan +SET @SPELL_INVENTION_KC := 56532; -- Temple of Invention Kill Credit +SET @SPELL_LIFE_KC := 56534; -- Temple of Life Kill Credit +SET @SPELL_WINTER_KC := 56533; -- Temple of Winter Kill Credit +SET @SPELL_ORDER_KC := 56535; -- Temple of Order Kill Credit +SET @GUID := 127294; + +UPDATE `creature_template` SET `AIName`='SmartAI',`speed_walk`=3.14286, `InhabitType`=4 WHERE `entry`=@NPC_DISK; +UPDATE `creature_template` SET `AIName`='SmartAI',`unit_flags`=`unit_flags`|33554432,`InhabitType`=7,`flags_extra`=`flags_extra`|128 WHERE `entry` IN (@NPC_BUNNY_INVENTION,@NPC_BUNNY_LIFE,@NPC_BUNNY_WINTER,@NPC_BUNNY_ORDER,@NPC_BUNNY_DATASCAN); + +-- Sniffed +DELETE FROM `creature` WHERE `id` IN (@NPC_BUNNY_INVENTION,@NPC_BUNNY_LIFE,@NPC_BUNNY_WINTER,@NPC_BUNNY_ORDER,@NPC_BUNNY_DATASCAN); +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES +-- Databank should go from one to another and say text +(@GUID+0,@NPC_BUNNY_INVENTION,571,1,1,0,0,7865.214,-1397.313,1534.143,3.752458,300,0,0,1,0,0,0,0,0), +(@GUID+1,@NPC_BUNNY_LIFE,571,1,1,0,0,7994.017,-2734.839,1133.662,0.3316126,300,0,0,1,0,0,0,0,0), +(@GUID+2,@NPC_BUNNY_WINTER,571,1,1,0,0,7498.68,-1899.41,1473.61,0.132902,300,0,0,1,0,0,0,0,0), +(@GUID+3,@NPC_BUNNY_ORDER,571,1,1,0,0,8194.199,-1963.597,1738.56,1.954769,300,0,0,1,0,0,0,0,0), +-- At the Temple of Order: +(@GUID+4,@NPC_BUNNY_DATASCAN,571,1,1,0,0,8130.811,-1995.321,1781.117,0.05235988,300,0,0,1,0,0,0,0,0), +(@GUID+5,@NPC_BUNNY_DATASCAN,571,1,1,0,0,8213.646,-1901.764,1744.02,0.5759587,300,0,0,1,0,0,0,0,0), +(@GUID+6,@NPC_BUNNY_DATASCAN,571,1,1,0,0,8255.328,-1982.391,1742.117,4.031711,300,0,0,1,0,0,0,0,0), +-- At the Temple of Invention: +(@GUID+7,@NPC_BUNNY_DATASCAN,571,1,1,0,0,7868.994,-1375.799,1541.754,4.712389,300,0,0,1,0,0,0,0,0), +(@GUID+8,@NPC_BUNNY_DATASCAN,571,1,1,0,0,7924.429,-1385.165,1534.788,6.038839,300,0,0,1,0,0,0,0,0), +(@GUID+9,@NPC_BUNNY_DATASCAN,571,1,1,0,0,7903.273, -1424.807, 1539.821,2.048841,300,0,0,1,0,0,0,0,0), +(@GUID+10,@NPC_BUNNY_DATASCAN,571,1,1,0,0,7863.330, -1434.625, 1537.565,3.072831,300,0,0,1,0,0,0,0,0), +-- At the Temple of Life: +(@GUID+11,@NPC_BUNNY_DATASCAN,571,1,1,0,0,7924.706,-2748.963,1151.056,4.520403,300,0,0,1,0,0,0,0,0), +(@GUID+12,@NPC_BUNNY_DATASCAN,571,1,1,0,0,8010.217,-2750.608,1151.104,0.418879,300,0,0,1,0,0,0,0,0), +(@GUID+13,@NPC_BUNNY_DATASCAN,571,1,1,0,0,8027.505,-2728.616,1139.939,3.944444,300,0,0,1,0,0,0,0,0), +(@GUID+14,@NPC_BUNNY_DATASCAN,571,1,1,0,0,7978.187,-2714.357,1137.354,2.643541,300,0,0,1,0,0,0,0,0), +-- At the Temple of Winter: +(@GUID+15,@NPC_BUNNY_DATASCAN,571,1,1,0,0,7520.712,-1929.840,1482.500,4.520403,300,0,0,1,0,0,0,0,0), +(@GUID+16,@NPC_BUNNY_DATASCAN,571,1,1,0,0,7478.601, -1917.123, 1473.615,0.418879,300,0,0,1,0,0,0,0,0), +(@GUID+17,@NPC_BUNNY_DATASCAN,571,1,1,0,0,7473.774, -1875.455, 1473.614,3.944444,300,0,0,1,0,0,0,0,0); + +-- Databank only executes SAI near Temple Bunnies +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=@NPC_DISK; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(22,1,@NPC_DISK,0,0,29,0,@NPC_BUNNY_INVENTION,15,0,0,0,'','Execute sai if near dummy npc'), +(22,2,@NPC_DISK,0,0,29,0,@NPC_BUNNY_WINTER,15,0,0,0,'','Execute sai if near dummy npc'), +(22,3,@NPC_DISK,0,0,29,0,@NPC_BUNNY_LIFE,15,0,0,0,'','Execute sai if near dummy npc'), +(22,4,@NPC_DISK,0,0,29,0,@NPC_BUNNY_ORDER,15,0,0,0,'','Execute sai if near dummy npc'); + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@NPC_DISK,@NPC_BUNNY_INVENTION); +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN (@NPC_DISK*100+0,@NPC_DISK*100+1,@NPC_DISK*100+2,@NPC_DISK*100+3); +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 +(@NPC_DISK,0,0,0,10,0,100,1,500,1000,500,1000,80,@NPC_DISK*100+0,2,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - OOC near npc - Run script'), +-- +(@NPC_DISK,0,1,0,10,0,100,1,500,1000,500,1000,80,@NPC_DISK*100+1,2,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - OOC near npc - Run script'), +-- +(@NPC_DISK,0,2,0,10,0,100,1,500,1000,500,1000,80,@NPC_DISK*100+2,2,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - OOC near npc - Run script'), +-- +(@NPC_DISK,0,3,0,10,0,100,1,500,1000,500,1000,80,@NPC_DISK*100+3,2,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - OOC near npc - Run script'), +-- +(@NPC_DISK*100+0,9,0,0,0,0,100,0,5000,5000,5000,5000,69,1,0,0,0,0,0,10,@GUID+7,@NPC_BUNNY_DATASCAN,0,0,0,0,0,'Mobile Databank - On Script - Move to Pos'), +(@NPC_DISK*100+0,9,1,0,0,0,100,0,3000,3000,3000,3000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+0,9,2,0,0,0,100,0,2000,2000,2000,2000,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+0,9,3,0,0,0,100,0,8000,8000,8000,8000,69,1,0,0,0,0,0,10,@GUID+8,@NPC_BUNNY_DATASCAN,0,0,0,0,0,'Mobile Databank - On Script - Move to Pos'), +(@NPC_DISK*100+0,9,4,0,0,0,100,0,7000,7000,7000,7000,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+0,9,5,0,0,0,100,0,9000,9000,9000,9000,69,1,0,0,0,0,0,10,@GUID+9,@NPC_BUNNY_DATASCAN,0,0,0,0,0,'Mobile Databank - On Script - Move to Pos'), +(@NPC_DISK*100+0,9,6,0,0,0,100,0,3000,3000,3000,3000,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+0,9,7,0,0,0,100,0,9000,9000,9000,9000,69,1,0,0,0,0,0,10,@GUID+10,@NPC_BUNNY_DATASCAN,0,0,0,0,0,'Mobile Databank - On Script - Move to Pos'), +(@NPC_DISK*100+0,9,8,0,0,0,100,0,3000,3000,3000,3000,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+0,9,9,0,0,0,100,0,0,0,0,0,11,@SPELL_INVENTION_KC,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On script - Cast Credit'), +-- +(@NPC_DISK*100+1,9,0,0,0,0,100,0,5000,5000,5000,5000,69,1,0,0,0,0,0,10,@GUID+15,@NPC_BUNNY_DATASCAN,0,0,0,0,0,'Mobile Databank - On Script - Move to Pos'), +(@NPC_DISK*100+1,9,1,0,0,0,100,0,3000,3000,3000,3000,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+1,9,2,0,0,0,100,0,2000,2000,2000,2000,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+1,9,3,0,0,0,100,0,8000,8000,8000,8000,69,1,0,0,0,0,0,10,@GUID+16,@NPC_BUNNY_DATASCAN,0,0,0,0,0,'Mobile Databank - On Script - Move to Pos'), +(@NPC_DISK*100+1,9,4,0,0,0,100,0,7000,7000,7000,7000,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+1,9,5,0,0,0,100,0,9000,9000,9000,9000,69,1,0,0,0,0,0,10,@GUID+17,@NPC_BUNNY_DATASCAN,0,0,0,0,0,'Mobile Databank - On Script - Move to Pos'), +(@NPC_DISK*100+1,9,6,0,0,0,100,0,3000,3000,3000,3000,1,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+1,9,7,0,0,0,100,0,3000,3000,3000,3000,1,9,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+1,9,8,0,0,0,100,0,0,0,0,0,11,@SPELL_WINTER_KC,0,0,0,0,0,7,0,0,0,0,0,0,0,'Mobile Databank - On script - Cast Credit'), +-- +(@NPC_DISK*100+2,9,0,0,0,0,100,0,5000,5000,5000,5000,69,1,0,0,0,0,0,10,@GUID+11,@NPC_BUNNY_DATASCAN,0,0,0,0,0,'Mobile Databank - On Script - Move to Pos'), +(@NPC_DISK*100+2,9,1,0,0,0,100,0,3000,3000,3000,3000,1,10,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+2,9,2,0,0,0,100,0,2000,2000,2000,2000,1,11,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+2,9,3,0,0,0,100,0,8000,8000,8000,8000,69,1,0,0,0,0,0,10,@GUID+12,@NPC_BUNNY_DATASCAN,0,0,0,0,0,'Mobile Databank - On Script - Move to Pos'), +(@NPC_DISK*100+2,9,4,0,0,0,100,0,7000,7000,7000,7000,1,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+2,9,5,0,0,0,100,0,9000,9000,9000,9000,69,1,0,0,0,0,0,10,@GUID+13,@NPC_BUNNY_DATASCAN,0,0,0,0,0,'Mobile Databank - On Script - Move to Pos'), +(@NPC_DISK*100+2,9,6,0,0,0,100,0,3000,3000,3000,3000,1,13,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+2,9,7,0,0,0,100,0,9000,9000,9000,9000,69,1,0,0,0,0,0,10,@GUID+14,@NPC_BUNNY_DATASCAN,0,0,0,0,0,'Mobile Databank - On Script - Move to Pos'), +(@NPC_DISK*100+2,9,8,0,0,0,100,0,3000,3000,3000,3000,1,14,0,0,0,0,0,1,0,0,0,0,0,0,0,'MMobile Databank - On Script - Say'), +(@NPC_DISK*100+2,9,9,0,0,0,100,0,0,0,0,0,11,@SPELL_LIFE_KC,0,0,0,0,0,7,0,0,0,0,0,0,0,'Mobile Databank - On script - Cast Credit'), +-- +(@NPC_DISK*100+3,9,0,0,0,0,100,0,5000,5000,5000,5000,69,1,0,0,0,0,0,10,@GUID+4,@NPC_BUNNY_DATASCAN,0,0,0,0,0,'Mobile Databank - On Script - Move to Pos'), +(@NPC_DISK*100+3,9,1,0,0,0,100,0,3000,3000,3000,3000,1,15,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+3,9,2,0,0,0,100,0,2000,2000,2000,2000,1,16,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+3,9,3,0,0,0,100,0,8000,8000,8000,8000,69,1,0,0,0,0,0,10,@GUID+5,@NPC_BUNNY_DATASCAN,0,0,0,0,0,'Mobile Databank - On Script - Move to Pos'), +(@NPC_DISK*100+3,9,4,0,0,0,100,0,7000,7000,7000,7000,1,17,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+3,9,5,0,0,0,100,0,9000,9000,9000,9000,69,1,0,0,0,0,0,10,@GUID+6,@NPC_BUNNY_DATASCAN,0,0,0,0,0,'Mobile Databank - On Script - Move to Pos'), +(@NPC_DISK*100+3,9,6,0,0,0,100,0,3000,3000,3000,3000,1,18,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mobile Databank - On Script - Say'), +(@NPC_DISK*100+3,9,7,0,0,0,100,0,0,0,0,0,11,@SPELL_ORDER_KC,0,0,0,0,0,7,0,0,0,0,0,0,0,'Mobile Databank - On script - Cast Credit'); + + +DELETE FROM `creature_text` WHERE `entry`=@NPC_DISK; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +-- At the Temple of Invention: +(@NPC_DISK,0,0,'Temple of Invention analysis commencing.',12,0,100,15,0,0,'Mobile Databank'), +(@NPC_DISK,1,0,'Temple of Invention verified to be in-tact.',12,0,100,15,0,0,'Mobile Databank'), +(@NPC_DISK,2,0,'Mechanical servants appear to have turned against each other. Several attendants have been piled together in an unorganized manner.',12,0,100,15,0,0,'Mobile Databank'), +(@NPC_DISK,3,0,'Remaining mechagnome guardians corrupted by unknown source.',12,0,100,15,0,0,'Mobile Databank'), +(@NPC_DISK,4,0,'Watcher Mimir verified to no longer be present. Analysis complete.',12,0,100,15,0,0,'Mobile Databank'), +-- At the Temple of Winter: +(@NPC_DISK,5,0,'Temple of Winter analysis commencing.',12,0,100,15,0,0,'Mobile Databank'), +(@NPC_DISK,6,0,'Temple of Winter verified to be in-tact.',12,0,100,15,0,0,'Mobile Databank'), +(@NPC_DISK,7,0,'Temple guardians verified to be deceased. Sulfurous odor suggests that death resulted from a fire-base entity.',12,0,100,15,0,0,'Mobile Databank'), +(@NPC_DISK,8,0,'Previously established cold weather patterns at the temple have ceased.',12,0,100,15,0,0,'Mobile Databank'), +(@NPC_DISK,9,0,'Watcher Hodir verified to no longer be present. Analysis complete.',12,0,100,15,0,0,'Mobile Databank'), +-- At the Temple of Life: +(@NPC_DISK,10,0,'Temple of Life analysis commencing.',12,0,100,15,0,0,'Mobile Databank'), +(@NPC_DISK,11,0,'Temple of Life verified to be damaged beyond repair.',12,0,100,15,0,0,'Mobile Databank'), +(@NPC_DISK,12,0,'Evidence indicates a significant battle. The opponent of Watcher Freya estimated to be of similar size and strength to Watcher Freya.',12,0,100,15,0,0,'Mobile Databank'), +(@NPC_DISK,13,0,'Temple guardians are no longer present. Plant forms associated with temple are deceased.',12,0,100,15,0,0,'Mobile Databank'), +(@NPC_DISK,14,0,'Watcher Freya verified to no longer be present. Analysis complete.',12,0,100,15,0,0,'Mobile Databank'), +-- At the Temple of Order: +(@NPC_DISK,15,0,'Temple of Order analysis commencing.',12,0,100,15,0,0,'Mobile Databank'), +(@NPC_DISK,16,0,'Temple of Order verified to be in-tact.',12,0,100,15,0,0,'Mobile Databank'), +(@NPC_DISK,17,0,'No indications of struggle are present. No guardians are present.',12,0,100,15,0,0,'Mobile Databank'), +(@NPC_DISK,18,0,'Watcher Tyr verified to no longer be present. Analysis complete.',12,0,100,15,0,0,'Mobile Databank'); diff --git a/sql/updates/world/2013_09_16_01_world_sai.sql b/sql/updates/world/2013_09_16_01_world_sai.sql new file mode 100644 index 00000000000..c9f8024c2f3 --- /dev/null +++ b/sql/updates/world/2013_09_16_01_world_sai.sql @@ -0,0 +1,13 @@ +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=1 AND `SourceEntry`=28739 AND `SourceId`=0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22,1,28739,0,0,1,1,52231,0,0,1,0,0,'','Execute sai only if aura is not presented'); +DELETE FROM `disables` WHERE `entry` IN (52227,52228) AND `sourcetype`=0; +INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES +(0,52227,64,'','','Disable LOS check for Dilute Blight Cauldron'), +(0,52228,64,'','','Disable LOS check for Kill Credit (quest 12669)'); +UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry`=28739; +DELETE FROM `smart_scripts` WHERE `entryorguid`=28739 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 +(28739,0,0,1,8,0,100,0,52227,0,0,0,11,52228,0,0,0,0,0,7,0,0,0,0,0,0,0,'Blight Cauldron Bunny 00 - On Spell Hit - Give Quest Credit'), +(28739,0,1,0,61,0,100,0,0,0,0,0,11,52231,0,0,0,0,0,1,0,0,0,0,0,0,0,'Blight Cauldron Bunny 00 - Link With Previous Event - Cast Cauldron Diluted Effect'), +(28739,0,2,0,1,0,100,0,30000,30000,30000,30000,28,52231,0,0,0,0,0,1,0,0,0,0,0,0,0,'Blight Cauldron Bunny 00 - OOC - Remove Aura From Cauldron Diluted Effect'); diff --git a/sql/updates/world/2013_09_16_02_world_sai.sql b/sql/updates/world/2013_09_16_02_world_sai.sql new file mode 100644 index 00000000000..859f85f26e0 --- /dev/null +++ b/sql/updates/world/2013_09_16_02_world_sai.sql @@ -0,0 +1,8 @@ +-- 10146 - [Mission: The Murketh and Shaadraz Gateways] +-- 10129 - [Mission: Gateways Murketh and Shaadraz] +DELETE FROM `creature_ai_scripts` WHERE `creature_id` in (19291,19292); +UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=130 WHERE `entry` IN (19291,19292); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (19291,19292) 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 +(19291,0,0,0,8,0,100,0,33655,0,0,0,33,19291,0,0,0,0,0,7,0,0,0,0,0,0,0,'Legion Transporter: Alpha - Quest Credit on Dropping The Nether Modulator Spellhit'), +(19292,0,0,0,8,0,100,0,33655,0,0,0,33,19292,0,0,0,0,0,7,0,0,0,0,0,0,0,'Legion Transporter: Beta - Quest Credit on Dropping The Nether Modulator Spellhit'); diff --git a/sql/updates/world/2013_09_17_00_world_error.sql b/sql/updates/world/2013_09_17_00_world_error.sql new file mode 100644 index 00000000000..7b859a99745 --- /dev/null +++ b/sql/updates/world/2013_09_17_00_world_error.sql @@ -0,0 +1 @@ +DELETE FROM `creature_addon` WHERE `guid`=105665; diff --git a/sql/updates/world/2013_09_17_01_world_sai_comp.sql b/sql/updates/world/2013_09_17_01_world_sai_comp.sql new file mode 100644 index 00000000000..e08e9caa74a --- /dev/null +++ b/sql/updates/world/2013_09_17_01_world_sai_comp.sql @@ -0,0 +1,49 @@ +-- Deep in the bowels of the Underhalls +UPDATE `smart_scripts` SET `target_type`=24 WHERE `entryorguid`=30409 AND `source_type`=0 AND `id`=4 AND `link`=0; +-- Guide our sights +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN(23957,23972); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (23957,23972); +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 +(23957, 0, 0, 0, 8, 0, 100, 0, 43076, 0, 0, 0, 33, 23957 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Westguard Cannon Credit Trigger East - On Spellhit - Kill Credit'), +(23972, 0, 0, 0, 8, 0, 100, 0, 43076, 0, 0, 0, 33, 23972 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Westguard Cannon Credit Trigger West - On Spellhit - Kill Credit'); +-- Baleheim Must Burn +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN(24182,24183,24184,24185); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (24182,24183,24184,24185); +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 +(24182, 0, 0, 0, 8, 0, 100, 0, 43233, 0, 0, 0, 33, 24182 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Winterskorn Dwelling Credit - On Spellhit - Kill Credit'), +(24183, 0, 0, 0, 8, 0, 100, 0, 43233, 0, 0, 0, 33, 24183 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Winterskorn Watchtower Credit - On Spellhit - Kill Credit'), +(24184, 0, 0, 0, 8, 0, 100, 0, 43233, 0, 0, 0, 33, 24184 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Winterskorn Barracks Credit - On Spellhit - Kill Credit'), +(24185, 0, 0, 0, 8, 0, 100, 0, 43233, 0, 0, 0, 33, 24185 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Winterskorn Bridge Credit - On Spellhit - Kill Credit'); +-- Forge Camp: Annihilated +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN(17998,17999,18000,18002); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (17998,17999,18000,18002); +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 +(17998, 0, 0, 0, 8, 0, 100, 0, 31736, 0, 0, 0, 33, 17998 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Umbrafen Steam Pump Credit Marker - On Spellhit - Kill Credit'), +(17999, 0, 0, 0, 8, 0, 100, 0, 31736, 0, 0, 0, 33, 17999 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Lagoon Steam Pump Credit Marker - On Spellhit - Kill Credit'), +(18000, 0, 0, 0, 8, 0, 100, 0, 31736, 0, 0, 0, 33, 18000 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Serpent Steam Pump Credit Marker - On Spellhit - Kill Credit'), +(18002, 0, 0, 0, 8, 0, 100, 0, 31736, 0, 0, 0, 33, 18002 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Marshlight Steam Pump Credit Marker - On Spellhit - Kill Credit'); +-- Balance Must Be Preserved +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN(17998,17999,18000,18002); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (17998,17999,18000,18002); +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 +(17998, 0, 0, 0, 8, 0, 100, 0, 31736, 0, 0, 0, 33, 17998 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Umbrafen Steam Pump Credit Marker - On Spellhit - Kill Credit'), +(17999, 0, 0, 0, 8, 0, 100, 0, 31736, 0, 0, 0, 33, 17999 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Lagoon Steam Pump Credit Marker - On Spellhit - Kill Credit'), +(18000, 0, 0, 0, 8, 0, 100, 0, 31736, 0, 0, 0, 33, 18000 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Serpent Steam Pump Credit Marker - On Spellhit - Kill Credit'), +(18002, 0, 0, 0, 8, 0, 100, 0, 31736, 0, 0, 0, 33, 18002 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Marshlight Steam Pump Credit Marker - On Spellhit - Kill Credit'); +-- Burn in Effigy +UPDATE `smart_scripts` SET `event_flags`=0 WHERE `entryorguid` BETWEEN 25510 AND 25513 AND `source_type`=0; +-- A Necessary Distraction +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` IN (21506); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (21506); +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 +(21506, 0, 0, 0, 8, 0, 100, 0, 37834, 0, 0, 0, 33, 21892, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Azaloth - On Spellhit - Kill Credit'); +-- Monitoring the Rift: Sundered Chasm 3.3.5 +UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry`=25308; +DELETE FROM `smart_scripts` WHERE `entryorguid`=25308 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 +(25308,0,0,0,8,0,100,0,45414,0,0,0,33,25308,0,0,0,0,0,7,0,0,0,0,0,0,0,'Borean - Westrift Chasm Anomaly - On Spell Hit - Give Quest Credit'); + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=25309; +DELETE FROM `smart_scripts` WHERE `entryorguid`=25309 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 +(25309,0,0,0,8,0,100,0,45414,0,0,0,33,25309,0,0,0,0,0,7,0,0,0,0,0,0,0,'Borean - Westrift Cavern Anomaly - On Spell Hit - Give Quest Credit'); diff --git a/sql/updates/world/2013_09_18_00_world_sai.sql b/sql/updates/world/2013_09_18_00_world_sai.sql new file mode 100644 index 00000000000..5485e4ed506 --- /dev/null +++ b/sql/updates/world/2013_09_18_00_world_sai.sql @@ -0,0 +1,5 @@ +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN(19067,19210); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (19067,19210); +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 +(19067, 0, 0, 0, 8, 0, 100, 0, 33531, 0, 0, 0, 33, 19067 , 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 'Fel Cannon: Hate - On Spellhit - Kill Credit'), +(19210, 0, 0, 0, 8, 0, 100, 0, 33532, 0, 0, 0, 33, 19210 , 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 'Fel Cannot: Fear - On Spellhit - Kill Credit'); diff --git a/sql/updates/world/2013_09_18_01_world_achievement_criteria_data.sql b/sql/updates/world/2013_09_18_01_world_achievement_criteria_data.sql new file mode 100644 index 00000000000..ffb99be70f7 --- /dev/null +++ b/sql/updates/world/2013_09_18_01_world_achievement_criteria_data.sql @@ -0,0 +1,18 @@ +UPDATE `achievement_criteria_data` SET `value2` = 3 WHERE `type`=8 AND `criteria_id` IN (2358, 2412, 3384); +UPDATE `achievement_criteria_data` SET `type` = 0 WHERE `type`=8 AND `criteria_id` IN (12066, 12067, 12132); + +DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (4944,4946,4948,4949,4950,4951,4952,4953,4954,4955,4956,4957,4958); +INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES +(4944, 0, 0, 0, ''), -- no criteria data +(4946,11, 0, 0, 'achievement_killed_exp_or_honor_target'), +(4948, 8, 1, 0, ''), -- Beast +(4949, 8, 3, 0, ''), -- Dragonkin +(4950, 8, 2, 0, ''), -- drachkin +(4951, 8, 4, 0, ''), -- Elemental +(4952, 8, 5, 0, ''), -- Giant +(4953, 8, 7, 0, ''), -- Humanoid +(4954, 8, 9, 0, ''), -- Mechanical +(4955, 8, 6, 0, ''), -- Undead +(4956, 8, 10, 0, ''), -- Not specified +(4957, 8, 11, 0, ''), -- Totem +(4958, 8, 12, 0, ''); -- Non-Combat Pet diff --git a/sql/updates/world/2013_09_19_00_world_db_errors.sql b/sql/updates/world/2013_09_19_00_world_db_errors.sql new file mode 100644 index 00000000000..cdf189c38fe --- /dev/null +++ b/sql/updates/world/2013_09_19_00_world_db_errors.sql @@ -0,0 +1,65 @@ +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=41427 WHERE `entryorguid`=23219 AND `id`=6 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=43384 WHERE `entryorguid`=23652 AND `id`=0 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=43341 WHERE `entryorguid`=23678 AND `id`=6 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=43174 WHERE `entryorguid`=23689 AND `id`=2 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=43174 WHERE `entryorguid`=24170 AND `id`=1 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=43806 WHERE `entryorguid`=24439 AND `id`=3 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=45627 WHERE `entryorguid`=25471 AND `id`=0 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=45628 WHERE `entryorguid`=25472 AND `id`=0 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=45629 WHERE `entryorguid`=25473 AND `id`=0 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=46443 WHERE `entryorguid`=25752 AND `id`=2 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=46445 WHERE `entryorguid`=25752 AND `id`=2 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=47009 WHERE `entryorguid`=26270 AND `id`=0 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=47665 WHERE `entryorguid`=26482 AND `id`=1 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=47664 WHERE `entryorguid`=26615 AND `id`=2 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=50473 WHERE `entryorguid`=27409 AND `id`=5 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=48813 WHERE `entryorguid`=27482 AND `id`=4 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=50290 WHERE `entryorguid`=28013 AND `id`=0 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=51279 WHERE `entryorguid`=28156 AND `id`=1 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=56940 WHERE `entryorguid`=29445 AND `id`=0 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=55289 WHERE `entryorguid`=29747 AND `id`=1 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=58599 WHERE `entryorguid`=31048 AND `id`=2 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=58955 WHERE `entryorguid`=31304 AND `id`=7 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=61748 WHERE `entryorguid`=32588 AND `id`=5 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=65374 WHERE `entryorguid`=34365 AND `id`=1 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=40347 WHERE `entryorguid`=2061000 AND `id`=1 AND `source_type`=9; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=40347 WHERE `entryorguid`=2077700 AND `id`=2 AND `source_type`=9; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=47683 WHERE `entryorguid`=2642000 AND `id`=5 AND `source_type`=9; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=47685 WHERE `entryorguid`=2648400 AND `id`=5 AND `source_type`=9; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=59876 WHERE `entryorguid`=3244501 AND `id`=0 AND `source_type`=9; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=75197 WHERE `entryorguid`=4032900 AND `id`=7 AND `source_type`=9; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=11024,`action_param2`=0,`action_param3`=0,`target_type`=1,`target_x`=0,`target_y`=0,`target_z`=0,`target_o`=0 WHERE `entryorguid`=7572 AND `source_type`=0 AND `id`=3 AND `link`=4; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=43160,`action_param2`=0,`action_param3`=0 WHERE `entryorguid`=23777 AND `source_type`=0 AND `id`=2 AND `link`=3; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=43326,`action_param2`=0,`target_type`=1,`target_x`=0,`target_y`=0,`target_z`=0,`target_o`=0 WHERE `entryorguid`=23931 AND `source_type`=0 AND `id`=5 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=43289,`action_param2`=0,`action_param3`=0 WHERE `entryorguid`=24210 AND `source_type`=0 AND `id`=0 AND `link`=1; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=43787,`action_param2`=0,`action_param3`=0,`target_type`=1,`target_x`=0,`target_y`=0,`target_z`=0 WHERE `entryorguid`=24399 AND `source_type`=0 AND `id`=5 AND `link`=0; +UPDATE `smart_scripts` SET `event_param3`=0,`event_param4`=0 WHERE `entryorguid`=12900 AND `source_type`=0 AND `id` IN (0,1) AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=48550,`action_param2`=0,`action_param3`=0 WHERE `entryorguid`=26633 AND `source_type`=0 AND `id`=4 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=47315,`action_param2`=0 WHERE `entryorguid`=26699 AND `source_type`=0 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=52030 WHERE `entryorguid`=28565 AND `source_type`=0 AND `id`=1 AND `link`=2; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=52220 WHERE `entryorguid`=28669 AND `source_type`=0 AND `id`=2 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=57911,`action_param2`=0,`action_param3`=0 WHERE `entryorguid`=30829 AND `source_type`=0 AND `id`=1 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=57892,`action_param2`=0,`action_param3`=0 WHERE `entryorguid`=30830 AND `source_type`=0 AND `id`=1 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=57917,`action_param2`=0,`action_param3`=0 WHERE `entryorguid`=30831 AND `source_type`=0 AND `id`=1 AND `link`=0; +-- Remove SPELL_AURA_CONTROL_VEHICLE from addon template +UPDATE `creature_template_addon` SET `auras`='50494' WHERE `entry`=28006; +UPDATE `creature_template_addon` SET `auras`='' WHERE `entry` IN (27661,28093,29838); +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=74154 WHERE `entryorguid`=1268 AND `id`=4 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=42337 WHERE `entryorguid`=4351 AND `id`=0 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=42337 WHERE `entryorguid`=4352 AND `id`=0 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=42486 WHERE `entryorguid`=4393 AND `id`=0 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=42486 WHERE `entryorguid`=4394 AND `id`=0 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=60111 WHERE `entryorguid`=5284 AND `id`=0 AND `source_type`=2; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=60112 WHERE `entryorguid`=5285 AND `id`=0 AND `source_type`=2; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=60115 WHERE `entryorguid`=5286 AND `id`=0 AND `source_type`=2; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=60117 WHERE `entryorguid`=5287 AND `id`=0 AND `source_type`=2; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=74156 WHERE `entryorguid`=6119 AND `id`=4 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=74155 WHERE `entryorguid`=7955 AND `id`=3 AND `source_type`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=61314 WHERE `entryorguid` IN (15273,15274,15294,15298) AND `id` IN (0,1) AND `source_type`=0; + + +-- Meeting the Warchief prevquest +UPDATE `quest_template` SET `PrevQuestId`=9812 WHERE `Id`=9813; + +-- Report to Orgnil prevquest +UPDATE `quest_template` SET `PrevQuestId`=805 WHERE `Id`=823; diff --git a/sql/updates/world/2013_09_19_01_world_db_errors.sql b/sql/updates/world/2013_09_19_01_world_db_errors.sql new file mode 100644 index 00000000000..ed6040a9558 --- /dev/null +++ b/sql/updates/world/2013_09_19_01_world_db_errors.sql @@ -0,0 +1,14 @@ +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=57910,`action_param2`=0,`action_param3`=0 WHERE `entryorguid`=30838 AND `source_type`=0 AND `id`=1 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=57890,`action_param2`=0,`action_param3`=0,`target_type`=1,`target_x`=0,`target_y`=0,`target_z`=0,`target_o`=0 WHERE `entryorguid`=30838 AND `source_type`=0 AND `id`=7 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=57916,`action_param2`=0,`action_param3`=0 WHERE `entryorguid`=30839 AND `source_type`=0 AND `id`=1 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=57916,`action_param2`=0,`action_param3`=0,`target_type`=1,`target_x`=0,`target_y`=0,`target_z`=0,`target_o`=0 WHERE `entryorguid`=30839 AND `source_type`=0 AND `id`=7 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=57910,`action_param2`=0,`action_param3`=0 WHERE `entryorguid`=30840 AND `source_type`=0 AND `id`=1 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=57913,`action_param2`=0,`action_param3`=0 WHERE `entryorguid`=30840 AND `source_type`=0 AND `id`=4 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=57910,`action_param2`=0,`action_param3`=0,`target_type`=1,`target_x`=0,`target_y`=0,`target_z`=0,`target_o`=0 WHERE `entryorguid`=30840 AND `source_type`=0 AND `id`=9 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=34539,`action_param2`=0 WHERE `entryorguid` IN (1972300,1972400) AND `source_type`=9 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=39217,`action_param2`=0,`action_param3`=0,`target_type`=1,`target_x`=0,`target_y`=0,`target_z`=0 WHERE `entryorguid`=2245801 AND `source_type`=9 AND `id`=7 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=47303,`action_param2`=0,`action_param3`=0 WHERE `entryorguid`=2667800 AND `source_type`=9 AND `id` IN (0,1,2,3,4); +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=55383,`action_param2`=0,`action_param3`=0,`target_type`=0,`target_x`=0,`target_y`=0,`target_z`=0,`target_o`=0 WHERE `entryorguid`=2986100 AND `source_type`=9 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=56243,`action_param2`=0,`action_param3`=0,`action_param5`=0 WHERE `entryorguid`=2991401 AND `source_type`=9 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=46443 WHERE `entryorguid` IN (25753,25758) AND `source_type`=0 AND `id`=4 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11,`action_param1`=46443 WHERE `entryorguid`=25792 AND `source_type`=0 AND `id`=2 AND `link`=0; diff --git a/sql/updates/world/2013_09_20_00_world_gameobject_template.sql b/sql/updates/world/2013_09_20_00_world_gameobject_template.sql new file mode 100644 index 00000000000..7e1f1672f0c --- /dev/null +++ b/sql/updates/world/2013_09_20_00_world_gameobject_template.sql @@ -0,0 +1,3 @@ +DELETE FROM `gameobject_template` WHERE `entry`=188509; +INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `faction`, `flags`, `size`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `AIName`, `ScriptName`, `WDBVerified`) VALUES +(188509, 6, 2770, 'Dark Iron Mole Machine (Minion Summoner Trap)', '', '', '', 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47375, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 17371); diff --git a/sql/updates/world/2013_09_20_01_world_sai.sql b/sql/updates/world/2013_09_20_01_world_sai.sql new file mode 100644 index 00000000000..d6a0524cf00 --- /dev/null +++ b/sql/updates/world/2013_09_20_01_world_sai.sql @@ -0,0 +1,538 @@ +-- Quest Chain: http://www.wowhead.com/quest=13213/battle-at-valhalas#see-also +-- Battle at Valhalas: Fallen Heroes +-- Battle at Valhalas: Khit'rix the Dark Master +-- Battle at Valhalas: The Return of Sigrid Iceborn +-- Battle at Valhalas: Carnage! +-- Battle at Valhalas: Thane Deathblow +-- Battle at Valhalas: Final Challenge +SET @NPC_GEIRRVIF := 31135; +SET @QUEST_FALLENHEROES := 13214; +SET @NPC_ELDRETH_13214 := 31195; +SET @NPC_GENESS_13214 := 31193; +SET @NPC_JHADRAS_13214 := 31191; +SET @NPC_MASUD_13214 := 31192; +SET @NPC_RITH_13214 := 31196; +SET @NPC_TALLA_13214 := 31194; +SET @QUEST_KDARKMASTER := 13215; +SET @NPC_KHITRIX_13215 := 31222; +SET @NPC_BONESPIDER_13215 := 32484; +SET @QUEST_SIGRIDICEBORN := 13216; +SET @NPC_SIGRID_13216 := 31242; +SET @NPC_SIGRID_MOUNT := 30159; +SET @QUEST_CARNAGE := 13217; +SET @NPC_CARNAGE_13217 := 31271; +SET @QUEST_THANE := 13218; +SET @NPC_THANE_13218 := 31277; +SET @QUEST_FINCHAL := 13219; +SET @NPC_PRINCESAND_13219 := 14688; +SET @NPC_GENERIC_BUNNY := 24110; +SET @CHEER_SOUND := 14998; +SET @KILL_13214 := 20; +SET @WIPE_13214 := 19; +SET @CREDIT_13214 := 1; +SET @CREDIT_13215 := 2; +SET @CREDIT_13216 := 3; +SET @CREDIT_13217 := 4; +SET @CREDIT_13218 := 5; +SET @CREDIT_13219 := 6; +SET @DESPAWN_13219 := 7; +-- Quest Progression +UPDATE `creature_template` SET `InhabitType` = 4 WHERE `entry` = 31135; +UPDATE `quest_template` SET `PrevQuestId`=13213 WHERE `Id`=13214; +UPDATE `quest_template` SET `PrevQuestId`=13214 WHERE `Id`=13215; +UPDATE `quest_template` SET `PrevQuestId`=13215 WHERE `Id`=13216; +UPDATE `quest_template` SET `PrevQuestId`=13216 WHERE `Id`=13217; +UPDATE `quest_template` SET `PrevQuestId`=13217 WHERE `Id`=13218; +UPDATE `quest_template` SET `PrevQuestId`=13218 WHERE `Id`=13219; +-- Proper template data +UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `mindmg`=311, `maxdmg`=474, `attackpower`=478, `minrangedmg`=344, `maxrangedmg`=490, `rangedattackpower`=80 WHERE `entry`=31242; +UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `mindmg`=417, `maxdmg`=582, `attackpower`=608, `minrangedmg`=341, `maxrangedmg`=506, `rangedattackpower`=80 WHERE `entry`=31271; +UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `mindmg`=445, `maxdmg`=621, `attackpower`=642, `minrangedmg`=289, `maxrangedmg`=381, `rangedattackpower`=69 WHERE `entry`=31277; +UPDATE `creature_template` SET `mindmg`=217, `maxdmg`=389, `attackpower`=357, `minrangedmg`=211, `maxrangedmg`=378, `rangedattackpower`=80 WHERE `entry`=31192; +UPDATE `creature_template` SET `mindmg`=299, `maxdmg`=411, `attackpower`=394, `minrangedmg`=373, `maxrangedmg`=541, `rangedattackpower`=69 WHERE `entry`=31193; +UPDATE `creature_template` SET `mindmg`=254, `maxdmg`=371, `attackpower`=294, `minrangedmg`=344, `maxrangedmg`=490, `rangedattackpower`=80 WHERE `entry`=31194; +UPDATE `creature_template` SET `mindmg`=417, `maxdmg`=682, `attackpower`=608, `minrangedmg`=341, `maxrangedmg`=506, `rangedattackpower`=80 WHERE `entry`=31196; + -- Template updates for creature 31191 (Father Jhadras) +UPDATE `creature_template` SET `faction_A`=21,`faction_H`=21,`unit_flags`=`unit_flags`|32768 WHERE `entry`=31191; -- Father Jhadras +-- Equipment of 31191 (Father Jhadras) +DELETE FROM `creature_equip_template` WHERE `entry`=31191; +INSERT INTO `creature_equip_template` (`entry`,`id`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES +(31191,1,13220,0,0); +-- Model data 27584 (creature 31191 (Father Jhadras)) +UPDATE `creature_model_info` SET `bounding_radius`=0.173611,`combat_reach`=0.75,`gender`=0 WHERE `modelid`=27584; -- Father Jhadras +-- Addon data for creature 31191 (Father Jhadras) +DELETE FROM `creature_template_addon` WHERE `entry`=31191; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(31191,0,0,1,0, NULL); -- Father Jhadras +-- Template updates for creature 31193 (Geness Half-Soul) +UPDATE `creature_template` SET `faction_A`=21,`faction_H`=21,`unit_flags`=`unit_flags`|32768 WHERE `entry`=31193; -- Geness Half-Soul +-- Model data 27580 (creature 31193 (Geness Half-Soul)) +UPDATE `creature_model_info` SET `bounding_radius`=0.1909721,`combat_reach`=0.825,`gender`=0 WHERE `modelid`=27580; -- Geness Half-Soul +-- Addon data for creature 31193 (Geness Half-Soul) +DELETE FROM `creature_template_addon` WHERE `entry`=31193; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(31193,0,0,1,0, NULL); -- Geness Half-Soul +-- Template updates for creature 31192 (Masud) +UPDATE `creature_template` SET `faction_A`=21,`faction_H`=21,`unit_flags`=`unit_flags`|32768 WHERE `entry`=31192; -- Masud +-- Equipment of 31192 (Masud) +DELETE FROM `creature_equip_template` WHERE `entry`=31192; +INSERT INTO `creature_equip_template` (`entry`,`id`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES +(31192,1,30388,0,0); +-- Model data 27582 (creature 31192 (Masud)) +UPDATE `creature_model_info` SET `bounding_radius`=0.2951387,`combat_reach`=1.275,`gender`=0 WHERE `modelid`=27582; -- Masud +-- Addon data for creature 31192 (Masud) +DELETE FROM `creature_template_addon` WHERE `entry`=31192; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(31192,0,0,1,0, NULL); -- Masud +-- Template updates for creature 31196 (Rith) +UPDATE `creature_template` SET `faction_A`=21,`faction_H`=21,`unit_flags`=`unit_flags`|32768 WHERE `entry`=31196; -- Rith +-- Equipment of 31196 (Rith) +DELETE FROM `creature_equip_template` WHERE `entry`=31196; +INSERT INTO `creature_equip_template` (`entry`,`id`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES +(31196,1,29631,0,0); +-- Model data 27583 (creature 31196 (Rith)) +UPDATE `creature_model_info` SET `bounding_radius`=0.2083332,`combat_reach`=0.9,`gender`=0 WHERE `modelid`=27583; -- Rith +-- Addon data for creature 31196 (Rith) +DELETE FROM `creature_template_addon` WHERE `entry`=31196; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(31196,0,0,1,0, NULL); -- Rith +-- Template updates for creature 31194 (Talla) +UPDATE `creature_template` SET `faction_A`=21,`faction_H`=21,`unit_flags`=`unit_flags`|32768,`unit_class`=4 WHERE `entry`=31194; -- Talla +-- Equipment of 31194 (Talla) +DELETE FROM `creature_equip_template` WHERE `entry`=31194; +INSERT INTO `creature_equip_template` (`entry`,`id`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES +(31194,1,34283,0,0); +-- Model data 27906 (creature 31194 (Talla)) +UPDATE `creature_model_info` SET `bounding_radius`=0.1562499,`combat_reach`=0.675,`gender`=0 WHERE `modelid`=27906; -- Talla +-- Addon data for creature 31194 (Talla) +DELETE FROM `creature_template_addon` WHERE `entry`=31194; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(31194,0,0,1,0, NULL); -- Talla +-- Template updates for creature 31222 (Khit'rix the Dark Master) +UPDATE `creature_template` SET `faction_A`=21,`faction_H`=21,`unit_flags`=`unit_flags`|33600 WHERE `entry`=31222; +-- Khit'rix the Dark Master +-- Model data 25269 (creature 31222 (Khit'rix the Dark Master)) +UPDATE `creature_model_info` SET `bounding_radius`=1.24,`combat_reach`=4,`gender`=0 WHERE `modelid`=25269; -- Khit'rix the Dark Master +-- Addon data for creature 31222 (Khit'rix the Dark Master) +DELETE FROM `creature_template_addon` WHERE `entry`=31222; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(31222,0,0,1,0, NULL); -- Khit'rix the Dark Master +-- Template updates for creature 31242 (Sigrid Iceborn) +UPDATE `creature_template` SET `faction_A`=14,`faction_H`=14,`exp`=2,`minlevel`=80,`maxlevel`=80,`unit_flags`=`unit_flags`|33600 WHERE `entry`=31242; -- Sigrid Iceborn +-- Equipment of 31242 (Sigrid Iceborn) +DELETE FROM `creature_equip_template` WHERE `entry`=31242; +INSERT INTO `creature_equip_template` (`entry`,`id`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES +(31242,1,40436,0,0); +-- Model data 27528 (creature 31242 (Sigrid Iceborn)) +UPDATE `creature_model_info` SET `bounding_radius`=0.465,`combat_reach`=1.5,`gender`=1 WHERE `modelid`=27528; +-- Sigrid Iceborn +-- Addon data for creature 31242 (Sigrid Iceborn) +DELETE FROM `creature_template_addon` WHERE `entry`=31242; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(31242,0,0,1,0, ''); +-- Sigrid Iceborn +UPDATE `creature_template` SET `speed_run`=3.14286 WHERE `entry`=30159; +-- Sigrid Iceborn's Proto Drake +DELETE FROM `creature_template_addon` WHERE `entry`=30159; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(30159,0,33554432,1,0, ''); -- Addon data for creature 30159 (Sigrid Iceborn's Proto Drake) +-- Template updates for creature 31271 (Carnage) +UPDATE `creature_template` SET `faction_A`=14,`faction_H`=14,`exp`=2,`minlevel`=80,`maxlevel`=80,`unit_flags`=`unit_flags`|33600 WHERE `entry`=31271; -- Carnage +-- Model data 24301 (creature 31271 (Carnage)) +UPDATE `creature_model_info` SET `bounding_radius`=0.62,`combat_reach`=9,`gender`=0 WHERE `modelid`=24301; -- Carnage +-- Addon data for creature 31271 (Carnage) +DELETE FROM `creature_template_addon` WHERE `entry`=31271; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(31271,0,0,1,0, NULL); -- Carnage +-- Template updates for creature 31277 (Thane Banahogg) +UPDATE `creature_template` SET `faction_A`=2116,`faction_H`=2116,`exp`=2,`minlevel`=80,`maxlevel`=80,`unit_flags`=`unit_flags`|33600,`speed_walk`=1.6,`speed_run`=1.71429 WHERE `entry`=31277; -- Thane Banahogg +-- Equipment of 31277 (Thane Banahogg) +DELETE FROM `creature_equip_template` WHERE `entry`=31277; +INSERT INTO `creature_equip_template` (`entry`,`id`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES +(31277,1,43578,0,0); +-- Model data 27551 (creature 31277 (Thane Banahogg)) +UPDATE `creature_model_info` SET `bounding_radius`=0.6076385,`combat_reach`=2.625,`gender`=0 WHERE `modelid`=27551; -- Thane Banahogg +-- Addon data for creature 31277 (Thane Banahogg) +DELETE FROM `creature_template_addon` WHERE `entry`=31277; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(31277,0,0,1,0, NULL); -- Thane Banahogg +-- Template updates for creature 14688 (Prince Sandoval) +UPDATE `creature_template` SET `faction_A`=21,`faction_H`=21,`unit_flags`=`unit_flags`|33600,`speed_walk`=2,`speed_run`=2.14286 WHERE `entry`=14688; -- Prince Sandoval +-- Equipment of 14688 (Prince Sandoval) +DELETE FROM `creature_equip_template` WHERE `entry`=14688; +INSERT INTO `creature_equip_template` (`entry`,`id`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES +(14688,1,31311,0,0); +-- Model data 27555 (creature 14688 (Prince Sandoval)) +UPDATE `creature_model_info` SET `bounding_radius`=0.62,`combat_reach`=2,`gender`=0 WHERE `modelid`=27555; -- Prince Sandoval +-- Addon data for creature 14688 (Prince Sandoval) +DELETE FROM `creature_template_addon` WHERE `entry`=14688; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(14688,0,0,0,0, NULL); -- Prince Sandoval + +UPDATE `creature_template` SET `faction_A`=16, `faction_H`=16, `AIName`='SmartAI' WHERE `entry` IN (@NPC_ELDRETH_13214, @NPC_GENESS_13214, @NPC_JHADRAS_13214, @NPC_MASUD_13214, @NPC_TALLA_13214, @NPC_RITH_13214); +DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_ELDRETH_13214 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 +(@NPC_ELDRETH_13214, 0, 0, 0, 0, 0, 80, 0, 0, 0, 6000, 12000, 11, 34829, 2, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Eldreth - IC - Cast Arcane Shot'), +(@NPC_ELDRETH_13214, 0, 1, 0, 0, 0, 80, 0, 10000, 20000, 10000, 20000, 11, 44475, 2, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Eldreth - IC - Cast Magic Dampening Field'), +(@NPC_ELDRETH_13214, 0, 2, 0, 9, 0, 80, 0, 5, 30, 3000, 6000, 11, 15620, 2, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Eldreth - On range - Cast Shoot'), +(@NPC_ELDRETH_13214, 0, 3, 0, 6, 0, 100, 1, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 11, @NPC_GENERIC_BUNNY, 100, 0, 0, 0, 0, 0, 'Eldreth - On death - Set Data'), +(@NPC_ELDRETH_13214, 0, 4, 0, 21, 0, 100, 0, 0, 0, 0, 0, 41, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Eldreth - On reach home - Despawn self'), +(@NPC_ELDRETH_13214, 0, 5, 0, 21, 0, 100, 0, 0, 0, 0, 0, 45, @WIPE_13214, @WIPE_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Eldreth - On reach home - Set Data'), +(@NPC_ELDRETH_13214, 0, 6, 0, 5, 0, 100, 0, 0, 0, 0, 0, 45, @KILL_13214, @KILL_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0,0, 0, 0, 'Eldreth - On kill target - Set Data'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_GENESS_13214 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 +(@NPC_GENESS_13214, 0, 0, 0, 0, 0, 80, 0, 2000, 6000, 3000, 7000, 11, 61041, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Geness Half-Soul - IC - Cast Brutal Fist'), +(@NPC_GENESS_13214, 0, 1, 0, 13, 0, 80, 0, 10000, 15000, 0, 0, 11, 46182, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Geness Half-Soul - On target Cast - Cast Snap Kick'), +(@NPC_GENESS_13214, 0, 2, 0, 6, 0, 100, 1, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 11, @NPC_GENERIC_BUNNY, 100, 0, 0, 0, 0, 0, 'Geness Half-Soul - On death - Set Data'), +(@NPC_GENESS_13214, 0, 3, 0, 21, 0, 100, 0, 0, 0, 0, 0, 41, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Geness Half-Soul - On reach home - Despawn self'), +(@NPC_GENESS_13214, 0, 4, 0, 5, 0, 100, 0, 0, 0, 0, 0, 45, @KILL_13214, @KILL_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Geness Half-Soul - On kill target - Set Data'), +(@NPC_GENESS_13214, 0, 5, 0, 21, 0, 100, 0, 0, 0, 0, 0, 45, @WIPE_13214, @WIPE_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Geness Half-Soul - On reach home - Set Data'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_JHADRAS_13214 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 +(@NPC_JHADRAS_13214, 0, 0, 0, 14, 0, 80, 0, 50, 40, 10000, 30000, 11, 15586, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Father Jhadras - On friendly hp deficit - Cast Heal'), +(@NPC_JHADRAS_13214, 0, 1, 0, 0, 0, 80, 0, 0, 3000, 8000, 12000, 11, 25054, 0, 0, 0, 0, 0, 5, 0, 0, 40, 0, 0, 0, 0, 'Father Jhadras - IC - Cast Holy Smite'), +(@NPC_JHADRAS_13214, 0, 2, 0, 6, 0, 100, 1, 0, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 11, @NPC_GENERIC_BUNNY, 100, 0, 0, 0, 0, 0, 'Father Jhadras - On death - Set Data'), +(@NPC_JHADRAS_13214, 0, 3, 0, 21, 0, 100, 0, 0, 0, 0, 0, 41, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Father Jhadras - On reach home - Despawn self'), +(@NPC_JHADRAS_13214, 0, 4, 0, 5, 0, 100, 0, 0, 0, 0, 0, 45, @KILL_13214, @KILL_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Father Jhadras - On kill target - Set Data'), +(@NPC_JHADRAS_13214, 0, 5, 0, 21, 0, 100, 0, 0, 0, 0, 0, 45, @WIPE_13214, @WIPE_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0,0, 'Father Jhadras - On reach home - Set Data'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_MASUD_13214 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 +(@NPC_MASUD_13214, 0, 0, 0, 0, 0, 80, 0, 0, 0, 15000, 25000, 11, 41056, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Masud - IC - Cast Whirlwind'), +(@NPC_MASUD_13214, 0, 1, 0, 0, 0, 80, 0, 0, 0, 10000, 20000, 11, 15496, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Masud - IC - Cast Cleave'), +(@NPC_MASUD_13214, 0, 2, 0, 6, 0, 100, 1, 0, 0, 0, 0, 45, 4, 4, 0, 0, 0, 0, 11, @NPC_GENERIC_BUNNY, 100, 0, 0, 0, 0, 0, 'Masud - On death - Set Data'), +(@NPC_MASUD_13214, 0, 3, 0, 21, 0, 100, 0, 0, 0, 0, 0, 41, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Masud - On reach home - Despawn self'), +(@NPC_MASUD_13214, 0, 4, 0, 5, 0, 100, 0, 0, 0, 0, 0, 45, @KILL_13214, @KILL_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Masud - On kill target - Set Data'), +(@NPC_MASUD_13214, 0, 5, 0, 21, 0, 100, 0, 0, 0, 0, 0, 45, @WIPE_13214, @WIPE_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0,0, 'Masud - On reach home - Set Data'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_RITH_13214 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 +(@NPC_RITH_13214, 0, 0, 0, 0, 0, 80, 0, 0, 0, 10000, 20000, 11, 61044, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Rith - IC - Cast Demoralizing Shout'), +(@NPC_RITH_13214, 0, 1, 0, 0, 0, 80, 0, 0, 0, 20000, 30000, 11, 58461, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Rith - IC - Cast Sunder Armor'), +(@NPC_RITH_13214, 0, 2, 0, 6, 0, 100, 1, 0, 0, 0, 0, 45, 5, 5, 0, 0, 0, 0, 11, @NPC_GENERIC_BUNNY, 100, 0, 0, 0, 0, 0, 'Rith - On death - Set Data'), +(@NPC_RITH_13214, 0, 3, 0, 21, 0, 100, 0, 0, 0, 0, 0, 41, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rith - On reach home - Despawn self'), +(@NPC_RITH_13214, 0, 4, 0, 5, 0, 100, 0, 0, 0, 0, 0, 45, @KILL_13214, @KILL_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Rith - On kill target - Set Data'), +(@NPC_RITH_13214, 0, 5, 0, 21, 0, 100, 0, 0, 0, 0, 0, 45, @WIPE_13214, @WIPE_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0,0, 'Rith - On reach home - Set Data'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_TALLA_13214 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 +(@NPC_TALLA_13214, 0, 0, 0, 0, 0, 80, 0, 0, 0, 5000, 15000, 11, 14873, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Talla - IC - Cast Sinister Strike '), +(@NPC_TALLA_13214, 0, 1, 0, 0, 0, 80, 0, 0, 0, 20000, 25000, 11, 30981, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Talla - IC - Cast Crippling PoisOn '), +(@NPC_TALLA_13214, 0, 2, 0, 6, 0, 100, 1, 0, 0, 0, 0, 45, 6, 6, 0, 0, 0, 0, 11, @NPC_GENERIC_BUNNY, 100, 0, 0, 0, 0, 0, 'Talla - On death - Set Data'), +(@NPC_TALLA_13214, 0, 3, 0, 21, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Talla - On reach home - Despawn self'), +(@NPC_TALLA_13214, 0, 4, 0, 5, 0, 100, 0, 0, 0, 0, 0, 45, @KILL_13214, @KILL_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Talla - On kill target - Set Data'), +(@NPC_TALLA_13214, 0, 5, 0, 21, 0, 100, 0, 0, 0, 0, 0, 45, @WIPE_13214, @WIPE_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0,0, 'Talla - On reach home - Set Data'); + +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@NPC_GENERIC_BUNNY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_GENERIC_BUNNY 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 +(@NPC_GENERIC_BUNNY, 0, 0, 0, 38, 0, 100, 1, 1, 1, 0, 0, 23, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Kill trigger - On data set - increment phase 1(1)'), +(@NPC_GENERIC_BUNNY, 0, 1, 0, 38, 0, 100, 1, 2, 2, 0, 0, 23, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Kill trigger - On data set - increment phase 2(2)'), +(@NPC_GENERIC_BUNNY, 0, 2, 0, 38, 0, 100, 1, 3, 3, 0, 0, 23, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Kill trigger - On data set - increment phase 3(4)'), +(@NPC_GENERIC_BUNNY, 0, 3, 0, 38, 0, 100, 1, 4, 4, 0, 0, 23, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Kill trigger - On data set - increment phase 4(8)'), +(@NPC_GENERIC_BUNNY, 0, 4, 0, 38, 0, 100, 1, 5, 5, 0, 0, 23, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Kill trigger - On data set - increment phase 5(16)'), +(@NPC_GENERIC_BUNNY, 0, 5, 0, 38, 0, 100, 1, 6, 6, 0, 0, 23, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Kill trigger - On data set - increment phase 6(32)'), +(@NPC_GENERIC_BUNNY, 0, 6, 7, 1, 32, 100, 1, 0, 0, 0, 0, 45, @CREDIT_13214, @CREDIT_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Kill trigger - On phase 6(32) - Set Data'), +(@NPC_GENERIC_BUNNY, 0, 7, 0, 61, 32, 100, 0, 0, 0, 0, 0, 78, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Kill trigger - On phase 6(32) - Set Phase 0'); + +UPDATE `creature_template` SET `faction_A`=16, `faction_H`=16, `AIName`='SmartAI', `unit_flags`=0 WHERE `entry`=@NPC_KHITRIX_13215; +DELETE FROM `creature_text` WHERE `entry`=@NPC_KHITRIX_13215; +INSERT INTO `creature_text` VALUES +(@NPC_KHITRIX_13215,0,0,'When I am done here, I am going to mount your heads upon the walls of Azjol-Nerub!',14,0,0,0,0,0,'Dark Master say 1'); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_KHITRIX_13215, @NPC_KHITRIX_13215*100); +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 +(@NPC_KHITRIX_13215, 0, 0, 0, 0, 0, 80, 0, 0, 0, 10000, 20000, 11, 38243, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Khitrix the Dark Master - IC - Cast Mind Flay'), +(@NPC_KHITRIX_13215, 0, 1, 0, 0, 0, 80, 0, 5000, 25000, 5000, 25000, 11, 22884, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Khitrix the Dark Master - IC - Cast Psychic Scream'), +(@NPC_KHITRIX_13215, 0, 2, 0, 0, 0, 80, 0, 10000, 15000, 120000, 180000, 11, 61055, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Khitrix the Dark Master - IC - Cast Bone Spiders'), +(@NPC_KHITRIX_13215, 0, 3, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, @NPC_KHITRIX_13215*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Khitrix the Dark Master - On summon - Call script 1'), +-- +(@NPC_KHITRIX_13215*100, 9, 0, 0, 1, 0, 100, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8197.6045, 3502.557, 625.108032, 0.585, 'Khitrix the Dark Master - OOC script 1 - Move to position'), +(@NPC_KHITRIX_13215*100, 9, 1, 0, 1, 0, 100, 1, 4000, 4000, 0, 0, 1, 0, 10, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Khitrix the Dark Master - OOC script 1 - Say 1'), +-- +(@NPC_KHITRIX_13215, 0, 5, 0, 1, 0, 100, 0, 500, 500, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 50, 0, 0, 0, 0, 0, 0, 'Khitrix the Dark Master - OOC - Start Attack'), +(@NPC_KHITRIX_13215, 0, 6, 0, 5, 0, 100, 0, 0, 0, 0, 0, 45, @KILL_13214, @KILL_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Khitrix the Dark Master - On Kill target - Set Data'), +(@NPC_KHITRIX_13215, 0, 7, 0, 6, 0, 100, 0, 0, 0, 1, 0, 45, @CREDIT_13215, @CREDIT_13215, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Khitrix the Dark Master - On Death - Set Data'), +(@NPC_KHITRIX_13215, 0, 8, 0, 1, 0, 100, 1, 30000, 30000, 0, 0, 45, @WIPE_13214, @WIPE_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Khitrix the Dark Master - OOC - Set Data'); + +UPDATE `creature_template` SET `exp`=0, `mindmg`=200, `maxdmg`=300, `dmg_multiplier`=2, `AIName`='SmartAI',`Health_mod`=1 WHERE `entry`=@NPC_BONESPIDER_13215; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_BONESPIDER_13215 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 +(@NPC_BONESPIDER_13215, 0, 0, 0, 0, 0, 80, 0, 0, 0, 10000, 20000, 11, 744, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Bone spiders - IC - Cast Poison'), +(@NPC_BONESPIDER_13215, 0, 1, 0, 1, 0, 100, 0, 500, 500, 0, 0, 49, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Bone Spiders - OOC - Start Attack Random Player'); + +DELETE FROM `creature_text` WHERE `entry` IN (@NPC_SIGRID_13216); +INSERT INTO `creature_text` VALUES +(@NPC_SIGRID_13216,0,0,'Ah, there you are! Remember me? Of course you do! Wait right there, I''m coming down.',14,0,0,0,0,0,'Sigrid Iceborn say 1'), +(@NPC_SIGRID_13216,1,0,'I told you I''d be better prepared when next we met. I''ve fought and won the Hyldsmeet, trained at Valkyrion, and here I am. Come and get some!',14,0,0,0,0,0,'Sigrid Iceborn say 2'); + +-- Sigrid Flight WP's +DELETE FROM `waypoints` WHERE entry =@NPC_SIGRID_MOUNT; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(@NPC_SIGRID_MOUNT, 1, 8258.836, 3599.048, 677.6457, ''), +(@NPC_SIGRID_MOUNT, 2, 8258.059, 3598.419, 677.6457, ''), +(@NPC_SIGRID_MOUNT, 3, 8217.432, 3554.571, 677.6457, ''), +(@NPC_SIGRID_MOUNT, 4, 8169.096, 3473.421, 677.6457, ''), +(@NPC_SIGRID_MOUNT, 5, 8200.269, 3417.768, 673.563, ''), +(@NPC_SIGRID_MOUNT, 6, 8281.517, 3453.952, 673.535, ''), +(@NPC_SIGRID_MOUNT, 7, 8278.022, 3504.947, 677.6457, ''), +(@NPC_SIGRID_MOUNT, 8, 8222.471, 3532.925, 631.09, ''), +(@NPC_SIGRID_MOUNT, 9, 8222.471, 3532.925, 631.09, ''); + +UPDATE `creature_template` SET `InhabitType` =1 WHERE `entry` =@NPC_SIGRID_13216; +UPDATE `creature_template` SET `InhabitType` =7 WHERE `entry` =@NPC_SIGRID_MOUNT; +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`IN (@NPC_SIGRID_13216,@NPC_SIGRID_MOUNT); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_SIGRID_13216, @NPC_SIGRID_13216*100,@NPC_SIGRID_MOUNT); +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 +(@NPC_SIGRID_13216, 0, 0, 0, 9, 0, 80, 0, 0, 2, 15000, 30000, 11, 57635, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn - On range - Cast Disengage'), +(@NPC_SIGRID_13216, 0, 1, 2, 9, 0, 80, 0, 0, 3, 10000, 30000, 11, 61170, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn - IC - Cast Flash Freeze'), +(@NPC_SIGRID_13216, 0, 2, 0, 61, 0, 80, 0, 0, 0, 0, 0, 89, 30, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn - On Link - Set Random Movement'), +(@NPC_SIGRID_13216, 0, 3, 0, 1, 0, 100, 1, 0, 0, 0, 0, 11, 61165, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn - IC - Cast Frostbite Weapon'), +(@NPC_SIGRID_13216, 0, 4, 0, 9, 0, 80, 0, 5, 30, 5000, 25000, 11, 61168, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn - On range - Cast Throw'), +(@NPC_SIGRID_13216, 0, 5, 0, 9, 0, 100, 0, 30, 100, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn - Start Moving - Not in Throw Range'), +(@NPC_SIGRID_13216, 0, 6, 0, 9, 0, 100, 0, 9, 15, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn - In Range - Stop Moving at 15 Yard'), +(@NPC_SIGRID_13216, 0, 7, 0, 9, 0, 100, 0, 0, 5, 0, 0, 21, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn - Start Moving - Not in Throw Range'), +(@NPC_SIGRID_13216, 0, 8, 0, 9, 0, 100, 0, 5, 30, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn - Stop Moving - In Throw Range'), +(@NPC_SIGRID_13216, 0, 9, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, @NPC_SIGRID_13216*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn - On summon - Call script 1'), +-- +(@NPC_SIGRID_13216*100, 9, 0, 0, 0, 0, 100, 0, 2000, 2000, 2000, 2000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn - On summon script 1 - Say 1'), +-- +(@NPC_SIGRID_13216, 0, 10, 0, 5, 0, 100, 0, 0, 0, 0, 0, 45, @KILL_13214, @KILL_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Sigrid Iceborn - On kill target - Set Data'), +(@NPC_SIGRID_13216, 0, 11, 0, 6, 0, 100, 0, 0, 0, 1, 0, 45, @CREDIT_13216, @CREDIT_13216, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Sigrid Iceborn - On death - Set Data'), +(@NPC_SIGRID_13216, 0, 12, 0, 1, 0, 100, 1, 30000, 30000, 0, 0, 45, @WIPE_13214, @WIPE_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Sigrid Iceborn - OOC - Set Data'), +-- +(@NPC_SIGRID_MOUNT, 0, 0, 0, 27, 0, 100, 0, 0, 0, 0, 0, 53, 1, @NPC_SIGRID_MOUNT, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn Mount - On Respawn - Start WP movement'), +(@NPC_SIGRID_MOUNT, 0, 1, 2, 40, 0, 100, 1, 9, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn Mount - On WP reached - Despawn'), +(@NPC_SIGRID_MOUNT, 0, 2, 0, 61, 0, 100, 1, 9, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 11, @NPC_SIGRID_13216, 20, 0, 0, 0, 0, 0, 'Sigrid Iceborn Mount - On WP reached - Set Data on Sigrid'), +-- +(@NPC_SIGRID_13216, 0, 13, 14, 54, 0, 100, 1, 0, 0, 0, 0, 12, @NPC_SIGRID_MOUNT, 7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn - On Link - Summon Mount'), +(@NPC_SIGRID_13216, 0, 14, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 46598, 7, 0, 0, 0, 0, 11, @NPC_SIGRID_MOUNT, 100, 0, 0, 0, 0, 0, 'Sigrid Iceborn - On Link - Mount Sigrid''s Proto Drake'), +(@NPC_SIGRID_13216, 0, 15, 16, 38, 0, 100, 1, 1, 1, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn - On WP reached - Start Attack'), +(@NPC_SIGRID_13216, 0, 16, 17, 61, 0, 100, 1, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 50, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn - On WP reached - Start Attack'), +(@NPC_SIGRID_13216, 0, 17, 0, 61, 0, 100, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sigrid Iceborn - On Link - Say 2'); + +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@NPC_CARNAGE_13217; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_CARNAGE_13217, @NPC_CARNAGE_13217*100); +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 +(@NPC_CARNAGE_13217, 0, 1, 0, 0, 0, 80, 0, 10000, 30000, 20000, 40000, 11, 61065, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Carnage - IC - Cast War Stomp'), +(@NPC_CARNAGE_13217, 0, 2, 0, 0, 0, 80, 0, 5000, 12000, 5000, 12000, 11, 61070, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Carnage - IC - Cast Smash'), +(@NPC_CARNAGE_13217, 0, 3, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, @NPC_CARNAGE_13217*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Carnage - On summon - Call script 1'), +-- +(@NPC_CARNAGE_13217*100, 9, 0, 0, 1, 0, 100, 1, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8193.264648, 3496.165771, 625.067322, 0.746269, 'Carnage - OOC script 1 - Move to position'), +-- +(@NPC_CARNAGE_13217, 0, 4, 0, 1, 0, 100, 0, 5000, 5000, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 70, 0, 0, 0, 0, 0, 0, 'Carnage - OOC - Start Attack'), +(@NPC_CARNAGE_13217, 0, 5, 0, 5, 0, 100, 0, 0, 0, 0, 0, 45, @KILL_13214, @KILL_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Carnage - On kill target - Set Data'), +(@NPC_CARNAGE_13217, 0, 6, 0, 6, 0, 100, 0, 0, 0, 1, 0, 45, @CREDIT_13217, @CREDIT_13217, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Carnage - On death - Set Data'), +(@NPC_CARNAGE_13217, 0, 7, 0, 1, 0, 100, 1, 30000, 30000, 0, 0, 45, @WIPE_13214, @WIPE_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Carnage - OOC - Set Data'); + +DELETE FROM `creature_text` WHERE `entry` IN (@NPC_THANE_13218); +INSERT INTO `creature_text` VALUES +(@NPC_THANE_13218,0,0,'ENOUGH! You tiny insects are not worthy to do battle within this sacred place!.',14,0,0,0,0,0,'Thane say 1'), +(@NPC_THANE_13218,1,0,'Fight me and die you cowards!',14,0,0,0,0,0,'Thane say 2'), +(@NPC_THANE_13218,2,0,'Haraak foln! ',12,0,0,0,0,0,'Thane say 3'); + +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@NPC_THANE_13218; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_THANE_13218, @NPC_THANE_13218*100); +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 +(@NPC_THANE_13218, 0, 1, 0, 0, 0, 80, 0, 5000, 10000, 15000, 20000, 11, 13737, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Thane Banahogg - IC - Cast Mortal Strike'), +(@NPC_THANE_13218, 0, 2, 0, 0, 0, 80, 0, 5000, 10000, 5000, 10000, 11, 61133, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Thane Banahogg - IC - Cast Punt'), +(@NPC_THANE_13218, 0, 3, 0, 0, 0, 100, 0, 20000, 20000, 20000, 30000, 11, 61134, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Thane Banahogg - IC - Cast Leap'), +(@NPC_THANE_13218, 0, 5, 0, 12, 0, 100, 0, 0, 20, 5000, 10000, 11, 61140, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Thane Banahogg - On %hp - Cast Execute'), +(@NPC_THANE_13218, 0, 6, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, @NPC_THANE_13218*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Thane Banahogg - On summon - call script 1'), +-- +(@NPC_THANE_13218*100, 9, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Thane Banahogg - OOC script 1 - say 1'), +(@NPC_THANE_13218*100, 9, 1, 0, 0, 0, 100, 1, 5000, 5000, 0, 0, 97, 25, 30, 0, 0, 0, 0, 1, 0, 0, 0, 8169.0015, 3477.075, 626.4695, 0.673769, 'Thane Banahogg - OOC script 1 - Jump to position'), +(@NPC_THANE_13218*100, 9, 2, 0, 0, 0, 100, 1, 2000, 2000, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Thane Banahogg - OOC script 1 - Set Home Pos'), +(@NPC_THANE_13218*100, 9, 3, 0, 0, 0, 100, 1, 1500, 1500, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Thane Banahogg - OOC script 1 - Say 2'), +(@NPC_THANE_13218*100, 9, 4, 0, 0, 0, 100, 1, 1000, 1000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Thane Banahogg - OOC script 1 - Say 3'), +-- +(@NPC_THANE_13218, 0, 8, 0, 1, 0, 100, 0, 12000, 12000, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Thane Banahogg - OOC - Start Attack'), +(@NPC_THANE_13218, 0, 9, 0, 5, 0, 100, 0, 0, 0, 0, 0, 45, @KILL_13214, @KILL_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Thane Banahogg - On kill target - Set Data'), +(@NPC_THANE_13218, 0, 10, 0, 6, 0, 100, 0, 0, 0, 1, 0, 45, @CREDIT_13218, @CREDIT_13218, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Thane Banahogg - On death - Set Data'), +(@NPC_THANE_13218, 0, 11, 0, 1, 0, 100, 1, 30000, 30000, 0, 0, 45, @WIPE_13214, @WIPE_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Thane Banahogg - OOC - Set Data'); + +DELETE FROM `creature_text` WHERE `entry` IN (@NPC_PRINCESAND_13219); +INSERT INTO `creature_text` VALUES +(@NPC_PRINCESAND_13219,0,0,'Hardly a fitting introduction , Spear-Wife. Now, who is this outsider that I''ve been hearing so much about?',14,0,0,0,0,0,'Prince Sandoval say 1'), +(@NPC_PRINCESAND_13219,1,0,'I will make this as easy as possible for you. Simply come here and die. That is all that I ask for your many trespasses. For your sullying this exlated place of battle. ',14,0,0,0,0,0,'Prince Sandoval say 2'), +(@NPC_PRINCESAND_13219,2,0,'FOR YOUR EFFRONTERY TO THE LICH KING!',14,0,0,0,0,0,'Prince Sandoval say 3'); + +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@NPC_PRINCESAND_13219; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_PRINCESAND_13219, @NPC_PRINCESAND_13219*100); +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 +(@NPC_PRINCESAND_13219, 0, 0, 0, 0, 0, 80, 0, 0, 0, 10000, 20000, 11, 61162, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - IC - Cast Engulfing Strike'), +(@NPC_PRINCESAND_13219, 0, 1, 0, 0, 0, 80, 0, 15000, 20000, 30000, 30000, 11, 61163, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - IC - Cast Fire Nova'), +(@NPC_PRINCESAND_13219, 0, 2, 0, 0, 0, 100, 0, 30000, 30000, 30000, 30000, 11, 61144, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - IC - Cast Fire Shield'), +(@NPC_PRINCESAND_13219, 0, 3, 4, 0, 0, 100, 0, 31100, 31100, 30000, 30000, 11, 61145, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - IC - Cast Ember Shower'), +(@NPC_PRINCESAND_13219, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - On Link - Change state'), +(@NPC_PRINCESAND_13219, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 18, 131077, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - On Link - Change unit flag'), +(@NPC_PRINCESAND_13219, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - On Link - Set Root'), +(@NPC_PRINCESAND_13219, 0, 7, 8, 0, 0, 100, 0, 45100, 45100, 30000, 30000, 19, 131077, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - IC - Change unit flag'), +(@NPC_PRINCESAND_13219, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - On Link - Change state'), +(@NPC_PRINCESAND_13219, 0, 9, 10, 61, 0, 100, 0, 0, 0, 0, 0, 28, 61144, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - On Link - Remove Fire Shield'), +(@NPC_PRINCESAND_13219, 0, 10, 11, 61, 0, 100, 0, 0, 0, 0, 0, 28, 61145, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - On Link- Remove Ember Shower'), +(@NPC_PRINCESAND_13219, 0, 11, 0, 61, 0, 100, 0, 0, 0, 0, 0, 103, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - On Link - Remove Root'), +(@NPC_PRINCESAND_13219, 0, 12, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, @NPC_PRINCESAND_13219*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - On summon - Call script 1'), +(@NPC_PRINCESAND_13219, 0, 13, 0, 54, 0, 100, 0, 0, 0, 0, 0, 11, 4335, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - On summon - Cast Summon Smoke'), +-- +(@NPC_PRINCESAND_13219*100, 9, 0, 0, 1, 0, 100, 1, 4000, 4000, 0, 0, 1, 1, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - OOC script 1 - Say 1'), +(@NPC_PRINCESAND_13219*100, 9, 1, 0, 1, 0, 100, 1, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8197.6045, 3502.557, 625.108032, 0.585, 'Prince Sandoval - OOC script 1 - Move to position'), +(@NPC_PRINCESAND_13219*100, 9, 2, 0, 1, 0, 100, 1, 8000, 8000, 0, 0, 1, 2, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - OOC script 1 - Say 2'), +-- +(@NPC_PRINCESAND_13219, 0, 14, 0, 54, 0, 100, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - OOC script 1 - Say 3'), +(@NPC_PRINCESAND_13219, 0, 15, 0, 1, 0, 100, 0, 14000, 14000, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - OOC - Start Attack'), +(@NPC_PRINCESAND_13219, 0, 16, 0, 5, 0, 100, 0, 0, 0, 0, 0, 45, @KILL_13214, @KILL_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Prince Sandoval - On kill target - Set Data'), +(@NPC_PRINCESAND_13219, 0, 17, 0, 6, 0, 100, 0, 0, 0, 1, 0, 45, @CREDIT_13219, @CREDIT_13219, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Prince Sandoval - On death - Set Data'), +(@NPC_PRINCESAND_13219, 0, 18, 0, 1, 0, 100, 1, 30000, 30000, 0, 0, 45, @WIPE_13214, @WIPE_13214, 0, 0, 0, 0, 11, @NPC_GEIRRVIF, 100, 0, 0, 0, 0, 0, 'Prince Sandoval - OOC - Set Data'), +-- +(@NPC_PRINCESAND_13219, 0, 19, 20, 1, 0, 100, 0, 0, 0, 0, 0, 19, 131077, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - OOC - Change state'), +(@NPC_PRINCESAND_13219, 0, 20, 21, 61, 0, 100, 0, 0, 0, 0, 0, 28, 61144, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - On Link - Remove Fire Shield'), +(@NPC_PRINCESAND_13219, 0, 21, 22, 61, 0, 100, 0, 0, 0, 0, 0, 28, 61145, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - On Link- Remove Ember Shower'), +(@NPC_PRINCESAND_13219, 0, 22, 0, 61, 0, 100, 0, 0, 0, 0, 0, 103, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - On Link - Remove Root'); + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@NPC_GEIRRVIF; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_GEIRRVIF, @NPC_GEIRRVIF*100, @NPC_GEIRRVIF*100+1, @NPC_GEIRRVIF*100+2, @NPC_GEIRRVIF*100+3, @NPC_GEIRRVIF*100+4, @NPC_GEIRRVIF*100+5, @NPC_GEIRRVIF*100+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 +(@NPC_GEIRRVIF, 0, 0, 0, 19, 0, 100, 0, @QUEST_FALLENHEROES, 0, 0, 0, 80, @NPC_GEIRRVIF*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On accept quest 1 - Call script 1'), +-- +(@NPC_GEIRRVIF*100, 9, 0, 0, 1, 0, 100, 1, 1000, 1000, 0, 0, 69, 8216, 3516, 653, 0, 0, 0, 8, 0, 0, 0, 8215.81, 3515.88, 652.885, 3.83972, 'Grieff - OOC script 1 - Move to position'), +(@NPC_GEIRRVIF*100, 9, 1, 0, 1, 0, 100, 1, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 1 - Change npc flag'), +(@NPC_GEIRRVIF*100, 9, 2, 0, 1, 0, 100, 1, 0, 0, 0, 0, 45, @DESPAWN_13214, @DESPAWN_13214, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 1 - Despawn corpse'), +(@NPC_GEIRRVIF*100, 9, 3, 0, 1, 0, 100, 1, 1000, 1000, 0, 0, 1, 0, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 1 - say 0'), +(@NPC_GEIRRVIF*100, 9, 4, 0, 1, 0, 100, 1, 4000, 4000, 0, 0, 1, 1, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 1 - say 1'), +(@NPC_GEIRRVIF*100, 9, 5, 0, 1, 0, 100, 1, 6000, 6000, 0, 0, 1, 2, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 1 - say 2'), +(@NPC_GEIRRVIF*100, 9, 6, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 1, 3, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 1 - say 3'), +(@NPC_GEIRRVIF*100, 9, 7, 0, 1, 0, 100, 1, 0, 0, 0, 0, 12, @NPC_JHADRAS_13214, 7, 0, 0, 1, 0, 8, 0, 0, 0, 8222, 3518, 625.162, 3.559, 'Grieff - OOC script 1 - Summon Father Jhadras'), +(@NPC_GEIRRVIF*100, 9, 8, 0, 1, 0, 100, 1, 0, 0, 0, 0, 12, @NPC_MASUD_13214, 7, 0, 0, 1, 0, 8, 0, 0, 0, 8217, 3523, 624.908, 5.236, 'Grieff - OOC script 1 - Summon Masud'), +(@NPC_GEIRRVIF*100, 9, 9, 0, 1, 0, 100, 1, 0, 0, 0, 0, 12, @NPC_GENESS_13214, 7, 0, 0, 1, 0, 8, 0, 0, 0, 8210, 3517, 624.6, 6.143, 'Grieff - OOC script 1 - Summon Geness Half-Soul'), +(@NPC_GEIRRVIF*100, 9, 10, 0, 1, 0, 100, 1, 0, 0, 0, 0, 12, @NPC_TALLA_13214, 7, 0, 0, 1, 0, 8, 0, 0, 0, 8209, 3511, 625.117, 0.571, 'Grieff - OOC script 1 - Summon Talla'), +(@NPC_GEIRRVIF*100, 9, 11, 0, 1, 0, 100, 1, 0, 0, 0, 0, 12, @NPC_ELDRETH_13214, 7, 0, 0, 1, 0, 8, 0, 0, 0, 8198, 3517, 625.838, 0.089, 'Grieff - OOC script 1 - Summon Eldreth'), +(@NPC_GEIRRVIF*100, 9, 12, 0, 1, 0, 100, 1, 0, 0, 0, 0, 12, @NPC_RITH_13214, 7, 0, 0, 1, 0, 8, 0, 0, 0, 8200, 3507, 625.339, 0.514, 'Grieff - OOC script 1 - Summon Rith'), +-- +(@NPC_GEIRRVIF, 0, 1, 2, 38, 0, 100, 0, @CREDIT_13214, @CREDIT_13214, 0, 0, 1, 4, 10, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On data set - Say 5'), +(@NPC_GEIRRVIF, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 1, 0, 8, 0, 0, 0, 8216.25, 3516.23, 629.357, 3.83972, 'Grieff - On linked - Move to position'), +(@NPC_GEIRRVIF, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On linked - Change npc flag'), +(@NPC_GEIRRVIF, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 15, @QUEST_FALLENHEROES, 0, 0, 0, 0, 0, 18, 80, 0, 0, 0, 0, 0, 0, 'Grieff - On linked - Kill credit'), +(@NPC_GEIRRVIF, 0, 5, 0, 19, 0, 100, 0, @QUEST_KDARKMASTER, 0, 0, 0, 80, @NPC_GEIRRVIF*100+1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On accept quest 2 - Call script 2'), +-- +(@NPC_GEIRRVIF*100+1, 9, 0, 0, 1, 0, 100, 1, 1000, 1000, 0, 0, 69, 8216, 3516, 653, 0, 0, 0, 8, 0, 0, 0, 8215.81, 3515.88, 652.885, 3.83972, 'Grieff - OOC script 2 - Move to position'), +(@NPC_GEIRRVIF*100+1, 9, 1, 0, 1, 0, 100, 1, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 2 - Change npc flag'), +(@NPC_GEIRRVIF*100+1, 9, 2, 0, 1, 0, 100, 1, 0, 0, 0, 0, 45, @DESPAWN_13214, @DESPAWN_13214, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 2 - Despawn corpse'), +(@NPC_GEIRRVIF*100+1, 9, 3, 0, 1, 0, 100, 1, 1000, 1000, 0, 0, 1, 5, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 2 - say 5'), +(@NPC_GEIRRVIF*100+1, 9, 4, 0, 1, 0, 100, 1, 4000, 4000, 0, 0, 1, 6, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 2 - say 6'), +(@NPC_GEIRRVIF*100+1, 9, 5, 0, 1, 0, 100, 1, 6000, 6000, 0, 0, 1, 7, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 2 - say 7'), +(@NPC_GEIRRVIF*100+1, 9, 6, 0, 1, 0, 100, 1, 0, 0, 0, 0, 12, @NPC_KHITRIX_13215, 7, 0, 0, 1, 0, 8, 0, 0, 0, 8165, 3451, 627.199, 1.935, 'Grieff - OOC script 2 - Summon Khitrix the Dark Master'), +-- +(@NPC_GEIRRVIF, 0, 6, 7, 38, 0, 100, 0, @CREDIT_13215, @CREDIT_13215, 0, 0, 1, 8, 10, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On data set - Say 8'), +(@NPC_GEIRRVIF, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8216.25, 3516.23, 629.357, 3.83972, 'Grieff - On linked - Move to position'), +(@NPC_GEIRRVIF, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On linked - Change npc flag'), +(@NPC_GEIRRVIF, 0, 9, 0, 61, 0, 100, 0, 0, 0, 0, 0, 15, @QUEST_KDARKMASTER, 0, 0, 0, 0, 0, 18, 80, 0, 0, 0, 0, 0, 0, 'Grieff - On linked - Kill credit'), +(@NPC_GEIRRVIF, 0, 10, 0, 19, 0, 100, 0, @QUEST_SIGRIDICEBORN, 0, 0, 0, 80, @NPC_GEIRRVIF*100+2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On accept quest 3 - Call script 3'), +-- +(@NPC_GEIRRVIF*100+2, 9, 0, 0, 1, 0, 100, 1, 1000, 1000, 0, 0, 69, 8216, 3516, 653, 0, 0, 0, 8, 0, 0, 0, 8215.81, 3515.88, 652.885, 3.83972, 'Grieff - OOC script 3 - Move to position'), +(@NPC_GEIRRVIF*100+2, 9, 1, 0, 1, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 3 - Change npc flag'), +(@NPC_GEIRRVIF*100+2, 9, 2, 0, 1, 0, 100, 1, 0, 0, 0, 0, 45, @DESPAWN_13214, @DESPAWN_13214, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 3 - Despawn corpse'), +(@NPC_GEIRRVIF*100+2, 9, 3, 0, 1, 0, 100, 1, 0, 0, 0, 0, 1, 9, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 3 - Say 9'), +(@NPC_GEIRRVIF*100+2, 9, 4, 0, 1, 0, 100, 1, 9000, 9000, 0, 0, 1, 10, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 3 - Say 10'), +(@NPC_GEIRRVIF*100+2, 9, 5, 0, 1, 0, 100, 1, 0, 0, 0, 0, 12, @NPC_SIGRID_13216, 7, 0, 0, 1, 0, 8, 0, 0, 0, 8258.836, 3599.048, 677.6457, 0.383, 'Grieff - OOC script 3 - summon Sigrid Iceborn'), +-- +(@NPC_GEIRRVIF, 0, 11, 12, 38, 0, 100, 0, @CREDIT_13216, @CREDIT_13216, 0, 0, 1, 11, 10, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On data set - Say 11'), +(@NPC_GEIRRVIF, 0, 12, 13, 61, 0, 100, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8216.25, 3516.23, 629.357, 3.83972, 'Grieff - On linked - Move to position'), +(@NPC_GEIRRVIF, 0, 13, 14, 61, 0, 100, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On linked - Change npc flag'), +(@NPC_GEIRRVIF, 0, 14, 0, 61, 0, 100, 0, 0, 0, 0, 0, 15, @QUEST_SIGRIDICEBORN, 0, 0, 0, 0, 0, 18, 80, 0, 0, 0, 0, 0, 0, 'Grieff - On linked - Kill credit'), +(@NPC_GEIRRVIF, 0, 15, 0, 19, 0, 100, 0, @QUEST_CARNAGE, 0, 0, 0, 80, @NPC_GEIRRVIF*100+3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On accept quest 4 - Call Script 4'), +-- +(@NPC_GEIRRVIF*100+3, 9, 0, 0, 1, 0, 100, 1, 1000, 1000, 0, 0, 69, 8216, 3516, 653, 0, 0, 0, 8, 0, 0, 0, 8215.81, 3515.88, 652.885, 3.83972, 'Grieff - OOC script 4 - Move to position'), +(@NPC_GEIRRVIF*100+3, 9, 1, 0, 1, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 4 - Change npc flag'), +(@NPC_GEIRRVIF*100+3, 9, 2, 0, 1, 0, 100, 1, 0, 0, 0, 0, 45, @DESPAWN_13214, @DESPAWN_13214, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 4 - Despawn corpse'), +(@NPC_GEIRRVIF*100+3, 9, 3, 0, 1, 0, 100, 1, 0, 0, 0, 0, 1, 12, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 4 - say 13'), +(@NPC_GEIRRVIF*100+3, 9, 4, 0, 1, 0, 100, 1, 4000, 4000, 0, 0, 1, 13, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 4 - say 13'), +(@NPC_GEIRRVIF*100+3, 9, 5, 0, 1, 0, 100, 1, 6000, 6000, 0, 0, 1, 14, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 4 - say 14'), +(@NPC_GEIRRVIF*100+3, 9, 6, 0, 1, 0, 100, 1, 0, 0, 0, 0, 12, @NPC_CARNAGE_13217, 7, 0, 0, 1, 0, 8, 0, 0, 0, 8141.532715, 3488.100342, 626.986084, 3.662119, 'Grieff - OOC script 4 - summon Carnage'), +-- +(@NPC_GEIRRVIF, 0, 16, 17, 38, 0, 100, 0, @CREDIT_13217, @CREDIT_13217, 0, 0, 1, 15, 10, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On data set - Say 15'), +(@NPC_GEIRRVIF, 0, 17, 18, 61, 0, 100, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8216.25, 3516.23, 629.357, 3.83972, 'Grieff - On linked - Move to position'), +(@NPC_GEIRRVIF, 0, 18, 19, 61, 0, 100, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On linked - Change npc flag'), +(@NPC_GEIRRVIF, 0, 19, 0, 61, 0, 100, 0, 0, 0, 0, 0, 15, @QUEST_CARNAGE, 0, 0, 0, 0, 0, 18, 80, 0, 0, 0, 0, 0, 0, 'Grieff - On Link - Kill credit'), +(@NPC_GEIRRVIF, 0, 20, 0, 19, 0, 100, 0, @QUEST_THANE, 0, 0, 0, 80, @NPC_GEIRRVIF*100+4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On accept quest 5 - Call script 5'), +-- +(@NPC_GEIRRVIF*100+4, 9, 0, 0, 1, 0, 100, 1, 1000, 1000, 0, 0, 69, 8216, 3516, 653, 0, 0, 0, 8, 0, 0, 0, 8215.81, 3515.88, 652.885, 3.83972, 'Grieff - OOC script 5 - Move to position'), +(@NPC_GEIRRVIF*100+4, 9, 1, 0, 1, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 5 - Change npc flag'), +(@NPC_GEIRRVIF*100+4, 9, 2, 0, 1, 0, 100, 1, 0, 0, 0, 0, 45, @DESPAWN_13214, @DESPAWN_13214, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 5 - Despawn corpse'), +(@NPC_GEIRRVIF*100+4, 9, 3, 0, 1, 0, 100, 1, 0, 0, 0, 0, 1, 16, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 5 - say 16'), +(@NPC_GEIRRVIF*100+4, 9, 4, 0, 1, 0, 100, 1, 4000, 4000, 0, 0, 1, 17, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 5 - say 17'), +(@NPC_GEIRRVIF*100+4, 9, 5, 0, 1, 0, 100, 1, 6000, 6000, 0, 0, 1, 18, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 5 - say 18'), +(@NPC_GEIRRVIF*100+4, 9, 6, 0, 1, 0, 100, 1, 0, 0, 0, 0, 12, @NPC_THANE_13218, 7, 0, 0, 1, 0, 8, 0, 0, 0, 8151.247559, 3462.894043, 672.115662, 0.6877, 'Grieff - OOC script 5 - summon Thane Banahogg'), +-- +(@NPC_GEIRRVIF, 0, 21, 22, 38, 0, 100, 0, @CREDIT_13218, @CREDIT_13218, 0, 0, 1, 19, 10, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On data set - Say 19'), +(@NPC_GEIRRVIF, 0, 22, 23, 61, 0, 100, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8216.25, 3516.23, 629.357, 3.83972, 'Grieff - On linked - Move to position'), +(@NPC_GEIRRVIF, 0, 23, 24, 61, 0, 100, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On linked - Change npc flag'), +(@NPC_GEIRRVIF, 0, 24, 0, 61, 0, 100, 0, 0, 0, 0, 0, 15, @QUEST_THANE, 0, 0, 0, 0, 0, 18, 80, 0, 0, 0, 0, 0, 0, 'Grieff - On linked - Kill credit'), +(@NPC_GEIRRVIF, 0, 25, 0, 19, 0, 100, 0, @QUEST_FINCHAL, 0, 0, 0, 80, @NPC_GEIRRVIF*100+5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On accept quest 6 - Call script 6'), +-- +(@NPC_GEIRRVIF*100+5, 9, 0, 0, 1, 0, 100, 1, 1000, 1000, 0, 0, 69, 8216, 3516, 653, 0, 0, 0, 8, 0, 0, 0, 8215.81, 3515.88, 652.885, 3.83972, 'Grieff - OOC script 6 - Move to position'), +(@NPC_GEIRRVIF*100+5, 9, 1, 0, 1, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 6 - Change npc flag'), +(@NPC_GEIRRVIF*100+5, 9, 2, 0, 1, 0, 100, 1, 0, 0, 0, 0, 45, @DESPAWN_13214, @DESPAWN_13214, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 6 - Despawn corpse'), +(@NPC_GEIRRVIF*100+5, 9, 3, 0, 1, 0, 100, 1, 0, 0, 0, 0, 1, 20, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 6 - Say 20'), +(@NPC_GEIRRVIF*100+5, 9, 4, 0, 1, 0, 100, 1, 6000, 6000, 0, 0, 1, 21, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 6 - Say 21'), +(@NPC_GEIRRVIF*100+5, 9, 5, 0, 1, 0, 100, 1, 6000, 6000, 0, 0, 1, 22, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 6 - Say 22'), +(@NPC_GEIRRVIF*100+5, 9, 6, 0, 1, 0, 100, 1, 6000, 6000, 0, 0, 1, 23, 10, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 6 - Say 23'), +(@NPC_GEIRRVIF*100+5, 9, 7, 0, 1, 0, 100, 1, 0, 0, 0, 0, 12, @NPC_PRINCESAND_13219, 7, 0, 0, 1, 0, 8, 0, 0, 0, 8182.54, 3489.78, 625.50519, 0.63625, 'Grieff - OOC script 6 - Summon Prince Sandoval'), +-- +(@NPC_GEIRRVIF, 0, 26, 27, 38, 0, 100, 0, @CREDIT_13219, @CREDIT_13219, 0, 0, 80, @NPC_GEIRRVIF*100+6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On data set - Call script 7'), +-- +(@NPC_GEIRRVIF*100+6, 9, 0, 0, 1, 0, 100, 1, 0, 0, 0, 0, 1, 24, 10, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On data set - Say 24'), +(@NPC_GEIRRVIF*100+6, 9, 1, 0, 1, 0, 100, 0, 0, 0, 0, 0, 15, @QUEST_FINCHAL, 0, 0, 0, 0, 0, 18, 80, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 7 - Kill credit'), +(@NPC_GEIRRVIF*100+6, 9, 2, 0, 1, 0, 100, 1, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 8216.25, 3516.23, 629.357, 3.83972, 'Grieff - On link - Move to position'), +(@NPC_GEIRRVIF*100+6, 9, 3, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 1, 25, 10, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 7 - Say 25'), +(@NPC_GEIRRVIF*100+6, 9, 4, 0, 1, 0, 100, 1, 6000, 6000, 0, 0, 1, 26, 10, 0, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 7 - Say 26'), +(@NPC_GEIRRVIF*100+6, 9, 5, 0, 1, 0, 100, 1, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - OOC script 7 - Change npc flag'), +-- +(@NPC_GEIRRVIF, 0, 27, 0, 38, 0, 100, 0, @KILL_13214, @KILL_13214, 0, 0, 1, 27, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Greiff - On data set - Say kill'), +(@NPC_GEIRRVIF, 0, 28, 0, 38, 0, 100, 0, @WIPE_13214, @WIPE_13214, 0, 0, 69, 0, 0, 0, 0, 1, 0, 8, 0, 0, 0, 8216.25, 3516.23, 629.357, 3.83972, 'Grieff - On data set - Move to position'), +(@NPC_GEIRRVIF, 0, 29, 0, 38, 0, 100, 0, @WIPE_13214, @WIPE_13214, 0, 0, 81, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On data set - Change npc flag'), +(@NPC_GEIRRVIF, 0, 30, 0, 38, 0, 100, 0, @WIPE_13214, @WIPE_13214, 0, 0, 78, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Grieff - On data set - Script reset'), +(@NPC_GEIRRVIF, 0, 31, 0, 38, 0, 100, 0, @DESPAWN_13219, @DESPAWN_13219, 0, 0, 41, 0, 0, 0, 0, 0, 0, 11, @NPC_ELDRETH_13214, 200, 0, 0, 0, 0, 0, 'Grieff - On data set - Despawn corpse'), +(@NPC_GEIRRVIF, 0, 32, 0, 38, 0, 100, 0, @DESPAWN_13219, @DESPAWN_13219, 0, 0, 41, 0, 0, 0, 0, 0, 0, 11, @NPC_GENESS_13214, 200, 0, 0, 0, 0, 0, 'Grieff - On data set - Despawn corpse'), +(@NPC_GEIRRVIF, 0, 33, 0, 38, 0, 100, 0, @DESPAWN_13219, @DESPAWN_13219, 0, 0, 41, 0, 0, 0, 0, 0, 0, 11, @NPC_JHADRAS_13214, 200, 0, 0, 0, 0, 0, 'Grieff - On data set - Despawn corpse'), +(@NPC_GEIRRVIF, 0, 34, 0, 38, 0, 100, 0, @DESPAWN_13219, @DESPAWN_13219, 0, 0, 41, 0, 0, 0, 0, 0, 0, 11, @NPC_MASUD_13214, 200, 0, 0, 0, 0, 0, 'Grieff - On data set - Despawn corpse'), +(@NPC_GEIRRVIF, 0, 35, 0, 38, 0, 100, 0, @DESPAWN_13219, @DESPAWN_13219, 0, 0, 41, 0, 0, 0, 0, 0, 0, 11, @NPC_RITH_13214, 200, 0, 0, 0, 0, 0, 'Grieff - On data set - Despawn corpse'), +(@NPC_GEIRRVIF, 0, 36, 0, 38, 0, 100, 0, @DESPAWN_13219, @DESPAWN_13219, 0, 0, 41, 0, 0, 0, 0, 0, 0, 11, @NPC_TALLA_13214, 200, 0, 0, 0, 0, 0, 'Grieff - On data set - Despawn corpse'), +(@NPC_GEIRRVIF, 0, 37, 0, 38, 0, 100, 0, @DESPAWN_13219, @DESPAWN_13219, 0, 0, 41, 0, 0, 0, 0, 0, 0, 11, @NPC_KHITRIX_13215, 200, 0, 0, 0, 0, 0, 'Grieff - On data set - Despawn corpse'), +(@NPC_GEIRRVIF, 0, 38, 0, 38, 0, 100, 0, @DESPAWN_13219, @DESPAWN_13219, 0, 0, 41, 0, 0, 0, 0, 0, 0, 11, @NPC_SIGRID_13216, 200, 0, 0, 0, 0, 0, 'Grieff - On data set - Despawn corpse'), +(@NPC_GEIRRVIF, 0, 39, 0, 38, 0, 100, 0, @DESPAWN_13219, @DESPAWN_13219, 0, 0, 41, 0, 0, 0, 0, 0, 0, 11, @NPC_CARNAGE_13217, 200, 0, 0, 0, 0, 0, 'Grieff - On data set - Despawn corpse'), +(@NPC_GEIRRVIF, 0, 40, 0, 38, 0, 100, 0, @DESPAWN_13219, @DESPAWN_13219, 0, 0, 41, 0, 0, 0, 0, 0, 0, 11, @NPC_THANE_13218, 200, 0, 0, 0, 0, 0, 'Grieff - On data set - Despawn corpse'), +(@NPC_GEIRRVIF, 0, 41, 0, 38, 0, 100, 0, @DESPAWN_13219, @DESPAWN_13219, 0, 0, 41, 0, 0, 0, 0, 0, 0, 11, @NPC_PRINCESAND_13219, 200, 0, 0, 0, 0, 0, 'Grieff - On data set - Despawn corpse'); + +DELETE FROM `creature_text` WHERE `entry`=@NPC_GEIRRVIF; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES +(@NPC_GEIRRVIF, 0, 0, 'Valhalas is yours to win or die in, $N. But whatever you do, stay within the bounds of the arena. To flee is to lose and be dishonored.', 12, 0, 0, 0, 0, 0, 'Greiff quest 1 say 1'), +(@NPC_GEIRRVIF, 1, 1, '$N and $g his : her; comrades in arms have chosen to accept honorable combat within the sacred confines of Valhalas.', 14, 0, 0, 0, 0, 0, 'Greiff quest 1 say 2'), +(@NPC_GEIRRVIF, 2, 2, 'There can be only one outcome to such a battle: death for one side or the other. Let $N prove $g himself : herself; upon the bones of those outsiders who have fallen before!', 14, 0, 0, 0, 0, 0, 'Greiff quest 1 say 3'), +(@NPC_GEIRRVIF, 3, 3, 'The fallen heroes of Valhalas emerge from the ground to do battle once more!', 41, 0, 0, 0, 0, 14998, 'Greiff quest 1 say 4'), +(@NPC_GEIRRVIF, 4, 4, '$N has defeated the fallen heroes of Valhalas battles past. This is only a beginning, but it will suffice.', 14, 0, 0, 0, 0, 14998, 'Greiff quest 1 say 5'), +(@NPC_GEIRRVIF, 5, 5, 'Prepare yourself. Khit''rix will be entering Valhalas from the southeast. Remember, do not leave the ring or you will lose the battle.', 12, 0, 0, 0, 0, 0, 'Greiff quest 2 say 1'), +(@NPC_GEIRRVIF, 6, 6, '$N has accepted the challenge of Khit''rix the Dark Master. May the gods show mercy upon $g him : her; for Khit''rix surely will not.', 14, 0, 0, 0, 0, 0, 'Greiff quest 2 say 2'), +(@NPC_GEIRRVIF, 7, 7, 'Khit''rix the Dark Master skitters into Valhalas from the southeast!', 41, 0, 0, 0, 0, 14998, 'Greiff quest 2 say 3'), +(@NPC_GEIRRVIF, 8, 8, 'Khit''rix the Dark Master has been defeated by $N and $g his : her; band of companions. Let the next challenge be issued!', 14, 0, 0, 0, 0, 14998, 'Greiff quest 2 sasy 4'), +(@NPC_GEIRRVIF, 9, 9, 'Sigrid Iceborn has returned to the heights of Jotunheim to prove herself against $N. When last they met, $N bested her in personal combat. Let us see the outcome of this match.', 14, 0, 0, 0, 0, 0, 'Greiff quest 3 say 1'), +(@NPC_GEIRRVIF, 10, 10, 'Circling Valhalas, Sigrid Iceborn approaches to seek her revenge! ', 41, 0, 0, 0, 0, 14998, 'Greiff quest 3 say 2'), +(@NPC_GEIRRVIF, 11, 11, '$N has defeated Sigrid Iceborn for a second time. Well, this time $g he : she; did it with the help of $g his : her; friends, but a win is a win!', 14, 0, 0, 0, 0, 14998, 'Greiff quest 3 say 3'), +(@NPC_GEIRRVIF, 12, 12, 'Carnage is coming! Remember, no matter what you do, do NOT leave the battle ring or I will disqualify you and your group.', 12, 0, 0, 0, 0, 0, 'Greiff quest 4 say 1'), +(@NPC_GEIRRVIF, 13, 13, 'From the bowels of the Underhalls comes Carnage. Brave and foolish $N has accepted the challenge. $G He : She; and $g his : her; group stand ready to face the monstrosity.', 14, 0, 0, 0, 0, 0, 'Greiff quest 4 say 2'), +(@NPC_GEIRRVIF, 14, 14, 'Lumbering in from the south, the smell of Carnage precedes him!', 41, 0, 0, 0, 0, 14998, 'Greiff quest 4 say 3'), +(@NPC_GEIRRVIF, 15, 15, 'The horror known as Carnage is no more. Could it be that $N is truly worthy of battle in Valhalas? We shall see.', 14, 0, 0, 0, 0, 14998, 'Greiff quest 4 say 4'), +(@NPC_GEIRRVIF, 16, 16, 'Look to the southeast and you will see the thane upon the platform near Gjonner the Merciless when he shows himself. Let him come down. Stay within the ring of Valhalas.', 12, 0, 0, 0, 0, 0, 'Greiff quest 5 say 1'), +(@NPC_GEIRRVIF, 17, 17, 'Thane Banahogg returns to Valhalas for the first time in ages to prove that the vrykul are the only beings worthy to fight within its sacred ring. Will $N prove him wrong?', 14, 0, 0, 0, 0, 0, 'Greiff quest 5 say 2'), +(@NPC_GEIRRVIF, 18, 18, 'Thane Banahogg appears upon the overlook to the southeast!', 41, 0, 0, 0, 0, 14998, 'Greiff quest 5 say 3'), +(@NPC_GEIRRVIF, 19, 19, 'Thane Banahogg the Deathblow has fallen to $N and $g his : her; fighting companions. $G He : She; has but one challenge ahead of $g him : her;. Who will it be?', 14, 0, 0, 0, 0, 14998, 'Greiff quest 5 say 4'), +(@NPC_GEIRRVIF, 20, 20, 'It''s too late to run now. Do not leave the ring. Die bravely, $N!', 12, 0, 0, 0, 0, 0, 'Greiff quest 6 say 1'), +(@NPC_GEIRRVIF, 21, 21, 'From the depths of Icecrown Citadel, one of the Lich King''s chosen comes to put an end to the existence of $N and $g his : her; friends.', 14, 0, 0, 0, 0, 0, 'Greiff quest 6 say 2'), +(@NPC_GEIRRVIF, 22, 22, 'Warriors of Jotunheim, I present to you, Blood Prince Sandoval!', 14, 0, 0, 0, 0, 0, 'Greiff quest 6 say 3'), +(@NPC_GEIRRVIF, 23, 23, 'Without warning, Prince Sandoval magically appears within Valhalas! ', 41, 0, 0, 0, 0, 14998, 'Greiff quest 6 say 4'), +(@NPC_GEIRRVIF, 24, 24, 'The unthinkable has happened... $N has slain Prince Sandoval!', 14, 0, 0, 0, 0, 0, 'Greiff quest 6 say 5'), +(@NPC_GEIRRVIF, 25, 25, 'In defeating him, $g he : she; and $g his : her; fighting companions have proven themselves worthy of battle in this most sacred place of vrykul honor.', 14, 0, 0, 0, 0, 0, 'Greiff quest 6 say 6'), +(@NPC_GEIRRVIF, 26, 26, 'ALL HAIL $N, CHAMPION OF VALHALAS!', 14, 0, 0, 0, 0, 14998, 'Greiff quest 6 say 7'), +(@NPC_GEIRRVIF, 27, 27, 'You were not prepared!', 14, 0, 0, 0, 0, 0, 'Greiff kill'); diff --git a/sql/updates/world/2013_09_21_00_world_sai.sql b/sql/updates/world/2013_09_21_00_world_sai.sql new file mode 100644 index 00000000000..f5827fbd78c --- /dev/null +++ b/sql/updates/world/2013_09_21_00_world_sai.sql @@ -0,0 +1,4 @@ +UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry`=22177; +DELETE FROM `smart_scripts` WHERE `entryorguid`=22177 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 +(22177,0,0,0,8,0,100,0,38530,0,0,0,33,22177,0,0,0,0,0,7,0,0,0,0,0,0,0,'Eye of Grillok Quest Credit Bunny - On Spellhit (Quest Credit for Eye of Grillok) - Give Kill Credit'); diff --git a/sql/updates/world/2013_09_22_00_world_sai.sql b/sql/updates/world/2013_09_22_00_world_sai.sql new file mode 100644 index 00000000000..e7c5753bfc4 --- /dev/null +++ b/sql/updates/world/2013_09_22_00_world_sai.sql @@ -0,0 +1,7 @@ +UPDATE `smart_scripts` SET `link`=3 WHERE `entryorguid` IN (22401,21182,22402,22403) AND `source_type`=0 AND `id`=2 AND `link`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (22401,21182,22402,22403) AND `source_type`=0 AND `id`=3; +INSERT INTO `smart_scripts` (`entryorguid`, `id`, `event_type`, `action_type`, `action_param1`, `target_type`, `comment`) VALUES +(22401,3,61,33,22401,7,'Zeth''Gor Quest Credit Marker, They Must Burn, Tower North - On spell hit - Give Quest Credit'), +(21182,3,61,33,21182,7,'Zeth''Gor Quest Credit Marker, They Must Burn, Tower South - On spell hit - Give Quest Credit'), +(22402,3,61,33,22402,7,'Zeth''Gor Quest Credit Marker, They Must Burn, Tower Forge - On spell hit - Give Quest Credit'), +(22403,3,61,33,22403,7,'Zeth''Gor Quest Credit Marker, They Must Burn, Tower Foothill - On spell hit - Give Quest Credit'); diff --git a/src/server/collision/Maps/TileAssembler.cpp b/src/server/collision/Maps/TileAssembler.cpp index ddaa8cb9c67..5b38d9f4e18 100644 --- a/src/server/collision/Maps/TileAssembler.cpp +++ b/src/server/collision/Maps/TileAssembler.cpp @@ -508,7 +508,8 @@ namespace VMAP return false; } - char ident[8]; + char ident[9]; + ident[8] = '\0'; int readOperation = 0; READ_OR_RETURN(&ident, 8); diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index a1862c07d14..a56d0f94f2d 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -699,6 +699,10 @@ void SmartAI::InitializeAI() void SmartAI::OnCharmed(bool apply) { GetScript()->ProcessEventsFor(SMART_EVENT_CHARMED, NULL, 0, 0, apply); + + if (!apply && !me->IsInEvadeMode() && me->GetUInt64Value(UNIT_FIELD_CHARMEDBY)) + if (Unit* charmer = ObjectAccessor::GetUnit(*me, me->GetUInt64Value(UNIT_FIELD_CHARMEDBY))) + AttackStart(charmer); } void SmartAI::DoAction(int32 param) diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 8b12b2a2cc5..70dd9e9d1ee 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1447,7 +1447,6 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (!einfo) { TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info id %u for creature %u", equipId, npc->GetEntry()); - delete targets; break; } @@ -1771,10 +1770,14 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (!targets) break; + bool foundTarget = false; + for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { if (IsCreature((*itr))) { + foundTarget = true; + if (e.action.moveRandom.distance) (*itr)->ToCreature()->GetMotionMaster()->MoveRandom((float)e.action.moveRandom.distance); else @@ -1782,6 +1785,14 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u } } + if (!foundTarget && me && IsCreature(me)) + { + if (e.action.moveRandom.distance) + me->GetMotionMaster()->MoveRandom((float)e.action.moveRandom.distance); + else + me->GetMotionMaster()->MoveIdle(); + } + delete targets; break; } @@ -1991,13 +2002,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u e.GetTargetType() == SMART_TARGET_OWNER_OR_SUMMONER || e.GetTargetType() == SMART_TARGET_ACTION_INVOKER || e.GetTargetType() == SMART_TARGET_CLOSEST_ENEMY || e.GetTargetType() == SMART_TARGET_CLOSEST_FRIENDLY) { - if (ObjectList* targets = GetTargets(e, unit)) - { - if (WorldObject* target = targets->front()) - (*itr)->ToCreature()->SetHomePosition(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation()); - - delete targets; - } + (*itr)->ToCreature()->SetHomePosition((*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ(), (*itr)->GetOrientation()); } else TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Action target for SMART_ACTION_SET_HOME_POS is invalid, skipping"); @@ -2294,8 +2299,9 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /* l->push_back(baseObject); break; case SMART_TARGET_VICTIM: - if (me && me->GetVictim()) - l->push_back(me->GetVictim()); + if (me) + if (Unit* victim = me->GetVictim()) + l->push_back(victim); break; case SMART_TARGET_HOSTILE_SECOND_AGGRO: if (me) @@ -2508,8 +2514,15 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /* case SMART_TARGET_OWNER_OR_SUMMONER: { if (me) - if (Unit* owner = ObjectAccessor::GetUnit(*me, me->GetCharmerOrOwnerGUID())) + { + uint64 charmerOrOwnerGuid = me->GetCharmerOrOwnerGUID(); + + if (!charmerOrOwnerGuid) + charmerOrOwnerGuid = me->GetCreatorGUID(); + + if (Unit* owner = ObjectAccessor::GetUnit(*me, charmerOrOwnerGuid)) l->push_back(owner); + } break; } case SMART_TARGET_THREAT_LIST: diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 01f9080fba1..361cf025647 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -771,6 +771,26 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_ACTION_SUMMON_CREATURE: if (!IsCreatureValid(e, e.action.summonCreature.creature)) return false; + + for (uint32 i = 0; i < sSpellMgr->GetSpellInfoStoreSize(); ++i) + { + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(i); + if (!spellInfo) + continue; + + for (uint32 j = 0; j < MAX_SPELL_EFFECTS; ++j) + { + if (spellInfo->Effects[j].Effect == SPELL_EFFECT_SUMMON) + { + uint32 creatureSummonEntry = spellInfo->Effects[j].MiscValue; + + if (e.action.summonCreature.creature == creatureSummonEntry) + TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u creature summon: %u has already summon spell (SpellId: %u effect: %u)", + e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.summonCreature.creature, spellInfo->Id, j); + } + } + } + if (e.action.summonCreature.type < TEMPSUMMON_TIMED_OR_DEAD_DESPAWN || e.action.summonCreature.type > TEMPSUMMON_MANUAL_DESPAWN) { TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect TempSummonType %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.summonCreature.type); @@ -828,6 +848,25 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_ACTION_SUMMON_GO: if (!IsGameObjectValid(e, e.action.summonGO.entry)) return false; + + for (uint32 i = 0; i < sSpellMgr->GetSpellInfoStoreSize(); ++i) + { + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(i); + if (!spellInfo) + continue; + + for (uint32 j = 0; j < MAX_SPELL_EFFECTS; ++j) + { + if (spellInfo->Effects[j].Effect == SPELL_EFFECT_SUMMON_OBJECT_WILD) + { + uint32 goSummonEntry = spellInfo->Effects[j].MiscValue; + + if (e.action.summonGO.entry == goSummonEntry) + TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u gameobject summon: %u has already summon spell (SpellId: %u effect: %u)", + e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.summonGO.entry, spellInfo->Id, j); + } + } + } break; case SMART_ACTION_ADD_ITEM: case SMART_ACTION_REMOVE_ITEM: diff --git a/src/server/game/Accounts/RBAC.h b/src/server/game/Accounts/RBAC.h index 492a7197cfe..2be501e6aaf 100644 --- a/src/server/game/Accounts/RBAC.h +++ b/src/server/game/Accounts/RBAC.h @@ -1,726 +1,1033 @@ -/*
- * Copyright (C) 2008-2013 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/>.
- */
-
-/**
-* @file RBAC.h
-* @brief Role Based Access Control related classes definition
-*
-* This file contains all the classes and enums used to implement
-* Role Based Access Control
-*
-* RBAC Rules:
-* - Pemission: Defines an autorization to perform certain operation.
-* - Role: Set of permissions.
-* - Group: Set of roles.
-* - An Account can have multiple groups, roles and permissions.
-* - Account Groups can only be granted or revoked
-* - Account Roles and Permissions can be granted, denied or revoked
-* - Grant: Assignment of the object (role/permission) and allow it
-* - Deny: Assignment of the object (role/permission) and deny it
-* - Revoke: Removal of the object (role/permission) no matter if it was granted or denied
-* - Global Permissions are computed as:
-* Group Grants + Role Grants + User Grans - Role Grants - User Grants
-* - Groups, Roles and Permissions can be assigned by realm
-*/
-
-#ifndef _RBAC_H
-#define _RBAC_H
-
-#include "Define.h"
-#include <string>
-#include <bitset>
-#include <set>
-#include <map>
-
-enum RBACPermissions
-{
- RBAC_PERM_INSTANT_LOGOUT = 1,
- RBAC_PERM_SKIP_QUEUE = 2,
- RBAC_PERM_JOIN_NORMAL_BG = 3,
- RBAC_PERM_JOIN_RANDOM_BG = 4,
- RBAC_PERM_JOIN_ARENAS = 5,
- RBAC_PERM_JOIN_DUNGEON_FINDER = 6,
- RBAC_PERM_PLAYER_COMMANDS = 7,
- RBAC_PERM_MODERATOR_COMMANDS = 8,
- RBAC_PERM_GAMEMASTER_COMMANDS = 9,
- RBAC_PERM_ADMINISTRATOR_COMMANDS = 10,
- RBAC_PERM_LOG_GM_TRADE = 11,
- RBAC_PERM_CONSOLE_COMMANDS = 12, // Not pressent in DB
- RBAC_PERM_SKIP_CHECK_INSTANCE_REQUIRED_BOSSES = 13,
- RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_TEAMMASK = 14,
- RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_CLASSMASK = 15,
- RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RACEMASK = 16,
- RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RESERVEDNAME = 17,
- RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_HEROIC_CHARACTER = 18,
- RBAC_PERM_SKIP_CHECK_CHAT_CHANNEL_REQ = 19,
- RBAC_PERM_SKIP_CHECK_DISABLE_MAP = 20,
- RBAC_PERM_SKIP_CHECK_MORE_TALENTS_THAN_ALLOWED = 21,
- RBAC_PERM_SKIP_CHECK_CHAT_SPAM = 22,
- RBAC_PERM_SKIP_CHECK_OVERSPEED_PING = 23,
- RBAC_PERM_TWO_SIDE_CHARACTER_CREATION = 24,
- RBAC_PERM_TWO_SIDE_INTERACTION_CHAT = 25,
- RBAC_PERM_TWO_SIDE_INTERACTION_CHANNEL = 26,
- RBAC_PERM_TWO_SIDE_INTERACTION_MAIL = 27,
- RBAC_PERM_TWO_SIDE_WHO_LIST = 28,
- RBAC_PERM_TWO_SIDE_ADD_FRIEND = 29,
- RBAC_PERM_COMMANDS_SAVE_WITHOUT_DELAY = 30,
- RBAC_PERM_COMMANDS_USE_UNSTUCK_WITH_ARGS = 31,
- RBAC_PERM_COMMANDS_BE_ASSIGNED_TICKET = 32,
- RBAC_PERM_COMMANDS_NOTIFY_COMMAND_NOT_FOUND_ERROR = 33,
- RBAC_PERM_COMMANDS_APPEAR_IN_GM_LIST = 34,
- RBAC_PERM_WHO_SEE_ALL_SEC_LEVELS = 35,
- RBAC_PERM_CAN_FILTER_WHISPERS = 36,
- RBAC_PERM_CHAT_USE_STAFF_BADGE = 37,
- RBAC_PERM_RESURRECT_WITH_FULL_HPS = 38,
- RBAC_PERM_RESTORE_SAVED_GM_STATE = 39,
- RBAC_PERM_ALLOW_GM_FRIEND = 40,
- RBAC_PERM_USE_START_GM_LEVEL = 41,
- RBAC_PERM_OPCODE_WORLD_TELEPORT = 42,
- RBAC_PERM_OPCODE_WHOIS = 43,
- RBAC_PERM_RECEIVE_GLOBAL_GM_TEXTMESSAGE = 44,
- RBAC_PERM_SILENTLY_JOIN_CHANNEL = 45,
- RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR = 46,
- RBAC_PERM_CHECK_FOR_LOWER_SECURITY = 47,
- RBAC_PERM_COMMANDS_PINFO_CHECK_PERSONAL_DATA = 48,
- RBAC_PERM_EMAIL_CONFIRM_FOR_PASS_CHANGE = 49,
- RBAC_PERM_MAY_CHECK_OWN_EMAIL = 50,
- // Leave some space for core permissions
- RBAC_PERM_COMMAND_RBAC = 200,
- RBAC_PERM_COMMAND_RBAC_ACC = 201,
- RBAC_PERM_COMMAND_RBAC_ACC_GROUP = 202,
- RBAC_PERM_COMMAND_RBAC_ACC_GROUP_ADD = 203,
- RBAC_PERM_COMMAND_RBAC_ACC_GROUP_DEL = 204,
- RBAC_PERM_COMMAND_RBAC_ACC_ROLE = 205,
- RBAC_PERM_COMMAND_RBAC_ACC_ROLE_GRANT = 206,
- RBAC_PERM_COMMAND_RBAC_ACC_ROLE_DENY = 207,
- RBAC_PERM_COMMAND_RBAC_ACC_ROLE_REVOKE = 208,
- RBAC_PERM_COMMAND_RBAC_ACC_PERM = 209,
- RBAC_PERM_COMMAND_RBAC_ACC_PERM_GRANT = 210,
- RBAC_PERM_COMMAND_RBAC_ACC_PERM_DENY = 211,
- RBAC_PERM_COMMAND_RBAC_ACC_PERM_REVOKE = 212,
- RBAC_PERM_COMMAND_RBAC_LIST = 213,
- RBAC_PERM_COMMAND_RBAC_LIST_GROUPS = 214,
- RBAC_PERM_COMMAND_RBAC_LIST_ROLES = 215,
- RBAC_PERM_COMMAND_RBAC_LIST_PERMS = 216,
- RBAC_PERM_COMMAND_ACCOUNT = 217,
- RBAC_PERM_COMMAND_ACCOUNT_ADDON = 218,
- RBAC_PERM_COMMAND_ACCOUNT_CREATE = 219,
- RBAC_PERM_COMMAND_ACCOUNT_DELETE = 220,
- RBAC_PERM_COMMAND_ACCOUNT_LOCK = 221,
- RBAC_PERM_COMMAND_ACCOUNT_LOCK_COUNTRY = 222,
- RBAC_PERM_COMMAND_ACCOUNT_LOCK_IP = 223,
- RBAC_PERM_COMMAND_ACCOUNT_ONLINE_LIST = 224,
- RBAC_PERM_COMMAND_ACCOUNT_PASSWORD = 225,
- RBAC_PERM_COMMAND_ACCOUNT_SET = 226,
- RBAC_PERM_COMMAND_ACCOUNT_SET_ADDON = 227,
- RBAC_PERM_COMMAND_ACCOUNT_SET_GMLEVEL = 228,
- RBAC_PERM_COMMAND_ACCOUNT_SET_PASSWORD = 229,
- RBAC_PERM_COMMAND_ACHIEVEMENT = 230,
- RBAC_PERM_COMMAND_ACHIEVEMENT_ADD = 231,
- RBAC_PERM_COMMAND_ARENA = 232,
- RBAC_PERM_COMMAND_ARENA_CAPTAIN = 233,
- RBAC_PERM_COMMAND_ARENA_CREATE = 234,
- RBAC_PERM_COMMAND_ARENA_DISBAND = 235,
- RBAC_PERM_COMMAND_ARENA_INFO = 236,
- RBAC_PERM_COMMAND_ARENA_LOOKUP = 237,
- RBAC_PERM_COMMAND_ARENA_RENAME = 238,
- RBAC_PERM_COMMAND_BAN = 239,
- RBAC_PERM_COMMAND_BAN_ACCOUNT = 240,
- RBAC_PERM_COMMAND_BAN_CHARACTER = 241,
- RBAC_PERM_COMMAND_BAN_IP = 242,
- RBAC_PERM_COMMAND_BAN_PLAYERACCOUNT = 243,
- RBAC_PERM_COMMAND_BANINFO = 244,
- RBAC_PERM_COMMAND_BANINFO_ACCOUNT = 245,
- RBAC_PERM_COMMAND_BANINFO_CHARACTER = 246,
- RBAC_PERM_COMMAND_BANINFO_IP = 247,
- RBAC_PERM_COMMAND_BANLIST = 248,
- RBAC_PERM_COMMAND_BANLIST_ACCOUNT = 249,
- RBAC_PERM_COMMAND_BANLIST_CHARACTER = 250,
- RBAC_PERM_COMMAND_BANLIST_IP = 251,
- RBAC_PERM_COMMAND_UNBAN = 252,
- RBAC_PERM_COMMAND_UNBAN_ACCOUNT = 253,
- RBAC_PERM_COMMAND_UNBAN_CHARACTER = 254,
- RBAC_PERM_COMMAND_UNBAN_IP = 255,
- RBAC_PERM_COMMAND_UNBAN_PLAYERACCOUNT = 256,
- RBAC_PERM_COMMAND_BF = 257,
- RBAC_PERM_COMMAND_BF_START = 258,
- RBAC_PERM_COMMAND_BF_STOP = 259,
- RBAC_PERM_COMMAND_BF_SWITCH = 260,
- RBAC_PERM_COMMAND_BF_TIMER = 261,
- RBAC_PERM_COMMAND_BF_ENABLE = 262,
- RBAC_PERM_COMMAND_ACCOUNT_EMAIL = 263,
- RBAC_PERM_COMMAND_ACCOUNT_SET_SEC = 264,
- RBAC_PERM_COMMAND_ACCOUNT_SET_SEC_EMAIL = 265,
- RBAC_PERM_COMMAND_ACCOUNT_SET_SEC_REGMAIL = 266,
- RBAC_PERM_COMMAND_CAST = 267,
- RBAC_PERM_COMMAND_CAST_BACK = 268,
- RBAC_PERM_COMMAND_CAST_DIST = 269,
- RBAC_PERM_COMMAND_CAST_SELF = 270,
- RBAC_PERM_COMMAND_CAST_TARGET = 271,
- RBAC_PERM_COMMAND_CAST_DEST = 272,
- RBAC_PERM_COMMAND_CHARACTER = 273,
- RBAC_PERM_COMMAND_CHARACTER_CUSTOMIZE = 274,
- RBAC_PERM_COMMAND_CHARACTER_CHANGEFACTION = 275,
- RBAC_PERM_COMMAND_CHARACTER_CHANGERACE = 276,
- RBAC_PERM_COMMAND_CHARACTER_DELETED = 277,
- RBAC_PERM_COMMAND_CHARACTER_DELETED_DELETE = 278, // Not in DB - console
- RBAC_PERM_COMMAND_CHARACTER_DELETED_LIST = 279,
- RBAC_PERM_COMMAND_CHARACTER_DELETED_RESTORE = 280,
- RBAC_PERM_COMMAND_CHARACTER_DELETED_OLD = 281, // Not in DB - console
- RBAC_PERM_COMMAND_CHARACTER_ERASE = 282, // Not in DB - console
- RBAC_PERM_COMMAND_CHARACTER_LEVEL = 283,
- RBAC_PERM_COMMAND_CHARACTER_RENAME = 284,
- RBAC_PERM_COMMAND_CHARACTER_REPUTATION = 285,
- RBAC_PERM_COMMAND_CHARACTER_TITLES = 286,
- RBAC_PERM_COMMAND_LEVELUP = 287,
- RBAC_PERM_COMMAND_PDUMP = 288,
- RBAC_PERM_COMMAND_PDUMP_LOAD = 289,
- RBAC_PERM_COMMAND_PDUMP_WRITE = 290,
- RBAC_PERM_COMMAND_CHEAT = 291,
- RBAC_PERM_COMMAND_CHEAT_CASTTIME = 292,
- RBAC_PERM_COMMAND_CHEAT_COOLDOWN = 293,
- RBAC_PERM_COMMAND_CHEAT_EXPLORE = 294,
- RBAC_PERM_COMMAND_CHEAT_GOD = 295,
- RBAC_PERM_COMMAND_CHEAT_POWER = 296,
- RBAC_PERM_COMMAND_CHEAT_STATUS = 297,
- RBAC_PERM_COMMAND_CHEAT_TAXI = 298,
- RBAC_PERM_COMMAND_CHEAT_WATERWALK = 299,
- RBAC_PERM_COMMAND_DEBUG = 300,
- RBAC_PERM_COMMAND_DEBUG_ANIM = 301,
- RBAC_PERM_COMMAND_DEBUG_AREATRIGGERS = 302,
- RBAC_PERM_COMMAND_DEBUG_ARENA = 303,
- RBAC_PERM_COMMAND_DEBUG_BG = 304,
- RBAC_PERM_COMMAND_DEBUG_ENTERVEHICLE = 305,
- RBAC_PERM_COMMAND_DEBUG_GETITEMSTATE = 306,
- RBAC_PERM_COMMAND_DEBUG_GETITEMVALUE = 307,
- RBAC_PERM_COMMAND_DEBUG_GETVALUE = 308,
- RBAC_PERM_COMMAND_DEBUG_HOSTIL = 309,
- RBAC_PERM_COMMAND_DEBUG_ITEMEXPIRE = 310,
- RBAC_PERM_COMMAND_DEBUG_LOOTRECIPIENT = 311,
- RBAC_PERM_COMMAND_DEBUG_LOS = 312,
- RBAC_PERM_COMMAND_DEBUG_MOD32VALUE = 313,
- RBAC_PERM_COMMAND_DEBUG_MOVEFLAGS = 314,
- RBAC_PERM_COMMAND_DEBUG_PLAY = 315,
- RBAC_PERM_COMMAND_DEBUG_PLAY_CINEMATIC = 316,
- RBAC_PERM_COMMAND_DEBUG_PLAY_MOVIE = 317,
- RBAC_PERM_COMMAND_DEBUG_PLAY_SOUND = 318,
- RBAC_PERM_COMMAND_DEBUG_SEND = 319,
- RBAC_PERM_COMMAND_DEBUG_SEND_BUYERROR = 320,
- RBAC_PERM_COMMAND_DEBUG_SEND_CHANNELNOTIFY = 321,
- RBAC_PERM_COMMAND_DEBUG_SEND_CHATMESSAGE = 322,
- RBAC_PERM_COMMAND_DEBUG_SEND_EQUIPERROR = 323,
- RBAC_PERM_COMMAND_DEBUG_SEND_LARGEPACKET = 324,
- RBAC_PERM_COMMAND_DEBUG_SEND_OPCODE = 325,
- RBAC_PERM_COMMAND_DEBUG_SEND_QINVALIDMSG = 326,
- RBAC_PERM_COMMAND_DEBUG_SEND_QPARTYMSG = 327,
- RBAC_PERM_COMMAND_DEBUG_SEND_SELLERROR = 328,
- RBAC_PERM_COMMAND_DEBUG_SEND_SETPHASESHIFT = 329,
- RBAC_PERM_COMMAND_DEBUG_SEND_SPELLFAIL = 330,
- RBAC_PERM_COMMAND_DEBUG_SETAURASTATE = 331,
- RBAC_PERM_COMMAND_DEBUG_SETBIT = 332,
- RBAC_PERM_COMMAND_DEBUG_SETITEMVALUE = 333,
- RBAC_PERM_COMMAND_DEBUG_SETVALUE = 334,
- RBAC_PERM_COMMAND_DEBUG_SETVID = 335,
- RBAC_PERM_COMMAND_DEBUG_SPAWNVEHICLE = 336,
- RBAC_PERM_COMMAND_DEBUG_THREAT = 337,
- RBAC_PERM_COMMAND_DEBUG_UPDATE = 338,
- RBAC_PERM_COMMAND_DEBUG_UWS = 339,
- RBAC_PERM_COMMAND_WPGPS = 340,
- RBAC_PERM_COMMAND_DESERTER = 341,
- RBAC_PERM_COMMAND_DESERTER_BG = 342,
- RBAC_PERM_COMMAND_DESERTER_BG_ADD = 343,
- RBAC_PERM_COMMAND_DESERTER_BG_REMOVE = 344,
- RBAC_PERM_COMMAND_DESERTER_INSTANCE = 345,
- RBAC_PERM_COMMAND_DESERTER_INSTANCE_ADD = 346,
- RBAC_PERM_COMMAND_DESERTER_INSTANCE_REMOVE = 347,
- RBAC_PERM_COMMAND_DISABLE = 348,
- RBAC_PERM_COMMAND_DISABLE_ADD = 349,
- RBAC_PERM_COMMAND_DISABLE_ADD_ACHIEVEMENT_CRITERIA = 350,
- RBAC_PERM_COMMAND_DISABLE_ADD_BATTLEGROUND = 351,
- RBAC_PERM_COMMAND_DISABLE_ADD_MAP = 352,
- RBAC_PERM_COMMAND_DISABLE_ADD_MMAP = 353,
- RBAC_PERM_COMMAND_DISABLE_ADD_OUTDOORPVP = 354,
- RBAC_PERM_COMMAND_DISABLE_ADD_QUEST = 355,
- RBAC_PERM_COMMAND_DISABLE_ADD_SPELL = 356,
- RBAC_PERM_COMMAND_DISABLE_ADD_VMAP = 357,
- RBAC_PERM_COMMAND_DISABLE_REMOVE = 358,
- RBAC_PERM_COMMAND_DISABLE_REMOVE_ACHIEVEMENT_CRITERIA = 359,
- RBAC_PERM_COMMAND_DISABLE_REMOVE_BATTLEGROUND = 360,
- RBAC_PERM_COMMAND_DISABLE_REMOVE_MAP = 361,
- RBAC_PERM_COMMAND_DISABLE_REMOVE_MMAP = 362,
- RBAC_PERM_COMMAND_DISABLE_REMOVE_OUTDOORPVP = 363,
- RBAC_PERM_COMMAND_DISABLE_REMOVE_QUEST = 364,
- RBAC_PERM_COMMAND_DISABLE_REMOVE_SPELL = 365,
- RBAC_PERM_COMMAND_DISABLE_REMOVE_VMAP = 366,
- RBAC_PERM_COMMAND_EVENT = 367,
- RBAC_PERM_COMMAND_EVENT_ACTIVELIST = 368,
- RBAC_PERM_COMMAND_EVENT_START = 369,
- RBAC_PERM_COMMAND_EVENT_STOP = 370,
- RBAC_PERM_COMMAND_GM = 371,
- RBAC_PERM_COMMAND_GM_CHAT = 372,
- RBAC_PERM_COMMAND_GM_FLY = 373,
- RBAC_PERM_COMMAND_GM_INGAME = 374,
- RBAC_PERM_COMMAND_GM_LIST = 375,
- RBAC_PERM_COMMAND_GM_VISIBLE = 376,
- RBAC_PERM_COMMAND_GO = 377,
- RBAC_PERM_COMMAND_GO_CREATURE = 378,
- RBAC_PERM_COMMAND_GO_GRAVEYARD = 379,
- RBAC_PERM_COMMAND_GO_GRID = 380,
- RBAC_PERM_COMMAND_GO_OBJECT = 381,
- RBAC_PERM_COMMAND_GO_TAXINODE = 382,
- RBAC_PERM_COMMAND_GO_TICKET = 383,
- RBAC_PERM_COMMAND_GO_TRIGGER = 384,
- RBAC_PERM_COMMAND_GO_XYZ = 385,
- RBAC_PERM_COMMAND_GO_ZONEXY = 386,
- RBAC_PERM_COMMAND_GOBJECT = 387,
- RBAC_PERM_COMMAND_GOBJECT_ACTIVATE = 388,
- RBAC_PERM_COMMAND_GOBJECT_ADD = 389,
- RBAC_PERM_COMMAND_GOBJECT_ADD_TEMP = 390,
- RBAC_PERM_COMMAND_GOBJECT_DELETE = 391,
- RBAC_PERM_COMMAND_GOBJECT_INFO = 392,
- RBAC_PERM_COMMAND_GOBJECT_MOVE = 393,
- RBAC_PERM_COMMAND_GOBJECT_NEAR = 394,
- RBAC_PERM_COMMAND_GOBJECT_SET = 395,
- RBAC_PERM_COMMAND_GOBJECT_SET_PHASE = 396,
- RBAC_PERM_COMMAND_GOBJECT_SET_STATE = 397,
- RBAC_PERM_COMMAND_GOBJECT_TARGET = 398,
- RBAC_PERM_COMMAND_GOBJECT_TURN = 399,
- RBAC_PERM_COMMAND_GUILD = 401,
- RBAC_PERM_COMMAND_GUILD_CREATE = 402,
- RBAC_PERM_COMMAND_GUILD_DELETE = 403,
- RBAC_PERM_COMMAND_GUILD_INVITE = 404,
- RBAC_PERM_COMMAND_GUILD_UNINVITE = 405,
- RBAC_PERM_COMMAND_GUILD_RANK = 406,
- RBAC_PERM_COMMAND_GUILD_RENAME = 407,
- RBAC_PERM_COMMAND_HONOR = 408,
- RBAC_PERM_COMMAND_HONOR_ADD = 409,
- RBAC_PERM_COMMAND_HONOR_ADD_KILL = 410,
- RBAC_PERM_COMMAND_HONOR_UPDATE = 411,
- RBAC_PERM_COMMAND_INSTANCE = 412,
- RBAC_PERM_COMMAND_INSTANCE_LISTBINDS = 413,
- RBAC_PERM_COMMAND_INSTANCE_UNBIND = 414,
- RBAC_PERM_COMMAND_INSTANCE_STATS = 415,
- RBAC_PERM_COMMAND_INSTANCE_SAVEDATA = 416,
- RBAC_PERM_COMMAND_LEARN = 417,
- RBAC_PERM_COMMAND_LEARN_ALL = 418,
- RBAC_PERM_COMMAND_LEARN_ALL_MY = 419,
- RBAC_PERM_COMMAND_LEARN_ALL_MY_CLASS = 420,
- RBAC_PERM_COMMAND_LEARN_ALL_MY_PETTALENTS = 421,
- RBAC_PERM_COMMAND_LEARN_ALL_MY_SPELLS = 422,
- RBAC_PERM_COMMAND_LEARN_ALL_MY_TALENTS = 423,
- RBAC_PERM_COMMAND_LEARN_ALL_GM = 424,
- RBAC_PERM_COMMAND_LEARN_ALL_CRAFTS = 425,
- RBAC_PERM_COMMAND_LEARN_ALL_DEFAULT = 426,
- RBAC_PERM_COMMAND_LEARN_ALL_LANG = 427,
- RBAC_PERM_COMMAND_LEARN_ALL_RECIPES = 428,
- RBAC_PERM_COMMAND_UNLEARN = 429,
- RBAC_PERM_COMMAND_LFG = 430,
- RBAC_PERM_COMMAND_LFG_PLAYER = 431,
- RBAC_PERM_COMMAND_LFG_GROUP = 432,
- RBAC_PERM_COMMAND_LFG_QUEUE = 433,
- RBAC_PERM_COMMAND_LFG_CLEAN = 434,
- RBAC_PERM_COMMAND_LFG_OPTIONS = 435,
- RBAC_PERM_COMMAND_LIST = 436,
- RBAC_PERM_COMMAND_LIST_CREATURE = 437,
- RBAC_PERM_COMMAND_LIST_ITEM = 438,
- RBAC_PERM_COMMAND_LIST_OBJECT = 439,
- RBAC_PERM_COMMAND_LIST_AURAS = 440,
- RBAC_PERM_COMMAND_LIST_MAIL = 441,
- RBAC_PERM_COMMAND_LOOKUP = 442,
- RBAC_PERM_COMMAND_LOOKUP_AREA = 443,
- RBAC_PERM_COMMAND_LOOKUP_CREATURE = 444,
- RBAC_PERM_COMMAND_LOOKUP_EVENT = 445,
- RBAC_PERM_COMMAND_LOOKUP_FACTION = 446,
- RBAC_PERM_COMMAND_LOOKUP_ITEM = 447,
- RBAC_PERM_COMMAND_LOOKUP_ITEMSET = 448,
- RBAC_PERM_COMMAND_LOOKUP_OBJECT = 449,
- RBAC_PERM_COMMAND_LOOKUP_QUEST = 450,
- RBAC_PERM_COMMAND_LOOKUP_PLAYER = 451,
- RBAC_PERM_COMMAND_LOOKUP_PLAYER_IP = 452,
- RBAC_PERM_COMMAND_LOOKUP_PLAYER_ACCOUNT = 453,
- RBAC_PERM_COMMAND_LOOKUP_PLAYER_EMAIL = 454,
- RBAC_PERM_COMMAND_LOOKUP_SKILL = 455,
- RBAC_PERM_COMMAND_LOOKUP_SPELL = 456,
- RBAC_PERM_COMMAND_LOOKUP_SPELL_ID = 457,
- RBAC_PERM_COMMAND_LOOKUP_TAXINODE = 458,
- RBAC_PERM_COMMAND_LOOKUP_TELE = 459,
- RBAC_PERM_COMMAND_LOOKUP_TITLE = 460,
- RBAC_PERM_COMMAND_LOOKUP_MAP = 461,
- RBAC_PERM_COMMAND_ANNOUNCE = 462,
- RBAC_PERM_COMMAND_CHANNEL = 463,
- RBAC_PERM_COMMAND_CHANNEL_SET = 464,
- RBAC_PERM_COMMAND_CHANNEL_SET_OWNERSHIP = 465,
- RBAC_PERM_COMMAND_GMANNOUNCE = 466,
- RBAC_PERM_COMMAND_GMNAMEANNOUNCE = 467,
- RBAC_PERM_COMMAND_GMNOTIFY = 468,
- RBAC_PERM_COMMAND_NAMEANNOUNCE = 469,
- RBAC_PERM_COMMAND_NOTIFY = 470,
- RBAC_PERM_COMMAND_WHISPERS = 471,
-
- // custom permissions 1000+
- RBAC_PERM_MAX
-};
-
-enum RBACCommandResult
-{
- RBAC_OK,
- RBAC_CANT_ADD_ALREADY_ADDED,
- RBAC_CANT_REVOKE_NOT_IN_LIST,
- RBAC_IN_GRANTED_LIST,
- RBAC_IN_DENIED_LIST,
- RBAC_ID_DOES_NOT_EXISTS
-};
-
-typedef std::bitset<RBAC_PERM_MAX> RBACPermissionContainer;
-typedef std::set<uint32> RBACRoleContainer;
-typedef std::set<uint32> RBACGroupContainer;
-
-class RBACObject
-{
- public:
- RBACObject(uint32 id = 0, std::string const& name = ""):
- _id(id), _name(name) { }
-
- virtual ~RBACObject() { }
-
- /// Gets the Name of the Object
- std::string const& GetName() const { return _name; }
- /// Gets the Id of the Object
- uint32 GetId() const { return _id; }
-
- private:
- uint32 _id; ///> id of the object
- std::string _name; ///> name of the object
-};
-
-/// Permission: Defines an autorization to perform certain operation
-class RBACPermission: public RBACObject
-{
- public:
- RBACPermission(uint32 id = 0, std::string const& name = ""):
- RBACObject(id, name) { }
-};
-
-/// Set of Permissions
-class RBACRole: public RBACObject
-{
- public:
- RBACRole(uint32 id = 0, std::string const& name = ""):
- RBACObject(id, name) { }
-
- /// Gets the Permissions assigned to this role
- RBACPermissionContainer const& GetPermissions() const { return _perms; }
- /// Grants a Permission (Adds)
- void GrantPermission(uint32 id);
- /// Revokes a Permission (Removes)
- void RevokePermission(uint32 id);
-
- private:
- RBACPermissionContainer _perms; ///> Set of permissions
-};
-
-/// Set of Roles
-class RBACGroup: public RBACObject
-{
- public:
- RBACGroup(uint32 id = 0, std::string const& name = ""):
- RBACObject(id, name) { }
-
- /// Gets the Roles assigned to this group
- RBACRoleContainer const& GetRoles() const { return _roles; }
- /// Grants a Role (Adds)
- void GrantRole(uint32 role);
- /// Revokes a Role (Removes)
- void RevokeRole(uint32 role);
-
- private:
- RBACRoleContainer _roles; ///> Set of Roles
-};
-
-/**
- * @name RBACData
- * @brief Contains all needed information about the acccount
- *
- * This class contains all the data needed to calculate the account permissions.
- * RBACDAta is formed by group permissions and user permissions through:
- * - Granted Groups, which contains roles, which contains permissions: Set of granted permissions
- * - Granted Roles, which contains permissions: Set of granted permissions
- * - Denied Roles, which contains permissions: Set of denied permissions
- * - Granted Permissions
- * - Denied Permissions
- *
- * Calculation of current Permissions: Granted permissions - Denied permissions
- * - Granted permissions: through groups, through roles and directly assigned
- * - Denied permissions: through roles and directly assigned
- */
-class RBACData: public RBACObject
-{
- public:
- RBACData(uint32 id, std::string const& name, int32 realmId):
- RBACObject(id, name), _realmId(realmId) { }
-
- /**
- * @name HasPermission
- * @brief Checks if certain action is allowed
- *
- * Checks if certain action can be performed.
- *
- * @return grant or deny action
- *
- * Example Usage:
- * @code
- * bool Player::CanJoinArena(Battleground* bg)
- * {
- * return bg->isArena() && HasPermission(RBAC_PERM_JOIN_ARENA);
- * }
- * @endcode
- */
- bool HasPermission(uint32 permission) const { return _globalPerms.test(permission); }
-
- // Functions enabled to be used by command system
- /// Returns all the granted permissions (after computation)
- RBACPermissionContainer const& GetPermissions() const { return _globalPerms; }
- /// Returns all the granted permissions
- RBACPermissionContainer const& GetGrantedPermissions() const { return _grantedPerms; }
- /// Returns all the denied permissions
- RBACPermissionContainer const& GetDeniedPermissions() const { return _deniedPerms; }
- /// Returns all the granted roles
- RBACRoleContainer const& GetGrantedRoles() const { return _grantedRoles; }
- /// Returns all the denied roles
- RBACRoleContainer const& GetDeniedRoles() const { return _deniedRoles; }
- /// Returns all the granted groups
- RBACGroupContainer const& GetGroups() const { return _groups; }
-
- /**
- * @name AddGroup
- * @brief Adds new group
- *
- * Add a new group to the account. If realm is 0 or the group can not be added
- * No save to db action will be performed.
- *
- * Fails if group Id does not exists or group already present
- *
- * @param groupId group to be added
- * @param realmId realm affected
- *
- * @return Success or failure (with reason) to add the group
- *
- * Example Usage:
- * @code
- * // previously defined "RBACData* rbac" with proper initialization
- * uint32 groupId = 2;
- * if (rbac->AddGroup(groupId) == RBAC_OK)
- * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Group %u succesfully added", groupId);
- * @endcode
- */
- RBACCommandResult AddGroup(uint32 groupId, int32 realmId = 0);
-
- /**
- * @name RemoveGroup
- * @brief Removes a group
- *
- * Removes a group from the account. If realm is 0 or the group can not be removed
- * No save to db action will be performed. Any delete operation will always affect
- * "all realms (-1)" in addition to the realm specified
- *
- * Fails if group not present
- *
- * @param groupId group to be removed
- * @param realmId realm affected
- *
- * @return Success or failure (with reason) to remove the group
- *
- * Example Usage:
- * // previously defined "RBACData* rbac" with proper initialization
- * uint32 groupId = 2;
- * if (rbac->RemoveGroup(groupId) == RBAC_OK)
- * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Group %u succesfully removed", groupId);
- * @endcode
- */
- RBACCommandResult RemoveGroup(uint32 groupId, int32 realmId = 0);
-
- /**
- * @name GrantRole
- * @brief Grants a role
- *
- * Grants a role to the account. If realm is 0 or the role can not be added
- * No save to db action will be performed.
- *
- * Fails if role Id does not exists or role already granted or denied
- *
- * @param roleId role to be granted
- * @param realmId realm affected
- *
- * @return Success or failure (with reason) to grant the role
- *
- * Example Usage:
- * // previously defined "RBACData* rbac" with proper initialization
- * uint32 roleId = 2;
- * if (rbac->GrantRole(roleId) == RBAC_IN_DENIED_LIST)
- * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Failed to grant role %u, already denied", roleId);
- * @endcode
- */
- RBACCommandResult GrantRole(uint32 roleId, int32 realmId = 0);
-
- /**
- * @name DenyRole
- * @brief Denies a role
- *
- * Denied a role to the account. If realm is 0 or the role can not be added
- * No save to db action will be performed.
- *
- * Fails if role Id does not exists or role already granted or denied
- *
- * @param roleId role to be denied
- * @param realmId realm affected
- *
- * @return Success or failure (with reason) to deny the role
- *
- * Example Usage:
- * // previously defined "RBACData* rbac" with proper initialization
- * uint32 roleId = 2;
- * if (rbac->DenyRole(roleId) == RBAC_ID_DOES_NOT_EXISTS)
- * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Role Id %u does not exists", roleId);
- * @endcode
- */
- RBACCommandResult DenyRole(uint32 roleId, int32 realmId = 0);
-
- /**
- * @name RevokeRole
- * @brief Removes a role
- *
- * Removes a role from the account. If realm is 0 or the role can not be removed
- * No save to db action will be performed. Any delete operation will always affect
- * "all realms (-1)" in addition to the realm specified
- *
- * Fails if role not present
- *
- * @param roleId role to be removed
- * @param realmId realm affected
- *
- * @return Success or failure (with reason) to remove the role
- *
- * Example Usage:
- * // previously defined "RBACData* rbac" with proper initialization
- * uint32 roleId = 2;
- * if (rbac->RevokeRole(roleId) == RBAC_OK)
- * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Role %u succesfully removed", roleId);
- * @endcode
- */
- RBACCommandResult RevokeRole(uint32 roleId, int32 realmId = 0);
-
- /**
- * @name GrantRole
- * @brief Grants a permission
- *
- * Grants a permission to the account. If realm is 0 or the permission can not be added
- * No save to db action will be performed.
- *
- * Fails if permission Id does not exists or permission already granted or denied
- *
- * @param permissionId permission to be granted
- * @param realmId realm affected
- *
- * @return Success or failure (with reason) to grant the permission
- *
- * Example Usage:
- * // previously defined "RBACData* rbac" with proper initialization
- * uint32 permissionId = 2;
- * if (rbac->GrantRole(permissionId) == RBAC_IN_DENIED_LIST)
- * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Failed to grant permission %u, already denied", permissionId);
- * @endcode
- */
- RBACCommandResult GrantPermission(uint32 permissionId, int32 realmId = 0);
-
- /**
- * @name DenyPermission
- * @brief Denies a permission
- *
- * Denied a permission to the account. If realm is 0 or the permission can not be added
- * No save to db action will be performed.
- *
- * Fails if permission Id does not exists or permission already granted or denied
- *
- * @param permissionId permission to be denied
- * @param realmId realm affected
- *
- * @return Success or failure (with reason) to deny the permission
- *
- * Example Usage:
- * // previously defined "RBACData* rbac" with proper initialization
- * uint32 permissionId = 2;
- * if (rbac->DenyRole(permissionId) == RBAC_ID_DOES_NOT_EXISTS)
- * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Role Id %u does not exists", permissionId);
- * @endcode
- */
- RBACCommandResult DenyPermission(uint32 permissionId, int32 realmId = 0);
-
- /**
- * @name RevokePermission
- * @brief Removes a permission
- *
- * Removes a permission from the account. If realm is 0 or the permission can not be removed
- * No save to db action will be performed. Any delete operation will always affect
- * "all realms (-1)" in addition to the realm specified
- *
- * Fails if permission not present
- *
- * @param permissionId permission to be removed
- * @param realmId realm affected
- *
- * @return Success or failure (with reason) to remove the permission
- *
- * Example Usage:
- * // previously defined "RBACData* rbac" with proper initialization
- * uint32 permissionId = 2;
- * if (rbac->RevokeRole(permissionId) == RBAC_OK)
- * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Permission %u succesfully removed", permissionId);
- * @endcode
- */
- RBACCommandResult RevokePermission(uint32 permissionId, int32 realmId = 0);
-
- /// Loads all permissions, groups and roles assigned to current account
- void LoadFromDB();
- private:
- /// Saves a role to DB, Granted or Denied
- void SaveRole(uint32 role, bool granted, int32 realm);
- /// Saves a permission to DB, Granted or Denied
- void SavePermission(uint32 role, bool granted, int32 realm);
-
- /**
- * @name CalculateNewPermissions
- * @brief Calculates new permissions
- *
- * Calculates new permissions after some change in groups, roles or permissions.
- * The calculation is done Granted - Denied:
- * - Granted permissions: through groups, through roles and directly assigned
- * - Denied permissions: through roles and directly assigned
- */
- void CalculateNewPermissions();
-
- int32 GetRealmId() { return _realmId; }
-
- int32 _realmId; ///> RealmId Affected
- RBACGroupContainer _groups; ///> Granted groups
- RBACRoleContainer _grantedRoles; ///> Granted roles
- RBACRoleContainer _deniedRoles; ///> Denied roles
- RBACPermissionContainer _grantedPerms; ///> Granted permissions
- RBACPermissionContainer _deniedPerms; ///> Denied permissions
- RBACPermissionContainer _globalPerms; ///> Calculated permissions
-};
-
-#endif
+/* + * Copyright (C) 2008-2013 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/>. + */ + +/** +* @file RBAC.h +* @brief Role Based Access Control related classes definition +* +* This file contains all the classes and enums used to implement +* Role Based Access Control +* +* RBAC Rules: +* - Pemission: Defines an autorization to perform certain operation. +* - Role: Set of permissions. +* - Group: Set of roles. +* - An Account can have multiple groups, roles and permissions. +* - Account Groups can only be granted or revoked +* - Account Roles and Permissions can be granted, denied or revoked +* - Grant: Assignment of the object (role/permission) and allow it +* - Deny: Assignment of the object (role/permission) and deny it +* - Revoke: Removal of the object (role/permission) no matter if it was granted or denied +* - Global Permissions are computed as: +* Group Grants + Role Grants + User Grans - Role Grants - User Grants +* - Groups, Roles and Permissions can be assigned by realm +*/ + +#ifndef _RBAC_H +#define _RBAC_H + +#include "Define.h" +#include <string> +#include <bitset> +#include <set> +#include <map> + +enum RBACPermissions +{ + RBAC_PERM_INSTANT_LOGOUT = 1, + RBAC_PERM_SKIP_QUEUE = 2, + RBAC_PERM_JOIN_NORMAL_BG = 3, + RBAC_PERM_JOIN_RANDOM_BG = 4, + RBAC_PERM_JOIN_ARENAS = 5, + RBAC_PERM_JOIN_DUNGEON_FINDER = 6, + // 7 - reuse + // 8 - reuse + // 9 - reuse + // 10 - reuse + RBAC_PERM_LOG_GM_TRADE = 11, + // 12 - reuse + RBAC_PERM_SKIP_CHECK_INSTANCE_REQUIRED_BOSSES = 13, + RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_TEAMMASK = 14, + RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_CLASSMASK = 15, + RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RACEMASK = 16, + RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RESERVEDNAME = 17, + RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_HEROIC_CHARACTER = 18, + RBAC_PERM_SKIP_CHECK_CHAT_CHANNEL_REQ = 19, + RBAC_PERM_SKIP_CHECK_DISABLE_MAP = 20, + RBAC_PERM_SKIP_CHECK_MORE_TALENTS_THAN_ALLOWED = 21, + RBAC_PERM_SKIP_CHECK_CHAT_SPAM = 22, + RBAC_PERM_SKIP_CHECK_OVERSPEED_PING = 23, + RBAC_PERM_TWO_SIDE_CHARACTER_CREATION = 24, + RBAC_PERM_TWO_SIDE_INTERACTION_CHAT = 25, + RBAC_PERM_TWO_SIDE_INTERACTION_CHANNEL = 26, + RBAC_PERM_TWO_SIDE_INTERACTION_MAIL = 27, + RBAC_PERM_TWO_SIDE_WHO_LIST = 28, + RBAC_PERM_TWO_SIDE_ADD_FRIEND = 29, + RBAC_PERM_COMMANDS_SAVE_WITHOUT_DELAY = 30, + RBAC_PERM_COMMANDS_USE_UNSTUCK_WITH_ARGS = 31, + RBAC_PERM_COMMANDS_BE_ASSIGNED_TICKET = 32, + RBAC_PERM_COMMANDS_NOTIFY_COMMAND_NOT_FOUND_ERROR = 33, + RBAC_PERM_COMMANDS_APPEAR_IN_GM_LIST = 34, + RBAC_PERM_WHO_SEE_ALL_SEC_LEVELS = 35, + RBAC_PERM_CAN_FILTER_WHISPERS = 36, + RBAC_PERM_CHAT_USE_STAFF_BADGE = 37, + RBAC_PERM_RESURRECT_WITH_FULL_HPS = 38, + RBAC_PERM_RESTORE_SAVED_GM_STATE = 39, + RBAC_PERM_ALLOW_GM_FRIEND = 40, + RBAC_PERM_USE_START_GM_LEVEL = 41, + RBAC_PERM_OPCODE_WORLD_TELEPORT = 42, + RBAC_PERM_OPCODE_WHOIS = 43, + RBAC_PERM_RECEIVE_GLOBAL_GM_TEXTMESSAGE = 44, + RBAC_PERM_SILENTLY_JOIN_CHANNEL = 45, + RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR = 46, + RBAC_PERM_CHECK_FOR_LOWER_SECURITY = 47, + RBAC_PERM_COMMANDS_PINFO_CHECK_PERSONAL_DATA = 48, + RBAC_PERM_EMAIL_CONFIRM_FOR_PASS_CHANGE = 49, + RBAC_PERM_MAY_CHECK_OWN_EMAIL = 50, + // Leave some space for core permissions + + RBAC_PERM_COMMAND_RBAC = 200, + RBAC_PERM_COMMAND_RBAC_ACC = 201, + RBAC_PERM_COMMAND_RBAC_ACC_GROUP = 202, + RBAC_PERM_COMMAND_RBAC_ACC_GROUP_ADD = 203, + RBAC_PERM_COMMAND_RBAC_ACC_GROUP_DEL = 204, + RBAC_PERM_COMMAND_RBAC_ACC_ROLE = 205, + RBAC_PERM_COMMAND_RBAC_ACC_ROLE_GRANT = 206, + RBAC_PERM_COMMAND_RBAC_ACC_ROLE_DENY = 207, + RBAC_PERM_COMMAND_RBAC_ACC_ROLE_REVOKE = 208, + RBAC_PERM_COMMAND_RBAC_ACC_PERM = 209, + RBAC_PERM_COMMAND_RBAC_ACC_PERM_GRANT = 210, + RBAC_PERM_COMMAND_RBAC_ACC_PERM_DENY = 211, + RBAC_PERM_COMMAND_RBAC_ACC_PERM_REVOKE = 212, + RBAC_PERM_COMMAND_RBAC_LIST = 213, + RBAC_PERM_COMMAND_RBAC_LIST_GROUPS = 214, + RBAC_PERM_COMMAND_RBAC_LIST_ROLES = 215, + RBAC_PERM_COMMAND_RBAC_LIST_PERMS = 216, + RBAC_PERM_COMMAND_ACCOUNT = 217, + RBAC_PERM_COMMAND_ACCOUNT_ADDON = 218, + RBAC_PERM_COMMAND_ACCOUNT_CREATE = 219, + RBAC_PERM_COMMAND_ACCOUNT_DELETE = 220, + RBAC_PERM_COMMAND_ACCOUNT_LOCK = 221, + RBAC_PERM_COMMAND_ACCOUNT_LOCK_COUNTRY = 222, + RBAC_PERM_COMMAND_ACCOUNT_LOCK_IP = 223, + RBAC_PERM_COMMAND_ACCOUNT_ONLINE_LIST = 224, + RBAC_PERM_COMMAND_ACCOUNT_PASSWORD = 225, + RBAC_PERM_COMMAND_ACCOUNT_SET = 226, + RBAC_PERM_COMMAND_ACCOUNT_SET_ADDON = 227, + RBAC_PERM_COMMAND_ACCOUNT_SET_GMLEVEL = 228, + RBAC_PERM_COMMAND_ACCOUNT_SET_PASSWORD = 229, + RBAC_PERM_COMMAND_ACHIEVEMENT = 230, + RBAC_PERM_COMMAND_ACHIEVEMENT_ADD = 231, + RBAC_PERM_COMMAND_ARENA = 232, + RBAC_PERM_COMMAND_ARENA_CAPTAIN = 233, + RBAC_PERM_COMMAND_ARENA_CREATE = 234, + RBAC_PERM_COMMAND_ARENA_DISBAND = 235, + RBAC_PERM_COMMAND_ARENA_INFO = 236, + RBAC_PERM_COMMAND_ARENA_LOOKUP = 237, + RBAC_PERM_COMMAND_ARENA_RENAME = 238, + RBAC_PERM_COMMAND_BAN = 239, + RBAC_PERM_COMMAND_BAN_ACCOUNT = 240, + RBAC_PERM_COMMAND_BAN_CHARACTER = 241, + RBAC_PERM_COMMAND_BAN_IP = 242, + RBAC_PERM_COMMAND_BAN_PLAYERACCOUNT = 243, + RBAC_PERM_COMMAND_BANINFO = 244, + RBAC_PERM_COMMAND_BANINFO_ACCOUNT = 245, + RBAC_PERM_COMMAND_BANINFO_CHARACTER = 246, + RBAC_PERM_COMMAND_BANINFO_IP = 247, + RBAC_PERM_COMMAND_BANLIST = 248, + RBAC_PERM_COMMAND_BANLIST_ACCOUNT = 249, + RBAC_PERM_COMMAND_BANLIST_CHARACTER = 250, + RBAC_PERM_COMMAND_BANLIST_IP = 251, + RBAC_PERM_COMMAND_UNBAN = 252, + RBAC_PERM_COMMAND_UNBAN_ACCOUNT = 253, + RBAC_PERM_COMMAND_UNBAN_CHARACTER = 254, + RBAC_PERM_COMMAND_UNBAN_IP = 255, + RBAC_PERM_COMMAND_UNBAN_PLAYERACCOUNT = 256, + RBAC_PERM_COMMAND_BF = 257, + RBAC_PERM_COMMAND_BF_START = 258, + RBAC_PERM_COMMAND_BF_STOP = 259, + RBAC_PERM_COMMAND_BF_SWITCH = 260, + RBAC_PERM_COMMAND_BF_TIMER = 261, + RBAC_PERM_COMMAND_BF_ENABLE = 262, + RBAC_PERM_COMMAND_ACCOUNT_EMAIL = 263, + RBAC_PERM_COMMAND_ACCOUNT_SET_SEC = 264, + RBAC_PERM_COMMAND_ACCOUNT_SET_SEC_EMAIL = 265, + RBAC_PERM_COMMAND_ACCOUNT_SET_SEC_REGMAIL = 266, + RBAC_PERM_COMMAND_CAST = 267, + RBAC_PERM_COMMAND_CAST_BACK = 268, + RBAC_PERM_COMMAND_CAST_DIST = 269, + RBAC_PERM_COMMAND_CAST_SELF = 270, + RBAC_PERM_COMMAND_CAST_TARGET = 271, + RBAC_PERM_COMMAND_CAST_DEST = 272, + RBAC_PERM_COMMAND_CHARACTER = 273, + RBAC_PERM_COMMAND_CHARACTER_CUSTOMIZE = 274, + RBAC_PERM_COMMAND_CHARACTER_CHANGEFACTION = 275, + RBAC_PERM_COMMAND_CHARACTER_CHANGERACE = 276, + RBAC_PERM_COMMAND_CHARACTER_DELETED = 277, + RBAC_PERM_COMMAND_CHARACTER_DELETED_DELETE = 278, + RBAC_PERM_COMMAND_CHARACTER_DELETED_LIST = 279, + RBAC_PERM_COMMAND_CHARACTER_DELETED_RESTORE = 280, + RBAC_PERM_COMMAND_CHARACTER_DELETED_OLD = 281, + RBAC_PERM_COMMAND_CHARACTER_ERASE = 282, + RBAC_PERM_COMMAND_CHARACTER_LEVEL = 283, + RBAC_PERM_COMMAND_CHARACTER_RENAME = 284, + RBAC_PERM_COMMAND_CHARACTER_REPUTATION = 285, + RBAC_PERM_COMMAND_CHARACTER_TITLES = 286, + RBAC_PERM_COMMAND_LEVELUP = 287, + RBAC_PERM_COMMAND_PDUMP = 288, + RBAC_PERM_COMMAND_PDUMP_LOAD = 289, + RBAC_PERM_COMMAND_PDUMP_WRITE = 290, + RBAC_PERM_COMMAND_CHEAT = 291, + RBAC_PERM_COMMAND_CHEAT_CASTTIME = 292, + RBAC_PERM_COMMAND_CHEAT_COOLDOWN = 293, + RBAC_PERM_COMMAND_CHEAT_EXPLORE = 294, + RBAC_PERM_COMMAND_CHEAT_GOD = 295, + RBAC_PERM_COMMAND_CHEAT_POWER = 296, + RBAC_PERM_COMMAND_CHEAT_STATUS = 297, + RBAC_PERM_COMMAND_CHEAT_TAXI = 298, + RBAC_PERM_COMMAND_CHEAT_WATERWALK = 299, + RBAC_PERM_COMMAND_DEBUG = 300, + RBAC_PERM_COMMAND_DEBUG_ANIM = 301, + RBAC_PERM_COMMAND_DEBUG_AREATRIGGERS = 302, + RBAC_PERM_COMMAND_DEBUG_ARENA = 303, + RBAC_PERM_COMMAND_DEBUG_BG = 304, + RBAC_PERM_COMMAND_DEBUG_ENTERVEHICLE = 305, + RBAC_PERM_COMMAND_DEBUG_GETITEMSTATE = 306, + RBAC_PERM_COMMAND_DEBUG_GETITEMVALUE = 307, + RBAC_PERM_COMMAND_DEBUG_GETVALUE = 308, + RBAC_PERM_COMMAND_DEBUG_HOSTIL = 309, + RBAC_PERM_COMMAND_DEBUG_ITEMEXPIRE = 310, + RBAC_PERM_COMMAND_DEBUG_LOOTRECIPIENT = 311, + RBAC_PERM_COMMAND_DEBUG_LOS = 312, + RBAC_PERM_COMMAND_DEBUG_MOD32VALUE = 313, + RBAC_PERM_COMMAND_DEBUG_MOVEFLAGS = 314, + RBAC_PERM_COMMAND_DEBUG_PLAY = 315, + RBAC_PERM_COMMAND_DEBUG_PLAY_CINEMATIC = 316, + RBAC_PERM_COMMAND_DEBUG_PLAY_MOVIE = 317, + RBAC_PERM_COMMAND_DEBUG_PLAY_SOUND = 318, + RBAC_PERM_COMMAND_DEBUG_SEND = 319, + RBAC_PERM_COMMAND_DEBUG_SEND_BUYERROR = 320, + RBAC_PERM_COMMAND_DEBUG_SEND_CHANNELNOTIFY = 321, + RBAC_PERM_COMMAND_DEBUG_SEND_CHATMESSAGE = 322, + RBAC_PERM_COMMAND_DEBUG_SEND_EQUIPERROR = 323, + RBAC_PERM_COMMAND_DEBUG_SEND_LARGEPACKET = 324, + RBAC_PERM_COMMAND_DEBUG_SEND_OPCODE = 325, + RBAC_PERM_COMMAND_DEBUG_SEND_QINVALIDMSG = 326, + RBAC_PERM_COMMAND_DEBUG_SEND_QPARTYMSG = 327, + RBAC_PERM_COMMAND_DEBUG_SEND_SELLERROR = 328, + RBAC_PERM_COMMAND_DEBUG_SEND_SETPHASESHIFT = 329, + RBAC_PERM_COMMAND_DEBUG_SEND_SPELLFAIL = 330, + RBAC_PERM_COMMAND_DEBUG_SETAURASTATE = 331, + RBAC_PERM_COMMAND_DEBUG_SETBIT = 332, + RBAC_PERM_COMMAND_DEBUG_SETITEMVALUE = 333, + RBAC_PERM_COMMAND_DEBUG_SETVALUE = 334, + RBAC_PERM_COMMAND_DEBUG_SETVID = 335, + RBAC_PERM_COMMAND_DEBUG_SPAWNVEHICLE = 336, + RBAC_PERM_COMMAND_DEBUG_THREAT = 337, + RBAC_PERM_COMMAND_DEBUG_UPDATE = 338, + RBAC_PERM_COMMAND_DEBUG_UWS = 339, + RBAC_PERM_COMMAND_WPGPS = 340, + RBAC_PERM_COMMAND_DESERTER = 341, + RBAC_PERM_COMMAND_DESERTER_BG = 342, + RBAC_PERM_COMMAND_DESERTER_BG_ADD = 343, + RBAC_PERM_COMMAND_DESERTER_BG_REMOVE = 344, + RBAC_PERM_COMMAND_DESERTER_INSTANCE = 345, + RBAC_PERM_COMMAND_DESERTER_INSTANCE_ADD = 346, + RBAC_PERM_COMMAND_DESERTER_INSTANCE_REMOVE = 347, + RBAC_PERM_COMMAND_DISABLE = 348, + RBAC_PERM_COMMAND_DISABLE_ADD = 349, + RBAC_PERM_COMMAND_DISABLE_ADD_ACHIEVEMENT_CRITERIA = 350, + RBAC_PERM_COMMAND_DISABLE_ADD_BATTLEGROUND = 351, + RBAC_PERM_COMMAND_DISABLE_ADD_MAP = 352, + RBAC_PERM_COMMAND_DISABLE_ADD_MMAP = 353, + RBAC_PERM_COMMAND_DISABLE_ADD_OUTDOORPVP = 354, + RBAC_PERM_COMMAND_DISABLE_ADD_QUEST = 355, + RBAC_PERM_COMMAND_DISABLE_ADD_SPELL = 356, + RBAC_PERM_COMMAND_DISABLE_ADD_VMAP = 357, + RBAC_PERM_COMMAND_DISABLE_REMOVE = 358, + RBAC_PERM_COMMAND_DISABLE_REMOVE_ACHIEVEMENT_CRITERIA = 359, + RBAC_PERM_COMMAND_DISABLE_REMOVE_BATTLEGROUND = 360, + RBAC_PERM_COMMAND_DISABLE_REMOVE_MAP = 361, + RBAC_PERM_COMMAND_DISABLE_REMOVE_MMAP = 362, + RBAC_PERM_COMMAND_DISABLE_REMOVE_OUTDOORPVP = 363, + RBAC_PERM_COMMAND_DISABLE_REMOVE_QUEST = 364, + RBAC_PERM_COMMAND_DISABLE_REMOVE_SPELL = 365, + RBAC_PERM_COMMAND_DISABLE_REMOVE_VMAP = 366, + RBAC_PERM_COMMAND_EVENT = 367, + RBAC_PERM_COMMAND_EVENT_ACTIVELIST = 368, + RBAC_PERM_COMMAND_EVENT_START = 369, + RBAC_PERM_COMMAND_EVENT_STOP = 370, + RBAC_PERM_COMMAND_GM = 371, + RBAC_PERM_COMMAND_GM_CHAT = 372, + RBAC_PERM_COMMAND_GM_FLY = 373, + RBAC_PERM_COMMAND_GM_INGAME = 374, + RBAC_PERM_COMMAND_GM_LIST = 375, + RBAC_PERM_COMMAND_GM_VISIBLE = 376, + RBAC_PERM_COMMAND_GO = 377, + RBAC_PERM_COMMAND_GO_CREATURE = 378, + RBAC_PERM_COMMAND_GO_GRAVEYARD = 379, + RBAC_PERM_COMMAND_GO_GRID = 380, + RBAC_PERM_COMMAND_GO_OBJECT = 381, + RBAC_PERM_COMMAND_GO_TAXINODE = 382, + RBAC_PERM_COMMAND_GO_TICKET = 383, + RBAC_PERM_COMMAND_GO_TRIGGER = 384, + RBAC_PERM_COMMAND_GO_XYZ = 385, + RBAC_PERM_COMMAND_GO_ZONEXY = 386, + RBAC_PERM_COMMAND_GOBJECT = 387, + RBAC_PERM_COMMAND_GOBJECT_ACTIVATE = 388, + RBAC_PERM_COMMAND_GOBJECT_ADD = 389, + RBAC_PERM_COMMAND_GOBJECT_ADD_TEMP = 390, + RBAC_PERM_COMMAND_GOBJECT_DELETE = 391, + RBAC_PERM_COMMAND_GOBJECT_INFO = 392, + RBAC_PERM_COMMAND_GOBJECT_MOVE = 393, + RBAC_PERM_COMMAND_GOBJECT_NEAR = 394, + RBAC_PERM_COMMAND_GOBJECT_SET = 395, + RBAC_PERM_COMMAND_GOBJECT_SET_PHASE = 396, + RBAC_PERM_COMMAND_GOBJECT_SET_STATE = 397, + RBAC_PERM_COMMAND_GOBJECT_TARGET = 398, + RBAC_PERM_COMMAND_GOBJECT_TURN = 399, + // 400 - reuse + RBAC_PERM_COMMAND_GUILD = 401, + RBAC_PERM_COMMAND_GUILD_CREATE = 402, + RBAC_PERM_COMMAND_GUILD_DELETE = 403, + RBAC_PERM_COMMAND_GUILD_INVITE = 404, + RBAC_PERM_COMMAND_GUILD_UNINVITE = 405, + RBAC_PERM_COMMAND_GUILD_RANK = 406, + RBAC_PERM_COMMAND_GUILD_RENAME = 407, + RBAC_PERM_COMMAND_HONOR = 408, + RBAC_PERM_COMMAND_HONOR_ADD = 409, + RBAC_PERM_COMMAND_HONOR_ADD_KILL = 410, + RBAC_PERM_COMMAND_HONOR_UPDATE = 411, + RBAC_PERM_COMMAND_INSTANCE = 412, + RBAC_PERM_COMMAND_INSTANCE_LISTBINDS = 413, + RBAC_PERM_COMMAND_INSTANCE_UNBIND = 414, + RBAC_PERM_COMMAND_INSTANCE_STATS = 415, + RBAC_PERM_COMMAND_INSTANCE_SAVEDATA = 416, + RBAC_PERM_COMMAND_LEARN = 417, + RBAC_PERM_COMMAND_LEARN_ALL = 418, + RBAC_PERM_COMMAND_LEARN_ALL_MY = 419, + RBAC_PERM_COMMAND_LEARN_ALL_MY_CLASS = 420, + RBAC_PERM_COMMAND_LEARN_ALL_MY_PETTALENTS = 421, + RBAC_PERM_COMMAND_LEARN_ALL_MY_SPELLS = 422, + RBAC_PERM_COMMAND_LEARN_ALL_MY_TALENTS = 423, + RBAC_PERM_COMMAND_LEARN_ALL_GM = 424, + RBAC_PERM_COMMAND_LEARN_ALL_CRAFTS = 425, + RBAC_PERM_COMMAND_LEARN_ALL_DEFAULT = 426, + RBAC_PERM_COMMAND_LEARN_ALL_LANG = 427, + RBAC_PERM_COMMAND_LEARN_ALL_RECIPES = 428, + RBAC_PERM_COMMAND_UNLEARN = 429, + RBAC_PERM_COMMAND_LFG = 430, + RBAC_PERM_COMMAND_LFG_PLAYER = 431, + RBAC_PERM_COMMAND_LFG_GROUP = 432, + RBAC_PERM_COMMAND_LFG_QUEUE = 433, + RBAC_PERM_COMMAND_LFG_CLEAN = 434, + RBAC_PERM_COMMAND_LFG_OPTIONS = 435, + RBAC_PERM_COMMAND_LIST = 436, + RBAC_PERM_COMMAND_LIST_CREATURE = 437, + RBAC_PERM_COMMAND_LIST_ITEM = 438, + RBAC_PERM_COMMAND_LIST_OBJECT = 439, + RBAC_PERM_COMMAND_LIST_AURAS = 440, + RBAC_PERM_COMMAND_LIST_MAIL = 441, + RBAC_PERM_COMMAND_LOOKUP = 442, + RBAC_PERM_COMMAND_LOOKUP_AREA = 443, + RBAC_PERM_COMMAND_LOOKUP_CREATURE = 444, + RBAC_PERM_COMMAND_LOOKUP_EVENT = 445, + RBAC_PERM_COMMAND_LOOKUP_FACTION = 446, + RBAC_PERM_COMMAND_LOOKUP_ITEM = 447, + RBAC_PERM_COMMAND_LOOKUP_ITEMSET = 448, + RBAC_PERM_COMMAND_LOOKUP_OBJECT = 449, + RBAC_PERM_COMMAND_LOOKUP_QUEST = 450, + RBAC_PERM_COMMAND_LOOKUP_PLAYER = 451, + RBAC_PERM_COMMAND_LOOKUP_PLAYER_IP = 452, + RBAC_PERM_COMMAND_LOOKUP_PLAYER_ACCOUNT = 453, + RBAC_PERM_COMMAND_LOOKUP_PLAYER_EMAIL = 454, + RBAC_PERM_COMMAND_LOOKUP_SKILL = 455, + RBAC_PERM_COMMAND_LOOKUP_SPELL = 456, + RBAC_PERM_COMMAND_LOOKUP_SPELL_ID = 457, + RBAC_PERM_COMMAND_LOOKUP_TAXINODE = 458, + RBAC_PERM_COMMAND_LOOKUP_TELE = 459, + RBAC_PERM_COMMAND_LOOKUP_TITLE = 460, + RBAC_PERM_COMMAND_LOOKUP_MAP = 461, + RBAC_PERM_COMMAND_ANNOUNCE = 462, + RBAC_PERM_COMMAND_CHANNEL = 463, + RBAC_PERM_COMMAND_CHANNEL_SET = 464, + RBAC_PERM_COMMAND_CHANNEL_SET_OWNERSHIP = 465, + RBAC_PERM_COMMAND_GMANNOUNCE = 466, + RBAC_PERM_COMMAND_GMNAMEANNOUNCE = 467, + RBAC_PERM_COMMAND_GMNOTIFY = 468, + RBAC_PERM_COMMAND_NAMEANNOUNCE = 469, + RBAC_PERM_COMMAND_NOTIFY = 470, + RBAC_PERM_COMMAND_WHISPERS = 471, + RBAC_PERM_COMMAND_GROUP = 472, + RBAC_PERM_COMMAND_GROUP_LEADER = 473, + RBAC_PERM_COMMAND_GROUP_DISBAND = 474, + RBAC_PERM_COMMAND_GROUP_REMOVE = 475, + RBAC_PERM_COMMAND_GROUP_JOIN = 476, + RBAC_PERM_COMMAND_GROUP_LIST = 477, + RBAC_PERM_COMMAND_GROUP_SUMMON = 478, + RBAC_PERM_COMMAND_PET = 479, + RBAC_PERM_COMMAND_PET_CREATE = 480, + RBAC_PERM_COMMAND_PET_LEARN = 481, + RBAC_PERM_COMMAND_PET_UNLEARN = 482, + RBAC_PERM_COMMAND_SEND = 483, + RBAC_PERM_COMMAND_SEND_ITEMS = 484, + RBAC_PERM_COMMAND_SEND_MAIL = 485, + RBAC_PERM_COMMAND_SEND_MESSAGE = 486, + RBAC_PERM_COMMAND_SEND_MONEY = 487, + RBAC_PERM_COMMAND_ADDITEM = 488, + RBAC_PERM_COMMAND_ADDITEMSET = 489, + RBAC_PERM_COMMAND_APPEAR = 490, + RBAC_PERM_COMMAND_AURA = 491, + RBAC_PERM_COMMAND_BANK = 492, + RBAC_PERM_COMMAND_BINDSIGHT = 493, + RBAC_PERM_COMMAND_COMBATSTOP = 494, + RBAC_PERM_COMMAND_COMETOME = 495, + RBAC_PERM_COMMAND_COMMANDS = 496, + RBAC_PERM_COMMAND_COOLDOWN = 497, + RBAC_PERM_COMMAND_DAMAGE = 498, + RBAC_PERM_COMMAND_DEV = 499, + RBAC_PERM_COMMAND_DIE = 500, + RBAC_PERM_COMMAND_DISMOUNT = 501, + RBAC_PERM_COMMAND_DISTANCE = 502, + RBAC_PERM_COMMAND_FLUSHARENAPOINTS = 503, + RBAC_PERM_COMMAND_FREEZE = 504, + RBAC_PERM_COMMAND_GPS = 505, + RBAC_PERM_COMMAND_GUID = 506, + RBAC_PERM_COMMAND_HELP = 507, + RBAC_PERM_COMMAND_HIDEAREA = 508, + RBAC_PERM_COMMAND_ITEMMOVE = 509, + RBAC_PERM_COMMAND_KICK = 510, + RBAC_PERM_COMMAND_LINKGRAVE = 511, + RBAC_PERM_COMMAND_LISTFREEZE = 512, + RBAC_PERM_COMMAND_MAXSKILL = 513, + RBAC_PERM_COMMAND_MOVEGENS = 514, + RBAC_PERM_COMMAND_MUTE = 515, + RBAC_PERM_COMMAND_NEARGRAVE = 516, + RBAC_PERM_COMMAND_PINFO = 517, + RBAC_PERM_COMMAND_PLAYALL = 518, + RBAC_PERM_COMMAND_POSSESS = 519, + RBAC_PERM_COMMAND_RECALL = 520, + RBAC_PERM_COMMAND_REPAIRITEMS = 521, + RBAC_PERM_COMMAND_RESPAWN = 522, + RBAC_PERM_COMMAND_REVIVE = 523, + RBAC_PERM_COMMAND_SAVE = 524, + RBAC_PERM_COMMAND_SAVEALL = 525, + RBAC_PERM_COMMAND_SETSKILL = 526, + RBAC_PERM_COMMAND_SHOWAREA = 527, + RBAC_PERM_COMMAND_SUMMON = 528, + RBAC_PERM_COMMAND_UNAURA = 529, + RBAC_PERM_COMMAND_UNBINDSIGHT = 530, + RBAC_PERM_COMMAND_UNFREEZE = 531, + RBAC_PERM_COMMAND_UNMUTE = 532, + RBAC_PERM_COMMAND_UNPOSSESS = 533, + RBAC_PERM_COMMAND_UNSTUCK = 534, + RBAC_PERM_COMMAND_WCHANGE = 535, + RBAC_PERM_COMMAND_MMAP = 536, + RBAC_PERM_COMMAND_MMAP_LOADEDTILES = 537, + RBAC_PERM_COMMAND_MMAP_LOC = 538, + RBAC_PERM_COMMAND_MMAP_PATH = 539, + RBAC_PERM_COMMAND_MMAP_STATS = 540, + RBAC_PERM_COMMAND_MMAP_TESTAREA = 541, + RBAC_PERM_COMMAND_MORPH = 542, + RBAC_PERM_COMMAND_DEMORPH = 543, + RBAC_PERM_COMMAND_MODIFY = 544, + RBAC_PERM_COMMAND_MODIFY_ARENAPOINTS = 545, + RBAC_PERM_COMMAND_MODIFY_BIT = 546, + RBAC_PERM_COMMAND_MODIFY_DRUNK = 547, + RBAC_PERM_COMMAND_MODIFY_ENERGY = 548, + RBAC_PERM_COMMAND_MODIFY_FACTION = 549, + RBAC_PERM_COMMAND_MODIFY_GENDER = 550, + RBAC_PERM_COMMAND_MODIFY_HONOR = 551, + RBAC_PERM_COMMAND_MODIFY_HP = 552, + RBAC_PERM_COMMAND_MODIFY_MANA = 553, + RBAC_PERM_COMMAND_MODIFY_MONEY = 554, + RBAC_PERM_COMMAND_MODIFY_MOUNT = 555, + RBAC_PERM_COMMAND_MODIFY_PHASE = 556, + RBAC_PERM_COMMAND_MODIFY_RAGE = 557, + RBAC_PERM_COMMAND_MODIFY_REPUTATION = 558, + RBAC_PERM_COMMAND_MODIFY_RUNICPOWER = 559, + RBAC_PERM_COMMAND_MODIFY_SCALE = 560, + RBAC_PERM_COMMAND_MODIFY_SPEED = 561, + RBAC_PERM_COMMAND_MODIFY_SPEED_ALL = 562, + RBAC_PERM_COMMAND_MODIFY_SPEED_BACKWALK = 563, + RBAC_PERM_COMMAND_MODIFY_SPEED_FLY = 564, + RBAC_PERM_COMMAND_MODIFY_SPEED_WALK = 565, + RBAC_PERM_COMMAND_MODIFY_SPEED_SWIM = 566, + RBAC_PERM_COMMAND_MODIFY_SPELL = 567, + RBAC_PERM_COMMAND_MODIFY_STANDSTATE = 568, + RBAC_PERM_COMMAND_MODIFY_TALENTPOINTS = 569, + RBAC_PERM_COMMAND_NPC = 570, + RBAC_PERM_COMMAND_NPC_ADD = 571, + RBAC_PERM_COMMAND_NPC_ADD_FORMATION = 572, + RBAC_PERM_COMMAND_NPC_ADD_ITEM = 573, + RBAC_PERM_COMMAND_NPC_ADD_MOVE = 574, + RBAC_PERM_COMMAND_NPC_ADD_TEMP = 575, + RBAC_PERM_COMMAND_NPC_DELETE = 576, + RBAC_PERM_COMMAND_NPC_DELETE_ITEM = 577, + RBAC_PERM_COMMAND_NPC_FOLLOW = 578, + RBAC_PERM_COMMAND_NPC_FOLLOW_STOP = 579, + RBAC_PERM_COMMAND_NPC_SET = 580, + RBAC_PERM_COMMAND_NPC_SET_ALLOWMOVE = 581, + RBAC_PERM_COMMAND_NPC_SET_ENTRY = 582, + RBAC_PERM_COMMAND_NPC_SET_FACTIONID = 583, + RBAC_PERM_COMMAND_NPC_SET_FLAG = 584, + RBAC_PERM_COMMAND_NPC_SET_LEVEL = 585, + RBAC_PERM_COMMAND_NPC_SET_LINK = 586, + RBAC_PERM_COMMAND_NPC_SET_MODEL = 587, + RBAC_PERM_COMMAND_NPC_SET_MOVETYPE = 588, + RBAC_PERM_COMMAND_NPC_SET_PHASE = 589, + RBAC_PERM_COMMAND_NPC_SET_SPAWNDIST = 590, + RBAC_PERM_COMMAND_NPC_SET_SPAWNTIME = 591, + RBAC_PERM_COMMAND_NPC_SET_DATA = 592, + RBAC_PERM_COMMAND_NPC_INFO = 593, + RBAC_PERM_COMMAND_NPC_NEAR = 594, + RBAC_PERM_COMMAND_NPC_MOVE = 595, + RBAC_PERM_COMMAND_NPC_PLAYEMOTE = 596, + RBAC_PERM_COMMAND_NPC_SAY = 597, + RBAC_PERM_COMMAND_NPC_TEXTEMOTE = 598, + RBAC_PERM_COMMAND_NPC_WHISPER = 599, + RBAC_PERM_COMMAND_NPC_YELL = 600, + RBAC_PERM_COMMAND_NPC_TAME = 601, + RBAC_PERM_COMMAND_QUEST = 602, + RBAC_PERM_COMMAND_QUEST_ADD = 603, + RBAC_PERM_COMMAND_QUEST_COMPLETE = 604, + RBAC_PERM_COMMAND_QUEST_REMOVE = 605, + RBAC_PERM_COMMAND_QUEST_REWARD = 606, + RBAC_PERM_COMMANDS_RELOAD = 607, + RBAC_PERM_COMMANDS_RELOAD_ACCESS_REQUIREMENT = 608, + RBAC_PERM_COMMANDS_RELOAD_ACHIEVEMENT_CRITERIA_DATA = 609, + RBAC_PERM_COMMANDS_RELOAD_ACHIEVEMENT_REWARD = 610, + RBAC_PERM_COMMANDS_RELOAD_ALL = 611, + RBAC_PERM_COMMANDS_RELOAD_ALL_ACHIEVEMENT = 612, + RBAC_PERM_COMMANDS_RELOAD_ALL_AREA = 613, + RBAC_PERM_COMMANDS_RELOAD_ALL_EVENTAI = 614, + RBAC_PERM_COMMANDS_RELOAD_ALL_GOSSIP = 615, + RBAC_PERM_COMMANDS_RELOAD_ALL_ITEM = 616, + RBAC_PERM_COMMANDS_RELOAD_ALL_LOCALES = 617, + RBAC_PERM_COMMANDS_RELOAD_ALL_LOOT = 618, + RBAC_PERM_COMMANDS_RELOAD_ALL_NPC = 619, + RBAC_PERM_COMMANDS_RELOAD_ALL_QUEST = 620, + RBAC_PERM_COMMANDS_RELOAD_ALL_SCRIPTS = 621, + RBAC_PERM_COMMANDS_RELOAD_ALL_SPELL = 622, + RBAC_PERM_COMMANDS_RELOAD_AREATRIGGER_INVOLVEDRELATION = 623, + RBAC_PERM_COMMANDS_RELOAD_AREATRIGGER_TAVERN = 624, + RBAC_PERM_COMMANDS_RELOAD_AREATRIGGER_TELEPORT = 625, + RBAC_PERM_COMMANDS_RELOAD_AUCTIONS = 626, + RBAC_PERM_COMMANDS_RELOAD_AUTOBROADCAST = 627, + RBAC_PERM_COMMANDS_RELOAD_COMMAND = 628, + RBAC_PERM_COMMANDS_RELOAD_CONDITIONS = 629, + RBAC_PERM_COMMANDS_RELOAD_CONFIG = 630, + RBAC_PERM_COMMANDS_RELOAD_CREATURE_AI_SCRIPTS = 631, + RBAC_PERM_COMMANDS_RELOAD_CREATURE_AI_TEXTS = 632, + RBAC_PERM_COMMANDS_RELOAD_CREATURE_LINKED_RESPAWN = 633, + RBAC_PERM_COMMANDS_RELOAD_CREATURE_LOOT_TEMPLATE = 634, + RBAC_PERM_COMMANDS_RELOAD_CREATURE_ONKILL_REPUTATION = 635, + RBAC_PERM_COMMANDS_RELOAD_CREATURE_QUESTENDER = 636, + RBAC_PERM_COMMANDS_RELOAD_CREATURE_QUESTSTARTER = 637, + RBAC_PERM_COMMANDS_RELOAD_CREATURE_SUMMON_GROUPS = 638, + RBAC_PERM_COMMANDS_RELOAD_CREATURE_TEMPLATE = 639, + RBAC_PERM_COMMANDS_RELOAD_CREATURE_TEXT = 640, + RBAC_PERM_COMMANDS_RELOAD_DISABLES = 641, + RBAC_PERM_COMMANDS_RELOAD_DISENCHANT_LOOT_TEMPLATE = 642, + RBAC_PERM_COMMANDS_RELOAD_EVENT_SCRIPTS = 643, + RBAC_PERM_COMMANDS_RELOAD_FISHING_LOOT_TEMPLATE = 644, + RBAC_PERM_COMMANDS_RELOAD_GAME_GRAVEYARD_ZONE = 645, + RBAC_PERM_COMMANDS_RELOAD_GAMEOBJECT_QUESTENDER = 646, + RBAC_PERM_COMMANDS_RELOAD_GAMEOBJECT_QUEST_LOOT_TEMPLATE = 647, + RBAC_PERM_COMMANDS_RELOAD_GAMEOBJECT_QUESTSTARTER = 648, + RBAC_PERM_COMMANDS_RELOAD_GAME_TELE = 649, + RBAC_PERM_COMMANDS_RELOAD_GM_TICKETS = 650, + RBAC_PERM_COMMANDS_RELOAD_GOSSIP_MENU = 651, + RBAC_PERM_COMMANDS_RELOAD_GOSSIP_MENU_OPTION = 652, + RBAC_PERM_COMMANDS_RELOAD_ITEM_ENCHANTMENT_TEMPLATE = 653, + RBAC_PERM_COMMANDS_RELOAD_ITEM_LOOT_TEMPLATE = 654, + RBAC_PERM_COMMANDS_RELOAD_ITEM_SET_NAMES = 655, + RBAC_PERM_COMMANDS_RELOAD_LFG_DUNGEON_REWARDS = 656, + RBAC_PERM_COMMANDS_RELOAD_LOCALES_ACHIEVEMENT_REWARD = 657, + RBAC_PERM_COMMANDS_RELOAD_LOCALES_CRETURE = 658, + RBAC_PERM_COMMANDS_RELOAD_LOCALES_CRETURE_TEXT = 659, + RBAC_PERM_COMMANDS_RELOAD_LOCALES_GAMEOBJECT = 660, + RBAC_PERM_COMMANDS_RELOAD_LOCALES_GOSSIP_MENU_OPTION = 661, + RBAC_PERM_COMMANDS_RELOAD_LOCALES_ITEM = 662, + RBAC_PERM_COMMANDS_RELOAD_LOCALES_ITEM_SET_NAME = 663, + RBAC_PERM_COMMANDS_RELOAD_LOCALES_NPC_TEXT = 664, + RBAC_PERM_COMMANDS_RELOAD_LOCALES_PAGE_TEXT = 665, + RBAC_PERM_COMMANDS_RELOAD_LOCALES_POINTS_OF_INTEREST = 666, + RBAC_PERM_COMMANDS_RELOAD_LOCALES_QUEST = 667, + RBAC_PERM_COMMANDS_RELOAD_MAIL_LEVEL_REWARD = 668, + RBAC_PERM_COMMANDS_RELOAD_MAIL_LOOT_TEMPLATE = 669, + RBAC_PERM_COMMANDS_RELOAD_MILLING_LOOT_TEMPLATE = 670, + RBAC_PERM_COMMANDS_RELOAD_NPC_SPELLCLICK_SPELLS = 671, + RBAC_PERM_COMMANDS_RELOAD_NPC_TRAINER = 672, + RBAC_PERM_COMMANDS_RELOAD_NPC_VENDOR = 673, + RBAC_PERM_COMMANDS_RELOAD_PAGE_TEXT = 674, + RBAC_PERM_COMMANDS_RELOAD_PICKPOCKETING_LOOT_TEMPLATE = 675, + RBAC_PERM_COMMANDS_RELOAD_POINTS_OF_INTEREST = 676, + RBAC_PERM_COMMANDS_RELOAD_PROSPECTING_LOOT_TEMPLATE = 677, + RBAC_PERM_COMMANDS_RELOAD_QUEST_POI = 678, + RBAC_PERM_COMMANDS_RELOAD_QUEST_TEMPLATE = 679, + RBAC_PERM_COMMANDS_RELOAD_RBAC = 680, + RBAC_PERM_COMMANDS_RELOAD_REFERENCE_LOOT_TEMPLATE = 681, + RBAC_PERM_COMMANDS_RELOAD_REPUTATION_REWARD_RATE = 682, + RBAC_PERM_COMMANDS_RELOAD_RESERVED_NAME = 683, + RBAC_PERM_COMMANDS_RELOAD_SKILL_DISCOVERY_TEMPLATE = 684, + RBAC_PERM_COMMANDS_RELOAD_SKILL_EXTRA_ITEM_TEMPLATE = 685, + RBAC_PERM_COMMANDS_RELOAD_SKILL_FISHING_BASE_LEVEL = 686, + RBAC_PERM_COMMANDS_RELOAD_SKINNING_LOOT_TEMPLATE = 687, + RBAC_PERM_COMMANDS_RELOAD_SMART_SCRIPTS = 688, + RBAC_PERM_COMMANDS_RELOAD_SPELL_AREA = 689, + RBAC_PERM_COMMANDS_RELOAD_SPELL_BONUS_DATA = 690, + RBAC_PERM_COMMANDS_RELOAD_SPELL_GROUP = 691, + RBAC_PERM_COMMANDS_RELOAD_SPELL_GROUP_STACK_RULES = 692, + RBAC_PERM_COMMANDS_RELOAD_SPELL_LEARN_SPELL = 693, + RBAC_PERM_COMMANDS_RELOAD_SPELL_LINKED_SPELL = 694, + RBAC_PERM_COMMANDS_RELOAD_SPELL_LOOT_TEMPLATE = 695, + RBAC_PERM_COMMANDS_RELOAD_SPELL_PET_AURAS = 696, + RBAC_PERM_COMMANDS_RELOAD_SPELL_PROC = 697, + RBAC_PERM_COMMANDS_RELOAD_SPELL_PROC_EVENT = 698, + RBAC_PERM_COMMANDS_RELOAD_SPELL_REQUIRED = 699, + RBAC_PERM_COMMANDS_RELOAD_SPELL_SCRIPTS = 700, + RBAC_PERM_COMMANDS_RELOAD_SPELL_TARGET_POSITION = 701, + RBAC_PERM_COMMANDS_RELOAD_SPELL_THREATS = 702, + RBAC_PERM_COMMANDS_RELOAD_SPILLOVER_TEMPLATE = 703, + RBAC_PERM_COMMANDS_RELOAD_TRINITY_STRING = 704, + RBAC_PERM_COMMANDS_RELOAD_VEHICLE_ACCESORY = 705, + RBAC_PERM_COMMANDS_RELOAD_VEHICLE_TEMPLATE_ACCESSORY = 706, + RBAC_PERM_COMMANDS_RELOAD_WARDEN_ACTION = 707, + RBAC_PERM_COMMANDS_RELOAD_WAYPOINT_DATA = 708, + RBAC_PERM_COMMANDS_RELOAD_WAYPOINT_SCRIPTS = 709, + RBAC_PERM_COMMAND_RESET = 710, + RBAC_PERM_COMMAND_RESET_ACHIEVEMENTS = 711, + RBAC_PERM_COMMAND_RESET_HONOR = 712, + RBAC_PERM_COMMAND_RESET_LEVEL = 713, + RBAC_PERM_COMMAND_RESET_SPELLS = 714, + RBAC_PERM_COMMAND_RESET_STATS = 715, + RBAC_PERM_COMMAND_RESET_TALENTS = 716, + RBAC_PERM_COMMAND_RESET_ALL = 717, + RBAC_PERM_COMMAND_SERVER = 718, + RBAC_PERM_COMMAND_SERVER_CORPSES = 719, + RBAC_PERM_COMMAND_SERVER_EXIT = 720, + RBAC_PERM_COMMAND_SERVER_IDLERESTART = 721, + RBAC_PERM_COMMAND_SERVER_IDLERESTART_CANCEL = 722, + RBAC_PERM_COMMAND_SERVER_IDLESHUTDOWN = 723, + RBAC_PERM_COMMAND_SERVER_IDLESHUTDOWN_CANCEL = 724, + RBAC_PERM_COMMAND_SERVER_INFO = 725, + RBAC_PERM_COMMAND_SERVER_PLIMIT = 726, + RBAC_PERM_COMMAND_SERVER_RESTART = 727, + RBAC_PERM_COMMAND_SERVER_RESTART_CANCEL = 728, + RBAC_PERM_COMMAND_SERVER_SET = 729, + RBAC_PERM_COMMAND_SERVER_SET_CLOSED = 730, + RBAC_PERM_COMMAND_SERVER_SET_DIFFTIME = 731, + RBAC_PERM_COMMAND_SERVER_SET_LOGLEVEL = 732, + RBAC_PERM_COMMAND_SERVER_SET_MOTD = 733, + RBAC_PERM_COMMAND_SERVER_SHUTDOWN = 734, + RBAC_PERM_COMMAND_SERVER_SHUTDOWN_CANCEL = 735, + RBAC_PERM_COMMAND_SERVER_MOTD = 736, + RBAC_PERM_COMMAND_TELE = 737, + RBAC_PERM_COMMAND_TELE_ADD = 738, + RBAC_PERM_COMMAND_TELE_DEL = 739, + RBAC_PERM_COMMAND_TELE_NAME = 740, + RBAC_PERM_COMMAND_TELE_GROUP = 741, + RBAC_PERM_COMMAND_TICKET = 742, + RBAC_PERM_COMMAND_TICKET_ASSIGN = 743, + RBAC_PERM_COMMAND_TICKET_CLOSE = 744, + RBAC_PERM_COMMAND_TICKET_CLOSEDLIST = 745, + RBAC_PERM_COMMAND_TICKET_COMMENT = 746, + RBAC_PERM_COMMAND_TICKET_COMPLETE = 747, + RBAC_PERM_COMMAND_TICKET_DELETE = 748, + RBAC_PERM_COMMAND_TICKET_ESCALATE = 749, + RBAC_PERM_COMMAND_TICKET_ESCALATEDLIST = 750, + RBAC_PERM_COMMAND_TICKET_LIST = 751, + RBAC_PERM_COMMAND_TICKET_ONLINELIST = 752, + RBAC_PERM_COMMAND_TICKET_RESET = 753, + RBAC_PERM_COMMAND_TICKET_RESPONSE = 754, + RBAC_PERM_COMMAND_TICKET_RESPONSE_APPEND = 755, + RBAC_PERM_COMMAND_TICKET_RESPONSE_APPENDLN = 756, + RBAC_PERM_COMMAND_TICKET_TOGGLESYSTEM = 757, + RBAC_PERM_COMMAND_TICKET_UNASSIGN = 758, + RBAC_PERM_COMMAND_TICKET_VIEWID = 759, + RBAC_PERM_COMMAND_TICKET_VIEWNAME = 760, + RBAC_PERM_COMMAND_TITLES = 761, + RBAC_PERM_COMMAND_TITLES_ADD = 762, + RBAC_PERM_COMMAND_TITLES_CURRENT = 763, + RBAC_PERM_COMMAND_TITLES_REMOVE = 764, + RBAC_PERM_COMMAND_TITLES_SET = 765, + RBAC_PERM_COMMAND_TITLES_SET_MASK = 766, + RBAC_PERM_COMMAND_WP = 767, + RBAC_PERM_COMMAND_WP_ADD = 768, + RBAC_PERM_COMMAND_WP_EVENT = 769, + RBAC_PERM_COMMAND_WP_LOAD = 770, + RBAC_PERM_COMMAND_WP_MODIFY = 771, + RBAC_PERM_COMMAND_WP_UNLOAD = 772, + RBAC_PERM_COMMAND_WP_RELOAD = 773, + RBAC_PERM_COMMAND_WP_SHOW = 774, + RBAC_PERM_COMMAND_MODIFY_CURRENCY = 775, // only 4.3.4 + RBAC_PERM_COMMAND_DEBUG_PHASE = 776, // Only 4.3.4 + + // custom permissions 1000+ + RBAC_PERM_MAX +}; + +enum RBACCommandResult +{ + RBAC_OK, + RBAC_CANT_ADD_ALREADY_ADDED, + RBAC_CANT_REVOKE_NOT_IN_LIST, + RBAC_IN_GRANTED_LIST, + RBAC_IN_DENIED_LIST, + RBAC_ID_DOES_NOT_EXISTS +}; + +typedef std::bitset<RBAC_PERM_MAX> RBACPermissionContainer; +typedef std::set<uint32> RBACRoleContainer; +typedef std::set<uint32> RBACGroupContainer; + +class RBACObject +{ + public: + RBACObject(uint32 id = 0, std::string const& name = ""): + _id(id), _name(name) { } + + virtual ~RBACObject() { } + + /// Gets the Name of the Object + std::string const& GetName() const { return _name; } + /// Gets the Id of the Object + uint32 GetId() const { return _id; } + + private: + uint32 _id; ///> id of the object + std::string _name; ///> name of the object +}; + +/// Permission: Defines an autorization to perform certain operation +class RBACPermission: public RBACObject +{ + public: + RBACPermission(uint32 id = 0, std::string const& name = ""): + RBACObject(id, name) { } +}; + +/// Set of Permissions +class RBACRole: public RBACObject +{ + public: + RBACRole(uint32 id = 0, std::string const& name = ""): + RBACObject(id, name) { } + + /// Gets the Permissions assigned to this role + RBACPermissionContainer const& GetPermissions() const { return _perms; } + /// Grants a Permission (Adds) + void GrantPermission(uint32 id); + /// Revokes a Permission (Removes) + void RevokePermission(uint32 id); + + private: + RBACPermissionContainer _perms; ///> Set of permissions +}; + +/// Set of Roles +class RBACGroup: public RBACObject +{ + public: + RBACGroup(uint32 id = 0, std::string const& name = ""): + RBACObject(id, name) { } + + /// Gets the Roles assigned to this group + RBACRoleContainer const& GetRoles() const { return _roles; } + /// Grants a Role (Adds) + void GrantRole(uint32 role); + /// Revokes a Role (Removes) + void RevokeRole(uint32 role); + + private: + RBACRoleContainer _roles; ///> Set of Roles +}; + +/** + * @name RBACData + * @brief Contains all needed information about the acccount + * + * This class contains all the data needed to calculate the account permissions. + * RBACDAta is formed by group permissions and user permissions through: + * - Granted Groups, which contains roles, which contains permissions: Set of granted permissions + * - Granted Roles, which contains permissions: Set of granted permissions + * - Denied Roles, which contains permissions: Set of denied permissions + * - Granted Permissions + * - Denied Permissions + * + * Calculation of current Permissions: Granted permissions - Denied permissions + * - Granted permissions: through groups, through roles and directly assigned + * - Denied permissions: through roles and directly assigned + */ +class RBACData: public RBACObject +{ + public: + RBACData(uint32 id, std::string const& name, int32 realmId): + RBACObject(id, name), _realmId(realmId) { } + + /** + * @name HasPermission + * @brief Checks if certain action is allowed + * + * Checks if certain action can be performed. + * + * @return grant or deny action + * + * Example Usage: + * @code + * bool Player::CanJoinArena(Battleground* bg) + * { + * return bg->isArena() && HasPermission(RBAC_PERM_JOIN_ARENA); + * } + * @endcode + */ + bool HasPermission(uint32 permission) const { return _globalPerms.test(permission); } + + // Functions enabled to be used by command system + /// Returns all the granted permissions (after computation) + RBACPermissionContainer const& GetPermissions() const { return _globalPerms; } + /// Returns all the granted permissions + RBACPermissionContainer const& GetGrantedPermissions() const { return _grantedPerms; } + /// Returns all the denied permissions + RBACPermissionContainer const& GetDeniedPermissions() const { return _deniedPerms; } + /// Returns all the granted roles + RBACRoleContainer const& GetGrantedRoles() const { return _grantedRoles; } + /// Returns all the denied roles + RBACRoleContainer const& GetDeniedRoles() const { return _deniedRoles; } + /// Returns all the granted groups + RBACGroupContainer const& GetGroups() const { return _groups; } + + /** + * @name AddGroup + * @brief Adds new group + * + * Add a new group to the account. If realm is 0 or the group can not be added + * No save to db action will be performed. + * + * Fails if group Id does not exists or group already present + * + * @param groupId group to be added + * @param realmId realm affected + * + * @return Success or failure (with reason) to add the group + * + * Example Usage: + * @code + * // previously defined "RBACData* rbac" with proper initialization + * uint32 groupId = 2; + * if (rbac->AddGroup(groupId) == RBAC_OK) + * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Group %u succesfully added", groupId); + * @endcode + */ + RBACCommandResult AddGroup(uint32 groupId, int32 realmId = 0); + + /** + * @name RemoveGroup + * @brief Removes a group + * + * Removes a group from the account. If realm is 0 or the group can not be removed + * No save to db action will be performed. Any delete operation will always affect + * "all realms (-1)" in addition to the realm specified + * + * Fails if group not present + * + * @param groupId group to be removed + * @param realmId realm affected + * + * @return Success or failure (with reason) to remove the group + * + * Example Usage: + * // previously defined "RBACData* rbac" with proper initialization + * uint32 groupId = 2; + * if (rbac->RemoveGroup(groupId) == RBAC_OK) + * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Group %u succesfully removed", groupId); + * @endcode + */ + RBACCommandResult RemoveGroup(uint32 groupId, int32 realmId = 0); + + /** + * @name GrantRole + * @brief Grants a role + * + * Grants a role to the account. If realm is 0 or the role can not be added + * No save to db action will be performed. + * + * Fails if role Id does not exists or role already granted or denied + * + * @param roleId role to be granted + * @param realmId realm affected + * + * @return Success or failure (with reason) to grant the role + * + * Example Usage: + * // previously defined "RBACData* rbac" with proper initialization + * uint32 roleId = 2; + * if (rbac->GrantRole(roleId) == RBAC_IN_DENIED_LIST) + * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Failed to grant role %u, already denied", roleId); + * @endcode + */ + RBACCommandResult GrantRole(uint32 roleId, int32 realmId = 0); + + /** + * @name DenyRole + * @brief Denies a role + * + * Denied a role to the account. If realm is 0 or the role can not be added + * No save to db action will be performed. + * + * Fails if role Id does not exists or role already granted or denied + * + * @param roleId role to be denied + * @param realmId realm affected + * + * @return Success or failure (with reason) to deny the role + * + * Example Usage: + * // previously defined "RBACData* rbac" with proper initialization + * uint32 roleId = 2; + * if (rbac->DenyRole(roleId) == RBAC_ID_DOES_NOT_EXISTS) + * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Role Id %u does not exists", roleId); + * @endcode + */ + RBACCommandResult DenyRole(uint32 roleId, int32 realmId = 0); + + /** + * @name RevokeRole + * @brief Removes a role + * + * Removes a role from the account. If realm is 0 or the role can not be removed + * No save to db action will be performed. Any delete operation will always affect + * "all realms (-1)" in addition to the realm specified + * + * Fails if role not present + * + * @param roleId role to be removed + * @param realmId realm affected + * + * @return Success or failure (with reason) to remove the role + * + * Example Usage: + * // previously defined "RBACData* rbac" with proper initialization + * uint32 roleId = 2; + * if (rbac->RevokeRole(roleId) == RBAC_OK) + * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Role %u succesfully removed", roleId); + * @endcode + */ + RBACCommandResult RevokeRole(uint32 roleId, int32 realmId = 0); + + /** + * @name GrantRole + * @brief Grants a permission + * + * Grants a permission to the account. If realm is 0 or the permission can not be added + * No save to db action will be performed. + * + * Fails if permission Id does not exists or permission already granted or denied + * + * @param permissionId permission to be granted + * @param realmId realm affected + * + * @return Success or failure (with reason) to grant the permission + * + * Example Usage: + * // previously defined "RBACData* rbac" with proper initialization + * uint32 permissionId = 2; + * if (rbac->GrantRole(permissionId) == RBAC_IN_DENIED_LIST) + * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Failed to grant permission %u, already denied", permissionId); + * @endcode + */ + RBACCommandResult GrantPermission(uint32 permissionId, int32 realmId = 0); + + /** + * @name DenyPermission + * @brief Denies a permission + * + * Denied a permission to the account. If realm is 0 or the permission can not be added + * No save to db action will be performed. + * + * Fails if permission Id does not exists or permission already granted or denied + * + * @param permissionId permission to be denied + * @param realmId realm affected + * + * @return Success or failure (with reason) to deny the permission + * + * Example Usage: + * // previously defined "RBACData* rbac" with proper initialization + * uint32 permissionId = 2; + * if (rbac->DenyRole(permissionId) == RBAC_ID_DOES_NOT_EXISTS) + * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Role Id %u does not exists", permissionId); + * @endcode + */ + RBACCommandResult DenyPermission(uint32 permissionId, int32 realmId = 0); + + /** + * @name RevokePermission + * @brief Removes a permission + * + * Removes a permission from the account. If realm is 0 or the permission can not be removed + * No save to db action will be performed. Any delete operation will always affect + * "all realms (-1)" in addition to the realm specified + * + * Fails if permission not present + * + * @param permissionId permission to be removed + * @param realmId realm affected + * + * @return Success or failure (with reason) to remove the permission + * + * Example Usage: + * // previously defined "RBACData* rbac" with proper initialization + * uint32 permissionId = 2; + * if (rbac->RevokeRole(permissionId) == RBAC_OK) + * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Permission %u succesfully removed", permissionId); + * @endcode + */ + RBACCommandResult RevokePermission(uint32 permissionId, int32 realmId = 0); + + /// Loads all permissions, groups and roles assigned to current account + void LoadFromDB(); + private: + /// Saves a role to DB, Granted or Denied + void SaveRole(uint32 role, bool granted, int32 realm); + /// Saves a permission to DB, Granted or Denied + void SavePermission(uint32 role, bool granted, int32 realm); + + /** + * @name CalculateNewPermissions + * @brief Calculates new permissions + * + * Calculates new permissions after some change in groups, roles or permissions. + * The calculation is done Granted - Denied: + * - Granted permissions: through groups, through roles and directly assigned + * - Denied permissions: through roles and directly assigned + */ + void CalculateNewPermissions(); + + int32 GetRealmId() { return _realmId; } + + int32 _realmId; ///> RealmId Affected + RBACGroupContainer _groups; ///> Granted groups + RBACRoleContainer _grantedRoles; ///> Granted roles + RBACRoleContainer _deniedRoles; ///> Denied roles + RBACPermissionContainer _grantedPerms; ///> Granted permissions + RBACPermissionContainer _deniedPerms; ///> Denied permissions + RBACPermissionContainer _globalPerms; ///> Calculated permissions +}; + +#endif diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 3d2eaffc15d..caadd842273 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -82,6 +82,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) switch (criteria->requiredType) { case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE: + case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE: case ACHIEVEMENT_CRITERIA_TYPE_WIN_BG: case ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING: case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST: // only hardcoded list @@ -116,7 +117,6 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) switch (dataType) { case ACHIEVEMENT_CRITERIA_DATA_TYPE_NONE: - case ACHIEVEMENT_CRITERIA_DATA_TYPE_VALUE: case ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT: return true; case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_CREATURE: @@ -189,6 +189,14 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) return false; } return true; + case ACHIEVEMENT_CRITERIA_DATA_TYPE_VALUE: + if (value.compType >= COMP_TYPE_MAX) + { + TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_VALUE (%u) has wrong ComparisionType in value2 (%u), ignored.", + value.compType, criteria->requiredType, dataType, value.value); + return false; + } + return true; case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL: if (level.minlevel > STRONG_MAX_LEVEL) { @@ -345,7 +353,7 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA: return target && target->HasAuraEffect(aura.spell_id, aura.effect_idx); case ACHIEVEMENT_CRITERIA_DATA_TYPE_VALUE: - return miscvalue1 >= value.minvalue; + return CompareValues(ComparisionType(value.compType), miscvalue1, value.value); case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL: if (!target) return false; @@ -508,103 +516,50 @@ void AchievementMgr::SaveToDB(SQLTransaction& trans) { if (!m_completedAchievements.empty()) { - bool need_execute = false; - std::ostringstream ssdel; - std::ostringstream ssins; for (CompletedAchievementMap::iterator iter = m_completedAchievements.begin(); iter != m_completedAchievements.end(); ++iter) { if (!iter->second.changed) continue; - /// first new/changed record prefix - if (!need_execute) - { - ssdel << "DELETE FROM character_achievement WHERE guid = " << GetPlayer()->GetGUIDLow() << " AND achievement IN ("; - ssins << "INSERT INTO character_achievement (guid, achievement, date) VALUES "; - need_execute = true; - } - /// next new/changed record prefix - else - { - ssdel << ','; - ssins << ','; - } + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_ACHIEVEMENT_BY_ACHIEVEMENT); + stmt->setUInt16(0, iter->first); + stmt->setUInt32(1, GetPlayer()->GetGUID()); + trans->Append(stmt); - // new/changed record data - ssdel << iter->first; - ssins << '(' << GetPlayer()->GetGUIDLow() << ',' << iter->first << ',' << uint64(iter->second.date) << ')'; + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_ACHIEVEMENT); + stmt->setUInt32(0, GetPlayer()->GetGUID()); + stmt->setUInt16(1, iter->first); + stmt->setUInt32(2, uint32(iter->second.date)); + trans->Append(stmt); - /// mark as saved in db iter->second.changed = false; } - - if (need_execute) - { - ssdel << ')'; - trans->Append(ssdel.str().c_str()); - trans->Append(ssins.str().c_str()); - } } if (!m_criteriaProgress.empty()) { - /// prepare deleting and insert - bool need_execute_del = false; - bool need_execute_ins = false; - std::ostringstream ssdel; - std::ostringstream ssins; for (CriteriaProgressMap::iterator iter = m_criteriaProgress.begin(); iter != m_criteriaProgress.end(); ++iter) { if (!iter->second.changed) continue; - // deleted data (including 0 progress state) - { - /// first new/changed record prefix (for any counter value) - if (!need_execute_del) - { - ssdel << "DELETE FROM character_achievement_progress WHERE guid = " << GetPlayer()->GetGUIDLow() << " AND criteria IN ("; - need_execute_del = true; - } - /// next new/changed record prefix - else - ssdel << ','; - - // new/changed record data - ssdel << iter->first; - } + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_ACHIEVEMENT_PROGRESS_BY_CRITERIA); + stmt->setUInt32(0, GetPlayer()->GetGUID()); + stmt->setUInt16(1, iter->first); + trans->Append(stmt); - // store data only for real progress - if (iter->second.counter != 0) + if (iter->second.counter) { - /// first new/changed record prefix - if (!need_execute_ins) - { - ssins << "INSERT INTO character_achievement_progress (guid, criteria, counter, date) VALUES "; - need_execute_ins = true; - } - /// next new/changed record prefix - else - ssins << ','; - - // new/changed record data - ssins << '(' << GetPlayer()->GetGUIDLow() << ',' << iter->first << ',' << iter->second.counter << ',' << iter->second.date << ')'; + stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_ACHIEVEMENT_PROGRESS); + stmt->setUInt32(0, GetPlayer()->GetGUID()); + stmt->setUInt16(1, iter->first); + stmt->setUInt32(2, iter->second.counter); + stmt->setUInt32(3, uint32(iter->second.date)); + trans->Append(stmt); } - /// mark as updated in db iter->second.changed = false; } - - if (need_execute_del) // DELETE ... IN (.... _)_ - ssdel << ')'; - - if (need_execute_del || need_execute_ins) - { - if (need_execute_del) - trans->Append(ssdel.str().c_str()); - if (need_execute_ins) - trans->Append(ssins.str().c_str()); - } } } @@ -882,6 +837,20 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui SetCriteriaProgress(achievementCriteria, miscValue2, PROGRESS_ACCUMULATE); break; } + case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE: + { + // AchievementMgr::UpdateAchievementCriteria might also be called on login - skip in this case + if (!miscValue2) + continue; + + // those requirements couldn't be found in the dbc + AchievementCriteriaDataSet const* data = sAchievementMgr->GetCriteriaDataSet(achievementCriteria); + if (!data || !data->Meets(GetPlayer(), unit, miscValue1)) + continue; + + SetCriteriaProgress(achievementCriteria, miscValue2, PROGRESS_ACCUMULATE); + break; + } case ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL: if (AchievementCriteriaDataSet const* data = sAchievementMgr->GetCriteriaDataSet(achievementCriteria)) if (!data->Meets(GetPlayer(), unit)) @@ -1301,7 +1270,6 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui SetCriteriaProgress(achievementCriteria, 1); break; } - case ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT: case ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT: { @@ -1616,7 +1584,6 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui case ACHIEVEMENT_CRITERIA_TYPE_PLAY_ARENA: case ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK: case ACHIEVEMENT_CRITERIA_TYPE_EARNED_PVP_TITLE: - case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE: break; // Not implemented yet :( } @@ -1774,6 +1741,7 @@ bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achieve case ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_AT_BARBER: case ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_MAIL: case ACHIEVEMENT_CRITERIA_TYPE_LOSE_DUEL: + case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE: case ACHIEVEMENT_CRITERIA_TYPE_GOLD_EARNED_BY_AUCTIONS: case ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION: case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID: @@ -2331,6 +2299,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData() case ACHIEVEMENT_CRITERIA_TYPE_WIN_BG: // any cases break; case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE: + case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE: break; // any cases case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST: { diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h index ce6ab9cd29b..f57c05a2769 100644 --- a/src/server/game/Achievements/AchievementMgr.h +++ b/src/server/game/Achievements/AchievementMgr.h @@ -116,7 +116,8 @@ struct AchievementCriteriaData // ACHIEVEMENT_CRITERIA_DATA_TYPE_VALUE = 8 struct { - uint32 minvalue; + uint32 value; + uint32 compType; } value; // ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL = 9 struct diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp index a84e7ec30db..08557b939eb 100644 --- a/src/server/game/Battlegrounds/ArenaTeam.cpp +++ b/src/server/game/Battlegrounds/ArenaTeam.cpp @@ -82,7 +82,7 @@ bool ArenaTeam::Create(uint64 captainGuid, uint8 type, std::string const& teamNa // Add captain as member AddMember(CaptainGuid); - TC_LOG_INFO(LOG_FILTER_ARENAS, "New ArenaTeam created [Id: %u] [Type: %u] [Captain low GUID: %u]", GetId(), GetType(), captainLowGuid); + TC_LOG_INFO(LOG_FILTER_ARENAS, "New ArenaTeam created [Id: %u, Name: %s] [Type: %u] [Captain low GUID: %u]", GetId(), GetName().c_str(), GetType(), captainLowGuid); return true; } @@ -304,9 +304,9 @@ void ArenaTeam::SetCaptain(uint64 guid) newCaptain->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 0); if (oldCaptain) { - TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Player: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team [Id: %u] [Type: %u].", + TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Player: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team [Id: %u, Name: %s] [Type: %u].", oldCaptain->GetName().c_str(), oldCaptain->GetGUIDLow(), newCaptain->GetName().c_str(), - newCaptain->GetGUIDLow(), GetId(), GetType()); + newCaptain->GetGUIDLow(), GetId(), GetName().c_str(), GetType()); } } } @@ -328,7 +328,7 @@ void ArenaTeam::DelMember(uint64 guid, bool cleanDb) // delete all info regarding this team for (uint32 i = 0; i < ARENA_TEAM_END; ++i) player->SetArenaTeamInfoField(GetSlot(), ArenaTeamInfoType(i), 0); - TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] left arena team type: %u [Id: %u].", player->GetName().c_str(), player->GetGUIDLow(), GetType(), GetId()); + TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] left arena team type: %u [Id: %u, Name: %s].", player->GetName().c_str(), player->GetGUIDLow(), GetType(), GetId(), GetName().c_str()); } // Only used for single member deletion, for arena team disband we use a single query for more efficiency @@ -353,7 +353,7 @@ void ArenaTeam::Disband(WorldSession* session) BroadcastEvent(ERR_ARENA_TEAM_DISBANDED_S, 0, 2, session->GetPlayerName(), GetName(), ""); if (Player* player = session->GetPlayer()) - TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] disbanded arena team type: %u [Id: %u].", player->GetName().c_str(), player->GetGUIDLow(), GetType(), GetId()); + TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] disbanded arena team type: %u [Id: %u, Name: %s].", player->GetName().c_str(), player->GetGUIDLow(), GetType(), GetId(), GetName().c_str()); } // Update database diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 21c054c8793..211ab6caf77 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -886,9 +886,9 @@ void Battleground::EndBattleground(uint32 winner) } } - uint32 winner_kills = player->GetRandomWinner() ? BG_REWARD_WINNER_HONOR_LAST : BG_REWARD_WINNER_HONOR_FIRST; - uint32 loser_kills = player->GetRandomWinner() ? BG_REWARD_LOSER_HONOR_LAST : BG_REWARD_LOSER_HONOR_FIRST; - uint32 winner_arena = player->GetRandomWinner() ? BG_REWARD_WINNER_ARENA_LAST : BG_REWARD_WINNER_ARENA_FIRST; + uint32 winner_kills = player->GetRandomWinner() ? sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_HONOR_LAST) : sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_HONOR_FIRST); + uint32 loser_kills = player->GetRandomWinner() ? sWorld->getIntConfig(CONFIG_BG_REWARD_LOSER_HONOR_LAST) : sWorld->getIntConfig(CONFIG_BG_REWARD_LOSER_HONOR_FIRST); + uint32 winner_arena = player->GetRandomWinner() ? sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_ARENA_LAST) : sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_ARENA_FIRST); // Reward winner team if (team == winner) diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index 1f180542016..76ff08e0281 100644 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -143,16 +143,6 @@ enum BattlegroundBuffObjects BG_OBJECTID_BERSERKERBUFF_ENTRY = 179905 }; -enum BattlegroundRandomRewards -{ - BG_REWARD_WINNER_HONOR_FIRST = 30, - BG_REWARD_WINNER_ARENA_FIRST = 25, - BG_REWARD_WINNER_HONOR_LAST = 15, - BG_REWARD_WINNER_ARENA_LAST = 0, - BG_REWARD_LOSER_HONOR_FIRST = 5, - BG_REWARD_LOSER_HONOR_LAST = 5 -}; - const uint32 Buff_Entries[3] = { BG_OBJECTID_SPEEDBUFF_ENTRY, BG_OBJECTID_REGENBUFF_ENTRY, BG_OBJECTID_BERSERKERBUFF_ENTRY }; enum BattlegroundStatus diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index 557cb9de09f..936cc88462f 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -262,8 +262,8 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg) Battleground::BattlegroundScoreMap::const_iterator itr2 = bg->GetPlayerScoresBegin(); for (Battleground::BattlegroundScoreMap::const_iterator itr = itr2; itr != bg->GetPlayerScoresEnd();) { - BattlegroundScore* score = itr2->second; itr2 = itr++; + BattlegroundScore* score = itr2->second; if (!bg->IsPlayerInBattleground(itr2->first)) { TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Player " UI64FMTD " has scoreboard entry for battleground %u but is not in battleground!", itr->first, bg->GetTypeID(true)); @@ -828,9 +828,9 @@ void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, uint64 guid if (!player) return; - uint32 winner_kills = player->GetRandomWinner() ? BG_REWARD_WINNER_HONOR_LAST : BG_REWARD_WINNER_HONOR_FIRST; - uint32 winner_arena = player->GetRandomWinner() ? BG_REWARD_WINNER_ARENA_LAST : BG_REWARD_WINNER_ARENA_FIRST; - uint32 loser_kills = player->GetRandomWinner() ? BG_REWARD_LOSER_HONOR_LAST : BG_REWARD_LOSER_HONOR_FIRST; + uint32 winner_kills = player->GetRandomWinner() ? sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_HONOR_LAST) : sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_HONOR_FIRST); + uint32 winner_arena = player->GetRandomWinner() ? sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_ARENA_LAST) : sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_ARENA_FIRST); + uint32 loser_kills = player->GetRandomWinner() ? sWorld->getIntConfig(CONFIG_BG_REWARD_LOSER_HONOR_LAST) : sWorld->getIntConfig(CONFIG_BG_REWARD_LOSER_HONOR_FIRST); winner_kills = Trinity::Honor::hk_honor_at_level(player->getLevel(), float(winner_kills)); loser_kills = Trinity::Honor::hk_honor_at_level(player->getLevel(), float(loser_kills)); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index 6fc68c62d1f..29d4e4124c0 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -544,7 +544,11 @@ void BattlegroundIC::EventPlayerClickedOnFlag(Player* player, GameObject* target float cords[4] = {banner->GetPositionX(), banner->GetPositionY(), banner->GetPositionZ(), banner->GetOrientation() }; DelObject(nodePoint[i].gameobject_type); - AddObject(nodePoint[i].gameobject_type, nodePoint[i].gameobject_entry, cords[0], cords[1], cords[2], cords[3], 0, 0, 0, 0, RESPAWN_ONE_DAY); + if (!AddObject(nodePoint[i].gameobject_type, nodePoint[i].gameobject_entry, cords[0], cords[1], cords[2], cords[3], 0, 0, 0, 0, RESPAWN_ONE_DAY)) + { + TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error spawning a banner (type: %u, entry: %u). Isle of Conquest BG cancelled.", nodePoint[i].gameobject_type, nodePoint[i].gameobject_entry); + Battleground::EndBattleground(WINNER_NONE); + } GetBGObject(nodePoint[i].gameobject_type)->SetUInt32Value(GAMEOBJECT_FACTION, nodePoint[i].faction == TEAM_ALLIANCE ? BG_IC_Factions[1] : BG_IC_Factions[0]); @@ -641,10 +645,13 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture) for (uint8 u = 0; u < MAX_HANGAR_TELEPORTERS_SPAWNS; ++u) { uint8 type = BG_IC_GO_HANGAR_TELEPORTER_1+u; - AddObject(type, (nodePoint->faction == TEAM_ALLIANCE ? GO_ALLIANCE_GUNSHIP_PORTAL : GO_HORDE_GUNSHIP_PORTAL), + if (!AddObject(type, (nodePoint->faction == TEAM_ALLIANCE ? GO_ALLIANCE_GUNSHIP_PORTAL : GO_HORDE_GUNSHIP_PORTAL), BG_IC_HangarTeleporters[u].GetPositionX(), BG_IC_HangarTeleporters[u].GetPositionY(), BG_IC_HangarTeleporters[u].GetPositionZ(), BG_IC_HangarTeleporters[u].GetOrientation(), - 0, 0, 0, 0, RESPAWN_ONE_DAY); + 0, 0, 0, 0, RESPAWN_ONE_DAY)) + { + TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error spawning a gunship portal. Type: %u", BG_IC_GO_HANGAR_TELEPORTER_1+u); + } } //TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BG_IC_GO_HANGAR_BANNER CAPTURED Faction: %u", nodePoint->faction); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h index 34d03a5d92c..6fdc97f25c5 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h @@ -818,7 +818,7 @@ const Position allianceGunshipPassengers[5] = struct ICNodePoint { uint32 gameobject_type; // with this we will get the GameObject of that point - uint32 gameobject_entry; // what gamoebject entry is active here. + uint32 gameobject_entry; // what gameobject entry is active here. uint8 faction; // who has this node ICNodePointType nodeType; // here we can specify if it is graveyards, hangar etc... uint32 banners[4]; // the banners that have this point diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp index 62b3416f72e..96d28035b29 100644 --- a/src/server/game/Chat/Channels/ChannelMgr.cpp +++ b/src/server/game/Chat/Channels/ChannelMgr.cpp @@ -43,7 +43,9 @@ ChannelMgr* ChannelMgr::forTeam(uint32 team) Channel* ChannelMgr::GetJoinChannel(std::string const& name, uint32 channelId) { std::wstring wname; - Utf8toWStr(name, wname); + if (!Utf8toWStr(name, wname)) + return NULL; + wstrToLower(wname); ChannelMap::const_iterator i = channels.find(wname); @@ -61,7 +63,9 @@ Channel* ChannelMgr::GetJoinChannel(std::string const& name, uint32 channelId) Channel* ChannelMgr::GetChannel(std::string const& name, Player* player, bool pkt) { std::wstring wname; - Utf8toWStr(name, wname); + if (!Utf8toWStr(name, wname)) + return NULL; + wstrToLower(wname); ChannelMap::const_iterator i = channels.find(wname); @@ -84,7 +88,9 @@ Channel* ChannelMgr::GetChannel(std::string const& name, Player* player, bool pk void ChannelMgr::LeftChannel(std::string const& name) { std::wstring wname; - Utf8toWStr(name, wname); + if (!Utf8toWStr(name, wname)) + return; + wstrToLower(wname); ChannelMap::const_iterator i = channels.find(wname); diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index ada7909e9ff..933d77cc2e8 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -1500,6 +1500,11 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) } break; } + case CONDITION_SOURCE_TYPE_PHASE_DEFINITION: + { + TC_LOG_ERROR(LOG_FILTER_SQL, "CONDITION_SOURCE_TYPE_PHASE_DEFINITION:: is only for 4.3.4 branch, skipped"); + return false; + } case CONDITION_SOURCE_TYPE_GOSSIP_MENU: case CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION: case CONDITION_SOURCE_TYPE_SMART_EVENT: @@ -1763,7 +1768,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) { if (cond->ConditionValue2 >= COMP_TYPE_MAX) { - TC_LOG_ERROR(LOG_FILTER_SQL, "Level condition has invalid option (%u), skipped", cond->ConditionValue2); + TC_LOG_ERROR(LOG_FILTER_SQL, "Level condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2); return false; } if (cond->ConditionValue3) diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index 07eab29e53a..cc2db10e437 100644 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -129,17 +129,8 @@ enum ConditionSourceType CONDITION_SOURCE_TYPE_SMART_EVENT = 22, CONDITION_SOURCE_TYPE_NPC_VENDOR = 23, CONDITION_SOURCE_TYPE_SPELL_PROC = 24, - CONDITION_SOURCE_TYPE_MAX = 25 // MAX -}; - -enum ComparisionType -{ - COMP_TYPE_EQ = 0, - COMP_TYPE_HIGH, - COMP_TYPE_LOW, - COMP_TYPE_HIGH_EQ, - COMP_TYPE_LOW_EQ, - COMP_TYPE_MAX + CONDITION_SOURCE_TYPE_PHASE_DEFINITION = 25, // only 4.3.4 + CONDITION_SOURCE_TYPE_MAX = 26 // MAX }; enum RelationType @@ -273,27 +264,6 @@ class ConditionMgr SmartEventConditionContainer SmartEventConditionStore; }; -template <class T> bool CompareValues(ComparisionType type, T val1, T val2) -{ - switch (type) - { - case COMP_TYPE_EQ: - return val1 == val2; - case COMP_TYPE_HIGH: - return val1 > val2; - case COMP_TYPE_LOW: - return val1 < val2; - case COMP_TYPE_HIGH_EQ: - return val1 >= val2; - case COMP_TYPE_LOW_EQ: - return val1 <= val2; - default: - // incorrect parameter - ASSERT(false); - return false; - } -} - #define sConditionMgr ACE_Singleton<ConditionMgr, ACE_Null_Mutex>::instance() #endif diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index c371fc781fd..e12f70baa41 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1966,9 +1966,9 @@ struct VehicleSeatEntry bool CanEnterOrExit() const { return m_flags & VEHICLE_SEAT_FLAG_CAN_ENTER_OR_EXIT; } bool CanSwitchFromSeat() const { return m_flags & VEHICLE_SEAT_FLAG_CAN_SWITCH; } - bool IsUsableByOverride() const { return (m_flags & VEHICLE_SEAT_FLAG_UNCONTROLLED) + bool IsUsableByOverride() const { return (m_flags & (VEHICLE_SEAT_FLAG_UNCONTROLLED | VEHICLE_SEAT_FLAG_UNK18) || (m_flagsB & (VEHICLE_SEAT_FLAG_B_USABLE_FORCED | VEHICLE_SEAT_FLAG_B_USABLE_FORCED_2 | - VEHICLE_SEAT_FLAG_B_USABLE_FORCED_3 | VEHICLE_SEAT_FLAG_B_USABLE_FORCED_4)); } + VEHICLE_SEAT_FLAG_B_USABLE_FORCED_3 | VEHICLE_SEAT_FLAG_B_USABLE_FORCED_4))); } bool IsEjectable() const { return m_flagsB & VEHICLE_SEAT_FLAG_B_EJECTABLE; } }; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index b1ee724e5f7..68d30cd1dde 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -539,8 +539,11 @@ inline void KillRewarder::_RewardKillCredit(Player* player) { // 4.4. Give kill credit (player must not be in group, or he must be alive or without corpse). if (!_group || player->IsAlive() || !player->GetCorpse()) - if (_victim->GetTypeId() == TYPEID_UNIT) - player->KilledMonster(_victim->ToCreature()->GetCreatureTemplate(), _victim->GetGUID()); + if (Creature* target = _victim->ToCreature()) + { + player->KilledMonster(target->GetCreatureTemplate(), target->GetGUID()); + player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE, target->GetCreatureType(), 1, target); + } } void KillRewarder::_RewardPlayer(Player* player, bool isDungeon) @@ -4028,7 +4031,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) itr->second->state = PLAYERSPELL_REMOVED; } - RemoveAurasDueToSpell(spell_id); + RemoveOwnedAura(spell_id, GetGUID()); // remove pet auras for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) @@ -4713,7 +4716,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC if (uint32 guildId = GetGuildIdFromDB(playerguid)) if (Guild* guild = sGuildMgr->GetGuildById(guildId)) - guild->DeleteMember(guid); + guild->DeleteMember(guid, false, false, true); // remove from arena teams LeaveAllArenaTeams(playerguid); diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 7f1d231ebd9..2f309c07cce 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -5236,9 +5236,10 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) uint32 oldMSTime = getMSTime(); time_t curTime = time(NULL); - tm* lt = localtime(&curTime); + tm lt; + ACE_OS::localtime_r(&curTime, <); uint64 basetime(curTime); - TC_LOG_INFO(LOG_FILTER_GENERAL, "Returning mails current time: hour: %d, minute: %d, second: %d ", lt->tm_hour, lt->tm_min, lt->tm_sec); + TC_LOG_INFO(LOG_FILTER_GENERAL, "Returning mails current time: hour: %d, minute: %d, second: %d ", lt.tm_hour, lt.tm_min, lt.tm_sec); // Delete all old mails without item and without body immediately, if starting server if (!serverUp) diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index f43e49a3440..8ec6aac9d4e 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -1943,10 +1943,22 @@ void Group::ResetInstances(uint8 method, bool isRaid, Player* SendMsgTo) if (SendMsgTo) { - if (isEmpty) - SendMsgTo->SendResetInstanceSuccess(instanceSave->GetMapId()); - else + if (!isEmpty) SendMsgTo->SendResetInstanceFailed(0, instanceSave->GetMapId()); + else if (sWorld->getBoolConfig(CONFIG_INSTANCES_RESET_ANNOUNCE)) + { + if (Group* group = SendMsgTo->GetGroup()) + { + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) + if (Player* player = itr->GetSource()) + player->SendResetInstanceSuccess(instanceSave->GetMapId()); + } + + else + SendMsgTo->SendResetInstanceSuccess(instanceSave->GetMapId()); + } + else + SendMsgTo->SendResetInstanceSuccess(instanceSave->GetMapId()); } if (isEmpty || method == INSTANCE_RESET_GROUP_DISBAND || method == INSTANCE_RESET_CHANGE_DIFFICULTY) diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index ab0f1e572f1..b766897988d 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -1578,6 +1578,8 @@ void Guild::HandleAcceptMember(WorldSession* session) void Guild::HandleLeaveMember(WorldSession* session) { Player* player = session->GetPlayer(); + bool disband = false; + // If leader is leaving if (_IsLeader(player)) { @@ -1585,8 +1587,11 @@ void Guild::HandleLeaveMember(WorldSession* session) // Leader cannot leave if he is not the last member SendCommandResult(session, GUILD_COMMAND_QUIT, ERR_GUILD_LEADER_LEAVE); else + { // Guild is disbanded if leader leaves. Disband(); + disband = true; + } } else { @@ -1599,6 +1604,9 @@ void Guild::HandleLeaveMember(WorldSession* session) } sCalendarMgr->RemovePlayerGuildEventsAndSignups(player->GetGUID(), GetId()); + + if (disband) + delete this; } void Guild::HandleRemoveMember(WorldSession* session, std::string const& name) @@ -1754,6 +1762,9 @@ void Guild::HandleMemberDepositMoney(WorldSession* session, uint32 amount) bool Guild::HandleMemberWithdrawMoney(WorldSession* session, uint32 amount, bool repair) { + //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; @@ -1812,6 +1823,7 @@ void Guild::HandleDisband(WorldSession* session) { Disband(); TC_LOG_DEBUG(LOG_FILTER_GUILD, "Guild Successfully Disbanded"); + delete this; } } @@ -2272,7 +2284,7 @@ bool Guild::AddMember(uint64 guid, uint8 rankId) return true; } -void Guild::DeleteMember(uint64 guid, bool isDisbanding, bool isKicked) +void Guild::DeleteMember(uint64 guid, bool isDisbanding, bool isKicked, bool canDeleteGuild) { uint32 lowguid = GUID_LOPART(guid); Player* player = ObjectAccessor::FindPlayer(guid); @@ -2294,6 +2306,8 @@ void Guild::DeleteMember(uint64 guid, bool isDisbanding, bool isKicked) if (!newLeader) { Disband(); + if (canDeleteGuild) + delete this; return; } diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h index fab39f48fca..4d8987dbbf0 100644 --- a/src/server/game/Guilds/Guild.h +++ b/src/server/game/Guilds/Guild.h @@ -727,7 +727,7 @@ public: // Members // Adds member to guild. If rankId == GUILD_RANK_NONE, lowest rank is assigned. bool AddMember(uint64 guid, uint8 rankId = GUILD_RANK_NONE); - void DeleteMember(uint64 guid, bool isDisbanding = false, bool isKicked = false); + void DeleteMember(uint64 guid, bool isDisbanding = false, bool isKicked = false, bool canDeleteGuild = false); bool ChangeMemberRank(uint64 guid, uint8 newRank); // Bank diff --git a/src/server/game/Guilds/GuildMgr.cpp b/src/server/game/Guilds/GuildMgr.cpp index 3fc4e839651..1fcc6ec4e6e 100644 --- a/src/server/game/Guilds/GuildMgr.cpp +++ b/src/server/game/Guilds/GuildMgr.cpp @@ -378,20 +378,13 @@ void GuildMgr::LoadGuilds() TC_LOG_INFO(LOG_FILTER_GUILD, "Validating data of loaded guilds..."); { uint32 oldMSTime = getMSTime(); - std::set<Guild*> rm; // temporary storage to avoid modifying GuildStore with RemoveGuild() while iterating - for (GuildContainer::iterator itr = GuildStore.begin(); itr != GuildStore.end(); ++itr) + for (GuildContainer::iterator itr = GuildStore.begin(); itr != GuildStore.end();) { Guild* guild = itr->second; + ++itr; if (guild && !guild->Validate()) - rm.insert(guild); - } - - for (std::set<Guild*>::iterator itr = rm.begin(); itr != rm.end(); ++itr) - { - Guild* guild = *itr; - RemoveGuild(guild->GetId()); - delete guild; + delete guild; } TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Validated data of loaded guilds in %u ms", GetMSTimeDiffToNow(oldMSTime)); diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 6a7e6c5dedd..9e1dbc133a5 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -1918,7 +1918,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData) PreparedQueryResult result = CharacterDatabase.Query(stmt); if (result) if (Guild* guild = sGuildMgr->GetGuildById((result->Fetch()[0]).GetUInt32())) - guild->DeleteMember(MAKE_NEW_GUID(lowGuid, 0, HIGHGUID_PLAYER)); + guild->DeleteMember(MAKE_NEW_GUID(lowGuid, 0, HIGHGUID_PLAYER), false, false, true); } if (!HasPermission(RBAC_PERM_TWO_SIDE_ADD_FRIEND)) diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index 32cd7ee4725..0badd503c17 100644 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -630,7 +630,9 @@ void WorldSession::HandlePetRename(WorldPacket& recvData) } std::wstring wname; - Utf8toWStr(name, wname); + if (!Utf8toWStr(name, wname)) + return; + if (!ObjectMgr::CheckDeclinedNames(wname, declinedname)) { SendPetNameInvalid(PET_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME, name, &declinedname); diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp index ed30b59f0ec..c902eb850f6 100644 --- a/src/server/game/Movement/PathGenerator.cpp +++ b/src/server/game/Movement/PathGenerator.cpp @@ -548,7 +548,9 @@ void PathGenerator::UpdateFilter() NavTerrain PathGenerator::GetNavTerrain(float x, float y, float z) { LiquidData data; - _sourceUnit->GetBaseMap()->getLiquidStatus(x, y, z, MAP_ALL_LIQUIDS, &data); + ZLiquidStatus liquidStatus = _sourceUnit->GetBaseMap()->getLiquidStatus(x, y, z, MAP_ALL_LIQUIDS, &data); + if (liquidStatus == LIQUID_MAP_NO_WATER) + return NAV_GROUND; switch (data.type_flags) { diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp index 3456041ddb2..31323a66ba9 100644 --- a/src/server/game/Scripting/ScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptLoader.cpp @@ -59,6 +59,7 @@ void AddSC_event_commandscript(); void AddSC_gm_commandscript(); void AddSC_go_commandscript(); void AddSC_gobject_commandscript(); +void AddSC_group_commandscript(); void AddSC_guild_commandscript(); void AddSC_honor_commandscript(); void AddSC_instance_commandscript(); @@ -71,10 +72,12 @@ void AddSC_misc_commandscript(); void AddSC_mmaps_commandscript(); void AddSC_modify_commandscript(); void AddSC_npc_commandscript(); +void AddSC_pet_commandscript(); void AddSC_quest_commandscript(); void AddSC_rbac_commandscript(); void AddSC_reload_commandscript(); void AddSC_reset_commandscript(); +void AddSC_send_commandscript(); void AddSC_server_commandscript(); void AddSC_tele_commandscript(); void AddSC_ticket_commandscript(); @@ -740,6 +743,7 @@ void AddCommandScripts() AddSC_gm_commandscript(); AddSC_go_commandscript(); AddSC_gobject_commandscript(); + AddSC_group_commandscript(); AddSC_guild_commandscript(); AddSC_honor_commandscript(); AddSC_instance_commandscript(); @@ -753,9 +757,11 @@ void AddCommandScripts() AddSC_modify_commandscript(); AddSC_npc_commandscript(); AddSC_quest_commandscript(); + AddSC_pet_commandscript(); AddSC_rbac_commandscript(); AddSC_reload_commandscript(); AddSC_reset_commandscript(); + AddSC_send_commandscript(); AddSC_server_commandscript(); AddSC_tele_commandscript(); AddSC_ticket_commandscript(); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 3d55d9de16f..4b73af1b681 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1254,9 +1254,9 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const else { if (spellId) - target->RemoveAurasDueToSpell(spellId); + target->RemoveOwnedAura(spellId, target->GetGUID()); if (spellId2) - target->RemoveAurasDueToSpell(spellId2); + target->RemoveOwnedAura(spellId2, target->GetGUID()); // Improved Barkskin - apply/remove armor bonus due to shapeshift if (Player* player=target->ToPlayer()) @@ -5113,7 +5113,7 @@ void AuraEffect::HandleAuraLinked(AuraApplication const* aurApp, uint8 mode, boo { if (apply) { - Unit* caster = triggeredSpellInfo->NeedsToBeTriggeredByCaster() ? GetCaster() : target; + Unit* caster = triggeredSpellInfo->NeedsToBeTriggeredByCaster(m_spellInfo) ? GetCaster() : target; if (!caster) return; @@ -5125,13 +5125,13 @@ void AuraEffect::HandleAuraLinked(AuraApplication const* aurApp, uint8 mode, boo } else { - uint64 casterGUID = triggeredSpellInfo->NeedsToBeTriggeredByCaster() ? GetCasterGUID() : target->GetGUID(); + uint64 casterGUID = triggeredSpellInfo->NeedsToBeTriggeredByCaster(m_spellInfo) ? GetCasterGUID() : target->GetGUID(); target->RemoveAura(triggeredSpellId, casterGUID, 0, aurApp->GetRemoveMode()); } } else if (mode & AURA_EFFECT_HANDLE_REAPPLY && apply) { - uint64 casterGUID = triggeredSpellInfo->NeedsToBeTriggeredByCaster() ? GetCasterGUID() : target->GetGUID(); + uint64 casterGUID = triggeredSpellInfo->NeedsToBeTriggeredByCaster(m_spellInfo) ? GetCasterGUID() : target->GetGUID(); // change the stack amount to be equal to stack amount of our aura if (Aura* triggeredAura = target->GetAura(triggeredSpellId, casterGUID)) triggeredAura->ModStackAmount(GetBase()->GetStackAmount() - triggeredAura->GetStackAmount()); @@ -5733,7 +5733,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster) if (triggeredSpellInfo) { - if (Unit* triggerCaster = triggeredSpellInfo->NeedsToBeTriggeredByCaster() ? caster : target) + if (Unit* triggerCaster = triggeredSpellInfo->NeedsToBeTriggeredByCaster(m_spellInfo) ? caster : target) { triggerCaster->CastSpell(target, triggeredSpellInfo, true, NULL, this); TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id); @@ -5753,7 +5753,7 @@ void AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick(Unit* target, Unit* uint32 triggerSpellId = GetSpellInfo()->Effects[m_effIndex].TriggerSpell; if (SpellInfo const* triggeredSpellInfo = sSpellMgr->GetSpellInfo(triggerSpellId)) { - if (Unit* triggerCaster = triggeredSpellInfo->NeedsToBeTriggeredByCaster() ? caster : target) + if (Unit* triggerCaster = triggeredSpellInfo->NeedsToBeTriggeredByCaster(m_spellInfo) ? caster : target) { int32 basepoints = GetAmount(); triggerCaster->CastCustomSpell(target, triggerSpellId, &basepoints, &basepoints, &basepoints, true, 0, this); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 91a5c35955a..a8d4c85656b 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -917,13 +917,13 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex) SpellCastTargets targets; if (effectHandleMode == SPELL_EFFECT_HANDLE_LAUNCH_TARGET) { - if (!spellInfo->NeedsToBeTriggeredByCaster()) + if (!spellInfo->NeedsToBeTriggeredByCaster(m_spellInfo)) return; targets.SetUnitTarget(unitTarget); } else //if (effectHandleMode == SPELL_EFFECT_HANDLE_LAUNCH) { - if (spellInfo->NeedsToBeTriggeredByCaster() && (m_spellInfo->Effects[effIndex].GetProvidedTargetMask() & TARGET_FLAG_UNIT_MASK)) + if (spellInfo->NeedsToBeTriggeredByCaster(m_spellInfo) && (m_spellInfo->Effects[effIndex].GetProvidedTargetMask() & TARGET_FLAG_UNIT_MASK)) return; if (spellInfo->GetExplicitTargetMask() & TARGET_FLAG_DEST_LOCATION) @@ -969,13 +969,13 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex) SpellCastTargets targets; if (effectHandleMode == SPELL_EFFECT_HANDLE_HIT_TARGET) { - if (!spellInfo->NeedsToBeTriggeredByCaster()) + if (!spellInfo->NeedsToBeTriggeredByCaster(m_spellInfo)) return; targets.SetUnitTarget(unitTarget); } else //if (effectHandleMode == SPELL_EFFECT_HANDLE_HIT) { - if (spellInfo->NeedsToBeTriggeredByCaster() && (m_spellInfo->Effects[effIndex].GetProvidedTargetMask() & TARGET_FLAG_UNIT_MASK)) + if (spellInfo->NeedsToBeTriggeredByCaster(m_spellInfo) && (m_spellInfo->Effects[effIndex].GetProvidedTargetMask() & TARGET_FLAG_UNIT_MASK)) return; if (spellInfo->GetExplicitTargetMask() & TARGET_FLAG_DEST_LOCATION) @@ -1133,29 +1133,6 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/) if (!unitTarget || unitTarget->IsInFlight()) return; - // Pre effects - switch (m_spellInfo->Id) - { - case 66550: // teleports outside (Isle of Conquest) - if (Player* target = unitTarget->ToPlayer()) - { - if (target->GetTeamId() == TEAM_ALLIANCE) - m_targets.SetDst(442.24f, -835.25f, 44.30f, 0.06f, 628); - else - m_targets.SetDst(1120.43f, -762.11f, 47.92f, 2.94f, 628); - } - break; - case 66551: // teleports inside (Isle of Conquest) - if (Player* target = unitTarget->ToPlayer()) - { - if (target->GetTeamId() == TEAM_ALLIANCE) - m_targets.SetDst(389.57f, -832.38f, 48.65f, 3.00f, 628); - else - m_targets.SetDst(1174.85f, -763.24f, 48.72f, 6.26f, 628); - } - break; - } - // If not exist data for dest location - return if (!m_targets.HasDst()) { @@ -3902,15 +3879,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) npc->LoadEquipment(); return; } - // Emblazon Runeblade - case 51770: - { - if (!m_originalCaster) - return; - - m_originalCaster->CastSpell(m_originalCaster, damage, false); - break; - } // Deathbolt from Thalgran Blightbringer // reflected by Freya's Ward // Retribution by Sevenfold Retribution @@ -3985,26 +3953,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) return; } - case 58941: // Rock Shards - if (unitTarget && m_originalCaster) - { - for (uint32 i = 0; i < 3; ++i) - { - m_originalCaster->CastSpell(unitTarget, 58689, true); - m_originalCaster->CastSpell(unitTarget, 58692, true); - } - if (((InstanceMap*)m_originalCaster->GetMap())->GetDifficulty() == REGULAR_DIFFICULTY) - { - m_originalCaster->CastSpell(unitTarget, 58695, true); - m_originalCaster->CastSpell(unitTarget, 58696, true); - } - else - { - m_originalCaster->CastSpell(unitTarget, 60883, true); - m_originalCaster->CastSpell(unitTarget, 60884, true); - } - } - return; case 58983: // Big Blizzard Bear { if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) @@ -5656,7 +5604,7 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex) // Blood Tap if (m_spellInfo->Id == 45529 && count > 0) { - for (uint32 l = 0; l < MAX_RUNES && count > 0; ++l) + for (uint32 l = 0; l + 1 < MAX_RUNES && count > 0; ++l) { // Check if both runes are on cd as that is the only time when this needs to come into effect if ((player->GetRuneCooldown(l) && player->GetCurrentRune(l) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB)) && (player->GetRuneCooldown(l+1) && player->GetCurrentRune(l+1) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB))) diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 04437b82f2d..a0e1ec065cc 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1004,14 +1004,12 @@ bool SpellInfo::NeedsExplicitUnitTarget() const return GetExplicitTargetMask() & TARGET_FLAG_UNIT_MASK; } -bool SpellInfo::NeedsToBeTriggeredByCaster() const +bool SpellInfo::NeedsToBeTriggeredByCaster(SpellInfo const* triggeringSpell) const { - if (AttributesCu & SPELL_ATTR0_CU_TRIGGERED_BY_CASTER) - return true; - if (NeedsExplicitUnitTarget()) return true; + /* for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) { if (Effects[i].IsEffect()) @@ -1021,6 +1019,23 @@ bool SpellInfo::NeedsToBeTriggeredByCaster() const return true; } } + */ + + if (triggeringSpell->IsChanneled()) + { + uint32 mask = 0; + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) + { + if (Effects[i].TargetA.GetTarget() != TARGET_UNIT_CASTER && Effects[i].TargetA.GetTarget() != TARGET_DEST_CASTER + && Effects[i].TargetB.GetTarget() != TARGET_UNIT_CASTER && Effects[i].TargetB.GetTarget() != TARGET_DEST_CASTER) + { + mask |= Effects[i].GetProvidedTargetMask(); + } + } + + if (mask & TARGET_FLAG_UNIT_MASK) + return true; + } return false; } diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h index 6acde5afa74..c2ca938d26f 100644 --- a/src/server/game/Spells/SpellInfo.h +++ b/src/server/game/Spells/SpellInfo.h @@ -176,7 +176,6 @@ enum SpellCustomAttributes SPELL_ATTR0_CU_CONE_LINE = 0x00000004, SPELL_ATTR0_CU_SHARE_DAMAGE = 0x00000008, SPELL_ATTR0_CU_NO_INITIAL_THREAT = 0x00000010, - SPELL_ATTR0_CU_TRIGGERED_BY_CASTER = 0x00000020, // @todo: need generic solution, some triggered spells will be casted by target instead of caster SPELL_ATTR0_CU_AURA_CC = 0x00000040, SPELL_ATTR0_CU_DIRECT_DAMAGE = 0x00000100, SPELL_ATTR0_CU_CHARGE = 0x00000200, @@ -386,7 +385,7 @@ public: bool IsAffectingArea() const; bool IsTargetingArea() const; bool NeedsExplicitUnitTarget() const; - bool NeedsToBeTriggeredByCaster() const; + bool NeedsToBeTriggeredByCaster(SpellInfo const* triggeringSpell) const; bool IsPassive() const; bool IsAutocastable() const; diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 5d471492553..29a869cf458 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -2974,9 +2974,6 @@ void SpellMgr::LoadSpellInfoCustomAttributes() case 72293: // Mark of the Fallen Champion (Deathbringer Saurfang) spellInfo->AttributesCu |= SPELL_ATTR0_CU_NEGATIVE_EFF0; break; - case 38729: // Rod of Purification - spellInfo->AttributesCu |= SPELL_ATTR0_CU_TRIGGERED_BY_CASTER; - break; default: break; } @@ -3750,6 +3747,13 @@ void SpellMgr::LoadSpellInfoCorrections() // Crashes client on pressing ESC spellInfo->AttributesEx4 &= ~SPELL_ATTR4_TRIGGERED; break; + // ISLE OF CONQUEST SPELLS + // + case 66551: // Teleport + spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(13); // 50000yd + break; + // ENDOF ISLE OF CONQUEST SPELLS + // default: break; } diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp index 38d64eedd5c..0457dc7e033 100644 --- a/src/server/game/Weather/Weather.cpp +++ b/src/server/game/Weather/Weather.cpp @@ -93,8 +93,9 @@ bool Weather::ReGenerate() //78 days between January 1st and March 20nd; 365/4=91 days by season // season source http://aa.usno.navy.mil/data/docs/EarthSeasons.html time_t gtime = sWorld->GetGameTime(); - struct tm * ltime = localtime(>ime); - uint32 season = ((ltime->tm_yday - 78 + 365)/91)%4; + struct tm ltime; + ACE_OS::localtime_r(>ime, <ime); + uint32 season = ((ltime.tm_yday - 78 + 365)/91)%4; static char const* seasonName[WEATHER_SEASONS] = { "spring", "summer", "fall", "winter" }; diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index cf6ad3f9886..9e7b1f2f2b5 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1195,9 +1195,20 @@ void World::LoadConfigSettings(bool reload) // Accountpassword Secruity m_int_configs[CONFIG_ACC_PASSCHANGESEC] = sConfigMgr->GetIntDefault("Account.PasswordChangeSecurity", 0); + // Random Battleground Rewards + m_int_configs[CONFIG_BG_REWARD_WINNER_HONOR_FIRST] = sConfigMgr->GetIntDefault("Battleground.RewardWinnerHonorFirst", 30); + m_int_configs[CONFIG_BG_REWARD_WINNER_ARENA_FIRST] = sConfigMgr->GetIntDefault("Battleground.RewardWinnerArenaFirst", 25); + m_int_configs[CONFIG_BG_REWARD_WINNER_HONOR_LAST] = sConfigMgr->GetIntDefault("Battleground.RewardWinnerHonorLast", 15); + m_int_configs[CONFIG_BG_REWARD_WINNER_ARENA_LAST] = sConfigMgr->GetIntDefault("Battleground.RewardWinnerArenaLast", 0); + m_int_configs[CONFIG_BG_REWARD_LOSER_HONOR_FIRST] = sConfigMgr->GetIntDefault("Battleground.RewardLoserHonorFirst", 5); + m_int_configs[CONFIG_BG_REWARD_LOSER_HONOR_LAST] = sConfigMgr->GetIntDefault("Battleground.RewardLoserHonorLast", 5); + // Max instances per hour m_int_configs[CONFIG_MAX_INSTANCES_PER_HOUR] = sConfigMgr->GetIntDefault("AccountInstancesPerHour", 5); + // Anounce reset of instance to whole party + m_bool_configs[CONFIG_INSTANCES_RESET_ANNOUNCE] = sConfigMgr->GetBoolDefault("InstancesResetAnnounce", false); + // AutoBroadcast m_bool_configs[CONFIG_AUTOBROADCAST] = sConfigMgr->GetBoolDefault("AutoBroadcast.On", false); m_int_configs[CONFIG_AUTOBROADCAST_CENTER] = sConfigMgr->GetIntDefault("AutoBroadcast.Center", 0); @@ -1730,7 +1741,9 @@ void World::SetInitialWorldSettings() //mailtimer is increased when updating auctions //one second is 1000 -(tested on win system) /// @todo Get rid of magic numbers - mail_timer = ((((localtime(&m_gameTime)->tm_hour + 20) % 24)* HOUR * IN_MILLISECONDS) / m_timers[WUPDATE_AUCTIONS].GetInterval()); + tm localTm; + ACE_OS::localtime_r(&m_gameTime, &localTm); + mail_timer = ((((localTm.tm_hour + 20) % 24)* HOUR * IN_MILLISECONDS) / m_timers[WUPDATE_AUCTIONS].GetInterval()); //1440 mail_timer_expires = ((DAY * IN_MILLISECONDS) / (m_timers[WUPDATE_AUCTIONS].GetInterval())); TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Mail timer set to: " UI64FMTD ", mail return is called every " UI64FMTD " minutes", uint64(mail_timer), uint64(mail_timer_expires)); @@ -2769,7 +2782,8 @@ void World::InitDailyQuestResetTime() // client built-in time for reset is 6:00 AM // FIX ME: client not show day start time time_t curTime = time(NULL); - tm localTm = *localtime(&curTime); + tm localTm; + ACE_OS::localtime_r(&curTime, &localTm); localTm.tm_hour = 6; localTm.tm_min = 0; localTm.tm_sec = 0; @@ -2802,7 +2816,8 @@ void World::InitRandomBGResetTime() // generate time by config time_t curTime = time(NULL); - tm localTm = *localtime(&curTime); + tm localTm; + ACE_OS::localtime_r(&curTime, &localTm); localTm.tm_hour = getIntConfig(CONFIG_RANDOM_BG_RESET_HOUR); localTm.tm_min = 0; localTm.tm_sec = 0; @@ -2829,7 +2844,8 @@ void World::InitGuildResetTime() // generate time by config time_t curTime = time(NULL); - tm localTm = *localtime(&curTime); + tm localTm; + ACE_OS::localtime_r(&curTime, &localTm); localTm.tm_hour = getIntConfig(CONFIG_GUILD_RESET_HOUR); localTm.tm_min = 0; localTm.tm_sec = 0; @@ -2913,7 +2929,8 @@ void World::ResetMonthlyQuests() // generate time time_t curTime = time(NULL); - tm localTm = *localtime(&curTime); + tm localTm; + ACE_OS::localtime_r(&curTime, &localTm); int month = localTm.tm_mon; int year = localTm.tm_year; diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index 907491437c4..9435fa8aa94 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -160,6 +160,7 @@ enum WorldBoolConfigs CONFIG_UI_QUESTLEVELS_IN_DIALOGS, // Should we add quest levels to the title in the NPC dialogs? CONFIG_EVENT_ANNOUNCE, CONFIG_STATS_LIMITS_ENABLE, + CONFIG_INSTANCES_RESET_ANNOUNCE, BOOL_CONFIG_VALUE_COUNT }; @@ -330,6 +331,12 @@ enum WorldIntConfigs CONFIG_PACKET_SPOOF_BANMODE, CONFIG_PACKET_SPOOF_BANDURATION, CONFIG_ACC_PASSCHANGESEC, + CONFIG_BG_REWARD_WINNER_HONOR_FIRST, + CONFIG_BG_REWARD_WINNER_ARENA_FIRST, + CONFIG_BG_REWARD_WINNER_HONOR_LAST, + CONFIG_BG_REWARD_WINNER_ARENA_LAST, + CONFIG_BG_REWARD_LOSER_HONOR_FIRST, + CONFIG_BG_REWARD_LOSER_HONOR_LAST, INT_CONFIG_VALUE_COUNT }; diff --git a/src/server/scripts/Commands/CMakeLists.txt b/src/server/scripts/Commands/CMakeLists.txt index ce31fa1f4d3..c38789ed90a 100644 --- a/src/server/scripts/Commands/CMakeLists.txt +++ b/src/server/scripts/Commands/CMakeLists.txt @@ -8,109 +8,11 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +file(GLOB_RECURSE sources_Commands Commands/*.cpp Commands/*.h) + set(scripts_STAT_SRCS ${scripts_STAT_SRCS} - Commands/cs_account.cpp - Commands/cs_achievement.cpp - Commands/cs_arena.cpp - Commands/cs_ban.cpp - Commands/cs_bf.cpp - Commands/cs_cast.cpp - Commands/cs_character.cpp - Commands/cs_cheat.cpp - Commands/cs_debug.cpp - Commands/cs_deserter.cpp - Commands/cs_disable.cpp - Commands/cs_event.cpp - Commands/cs_gm.cpp - Commands/cs_go.cpp - Commands/cs_gobject.cpp - Commands/cs_guild.cpp - Commands/cs_honor.cpp - Commands/cs_instance.cpp - Commands/cs_learn.cpp - Commands/cs_lfg.cpp - Commands/cs_list.cpp - Commands/cs_lookup.cpp - Commands/cs_message.cpp - Commands/cs_misc.cpp - Commands/cs_modify.cpp - Commands/cs_npc.cpp - Commands/cs_quest.cpp - Commands/cs_rbac.cpp - Commands/cs_reload.cpp - Commands/cs_reset.cpp - Commands/cs_tele.cpp - Commands/cs_ticket.cpp - Commands/cs_server.cpp - Commands/cs_titles.cpp - Commands/cs_wp.cpp - Commands/cs_mmaps.cpp -# Commands/cs_pdump.cpp -# Commands/cs_channel.cpp -# Commands/cs_pet.cpp -# Commands/cs_aura.cpp -# Commands/cs_unaura.cpp -# Commands/cs_nameannounce.cpp -# Commands/cs_gmnameannounce.cpp -# Commands/cs_announce.cpp -# Commands/cs_gmannounce.cpp -# Commands/cs_notify.cpp -# Commands/cs_gmnotify.cpp -# Commands/cs_appear.cpp -# Commands/cs_summon.cpp -# Commands/cs_groupsummon.cpp -# Commands/cs_commands.cpp -# Commands/cs_demorph.cpp -# Commands/cs_die.cpp -# Commands/cs_revive.cpp -# Commands/cs_dismount.cpp -# Commands/cs_guid.cpp -# Commands/cs_help.cpp -# Commands/cs_itemmove.cpp -# Commands/cs_cooldown.cpp -# Commands/cs_unlearn.cpp -# Commands/cs_distance.cpp -# Commands/cs_recall.cpp -# Commands/cs_save.cpp -# Commands/cs_saveall.cpp -# Commands/cs_kick.cpp -# Commands/cs_start.cpp -# Commands/cs_taxicheat.cpp -# Commands/cs_linkgrave.cpp -# Commands/cs_neargrave.cpp -# Commands/cs_explorecheat.cpp -# Commands/cs_hover.cpp -# Commands/cs_levelup.cpp -# Commands/cs_showarea.cpp -# Commands/cs_hidearea.cpp -# Commands/cs_additem.cpp -# Commands/cs_additemset.cpp -# Commands/cs_bank.cpp -# Commands/cs_wchange.cpp -# Commands/cs_maxskill.cpp -# Commands/cs_setskill.cpp -# Commands/cs_whispers.cpp -# Commands/cs_pinfo.cpp -# Commands/cs_respawn.cpp -# Commands/cs_send.cpp -# Commands/cs_mute.cpp -# Commands/cs_unmute.cpp -# Commands/cs_movegens.cpp -# Commands/cs_cometome.cpp -# Commands/cs_damage.cpp -# Commands/cs_combatstop.cpp -# Commands/cs_flusharenapoints.cpp -# Commands/cs_repairitems.cpp -# Commands/cs_waterwalk.cpp -# Commands/cs_freeze.cpp -# Commands/cs_unfreeze.cpp -# Commands/cs_listfreeze.cpp -# Commands/cs_possess.cpp -# Commands/cs_unpossess.cpp -# Commands/cs_bindsight.cpp -# Commands/cs_unbindsight.cpp -# Commands/cs_playall.cpp + ${sources_Commands} ) message(" -> Prepared: Commands") diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index ada26e69c14..f0d27104035 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -362,9 +362,9 @@ public: return false; } - char* oldEmail = strtok(NULL, " "); + char* oldEmail = strtok((char*)args, " "); char* password = strtok(NULL, " "); - char* email = strtok((char*)args, " "); + char* email = strtok(NULL, " "); char* emailConfirmation = strtok(NULL, " "); if (!oldEmail || !password || !email || !emailConfirmation) @@ -438,6 +438,7 @@ public: static bool HandleAccountPasswordCommand(ChatHandler* handler, char const* args) { + // If no args are given at all, we can return false right away. if (!*args) { handler->SendSysMessage(LANG_CMD_SYNTAX); @@ -445,13 +446,18 @@ public: return false; } + // First, we check config. What security type (sec type) is it ? Depending on it, the command branches out uint32 pwConfig = sWorld->getIntConfig(CONFIG_ACC_PASSCHANGESEC); // 0 - PW_NONE, 1 - PW_EMAIL, 2 - PW_RBAC - char* oldPassword = strtok((char*)args, " "); - char* newPassword = strtok(NULL, " "); - char* passwordConfirmation = strtok(NULL, " "); - char* emailConfirmation = strtok(NULL, " "); + // 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. + //Is any of those variables missing for any reason ? We return false. if (!oldPassword || !newPassword || !passwordConfirmation) { handler->SendSysMessage(LANG_CMD_SYNTAX); @@ -459,16 +465,7 @@ public: return false; } - if ((pwConfig == PW_EMAIL || (pwConfig == PW_RBAC && handler->HasPermission(RBAC_PERM_EMAIL_CONFIRM_FOR_PASS_CHANGE))) && !emailConfirmation) - { - handler->SendSysMessage(LANG_CMD_SYNTAX); - handler->SetSentErrorMessage(true); - TC_LOG_INFO(LOG_FILTER_CHARACTER, "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change password, but entered no email at all. Has Perm: [%s]", - handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(), - handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(), - handler->HasPermission(RBAC_PERM_EMAIL_CONFIRM_FOR_PASS_CHANGE) ? "Yes" : "No"); - } - + // We compare the old, saved password to the entered old password - no chance for the unauthorized. if (!AccountMgr::CheckPassword(handler->GetSession()->GetAccountId(), std::string(oldPassword))) { handler->SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD); @@ -479,8 +476,9 @@ public: return false; } - if ((pwConfig == PW_EMAIL || (pwConfig == PW_RBAC && handler->HasPermission(RBAC_PERM_EMAIL_CONFIRM_FOR_PASS_CHANGE))) // Either PW_EMAIL or PW_RBAC with the Permission - && !AccountMgr::CheckEmail(handler->GetSession()->GetAccountId(), std::string(emailConfirmation))) + // This compares the old, current email to the entered email - however, only... + if ((pwConfig == PW_EMAIL || (pwConfig == PW_RBAC && handler->HasPermission(RBAC_PERM_EMAIL_CONFIRM_FOR_PASS_CHANGE))) // ...if either PW_EMAIL or PW_RBAC with the Permission is active... + && !AccountMgr::CheckEmail(handler->GetSession()->GetAccountId(), std::string(emailConfirmation))) // ... and returns false if the comparison fails. { handler->SendSysMessage(LANG_COMMAND_WRONGEMAIL); handler->SetSentErrorMessage(true); @@ -488,8 +486,10 @@ public: handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(), handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(), emailConfirmation); + return false; } + // Making sure that newly entered password is correctly entered. if (strcmp(newPassword, passwordConfirmation) != 0) { handler->SendSysMessage(LANG_NEW_PASSWORDS_NOT_MATCH); @@ -497,6 +497,7 @@ public: return false; } + // Changes password and prints result. AccountOpResult result = AccountMgr::ChangePassword(handler->GetSession()->GetAccountId(), std::string(newPassword)); switch (result) { diff --git a/src/server/scripts/Commands/cs_ban.cpp b/src/server/scripts/Commands/cs_ban.cpp index b12e058a78f..dd6e104f135 100644 --- a/src/server/scripts/Commands/cs_ban.cpp +++ b/src/server/scripts/Commands/cs_ban.cpp @@ -436,21 +436,23 @@ public: do { time_t timeBan = time_t(fields2[0].GetUInt32()); - tm* tmBan = localtime(&timeBan); + tm tmBan; + ACE_OS::localtime_r(&timeBan, &tmBan); if (fields2[0].GetUInt32() == fields2[1].GetUInt32()) { handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|", - accountName.c_str(), tmBan->tm_year%100, tmBan->tm_mon+1, tmBan->tm_mday, tmBan->tm_hour, tmBan->tm_min, + accountName.c_str(), tmBan.tm_year%100, tmBan.tm_mon+1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min, fields2[2].GetCString(), fields2[3].GetCString()); } else { time_t timeUnban = time_t(fields2[1].GetUInt32()); - tm* tmUnban = localtime(&timeUnban); + tm tmUnban; + ACE_OS::localtime_r(&timeUnban, &tmUnban); handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|", - accountName.c_str(), tmBan->tm_year%100, tmBan->tm_mon+1, tmBan->tm_mday, tmBan->tm_hour, tmBan->tm_min, - tmUnban->tm_year%100, tmUnban->tm_mon+1, tmUnban->tm_mday, tmUnban->tm_hour, tmUnban->tm_min, + accountName.c_str(), tmBan.tm_year%100, tmBan.tm_mon+1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min, + tmUnban.tm_year%100, tmUnban.tm_mon+1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min, fields2[2].GetCString(), fields2[3].GetCString()); } } @@ -523,21 +525,23 @@ public: do { time_t timeBan = time_t(banFields[0].GetUInt32()); - tm* tmBan = localtime(&timeBan); + tm tmBan; + ACE_OS::localtime_r(&timeBan, &tmBan); if (banFields[0].GetUInt32() == banFields[1].GetUInt32()) { handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|", - char_name.c_str(), tmBan->tm_year%100, tmBan->tm_mon+1, tmBan->tm_mday, tmBan->tm_hour, tmBan->tm_min, + char_name.c_str(), tmBan.tm_year%100, tmBan.tm_mon+1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min, banFields[2].GetCString(), banFields[3].GetCString()); } else { time_t timeUnban = time_t(banFields[1].GetUInt32()); - tm* tmUnban = localtime(&timeUnban); + tm tmUnban; + ACE_OS::localtime_r(&timeUnban, &tmUnban); handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|", - char_name.c_str(), tmBan->tm_year%100, tmBan->tm_mon+1, tmBan->tm_mday, tmBan->tm_hour, tmBan->tm_min, - tmUnban->tm_year%100, tmUnban->tm_mon+1, tmUnban->tm_mday, tmUnban->tm_hour, tmUnban->tm_min, + char_name.c_str(), tmBan.tm_year%100, tmBan.tm_mon+1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min, + tmUnban.tm_year%100, tmUnban.tm_mon+1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min, banFields[2].GetCString(), banFields[3].GetCString()); } } @@ -602,20 +606,22 @@ public: handler->SendSysMessage("-------------------------------------------------------------------------------"); Field* fields = result->Fetch(); time_t timeBan = time_t(fields[1].GetUInt32()); - tm* tmBan = localtime(&timeBan); + tm tmBan; + ACE_OS::localtime_r(&timeBan, &tmBan); if (fields[1].GetUInt32() == fields[2].GetUInt32()) { handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|", - fields[0].GetCString(), tmBan->tm_year%100, tmBan->tm_mon+1, tmBan->tm_mday, tmBan->tm_hour, tmBan->tm_min, + fields[0].GetCString(), tmBan.tm_year%100, tmBan.tm_mon+1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min, fields[3].GetCString(), fields[4].GetCString()); } else { time_t timeUnban = time_t(fields[2].GetUInt32()); - tm* tmUnban = localtime(&timeUnban); + tm tmUnban; + ACE_OS::localtime_r(&timeUnban, &tmUnban); handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|", - fields[0].GetCString(), tmBan->tm_year%100, tmBan->tm_mon+1, tmBan->tm_mday, tmBan->tm_hour, tmBan->tm_min, - tmUnban->tm_year%100, tmUnban->tm_mon+1, tmUnban->tm_mday, tmUnban->tm_hour, tmUnban->tm_min, + fields[0].GetCString(), tmBan.tm_year%100, tmBan.tm_mon+1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min, + tmUnban.tm_year%100, tmUnban.tm_mon+1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min, fields[3].GetCString(), fields[4].GetCString()); } } diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index df80ba3c797..c13e9d08172 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -264,7 +264,7 @@ public: unit = player; std::ifstream ifs("opcode.txt"); - if (ifs.bad()) + if (ifs.fail()) return false; // remove comments from file diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp new file mode 100644 index 00000000000..784ff216c41 --- /dev/null +++ b/src/server/scripts/Commands/cs_group.cpp @@ -0,0 +1,338 @@ +/* + * Copyright (C) 2008-2013 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 "Chat.h" +#include "Language.h" +#include "LFG.h" +#include "Player.h" +#include "ObjectMgr.h" +#include "GroupMgr.h" +#include "ScriptMgr.h" + +class group_commandscript : public CommandScript +{ +public: + group_commandscript() : CommandScript("group_commandscript") { } + + ChatCommand* GetCommands() const OVERRIDE + { + static ChatCommand groupCommandTable[] = + { + { "leader", RBAC_PERM_COMMAND_GROUP_LEADER, false, &HandleGroupLeaderCommand, "", NULL }, + { "disband", RBAC_PERM_COMMAND_GROUP_DISBAND, false, &HandleGroupDisbandCommand, "", NULL }, + { "remove", RBAC_PERM_COMMAND_GROUP_REMOVE, false, &HandleGroupRemoveCommand, "", NULL }, + { "join", RBAC_PERM_COMMAND_GROUP_JOIN, false, &HandleGroupJoinCommand, "", NULL }, + { "list", RBAC_PERM_COMMAND_GROUP_LIST, false, &HandleGroupListCommand, "", NULL }, + { "summon", RBAC_PERM_COMMAND_GROUP_SUMMON, false, &HandleGroupSummonCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } + }; + + static ChatCommand commandTable[] = + { + { "group", RBAC_PERM_COMMAND_GROUP, false, NULL, "", groupCommandTable }, + { NULL, 0, false, NULL, "", NULL } + }; + return commandTable; + } + + // Summon group of player + static bool HandleGroupSummonCommand(ChatHandler* handler, char const* args) + { + Player* target; + if (!handler->extractPlayerTarget((char*)args, &target)) + return false; + + // check online security + if (handler->HasLowerSecurity(target, 0)) + return false; + + Group* group = target->GetGroup(); + + std::string nameLink = handler->GetNameLink(target); + + if (!group) + { + handler->PSendSysMessage(LANG_NOT_IN_GROUP, nameLink.c_str()); + handler->SetSentErrorMessage(true); + return false; + } + + Player* gmPlayer = handler->GetSession()->GetPlayer(); + Group* gmGroup = gmPlayer->GetGroup(); + Map* gmMap = gmPlayer->GetMap(); + bool toInstance = gmMap->Instanceable(); + + // we are in instance, and can summon only player in our group with us as lead + if (toInstance && ( + !gmGroup || group->GetLeaderGUID() != gmPlayer->GetGUID() || + gmGroup->GetLeaderGUID() != gmPlayer->GetGUID())) + // the last check is a bit excessive, but let it be, just in case + { + handler->SendSysMessage(LANG_CANNOT_SUMMON_TO_INST); + handler->SetSentErrorMessage(true); + return false; + } + + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) + { + Player* player = itr->GetSource(); + + if (!player || player == gmPlayer || !player->GetSession()) + continue; + + // check online security + if (handler->HasLowerSecurity(player, 0)) + return false; + + std::string plNameLink = handler->GetNameLink(player); + + if (player->IsBeingTeleported()) + { + handler->PSendSysMessage(LANG_IS_TELEPORTED, plNameLink.c_str()); + handler->SetSentErrorMessage(true); + return false; + } + + if (toInstance) + { + Map* playerMap = player->GetMap(); + + if (playerMap->Instanceable() && playerMap->GetInstanceId() != gmMap->GetInstanceId()) + { + // cannot summon from instance to instance + handler->PSendSysMessage(LANG_CANNOT_SUMMON_TO_INST, plNameLink.c_str()); + handler->SetSentErrorMessage(true); + return false; + } + } + + handler->PSendSysMessage(LANG_SUMMONING, plNameLink.c_str(), ""); + if (handler->needReportToTarget(player)) + ChatHandler(player->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->GetNameLink().c_str()); + + // stop flight if need + if (player->IsInFlight()) + { + player->GetMotionMaster()->MovementExpired(); + player->CleanupAfterTaxiFlight(); + } + // save only in non-flight case + else + player->SaveRecallPosition(); + + // before GM + float x, y, z; + gmPlayer->GetClosePoint(x, y, z, player->GetObjectSize()); + player->TeleportTo(gmPlayer->GetMapId(), x, y, z, player->GetOrientation()); + } + + return true; + } + + static bool HandleGroupLeaderCommand(ChatHandler* handler, char const* args) + { + Player* player = NULL; + Group* group = NULL; + uint64 guid = 0; + char* nameStr = strtok((char*)args, " "); + + if (!handler->GetPlayerGroupAndGUIDByName(nameStr, player, group, guid)) + return false; + + if (!group) + { + handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, player->GetName().c_str()); + handler->SetSentErrorMessage(true); + return false; + } + + if (group->GetLeaderGUID() != guid) + { + group->ChangeLeader(guid); + group->SendUpdate(); + } + + return true; + } + + static bool HandleGroupDisbandCommand(ChatHandler* handler, char const* args) + { + Player* player = NULL; + Group* group = NULL; + uint64 guid = 0; + char* nameStr = strtok((char*)args, " "); + + if (!handler->GetPlayerGroupAndGUIDByName(nameStr, player, group, guid)) + return false; + + if (!group) + { + handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, player->GetName().c_str()); + handler->SetSentErrorMessage(true); + return false; + } + + group->Disband(); + return true; + } + + static bool HandleGroupRemoveCommand(ChatHandler* handler, char const* args) + { + Player* player = NULL; + Group* group = NULL; + uint64 guid = 0; + char* nameStr = strtok((char*)args, " "); + + if (!handler->GetPlayerGroupAndGUIDByName(nameStr, player, group, guid)) + return false; + + if (!group) + { + handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, player->GetName().c_str()); + handler->SetSentErrorMessage(true); + return false; + } + + group->RemoveMember(guid); + return true; + } + + static bool HandleGroupJoinCommand(ChatHandler* handler, char const* args) + { + if (!*args) + return false; + + Player* playerSource = NULL; + Player* playerTarget = NULL; + Group* groupSource = NULL; + Group* groupTarget = NULL; + uint64 guidSource = 0; + uint64 guidTarget = 0; + char* nameplgrStr = strtok((char*)args, " "); + char* nameplStr = strtok(NULL, " "); + + if (!handler->GetPlayerGroupAndGUIDByName(nameplgrStr, playerSource, groupSource, guidSource, true)) + return false; + + if (!groupSource) + { + handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, playerSource->GetName().c_str()); + handler->SetSentErrorMessage(true); + return false; + } + + if (!handler->GetPlayerGroupAndGUIDByName(nameplStr, playerTarget, groupTarget, guidTarget, true)) + return false; + + if (groupTarget || playerTarget->GetGroup() == groupSource) + { + handler->PSendSysMessage(LANG_GROUP_ALREADY_IN_GROUP, playerTarget->GetName().c_str()); + handler->SetSentErrorMessage(true); + return false; + } + + if (!groupSource->IsFull()) + { + handler->PSendSysMessage(LANG_GROUP_FULL); + handler->SetSentErrorMessage(true); + return false; + } + + groupSource->AddMember(playerTarget); + groupSource->BroadcastGroupUpdate(); + handler->PSendSysMessage(LANG_GROUP_PLAYER_JOINED, playerTarget->GetName().c_str(), playerSource->GetName().c_str()); + return true; + } + + static bool HandleGroupListCommand(ChatHandler* handler, char const* args) + { + Player* playerTarget; + uint64 guidTarget; + std::string nameTarget; + + uint32 parseGUID = MAKE_NEW_GUID(atol((char*)args), 0, HIGHGUID_PLAYER); + + if (sObjectMgr->GetPlayerNameByGUID(parseGUID, nameTarget)) + { + playerTarget = sObjectMgr->GetPlayerByLowGUID(parseGUID); + guidTarget = parseGUID; + } + else if (!handler->extractPlayerTarget((char*)args, &playerTarget, &guidTarget, &nameTarget)) + return false; + + Group* groupTarget = NULL; + if (playerTarget) + groupTarget = playerTarget->GetGroup(); + + if (!groupTarget) + { + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GROUP_MEMBER); + stmt->setUInt32(0, guidTarget); + PreparedQueryResult resultGroup = CharacterDatabase.Query(stmt); + if (resultGroup) + groupTarget = sGroupMgr->GetGroupByDbStoreId((*resultGroup)[0].GetUInt32()); + } + + if (!groupTarget) + { + handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, nameTarget.c_str()); + handler->SetSentErrorMessage(true); + return false; + } + + handler->PSendSysMessage(LANG_GROUP_TYPE, (groupTarget->isRaidGroup() ? "raid" : "party")); + Group::MemberSlotList const& members = groupTarget->GetMemberSlots(); + for (Group::MemberSlotList::const_iterator itr = members.begin(); itr != members.end(); ++itr) + { + Group::MemberSlot const& slot = *itr; + + std::string flags; + if (slot.flags & MEMBER_FLAG_ASSISTANT) + flags = "Assistant"; + + if (slot.flags & MEMBER_FLAG_MAINTANK) + { + if (!flags.empty()) + flags.append(", "); + flags.append("MainTank"); + } + + if (slot.flags & MEMBER_FLAG_MAINASSIST) + { + if (!flags.empty()) + flags.append(", "); + flags.append("MainAssist"); + } + + if (flags.empty()) + flags = "None"; + + Player* p = ObjectAccessor::FindPlayer((*itr).guid); + const char* onlineState = (p && p->IsInWorld()) ? "online" : "offline"; + + handler->PSendSysMessage(LANG_GROUP_PLAYER_NAME_GUID, slot.name.c_str(), onlineState, + GUID_LOPART(slot.guid), flags.c_str(), lfg::GetRolesString(slot.roles).c_str()); + } + + return true; + } +}; + +void AddSC_group_commandscript() +{ + new group_commandscript(); +} diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp index 0af0da10846..040c68dbacb 100644 --- a/src/server/scripts/Commands/cs_guild.cpp +++ b/src/server/scripts/Commands/cs_guild.cpp @@ -118,6 +118,7 @@ public: return false; targetGuild->Disband(); + delete targetGuild; return true; } @@ -164,7 +165,7 @@ public: if (!targetGuild) return false; - targetGuild->DeleteMember(targetGuid, false, true); + targetGuild->DeleteMember(targetGuid, false, true, true); return true; } diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 9c29e31af96..96244c19036 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -44,85 +44,57 @@ public: ChatCommand* GetCommands() const OVERRIDE { - static ChatCommand groupCommandTable[] = - { - { "leader", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleGroupLeaderCommand, "", NULL }, - { "disband", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleGroupDisbandCommand, "", NULL }, - { "remove", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleGroupRemoveCommand, "", NULL }, - { "join", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleGroupJoinCommand, "", NULL }, - { "list", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleGroupListCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } - }; - static ChatCommand petCommandTable[] = - { - { "create", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleCreatePetCommand, "", NULL }, - { "learn", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandlePetLearnCommand, "", NULL }, - { "unlearn", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandlePetUnlearnCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } - }; - static ChatCommand sendCommandTable[] = - { - { "items", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleSendItemsCommand, "", NULL }, - { "mail", RBAC_PERM_MODERATOR_COMMANDS, true, &HandleSendMailCommand, "", NULL }, - { "message", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleSendMessageCommand, "", NULL }, - { "money", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleSendMoneyCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } - }; static ChatCommand commandTable[] = { - { "dev", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleDevCommand, "", NULL }, - { "gps", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleGPSCommand, "", NULL }, - { "aura", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleAuraCommand, "", NULL }, - { "unaura", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleUnAuraCommand, "", NULL }, - { "appear", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleAppearCommand, "", NULL }, - { "summon", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleSummonCommand, "", NULL }, - { "groupsummon", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleGroupSummonCommand, "", NULL }, - { "commands", RBAC_PERM_PLAYER_COMMANDS, true, &HandleCommandsCommand, "", NULL }, - { "die", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleDieCommand, "", NULL }, - { "revive", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReviveCommand, "", NULL }, - { "dismount", RBAC_PERM_PLAYER_COMMANDS, false, &HandleDismountCommand, "", NULL }, - { "guid", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleGUIDCommand, "", NULL }, - { "help", RBAC_PERM_PLAYER_COMMANDS, true, &HandleHelpCommand, "", NULL }, - { "itemmove", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleItemMoveCommand, "", NULL }, - { "cooldown", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleCooldownCommand, "", NULL }, - { "distance", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleGetDistanceCommand, "", NULL }, - { "recall", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleRecallCommand, "", NULL }, - { "save", RBAC_PERM_PLAYER_COMMANDS, false, &HandleSaveCommand, "", NULL }, - { "saveall", RBAC_PERM_MODERATOR_COMMANDS, true, &HandleSaveAllCommand, "", NULL }, - { "kick", RBAC_PERM_GAMEMASTER_COMMANDS, true, &HandleKickPlayerCommand, "", NULL }, - { "unstuck", RBAC_PERM_PLAYER_COMMANDS, true, &HandleUnstuckCommand, "", NULL }, - { "linkgrave", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleLinkGraveCommand, "", NULL }, - { "neargrave", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleNearGraveCommand, "", NULL }, - { "showarea", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleShowAreaCommand, "", NULL }, - { "hidearea", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleHideAreaCommand, "", NULL }, - { "additem", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleAddItemCommand, "", NULL }, - { "additemset", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleAddItemSetCommand, "", NULL }, - { "bank", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleBankCommand, "", NULL }, - { "wchange", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleChangeWeather, "", NULL }, - { "maxskill", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleMaxSkillCommand, "", NULL }, - { "setskill", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleSetSkillCommand, "", NULL }, - { "pinfo", RBAC_PERM_GAMEMASTER_COMMANDS, true, &HandlePInfoCommand, "", NULL }, - { "respawn", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleRespawnCommand, "", NULL }, - { "send", RBAC_PERM_MODERATOR_COMMANDS, true, NULL, "", sendCommandTable }, - { "pet", RBAC_PERM_GAMEMASTER_COMMANDS, false, NULL, "", petCommandTable }, - { "mute", RBAC_PERM_MODERATOR_COMMANDS, true, &HandleMuteCommand, "", NULL }, - { "unmute", RBAC_PERM_MODERATOR_COMMANDS, true, &HandleUnmuteCommand, "", NULL }, - { "movegens", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleMovegensCommand, "", NULL }, - { "cometome", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleComeToMeCommand, "", NULL }, - { "damage", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleDamageCommand, "", NULL }, - { "combatstop", RBAC_PERM_GAMEMASTER_COMMANDS, true, &HandleCombatStopCommand, "", NULL }, - { "flusharenapoints", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleFlushArenaPointsCommand, "", NULL }, - { "repairitems", RBAC_PERM_GAMEMASTER_COMMANDS, true, &HandleRepairitemsCommand, "", NULL }, - { "freeze", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleFreezeCommand, "", NULL }, - { "unfreeze", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleUnFreezeCommand, "", NULL }, - { "listfreeze", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleListFreezeCommand, "", NULL }, - { "group", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, NULL, "", groupCommandTable }, - { "possess", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, HandlePossessCommand, "", NULL }, - { "unpossess", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, HandleUnPossessCommand, "", NULL }, - { "bindsight", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, HandleBindSightCommand, "", NULL }, - { "unbindsight", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, HandleUnbindSightCommand, "", NULL }, - { "playall", RBAC_PERM_GAMEMASTER_COMMANDS, false, HandlePlayAllCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { "additem", RBAC_PERM_COMMAND_ADDITEM, false, &HandleAddItemCommand, "", NULL }, + { "additemset", RBAC_PERM_COMMAND_ADDITEMSET, false, &HandleAddItemSetCommand, "", NULL }, + { "appear", RBAC_PERM_COMMAND_APPEAR, false, &HandleAppearCommand, "", NULL }, + { "aura", RBAC_PERM_COMMAND_AURA, false, &HandleAuraCommand, "", NULL }, + { "bank", RBAC_PERM_COMMAND_BANK, false, &HandleBankCommand, "", NULL }, + { "bindsight", RBAC_PERM_COMMAND_BINDSIGHT, false, &HandleBindSightCommand, "", NULL }, + { "combatstop", RBAC_PERM_COMMAND_COMBATSTOP, true, &HandleCombatStopCommand, "", NULL }, + { "cometome", RBAC_PERM_COMMAND_COMETOME, false, &HandleComeToMeCommand, "", NULL }, + { "commands", RBAC_PERM_COMMAND_COMMANDS, true, &HandleCommandsCommand, "", NULL }, + { "cooldown", RBAC_PERM_COMMAND_COOLDOWN, false, &HandleCooldownCommand, "", NULL }, + { "damage", RBAC_PERM_COMMAND_DAMAGE, false, &HandleDamageCommand, "", NULL }, + { "dev", RBAC_PERM_COMMAND_DEV, false, &HandleDevCommand, "", NULL }, + { "die", RBAC_PERM_COMMAND_DIE, false, &HandleDieCommand, "", NULL }, + { "dismount", RBAC_PERM_COMMAND_DISMOUNT, false, &HandleDismountCommand, "", NULL }, + { "distance", RBAC_PERM_COMMAND_DISTANCE, false, &HandleGetDistanceCommand, "", NULL }, + { "flusharenapoints", RBAC_PERM_COMMAND_FLUSHARENAPOINTS, false, &HandleFlushArenaPointsCommand, "", NULL }, + { "freeze", RBAC_PERM_COMMAND_FREEZE, false, &HandleFreezeCommand, "", NULL }, + { "gps", RBAC_PERM_COMMAND_GPS, false, &HandleGPSCommand, "", NULL }, + { "guid", RBAC_PERM_COMMAND_GUID, false, &HandleGUIDCommand, "", NULL }, + { "help", RBAC_PERM_COMMAND_HELP, true, &HandleHelpCommand, "", NULL }, + { "hidearea", RBAC_PERM_COMMAND_HIDEAREA, false, &HandleHideAreaCommand, "", NULL }, + { "itemmove", RBAC_PERM_COMMAND_ITEMMOVE, false, &HandleItemMoveCommand, "", NULL }, + { "kick", RBAC_PERM_COMMAND_KICK, true, &HandleKickPlayerCommand, "", NULL }, + { "linkgrave", RBAC_PERM_COMMAND_LINKGRAVE, false, &HandleLinkGraveCommand, "", NULL }, + { "listfreeze", RBAC_PERM_COMMAND_LISTFREEZE, false, &HandleListFreezeCommand, "", NULL }, + { "maxskill", RBAC_PERM_COMMAND_MAXSKILL, false, &HandleMaxSkillCommand, "", NULL }, + { "movegens", RBAC_PERM_COMMAND_MOVEGENS, false, &HandleMovegensCommand, "", NULL }, + { "mute", RBAC_PERM_COMMAND_MUTE, true, &HandleMuteCommand, "", NULL }, + { "neargrave", RBAC_PERM_COMMAND_NEARGRAVE, false, &HandleNearGraveCommand, "", NULL }, + { "pinfo", RBAC_PERM_COMMAND_PINFO, true, &HandlePInfoCommand, "", NULL }, + { "playall", RBAC_PERM_COMMAND_PLAYALL, false, &HandlePlayAllCommand, "", NULL }, + { "possess", RBAC_PERM_COMMAND_POSSESS, false, &HandlePossessCommand, "", NULL }, + { "recall", RBAC_PERM_COMMAND_RECALL, false, &HandleRecallCommand, "", NULL }, + { "repairitems", RBAC_PERM_COMMAND_REPAIRITEMS, true, &HandleRepairitemsCommand, "", NULL }, + { "respawn", RBAC_PERM_COMMAND_RESPAWN, false, &HandleRespawnCommand, "", NULL }, + { "revive", RBAC_PERM_COMMAND_REVIVE, true, &HandleReviveCommand, "", NULL }, + { "saveall", RBAC_PERM_COMMAND_SAVEALL, true, &HandleSaveAllCommand, "", NULL }, + { "save", RBAC_PERM_COMMAND_SAVE, false, &HandleSaveCommand, "", NULL }, + { "setskill", RBAC_PERM_COMMAND_SETSKILL, false, &HandleSetSkillCommand, "", NULL }, + { "showarea", RBAC_PERM_COMMAND_SHOWAREA, false, &HandleShowAreaCommand, "", NULL }, + { "summon", RBAC_PERM_COMMAND_SUMMON, false, &HandleSummonCommand, "", NULL }, + { "unaura", RBAC_PERM_COMMAND_UNAURA, false, &HandleUnAuraCommand, "", NULL }, + { "unbindsight", RBAC_PERM_COMMAND_UNBINDSIGHT, false, HandleUnbindSightCommand, "", NULL }, + { "unfreeze", RBAC_PERM_COMMAND_UNFREEZE, false, &HandleUnFreezeCommand, "", NULL }, + { "unmute", RBAC_PERM_COMMAND_UNMUTE, true, &HandleUnmuteCommand, "", NULL }, + { "unpossess", RBAC_PERM_COMMAND_UNPOSSESS, false, &HandleUnPossessCommand, "", NULL }, + { "unstuck", RBAC_PERM_COMMAND_UNSTUCK, true, &HandleUnstuckCommand, "", NULL }, + { "wchange", RBAC_PERM_COMMAND_WCHANGE, false, &HandleChangeWeather, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; return commandTable; } @@ -546,97 +518,6 @@ public: return true; } - // Summon group of player - static bool HandleGroupSummonCommand(ChatHandler* handler, char const* args) - { - Player* target; - if (!handler->extractPlayerTarget((char*)args, &target)) - return false; - - // check online security - if (handler->HasLowerSecurity(target, 0)) - return false; - - Group* group = target->GetGroup(); - - std::string nameLink = handler->GetNameLink(target); - - if (!group) - { - handler->PSendSysMessage(LANG_NOT_IN_GROUP, nameLink.c_str()); - handler->SetSentErrorMessage(true); - return false; - } - - Map* gmMap = handler->GetSession()->GetPlayer()->GetMap(); - bool toInstance = gmMap->Instanceable(); - - // we are in instance, and can summon only player in our group with us as lead - if (toInstance && ( - !handler->GetSession()->GetPlayer()->GetGroup() || (group->GetLeaderGUID() != handler->GetSession()->GetPlayer()->GetGUID()) || - (handler->GetSession()->GetPlayer()->GetGroup()->GetLeaderGUID() != handler->GetSession()->GetPlayer()->GetGUID()))) - // the last check is a bit excessive, but let it be, just in case - { - handler->SendSysMessage(LANG_CANNOT_SUMMON_TO_INST); - handler->SetSentErrorMessage(true); - return false; - } - - for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) - { - Player* player = itr->GetSource(); - - if (!player || player == handler->GetSession()->GetPlayer() || !player->GetSession()) - continue; - - // check online security - if (handler->HasLowerSecurity(player, 0)) - return false; - - std::string plNameLink = handler->GetNameLink(player); - - if (player->IsBeingTeleported() == true) - { - handler->PSendSysMessage(LANG_IS_TELEPORTED, plNameLink.c_str()); - handler->SetSentErrorMessage(true); - return false; - } - - if (toInstance) - { - Map* playerMap = player->GetMap(); - - if (playerMap->Instanceable() && playerMap->GetInstanceId() != gmMap->GetInstanceId()) - { - // cannot summon from instance to instance - handler->PSendSysMessage(LANG_CANNOT_SUMMON_TO_INST, plNameLink.c_str()); - handler->SetSentErrorMessage(true); - return false; - } - } - - handler->PSendSysMessage(LANG_SUMMONING, plNameLink.c_str(), ""); - if (handler->needReportToTarget(player)) - ChatHandler(player->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->GetNameLink().c_str()); - - // stop flight if need - if (player->IsInFlight()) - { - player->GetMotionMaster()->MovementExpired(); - player->CleanupAfterTaxiFlight(); - } - // save only in non-flight case - else - player->SaveRecallPosition(); - - // before GM - float x, y, z; - handler->GetSession()->GetPlayer()->GetClosePoint(x, y, z, player->GetObjectSize()); - player->TeleportTo(handler->GetSession()->GetPlayer()->GetMapId(), x, y, z, player->GetOrientation()); - } - - return true; - } static bool HandleCommandsCommand(ChatHandler* handler, char const* /*args*/) { @@ -2358,380 +2239,6 @@ public: return true; } - // Send mail by command - static bool HandleSendMailCommand(ChatHandler* handler, char const* args) - { - // format: name "subject text" "mail text" - Player* target; - uint64 targetGuid; - std::string targetName; - if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName)) - return false; - - char* tail1 = strtok(NULL, ""); - if (!tail1) - return false; - - char const* msgSubject = handler->extractQuotedArg(tail1); - if (!msgSubject) - return false; - - char* tail2 = strtok(NULL, ""); - if (!tail2) - return false; - - char const* msgText = handler->extractQuotedArg(tail2); - if (!msgText) - return false; - - // msgSubject, msgText isn't NUL after prev. check - std::string subject = msgSubject; - std::string text = msgText; - - // from console show not existed sender - MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUIDLow() : 0, MAIL_STATIONERY_GM); - - /// @todo Fix poor design - SQLTransaction trans = CharacterDatabase.BeginTransaction(); - MailDraft(subject, text) - .SendMailTo(trans, MailReceiver(target, GUID_LOPART(targetGuid)), sender); - - CharacterDatabase.CommitTransaction(trans); - - std::string nameLink = handler->playerLink(targetName); - handler->PSendSysMessage(LANG_MAIL_SENT, nameLink.c_str()); - return true; - } - // Send items by mail - static bool HandleSendItemsCommand(ChatHandler* handler, char const* args) - { - // format: name "subject text" "mail text" item1[:count1] item2[:count2] ... item12[:count12] - Player* receiver; - uint64 receiverGuid; - std::string receiverName; - if (!handler->extractPlayerTarget((char*)args, &receiver, &receiverGuid, &receiverName)) - return false; - - char* tail1 = strtok(NULL, ""); - if (!tail1) - return false; - - char const* msgSubject = handler->extractQuotedArg(tail1); - if (!msgSubject) - return false; - - char* tail2 = strtok(NULL, ""); - if (!tail2) - return false; - - char const* msgText = handler->extractQuotedArg(tail2); - if (!msgText) - return false; - - // msgSubject, msgText isn't NUL after prev. check - std::string subject = msgSubject; - std::string text = msgText; - - // extract items - typedef std::pair<uint32, uint32> ItemPair; - typedef std::list< ItemPair > ItemPairs; - ItemPairs items; - - // get all tail string - char* tail = strtok(NULL, ""); - - // get from tail next item str - while (char* itemStr = strtok(tail, " ")) - { - // and get new tail - tail = strtok(NULL, ""); - - // parse item str - char const* itemIdStr = strtok(itemStr, ":"); - char const* itemCountStr = strtok(NULL, " "); - - uint32 itemId = atoi(itemIdStr); - if (!itemId) - return false; - - ItemTemplate const* item_proto = sObjectMgr->GetItemTemplate(itemId); - if (!item_proto) - { - handler->PSendSysMessage(LANG_COMMAND_ITEMIDINVALID, itemId); - handler->SetSentErrorMessage(true); - return false; - } - - uint32 itemCount = itemCountStr ? atoi(itemCountStr) : 1; - if (itemCount < 1 || (item_proto->MaxCount > 0 && itemCount > uint32(item_proto->MaxCount))) - { - handler->PSendSysMessage(LANG_COMMAND_INVALID_ITEM_COUNT, itemCount, itemId); - handler->SetSentErrorMessage(true); - return false; - } - - while (itemCount > item_proto->GetMaxStackSize()) - { - items.push_back(ItemPair(itemId, item_proto->GetMaxStackSize())); - itemCount -= item_proto->GetMaxStackSize(); - } - - items.push_back(ItemPair(itemId, itemCount)); - - if (items.size() > MAX_MAIL_ITEMS) - { - handler->PSendSysMessage(LANG_COMMAND_MAIL_ITEMS_LIMIT, MAX_MAIL_ITEMS); - handler->SetSentErrorMessage(true); - return false; - } - } - - // from console show not existed sender - MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUIDLow() : 0, MAIL_STATIONERY_GM); - - // fill mail - MailDraft draft(subject, text); - - SQLTransaction trans = CharacterDatabase.BeginTransaction(); - - for (ItemPairs::const_iterator itr = items.begin(); itr != items.end(); ++itr) - { - if (Item* item = Item::CreateItem(itr->first, itr->second, handler->GetSession() ? handler->GetSession()->GetPlayer() : 0)) - { - item->SaveToDB(trans); // save for prevent lost at next mail load, if send fail then item will deleted - draft.AddItem(item); - } - } - - draft.SendMailTo(trans, MailReceiver(receiver, GUID_LOPART(receiverGuid)), sender); - CharacterDatabase.CommitTransaction(trans); - - std::string nameLink = handler->playerLink(receiverName); - handler->PSendSysMessage(LANG_MAIL_SENT, nameLink.c_str()); - return true; - } - /// Send money by mail - static bool HandleSendMoneyCommand(ChatHandler* handler, char const* args) - { - /// format: name "subject text" "mail text" money - - Player* receiver; - uint64 receiverGuid; - std::string receiverName; - if (!handler->extractPlayerTarget((char*)args, &receiver, &receiverGuid, &receiverName)) - return false; - - char* tail1 = strtok(NULL, ""); - if (!tail1) - return false; - - char* msgSubject = handler->extractQuotedArg(tail1); - if (!msgSubject) - return false; - - char* tail2 = strtok(NULL, ""); - if (!tail2) - return false; - - char* msgText = handler->extractQuotedArg(tail2); - if (!msgText) - return false; - - char* moneyStr = strtok(NULL, ""); - int32 money = moneyStr ? atoi(moneyStr) : 0; - if (money <= 0) - return false; - - // msgSubject, msgText isn't NUL after prev. check - std::string subject = msgSubject; - std::string text = msgText; - - // from console show not existed sender - MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUIDLow() : 0, MAIL_STATIONERY_GM); - - SQLTransaction trans = CharacterDatabase.BeginTransaction(); - - MailDraft(subject, text) - .AddMoney(money) - .SendMailTo(trans, MailReceiver(receiver, GUID_LOPART(receiverGuid)), sender); - - CharacterDatabase.CommitTransaction(trans); - - std::string nameLink = handler->playerLink(receiverName); - handler->PSendSysMessage(LANG_MAIL_SENT, nameLink.c_str()); - return true; - } - /// Send a message to a player in game - static bool HandleSendMessageCommand(ChatHandler* handler, char const* args) - { - /// - Find the player - Player* player; - if (!handler->extractPlayerTarget((char*)args, &player)) - return false; - - char* msgStr = strtok(NULL, ""); - if (!msgStr) - return false; - - ///- Check that he is not logging out. - if (player->GetSession()->isLogingOut()) - { - handler->SendSysMessage(LANG_PLAYER_NOT_FOUND); - handler->SetSentErrorMessage(true); - return false; - } - - /// - Send the message - // Use SendAreaTriggerMessage for fastest delivery. - player->GetSession()->SendAreaTriggerMessage("%s", msgStr); - player->GetSession()->SendAreaTriggerMessage("|cffff0000[Message from administrator]:|r"); - - // Confirmation message - std::string nameLink = handler->GetNameLink(player); - handler->PSendSysMessage(LANG_SENDMESSAGE, nameLink.c_str(), msgStr); - - return true; - } - - static bool HandleCreatePetCommand(ChatHandler* handler, char const* /*args*/) - { - Player* player = handler->GetSession()->GetPlayer(); - Creature* creatureTarget = handler->getSelectedCreature(); - - if (!creatureTarget || creatureTarget->IsPet() || creatureTarget->GetTypeId() == TYPEID_PLAYER) - { - handler->PSendSysMessage(LANG_SELECT_CREATURE); - handler->SetSentErrorMessage(true); - return false; - } - - CreatureTemplate const* creatrueTemplate = sObjectMgr->GetCreatureTemplate(creatureTarget->GetEntry()); - // Creatures with family 0 crashes the server - if (!creatrueTemplate->family) - { - handler->PSendSysMessage("This creature cannot be tamed. (family id: 0)."); - handler->SetSentErrorMessage(true); - return false; - } - - if (player->GetPetGUID()) - { - handler->PSendSysMessage("You already have a pet"); - handler->SetSentErrorMessage(true); - return false; - } - - // Everything looks OK, create new pet - Pet* pet = new Pet(player, HUNTER_PET); - if (!pet->CreateBaseAtCreature(creatureTarget)) - { - delete pet; - handler->PSendSysMessage("Error 1"); - return false; - } - - creatureTarget->setDeathState(JUST_DIED); - creatureTarget->RemoveCorpse(); - creatureTarget->SetHealth(0); // just for nice GM-mode view - - pet->SetUInt64Value(UNIT_FIELD_CREATEDBY, player->GetGUID()); - pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, player->getFaction()); - - if (!pet->InitStatsForLevel(creatureTarget->getLevel())) - { - TC_LOG_ERROR(LOG_FILTER_GENERAL, "InitStatsForLevel() in EffectTameCreature failed! Pet deleted."); - handler->PSendSysMessage("Error 2"); - delete pet; - return false; - } - - // prepare visual effect for levelup - pet->SetUInt32Value(UNIT_FIELD_LEVEL, creatureTarget->getLevel()-1); - - pet->GetCharmInfo()->SetPetNumber(sObjectMgr->GeneratePetNumber(), true); - // this enables pet details window (Shift+P) - pet->InitPetCreateSpells(); - pet->SetFullHealth(); - - pet->GetMap()->AddToMap(pet->ToCreature()); - - // visual effect for levelup - pet->SetUInt32Value(UNIT_FIELD_LEVEL, creatureTarget->getLevel()); - - player->SetMinion(pet, true); - pet->SavePetToDB(PET_SAVE_AS_CURRENT); - player->PetSpellInitialize(); - - return true; - } - - static bool HandlePetLearnCommand(ChatHandler* handler, char const* args) - { - if (!*args) - return false; - - Player* player = handler->GetSession()->GetPlayer(); - Pet* pet = player->GetPet(); - - if (!pet) - { - handler->PSendSysMessage("You have no pet"); - handler->SetSentErrorMessage(true); - return false; - } - - uint32 spellId = handler->extractSpellIdFromLink((char*)args); - - if (!spellId || !sSpellMgr->GetSpellInfo(spellId)) - return false; - - // Check if pet already has it - if (pet->HasSpell(spellId)) - { - handler->PSendSysMessage("Pet already has spell: %u", spellId); - handler->SetSentErrorMessage(true); - return false; - } - - // Check if spell is valid - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); - if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo)) - { - handler->PSendSysMessage(LANG_COMMAND_SPELL_BROKEN, spellId); - handler->SetSentErrorMessage(true); - return false; - } - - pet->learnSpell(spellId); - - handler->PSendSysMessage("Pet has learned spell %u", spellId); - return true; - } - - static bool HandlePetUnlearnCommand(ChatHandler* handler, char const* args) - { - if (!*args) - return false; - - Player* player = handler->GetSession()->GetPlayer(); - Pet* pet = player->GetPet(); - if (!pet) - { - handler->PSendSysMessage("You have no pet"); - handler->SetSentErrorMessage(true); - return false; - } - - uint32 spellId = handler->extractSpellIdFromLink((char*)args); - - if (pet->HasSpell(spellId)) - pet->removeSpell(spellId, false); - else - handler->PSendSysMessage("Pet doesn't have that spell"); - - return true; - } - static bool HandleFreezeCommand(ChatHandler* handler, char const* args) { std::string name; @@ -2894,177 +2401,6 @@ public: return true; } - static bool HandleGroupLeaderCommand(ChatHandler* handler, char const* args) - { - Player* player = NULL; - Group* group = NULL; - uint64 guid = 0; - char* nameStr = strtok((char*)args, " "); - - if (handler->GetPlayerGroupAndGUIDByName(nameStr, player, group, guid)) - if (group && group->GetLeaderGUID() != guid) - { - group->ChangeLeader(guid); - group->SendUpdate(); - } - - return true; - } - - static bool HandleGroupDisbandCommand(ChatHandler* handler, char const* args) - { - Player* player = NULL; - Group* group = NULL; - uint64 guid = 0; - char* nameStr = strtok((char*)args, " "); - - if (handler->GetPlayerGroupAndGUIDByName(nameStr, player, group, guid)) - if (group) - group->Disband(); - - return true; - } - - static bool HandleGroupRemoveCommand(ChatHandler* handler, char const* args) - { - Player* player = NULL; - Group* group = NULL; - uint64 guid = 0; - char* nameStr = strtok((char*)args, " "); - - if (handler->GetPlayerGroupAndGUIDByName(nameStr, player, group, guid, true)) - if (group) - group->RemoveMember(guid); - - return true; - } - - static bool HandleGroupJoinCommand(ChatHandler* handler, char const* args) - { - if (!*args) - return false; - - Player* playerSource = NULL; - Player* playerTarget = NULL; - Group* groupSource = NULL; - Group* groupTarget = NULL; - uint64 guidSource = 0; - uint64 guidTarget = 0; - char* nameplgrStr = strtok((char*)args, " "); - char* nameplStr = strtok(NULL, " "); - - if (handler->GetPlayerGroupAndGUIDByName(nameplgrStr, playerSource, groupSource, guidSource, true)) - { - if (groupSource) - { - if (handler->GetPlayerGroupAndGUIDByName(nameplStr, playerTarget, groupTarget, guidTarget, true)) - { - if (!groupTarget && playerTarget->GetGroup() != groupSource) - { - if (!groupSource->IsFull()) - { - groupSource->AddMember(playerTarget); - groupSource->BroadcastGroupUpdate(); - handler->PSendSysMessage(LANG_GROUP_PLAYER_JOINED, playerTarget->GetName().c_str(), playerSource->GetName().c_str()); - return true; - } - else - { - // group is full - handler->PSendSysMessage(LANG_GROUP_FULL); - return true; - } - } - else - { - // group is full or target player already in a group - handler->PSendSysMessage(LANG_GROUP_ALREADY_IN_GROUP, playerTarget->GetName().c_str()); - return true; - } - } - } - else - { - // specified source player is not in a group - handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, playerSource->GetName().c_str()); - return true; - } - } - - return true; - } - - static bool HandleGroupListCommand(ChatHandler* handler, char const* args) - { - Player* playerTarget; - uint64 guidTarget; - std::string nameTarget; - - uint32 parseGUID = MAKE_NEW_GUID(atol((char*)args), 0, HIGHGUID_PLAYER); - - if (sObjectMgr->GetPlayerNameByGUID(parseGUID, nameTarget)) - { - playerTarget = sObjectMgr->GetPlayerByLowGUID(parseGUID); - guidTarget = parseGUID; - } - else if (!handler->extractPlayerTarget((char*)args, &playerTarget, &guidTarget, &nameTarget)) - return false; - - Group* groupTarget = NULL; - if (playerTarget) - groupTarget = playerTarget->GetGroup(); - - if (!groupTarget) - { - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GROUP_MEMBER); - stmt->setUInt32(0, guidTarget); - PreparedQueryResult resultGroup = CharacterDatabase.Query(stmt); - if (resultGroup) - groupTarget = sGroupMgr->GetGroupByDbStoreId((*resultGroup)[0].GetUInt32()); - } - - if (groupTarget) - { - handler->PSendSysMessage(LANG_GROUP_TYPE, (groupTarget->isRaidGroup() ? "raid" : "party")); - Group::MemberSlotList const& members = groupTarget->GetMemberSlots(); - for (Group::MemberSlotList::const_iterator itr = members.begin(); itr != members.end(); ++itr) - { - Group::MemberSlot const& slot = *itr; - - std::string flags; - if (slot.flags & MEMBER_FLAG_ASSISTANT) - flags = "Assistant"; - - if (slot.flags & MEMBER_FLAG_MAINTANK) - { - if (!flags.empty()) - flags.append(", "); - flags.append("MainTank"); - } - - if (slot.flags & MEMBER_FLAG_MAINASSIST) - { - if (!flags.empty()) - flags.append(", "); - flags.append("MainAssist"); - } - - if (flags.empty()) - flags = "None"; - - Player* p = ObjectAccessor::FindPlayer((*itr).guid); - const char* onlineState = (p && p->IsInWorld()) ? "online" : "offline"; - - handler->PSendSysMessage(LANG_GROUP_PLAYER_NAME_GUID, slot.name.c_str(), onlineState, - GUID_LOPART(slot.guid), flags.c_str(), lfg::GetRolesString(slot.roles).c_str()); - } - } - else - handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, nameTarget.c_str()); - - return true; - } - static bool HandlePlayAllCommand(ChatHandler* handler, char const* args) { if (!*args) diff --git a/src/server/scripts/Commands/cs_mmaps.cpp b/src/server/scripts/Commands/cs_mmaps.cpp index 6667499af58..caefcceb886 100644 --- a/src/server/scripts/Commands/cs_mmaps.cpp +++ b/src/server/scripts/Commands/cs_mmaps.cpp @@ -45,18 +45,18 @@ public: { static ChatCommand mmapCommandTable[] = { - { "path", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleMmapPathCommand, "", NULL }, - { "loc", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleMmapLocCommand, "", NULL }, - { "loadedtiles", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleMmapLoadedTilesCommand, "", NULL }, - { "stats", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleMmapStatsCommand, "", NULL }, - { "testarea", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleMmapTestArea, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { "loadedtiles", RBAC_PERM_COMMAND_MMAP_LOADEDTILES, false, &HandleMmapLoadedTilesCommand, "", NULL }, + { "loc", RBAC_PERM_COMMAND_MMAP_LOC, false, &HandleMmapLocCommand, "", NULL }, + { "path", RBAC_PERM_COMMAND_MMAP_PATH, false, &HandleMmapPathCommand, "", NULL }, + { "stats", RBAC_PERM_COMMAND_MMAP_STATS, false, &HandleMmapStatsCommand, "", NULL }, + { "testarea", RBAC_PERM_COMMAND_MMAP_TESTAREA, false, &HandleMmapTestArea, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand commandTable[] = { - { "mmap", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, NULL, "", mmapCommandTable }, - { NULL, 0, false, NULL, "", NULL } + { "mmap", RBAC_PERM_COMMAND_MMAP, true, NULL, "", mmapCommandTable }, + { NULL, 0, false, NULL, "", NULL } }; return commandTable; } diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index c3d461f6170..ddd2522c8be 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -40,44 +40,44 @@ public: { static ChatCommand modifyspeedCommandTable[] = { - { "fly", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyFlyCommand, "", NULL }, - { "all", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyASpeedCommand, "", NULL }, - { "walk", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifySpeedCommand, "", NULL }, - { "backwalk", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyBWalkCommand, "", NULL }, - { "swim", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifySwimCommand, "", NULL }, - { "", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyASpeedCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { "all", RBAC_PERM_COMMAND_MODIFY_SPEED_ALL, false, &HandleModifyASpeedCommand, "", NULL }, + { "backwalk", RBAC_PERM_COMMAND_MODIFY_SPEED_BACKWALK, false, &HandleModifyBWalkCommand, "", NULL }, + { "fly", RBAC_PERM_COMMAND_MODIFY_SPEED_FLY, false, &HandleModifyFlyCommand, "", NULL }, + { "walk", RBAC_PERM_COMMAND_MODIFY_SPEED_WALK, false, &HandleModifySpeedCommand, "", NULL }, + { "swim", RBAC_PERM_COMMAND_MODIFY_SPEED_SWIM, false, &HandleModifySwimCommand, "", NULL }, + { "", RBAC_PERM_COMMAND_MODIFY_SPEED, false, &HandleModifyASpeedCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand modifyCommandTable[] = { - { "hp", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyHPCommand, "", NULL }, - { "mana", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyManaCommand, "", NULL }, - { "rage", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyRageCommand, "", NULL }, - { "runicpower", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyRunicPowerCommand, "", NULL }, - { "energy", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyEnergyCommand, "", NULL }, - { "money", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyMoneyCommand, "", NULL }, - { "scale", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyScaleCommand, "", NULL }, - { "bit", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyBitCommand, "", NULL }, - { "faction", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyFactionCommand, "", NULL }, - { "spell", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifySpellCommand, "", NULL }, - { "talentpoints", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyTalentCommand, "", NULL }, - { "mount", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyMountCommand, "", NULL }, - { "honor", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyHonorCommand, "", NULL }, - { "reputation", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleModifyRepCommand, "", NULL }, - { "arenapoints", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyArenaCommand, "", NULL }, - { "drunk", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleModifyDrunkCommand, "", NULL }, - { "standstate", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleModifyStandStateCommand, "", NULL }, - { "phase", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleModifyPhaseCommand, "", NULL }, - { "gender", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleModifyGenderCommand, "", NULL }, - { "speed", RBAC_PERM_MODERATOR_COMMANDS, false, NULL, "", modifyspeedCommandTable }, - { NULL, 0, false, NULL, "", NULL } + { "arenapoints", RBAC_PERM_COMMAND_MODIFY_ARENAPOINTS, false, &HandleModifyArenaCommand, "", NULL }, + { "bit", RBAC_PERM_COMMAND_MODIFY_BIT, false, &HandleModifyBitCommand, "", NULL }, + { "drunk", RBAC_PERM_COMMAND_MODIFY_DRUNK, false, &HandleModifyDrunkCommand, "", NULL }, + { "energy", RBAC_PERM_COMMAND_MODIFY_ENERGY, false, &HandleModifyEnergyCommand, "", NULL }, + { "faction", RBAC_PERM_COMMAND_MODIFY_FACTION, false, &HandleModifyFactionCommand, "", NULL }, + { "gender", RBAC_PERM_COMMAND_MODIFY_GENDER, false, &HandleModifyGenderCommand, "", NULL }, + { "honor", RBAC_PERM_COMMAND_MODIFY_HONOR, false, &HandleModifyHonorCommand, "", NULL }, + { "hp", RBAC_PERM_COMMAND_MODIFY_HP, false, &HandleModifyHPCommand, "", NULL }, + { "mana", RBAC_PERM_COMMAND_MODIFY_MANA, false, &HandleModifyManaCommand, "", NULL }, + { "money", RBAC_PERM_COMMAND_MODIFY_MONEY, false, &HandleModifyMoneyCommand, "", NULL }, + { "mount", RBAC_PERM_COMMAND_MODIFY_MOUNT, false, &HandleModifyMountCommand, "", NULL }, + { "phase", RBAC_PERM_COMMAND_MODIFY_PHASE, false, &HandleModifyPhaseCommand, "", NULL }, + { "rage", RBAC_PERM_COMMAND_MODIFY_RAGE, false, &HandleModifyRageCommand, "", NULL }, + { "reputation", RBAC_PERM_COMMAND_MODIFY_REPUTATION, false, &HandleModifyRepCommand, "", NULL }, + { "runicpower", RBAC_PERM_COMMAND_MODIFY_RUNICPOWER, false, &HandleModifyRunicPowerCommand, "", NULL }, + { "scale", RBAC_PERM_COMMAND_MODIFY_SCALE, false, &HandleModifyScaleCommand, "", NULL }, + { "speed", RBAC_PERM_COMMAND_MODIFY_SPEED, false, NULL, "", modifyspeedCommandTable }, + { "spell", RBAC_PERM_COMMAND_MODIFY_SPELL, false, &HandleModifySpellCommand, "", NULL }, + { "standstate", RBAC_PERM_COMMAND_MODIFY_STANDSTATE, false, &HandleModifyStandStateCommand, "", NULL }, + { "talentpoints", RBAC_PERM_COMMAND_MODIFY_TALENTPOINTS, false, &HandleModifyTalentCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand commandTable[] = { - { "morph", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleModifyMorphCommand, "", NULL }, - { "demorph", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleDeMorphCommand, "", NULL }, - { "modify", RBAC_PERM_MODERATOR_COMMANDS, false, NULL, "", modifyCommandTable }, - { NULL, 0, false, NULL, "", NULL } + { "morph", RBAC_PERM_COMMAND_MORPH, false, &HandleModifyMorphCommand, "", NULL }, + { "demorph", RBAC_PERM_COMMAND_DEMORPH, false, &HandleDeMorphCommand, "", NULL }, + { "modify", RBAC_PERM_COMMAND_MODIFY, false, NULL, "", modifyCommandTable }, + { NULL, 0, false, NULL, "", NULL } }; return commandTable; } diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 872be042074..fc68036aa01 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -33,15 +33,18 @@ EndScriptData */ #include "Player.h" #include "Pet.h" -struct NpcFlagText +template<typename E, typename T = char const*> +struct EnumName { - uint32 flag; - int32 text; + E Value; + T Name; }; +#define CREATE_NAMED_ENUM(VALUE) { VALUE, STRINGIZE(VALUE) } + #define NPCFLAG_COUNT 24 -NpcFlagText const npcFlagTexts[NPCFLAG_COUNT] = +EnumName<NPCFlags, int32> const npcFlagTexts[NPCFLAG_COUNT] = { { UNIT_NPC_FLAG_AUCTIONEER, LANG_NPCINFO_AUCTIONEER }, { UNIT_NPC_FLAG_BANKER, LANG_NPCINFO_BANKER }, @@ -69,89 +72,76 @@ NpcFlagText const npcFlagTexts[NPCFLAG_COUNT] = { UNIT_NPC_FLAG_VENDOR_REAGENT, LANG_NPCINFO_VENDOR_REAGENT } }; -struct MechanicImmune -{ - uint32 flag; - char const* text; -}; - -MechanicImmune const mechanicImmunes[MAX_MECHANIC] = -{ - { MECHANIC_NONE , "MECHANIC_NONE" }, - { MECHANIC_CHARM , "MECHANIC_CHARM" }, - { MECHANIC_DISORIENTED , "MECHANIC_DISORIENTED" }, - { MECHANIC_DISARM , "MECHANIC_DISARM" }, - { MECHANIC_DISTRACT , "MECHANIC_DISTRACT" }, - { MECHANIC_FEAR , "MECHANIC_FEAR" }, - { MECHANIC_GRIP , "MECHANIC_GRIP" }, - { MECHANIC_ROOT , "MECHANIC_ROOT" }, - { MECHANIC_SLOW_ATTACK , "MECHANIC_SLOW_ATTACK" }, - { MECHANIC_SILENCE , "MECHANIC_SILENCE" }, - { MECHANIC_SLEEP , "MECHANIC_SLEEP" }, - { MECHANIC_SNARE , "MECHANIC_SNARE" }, - { MECHANIC_STUN , "MECHANIC_STUN" }, - { MECHANIC_FREEZE , "MECHANIC_FREEZE" }, - { MECHANIC_KNOCKOUT , "MECHANIC_KNOCKOUT" }, - { MECHANIC_BLEED , "MECHANIC_BLEED" }, - { MECHANIC_BANDAGE , "MECHANIC_BANDAGE" }, - { MECHANIC_POLYMORPH , "MECHANIC_POLYMORPH" }, - { MECHANIC_BANISH , "MECHANIC_BANISH" }, - { MECHANIC_SHIELD , "MECHANIC_SHIELD" }, - { MECHANIC_SHACKLE , "MECHANIC_SHACKLE" }, - { MECHANIC_MOUNT , "MECHANIC_MOUNT" }, - { MECHANIC_INFECTED , "MECHANIC_INFECTED" }, - { MECHANIC_TURN , "MECHANIC_TURN" }, - { MECHANIC_HORROR , "MECHANIC_HORROR" }, - { MECHANIC_INVULNERABILITY , "MECHANIC_INVULNERABILITY" }, - { MECHANIC_INTERRUPT , "MECHANIC_INTERRUPT" }, - { MECHANIC_DAZE , "MECHANIC_DAZE" }, - { MECHANIC_DISCOVERY , "MECHANIC_DISCOVERY" }, - { MECHANIC_IMMUNE_SHIELD , "MECHANIC_IMMUNE_SHIELD" }, - { MECHANIC_SAPPED , "MECHANIC_SAPPED" }, - { MECHANIC_ENRAGED , "MECHANIC_ENRAGED" } -}; - - -struct UnitFlag +EnumName<Mechanics> const mechanicImmunes[MAX_MECHANIC] = { - uint32 flag; - char const* text; + CREATE_NAMED_ENUM(MECHANIC_NONE), + CREATE_NAMED_ENUM(MECHANIC_CHARM), + CREATE_NAMED_ENUM(MECHANIC_DISORIENTED), + CREATE_NAMED_ENUM(MECHANIC_DISARM), + CREATE_NAMED_ENUM(MECHANIC_DISTRACT), + CREATE_NAMED_ENUM(MECHANIC_FEAR), + CREATE_NAMED_ENUM(MECHANIC_GRIP), + CREATE_NAMED_ENUM(MECHANIC_ROOT), + CREATE_NAMED_ENUM(MECHANIC_SLOW_ATTACK), + CREATE_NAMED_ENUM(MECHANIC_SILENCE), + CREATE_NAMED_ENUM(MECHANIC_SLEEP), + CREATE_NAMED_ENUM(MECHANIC_SNARE), + CREATE_NAMED_ENUM(MECHANIC_STUN), + CREATE_NAMED_ENUM(MECHANIC_FREEZE), + CREATE_NAMED_ENUM(MECHANIC_KNOCKOUT), + CREATE_NAMED_ENUM(MECHANIC_BLEED), + CREATE_NAMED_ENUM(MECHANIC_BANDAGE), + CREATE_NAMED_ENUM(MECHANIC_POLYMORPH), + CREATE_NAMED_ENUM(MECHANIC_BANISH), + CREATE_NAMED_ENUM(MECHANIC_SHIELD), + CREATE_NAMED_ENUM(MECHANIC_SHACKLE), + CREATE_NAMED_ENUM(MECHANIC_MOUNT), + CREATE_NAMED_ENUM(MECHANIC_INFECTED), + CREATE_NAMED_ENUM(MECHANIC_TURN), + CREATE_NAMED_ENUM(MECHANIC_HORROR), + CREATE_NAMED_ENUM(MECHANIC_INVULNERABILITY), + CREATE_NAMED_ENUM(MECHANIC_INTERRUPT), + CREATE_NAMED_ENUM(MECHANIC_DAZE), + CREATE_NAMED_ENUM(MECHANIC_DISCOVERY), + CREATE_NAMED_ENUM(MECHANIC_IMMUNE_SHIELD), + CREATE_NAMED_ENUM(MECHANIC_SAPPED), + CREATE_NAMED_ENUM(MECHANIC_ENRAGED) }; -UnitFlag const unitFlags[MAX_UNIT_FLAGS] = +EnumName<UnitFlags> const unitFlags[MAX_UNIT_FLAGS] = { - { UNIT_FLAG_SERVER_CONTROLLED , "UNIT_FLAG_SERVER_CONTROLLED" }, - { UNIT_FLAG_NON_ATTACKABLE , "UNIT_FLAG_NON_ATTACKABLE" }, - { UNIT_FLAG_DISABLE_MOVE , "UNIT_FLAG_DISABLE_MOVE" }, - { UNIT_FLAG_PVP_ATTACKABLE , "UNIT_FLAG_PVP_ATTACKABLE" }, - { UNIT_FLAG_RENAME , "UNIT_FLAG_RENAME" }, - { UNIT_FLAG_PREPARATION , "UNIT_FLAG_PREPARATION" }, - { UNIT_FLAG_UNK_6 , "UNIT_FLAG_UNK_6" }, - { UNIT_FLAG_NOT_ATTACKABLE_1 , "UNIT_FLAG_NOT_ATTACKABLE_1" }, - { UNIT_FLAG_IMMUNE_TO_PC , "UNIT_FLAG_IMMUNE_TO_PC" }, - { UNIT_FLAG_IMMUNE_TO_NPC , "UNIT_FLAG_IMMUNE_TO_NPC" }, - { UNIT_FLAG_LOOTING , "UNIT_FLAG_LOOTING" }, - { UNIT_FLAG_PET_IN_COMBAT , "UNIT_FLAG_PET_IN_COMBAT" }, - { UNIT_FLAG_PVP , "UNIT_FLAG_PVP" }, - { UNIT_FLAG_SILENCED , "UNIT_FLAG_SILENCED" }, - { UNIT_FLAG_UNK_14 , "UNIT_FLAG_UNK_14" }, - { UNIT_FLAG_UNK_15 , "UNIT_FLAG_UNK_15" }, - { UNIT_FLAG_UNK_16 , "UNIT_FLAG_UNK_16" }, - { UNIT_FLAG_PACIFIED , "UNIT_FLAG_PACIFIED" }, - { UNIT_FLAG_STUNNED , "UNIT_FLAG_STUNNED" }, - { UNIT_FLAG_IN_COMBAT , "UNIT_FLAG_IN_COMBAT" }, - { UNIT_FLAG_TAXI_FLIGHT , "UNIT_FLAG_TAXI_FLIGHT" }, - { UNIT_FLAG_DISARMED , "UNIT_FLAG_DISARMED" }, - { UNIT_FLAG_CONFUSED , "UNIT_FLAG_CONFUSED" }, - { UNIT_FLAG_FLEEING , "UNIT_FLAG_FLEEING" }, - { UNIT_FLAG_PLAYER_CONTROLLED , "UNIT_FLAG_PLAYER_CONTROLLED" }, - { UNIT_FLAG_NOT_SELECTABLE , "UNIT_FLAG_NOT_SELECTABLE" }, - { UNIT_FLAG_SKINNABLE , "UNIT_FLAG_SKINNABLE" }, - { UNIT_FLAG_MOUNT , "UNIT_FLAG_MOUNT" }, - { UNIT_FLAG_UNK_28 , "UNIT_FLAG_UNK_28" }, - { UNIT_FLAG_UNK_29 , "UNIT_FLAG_UNK_29" }, - { UNIT_FLAG_SHEATHE , "UNIT_FLAG_SHEATHE" }, - { UNIT_FLAG_UNK_31 , "UNIT_FLAG_UNK_31" } + CREATE_NAMED_ENUM(UNIT_FLAG_SERVER_CONTROLLED), + CREATE_NAMED_ENUM(UNIT_FLAG_NON_ATTACKABLE), + CREATE_NAMED_ENUM(UNIT_FLAG_DISABLE_MOVE), + CREATE_NAMED_ENUM(UNIT_FLAG_PVP_ATTACKABLE), + CREATE_NAMED_ENUM(UNIT_FLAG_RENAME), + CREATE_NAMED_ENUM(UNIT_FLAG_PREPARATION), + CREATE_NAMED_ENUM(UNIT_FLAG_UNK_6), + CREATE_NAMED_ENUM(UNIT_FLAG_NOT_ATTACKABLE_1), + CREATE_NAMED_ENUM(UNIT_FLAG_IMMUNE_TO_PC), + CREATE_NAMED_ENUM(UNIT_FLAG_IMMUNE_TO_NPC), + CREATE_NAMED_ENUM(UNIT_FLAG_LOOTING), + CREATE_NAMED_ENUM(UNIT_FLAG_PET_IN_COMBAT), + CREATE_NAMED_ENUM(UNIT_FLAG_PVP), + CREATE_NAMED_ENUM(UNIT_FLAG_SILENCED), + CREATE_NAMED_ENUM(UNIT_FLAG_UNK_14), + CREATE_NAMED_ENUM(UNIT_FLAG_UNK_15), + CREATE_NAMED_ENUM(UNIT_FLAG_UNK_16), + CREATE_NAMED_ENUM(UNIT_FLAG_PACIFIED), + CREATE_NAMED_ENUM(UNIT_FLAG_STUNNED), + CREATE_NAMED_ENUM(UNIT_FLAG_IN_COMBAT), + CREATE_NAMED_ENUM(UNIT_FLAG_TAXI_FLIGHT), + CREATE_NAMED_ENUM(UNIT_FLAG_DISARMED), + CREATE_NAMED_ENUM(UNIT_FLAG_CONFUSED), + CREATE_NAMED_ENUM(UNIT_FLAG_FLEEING), + CREATE_NAMED_ENUM(UNIT_FLAG_PLAYER_CONTROLLED), + CREATE_NAMED_ENUM(UNIT_FLAG_NOT_SELECTABLE), + CREATE_NAMED_ENUM(UNIT_FLAG_SKINNABLE), + CREATE_NAMED_ENUM(UNIT_FLAG_MOUNT), + CREATE_NAMED_ENUM(UNIT_FLAG_UNK_28), + CREATE_NAMED_ENUM(UNIT_FLAG_UNK_29), + CREATE_NAMED_ENUM(UNIT_FLAG_SHEATHE), + CREATE_NAMED_ENUM(UNIT_FLAG_UNK_31) }; class npc_commandscript : public CommandScript @@ -163,69 +153,65 @@ public: { static ChatCommand npcAddCommandTable[] = { - { "formation", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleNpcAddFormationCommand, "", NULL }, - { "item", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcAddVendorItemCommand, "", NULL }, - { "move", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcAddMoveCommand, "", NULL }, - { "temp", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcAddTempSpawnCommand, "", NULL }, - //{@todo fix or remove this command - { "weapon", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleNpcAddWeaponCommand, "", NULL }, - //} - { "", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcAddCommand, "", NULL }, - { NULL, RBAC_PERM_PLAYER_COMMANDS, false, NULL, "", NULL } + { "formation", RBAC_PERM_COMMAND_NPC_ADD_FORMATION, false, &HandleNpcAddFormationCommand, "", NULL }, + { "item", RBAC_PERM_COMMAND_NPC_ADD_ITEM, false, &HandleNpcAddVendorItemCommand, "", NULL }, + { "move", RBAC_PERM_COMMAND_NPC_ADD_MOVE, false, &HandleNpcAddMoveCommand, "", NULL }, + { "temp", RBAC_PERM_COMMAND_NPC_ADD_TEMP, false, &HandleNpcAddTempSpawnCommand, "", NULL }, + //{ "weapon", RBAC_PERM_COMMAND_NPC_ADD_WEAPON, false, &HandleNpcAddWeaponCommand, "", NULL }, + { "", RBAC_PERM_COMMAND_NPC_ADD, false, &HandleNpcAddCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand npcDeleteCommandTable[] = { - { "item", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcDeleteVendorItemCommand, "", NULL }, - { "", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcDeleteCommand, "", NULL }, - { NULL, RBAC_PERM_PLAYER_COMMANDS, false, NULL, "", NULL } + { "item", RBAC_PERM_COMMAND_NPC_DELETE_ITEM, false, &HandleNpcDeleteVendorItemCommand, "", NULL }, + { "", RBAC_PERM_COMMAND_NPC_DELETE, false, &HandleNpcDeleteCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand npcFollowCommandTable[] = { - { "stop", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcUnFollowCommand, "", NULL }, - { "", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcFollowCommand, "", NULL }, - { NULL, RBAC_PERM_PLAYER_COMMANDS, false, NULL, "", NULL } + { "stop", RBAC_PERM_COMMAND_NPC_FOLLOW_STOP, false, &HandleNpcUnFollowCommand, "", NULL }, + { "", RBAC_PERM_COMMAND_NPC_FOLLOW, false, &HandleNpcFollowCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand npcSetCommandTable[] = { - { "allowmove", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleNpcSetAllowMovementCommand, "", NULL }, - { "entry", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleNpcSetEntryCommand, "", NULL }, - { "factionid", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcSetFactionIdCommand, "", NULL }, - { "flag", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcSetFlagCommand, "", NULL }, - { "level", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcSetLevelCommand, "", NULL }, - { "link", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcSetLinkCommand, "", NULL }, - { "model", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcSetModelCommand, "", NULL }, - { "movetype", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcSetMoveTypeCommand, "", NULL }, - { "phase", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcSetPhaseCommand, "", NULL }, - { "spawndist", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcSetSpawnDistCommand, "", NULL }, - { "spawntime", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcSetSpawnTimeCommand, "", NULL }, - { "data", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleNpcSetDataCommand, "", NULL }, - //{ @todo fix or remove these commands - { "name", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcSetNameCommand, "", NULL }, - { "subname", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcSetSubNameCommand, "", NULL }, - //} - { NULL, RBAC_PERM_PLAYER_COMMANDS, false, NULL, "", NULL } + { "allowmove", RBAC_PERM_COMMAND_NPC_SET_ALLOWMOVE, false, &HandleNpcSetAllowMovementCommand, "", NULL }, + { "entry", RBAC_PERM_COMMAND_NPC_SET_ENTRY, false, &HandleNpcSetEntryCommand, "", NULL }, + { "factionid", RBAC_PERM_COMMAND_NPC_SET_FACTIONID, false, &HandleNpcSetFactionIdCommand, "", NULL }, + { "flag", RBAC_PERM_COMMAND_NPC_SET_FLAG, false, &HandleNpcSetFlagCommand, "", NULL }, + { "level", RBAC_PERM_COMMAND_NPC_SET_LEVEL, false, &HandleNpcSetLevelCommand, "", NULL }, + { "link", RBAC_PERM_COMMAND_NPC_SET_LINK, false, &HandleNpcSetLinkCommand, "", NULL }, + { "model", RBAC_PERM_COMMAND_NPC_SET_MODEL, false, &HandleNpcSetModelCommand, "", NULL }, + { "movetype", RBAC_PERM_COMMAND_NPC_SET_MOVETYPE, false, &HandleNpcSetMoveTypeCommand, "", NULL }, + { "phase", RBAC_PERM_COMMAND_NPC_SET_PHASE, false, &HandleNpcSetPhaseCommand, "", NULL }, + { "spawndist", RBAC_PERM_COMMAND_NPC_SET_SPAWNDIST, false, &HandleNpcSetSpawnDistCommand, "", NULL }, + { "spawntime", RBAC_PERM_COMMAND_NPC_SET_SPAWNTIME, false, &HandleNpcSetSpawnTimeCommand, "", NULL }, + { "data", RBAC_PERM_COMMAND_NPC_SET_DATA, false, &HandleNpcSetDataCommand, "", NULL }, + //{ "name", RBAC_PERM_COMMAND_NPC_SET_NAME, false, &HandleNpcSetNameCommand, "", NULL }, + //{ "subname", RBAC_PERM_COMMAND_NPC_SET_SUBNAME, false, &HandleNpcSetSubNameCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand npcCommandTable[] = { - { "info", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleNpcInfoCommand, "", NULL }, - { "near", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcNearCommand, "", NULL }, - { "move", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcMoveCommand, "", NULL }, - { "playemote", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleNpcPlayEmoteCommand, "", NULL }, - { "say", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleNpcSayCommand, "", NULL }, - { "textemote", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleNpcTextEmoteCommand, "", NULL }, - { "whisper", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleNpcWhisperCommand, "", NULL }, - { "yell", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleNpcYellCommand, "", NULL }, - { "tame", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleNpcTameCommand, "", NULL }, - { "add", RBAC_PERM_GAMEMASTER_COMMANDS, false, NULL, "", npcAddCommandTable }, - { "delete", RBAC_PERM_GAMEMASTER_COMMANDS, false, NULL, "", npcDeleteCommandTable }, - { "follow", RBAC_PERM_GAMEMASTER_COMMANDS, false, NULL, "", npcFollowCommandTable }, - { "set", RBAC_PERM_GAMEMASTER_COMMANDS, false, NULL, "", npcSetCommandTable }, - { NULL, RBAC_PERM_PLAYER_COMMANDS, false, NULL, "", NULL } + { "info", RBAC_PERM_COMMAND_NPC_INFO, false, &HandleNpcInfoCommand, "", NULL }, + { "near", RBAC_PERM_COMMAND_NPC_NEAR, false, &HandleNpcNearCommand, "", NULL }, + { "move", RBAC_PERM_COMMAND_NPC_MOVE, false, &HandleNpcMoveCommand, "", NULL }, + { "playemote", RBAC_PERM_COMMAND_NPC_PLAYEMOTE, false, &HandleNpcPlayEmoteCommand, "", NULL }, + { "say", RBAC_PERM_COMMAND_NPC_SAY, false, &HandleNpcSayCommand, "", NULL }, + { "textemote", RBAC_PERM_COMMAND_NPC_TEXTEMOTE, false, &HandleNpcTextEmoteCommand, "", NULL }, + { "whisper", RBAC_PERM_COMMAND_NPC_WHISPER, false, &HandleNpcWhisperCommand, "", NULL }, + { "yell", RBAC_PERM_COMMAND_NPC_YELL, false, &HandleNpcYellCommand, "", NULL }, + { "tame", RBAC_PERM_COMMAND_NPC_TAME, false, &HandleNpcTameCommand, "", NULL }, + { "add", RBAC_PERM_COMMAND_NPC_ADD, false, NULL, "", npcAddCommandTable }, + { "delete", RBAC_PERM_COMMAND_NPC_DELETE, false, NULL, "", npcDeleteCommandTable }, + { "follow", RBAC_PERM_COMMAND_NPC_FOLLOW, false, NULL, "", npcFollowCommandTable }, + { "set", RBAC_PERM_COMMAND_NPC_SET, false, NULL, "", npcSetCommandTable }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand commandTable[] = { - { "npc", RBAC_PERM_MODERATOR_COMMANDS, false, NULL, "", npcCommandTable }, - { NULL, RBAC_PERM_PLAYER_COMMANDS, false, NULL, "", NULL } + { "npc", RBAC_PERM_COMMAND_NPC, false, NULL, "", npcCommandTable }, + { NULL, 0, false, NULL, "", NULL } }; return commandTable; } @@ -242,10 +228,15 @@ public: char* team = strtok(NULL, " "); int32 teamval = 0; - if (team) { teamval = atoi(team); } - if (teamval < 0) { teamval = 0; } + if (team) + teamval = atoi(team); + + if (teamval < 0) + teamval = 0; uint32 id = atoi(charID); + if (!sObjectMgr->GetCreatureTemplate(id)) + return false; Player* chr = handler->GetSession()->GetPlayer(); float x = chr->GetPositionX(); @@ -737,8 +728,8 @@ public: handler->PSendSysMessage(LANG_NPCINFO_UNIT_FIELD_FLAGS, target->GetUInt32Value(UNIT_FIELD_FLAGS)); for (uint8 i = 0; i < MAX_UNIT_FLAGS; ++i) - if (target->GetUInt32Value(UNIT_FIELD_FLAGS) & unitFlags[i].flag) - handler->PSendSysMessage(unitFlags[i].text, unitFlags[i].flag); + if (target->GetUInt32Value(UNIT_FIELD_FLAGS) & unitFlags[i].Value) + handler->PSendSysMessage("%s (0x%X)", unitFlags[i].Name, unitFlags[i].Value); handler->PSendSysMessage(LANG_NPCINFO_FLAGS, target->GetUInt32Value(UNIT_FIELD_FLAGS_2), target->GetUInt32Value(UNIT_DYNAMIC_FLAGS), target->getFaction()); handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(), curRespawnDelayStr.c_str()); @@ -750,13 +741,13 @@ public: handler->PSendSysMessage(LANG_NPCINFO_AIINFO, target->GetAIName().c_str(), target->GetScriptName().c_str()); for (uint8 i = 0; i < NPCFLAG_COUNT; i++) - if (npcflags & npcFlagTexts[i].flag) - handler->PSendSysMessage(npcFlagTexts[i].text, npcFlagTexts[i].flag); + if (npcflags & npcFlagTexts[i].Value) + handler->PSendSysMessage(npcFlagTexts[i].Name); handler->PSendSysMessage(LANG_NPCINFO_MECHANIC_IMMUNE, mechanicImmuneMask); for (uint8 i = 0; i < MAX_MECHANIC; ++i) - if ((mechanicImmuneMask << 1) & mechanicImmunes[i].flag) - handler->PSendSysMessage(mechanicImmunes[i].text, mechanicImmunes[i].flag); + if ((mechanicImmuneMask << 1) & mechanicImmunes[i].Value) + handler->PSendSysMessage("%s (0x%X)", mechanicImmunes[i].Name, mechanicImmunes[i].Value); return true; } @@ -1361,6 +1352,9 @@ public: if (!id) return false; + if (!sObjectMgr->GetCreatureTemplate(id)) + return false; + chr->SummonCreature(id, *chr, TEMPSUMMON_CORPSE_DESPAWN, 120); return true; diff --git a/src/server/scripts/Commands/cs_pet.cpp b/src/server/scripts/Commands/cs_pet.cpp new file mode 100644 index 00000000000..315cf06e995 --- /dev/null +++ b/src/server/scripts/Commands/cs_pet.cpp @@ -0,0 +1,190 @@ +/* + * Copyright (C) 2008-2013 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 "Chat.h" +#include "Language.h" +#include "Pet.h" +#include "Player.h" +#include "ObjectMgr.h" +#include "ScriptMgr.h" + +class pet_commandscript : public CommandScript +{ +public: + pet_commandscript() : CommandScript("pet_commandscript") { } + + ChatCommand* GetCommands() const OVERRIDE + { + static ChatCommand petCommandTable[] = + { + { "create", RBAC_PERM_COMMAND_PET_CREATE, false, &HandlePetCreateCommand, "", NULL }, + { "learn", RBAC_PERM_COMMAND_PET_LEARN, false, &HandlePetLearnCommand, "", NULL }, + { "unlearn", RBAC_PERM_COMMAND_PET_UNLEARN, false, &HandlePetUnlearnCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } + }; + + static ChatCommand commandTable[] = + { + { "pet", RBAC_PERM_COMMAND_PET, false, NULL, "", petCommandTable }, + { NULL, 0, false, NULL, "", NULL } + }; + return commandTable; + } + static bool HandlePetCreateCommand(ChatHandler* handler, char const* /*args*/) + { + Player* player = handler->GetSession()->GetPlayer(); + Creature* creatureTarget = handler->getSelectedCreature(); + + if (!creatureTarget || creatureTarget->IsPet() || creatureTarget->GetTypeId() == TYPEID_PLAYER) + { + handler->PSendSysMessage(LANG_SELECT_CREATURE); + handler->SetSentErrorMessage(true); + return false; + } + + CreatureTemplate const* creatrueTemplate = creatureTarget->GetCreatureTemplate(); + // Creatures with family 0 crashes the server + if (!creatrueTemplate->family) + { + handler->PSendSysMessage("This creature cannot be tamed. (family id: 0)."); + handler->SetSentErrorMessage(true); + return false; + } + + if (player->GetPetGUID()) + { + handler->PSendSysMessage("You already have a pet"); + handler->SetSentErrorMessage(true); + return false; + } + + // Everything looks OK, create new pet + Pet* pet = new Pet(player, HUNTER_PET); + if (!pet->CreateBaseAtCreature(creatureTarget)) + { + delete pet; + handler->PSendSysMessage("Error 1"); + return false; + } + + creatureTarget->setDeathState(JUST_DIED); + creatureTarget->RemoveCorpse(); + creatureTarget->SetHealth(0); // just for nice GM-mode view + + pet->SetUInt64Value(UNIT_FIELD_CREATEDBY, player->GetGUID()); + pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, player->getFaction()); + + if (!pet->InitStatsForLevel(creatureTarget->getLevel())) + { + TC_LOG_ERROR(LOG_FILTER_GENERAL, "InitStatsForLevel() in EffectTameCreature failed! Pet deleted."); + handler->PSendSysMessage("Error 2"); + delete pet; + return false; + } + + // prepare visual effect for levelup + pet->SetUInt32Value(UNIT_FIELD_LEVEL, creatureTarget->getLevel()-1); + + pet->GetCharmInfo()->SetPetNumber(sObjectMgr->GeneratePetNumber(), true); + // this enables pet details window (Shift+P) + pet->InitPetCreateSpells(); + pet->SetFullHealth(); + + pet->GetMap()->AddToMap(pet->ToCreature()); + + // visual effect for levelup + pet->SetUInt32Value(UNIT_FIELD_LEVEL, creatureTarget->getLevel()); + + player->SetMinion(pet, true); + pet->SavePetToDB(PET_SAVE_AS_CURRENT); + player->PetSpellInitialize(); + + return true; + } + + static bool HandlePetLearnCommand(ChatHandler* handler, char const* args) + { + if (!*args) + return false; + + Player* player = handler->GetSession()->GetPlayer(); + Pet* pet = player->GetPet(); + + if (!pet) + { + handler->PSendSysMessage("You have no pet"); + handler->SetSentErrorMessage(true); + return false; + } + + uint32 spellId = handler->extractSpellIdFromLink((char*)args); + + if (!spellId || !sSpellMgr->GetSpellInfo(spellId)) + return false; + + // Check if pet already has it + if (pet->HasSpell(spellId)) + { + handler->PSendSysMessage("Pet already has spell: %u", spellId); + handler->SetSentErrorMessage(true); + return false; + } + + // Check if spell is valid + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); + if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo)) + { + handler->PSendSysMessage(LANG_COMMAND_SPELL_BROKEN, spellId); + handler->SetSentErrorMessage(true); + return false; + } + + pet->learnSpell(spellId); + + handler->PSendSysMessage("Pet has learned spell %u", spellId); + return true; + } + + static bool HandlePetUnlearnCommand(ChatHandler* handler, char const* args) + { + if (!*args) + return false; + + Player* player = handler->GetSession()->GetPlayer(); + Pet* pet = player->GetPet(); + if (!pet) + { + handler->PSendSysMessage("You have no pet"); + handler->SetSentErrorMessage(true); + return false; + } + + uint32 spellId = handler->extractSpellIdFromLink((char*)args); + + if (pet->HasSpell(spellId)) + pet->removeSpell(spellId, false); + else + handler->PSendSysMessage("Pet doesn't have that spell"); + + return true; + } +}; + +void AddSC_pet_commandscript() +{ + new pet_commandscript(); +} diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index 20515eb0921..3ad1fea74a2 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -37,16 +37,16 @@ public: { static ChatCommand questCommandTable[] = { - { "add", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleQuestAdd, "", NULL }, - { "complete", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleQuestComplete, "", NULL }, - { "remove", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleQuestRemove, "", NULL }, - { "reward", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleQuestReward, "", NULL }, - { NULL, RBAC_PERM_PLAYER_COMMANDS, false, NULL, "", NULL } + { "add", RBAC_PERM_COMMAND_QUEST_ADD, false, &HandleQuestAdd, "", NULL }, + { "complete", RBAC_PERM_COMMAND_QUEST_COMPLETE, false, &HandleQuestComplete, "", NULL }, + { "remove", RBAC_PERM_COMMAND_QUEST_REMOVE, false, &HandleQuestRemove, "", NULL }, + { "reward", RBAC_PERM_COMMAND_QUEST_REWARD, false, &HandleQuestReward, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand commandTable[] = { - { "quest", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, NULL, "", questCommandTable }, - { NULL, RBAC_PERM_PLAYER_COMMANDS, false, NULL, "", NULL } + { "quest", RBAC_PERM_COMMAND_QUEST, false, NULL, "", questCommandTable }, + { NULL, 0, false, NULL, "", NULL } }; return commandTable; } diff --git a/src/server/scripts/Commands/cs_rbac.cpp b/src/server/scripts/Commands/cs_rbac.cpp index 9c682acb224..ba899fee077 100644 --- a/src/server/scripts/Commands/cs_rbac.cpp +++ b/src/server/scripts/Commands/cs_rbac.cpp @@ -64,7 +64,7 @@ public: { "grant", RBAC_PERM_COMMAND_RBAC_ACC_ROLE_GRANT, true, &HandleRBACRoleGrantCommand, "", NULL },
{ "deny", RBAC_PERM_COMMAND_RBAC_ACC_ROLE_DENY, true, &HandleRBACRoleDenyCommand, "", NULL },
{ "revoke", RBAC_PERM_COMMAND_RBAC_ACC_ROLE_REVOKE, true, &HandleRBACRoleRevokeCommand, "", NULL },
- { "", RBAC_PERM_COMMAND_RBAC_ACC_ROLE, true, &HandleRBACRoleListCommand, "", NULL },
+ { "", RBAC_PERM_COMMAND_RBAC_ACC_ROLE, true, &HandleRBACRoleListCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
@@ -73,7 +73,7 @@ public: { "grant", RBAC_PERM_COMMAND_RBAC_ACC_PERM_GRANT, true, &HandleRBACPermGrantCommand, "", NULL },
{ "deny", RBAC_PERM_COMMAND_RBAC_ACC_PERM_DENY, true, &HandleRBACPermDenyCommand, "", NULL },
{ "revoke", RBAC_PERM_COMMAND_RBAC_ACC_PERM_REVOKE, true, &HandleRBACPermRevokeCommand, "", NULL },
- { "", RBAC_PERM_COMMAND_RBAC_ACC_PERM, true, &HandleRBACPermListCommand, "", NULL },
+ { "", RBAC_PERM_COMMAND_RBAC_ACC_PERM, true, &HandleRBACPermListCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 36b1c76110d..901a331b4b4 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -51,120 +51,120 @@ public: { static ChatCommand reloadAllCommandTable[] = { - { "achievement", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAllAchievementCommand, "", NULL }, - { "area", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAllAreaCommand, "", NULL }, - { "eventai", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAllEventAICommand, "", NULL }, - { "gossips", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAllGossipsCommand, "", NULL }, - { "item", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAllItemCommand, "", NULL }, - { "locales", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAllLocalesCommand, "", NULL }, - { "loot", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAllLootCommand, "", NULL }, - { "npc", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAllNpcCommand, "", NULL }, - { "quest", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAllQuestCommand, "", NULL }, - { "scripts", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAllScriptsCommand, "", NULL }, - { "spell", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAllSpellCommand, "", NULL }, - { "", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAllCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { "achievement", RBAC_PERM_COMMANDS_RELOAD_ALL_ACHIEVEMENT, true, &HandleReloadAllAchievementCommand, "", NULL }, + { "area", RBAC_PERM_COMMANDS_RELOAD_ALL_AREA, true, &HandleReloadAllAreaCommand, "", NULL }, + { "eventai", RBAC_PERM_COMMANDS_RELOAD_ALL_EVENTAI, true, &HandleReloadAllEventAICommand, "", NULL }, + { "gossips", RBAC_PERM_COMMANDS_RELOAD_ALL_GOSSIP, true, &HandleReloadAllGossipsCommand, "", NULL }, + { "item", RBAC_PERM_COMMANDS_RELOAD_ALL_ITEM, true, &HandleReloadAllItemCommand, "", NULL }, + { "locales", RBAC_PERM_COMMANDS_RELOAD_ALL_LOCALES, true, &HandleReloadAllLocalesCommand, "", NULL }, + { "loot", RBAC_PERM_COMMANDS_RELOAD_ALL_LOOT, true, &HandleReloadAllLootCommand, "", NULL }, + { "npc", RBAC_PERM_COMMANDS_RELOAD_ALL_NPC, true, &HandleReloadAllNpcCommand, "", NULL }, + { "quest", RBAC_PERM_COMMANDS_RELOAD_ALL_QUEST, true, &HandleReloadAllQuestCommand, "", NULL }, + { "scripts", RBAC_PERM_COMMANDS_RELOAD_ALL_SCRIPTS, true, &HandleReloadAllScriptsCommand, "", NULL }, + { "spell", RBAC_PERM_COMMANDS_RELOAD_ALL_SPELL, true, &HandleReloadAllSpellCommand, "", NULL }, + { "", RBAC_PERM_COMMANDS_RELOAD_ALL, true, &HandleReloadAllCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand reloadCommandTable[] = { - { "auctions", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAuctionsCommand, "", NULL }, - { "access_requirement", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAccessRequirementCommand, "", NULL }, - { "achievement_criteria_data", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAchievementCriteriaDataCommand, "", NULL }, - { "achievement_reward", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAchievementRewardCommand, "", NULL }, - { "all", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, NULL, "", reloadAllCommandTable }, - { "areatrigger_involvedrelation", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadQuestAreaTriggersCommand, "", NULL }, - { "areatrigger_tavern", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAreaTriggerTavernCommand, "", NULL }, - { "areatrigger_teleport", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAreaTriggerTeleportCommand, "", NULL }, - { "autobroadcast", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadAutobroadcastCommand, "", NULL }, - { "command", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadCommandCommand, "", NULL }, - { "conditions", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadConditions, "", NULL }, - { "config", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadConfigCommand, "", NULL }, - { "creature_text", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadCreatureText, "", NULL }, - { "creature_ai_scripts", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadEventAIScriptsCommand, "", NULL }, - { "creature_ai_texts", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadEventAITextsCommand, "", NULL }, - { "creature_questender", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadCreatureQuestEnderCommand, "", NULL }, - { "creature_linked_respawn", RBAC_PERM_GAMEMASTER_COMMANDS, true, &HandleReloadLinkedRespawnCommand, "", NULL }, - { "creature_loot_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLootTemplatesCreatureCommand, "", NULL }, - { "creature_onkill_reputation", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadOnKillReputationCommand, "", NULL }, - { "creature_queststarter", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadCreatureQuestStarterCommand, "", NULL }, - { "creature_summon_groups", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadCreatureSummonGroupsCommand, "", NULL }, - { "creature_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadCreatureTemplateCommand, "", NULL }, - //{ "db_script_string", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadDbScriptStringCommand, "", NULL }, - { "disables", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadDisablesCommand, "", NULL }, - { "disenchant_loot_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLootTemplatesDisenchantCommand, "", NULL }, - { "event_scripts", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadEventScriptsCommand, "", NULL }, - { "fishing_loot_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLootTemplatesFishingCommand, "", NULL }, - { "game_graveyard_zone", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadGameGraveyardZoneCommand, "", NULL }, - { "game_tele", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadGameTeleCommand, "", NULL }, - { "gameobject_questender", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadGOQuestEnderCommand, "", NULL }, - { "gameobject_loot_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLootTemplatesGameobjectCommand, "", NULL }, - { "gameobject_queststarter", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadGOQuestStarterCommand, "", NULL }, - { "gm_tickets", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadGMTicketsCommand, "", NULL }, - { "gossip_menu", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadGossipMenuCommand, "", NULL }, - { "gossip_menu_option", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadGossipMenuOptionCommand, "", NULL }, - { "item_enchantment_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadItemEnchantementsCommand, "", NULL }, - { "item_loot_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLootTemplatesItemCommand, "", NULL }, - { "item_set_names", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadItemSetNamesCommand, "", NULL }, - { "lfg_dungeon_rewards", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLfgRewardsCommand, "", NULL }, - { "locales_achievement_reward", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLocalesAchievementRewardCommand, "", NULL }, - { "locales_creature", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLocalesCreatureCommand, "", NULL }, - { "locales_creature_text", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLocalesCreatureTextCommand, "", NULL }, - { "locales_gameobject", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLocalesGameobjectCommand, "", NULL }, - { "locales_gossip_menu_option", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLocalesGossipMenuOptionCommand, "", NULL }, - { "locales_item", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLocalesItemCommand, "", NULL }, - { "locales_item_set_name", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLocalesItemSetNameCommand, "", NULL }, - { "locales_npc_text", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLocalesNpcTextCommand, "", NULL }, - { "locales_page_text", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLocalesPageTextCommand, "", NULL }, - { "locales_points_of_interest", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLocalesPointsOfInterestCommand, "", NULL }, - { "locales_quest", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLocalesQuestCommand, "", NULL }, - { "mail_level_reward", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadMailLevelRewardCommand, "", NULL }, - { "mail_loot_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLootTemplatesMailCommand, "", NULL }, - { "milling_loot_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLootTemplatesMillingCommand, "", NULL }, - { "npc_spellclick_spells", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSpellClickSpellsCommand, "", NULL}, - { "npc_trainer", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadNpcTrainerCommand, "", NULL }, - { "npc_vendor", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadNpcVendorCommand, "", NULL }, - { "page_text", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadPageTextsCommand, "", NULL }, - { "pickpocketing_loot_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLootTemplatesPickpocketingCommand, "", NULL}, - { "points_of_interest", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadPointsOfInterestCommand, "", NULL }, - { "prospecting_loot_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLootTemplatesProspectingCommand, "", NULL }, - { "quest_poi", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadQuestPOICommand, "", NULL }, - { "quest_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadQuestTemplateCommand, "", NULL }, - { "rbac", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadRBACCommand, "", NULL }, - { "reference_loot_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLootTemplatesReferenceCommand, "", NULL }, - { "reserved_name", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadReservedNameCommand, "", NULL }, - { "reputation_reward_rate", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadReputationRewardRateCommand, "", NULL }, - { "reputation_spillover_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadReputationRewardRateCommand, "", NULL }, - { "skill_discovery_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSkillDiscoveryTemplateCommand, "", NULL }, - { "skill_extra_item_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSkillExtraItemTemplateCommand, "", NULL }, - { "skill_fishing_base_level", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSkillFishingBaseLevelCommand, "", NULL }, - { "skinning_loot_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLootTemplatesSkinningCommand, "", NULL }, - { "smart_scripts", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSmartScripts, "", NULL }, - { "spell_required", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSpellRequiredCommand, "", NULL }, - { "spell_area", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSpellAreaCommand, "", NULL }, - { "spell_bonus_data", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSpellBonusesCommand, "", NULL }, - { "spell_group", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSpellGroupsCommand, "", NULL }, - { "spell_learn_spell", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSpellLearnSpellCommand, "", NULL }, - { "spell_loot_template", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadLootTemplatesSpellCommand, "", NULL }, - { "spell_linked_spell", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSpellLinkedSpellCommand, "", NULL }, - { "spell_pet_auras", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSpellPetAurasCommand, "", NULL }, - { "spell_proc_event", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSpellProcEventCommand, "", NULL }, - { "spell_proc", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSpellProcsCommand, "", NULL }, - { "spell_scripts", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSpellScriptsCommand, "", NULL }, - { "spell_target_position", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSpellTargetPositionCommand, "", NULL }, - { "spell_threats", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSpellThreatsCommand, "", NULL }, - { "spell_group_stack_rules", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadSpellGroupStackRulesCommand, "", NULL }, - { "trinity_string", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadTrinityStringCommand, "", NULL }, - { "warden_action", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadWardenactionCommand, "", NULL }, - { "waypoint_scripts", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadWpScriptsCommand, "", NULL }, - { "waypoint_data", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadWpCommand, "", NULL }, - { "vehicle_accessory", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadVehicleAccessoryCommand, "", NULL }, - { "vehicle_template_accessory", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleReloadVehicleTemplateAccessoryCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { "auctions", RBAC_PERM_COMMANDS_RELOAD_AUCTIONS, true, &HandleReloadAuctionsCommand, "", NULL }, + { "access_requirement", RBAC_PERM_COMMANDS_RELOAD_ACCESS_REQUIREMENT, true, &HandleReloadAccessRequirementCommand, "", NULL }, + { "achievement_criteria_data", RBAC_PERM_COMMANDS_RELOAD_ACHIEVEMENT_CRITERIA_DATA, true, &HandleReloadAchievementCriteriaDataCommand, "", NULL }, + { "achievement_reward", RBAC_PERM_COMMANDS_RELOAD_ACHIEVEMENT_REWARD, true, &HandleReloadAchievementRewardCommand, "", NULL }, + { "all", RBAC_PERM_COMMANDS_RELOAD_ALL, true, NULL, "", reloadAllCommandTable }, + { "areatrigger_involvedrelation", RBAC_PERM_COMMANDS_RELOAD_AREATRIGGER_INVOLVEDRELATION, true, &HandleReloadQuestAreaTriggersCommand, "", NULL }, + { "areatrigger_tavern", RBAC_PERM_COMMANDS_RELOAD_AREATRIGGER_TAVERN, true, &HandleReloadAreaTriggerTavernCommand, "", NULL }, + { "areatrigger_teleport", RBAC_PERM_COMMANDS_RELOAD_AREATRIGGER_TELEPORT, true, &HandleReloadAreaTriggerTeleportCommand, "", NULL }, + { "autobroadcast", RBAC_PERM_COMMANDS_RELOAD_AUTOBROADCAST, true, &HandleReloadAutobroadcastCommand, "", NULL }, + { "command", RBAC_PERM_COMMANDS_RELOAD_COMMAND, true, &HandleReloadCommandCommand, "", NULL }, + { "conditions", RBAC_PERM_COMMANDS_RELOAD_CONDITIONS, true, &HandleReloadConditions, "", NULL }, + { "config", RBAC_PERM_COMMANDS_RELOAD_CONFIG, true, &HandleReloadConfigCommand, "", NULL }, + { "creature_text", RBAC_PERM_COMMANDS_RELOAD_CREATURE_TEXT, true, &HandleReloadCreatureText, "", NULL }, + { "creature_ai_scripts", RBAC_PERM_COMMANDS_RELOAD_CREATURE_AI_SCRIPTS, true, &HandleReloadEventAIScriptsCommand, "", NULL }, + { "creature_ai_texts", RBAC_PERM_COMMANDS_RELOAD_CREATURE_AI_TEXTS, true, &HandleReloadEventAITextsCommand, "", NULL }, + { "creature_questender", RBAC_PERM_COMMANDS_RELOAD_CREATURE_QUESTENDER, true, &HandleReloadCreatureQuestEnderCommand, "", NULL }, + { "creature_linked_respawn", RBAC_PERM_COMMANDS_RELOAD_CREATURE_LINKED_RESPAWN, true, &HandleReloadLinkedRespawnCommand, "", NULL }, + { "creature_loot_template", RBAC_PERM_COMMANDS_RELOAD_CREATURE_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesCreatureCommand, "", NULL }, + { "creature_onkill_reputation", RBAC_PERM_COMMANDS_RELOAD_CREATURE_ONKILL_REPUTATION, true, &HandleReloadOnKillReputationCommand, "", NULL }, + { "creature_queststarter", RBAC_PERM_COMMANDS_RELOAD_CREATURE_QUESTSTARTER, true, &HandleReloadCreatureQuestStarterCommand, "", NULL }, + { "creature_summon_groups", RBAC_PERM_COMMANDS_RELOAD_CREATURE_SUMMON_GROUPS, true, &HandleReloadCreatureSummonGroupsCommand, "", NULL }, + { "creature_template", RBAC_PERM_COMMANDS_RELOAD_CREATURE_TEMPLATE, true, &HandleReloadCreatureTemplateCommand, "", NULL }, + //{ "db_script_string", RBAC_PERM_COMMANDS_RELOAD_, true, &HandleReloadDbScriptStringCommand, "", NULL }, + { "disables", RBAC_PERM_COMMANDS_RELOAD_DISABLES, true, &HandleReloadDisablesCommand, "", NULL }, + { "disenchant_loot_template", RBAC_PERM_COMMANDS_RELOAD_DISENCHANT_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesDisenchantCommand, "", NULL }, + { "event_scripts", RBAC_PERM_COMMANDS_RELOAD_EVENT_SCRIPTS, true, &HandleReloadEventScriptsCommand, "", NULL }, + { "fishing_loot_template", RBAC_PERM_COMMANDS_RELOAD_FISHING_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesFishingCommand, "", NULL }, + { "game_graveyard_zone", RBAC_PERM_COMMANDS_RELOAD_GAME_GRAVEYARD_ZONE, true, &HandleReloadGameGraveyardZoneCommand, "", NULL }, + { "game_tele", RBAC_PERM_COMMANDS_RELOAD_GAME_TELE, true, &HandleReloadGameTeleCommand, "", NULL }, + { "gameobject_questender", RBAC_PERM_COMMANDS_RELOAD_GAMEOBJECT_QUESTENDER, true, &HandleReloadGOQuestEnderCommand, "", NULL }, + { "gameobject_loot_template", RBAC_PERM_COMMANDS_RELOAD_GAMEOBJECT_QUEST_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesGameobjectCommand, "", NULL }, + { "gameobject_queststarter", RBAC_PERM_COMMANDS_RELOAD_GAMEOBJECT_QUESTSTARTER, true, &HandleReloadGOQuestStarterCommand, "", NULL }, + { "gm_tickets", RBAC_PERM_COMMANDS_RELOAD_GM_TICKETS, true, &HandleReloadGMTicketsCommand, "", NULL }, + { "gossip_menu", RBAC_PERM_COMMANDS_RELOAD_GOSSIP_MENU, true, &HandleReloadGossipMenuCommand, "", NULL }, + { "gossip_menu_option", RBAC_PERM_COMMANDS_RELOAD_GOSSIP_MENU_OPTION, true, &HandleReloadGossipMenuOptionCommand, "", NULL }, + { "item_enchantment_template", RBAC_PERM_COMMANDS_RELOAD_ITEM_ENCHANTMENT_TEMPLATE, true, &HandleReloadItemEnchantementsCommand, "", NULL }, + { "item_loot_template", RBAC_PERM_COMMANDS_RELOAD_ITEM_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesItemCommand, "", NULL }, + { "item_set_names", RBAC_PERM_COMMANDS_RELOAD_ITEM_SET_NAMES, true, &HandleReloadItemSetNamesCommand, "", NULL }, + { "lfg_dungeon_rewards", RBAC_PERM_COMMANDS_RELOAD_LFG_DUNGEON_REWARDS, true, &HandleReloadLfgRewardsCommand, "", NULL }, + { "locales_achievement_reward", RBAC_PERM_COMMANDS_RELOAD_LOCALES_ACHIEVEMENT_REWARD, true, &HandleReloadLocalesAchievementRewardCommand, "", NULL }, + { "locales_creature", RBAC_PERM_COMMANDS_RELOAD_LOCALES_CRETURE, true, &HandleReloadLocalesCreatureCommand, "", NULL }, + { "locales_creature_text", RBAC_PERM_COMMANDS_RELOAD_LOCALES_CRETURE_TEXT, true, &HandleReloadLocalesCreatureTextCommand, "", NULL }, + { "locales_gameobject", RBAC_PERM_COMMANDS_RELOAD_LOCALES_GAMEOBJECT, true, &HandleReloadLocalesGameobjectCommand, "", NULL }, + { "locales_gossip_menu_option", RBAC_PERM_COMMANDS_RELOAD_LOCALES_GOSSIP_MENU_OPTION, true, &HandleReloadLocalesGossipMenuOptionCommand, "", NULL }, + { "locales_item", RBAC_PERM_COMMANDS_RELOAD_LOCALES_ITEM, true, &HandleReloadLocalesItemCommand, "", NULL }, + { "locales_item_set_name", RBAC_PERM_COMMANDS_RELOAD_LOCALES_ITEM_SET_NAME, true, &HandleReloadLocalesItemSetNameCommand, "", NULL }, + { "locales_npc_text", RBAC_PERM_COMMANDS_RELOAD_LOCALES_NPC_TEXT, true, &HandleReloadLocalesNpcTextCommand, "", NULL }, + { "locales_page_text", RBAC_PERM_COMMANDS_RELOAD_LOCALES_PAGE_TEXT, true, &HandleReloadLocalesPageTextCommand, "", NULL }, + { "locales_points_of_interest", RBAC_PERM_COMMANDS_RELOAD_LOCALES_POINTS_OF_INTEREST, true, &HandleReloadLocalesPointsOfInterestCommand, "", NULL }, + { "locales_quest", RBAC_PERM_COMMANDS_RELOAD_LOCALES_QUEST, true, &HandleReloadLocalesQuestCommand, "", NULL }, + { "mail_level_reward", RBAC_PERM_COMMANDS_RELOAD_MAIL_LEVEL_REWARD, true, &HandleReloadMailLevelRewardCommand, "", NULL }, + { "mail_loot_template", RBAC_PERM_COMMANDS_RELOAD_MAIL_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesMailCommand, "", NULL }, + { "milling_loot_template", RBAC_PERM_COMMANDS_RELOAD_MILLING_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesMillingCommand, "", NULL }, + { "npc_spellclick_spells", RBAC_PERM_COMMANDS_RELOAD_NPC_SPELLCLICK_SPELLS, true, &HandleReloadSpellClickSpellsCommand, "", NULL}, + { "npc_trainer", RBAC_PERM_COMMANDS_RELOAD_NPC_TRAINER, true, &HandleReloadNpcTrainerCommand, "", NULL }, + { "npc_vendor", RBAC_PERM_COMMANDS_RELOAD_NPC_VENDOR, true, &HandleReloadNpcVendorCommand, "", NULL }, + { "page_text", RBAC_PERM_COMMANDS_RELOAD_PAGE_TEXT, true, &HandleReloadPageTextsCommand, "", NULL }, + { "pickpocketing_loot_template", RBAC_PERM_COMMANDS_RELOAD_PICKPOCKETING_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesPickpocketingCommand, "", NULL}, + { "points_of_interest", RBAC_PERM_COMMANDS_RELOAD_POINTS_OF_INTEREST, true, &HandleReloadPointsOfInterestCommand, "", NULL }, + { "prospecting_loot_template", RBAC_PERM_COMMANDS_RELOAD_PROSPECTING_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesProspectingCommand, "", NULL }, + { "quest_poi", RBAC_PERM_COMMANDS_RELOAD_QUEST_POI, true, &HandleReloadQuestPOICommand, "", NULL }, + { "quest_template", RBAC_PERM_COMMANDS_RELOAD_QUEST_TEMPLATE, true, &HandleReloadQuestTemplateCommand, "", NULL }, + { "rbac", RBAC_PERM_COMMANDS_RELOAD_RBAC, true, &HandleReloadRBACCommand, "", NULL }, + { "reference_loot_template", RBAC_PERM_COMMANDS_RELOAD_REFERENCE_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesReferenceCommand, "", NULL }, + { "reserved_name", RBAC_PERM_COMMANDS_RELOAD_RESERVED_NAME, true, &HandleReloadReservedNameCommand, "", NULL }, + { "reputation_reward_rate", RBAC_PERM_COMMANDS_RELOAD_REPUTATION_REWARD_RATE, true, &HandleReloadReputationRewardRateCommand, "", NULL }, + { "reputation_spillover_template", RBAC_PERM_COMMANDS_RELOAD_SPILLOVER_TEMPLATE, true, &HandleReloadReputationRewardRateCommand, "", NULL }, + { "skill_discovery_template", RBAC_PERM_COMMANDS_RELOAD_SKILL_DISCOVERY_TEMPLATE, true, &HandleReloadSkillDiscoveryTemplateCommand, "", NULL }, + { "skill_extra_item_template", RBAC_PERM_COMMANDS_RELOAD_SKILL_EXTRA_ITEM_TEMPLATE, true, &HandleReloadSkillExtraItemTemplateCommand, "", NULL }, + { "skill_fishing_base_level", RBAC_PERM_COMMANDS_RELOAD_SKILL_FISHING_BASE_LEVEL, true, &HandleReloadSkillFishingBaseLevelCommand, "", NULL }, + { "skinning_loot_template", RBAC_PERM_COMMANDS_RELOAD_SKINNING_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesSkinningCommand, "", NULL }, + { "smart_scripts", RBAC_PERM_COMMANDS_RELOAD_SMART_SCRIPTS, true, &HandleReloadSmartScripts, "", NULL }, + { "spell_required", RBAC_PERM_COMMANDS_RELOAD_SPELL_REQUIRED, true, &HandleReloadSpellRequiredCommand, "", NULL }, + { "spell_area", RBAC_PERM_COMMANDS_RELOAD_SPELL_AREA, true, &HandleReloadSpellAreaCommand, "", NULL }, + { "spell_bonus_data", RBAC_PERM_COMMANDS_RELOAD_SPELL_BONUS_DATA, true, &HandleReloadSpellBonusesCommand, "", NULL }, + { "spell_group", RBAC_PERM_COMMANDS_RELOAD_SPELL_GROUP, true, &HandleReloadSpellGroupsCommand, "", NULL }, + { "spell_learn_spell", RBAC_PERM_COMMANDS_RELOAD_SPELL_LEARN_SPELL, true, &HandleReloadSpellLearnSpellCommand, "", NULL }, + { "spell_loot_template", RBAC_PERM_COMMANDS_RELOAD_SPELL_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesSpellCommand, "", NULL }, + { "spell_linked_spell", RBAC_PERM_COMMANDS_RELOAD_SPELL_LINKED_SPELL, true, &HandleReloadSpellLinkedSpellCommand, "", NULL }, + { "spell_pet_auras", RBAC_PERM_COMMANDS_RELOAD_SPELL_PET_AURAS, true, &HandleReloadSpellPetAurasCommand, "", NULL }, + { "spell_proc_event", RBAC_PERM_COMMANDS_RELOAD_SPELL_PROC_EVENT, true, &HandleReloadSpellProcEventCommand, "", NULL }, + { "spell_proc", RBAC_PERM_COMMANDS_RELOAD_SPELL_PROC, true, &HandleReloadSpellProcsCommand, "", NULL }, + { "spell_scripts", RBAC_PERM_COMMANDS_RELOAD_SPELL_SCRIPTS, true, &HandleReloadSpellScriptsCommand, "", NULL }, + { "spell_target_position", RBAC_PERM_COMMANDS_RELOAD_SPELL_TARGET_POSITION, true, &HandleReloadSpellTargetPositionCommand, "", NULL }, + { "spell_threats", RBAC_PERM_COMMANDS_RELOAD_SPELL_THREATS, true, &HandleReloadSpellThreatsCommand, "", NULL }, + { "spell_group_stack_rules", RBAC_PERM_COMMANDS_RELOAD_SPELL_GROUP_STACK_RULES, true, &HandleReloadSpellGroupStackRulesCommand, "", NULL }, + { "trinity_string", RBAC_PERM_COMMANDS_RELOAD_TRINITY_STRING, true, &HandleReloadTrinityStringCommand, "", NULL }, + { "warden_action", RBAC_PERM_COMMANDS_RELOAD_WARDEN_ACTION, true, &HandleReloadWardenactionCommand, "", NULL }, + { "waypoint_scripts", RBAC_PERM_COMMANDS_RELOAD_WAYPOINT_SCRIPTS, true, &HandleReloadWpScriptsCommand, "", NULL }, + { "waypoint_data", RBAC_PERM_COMMANDS_RELOAD_WAYPOINT_DATA, true, &HandleReloadWpCommand, "", NULL }, + { "vehicle_accessory", RBAC_PERM_COMMANDS_RELOAD_VEHICLE_ACCESORY, true, &HandleReloadVehicleAccessoryCommand, "", NULL }, + { "vehicle_template_accessory", RBAC_PERM_COMMANDS_RELOAD_VEHICLE_TEMPLATE_ACCESSORY, true, &HandleReloadVehicleTemplateAccessoryCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand commandTable[] = { - { "reload", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, NULL, "", reloadCommandTable }, - { NULL, 0, false, NULL, "", NULL } + { "reload", RBAC_PERM_COMMANDS_RELOAD, true, NULL, "", reloadCommandTable }, + { NULL, 0, false, NULL, "", NULL } }; return commandTable; } diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index 3c95ceae4be..9b0b19bc51c 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -39,19 +39,19 @@ public: { static ChatCommand resetCommandTable[] = { - { "achievements", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleResetAchievementsCommand, "", NULL }, - { "honor", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleResetHonorCommand, "", NULL }, - { "level", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleResetLevelCommand, "", NULL }, - { "spells", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleResetSpellsCommand, "", NULL }, - { "stats", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleResetStatsCommand, "", NULL }, - { "talents", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleResetTalentsCommand, "", NULL }, - { "all", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleResetAllCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { "achievements", RBAC_PERM_COMMAND_RESET_ACHIEVEMENTS, true, &HandleResetAchievementsCommand, "", NULL }, + { "honor", RBAC_PERM_COMMAND_RESET_HONOR, true, &HandleResetHonorCommand, "", NULL }, + { "level", RBAC_PERM_COMMAND_RESET_LEVEL, true, &HandleResetLevelCommand, "", NULL }, + { "spells", RBAC_PERM_COMMAND_RESET_SPELLS, true, &HandleResetSpellsCommand, "", NULL }, + { "stats", RBAC_PERM_COMMAND_RESET_STATS, true, &HandleResetStatsCommand, "", NULL }, + { "talents", RBAC_PERM_COMMAND_RESET_TALENTS, true, &HandleResetTalentsCommand, "", NULL }, + { "all", RBAC_PERM_COMMAND_RESET_ALL, true, &HandleResetAllCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand commandTable[] = { - { "reset", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, NULL, "", resetCommandTable }, - { NULL, 0, false, NULL, "", NULL } + { "reset", RBAC_PERM_COMMAND_RESET, true, NULL, "", resetCommandTable }, + { NULL, 0, false, NULL, "", NULL } }; return commandTable; } diff --git a/src/server/scripts/Commands/cs_send.cpp b/src/server/scripts/Commands/cs_send.cpp new file mode 100644 index 00000000000..5d50113249a --- /dev/null +++ b/src/server/scripts/Commands/cs_send.cpp @@ -0,0 +1,289 @@ +/* + * Copyright (C) 2008-2013 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 "Chat.h" +#include "Language.h" +#include "Pet.h" +#include "Player.h" +#include "ObjectMgr.h" +#include "ScriptMgr.h" + +class send_commandscript : public CommandScript +{ +public: + send_commandscript() : CommandScript("send_commandscript") { } + + ChatCommand* GetCommands() const OVERRIDE + { + static ChatCommand sendCommandTable[] = + { + { "items", RBAC_PERM_COMMAND_SEND_ITEMS, true, &HandleSendItemsCommand, "", NULL }, + { "mail", RBAC_PERM_COMMAND_SEND_MAIL, true, &HandleSendMailCommand, "", NULL }, + { "message", RBAC_PERM_COMMAND_SEND_MESSAGE, true, &HandleSendMessageCommand, "", NULL }, + { "money", RBAC_PERM_COMMAND_SEND_MONEY, true, &HandleSendMoneyCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } + }; + + static ChatCommand commandTable[] = + { + { "send", RBAC_PERM_COMMAND_SEND, false, NULL, "", sendCommandTable }, + { NULL, 0, false, NULL, "", NULL } + }; + return commandTable; + } + + // Send mail by command + static bool HandleSendMailCommand(ChatHandler* handler, char const* args) + { + // format: name "subject text" "mail text" + Player* target; + uint64 targetGuid; + std::string targetName; + if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName)) + return false; + + char* tail1 = strtok(NULL, ""); + if (!tail1) + return false; + + char const* msgSubject = handler->extractQuotedArg(tail1); + if (!msgSubject) + return false; + + char* tail2 = strtok(NULL, ""); + if (!tail2) + return false; + + char const* msgText = handler->extractQuotedArg(tail2); + if (!msgText) + return false; + + // msgSubject, msgText isn't NUL after prev. check + std::string subject = msgSubject; + std::string text = msgText; + + // from console show not existed sender + MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUIDLow() : 0, MAIL_STATIONERY_GM); + + /// @todo Fix poor design + SQLTransaction trans = CharacterDatabase.BeginTransaction(); + MailDraft(subject, text) + .SendMailTo(trans, MailReceiver(target, GUID_LOPART(targetGuid)), sender); + + CharacterDatabase.CommitTransaction(trans); + + std::string nameLink = handler->playerLink(targetName); + handler->PSendSysMessage(LANG_MAIL_SENT, nameLink.c_str()); + return true; + } + + // Send items by mail + static bool HandleSendItemsCommand(ChatHandler* handler, char const* args) + { + // format: name "subject text" "mail text" item1[:count1] item2[:count2] ... item12[:count12] + Player* receiver; + uint64 receiverGuid; + std::string receiverName; + if (!handler->extractPlayerTarget((char*)args, &receiver, &receiverGuid, &receiverName)) + return false; + + char* tail1 = strtok(NULL, ""); + if (!tail1) + return false; + + char const* msgSubject = handler->extractQuotedArg(tail1); + if (!msgSubject) + return false; + + char* tail2 = strtok(NULL, ""); + if (!tail2) + return false; + + char const* msgText = handler->extractQuotedArg(tail2); + if (!msgText) + return false; + + // msgSubject, msgText isn't NUL after prev. check + std::string subject = msgSubject; + std::string text = msgText; + + // extract items + typedef std::pair<uint32, uint32> ItemPair; + typedef std::list< ItemPair > ItemPairs; + ItemPairs items; + + // get all tail string + char* tail = strtok(NULL, ""); + + // get from tail next item str + while (char* itemStr = strtok(tail, " ")) + { + // and get new tail + tail = strtok(NULL, ""); + + // parse item str + char const* itemIdStr = strtok(itemStr, ":"); + char const* itemCountStr = strtok(NULL, " "); + + uint32 itemId = atoi(itemIdStr); + if (!itemId) + return false; + + ItemTemplate const* item_proto = sObjectMgr->GetItemTemplate(itemId); + if (!item_proto) + { + handler->PSendSysMessage(LANG_COMMAND_ITEMIDINVALID, itemId); + handler->SetSentErrorMessage(true); + return false; + } + + uint32 itemCount = itemCountStr ? atoi(itemCountStr) : 1; + if (itemCount < 1 || (item_proto->MaxCount > 0 && itemCount > uint32(item_proto->MaxCount))) + { + handler->PSendSysMessage(LANG_COMMAND_INVALID_ITEM_COUNT, itemCount, itemId); + handler->SetSentErrorMessage(true); + return false; + } + + while (itemCount > item_proto->GetMaxStackSize()) + { + items.push_back(ItemPair(itemId, item_proto->GetMaxStackSize())); + itemCount -= item_proto->GetMaxStackSize(); + } + + items.push_back(ItemPair(itemId, itemCount)); + + if (items.size() > MAX_MAIL_ITEMS) + { + handler->PSendSysMessage(LANG_COMMAND_MAIL_ITEMS_LIMIT, MAX_MAIL_ITEMS); + handler->SetSentErrorMessage(true); + return false; + } + } + + // from console show not existed sender + MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUIDLow() : 0, MAIL_STATIONERY_GM); + + // fill mail + MailDraft draft(subject, text); + + SQLTransaction trans = CharacterDatabase.BeginTransaction(); + + for (ItemPairs::const_iterator itr = items.begin(); itr != items.end(); ++itr) + { + if (Item* item = Item::CreateItem(itr->first, itr->second, handler->GetSession() ? handler->GetSession()->GetPlayer() : 0)) + { + item->SaveToDB(trans); // save for prevent lost at next mail load, if send fail then item will deleted + draft.AddItem(item); + } + } + + draft.SendMailTo(trans, MailReceiver(receiver, GUID_LOPART(receiverGuid)), sender); + CharacterDatabase.CommitTransaction(trans); + + std::string nameLink = handler->playerLink(receiverName); + handler->PSendSysMessage(LANG_MAIL_SENT, nameLink.c_str()); + return true; + } + /// Send money by mail + static bool HandleSendMoneyCommand(ChatHandler* handler, char const* args) + { + /// format: name "subject text" "mail text" money + + Player* receiver; + uint64 receiverGuid; + std::string receiverName; + if (!handler->extractPlayerTarget((char*)args, &receiver, &receiverGuid, &receiverName)) + return false; + + char* tail1 = strtok(NULL, ""); + if (!tail1) + return false; + + char* msgSubject = handler->extractQuotedArg(tail1); + if (!msgSubject) + return false; + + char* tail2 = strtok(NULL, ""); + if (!tail2) + return false; + + char* msgText = handler->extractQuotedArg(tail2); + if (!msgText) + return false; + + char* moneyStr = strtok(NULL, ""); + int32 money = moneyStr ? atoi(moneyStr) : 0; + if (money <= 0) + return false; + + // msgSubject, msgText isn't NUL after prev. check + std::string subject = msgSubject; + std::string text = msgText; + + // from console show not existed sender + MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUIDLow() : 0, MAIL_STATIONERY_GM); + + SQLTransaction trans = CharacterDatabase.BeginTransaction(); + + MailDraft(subject, text) + .AddMoney(money) + .SendMailTo(trans, MailReceiver(receiver, GUID_LOPART(receiverGuid)), sender); + + CharacterDatabase.CommitTransaction(trans); + + std::string nameLink = handler->playerLink(receiverName); + handler->PSendSysMessage(LANG_MAIL_SENT, nameLink.c_str()); + return true; + } + /// Send a message to a player in game + static bool HandleSendMessageCommand(ChatHandler* handler, char const* args) + { + /// - Find the player + Player* player; + if (!handler->extractPlayerTarget((char*)args, &player)) + return false; + + char* msgStr = strtok(NULL, ""); + if (!msgStr) + return false; + + ///- Check that he is not logging out. + if (player->GetSession()->isLogingOut()) + { + handler->SendSysMessage(LANG_PLAYER_NOT_FOUND); + handler->SetSentErrorMessage(true); + return false; + } + + /// - Send the message + // Use SendAreaTriggerMessage for fastest delivery. + player->GetSession()->SendAreaTriggerMessage("%s", msgStr); + player->GetSession()->SendAreaTriggerMessage("|cffff0000[Message from administrator]:|r"); + + // Confirmation message + std::string nameLink = handler->GetNameLink(player); + handler->PSendSysMessage(LANG_SENDMESSAGE, nameLink.c_str(), msgStr); + + return true; + } +}; + +void AddSC_send_commandscript() +{ + new send_commandscript(); +} diff --git a/src/server/scripts/Commands/cs_server.cpp b/src/server/scripts/Commands/cs_server.cpp index 34543a1a4a5..71f232d33a6 100644 --- a/src/server/scripts/Commands/cs_server.cpp +++ b/src/server/scripts/Commands/cs_server.cpp @@ -39,60 +39,60 @@ public: { static ChatCommand serverIdleRestartCommandTable[] = { - { "cancel", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleServerShutDownCancelCommand, "", NULL }, - { "" , RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleServerIdleRestartCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { "cancel", RBAC_PERM_COMMAND_SERVER_IDLERESTART_CANCEL, true, &HandleServerShutDownCancelCommand, "", NULL }, + { "" , RBAC_PERM_COMMAND_SERVER_IDLERESTART, true, &HandleServerIdleRestartCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand serverIdleShutdownCommandTable[] = { - { "cancel", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleServerShutDownCancelCommand, "", NULL }, - { "" , RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleServerIdleShutDownCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { "cancel", RBAC_PERM_COMMAND_SERVER_IDLESHUTDOWN_CANCEL, true, &HandleServerShutDownCancelCommand, "", NULL }, + { "" , RBAC_PERM_COMMAND_SERVER_IDLESHUTDOWN, true, &HandleServerIdleShutDownCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand serverRestartCommandTable[] = { - { "cancel", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleServerShutDownCancelCommand, "", NULL }, - { "" , RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleServerRestartCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { "cancel", RBAC_PERM_COMMAND_SERVER_RESTART_CANCEL, true, &HandleServerShutDownCancelCommand, "", NULL }, + { "" , RBAC_PERM_COMMAND_SERVER_RESTART, true, &HandleServerRestartCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand serverShutdownCommandTable[] = { - { "cancel", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleServerShutDownCancelCommand, "", NULL }, - { "" , RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleServerShutDownCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { "cancel", RBAC_PERM_COMMAND_SERVER_SHUTDOWN_CANCEL, true, &HandleServerShutDownCancelCommand, "", NULL }, + { "" , RBAC_PERM_COMMAND_SERVER_SHUTDOWN, true, &HandleServerShutDownCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand serverSetCommandTable[] = { - { "difftime", RBAC_PERM_CONSOLE_COMMANDS, true, &HandleServerSetDiffTimeCommand, "", NULL }, - { "loglevel", RBAC_PERM_CONSOLE_COMMANDS, true, &HandleServerSetLogLevelCommand, "", NULL }, - { "motd", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleServerSetMotdCommand, "", NULL }, - { "closed", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleServerSetClosedCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { "difftime", RBAC_PERM_COMMAND_SERVER_SET_DIFFTIME, true, &HandleServerSetDiffTimeCommand, "", NULL }, + { "loglevel", RBAC_PERM_COMMAND_SERVER_SET_LOGLEVEL, true, &HandleServerSetLogLevelCommand, "", NULL }, + { "motd", RBAC_PERM_COMMAND_SERVER_SET_MOTD, true, &HandleServerSetMotdCommand, "", NULL }, + { "closed", RBAC_PERM_COMMAND_SERVER_SET_CLOSED, true, &HandleServerSetClosedCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand serverCommandTable[] = { - { "corpses", RBAC_PERM_GAMEMASTER_COMMANDS, true, &HandleServerCorpsesCommand, "", NULL }, - { "exit", RBAC_PERM_CONSOLE_COMMANDS, true, &HandleServerExitCommand, "", NULL }, - { "idlerestart", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, NULL, "", serverIdleRestartCommandTable }, - { "idleshutdown", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, NULL, "", serverIdleShutdownCommandTable }, - { "info", RBAC_PERM_PLAYER_COMMANDS, true, &HandleServerInfoCommand, "", NULL }, - { "motd", RBAC_PERM_PLAYER_COMMANDS, true, &HandleServerMotdCommand, "", NULL }, - { "plimit", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleServerPLimitCommand, "", NULL }, - { "restart", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, NULL, "", serverRestartCommandTable }, - { "shutdown", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, NULL, "", serverShutdownCommandTable }, - { "set", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, NULL, "", serverSetCommandTable }, - { NULL, 0, false, NULL, "", NULL } + { "corpses", RBAC_PERM_COMMAND_SERVER_CORPSES, true, &HandleServerCorpsesCommand, "", NULL }, + { "exit", RBAC_PERM_COMMAND_SERVER_EXIT, true, &HandleServerExitCommand, "", NULL }, + { "idlerestart", RBAC_PERM_COMMAND_SERVER_IDLERESTART, true, NULL, "", serverIdleRestartCommandTable }, + { "idleshutdown", RBAC_PERM_COMMAND_SERVER_IDLESHUTDOWN, true, NULL, "", serverIdleShutdownCommandTable }, + { "info", RBAC_PERM_COMMAND_SERVER_INFO, true, &HandleServerInfoCommand, "", NULL }, + { "motd", RBAC_PERM_COMMAND_SERVER_MOTD, true, &HandleServerMotdCommand, "", NULL }, + { "plimit", RBAC_PERM_COMMAND_SERVER_PLIMIT, true, &HandleServerPLimitCommand, "", NULL }, + { "restart", RBAC_PERM_COMMAND_SERVER_RESTART, true, NULL, "", serverRestartCommandTable }, + { "shutdown", RBAC_PERM_COMMAND_SERVER_SHUTDOWN, true, NULL, "", serverShutdownCommandTable }, + { "set", RBAC_PERM_COMMAND_SERVER_SET, true, NULL, "", serverSetCommandTable }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand commandTable[] = { - { "server", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, NULL, "", serverCommandTable }, - { NULL, 0, false, NULL, "", NULL } + { "server", RBAC_PERM_COMMAND_SERVER, true, NULL, "", serverCommandTable }, + { NULL, 0, false, NULL, "", NULL } }; return commandTable; } diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp index 9dc013a995f..dec9895af26 100644 --- a/src/server/scripts/Commands/cs_tele.cpp +++ b/src/server/scripts/Commands/cs_tele.cpp @@ -39,17 +39,17 @@ public: { static ChatCommand teleCommandTable[] = { - { "add", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleTeleAddCommand, "", NULL }, - { "del", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleTeleDelCommand, "", NULL }, - { "name", RBAC_PERM_MODERATOR_COMMANDS, true, &HandleTeleNameCommand, "", NULL }, - { "group", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleTeleGroupCommand, "", NULL }, - { "", RBAC_PERM_MODERATOR_COMMANDS, false, &HandleTeleCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { "add", RBAC_PERM_COMMAND_TELE_ADD, false, &HandleTeleAddCommand, "", NULL }, + { "del", RBAC_PERM_COMMAND_TELE_DEL, true, &HandleTeleDelCommand, "", NULL }, + { "name", RBAC_PERM_COMMAND_TELE_NAME, true, &HandleTeleNameCommand, "", NULL }, + { "group", RBAC_PERM_COMMAND_TELE_GROUP, false, &HandleTeleGroupCommand, "", NULL }, + { "", RBAC_PERM_COMMAND_TELE, false, &HandleTeleCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand commandTable[] = { - { "tele", RBAC_PERM_MODERATOR_COMMANDS, false, NULL, "", teleCommandTable }, - { NULL, 0, false, NULL, "", NULL } + { "tele", RBAC_PERM_COMMAND_TELE, false, NULL, "", teleCommandTable }, + { NULL, 0, false, NULL, "", NULL } }; return commandTable; } diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp index 5c1ce304723..1c60a8143b4 100644 --- a/src/server/scripts/Commands/cs_ticket.cpp +++ b/src/server/scripts/Commands/cs_ticket.cpp @@ -40,34 +40,34 @@ public: { static ChatCommand ticketResponseCommandTable[] = { - { "append", RBAC_PERM_MODERATOR_COMMANDS, true, &HandleGMTicketResponseAppendCommand, "", NULL }, - { "appendln", RBAC_PERM_MODERATOR_COMMANDS, true, &HandleGMTicketResponseAppendLnCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { "append", RBAC_PERM_COMMAND_TICKET_RESPONSE_APPEND, true, &HandleGMTicketResponseAppendCommand, "", NULL }, + { "appendln", RBAC_PERM_COMMAND_TICKET_RESPONSE_APPENDLN, true, &HandleGMTicketResponseAppendLnCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand ticketCommandTable[] = { - { "assign", RBAC_PERM_GAMEMASTER_COMMANDS, true, &HandleGMTicketAssignToCommand, "", NULL }, - { "close", RBAC_PERM_MODERATOR_COMMANDS, true, &HandleGMTicketCloseByIdCommand, "", NULL }, - { "closedlist", RBAC_PERM_MODERATOR_COMMANDS, true, &HandleGMTicketListClosedCommand, "", NULL }, - { "comment", RBAC_PERM_MODERATOR_COMMANDS, true, &HandleGMTicketCommentCommand, "", NULL }, - { "complete", RBAC_PERM_MODERATOR_COMMANDS, true, &HandleGMTicketCompleteCommand, "", NULL }, - { "delete", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleGMTicketDeleteByIdCommand, "", NULL }, - { "escalate", RBAC_PERM_MODERATOR_COMMANDS, true, &HandleGMTicketEscalateCommand, "", NULL }, - { "escalatedlist", RBAC_PERM_GAMEMASTER_COMMANDS, true, &HandleGMTicketListEscalatedCommand, "", NULL }, - { "list", RBAC_PERM_MODERATOR_COMMANDS, true, &HandleGMTicketListCommand, "", NULL }, - { "onlinelist", RBAC_PERM_MODERATOR_COMMANDS, true, &HandleGMTicketListOnlineCommand, "", NULL }, - { "reset", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleGMTicketResetCommand, "", NULL }, - { "response", RBAC_PERM_MODERATOR_COMMANDS, true, NULL, "", ticketResponseCommandTable }, - { "togglesystem", RBAC_PERM_ADMINISTRATOR_COMMANDS, true, &HandleToggleGMTicketSystem, "", NULL }, - { "unassign", RBAC_PERM_GAMEMASTER_COMMANDS, true, &HandleGMTicketUnAssignCommand, "", NULL }, - { "viewid", RBAC_PERM_MODERATOR_COMMANDS, true, &HandleGMTicketGetByIdCommand, "", NULL }, - { "viewname", RBAC_PERM_MODERATOR_COMMANDS, true, &HandleGMTicketGetByNameCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { "assign", RBAC_PERM_COMMAND_TICKET_ASSIGN, true, &HandleGMTicketAssignToCommand, "", NULL }, + { "close", RBAC_PERM_COMMAND_TICKET_CLOSE, true, &HandleGMTicketCloseByIdCommand, "", NULL }, + { "closedlist", RBAC_PERM_COMMAND_TICKET_CLOSEDLIST, true, &HandleGMTicketListClosedCommand, "", NULL }, + { "comment", RBAC_PERM_COMMAND_TICKET_COMMENT, true, &HandleGMTicketCommentCommand, "", NULL }, + { "complete", RBAC_PERM_COMMAND_TICKET_COMPLETE, true, &HandleGMTicketCompleteCommand, "", NULL }, + { "delete", RBAC_PERM_COMMAND_TICKET_DELETE, true, &HandleGMTicketDeleteByIdCommand, "", NULL }, + { "escalate", RBAC_PERM_COMMAND_TICKET_ESCALATE, true, &HandleGMTicketEscalateCommand, "", NULL }, + { "escalatedlist", RBAC_PERM_COMMAND_TICKET_ESCALATEDLIST, true, &HandleGMTicketListEscalatedCommand, "", NULL }, + { "list", RBAC_PERM_COMMAND_TICKET_LIST, true, &HandleGMTicketListCommand, "", NULL }, + { "onlinelist", RBAC_PERM_COMMAND_TICKET_ONLINELIST, true, &HandleGMTicketListOnlineCommand, "", NULL }, + { "reset", RBAC_PERM_COMMAND_TICKET_RESET, true, &HandleGMTicketResetCommand, "", NULL }, + { "response", RBAC_PERM_COMMAND_TICKET_RESPONSE, true, NULL, "", ticketResponseCommandTable }, + { "togglesystem", RBAC_PERM_COMMAND_TICKET_TOGGLESYSTEM, true, &HandleToggleGMTicketSystem, "", NULL }, + { "unassign", RBAC_PERM_COMMAND_TICKET_UNASSIGN, true, &HandleGMTicketUnAssignCommand, "", NULL }, + { "viewid", RBAC_PERM_COMMAND_TICKET_VIEWID, true, &HandleGMTicketGetByIdCommand, "", NULL }, + { "viewname", RBAC_PERM_COMMAND_TICKET_VIEWNAME, true, &HandleGMTicketGetByNameCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand commandTable[] = { - { "ticket", RBAC_PERM_MODERATOR_COMMANDS, false, NULL, "", ticketCommandTable }, - { NULL, 0, false, NULL, "", NULL } + { "ticket", RBAC_PERM_COMMAND_TICKET, false, NULL, "", ticketCommandTable }, + { NULL, 0, false, NULL, "", NULL } }; return commandTable; } diff --git a/src/server/scripts/Commands/cs_titles.cpp b/src/server/scripts/Commands/cs_titles.cpp index 1ffb7206f68..f6fd3170bbc 100644 --- a/src/server/scripts/Commands/cs_titles.cpp +++ b/src/server/scripts/Commands/cs_titles.cpp @@ -37,21 +37,21 @@ public: { static ChatCommand titlesSetCommandTable[] = { - { "mask", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleTitlesSetMaskCommand, "", NULL }, - { NULL, RBAC_PERM_PLAYER_COMMANDS, false, NULL, "", NULL } + { "mask", RBAC_PERM_COMMAND_TITLES_SET_MASK, false, &HandleTitlesSetMaskCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand titlesCommandTable[] = { - { "add", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleTitlesAddCommand, "", NULL }, - { "current", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleTitlesCurrentCommand, "", NULL }, - { "remove", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleTitlesRemoveCommand, "", NULL }, - { "set", RBAC_PERM_GAMEMASTER_COMMANDS, false, NULL, "", titlesSetCommandTable }, - { NULL, RBAC_PERM_PLAYER_COMMANDS, false, NULL, "", NULL } + { "add", RBAC_PERM_COMMAND_TITLES_ADD, false, &HandleTitlesAddCommand, "", NULL }, + { "current", RBAC_PERM_COMMAND_TITLES_CURRENT, false, &HandleTitlesCurrentCommand, "", NULL }, + { "remove", RBAC_PERM_COMMAND_TITLES_REMOVE, false, &HandleTitlesRemoveCommand, "", NULL }, + { "set", RBAC_PERM_COMMAND_TITLES_SET, false, NULL, "", titlesSetCommandTable }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand commandTable[] = { - { "titles", RBAC_PERM_GAMEMASTER_COMMANDS, false, NULL, "", titlesCommandTable }, - { NULL, RBAC_PERM_PLAYER_COMMANDS, false, NULL, "", NULL } + { "titles", RBAC_PERM_COMMAND_TITLES, false, NULL, "", titlesCommandTable }, + { NULL, 0, false, NULL, "", NULL } }; return commandTable; } diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp index 834c0e1b266..b1b6030a892 100644 --- a/src/server/scripts/Commands/cs_wp.cpp +++ b/src/server/scripts/Commands/cs_wp.cpp @@ -38,19 +38,19 @@ public: { static ChatCommand wpCommandTable[] = { - { "add", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleWpAddCommand, "", NULL }, - { "event", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleWpEventCommand, "", NULL }, - { "load", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleWpLoadCommand, "", NULL }, - { "modify", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleWpModifyCommand, "", NULL }, - { "unload", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleWpUnLoadCommand, "", NULL }, - { "reload", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleWpReloadCommand, "", NULL }, - { "show", RBAC_PERM_GAMEMASTER_COMMANDS, false, &HandleWpShowCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } + { "add", RBAC_PERM_COMMAND_WP_ADD, false, &HandleWpAddCommand, "", NULL }, + { "event", RBAC_PERM_COMMAND_WP_EVENT, false, &HandleWpEventCommand, "", NULL }, + { "load", RBAC_PERM_COMMAND_WP_LOAD, false, &HandleWpLoadCommand, "", NULL }, + { "modify", RBAC_PERM_COMMAND_WP_MODIFY, false, &HandleWpModifyCommand, "", NULL }, + { "unload", RBAC_PERM_COMMAND_WP_UNLOAD, false, &HandleWpUnLoadCommand, "", NULL }, + { "reload", RBAC_PERM_COMMAND_WP_RELOAD, false, &HandleWpReloadCommand, "", NULL }, + { "show", RBAC_PERM_COMMAND_WP_SHOW, false, &HandleWpShowCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } }; static ChatCommand commandTable[] = { - { "wp", RBAC_PERM_GAMEMASTER_COMMANDS, false, NULL, "", wpCommandTable }, - { NULL, 0, false, NULL, "", NULL } + { "wp", RBAC_PERM_COMMAND_WP, false, NULL, "", wpCommandTable }, + { NULL, 0, false, NULL, "", NULL } }; return commandTable; } diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp index 382a0002065..ab1367ed684 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp @@ -311,6 +311,23 @@ public: { npc_highlord_darion_mograineAI(Creature* creature) : npc_escortAI(creature) { + uiTirionGUID = 0; + uiKorfaxGUID = 0; + uiMaxwellGUID = 0; + uiEligorGUID = 0; + uiRayneGUID = 0; + uiKoltiraGUID = 0; + uiOrbazGUID = 0; + uiThassarianGUID = 0; + uiLichKingGUID = 0; + + memset(uiDefenderGUID, 0, sizeof(uiDefenderGUID)); + memset(uiEarthshatterGUID, 0, sizeof(uiEarthshatterGUID)); + memset(uiAbominationGUID, 0, sizeof(uiAbominationGUID)); + memset(uiBehemothGUID, 0, sizeof(uiBehemothGUID)); + memset(uiGhoulGUID, 0, sizeof(uiGhoulGUID)); + memset(uiWarriorGUID, 0, sizeof(uiWarriorGUID)); + Reset(); } diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp index 11ee7b0e409..7561d1c4991 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp @@ -1620,16 +1620,16 @@ class spell_halion_clear_debuffs : public SpellScriptLoader class TwilightCutterSelector { public: - TwilightCutterSelector(Unit* caster, Unit* cutterCaster) : _caster(caster), _cutterCaster(cutterCaster) {} + TwilightCutterSelector(Unit* caster, Unit* target) : _caster(caster), _channelTarget(target) {} bool operator()(WorldObject* unit) { - return !unit->IsInBetween(_caster, _cutterCaster, 4.0f); + return !unit->IsInBetween(_caster, _channelTarget, 4.0f); } private: Unit* _caster; - Unit* _cutterCaster; + Unit* _channelTarget; }; class spell_halion_twilight_cutter : public SpellScriptLoader @@ -1647,13 +1647,10 @@ class spell_halion_twilight_cutter : public SpellScriptLoader return; Unit* caster = GetCaster(); - if (Aura* cutter = caster->GetAura(SPELL_TWILIGHT_CUTTER)) + if (Unit* channelTarget = ObjectAccessor::GetUnit(*caster, caster->GetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT))) { - if (Unit* cutterCaster = cutter->GetCaster()) - { - unitList.remove_if(TwilightCutterSelector(caster, cutterCaster)); - return; - } + unitList.remove_if(TwilightCutterSelector(caster, channelTarget)); + return; } // In case cutter caster werent found for some reason 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 84da194aa2d..987807c2080 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp @@ -990,12 +990,15 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript lichking->SetReactState(REACT_PASSIVE); lichking->Attack(me,true); } - 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 (_icewall < 4) { - _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); + if (Creature* walltarget = me->SummonCreature(NPC_ICE_WALL, IceWalls[_icewall].GetPositionX(), IceWalls[_icewall].GetPositionY(), IceWalls[_icewall].GetPositionZ(), IceWalls[_icewall].GetOrientation(), 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); + } } _events.ScheduleEvent(EVENT_ESCAPE_20, 3000); break; diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp index 4bb989bf2e4..20b7d39815f 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp @@ -23,26 +23,26 @@ enum Yells { - SAY_AGGRO = 0, - SAY_PHASE2 = 1, - SAY_PHASE3 = 2, - SAY_DEATH = 3, - SAY_SLAY = 4, - SAY_THROW_SARONITE = 5, - SAY_CAST_DEEP_FREEZE = 6, - - SAY_TYRANNUS_DEATH = 0 + SAY_AGGRO = 0, + SAY_PHASE2 = 1, + SAY_PHASE3 = 2, + SAY_DEATH = 3, + SAY_SLAY = 4, + SAY_THROW_SARONITE = 5, + SAY_CAST_DEEP_FREEZE = 6, + + SAY_TYRANNUS_DEATH = 0 }; enum Spells { - SPELL_PERMAFROST = 70326, - SPELL_THROW_SARONITE = 68788, - SPELL_THUNDERING_STOMP = 68771, - SPELL_CHILLING_WAVE = 68778, - SPELL_DEEP_FREEZE = 70381, - SPELL_FORGE_MACE = 68785, - SPELL_FORGE_BLADE = 68774, + SPELL_PERMAFROST = 70326, + SPELL_THROW_SARONITE = 68788, + SPELL_THUNDERING_STOMP = 68771, + SPELL_CHILLING_WAVE = 68778, + SPELL_DEEP_FREEZE = 70381, + SPELL_FORGE_MACE = 68785, + SPELL_FORGE_BLADE = 68774 }; #define SPELL_PERMAFROST_HELPER RAID_MODE<uint32>(68786, 70336) @@ -50,9 +50,9 @@ enum Spells enum Phases { - PHASE_ONE = 1, - PHASE_TWO = 2, - PHASE_THREE = 3 + PHASE_ONE = 1, + PHASE_TWO = 2, + PHASE_THREE = 3 }; enum MiscData @@ -60,58 +60,45 @@ enum MiscData EQUIP_ID_SWORD = 49345, EQUIP_ID_MACE = 49344, ACHIEV_DOESNT_GO_TO_ELEVEN = 0, - POINT_FORGE = 0, + POINT_FORGE = 0 }; -Position const northForgePos = {722.5643f, -234.1615f, 527.182f, 2.16421f}; -Position const southForgePos = {639.257f, -210.1198f, 529.015f, 0.523599f}; - -class boss_garfrost : public CreatureScript -{ enum Events { - EVENT_THROW_SARONITE = 1, - EVENT_CHILLING_WAVE = 2, - EVENT_DEEP_FREEZE = 3, - EVENT_JUMP = 4, - EVENT_FORGING = 5, - EVENT_RESUME_ATTACK = 6, + EVENT_THROW_SARONITE = 1, + EVENT_CHILLING_WAVE = 2, + EVENT_DEEP_FREEZE = 3, + EVENT_FORGE_JUMP = 4, + EVENT_RESUME_ATTACK = 5 }; + +Position const northForgePos = { 722.5643f, -234.1615f, 527.182f, 2.16421f }; +Position const southForgePos = { 639.257f, -210.1198f, 529.015f, 0.523599f }; + +class boss_garfrost : public CreatureScript +{ public: boss_garfrost() : CreatureScript("boss_garfrost") { } struct boss_garfrostAI : public BossAI { - boss_garfrostAI(Creature* creature) : BossAI(creature, DATA_GARFROST) - { - } - - void InitializeAI() OVERRIDE - { - if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != sObjectMgr->GetScriptId(PoSScriptName)) - me->IsAIEnabled = false; - else if (!me->isDead()) - Reset(); - } + boss_garfrostAI(Creature* creature) : BossAI(creature, DATA_GARFROST) { } void Reset() OVERRIDE { - events.Reset(); + _Reset(); events.SetPhase(PHASE_ONE); SetEquipmentSlots(true); _permafrostStack = 0; - - instance->SetBossState(DATA_GARFROST, NOT_STARTED); } void EnterCombat(Unit* /*who*/) OVERRIDE { + _EnterCombat(); Talk(SAY_AGGRO); DoCast(me, SPELL_PERMAFROST); me->CallForHelp(70.0f); events.ScheduleEvent(EVENT_THROW_SARONITE, 7000); - - instance->SetBossState(DATA_GARFROST, IN_PROGRESS); } void KilledUnit(Unit* victim) OVERRIDE @@ -122,12 +109,11 @@ enum Events void JustDied(Unit* /*killer*/) OVERRIDE { + _JustDied(); Talk(SAY_DEATH); if (Creature* tyrannus = me->GetCreature(*me, instance->GetData64(DATA_TYRANNUS))) tyrannus->AI()->Talk(SAY_TYRANNUS_DEATH); - - instance->SetBossState(DATA_GARFROST, DONE); } void DamageTaken(Unit* /*attacker*/, uint32& /*uiDamage*/) OVERRIDE @@ -138,7 +124,7 @@ enum Events Talk(SAY_PHASE2); events.DelayEvents(8000); DoCast(me, SPELL_THUNDERING_STOMP); - events.ScheduleEvent(EVENT_JUMP, 1500); + events.ScheduleEvent(EVENT_FORGE_JUMP, 1500); return; } @@ -148,7 +134,7 @@ enum Events Talk(SAY_PHASE3); events.DelayEvents(8000); DoCast(me, SPELL_THUNDERING_STOMP); - events.ScheduleEvent(EVENT_JUMP, 1500); + events.ScheduleEvent(EVENT_FORGE_JUMP, 1500); return; } } @@ -220,15 +206,15 @@ enum Events } events.ScheduleEvent(EVENT_DEEP_FREEZE, 35000, 0, PHASE_THREE); break; - case EVENT_JUMP: + case EVENT_FORGE_JUMP: me->AttackStop(); if (events.IsInPhase(PHASE_TWO)) - me->GetMotionMaster()->MoveJump(northForgePos.GetPositionX(), northForgePos.GetPositionY(), northForgePos.GetPositionZ(), 25.0f, 15.0f); + me->GetMotionMaster()->MoveJump(northForgePos, 25.0f, 15.0f, POINT_FORGE); else if (events.IsInPhase(PHASE_THREE)) - me->GetMotionMaster()->MoveJump(southForgePos.GetPositionX(), southForgePos.GetPositionY(), southForgePos.GetPositionZ(), 25.0f, 15.0f); + me->GetMotionMaster()->MoveJump(southForgePos, 25.0f, 15.0f, POINT_FORGE); break; case EVENT_RESUME_ATTACK: - if (events.IsInPhase(PHASE_THREE)) + if (events.IsInPhase(PHASE_TWO)) events.ScheduleEvent(EVENT_CHILLING_WAVE, 5000, 0, PHASE_TWO); else if (events.IsInPhase(PHASE_THREE)) events.ScheduleEvent(EVENT_DEEP_FREEZE, 10000, 0, PHASE_THREE); @@ -248,7 +234,7 @@ enum Events CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_garfrostAI(creature); + return GetPitOfSaronAI<boss_garfrostAI>(creature); } }; diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp index b738f0c9358..3b3f65c7704 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp @@ -42,7 +42,7 @@ enum Spells SPELL_STRANGULATING = 69413, //krick's selfcast in intro SPELL_SUICIDE = 7, SPELL_KRICK_KILL_CREDIT = 71308, - SPELL_NECROMANTIC_POWER = 69753, + SPELL_NECROMANTIC_POWER = 69753 }; enum Yells @@ -71,7 +71,7 @@ enum Yells SAY_SYLVANAS_OUTRO_4 = 1, SAY_SYLVANAS_OUTRO_10 = 2, SAY_TYRANNUS_OUTRO_7 = 1, - SAY_TYRANNUS_OUTRO_9 = 2, + SAY_TYRANNUS_OUTRO_9 = 2 }; enum Events @@ -98,24 +98,24 @@ enum Events EVENT_OUTRO_11 = 18, EVENT_OUTRO_12 = 19, EVENT_OUTRO_13 = 20, - EVENT_OUTRO_END = 21, + EVENT_OUTRO_END = 21 }; enum KrickPhase { PHASE_COMBAT = 1, - PHASE_OUTRO = 2, + PHASE_OUTRO = 2 }; enum Actions { - ACTION_OUTRO = 1, + ACTION_OUTRO = 1 }; enum Points { POINT_KRICK_INTRO = 364770, - POINT_KRICK_DEATH = 364771, + POINT_KRICK_DEATH = 364771 }; static const Position outroPos[8] = @@ -127,7 +127,7 @@ static const Position outroPos[8] = {835.5887f, 139.4345f, 530.9526f, 0.0000000f}, // Tyrannus fly down Position (not sniffed) {828.9342f, 118.6247f, 514.5190f, 0.0000000f}, // Krick's Choke Position {828.9342f, 118.6247f, 509.4958f, 0.0000000f}, // Kirck's Death Position - {914.4820f, 143.1602f, 633.3624f, 0.0000000f}, // Tyrannus fly up (not sniffed) + {914.4820f, 143.1602f, 633.3624f, 0.0000000f} // Tyrannus fly up (not sniffed) }; class boss_ick : public CreatureScript @@ -142,14 +142,6 @@ class boss_ick : public CreatureScript ASSERT(_vehicle); } - void InitializeAI() OVERRIDE - { - if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != sObjectMgr->GetScriptId(PoSScriptName)) - me->IsAIEnabled = false; - else if (!me->isDead()) - Reset(); - } - void Reset() OVERRIDE { events.Reset(); @@ -163,6 +155,8 @@ class boss_ick : public CreatureScript void EnterCombat(Unit* /*who*/) OVERRIDE { + _EnterCombat(); + if (Creature* krick = GetKrick()) krick->AI()->Talk(SAY_KRICK_AGGRO); @@ -170,8 +164,6 @@ class boss_ick : public CreatureScript events.ScheduleEvent(EVENT_TOXIC_WASTE, 5000); events.ScheduleEvent(EVENT_SHADOW_BOLT, 10000); events.ScheduleEvent(EVENT_SPECIAL, urand(30000, 35000)); - - instance->SetBossState(DATA_ICK, IN_PROGRESS); } void EnterEvadeMode() OVERRIDE @@ -281,7 +273,7 @@ class boss_ick : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_ickAI(creature); + return GetPitOfSaronAI<boss_ickAI>(creature); } }; @@ -296,14 +288,6 @@ class boss_krick : public CreatureScript { } - void InitializeAI() OVERRIDE - { - if (!_instanceScript || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != sObjectMgr->GetScriptId(PoSScriptName)) - me->IsAIEnabled = false; - else if (!me->isDead()) - Reset(); - } - void Reset() OVERRIDE { _events.Reset(); @@ -509,7 +493,7 @@ class boss_krick : public CreatureScript CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_krickAI(creature); + return GetPitOfSaronAI<boss_krickAI>(creature); } }; diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp index a789d0c6a70..7aa8b123f98 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp @@ -41,7 +41,7 @@ class instance_pit_of_saron : public InstanceMapScript { instance_pit_of_saron_InstanceScript(Map* map) : InstanceScript(map) { - SetBossNumber(MAX_ENCOUNTER); + SetBossNumber(EncounterCount); LoadDoorData(Doors); _garfrostGUID = 0; _krickGUID = 0; @@ -292,7 +292,7 @@ class instance_pit_of_saron : public InstanceMapScript if (dataHead1 == 'P' && dataHead2 == 'S') { - for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < EncounterCount; ++i) { uint32 tmpState; loadStream >> tmpState; diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h index a9b88ca3066..e7a3b069ce3 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h @@ -15,14 +15,12 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef DEF_PIT_OF_SARON_H -#define DEF_PIT_OF_SARON_H - -#include "Map.h" -#include "Creature.h" +#ifndef PIT_OF_SARON_H_ +#define PIT_OF_SARON_H_ #define PoSScriptName "instance_pit_of_saron" -#define MAX_ENCOUNTER 3 + +uint32 const EncounterCount = 3; enum DataTypes { @@ -37,7 +35,7 @@ enum DataTypes DATA_JAINA_SYLVANAS_1 = 5, // GUID of either Jaina or Sylvanas part 1, depending on team, as it's the same spawn. DATA_JAINA_SYLVANAS_2 = 6, // GUID of either Jaina or Sylvanas part 2, depending on team, as it's the same spawn. DATA_TYRANNUS_EVENT = 7, - DATA_TEAM_IN_INSTANCE = 8, + DATA_TEAM_IN_INSTANCE = 8 }; enum CreatureIds @@ -94,17 +92,13 @@ enum GameObjectIds { GO_SARONITE_ROCK = 196485, GO_ICE_WALL = 201885, - GO_HALLS_OF_REFLECTION_PORTCULLIS = 201848, + GO_HALLS_OF_REFLECTION_PORTCULLIS = 201848 }; template<class AI> AI* GetPitOfSaronAI(Creature* creature) { - if (InstanceMap* instance = creature->GetMap()->ToInstanceMap()) - if (instance->GetInstanceScript()) - if (instance->GetScriptId() == sObjectMgr->GetScriptId(PoSScriptName)) - return new AI(creature); - return NULL; + return GetInstanceAI<AI>(creature, PoSScriptName); } -#endif +#endif // PIT_OF_SARON_H_ diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp index 107b95c5990..bdab8f3fce6 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp @@ -157,7 +157,7 @@ class boss_blood_queen_lana_thel : public CreatureScript events.ScheduleEvent(EVENT_TWILIGHT_BLOODBOLT, urand(20000, 25000), EVENT_GROUP_NORMAL); events.ScheduleEvent(EVENT_AIR_PHASE, 124000 + uint32(Is25ManRaid() ? 3000 : 0)); CleanAuras(); - _offtank = NULL; + _offtankGUID = 0; _vampires.clear(); _creditBloodQuickening = false; _killMinchar = false; @@ -366,29 +366,33 @@ class boss_blood_queen_lana_thel : public CreatureScript if (me->GetVictim()) { Player* newOfftank = SelectRandomTarget(true); - if (_offtank != newOfftank) + if (newOfftank) { - _offtank = newOfftank; - if (_offtank) + if (_offtankGUID != newOfftank->GetGUID()) { + _offtankGUID = newOfftank->GetGUID(); + // both spells have SPELL_ATTR5_SINGLE_TARGET_SPELL, no manual removal needed - _offtank->CastSpell(me->GetVictim(), SPELL_BLOOD_MIRROR_DAMAGE, true); - me->GetVictim()->CastSpell(_offtank, SPELL_BLOOD_MIRROR_DUMMY, true); + newOfftank->CastSpell(me->GetVictim(), SPELL_BLOOD_MIRROR_DAMAGE, true); + me->GetVictim()->CastSpell(newOfftank, SPELL_BLOOD_MIRROR_DUMMY, true); DoCastVictim(SPELL_BLOOD_MIRROR_VISUAL); - if (Is25ManRaid() && _offtank->GetQuestStatus(QUEST_BLOOD_INFUSION) == QUEST_STATUS_INCOMPLETE && - _offtank->HasAura(SPELL_UNSATED_CRAVING) && !_offtank->HasAura(SPELL_THIRST_QUENCHED) && - !_offtank->HasAura(SPELL_GUSHING_WOUND)) - _offtank->CastSpell(_offtank, SPELL_GUSHING_WOUND, TRIGGERED_FULL_MASK); + if (Is25ManRaid() && newOfftank->GetQuestStatus(QUEST_BLOOD_INFUSION) == QUEST_STATUS_INCOMPLETE && + newOfftank->HasAura(SPELL_UNSATED_CRAVING) && !newOfftank->HasAura(SPELL_THIRST_QUENCHED) && + !newOfftank->HasAura(SPELL_GUSHING_WOUND)) + newOfftank->CastSpell(newOfftank, SPELL_GUSHING_WOUND, TRIGGERED_FULL_MASK); } } + else + _offtankGUID = 0; } events.ScheduleEvent(EVENT_BLOOD_MIRROR, 2500, EVENT_GROUP_CANCELLABLE); break; } case EVENT_DELIRIOUS_SLASH: - if (_offtank && !me->HasByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER)) - DoCast(_offtank, SPELL_DELIRIOUS_SLASH); + if (_offtankGUID && !me->HasByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER)) + if (Player* _offtank = ObjectAccessor::GetPlayer(*me, _offtankGUID)) + DoCast(_offtank, SPELL_DELIRIOUS_SLASH); events.ScheduleEvent(EVENT_DELIRIOUS_SLASH, urand(20000, 24000), EVENT_GROUP_NORMAL); break; case EVENT_PACT_OF_THE_DARKFALLEN: @@ -470,7 +474,7 @@ class boss_blood_queen_lana_thel : public CreatureScript for (std::list<HostileReference*>::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr) if (Unit* refTarget = (*itr)->getTarget()) - if (refTarget != me->GetVictim() && refTarget->GetTypeId() == TYPEID_PLAYER && (includeOfftank || (refTarget != _offtank))) + if (refTarget != me->GetVictim() && refTarget->GetTypeId() == TYPEID_PLAYER && (includeOfftank || (refTarget->GetGUID() != _offtankGUID))) tempTargets.push_back(refTarget->ToPlayer()); if (tempTargets.empty()) @@ -493,7 +497,7 @@ class boss_blood_queen_lana_thel : public CreatureScript std::set<uint64> _vampires; std::set<uint64> _bloodboltedPlayers; - Player* _offtank; + uint64 _offtankGUID; bool _creditBloodQuickening; bool _killMinchar; }; diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp index c45d3704d5d..394fbc84253 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp @@ -21,10 +21,10 @@ DoorData const doorData[] = { - { GO_VOLKHAN_DOOR, DATA_VOLKHAN, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, - { GO_IONAR_DOOR, DATA_IONAR, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, - { GO_LOKEN_DOOR, DATA_LOKEN, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, - { 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END + { GO_VOLKHAN_DOOR, DATA_VOLKHAN, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, + { GO_IONAR_DOOR, DATA_IONAR, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, + { GO_LOKEN_DOOR, DATA_LOKEN, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, + { 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END }; class instance_halls_of_lightning : public InstanceMapScript diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp index 2a899d26d5a..1268207388c 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp @@ -23,8 +23,8 @@ DoorData const doorData[] = { - { GO_SJONNIR_DOOR, DATA_BRANN_EVENT, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, - { 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END + { GO_SJONNIR_DOOR, DATA_BRANN_EVENT, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, + { 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END }; class instance_halls_of_stone : public InstanceMapScript diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp index 4c6b3ae8b3f..7fcb624c35e 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp @@ -989,6 +989,7 @@ class boss_yogg_saron : public CreatureScript Talk(SAY_YOGG_SARON_PHASE_3); DoCast(me, SPELL_PHASE_3_TRANSFORM); me->RemoveAurasDueToSpell(SPELL_SHADOWY_BARRIER_YOGG); + me->ResetPlayerDamageReq(); break; default: break; diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp index e44e0ab0539..7d3d149f0ff 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp @@ -17,6 +17,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellScript.h" #include "vault_of_archavon.h" enum Emotes @@ -27,9 +28,12 @@ enum Emotes enum Spells { - // Spells Archavon SPELL_ROCK_SHARDS = 58678, + SPELL_ROCK_SHARDS_VISUAL_L = 58689, + SPELL_ROCK_SHARDS_VISUAL_R = 58692, + SPELL_ROCK_SHARDS_DAMAGE_L = 58695, + SPELL_ROCK_SHARDS_DAMAGE_R = 58696, SPELL_CRUSHING_LEAP = 58960, SPELL_STOMP = 58663, SPELL_IMPALE = 58666, @@ -205,8 +209,55 @@ class npc_archavon_warder : public CreatureScript } }; +// 58941 - Rock Shards +class spell_archavon_rock_shards : public SpellScriptLoader +{ + public: + spell_archavon_rock_shards() : SpellScriptLoader("spell_archavon_rock_shards") { } + + class spell_archavon_rock_shards_SpellScript : public SpellScript + { + PrepareSpellScript(spell_archavon_rock_shards_SpellScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_ROCK_SHARDS_VISUAL_L) + || !sSpellMgr->GetSpellInfo(SPELL_ROCK_SHARDS_VISUAL_R) + || !sSpellMgr->GetSpellInfo(SPELL_ROCK_SHARDS_DAMAGE_L) + || !sSpellMgr->GetSpellInfo(SPELL_ROCK_SHARDS_DAMAGE_R)) + return false; + return true; + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + + for (uint8 i = 0; i < 3; ++i) + { + caster->CastSpell((Unit*)NULL, SPELL_ROCK_SHARDS_VISUAL_L, true); + caster->CastSpell((Unit*)NULL, SPELL_ROCK_SHARDS_VISUAL_R, true); + } + + caster->CastSpell((Unit*)NULL, SPELL_ROCK_SHARDS_DAMAGE_L, true); + caster->CastSpell((Unit*)NULL, SPELL_ROCK_SHARDS_DAMAGE_R, true); + } + + void Register() OVERRIDE + { + OnEffectHit += SpellEffectFn(spell_archavon_rock_shards_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const OVERRIDE + { + return new spell_archavon_rock_shards_SpellScript(); + } +}; + void AddSC_boss_archavon() { new boss_archavon(); new npc_archavon_warder(); + new spell_archavon_rock_shards(); } diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp index 5e2e26b578a..38c14292289 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp @@ -248,7 +248,6 @@ class ThunderingStormCheck private: WorldObject const* _source; - float _dist; }; // 39365 - Thundering Storm diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp index 54a1ccece51..8b233901608 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp @@ -306,7 +306,7 @@ class instance_blood_furnace : public InstanceMapScript void ResetPrisoners(const std::set<uint64>& prisoners) { - for (std::set<uint64>::iterator i = prisoners.begin(); i != prisoners.end(); ++i) + for (std::set<uint64>::const_iterator i = prisoners.begin(); i != prisoners.end(); ++i) if (Creature* prisoner = instance->GetCreature(*i)) ResetPrisoner(prisoner); } @@ -400,7 +400,7 @@ class instance_blood_furnace : public InstanceMapScript void ActivatePrisoners(const std::set<uint64>& prisoners) { - for (std::set<uint64>::iterator i = prisoners.begin(); i != prisoners.end(); ++i) + for (std::set<uint64>::const_iterator i = prisoners.begin(); i != prisoners.end(); ++i) if (Creature* prisoner = instance->GetCreature(*i)) { prisoner->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NON_ATTACKABLE); diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 8804410d814..6b56c51d6e1 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -25,7 +25,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" -#include "SpellAuras.h" +#include "SpellAuraEffects.h" #include "Vehicle.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" @@ -2072,8 +2072,6 @@ class spell_q12641_death_comes_from_on_high : public SpellScriptLoader { uint32 spellId = 0; - TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "spell_q12641_death_comes_from_on_high:: Caster: %s (GUID: %u) On Hit Target: Creature: %s (Entry: %u GUID: %u)", - GetOriginalCaster()->GetName().c_str(), GetOriginalCaster()->GetGUIDLow(), GetHitCreature()->GetName().c_str(), GetHitCreature()->GetEntry(), GetHitCreature()->GetGUIDLow()); switch (GetHitCreature()->GetEntry()) { case NPC_NEW_AVALON_FORGE: @@ -2092,7 +2090,7 @@ class spell_q12641_death_comes_from_on_high : public SpellScriptLoader return; } - GetOriginalCaster()->CastSpell((Unit*)NULL, spellId, true); + GetCaster()->CastSpell((Unit*)NULL, spellId, true); } void Register() OVERRIDE @@ -2107,6 +2105,62 @@ class spell_q12641_death_comes_from_on_high : public SpellScriptLoader } }; +// 51769 - Emblazon Runeblade +class spell_q12619_emblazon_runeblade : public SpellScriptLoader +{ + public: + spell_q12619_emblazon_runeblade() : SpellScriptLoader("spell_q12619_emblazon_runeblade") { } + + class spell_q12619_emblazon_runeblade_AuraScript : public AuraScript + { + PrepareAuraScript(spell_q12619_emblazon_runeblade_AuraScript); + + void HandleEffectPeriodic(AuraEffect const* aurEff) + { + PreventDefaultAction(); + if (Unit* caster = GetCaster()) + caster->CastSpell(caster, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true, NULL, aurEff); + } + + void Register() OVERRIDE + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_q12619_emblazon_runeblade_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_q12619_emblazon_runeblade_AuraScript(); + } +}; + +// 51770 - Emblazon Runeblade +class spell_q12619_emblazon_runeblade_effect : public SpellScriptLoader +{ + public: + spell_q12619_emblazon_runeblade_effect() : SpellScriptLoader("spell_q12619_emblazon_runeblade_effect") { } + + class spell_q12619_emblazon_runeblade_effect_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q12619_emblazon_runeblade_effect_SpellScript); + + void HandleScript(SpellEffIndex /*effIndex*/) + { + GetCaster()->CastSpell(GetCaster(), uint32(GetEffectValue()), false); + } + + void Register() OVERRIDE + { + OnEffectHit += SpellEffectFn(spell_q12619_emblazon_runeblade_effect_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const OVERRIDE + { + return new spell_q12619_emblazon_runeblade_effect_SpellScript(); + } +}; + void AddSC_quest_spell_scripts() { new spell_q55_sacred_cleansing(); @@ -2157,4 +2211,6 @@ void AddSC_quest_spell_scripts() new spell_q12308_escape_from_silverbrook_summon_worgen(); new spell_q12308_escape_from_silverbrook(); new spell_q12641_death_comes_from_on_high(); + new spell_q12619_emblazon_runeblade(); + new spell_q12619_emblazon_runeblade_effect(); } diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp index 94e448bd9bc..6cd5e962c02 100644 --- a/src/server/scripts/World/achievement_scripts.cpp +++ b/src/server/scripts/World/achievement_scripts.cpp @@ -279,6 +279,17 @@ class achievement_flirt_with_disaster_perf_check : public AchievementCriteriaScr } }; +class achievement_killed_exp_or_honor_target : public AchievementCriteriaScript +{ + public: + achievement_killed_exp_or_honor_target() : AchievementCriteriaScript("achievement_killed_exp_or_honor_target") { } + + bool OnCheck(Player* player, Unit* target) OVERRIDE + { + return target && player->isHonorOrXPTarget(target); + } +}; + void AddSC_achievement_scripts() { new achievement_resilient_victory(); @@ -298,4 +309,5 @@ void AddSC_achievement_scripts() new achievement_tilted(); new achievement_not_even_a_scratch(); new achievement_flirt_with_disaster_perf_check(); + new achievement_killed_exp_or_honor_target(); } diff --git a/src/server/shared/Common.h b/src/server/shared/Common.h index 70ee32d2868..e3074ef45b9 100644 --- a/src/server/shared/Common.h +++ b/src/server/shared/Common.h @@ -92,6 +92,7 @@ #include <ace/Guard_T.h> #include <ace/RW_Thread_Mutex.h> #include <ace/Thread_Mutex.h> +#include <ace/OS_NS_time.h> #if PLATFORM == PLATFORM_WINDOWS # include <ace/config-all.h> diff --git a/src/server/shared/CompilerDefs.h b/src/server/shared/CompilerDefs.h index 10cdaf4e179..909dcd1707b 100644 --- a/src/server/shared/CompilerDefs.h +++ b/src/server/shared/CompilerDefs.h @@ -55,11 +55,6 @@ # error "FATAL ERROR: Unknown compiler." #endif -#if COMPILER == COMPILER_MICROSOFT -# pragma warning( disable : 4267 ) // conversion from 'size_t' to 'int', possible loss of data -# pragma warning( disable : 4786 ) // identifier was truncated to '255' characters in the debug information -#endif - #if defined(__cplusplus) && __cplusplus == 201103L # define COMPILER_HAS_CPP11_SUPPORT 1 #else diff --git a/src/server/shared/Database/DatabaseWorkerPool.h b/src/server/shared/Database/DatabaseWorkerPool.h index 5ecadfe18a8..e209beef8b6 100644 --- a/src/server/shared/Database/DatabaseWorkerPool.h +++ b/src/server/shared/Database/DatabaseWorkerPool.h @@ -214,6 +214,9 @@ class DatabaseWorkerPool T* t = GetFreeConnection(); t->Execute(stmt); t->Unlock(); + + //! Delete proxy-class. Not needed anymore + delete stmt; } /** @@ -430,7 +433,7 @@ class DatabaseWorkerPool */ //! Automanaged (internally) pointer to a prepared statement object for usage in upper level code. - //! Pointer is deleted in this->Query(PreparedStatement*) or PreparedStatementTask::~PreparedStatementTask. + //! Pointer is deleted in this->DirectExecute(PreparedStatement*), this->Query(PreparedStatement*) or PreparedStatementTask::~PreparedStatementTask. //! This object is not tied to the prepared statement on the MySQL context yet until execution. PreparedStatement* GetPreparedStatement(uint32 index) { diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.cpp b/src/server/shared/Database/Implementation/CharacterDatabase.cpp index 7e237614f62..fdb71dd8d1a 100644 --- a/src/server/shared/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/shared/Database/Implementation/CharacterDatabase.cpp @@ -458,6 +458,9 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_SEL_GUILD_BANK_ITEM_BY_ENTRY, "SELECT gi.item_guid, gi.guildid, g.name FROM guild_bank_item gi INNER JOIN guild g ON g.guildid = gi.guildid INNER JOIN item_instance ii ON ii.guid = gi.item_guid WHERE ii.itemEntry = ? LIMIT ?", CONNECTION_SYNCH); PrepareStatement(CHAR_DEL_CHAR_ACHIEVEMENT, "DELETE FROM character_achievement WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_ACHIEVEMENT_PROGRESS, "DELETE FROM character_achievement_progress WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_INS_CHAR_ACHIEVEMENT, "INSERT INTO character_achievement (guid, achievement, date) VALUES (?, ?, ?)", CONNECTION_ASYNC); + PrepareStatement(CHAR_DEL_CHAR_ACHIEVEMENT_PROGRESS_BY_CRITERIA, "DELETE FROM character_achievement_progress WHERE guid = ? AND criteria = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_INS_CHAR_ACHIEVEMENT_PROGRESS, "INSERT INTO character_achievement_progress (guid, criteria, counter, date) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_REPUTATION_BY_FACTION, "DELETE FROM character_reputation WHERE guid = ? AND faction = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_CHAR_REPUTATION_BY_FACTION, "INSERT INTO character_reputation (guid, faction, standing, flags) VALUES (?, ?, ? , ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_CHAR_ARENA_POINTS, "UPDATE characters SET arenaPoints = (arenaPoints + ?) WHERE guid = ?", CONNECTION_ASYNC); diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h index f97dd63064d..4aeee0ac525 100644 --- a/src/server/shared/Database/Implementation/CharacterDatabase.h +++ b/src/server/shared/Database/Implementation/CharacterDatabase.h @@ -394,6 +394,9 @@ enum CharacterDatabaseStatements CHAR_SEL_GUILD_BANK_ITEM_BY_ENTRY, CHAR_DEL_CHAR_ACHIEVEMENT, CHAR_DEL_CHAR_ACHIEVEMENT_PROGRESS, + CHAR_INS_CHAR_ACHIEVEMENT, + CHAR_DEL_CHAR_ACHIEVEMENT_PROGRESS_BY_CRITERIA, + CHAR_INS_CHAR_ACHIEVEMENT_PROGRESS, CHAR_DEL_CHAR_REPUTATION_BY_FACTION, CHAR_INS_CHAR_REPUTATION_BY_FACTION, CHAR_UPD_CHAR_ARENA_POINTS, diff --git a/src/server/shared/Logging/Appender.cpp b/src/server/shared/Logging/Appender.cpp index cde94fe3a7c..f47cbc3b095 100644 --- a/src/server/shared/Logging/Appender.cpp +++ b/src/server/shared/Logging/Appender.cpp @@ -20,9 +20,10 @@ std::string LogMessage::getTimeStr(time_t time) { - tm* aTm = localtime(&time); + tm aTm; + ACE_OS::localtime_r(&time, &aTm); char buf[20]; - snprintf(buf, 20, "%04d-%02d-%02d_%02d:%02d:%02d", aTm->tm_year+1900, aTm->tm_mon+1, aTm->tm_mday, aTm->tm_hour, aTm->tm_min, aTm->tm_sec); + snprintf(buf, 20, "%04d-%02d-%02d_%02d:%02d:%02d", aTm.tm_year+1900, aTm.tm_mon+1, aTm.tm_mday, aTm.tm_hour, aTm.tm_min, aTm.tm_sec); return std::string(buf); } diff --git a/src/server/shared/Logging/AppenderFile.cpp b/src/server/shared/Logging/AppenderFile.cpp index 93d53bcc30d..54458346bb9 100644 --- a/src/server/shared/Logging/AppenderFile.cpp +++ b/src/server/shared/Logging/AppenderFile.cpp @@ -40,7 +40,7 @@ AppenderFile::~AppenderFile() void AppenderFile::_write(LogMessage const& message) { - bool exceedMaxSize = maxFileSize > 0 && (fileSize + message.Size()) > maxFileSize; + bool exceedMaxSize = maxFileSize > 0 && (fileSize.value() + message.Size()) > maxFileSize; if (dynamicName) { @@ -56,7 +56,7 @@ void AppenderFile::_write(LogMessage const& message) fprintf(logfile, "%s%s", message.prefix.c_str(), message.text.c_str()); fflush(logfile); - fileSize += message.Size(); + fileSize += uint64(message.Size()); if (dynamicName) CloseFile(); diff --git a/src/server/shared/Logging/AppenderFile.h b/src/server/shared/Logging/AppenderFile.h index c15974799e1..de94a46d692 100644 --- a/src/server/shared/Logging/AppenderFile.h +++ b/src/server/shared/Logging/AppenderFile.h @@ -19,6 +19,7 @@ #define APPENDERFILE_H #include "Appender.h" +#include "ace/Atomic_Op.h" class AppenderFile: public Appender { @@ -37,7 +38,7 @@ class AppenderFile: public Appender bool dynamicName; bool backup; uint64 maxFileSize; - uint64 fileSize; + ACE_Atomic_Op<ACE_Thread_Mutex, uint64> fileSize; }; #endif diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp index be7aab9cf5e..e6400176155 100644 --- a/src/server/shared/Logging/Log.cpp +++ b/src/server/shared/Logging/Log.cpp @@ -295,7 +295,8 @@ void Log::write(LogMessage* msg) std::string Log::GetTimestampStr() { time_t t = time(NULL); - tm* aTm = localtime(&t); + tm aTm; + ACE_OS::localtime_r(&t, &aTm); // YYYY year // MM month (2 digits 01-12) // DD day (2 digits 01-31) @@ -303,7 +304,7 @@ std::string Log::GetTimestampStr() // MM minutes (2 digits 00-59) // SS seconds (2 digits 00-59) char buf[20]; - snprintf(buf, 20, "%04d-%02d-%02d_%02d-%02d-%02d", aTm->tm_year+1900, aTm->tm_mon+1, aTm->tm_mday, aTm->tm_hour, aTm->tm_min, aTm->tm_sec); + snprintf(buf, 20, "%04d-%02d-%02d_%02d-%02d-%02d", aTm.tm_year+1900, aTm.tm_mon+1, aTm.tm_mday, aTm.tm_hour, aTm.tm_min, aTm.tm_sec); return std::string(buf); } diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h index 7777842af17..d2677538805 100644 --- a/src/server/shared/Packets/ByteBuffer.h +++ b/src/server/shared/Packets/ByteBuffer.h @@ -23,6 +23,7 @@ #include "Errors.h" #include "ByteConverter.h" +#include <ace/OS_NS_time.h> #include <exception> #include <list> #include <map> @@ -457,8 +458,9 @@ class ByteBuffer void AppendPackedTime(time_t time) { - tm* lt = localtime(&time); - append<uint32>((lt->tm_year - 100) << 24 | lt->tm_mon << 20 | (lt->tm_mday - 1) << 14 | lt->tm_wday << 11 | lt->tm_hour << 6 | lt->tm_min); + tm lt; + ACE_OS::localtime_r(&time, <); + append<uint32>((lt.tm_year - 100) << 24 | lt.tm_mon << 20 | (lt.tm_mday - 1) << 14 | lt.tm_wday << 11 | lt.tm_hour << 6 | lt.tm_min); } void put(size_t pos, const uint8 *src, size_t cnt) diff --git a/src/server/shared/Utilities/Timer.h b/src/server/shared/Utilities/Timer.h index 5bc19a2b779..b0b395865b4 100644 --- a/src/server/shared/Utilities/Timer.h +++ b/src/server/shared/Utilities/Timer.h @@ -66,7 +66,7 @@ struct IntervalTimer void Reset() { if (_current >= _interval) - _current -= _interval; + _current %= _interval; } void SetCurrent(time_t current) diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp index 1bba3c2db09..48012b6eea8 100644 --- a/src/server/shared/Utilities/Util.cpp +++ b/src/server/shared/Utilities/Util.cpp @@ -215,7 +215,8 @@ uint32 TimeStringToSecs(const std::string& timestring) std::string TimeToTimestampStr(time_t t) { - tm* aTm = localtime(&t); + tm aTm; + ACE_OS::localtime_r(&t, &aTm); // YYYY year // MM month (2 digits 01-12) // DD day (2 digits 01-31) @@ -223,7 +224,7 @@ std::string TimeToTimestampStr(time_t t) // MM minutes (2 digits 00-59) // SS seconds (2 digits 00-59) char buf[20]; - snprintf(buf, 20, "%04d-%02d-%02d_%02d-%02d-%02d", aTm->tm_year+1900, aTm->tm_mon+1, aTm->tm_mday, aTm->tm_hour, aTm->tm_min, aTm->tm_sec); + snprintf(buf, 20, "%04d-%02d-%02d_%02d-%02d-%02d", aTm.tm_year+1900, aTm.tm_mon+1, aTm.tm_mday, aTm.tm_hour, aTm.tm_min, aTm.tm_sec); return std::string(buf); } diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h index 6d0216225da..30a6b27f186 100644 --- a/src/server/shared/Utilities/Util.h +++ b/src/server/shared/Utilities/Util.h @@ -20,6 +20,7 @@ #define _UTIL_H #include "Define.h" +#include "Errors.h" #include <algorithm> #include <string> @@ -532,4 +533,36 @@ public: } }; +enum ComparisionType +{ + COMP_TYPE_EQ = 0, + COMP_TYPE_HIGH, + COMP_TYPE_LOW, + COMP_TYPE_HIGH_EQ, + COMP_TYPE_LOW_EQ, + COMP_TYPE_MAX +}; + +template <class T> +bool CompareValues(ComparisionType type, T val1, T val2) +{ + switch (type) + { + case COMP_TYPE_EQ: + return val1 == val2; + case COMP_TYPE_HIGH: + return val1 > val2; + case COMP_TYPE_LOW: + return val1 < val2; + case COMP_TYPE_HIGH_EQ: + return val1 >= val2; + case COMP_TYPE_LOW_EQ: + return val1 <= val2; + default: + // incorrect parameter + ASSERT(false); + return false; + } +} + #endif diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp index e136269e2a0..1ebb58eef1a 100644 --- a/src/server/worldserver/CommandLine/CliRunnable.cpp +++ b/src/server/worldserver/CommandLine/CliRunnable.cpp @@ -175,6 +175,8 @@ void CliRunnable::run() { #if PLATFORM == PLATFORM_WINDOWS printf("TC>"); +#else + free(command_str); #endif continue; } @@ -184,6 +186,8 @@ void CliRunnable::run() { #if PLATFORM == PLATFORM_WINDOWS printf("TC>"); +#else + free(command_str); #endif continue; } @@ -192,6 +196,7 @@ void CliRunnable::run() sWorld->QueueCliCommand(new CliCommandHolder(NULL, command.c_str(), &utf8print, &commandFinished)); #if PLATFORM != PLATFORM_WINDOWS add_history(command.c_str()); + free(command_str); #endif } else if (feof(stdin)) diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index dbf2a808230..62008a3eb38 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -907,6 +907,13 @@ Instance.ResetTimeHour = 4 Instance.UnloadDelay = 1800000 # +# InstancesResetAnnounce +# Description: Announce the reset of one instance to whole party. +# Default: false - (Disabled, don't show, blizzlike) +# true - (Enabled, show) + +InstancesResetAnnounce = false +# # Quests.LowLevelHideDiff # Description: Level difference between player and quest level at which quests are # considered low-level and are not shown via exclamation mark (!) at quest @@ -1213,7 +1220,6 @@ Warden.BanDuration = 86400 ################################################################################################### # PLAYER INTERACTION # -# # AllowTwoSide.Interaction.Calendar # Description: Allow calendar invites between factions. # Default: 0 - (Disabled) @@ -2138,6 +2144,29 @@ Battleground.GiveXPForKills = 0 Battleground.Random.ResetHour = 6 # +# Battleground.RewardWinnerHonorFirst +# Battleground.RewardWinnerArenaFirst +# Battleground.RewardWinnerHonorLast +# Battleground.RewardWinnerArenaLast +# Battleground.RewardLoserHonorFirst +# Battleground.RewardLoserHonorLast +# Description: Random Battlegrounds / call to the arms rewards +# Default: 30 - Battleground.RewardWinnerHonorFirst +# 25 - Battleground.RewardWinnerArenaFirst +# 15 - Battleground.RewardWinnerHonorLast +# 0 - Battleground.RewardWinnerArenaLast +# 5 - Battleground.RewardLoserHonorFirst +# 5 - Battleground.RewardLoserHonorLast +# + +Battleground.RewardWinnerHonorFirst = 30 +Battleground.RewardWinnerArenaFirst = 25 +Battleground.RewardWinnerHonorLast = 15 +Battleground.RewardWinnerArenaLast = 0 +Battleground.RewardLoserHonorFirst = 5 +Battleground.RewardLoserHonorLast = 5 + +# ################################################################################################### ################################################################################################### @@ -2616,7 +2645,6 @@ UI.ShowQuestLevelsInDialogs = 0 ################################################################################################### ################################################################################################### -# # LOGGING SYSTEM SETTINGS # # Appender config values: Given a appender "name" @@ -2805,7 +2833,6 @@ Log.Async.Enable = 0 ################################################################################################### ################################################################################################### -# # PACKET SPOOF PROTECTION SETTINGS # # These settings determine which action to take when harmful packet spoofing is detected. |