aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/base/auth_database.sql8
-rw-r--r--sql/updates/auth/2014_07_09_00_auth_rbac_permission.sql10
-rw-r--r--sql/updates/world/2014_07_07_00_world_creature_text.sql5
-rw-r--r--sql/updates/world/2014_07_07_01_world_spell_script_names.sql3
-rw-r--r--sql/updates/world/2014_07_07_02_world_spell_game_event_creature.sql34
-rw-r--r--sql/updates/world/2014_07_07_03_world_spell_misc.sql7
-rw-r--r--sql/updates/world/2014_07_08_00_world_creature_queststarter.sql99
-rw-r--r--sql/updates/world/2014_07_08_00_world_misc.sql39
-rw-r--r--sql/updates/world/2014_07_08_01_world_quest_template.sql2
-rw-r--r--sql/updates/world/2014_07_08_02_world_misc.sql593
-rw-r--r--sql/updates/world/2014_07_08_03_world_creature.sql5
-rw-r--r--sql/updates/world/2014_07_08_04_world_creature.sql11
-rw-r--r--sql/updates/world/2014_07_08_05_world_misc.sql48
-rw-r--r--sql/updates/world/2014_07_08_06_world_misc.sql14
-rw-r--r--sql/updates/world/2014_07_08_07_world_quest_template.sql2
-rw-r--r--sql/updates/world/2014_07_08_08_world_quest_template.sql2
-rw-r--r--sql/updates/world/2014_07_08_09_world_misc.sql17
-rw-r--r--sql/updates/world/2014_07_08_10_world_misc.sql34
-rw-r--r--sql/updates/world/2014_07_08_11_world_misc.sql53
-rw-r--r--sql/updates/world/2014_07_09_00_world_misc.sql18
-rw-r--r--sql/updates/world/2014_07_09_01_world_creature.sql1
-rw-r--r--sql/updates/world/2014_07_09_02_world_creature_template_addon.sql7
-rw-r--r--sql/updates/world/2014_07_09_03_world_command.sql3
-rw-r--r--sql/updates/world/2014_07_09_04_world_quest_template.sql12
-rw-r--r--sql/updates/world/2014_07_09_05_world_gameobject_template.sql2
-rw-r--r--sql/updates/world/2014_07_09_06_world_misc.sql16
-rw-r--r--sql/updates/world/2014_07_09_07_world_misc.sql28
-rw-r--r--sql/updates/world/2014_07_09_08_world_misc.sql7
-rw-r--r--sql/updates/world/2014_07_10_00_world_misc.sql2
-rw-r--r--sql/updates/world/2014_07_10_01_world_misc.sql3
-rw-r--r--sql/updates/world/2014_07_12_00_world_misc.sql14
-rw-r--r--sql/updates/world/2014_07_12_01_world_misc.sql21
-rw-r--r--sql/updates/world/2014_07_13_00_world_misc.sql6
-rw-r--r--sql/updates/world/2014_07_13_01_world_misc.sql40
-rw-r--r--sql/updates/world/2014_07_13_02_world_misc.sql73
-rw-r--r--sql/updates/world/2014_07_13_03_world_misc.sql2
-rw-r--r--src/server/game/Accounts/RBAC.h2
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.cpp8
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.h8
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp36
-rw-r--r--src/server/game/Battlegrounds/Battleground.h24
-rw-r--r--src/server/game/Battlegrounds/BattlegroundMgr.cpp299
-rw-r--r--src/server/game/Battlegrounds/BattlegroundMgr.h82
-rw-r--r--src/server/game/Battlegrounds/BattlegroundQueue.cpp5
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp12
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.cpp10
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp3
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp11
-rw-r--r--src/server/game/Entities/GameObject/GameObject.h2
-rw-r--r--src/server/game/Entities/Player/Player.cpp262
-rw-r--r--src/server/game/Entities/Player/Player.h21
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp28
-rw-r--r--src/server/game/Groups/Group.cpp1
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp4
-rw-r--r--src/server/game/Handlers/NPCHandler.cpp2
-rw-r--r--src/server/game/Handlers/SkillHandler.cpp2
-rw-r--r--src/server/game/Instances/InstanceScript.cpp19
-rw-r--r--src/server/game/Instances/InstanceScript.h4
-rw-r--r--src/server/game/Maps/MapManager.cpp18
-rw-r--r--src/server/game/Movement/PathGenerator.cpp26
-rw-r--r--src/server/game/Scripting/ScriptLoader.cpp2
-rw-r--r--src/server/game/Spells/Spell.cpp1
-rw-r--r--src/server/game/Spells/SpellEffects.cpp9
-rw-r--r--src/server/game/World/World.cpp2
-rw-r--r--src/server/scripts/Commands/cs_account.cpp4
-rw-r--r--src/server/scripts/Commands/cs_learn.cpp18
-rw-r--r--src/server/scripts/Commands/cs_reload.cpp11
-rw-r--r--src/server/scripts/Commands/cs_reset.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp21
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/CMakeLists.txt1
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp17
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp158
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h3
-rw-r--r--src/server/scripts/EasternKingdoms/boss_kruul.cpp163
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp9
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp10
-rw-r--r--src/server/scripts/Outland/BlackTemple/black_temple.cpp56
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp8
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp6
-rw-r--r--src/server/scripts/Spells/spell_item.cpp42
-rw-r--r--src/server/scripts/Spells/spell_paladin.cpp8
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp38
-rw-r--r--src/server/scripts/World/npc_professions.cpp128
84 files changed, 1991 insertions, 872 deletions
diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql
index 76cddd7e45d..090a90597b5 100644
--- a/sql/base/auth_database.sql
+++ b/sql/base/auth_database.sql
@@ -225,7 +225,7 @@ DROP TABLE IF EXISTS `logs`;
CREATE TABLE `logs` (
`time` int(10) unsigned NOT NULL,
`realm` int(10) unsigned NOT NULL,
- `type` varchar(250) DEFAULT NULL,
+ `type` varchar(250) NOT NULL,
`level` tinyint(3) unsigned NOT NULL DEFAULT '0',
`string` text CHARACTER SET latin1
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -348,7 +348,7 @@ CREATE TABLE `rbac_linked_permissions` (
LOCK TABLES `rbac_linked_permissions` WRITE;
/*!40000 ALTER TABLE `rbac_linked_permissions` DISABLE KEYS */;
-INSERT INTO `rbac_linked_permissions` VALUES (192,21),(192,42),(192,43),(192,193),(192,196),(193,48),(193,194),(193,197),(194,1),(194,2),(194,11),(194,13),(194,14),(194,15),(194,16),(194,17),(194,18),(194,19),(194,20),(194,22),(194,23),(194,25),(194,26),(194,27),(194,28),(194,29),(194,30),(194,31),(194,32),(194,33),(194,34),(194,35),(194,36),(194,37),(194,38),(194,39),(194,40),(194,41),(194,44),(194,46),(194,47),(194,195),(194,198),(195,3),(195,4),(195,5),(195,6),(195,24),(195,49),(195,199),(196,200),(196,201),(196,226),(196,227),(196,230),(196,231),(196,233),(196,234),(196,235),(196,238),(196,239),(196,240),(196,241),(196,242),(196,243),(196,244),(196,245),(196,246),(196,247),(196,248),(196,249),(196,250),(196,251),(196,252),(196,253),(196,254),(196,255),(196,256),(196,257),(196,258),(196,259),(196,260),(196,261),(196,262),(196,264),(196,265),(196,266),(196,267),(196,268),(196,269),(196,270),(196,271),(196,272),(196,279),(196,280),(196,283),(196,287),(196,288),(196,289),(196,290),(196,291),(196,292),(196,293),(196,294),(196,295),(196,296),(196,297),(196,298),(196,299),(196,302),(196,303),(196,304),(196,305),(196,306),(196,307),(196,308),(196,309),(196,310),(196,313),(196,314),(196,319),(196,320),(196,321),(196,322),(196,323),(196,324),(196,325),(196,326),(196,327),(196,328),(196,329),(196,330),(196,331),(196,332),(196,333),(196,334),(196,335),(196,336),(196,337),(196,338),(196,339),(196,340),(196,341),(196,342),(196,343),(196,344),(196,345),(196,346),(196,347),(196,348),(196,349),(196,350),(196,351),(196,352),(196,353),(196,354),(196,355),(196,356),(196,357),(196,358),(196,359),(196,360),(196,361),(196,362),(196,363),(196,364),(196,365),(196,366),(196,373),(196,375),(196,400),(196,401),(196,402),(196,403),(196,404),(196,405),(196,406),(196,407),(196,417),(196,418),(196,419),(196,420),(196,421),(196,422),(196,423),(196,424),(196,425),(196,426),(196,427),(196,428),(196,429),(196,434),(196,435),(196,436),(196,437),(196,438),(196,439),(196,440),(196,441),(196,442),(196,443),(196,444),(196,445),(196,446),(196,447),(196,448),(196,449),(196,450),(196,451),(196,452),(196,453),(196,454),(196,455),(196,456),(196,457),(196,458),(196,459),(196,461),(196,463),(196,464),(196,465),(196,472),(196,473),(196,474),(196,475),(196,476),(196,477),(196,478),(196,488),(196,489),(196,491),(196,492),(196,493),(196,495),(196,497),(196,498),(196,499),(196,500),(196,502),(196,503),(196,505),(196,508),(196,511),(196,513),(196,514),(196,516),(196,519),(196,522),(196,523),(196,526),(196,527),(196,529),(196,530),(196,533),(196,535),(196,536),(196,537),(196,538),(196,539),(196,540),(196,541),(196,556),(196,581),(196,582),(196,592),(196,593),(196,596),(196,602),(196,603),(196,604),(196,605),(196,606),(196,607),(196,608),(196,609),(196,610),(196,611),(196,612),(196,613),(196,614),(196,615),(196,616),(196,617),(196,618),(196,619),(196,620),(196,621),(196,622),(196,623),(196,624),(196,625),(196,626),(196,627),(196,628),(196,629),(196,630),(196,633),(196,634),(196,635),(196,636),(196,637),(196,638),(196,639),(196,640),(196,641),(196,642),(196,643),(196,644),(196,645),(196,646),(196,647),(196,648),(196,649),(196,650),(196,651),(196,652),(196,653),(196,654),(196,655),(196,656),(196,657),(196,658),(196,659),(196,660),(196,661),(196,662),(196,663),(196,664),(196,665),(196,666),(196,667),(196,668),(196,669),(196,670),(196,671),(196,672),(196,673),(196,674),(196,675),(196,676),(196,677),(196,678),(196,679),(196,680),(196,681),(196,682),(196,683),(196,684),(196,685),(196,686),(196,687),(196,688),(196,689),(196,690),(196,691),(196,692),(196,693),(196,694),(196,695),(196,696),(196,697),(196,698),(196,699),(196,700),(196,701),(196,702),(196,703),(196,704),(196,705),(196,706),(196,707),(196,708),(196,709),(196,710),(196,711),(196,712),(196,713),(196,714),(196,715),(196,716),(196,717),(196,718),(196,719),(196,721),(196,722),(196,723),(196,724),(196,725),(196,726),(196,727),(196,728),(196,729),(196,730),(196,733),(196,734),(196,735),(196,736),(196,738),(196,739),(196,748),(196,753),(196,757),(196,773),(196,777),(197,232),(197,236),(197,237),(197,273),(197,274),(197,275),(197,276),(197,277),(197,284),(197,285),(197,286),(197,301),(197,311),(197,387),(197,388),(197,389),(197,390),(197,391),(197,392),(197,393),(197,394),(197,395),(197,396),(197,397),(197,398),(197,399),(197,479),(197,480),(197,481),(197,482),(197,485),(197,486),(197,487),(197,494),(197,506),(197,509),(197,510),(197,517),(197,518),(197,521),(197,542),(197,543),(197,550),(197,558),(197,568),(197,571),(197,572),(197,573),(197,574),(197,575),(197,576),(197,577),(197,578),(197,579),(197,580),(197,583),(197,584),(197,585),(197,586),(197,587),(197,588),(197,589),(197,590),(197,591),(197,594),(197,595),(197,601),(197,743),(197,750),(197,758),(197,761),(197,762),(197,763),(197,764),(197,765),(197,766),(197,767),(197,768),(197,769),(197,770),(197,771),(197,772),(197,774),(198,218),(198,300),(198,312),(198,315),(198,316),(198,317),(198,318),(198,367),(198,368),(198,369),(198,370),(198,371),(198,372),(198,374),(198,376),(198,377),(198,378),(198,379),(198,380),(198,381),(198,382),(198,383),(198,384),(198,385),(198,386),(198,408),(198,409),(198,410),(198,411),(198,412),(198,413),(198,414),(198,415),(198,416),(198,430),(198,431),(198,432),(198,433),(198,462),(198,466),(198,467),(198,468),(198,469),(198,470),(198,471),(198,483),(198,484),(198,490),(198,504),(198,512),(198,515),(198,520),(198,524),(198,528),(198,531),(198,532),(198,544),(198,545),(198,546),(198,547),(198,548),(198,549),(198,551),(198,552),(198,553),(198,554),(198,555),(198,557),(198,559),(198,560),(198,561),(198,562),(198,563),(198,564),(198,565),(198,566),(198,567),(198,569),(198,570),(198,597),(198,598),(198,599),(198,600),(198,737),(198,740),(198,741),(198,742),(198,744),(198,745),(198,746),(198,747),(198,749),(198,751),(198,752),(198,754),(198,755),(198,756),(198,759),(198,760),(199,217),(199,221),(199,222),(199,223),(199,225),(199,263),(199,496),(199,501),(199,507),(199,525),(199,534);
+INSERT INTO `rbac_linked_permissions` VALUES (192,21),(192,42),(192,43),(192,193),(192,196),(193,48),(193,194),(193,197),(194,1),(194,2),(194,11),(194,13),(194,14),(194,15),(194,16),(194,17),(194,18),(194,19),(194,20),(194,22),(194,23),(194,25),(194,26),(194,27),(194,28),(194,29),(194,30),(194,31),(194,32),(194,33),(194,34),(194,35),(194,36),(194,37),(194,38),(194,39),(194,40),(194,41),(194,44),(194,46),(194,47),(194,195),(194,198),(195,3),(195,4),(195,5),(195,6),(195,24),(195,49),(195,199),(196,200),(196,201),(196,226),(196,227),(196,230),(196,231),(196,233),(196,234),(196,235),(196,238),(196,239),(196,240),(196,241),(196,242),(196,243),(196,244),(196,245),(196,246),(196,247),(196,248),(196,249),(196,250),(196,251),(196,252),(196,253),(196,254),(196,255),(196,256),(196,257),(196,258),(196,259),(196,260),(196,261),(196,262),(196,264),(196,265),(196,266),(196,267),(196,268),(196,269),(196,270),(196,271),(196,272),(196,279),(196,280),(196,283),(196,287),(196,288),(196,289),(196,290),(196,291),(196,292),(196,293),(196,294),(196,295),(196,296),(196,297),(196,298),(196,299),(196,302),(196,303),(196,304),(196,305),(196,306),(196,307),(196,308),(196,309),(196,310),(196,313),(196,314),(196,319),(196,320),(196,321),(196,322),(196,323),(196,324),(196,325),(196,326),(196,327),(196,328),(196,329),(196,330),(196,331),(196,332),(196,333),(196,334),(196,335),(196,336),(196,337),(196,338),(196,339),(196,340),(196,341),(196,342),(196,343),(196,344),(196,345),(196,346),(196,347),(196,348),(196,349),(196,350),(196,351),(196,352),(196,353),(196,354),(196,355),(196,356),(196,357),(196,358),(196,359),(196,360),(196,361),(196,362),(196,363),(196,364),(196,365),(196,366),(196,373),(196,375),(196,400),(196,401),(196,402),(196,403),(196,404),(196,405),(196,406),(196,407),(196,417),(196,418),(196,419),(196,420),(196,421),(196,422),(196,423),(196,424),(196,425),(196,426),(196,427),(196,428),(196,429),(196,434),(196,435),(196,436),(196,437),(196,438),(196,439),(196,440),(196,441),(196,442),(196,443),(196,444),(196,445),(196,446),(196,447),(196,448),(196,449),(196,450),(196,451),(196,452),(196,453),(196,454),(196,455),(196,456),(196,457),(196,458),(196,459),(196,461),(196,463),(196,464),(196,465),(196,472),(196,473),(196,474),(196,475),(196,476),(196,477),(196,478),(196,488),(196,489),(196,491),(196,492),(196,493),(196,495),(196,497),(196,498),(196,499),(196,500),(196,502),(196,503),(196,505),(196,508),(196,511),(196,513),(196,514),(196,516),(196,519),(196,522),(196,523),(196,526),(196,527),(196,529),(196,530),(196,533),(196,535),(196,536),(196,537),(196,538),(196,539),(196,540),(196,541),(196,556),(196,581),(196,582),(196,592),(196,593),(196,596),(196,602),(196,603),(196,604),(196,605),(196,606),(196,607),(196,608),(196,609),(196,610),(196,611),(196,612),(196,613),(196,614),(196,615),(196,616),(196,617),(196,618),(196,619),(196,620),(196,621),(196,622),(196,623),(196,624),(196,625),(196,626),(196,627),(196,628),(196,629),(196,630),(196,631),(196,633),(196,634),(196,635),(196,636),(196,637),(196,638),(196,639),(196,640),(196,641),(196,642),(196,643),(196,644),(196,645),(196,646),(196,647),(196,648),(196,649),(196,650),(196,651),(196,652),(196,653),(196,654),(196,655),(196,656),(196,657),(196,658),(196,659),(196,660),(196,661),(196,662),(196,663),(196,664),(196,665),(196,666),(196,667),(196,668),(196,669),(196,670),(196,671),(196,672),(196,673),(196,674),(196,675),(196,676),(196,677),(196,678),(196,679),(196,680),(196,681),(196,682),(196,683),(196,684),(196,685),(196,686),(196,687),(196,688),(196,689),(196,690),(196,691),(196,692),(196,693),(196,694),(196,695),(196,696),(196,697),(196,698),(196,699),(196,700),(196,701),(196,702),(196,703),(196,704),(196,705),(196,706),(196,707),(196,708),(196,709),(196,710),(196,711),(196,712),(196,713),(196,714),(196,715),(196,716),(196,717),(196,718),(196,719),(196,721),(196,722),(196,723),(196,724),(196,725),(196,726),(196,727),(196,728),(196,729),(196,730),(196,733),(196,734),(196,735),(196,736),(196,738),(196,739),(196,748),(196,753),(196,757),(196,773),(196,777),(197,232),(197,236),(197,237),(197,273),(197,274),(197,275),(197,276),(197,277),(197,284),(197,285),(197,286),(197,301),(197,311),(197,387),(197,388),(197,389),(197,390),(197,391),(197,392),(197,393),(197,394),(197,395),(197,396),(197,397),(197,398),(197,399),(197,479),(197,480),(197,481),(197,482),(197,485),(197,486),(197,487),(197,494),(197,506),(197,509),(197,510),(197,517),(197,518),(197,521),(197,542),(197,543),(197,550),(197,558),(197,568),(197,571),(197,572),(197,573),(197,574),(197,575),(197,576),(197,577),(197,578),(197,579),(197,580),(197,583),(197,584),(197,585),(197,586),(197,587),(197,588),(197,589),(197,590),(197,591),(197,594),(197,595),(197,601),(197,743),(197,750),(197,758),(197,761),(197,762),(197,763),(197,764),(197,765),(197,766),(197,767),(197,768),(197,769),(197,770),(197,771),(197,772),(197,774),(198,218),(198,300),(198,312),(198,315),(198,316),(198,317),(198,318),(198,367),(198,368),(198,369),(198,370),(198,371),(198,372),(198,374),(198,376),(198,377),(198,378),(198,379),(198,380),(198,381),(198,382),(198,383),(198,384),(198,385),(198,386),(198,408),(198,409),(198,410),(198,411),(198,412),(198,413),(198,414),(198,415),(198,416),(198,430),(198,431),(198,432),(198,433),(198,462),(198,466),(198,467),(198,468),(198,469),(198,470),(198,471),(198,483),(198,484),(198,490),(198,504),(198,512),(198,515),(198,520),(198,524),(198,528),(198,531),(198,532),(198,544),(198,545),(198,546),(198,547),(198,548),(198,549),(198,551),(198,552),(198,553),(198,554),(198,555),(198,557),(198,559),(198,560),(198,561),(198,562),(198,563),(198,564),(198,565),(198,566),(198,567),(198,569),(198,570),(198,597),(198,598),(198,599),(198,600),(198,737),(198,740),(198,741),(198,742),(198,744),(198,745),(198,746),(198,747),(198,749),(198,751),(198,752),(198,754),(198,755),(198,756),(198,759),(198,760),(199,217),(199,221),(199,222),(199,223),(199,225),(199,263),(199,496),(199,501),(199,507),(199,525),(199,534);
/*!40000 ALTER TABLE `rbac_linked_permissions` ENABLE KEYS */;
UNLOCK TABLES;
@@ -372,7 +372,7 @@ CREATE TABLE `rbac_permissions` (
LOCK TABLES `rbac_permissions` WRITE;
/*!40000 ALTER TABLE `rbac_permissions` DISABLE KEYS */;
-INSERT INTO `rbac_permissions` VALUES (1,'Instant logout'),(2,'Skip Queue'),(3,'Join Normal Battleground'),(4,'Join Random Battleground'),(5,'Join Arenas'),(6,'Join Dungeon Finder'),(11,'Log GM trades'),(13,'Skip Instance required bosses check'),(14,'Skip character creation team mask check'),(15,'Skip character creation class mask check'),(16,'Skip character creation race mask check'),(17,'Skip character creation reserved name check'),(18,'Skip character creation heroic min level check'),(19,'Skip needed requirements to use channel check'),(20,'Skip disable map check'),(21,'Skip reset talents when used more than allowed check'),(22,'Skip spam chat check'),(23,'Skip over-speed ping check'),(24,'Two side faction characters on the same account'),(25,'Allow say chat between factions'),(26,'Allow channel chat between factions'),(27,'Two side mail interaction'),(28,'See two side who list'),(29,'Add friends of other faction'),(30,'Save character without delay with .save command'),(31,'Use params with .unstuck command'),(32,'Can be assigned tickets with .assign ticket command'),(33,'Notify if a command was not found'),(34,'Check if should appear in list using .gm ingame command'),(35,'See all security levels with who command'),(36,'Filter whispers'),(37,'Use staff badge in chat'),(38,'Resurrect with full Health Points'),(39,'Restore saved gm setting states'),(40,'Allows to add a gm to friend list'),(41,'Use Config option START_GM_LEVEL to assign new character level'),(42,'Allows to use CMSG_WORLD_TELEPORT opcode'),(43,'Allows to use CMSG_WHOIS opcode'),(44,'Receive global GM messages/texts'),(45,'Join channels without announce'),(46,'Change channel settings without being channel moderator'),(47,'Enables lower security than target check'),(48,'Enable IP, Last Login and EMail output in pinfo'),(49,'Forces to enter the email for confirmation on password change'),(50,'Allow user to check his own email with .account'),(192,'Role: Sec Level Administrator'),(193,'Role: Sec Level Gamemaster'),(194,'Role: Sec Level Moderator'),(195,'Role: Sec Level Player'),(196,'Role: Administrator Commands'),(197,'Role: Gamemaster Commands'),(198,'Role: Moderator Commands'),(199,'Role: Player Commands'),(200,'Command: rbac'),(201,'Command: rbac account'),(202,'Command: rbac account list'),(203,'Command: rbac account grant'),(204,'Command: rbac account deny'),(205,'Command: rbac account revoke'),(206,'Command: rbac list'),(217,'Command: account'),(218,'Command: account addon'),(219,'Command: account create'),(220,'Command: account delete'),(221,'Command: account lock'),(222,'Command: account lock country'),(223,'Command: account lock ip'),(224,'Command: account onlinelist'),(225,'Command: account password'),(226,'Command: account set'),(227,'Command: account set addon'),(228,'Command: account set gmlevel'),(229,'Command: account set password'),(230,'Command: achievement'),(231,'Command: achievement add'),(232,'Command: arena'),(233,'Command: arena captain'),(234,'Command: arena create'),(235,'Command: arena disband'),(236,'Command: arena info'),(237,'Command: arena lookup'),(238,'Command: arena rename'),(239,'Command: ban'),(240,'Command: ban account'),(241,'Command: ban character'),(242,'Command: ban ip'),(243,'Command: ban playeraccount'),(244,'Command: baninfo'),(245,'Command: baninfo account'),(246,'Command: baninfo character'),(247,'Command: baninfo ip'),(248,'Command: banlist'),(249,'Command: banlist account'),(250,'Command: banlist character'),(251,'Command: banlist ip'),(252,'Command: unban'),(253,'Command: unban account'),(254,'Command: unban character'),(255,'Command: unban ip'),(256,'Command: unban playeraccount'),(257,'Command: bf'),(258,'Command: bf start'),(259,'Command: bf stop'),(260,'Command: bf switch'),(261,'Command: bf timer'),(262,'Command: bf enable'),(263,'Command: account email'),(264,'Command: account set sec'),(265,'Command: account set sec email'),(266,'Command: account set sec regmail'),(267,'Command: cast'),(268,'Command: cast back'),(269,'Command: cast dist'),(270,'Command: cast self'),(271,'Command: cast target'),(272,'Command: cast dest'),(273,'Command: character'),(274,'Command: character customize'),(275,'Command: character changefaction'),(276,'Command: character changerace'),(277,'Command: character deleted'),(279,'Command: character deleted list'),(280,'Command: character deleted restore'),(283,'Command: character level'),(284,'Command: character rename'),(285,'Command: character reputation'),(286,'Command: character titles'),(287,'Command: levelup'),(288,'Command: pdump'),(289,'Command: pdump load'),(290,'Command: pdump write'),(291,'Command: cheat'),(292,'Command: cheat casttime'),(293,'Command: cheat cooldown'),(294,'Command: cheat explore'),(295,'Command: cheat god'),(296,'Command: cheat power'),(297,'Command: cheat status'),(298,'Command: cheat taxi'),(299,'Command: cheat waterwalk'),(300,'Command: debug'),(301,'Command: debug anim'),(302,'Command: debug areatriggers'),(303,'Command: debug arena'),(304,'Command: debug bg'),(305,'Command: debug entervehicle'),(306,'Command: debug getitemstate'),(307,'Command: debug getitemvalue'),(308,'Command: debug getvalue'),(309,'Command: debug hostil'),(310,'Command: debug itemexpire'),(311,'Command: debug lootrecipient'),(312,'Command: debug los'),(313,'Command: debug mod32value'),(314,'Command: debug moveflags'),(315,'Command: debug play'),(316,'Command: debug play cinematics'),(317,'Command: debug play movie'),(318,'Command: debug play sound'),(319,'Command: debug send'),(320,'Command: debug send buyerror'),(321,'Command: debug send channelnotify'),(322,'Command: debug send chatmessage'),(323,'Command: debug send equiperror'),(324,'Command: debug send largepacket'),(325,'Command: debug send opcode'),(326,'Command: debug send qinvalidmsg'),(327,'Command: debug send qpartymsg'),(328,'Command: debug send sellerror'),(329,'Command: debug send setphaseshift'),(330,'Command: debug send spellfail'),(331,'Command: debug setaurastate'),(332,'Command: debug setbit'),(333,'Command: debug setitemvalue'),(334,'Command: debug setvalue'),(335,'Command: debug setvid'),(336,'Command: debug spawnvehicle'),(337,'Command: debug threat'),(338,'Command: debug update'),(339,'Command: debug uws'),(340,'Command: wpgps'),(341,'Command: deserter'),(342,'Command: deserter bg'),(343,'Command: deserter bg add'),(344,'Command: deserter bg remove'),(345,'Command: deserter instance'),(346,'Command: deserter instance add'),(347,'Command: deserter instance remove'),(348,'Command: disable'),(349,'Command: disable add'),(350,'Command: disable add achievement_criteria'),(351,'Command: disable add battleground'),(352,'Command: disable add map'),(353,'Command: disable add mmap'),(354,'Command: disable add outdoorpvp'),(355,'Command: disable add quest'),(356,'Command: disable add spell'),(357,'Command: disable add vmap'),(358,'Command: disable remove'),(359,'Command: disable remove achievement_criteria'),(360,'Command: disable remove battleground'),(361,'Command: disable remove map'),(362,'Command: disable remove mmap'),(363,'Command: disable remove outdoorpvp'),(364,'Command: disable remove quest'),(365,'Command: disable remove spell'),(366,'Command: disable remove vmap'),(367,'Command: event'),(368,'Command: event activelist'),(369,'Command: event start'),(370,'Command: event stop'),(371,'Command: gm'),(372,'Command: gm chat'),(373,'Command: gm fly'),(374,'Command: gm ingame'),(375,'Command: gm list'),(376,'Command: gm visible'),(377,'Command: go'),(378,'Command: go creature'),(379,'Command: go graveyard'),(380,'Command: go grid'),(381,'Command: go object'),(382,'Command: go taxinode'),(383,'Command: go ticket'),(384,'Command: go trigger'),(385,'Command: go xyz'),(386,'Command: go zonexy'),(387,'Command: gobject'),(388,'Command: gobject activate'),(389,'Command: gobject add'),(390,'Command: gobject add temp'),(391,'Command: gobject delete'),(392,'Command: gobject info'),(393,'Command: gobject move'),(394,'Command: gobject near'),(395,'Command: gobject set'),(396,'Command: gobject set phase'),(397,'Command: gobject set state'),(398,'Command: gobject target'),(399,'Command: gobject turn'),(400,'debug transport'),(401,'Command: guild'),(402,'Command: guild create'),(403,'Command: guild delete'),(404,'Command: guild invite'),(405,'Command: guild uninvite'),(406,'Command: guild rank'),(407,'Command: guild rename'),(408,'Command: honor'),(409,'Command: honor add'),(410,'Command: honor add kill'),(411,'Command: honor update'),(412,'Command: instance'),(413,'Command: instance listbinds'),(414,'Command: instance unbind'),(415,'Command: instance stats'),(416,'Command: instance savedata'),(417,'Command: learn'),(418,'Command: learn all'),(419,'Command: learn all my'),(420,'Command: learn all my class'),(421,'Command: learn all my pettalents'),(422,'Command: learn all my spells'),(423,'Command: learn all my talents'),(424,'Command: learn all gm'),(425,'Command: learn all crafts'),(426,'Command: learn all default'),(427,'Command: learn all lang'),(428,'Command: learn all recipes'),(429,'Command: unlearn'),(430,'Command: lfg'),(431,'Command: lfg player'),(432,'Command: lfg group'),(433,'Command: lfg queue'),(434,'Command: lfg clean'),(435,'Command: lfg options'),(436,'Command: list'),(437,'Command: list creature'),(438,'Command: list item'),(439,'Command: list object'),(440,'Command: list auras'),(441,'Command: list mail'),(442,'Command: lookup'),(443,'Command: lookup area'),(444,'Command: lookup creature'),(445,'Command: lookup event'),(446,'Command: lookup faction'),(447,'Command: lookup item'),(448,'Command: lookup itemset'),(449,'Command: lookup object'),(450,'Command: lookup quest'),(451,'Command: lookup player'),(452,'Command: lookup player ip'),(453,'Command: lookup player account'),(454,'Command: lookup player email'),(455,'Command: lookup skill'),(456,'Command: lookup spell'),(457,'Command: lookup spell id'),(458,'Command: lookup taxinode'),(459,'Command: lookup tele'),(460,'Command: lookup title'),(461,'Command: lookup map'),(462,'Command: announce'),(463,'Command: channel'),(464,'Command: channel set'),(465,'Command: channel set ownership'),(466,'Command: gmannounce'),(467,'Command: gmnameannounce'),(468,'Command: gmnotify'),(469,'Command: nameannounce'),(470,'Command: notify'),(471,'Command: whispers'),(472,'Command: group'),(473,'Command: group leader'),(474,'Command: group disband'),(475,'Command: group remove'),(476,'Command: group join'),(477,'Command: group list'),(478,'Command: group summon'),(479,'Command: pet'),(480,'Command: pet create'),(481,'Command: pet learn'),(482,'Command: pet unlearn'),(483,'Command: send'),(484,'Command: send items'),(485,'Command: send mail'),(486,'Command: send message'),(487,'Command: send money'),(488,'Command: additem'),(489,'Command: additemset'),(490,'Command: appear'),(491,'Command: aura'),(492,'Command: bank'),(493,'Command: bindsight'),(494,'Command: combatstop'),(495,'Command: cometome'),(496,'Command: commands'),(497,'Command: cooldown'),(498,'Command: damage'),(499,'Command: dev'),(500,'Command: die'),(501,'Command: dismount'),(502,'Command: distance'),(503,'Command: flusharenapoints'),(504,'Command: freeze'),(505,'Command: gps'),(506,'Command: guid'),(507,'Command: help'),(508,'Command: hidearea'),(509,'Command: itemmove'),(510,'Command: kick'),(511,'Command: linkgrave'),(512,'Command: listfreeze'),(513,'Command: maxskill'),(514,'Command: movegens'),(515,'Command: mute'),(516,'Command: neargrave'),(517,'Command: pinfo'),(518,'Command: playall'),(519,'Command: possess'),(520,'Command: recall'),(521,'Command: repairitems'),(522,'Command: respawn'),(523,'Command: revive'),(524,'Command: saveall'),(525,'Command: save'),(526,'Command: setskill'),(527,'Command: showarea'),(528,'Command: summon'),(529,'Command: unaura'),(530,'Command: unbindsight'),(531,'Command: unfreeze'),(532,'Command: unmute'),(533,'Command: unpossess'),(534,'Command: unstuck'),(535,'Command: wchange'),(536,'Command: mmap'),(537,'Command: mmap loadedtiles'),(538,'Command: mmap loc'),(539,'Command: mmap path'),(540,'Command: mmap stats'),(541,'Command: mmap testarea'),(542,'Command: morph'),(543,'Command: demorph'),(544,'Command: modify'),(545,'Command: modify arenapoints'),(546,'Command: modify bit'),(547,'Command: modify drunk'),(548,'Command: modify energy'),(549,'Command: modify faction'),(550,'Command: modify gender'),(551,'Command: modify honor'),(552,'Command: modify hp'),(553,'Command: modify mana'),(554,'Command: modify money'),(555,'Command: modify mount'),(556,'Command: modify phase'),(557,'Command: modify rage'),(558,'Command: modify reputation'),(559,'Command: modify runicpower'),(560,'Command: modify scale'),(561,'Command: modify speed'),(562,'Command: modify speed all'),(563,'Command: modify speed backwalk'),(564,'Command: modify speed fly'),(565,'Command: modify speed walk'),(566,'Command: modify speed swim'),(567,'Command: modify spell'),(568,'Command: modify standstate'),(569,'Command: modify talentpoints'),(570,'Command: npc'),(571,'Command: npc add'),(572,'Command: npc add formation'),(573,'Command: npc add item'),(574,'Command: npc add move'),(575,'Command: npc add temp'),(576,'Command: npc add delete'),(577,'Command: npc add delete item'),(578,'Command: npc add follow'),(579,'Command: npc add follow stop'),(580,'Command: npc set'),(581,'Command: npc set allowmove'),(582,'Command: npc set entry'),(583,'Command: npc set factionid'),(584,'Command: npc set flag'),(585,'Command: npc set level'),(586,'Command: npc set link'),(587,'Command: npc set model'),(588,'Command: npc set movetype'),(589,'Command: npc set phase'),(590,'Command: npc set spawndist'),(591,'Command: npc set spawntime'),(592,'Command: npc set data'),(593,'Command: npc info'),(594,'Command: npc near'),(595,'Command: npc move'),(596,'Command: npc playemote'),(597,'Command: npc say'),(598,'Command: npc textemote'),(599,'Command: npc whisper'),(600,'Command: npc yell'),(601,'Command: npc tame'),(602,'Command: quest'),(603,'Command: quest add'),(604,'Command: quest complete'),(605,'Command: quest remove'),(606,'Command: quest reward'),(607,'Command: reload'),(608,'Command: reload access_requirement'),(609,'Command: reload achievement_criteria_data'),(610,'Command: reload achievement_reward'),(611,'Command: reload all'),(612,'Command: reload all achievement'),(613,'Command: reload all area'),(614,'Command: mailbox'),(615,'Command: reload all gossips'),(616,'Command: reload all item'),(617,'Command: reload all locales'),(618,'Command: reload all loot'),(619,'Command: reload all npc'),(620,'Command: reload all quest'),(621,'Command: reload all scripts'),(622,'Command: reload all spell'),(623,'Command: reload areatrigger_involvedrelation'),(624,'Command: reload areatrigger_tavern'),(625,'Command: reload areatrigger_teleport'),(626,'Command: reload auctions'),(627,'Command: reload autobroadcast'),(628,'Command: reload command'),(629,'Command: reload conditions'),(630,'Command: reload config'),(633,'Command: reload creature_linked_respawn'),(634,'Command: reload creature_loot_template'),(635,'Command: reload creature_onkill_reputation'),(636,'Command: reload creature_questender'),(637,'Command: reload creature_queststarter'),(638,'Command: reload creature_summon_groups'),(639,'Command: reload creature_template'),(640,'Command: reload creature_text'),(641,'Command: reload disables'),(642,'Command: reload disenchant_loot_template'),(643,'Command: reload event_scripts'),(644,'Command: reload fishing_loot_template'),(645,'Command: reload game_graveyard_zone'),(646,'Command: reload game_tele'),(647,'Command: reload gameobject_questender'),(648,'Command: reload gameobject_loot_template'),(649,'Command: reload gameobject_queststarter'),(650,'Command: reload gm_tickets'),(651,'Command: reload gossip_menu'),(652,'Command: reload gossip_menu_option'),(653,'Command: reload item_enchantment_template'),(654,'Command: reload item_loot_template'),(655,'Command: reload item_set_names'),(656,'Command: reload lfg_dungeon_rewards'),(657,'Command: reload locales_achievement_reward'),(658,'Command: reload locales_creature'),(659,'Command: reload locales_creature_text'),(660,'Command: reload locales_gameobject'),(661,'Command: reload locales_gossip_menu_option'),(662,'Command: reload locales_item'),(663,'Command: reload locales_item_set_name'),(664,'Command: reload locales_npc_text'),(665,'Command: reload locales_page_text'),(666,'Command: reload locales_points_of_interest'),(667,'Command: reload locales_quest'),(668,'Command: reload mail_level_reward'),(669,'Command: reload mail_loot_template'),(670,'Command: reload milling_loot_template'),(671,'Command: reload npc_spellclick_spells'),(672,'Command: reload npc_trainer'),(673,'Command: reload npc_vendor'),(674,'Command: reload page_text'),(675,'Command: reload pickpocketing_loot_template'),(676,'Command: reload points_of_interest'),(677,'Command: reload prospecting_loot_template'),(678,'Command: reload quest_poi'),(679,'Command: reload quest_template'),(680,'Command: reload rbac'),(681,'Command: reload reference_loot_template'),(682,'Command: reload reserved_name'),(683,'Command: reload reputation_reward_rate'),(684,'Command: reload reputation_spillover_template'),(685,'Command: reload skill_discovery_template'),(686,'Command: reload skill_extra_item_template'),(687,'Command: reload skill_fishing_base_level'),(688,'Command: reload skinning_loot_template'),(689,'Command: reload smart_scripts'),(690,'Command: reload spell_required'),(691,'Command: reload spell_area'),(692,'Command: reload spell_bonus_data'),(693,'Command: reload spell_group'),(694,'Command: reload spell_learn_spell'),(695,'Command: reload spell_loot_template'),(696,'Command: reload spell_linked_spell'),(697,'Command: reload spell_pet_auras'),(698,'Command: reload spell_proc_event'),(699,'Command: reload spell_proc'),(700,'Command: reload spell_scripts'),(701,'Command: reload spell_target_position'),(702,'Command: reload spell_threats'),(703,'Command: reload spell_group_stack_rules'),(704,'Command: reload trinity_string'),(705,'Command: reload warden_action'),(706,'Command: reload waypoint_scripts'),(707,'Command: reload waypoint_data'),(708,'Command: reload vehicle_accessory'),(709,'Command: reload vehicle_template_accessory'),(710,'Command: reset'),(711,'Command: reset achievements'),(712,'Command: reset honor'),(713,'Command: reset level'),(714,'Command: reset spells'),(715,'Command: reset stats'),(716,'Command: reset talents'),(717,'Command: reset all'),(718,'Command: server'),(719,'Command: server corpses'),(720,'Command: server exit'),(721,'Command: server idlerestart'),(722,'Command: server idlerestart cancel'),(723,'Command: server idleshutdown'),(724,'Command: server idleshutdown cancel'),(725,'Command: server info'),(726,'Command: server plimit'),(727,'Command: server restart'),(728,'Command: server restart cancel'),(729,'Command: server set'),(730,'Command: server set closed'),(731,'Command: server set difftime'),(732,'Command: server set loglevel'),(733,'Command: server set motd'),(734,'Command: server shutdown'),(735,'Command: server shutdown cancel'),(736,'Command: server motd'),(737,'Command: tele'),(738,'Command: tele add'),(739,'Command: tele del'),(740,'Command: tele name'),(741,'Command: tele group'),(742,'Command: ticket'),(743,'Command: ticket assign'),(744,'Command: ticket close'),(745,'Command: ticket closedlist'),(746,'Command: ticket comment'),(747,'Command: ticket complete'),(748,'Command: ticket delete'),(749,'Command: ticket escalate'),(750,'Command: ticket escalatedlist'),(751,'Command: ticket list'),(752,'Command: ticket onlinelist'),(753,'Command: ticket reset'),(754,'Command: ticket response'),(755,'Command: ticket response append'),(756,'Command: ticket response appendln'),(757,'Command: ticket togglesystem'),(758,'Command: ticket unassign'),(759,'Command: ticket viewid'),(760,'Command: ticket viewname'),(761,'Command: titles'),(762,'Command: titles add'),(763,'Command: titles current'),(764,'Command: titles remove'),(765,'Command: titles set'),(766,'Command: titles set mask'),(767,'Command: wp'),(768,'Command: wp add'),(769,'Command: wp event'),(770,'Command: wp load'),(771,'Command: wp modify'),(772,'Command: wp unload'),(773,'Command: wp reload'),(774,'Command: wp show'),(777,'Command: mailbox');
+INSERT INTO `rbac_permissions` VALUES (1,'Instant logout'),(2,'Skip Queue'),(3,'Join Normal Battleground'),(4,'Join Random Battleground'),(5,'Join Arenas'),(6,'Join Dungeon Finder'),(11,'Log GM trades'),(13,'Skip Instance required bosses check'),(14,'Skip character creation team mask check'),(15,'Skip character creation class mask check'),(16,'Skip character creation race mask check'),(17,'Skip character creation reserved name check'),(18,'Skip character creation heroic min level check'),(19,'Skip needed requirements to use channel check'),(20,'Skip disable map check'),(21,'Skip reset talents when used more than allowed check'),(22,'Skip spam chat check'),(23,'Skip over-speed ping check'),(24,'Two side faction characters on the same account'),(25,'Allow say chat between factions'),(26,'Allow channel chat between factions'),(27,'Two side mail interaction'),(28,'See two side who list'),(29,'Add friends of other faction'),(30,'Save character without delay with .save command'),(31,'Use params with .unstuck command'),(32,'Can be assigned tickets with .assign ticket command'),(33,'Notify if a command was not found'),(34,'Check if should appear in list using .gm ingame command'),(35,'See all security levels with who command'),(36,'Filter whispers'),(37,'Use staff badge in chat'),(38,'Resurrect with full Health Points'),(39,'Restore saved gm setting states'),(40,'Allows to add a gm to friend list'),(41,'Use Config option START_GM_LEVEL to assign new character level'),(42,'Allows to use CMSG_WORLD_TELEPORT opcode'),(43,'Allows to use CMSG_WHOIS opcode'),(44,'Receive global GM messages/texts'),(45,'Join channels without announce'),(46,'Change channel settings without being channel moderator'),(47,'Enables lower security than target check'),(48,'Enable IP, Last Login and EMail output in pinfo'),(49,'Forces to enter the email for confirmation on password change'),(50,'Allow user to check his own email with .account'),(192,'Role: Sec Level Administrator'),(193,'Role: Sec Level Gamemaster'),(194,'Role: Sec Level Moderator'),(195,'Role: Sec Level Player'),(196,'Role: Administrator Commands'),(197,'Role: Gamemaster Commands'),(198,'Role: Moderator Commands'),(199,'Role: Player Commands'),(200,'Command: rbac'),(201,'Command: rbac account'),(202,'Command: rbac account list'),(203,'Command: rbac account grant'),(204,'Command: rbac account deny'),(205,'Command: rbac account revoke'),(206,'Command: rbac list'),(217,'Command: account'),(218,'Command: account addon'),(219,'Command: account create'),(220,'Command: account delete'),(221,'Command: account lock'),(222,'Command: account lock country'),(223,'Command: account lock ip'),(224,'Command: account onlinelist'),(225,'Command: account password'),(226,'Command: account set'),(227,'Command: account set addon'),(228,'Command: account set gmlevel'),(229,'Command: account set password'),(230,'Command: achievement'),(231,'Command: achievement add'),(232,'Command: arena'),(233,'Command: arena captain'),(234,'Command: arena create'),(235,'Command: arena disband'),(236,'Command: arena info'),(237,'Command: arena lookup'),(238,'Command: arena rename'),(239,'Command: ban'),(240,'Command: ban account'),(241,'Command: ban character'),(242,'Command: ban ip'),(243,'Command: ban playeraccount'),(244,'Command: baninfo'),(245,'Command: baninfo account'),(246,'Command: baninfo character'),(247,'Command: baninfo ip'),(248,'Command: banlist'),(249,'Command: banlist account'),(250,'Command: banlist character'),(251,'Command: banlist ip'),(252,'Command: unban'),(253,'Command: unban account'),(254,'Command: unban character'),(255,'Command: unban ip'),(256,'Command: unban playeraccount'),(257,'Command: bf'),(258,'Command: bf start'),(259,'Command: bf stop'),(260,'Command: bf switch'),(261,'Command: bf timer'),(262,'Command: bf enable'),(263,'Command: account email'),(264,'Command: account set sec'),(265,'Command: account set sec email'),(266,'Command: account set sec regmail'),(267,'Command: cast'),(268,'Command: cast back'),(269,'Command: cast dist'),(270,'Command: cast self'),(271,'Command: cast target'),(272,'Command: cast dest'),(273,'Command: character'),(274,'Command: character customize'),(275,'Command: character changefaction'),(276,'Command: character changerace'),(277,'Command: character deleted'),(279,'Command: character deleted list'),(280,'Command: character deleted restore'),(283,'Command: character level'),(284,'Command: character rename'),(285,'Command: character reputation'),(286,'Command: character titles'),(287,'Command: levelup'),(288,'Command: pdump'),(289,'Command: pdump load'),(290,'Command: pdump write'),(291,'Command: cheat'),(292,'Command: cheat casttime'),(293,'Command: cheat cooldown'),(294,'Command: cheat explore'),(295,'Command: cheat god'),(296,'Command: cheat power'),(297,'Command: cheat status'),(298,'Command: cheat taxi'),(299,'Command: cheat waterwalk'),(300,'Command: debug'),(301,'Command: debug anim'),(302,'Command: debug areatriggers'),(303,'Command: debug arena'),(304,'Command: debug bg'),(305,'Command: debug entervehicle'),(306,'Command: debug getitemstate'),(307,'Command: debug getitemvalue'),(308,'Command: debug getvalue'),(309,'Command: debug hostil'),(310,'Command: debug itemexpire'),(311,'Command: debug lootrecipient'),(312,'Command: debug los'),(313,'Command: debug mod32value'),(314,'Command: debug moveflags'),(315,'Command: debug play'),(316,'Command: debug play cinematics'),(317,'Command: debug play movie'),(318,'Command: debug play sound'),(319,'Command: debug send'),(320,'Command: debug send buyerror'),(321,'Command: debug send channelnotify'),(322,'Command: debug send chatmessage'),(323,'Command: debug send equiperror'),(324,'Command: debug send largepacket'),(325,'Command: debug send opcode'),(326,'Command: debug send qinvalidmsg'),(327,'Command: debug send qpartymsg'),(328,'Command: debug send sellerror'),(329,'Command: debug send setphaseshift'),(330,'Command: debug send spellfail'),(331,'Command: debug setaurastate'),(332,'Command: debug setbit'),(333,'Command: debug setitemvalue'),(334,'Command: debug setvalue'),(335,'Command: debug setvid'),(336,'Command: debug spawnvehicle'),(337,'Command: debug threat'),(338,'Command: debug update'),(339,'Command: debug uws'),(340,'Command: wpgps'),(341,'Command: deserter'),(342,'Command: deserter bg'),(343,'Command: deserter bg add'),(344,'Command: deserter bg remove'),(345,'Command: deserter instance'),(346,'Command: deserter instance add'),(347,'Command: deserter instance remove'),(348,'Command: disable'),(349,'Command: disable add'),(350,'Command: disable add achievement_criteria'),(351,'Command: disable add battleground'),(352,'Command: disable add map'),(353,'Command: disable add mmap'),(354,'Command: disable add outdoorpvp'),(355,'Command: disable add quest'),(356,'Command: disable add spell'),(357,'Command: disable add vmap'),(358,'Command: disable remove'),(359,'Command: disable remove achievement_criteria'),(360,'Command: disable remove battleground'),(361,'Command: disable remove map'),(362,'Command: disable remove mmap'),(363,'Command: disable remove outdoorpvp'),(364,'Command: disable remove quest'),(365,'Command: disable remove spell'),(366,'Command: disable remove vmap'),(367,'Command: event'),(368,'Command: event activelist'),(369,'Command: event start'),(370,'Command: event stop'),(371,'Command: gm'),(372,'Command: gm chat'),(373,'Command: gm fly'),(374,'Command: gm ingame'),(375,'Command: gm list'),(376,'Command: gm visible'),(377,'Command: go'),(378,'Command: go creature'),(379,'Command: go graveyard'),(380,'Command: go grid'),(381,'Command: go object'),(382,'Command: go taxinode'),(383,'Command: go ticket'),(384,'Command: go trigger'),(385,'Command: go xyz'),(386,'Command: go zonexy'),(387,'Command: gobject'),(388,'Command: gobject activate'),(389,'Command: gobject add'),(390,'Command: gobject add temp'),(391,'Command: gobject delete'),(392,'Command: gobject info'),(393,'Command: gobject move'),(394,'Command: gobject near'),(395,'Command: gobject set'),(396,'Command: gobject set phase'),(397,'Command: gobject set state'),(398,'Command: gobject target'),(399,'Command: gobject turn'),(400,'debug transport'),(401,'Command: guild'),(402,'Command: guild create'),(403,'Command: guild delete'),(404,'Command: guild invite'),(405,'Command: guild uninvite'),(406,'Command: guild rank'),(407,'Command: guild rename'),(408,'Command: honor'),(409,'Command: honor add'),(410,'Command: honor add kill'),(411,'Command: honor update'),(412,'Command: instance'),(413,'Command: instance listbinds'),(414,'Command: instance unbind'),(415,'Command: instance stats'),(416,'Command: instance savedata'),(417,'Command: learn'),(418,'Command: learn all'),(419,'Command: learn all my'),(420,'Command: learn all my class'),(421,'Command: learn all my pettalents'),(422,'Command: learn all my spells'),(423,'Command: learn all my talents'),(424,'Command: learn all gm'),(425,'Command: learn all crafts'),(426,'Command: learn all default'),(427,'Command: learn all lang'),(428,'Command: learn all recipes'),(429,'Command: unlearn'),(430,'Command: lfg'),(431,'Command: lfg player'),(432,'Command: lfg group'),(433,'Command: lfg queue'),(434,'Command: lfg clean'),(435,'Command: lfg options'),(436,'Command: list'),(437,'Command: list creature'),(438,'Command: list item'),(439,'Command: list object'),(440,'Command: list auras'),(441,'Command: list mail'),(442,'Command: lookup'),(443,'Command: lookup area'),(444,'Command: lookup creature'),(445,'Command: lookup event'),(446,'Command: lookup faction'),(447,'Command: lookup item'),(448,'Command: lookup itemset'),(449,'Command: lookup object'),(450,'Command: lookup quest'),(451,'Command: lookup player'),(452,'Command: lookup player ip'),(453,'Command: lookup player account'),(454,'Command: lookup player email'),(455,'Command: lookup skill'),(456,'Command: lookup spell'),(457,'Command: lookup spell id'),(458,'Command: lookup taxinode'),(459,'Command: lookup tele'),(460,'Command: lookup title'),(461,'Command: lookup map'),(462,'Command: announce'),(463,'Command: channel'),(464,'Command: channel set'),(465,'Command: channel set ownership'),(466,'Command: gmannounce'),(467,'Command: gmnameannounce'),(468,'Command: gmnotify'),(469,'Command: nameannounce'),(470,'Command: notify'),(471,'Command: whispers'),(472,'Command: group'),(473,'Command: group leader'),(474,'Command: group disband'),(475,'Command: group remove'),(476,'Command: group join'),(477,'Command: group list'),(478,'Command: group summon'),(479,'Command: pet'),(480,'Command: pet create'),(481,'Command: pet learn'),(482,'Command: pet unlearn'),(483,'Command: send'),(484,'Command: send items'),(485,'Command: send mail'),(486,'Command: send message'),(487,'Command: send money'),(488,'Command: additem'),(489,'Command: additemset'),(490,'Command: appear'),(491,'Command: aura'),(492,'Command: bank'),(493,'Command: bindsight'),(494,'Command: combatstop'),(495,'Command: cometome'),(496,'Command: commands'),(497,'Command: cooldown'),(498,'Command: damage'),(499,'Command: dev'),(500,'Command: die'),(501,'Command: dismount'),(502,'Command: distance'),(503,'Command: flusharenapoints'),(504,'Command: freeze'),(505,'Command: gps'),(506,'Command: guid'),(507,'Command: help'),(508,'Command: hidearea'),(509,'Command: itemmove'),(510,'Command: kick'),(511,'Command: linkgrave'),(512,'Command: listfreeze'),(513,'Command: maxskill'),(514,'Command: movegens'),(515,'Command: mute'),(516,'Command: neargrave'),(517,'Command: pinfo'),(518,'Command: playall'),(519,'Command: possess'),(520,'Command: recall'),(521,'Command: repairitems'),(522,'Command: respawn'),(523,'Command: revive'),(524,'Command: saveall'),(525,'Command: save'),(526,'Command: setskill'),(527,'Command: showarea'),(528,'Command: summon'),(529,'Command: unaura'),(530,'Command: unbindsight'),(531,'Command: unfreeze'),(532,'Command: unmute'),(533,'Command: unpossess'),(534,'Command: unstuck'),(535,'Command: wchange'),(536,'Command: mmap'),(537,'Command: mmap loadedtiles'),(538,'Command: mmap loc'),(539,'Command: mmap path'),(540,'Command: mmap stats'),(541,'Command: mmap testarea'),(542,'Command: morph'),(543,'Command: demorph'),(544,'Command: modify'),(545,'Command: modify arenapoints'),(546,'Command: modify bit'),(547,'Command: modify drunk'),(548,'Command: modify energy'),(549,'Command: modify faction'),(550,'Command: modify gender'),(551,'Command: modify honor'),(552,'Command: modify hp'),(553,'Command: modify mana'),(554,'Command: modify money'),(555,'Command: modify mount'),(556,'Command: modify phase'),(557,'Command: modify rage'),(558,'Command: modify reputation'),(559,'Command: modify runicpower'),(560,'Command: modify scale'),(561,'Command: modify speed'),(562,'Command: modify speed all'),(563,'Command: modify speed backwalk'),(564,'Command: modify speed fly'),(565,'Command: modify speed walk'),(566,'Command: modify speed swim'),(567,'Command: modify spell'),(568,'Command: modify standstate'),(569,'Command: modify talentpoints'),(570,'Command: npc'),(571,'Command: npc add'),(572,'Command: npc add formation'),(573,'Command: npc add item'),(574,'Command: npc add move'),(575,'Command: npc add temp'),(576,'Command: npc add delete'),(577,'Command: npc add delete item'),(578,'Command: npc add follow'),(579,'Command: npc add follow stop'),(580,'Command: npc set'),(581,'Command: npc set allowmove'),(582,'Command: npc set entry'),(583,'Command: npc set factionid'),(584,'Command: npc set flag'),(585,'Command: npc set level'),(586,'Command: npc set link'),(587,'Command: npc set model'),(588,'Command: npc set movetype'),(589,'Command: npc set phase'),(590,'Command: npc set spawndist'),(591,'Command: npc set spawntime'),(592,'Command: npc set data'),(593,'Command: npc info'),(594,'Command: npc near'),(595,'Command: npc move'),(596,'Command: npc playemote'),(597,'Command: npc say'),(598,'Command: npc textemote'),(599,'Command: npc whisper'),(600,'Command: npc yell'),(601,'Command: npc tame'),(602,'Command: quest'),(603,'Command: quest add'),(604,'Command: quest complete'),(605,'Command: quest remove'),(606,'Command: quest reward'),(607,'Command: reload'),(608,'Command: reload access_requirement'),(609,'Command: reload achievement_criteria_data'),(610,'Command: reload achievement_reward'),(611,'Command: reload all'),(612,'Command: reload all achievement'),(613,'Command: reload all area'),(614,'Command: broadcast_text'),(615,'Command: reload all gossips'),(616,'Command: reload all item'),(617,'Command: reload all locales'),(618,'Command: reload all loot'),(619,'Command: reload all npc'),(620,'Command: reload all quest'),(621,'Command: reload all scripts'),(622,'Command: reload all spell'),(623,'Command: reload areatrigger_involvedrelation'),(624,'Command: reload areatrigger_tavern'),(625,'Command: reload areatrigger_teleport'),(626,'Command: reload auctions'),(627,'Command: reload autobroadcast'),(628,'Command: reload command'),(629,'Command: reload conditions'),(630,'Command: reload config'),(631,'Command: reload battleground_template'),(633,'Command: reload creature_linked_respawn'),(634,'Command: reload creature_loot_template'),(635,'Command: reload creature_onkill_reputation'),(636,'Command: reload creature_questender'),(637,'Command: reload creature_queststarter'),(638,'Command: reload creature_summon_groups'),(639,'Command: reload creature_template'),(640,'Command: reload creature_text'),(641,'Command: reload disables'),(642,'Command: reload disenchant_loot_template'),(643,'Command: reload event_scripts'),(644,'Command: reload fishing_loot_template'),(645,'Command: reload game_graveyard_zone'),(646,'Command: reload game_tele'),(647,'Command: reload gameobject_questender'),(648,'Command: reload gameobject_loot_template'),(649,'Command: reload gameobject_queststarter'),(650,'Command: reload gm_tickets'),(651,'Command: reload gossip_menu'),(652,'Command: reload gossip_menu_option'),(653,'Command: reload item_enchantment_template'),(654,'Command: reload item_loot_template'),(655,'Command: reload item_set_names'),(656,'Command: reload lfg_dungeon_rewards'),(657,'Command: reload locales_achievement_reward'),(658,'Command: reload locales_creature'),(659,'Command: reload locales_creature_text'),(660,'Command: reload locales_gameobject'),(661,'Command: reload locales_gossip_menu_option'),(662,'Command: reload locales_item'),(663,'Command: reload locales_item_set_name'),(664,'Command: reload locales_npc_text'),(665,'Command: reload locales_page_text'),(666,'Command: reload locales_points_of_interest'),(667,'Command: reload locales_quest'),(668,'Command: reload mail_level_reward'),(669,'Command: reload mail_loot_template'),(670,'Command: reload milling_loot_template'),(671,'Command: reload npc_spellclick_spells'),(672,'Command: reload npc_trainer'),(673,'Command: reload npc_vendor'),(674,'Command: reload page_text'),(675,'Command: reload pickpocketing_loot_template'),(676,'Command: reload points_of_interest'),(677,'Command: reload prospecting_loot_template'),(678,'Command: reload quest_poi'),(679,'Command: reload quest_template'),(680,'Command: reload rbac'),(681,'Command: reload reference_loot_template'),(682,'Command: reload reserved_name'),(683,'Command: reload reputation_reward_rate'),(684,'Command: reload reputation_spillover_template'),(685,'Command: reload skill_discovery_template'),(686,'Command: reload skill_extra_item_template'),(687,'Command: reload skill_fishing_base_level'),(688,'Command: reload skinning_loot_template'),(689,'Command: reload smart_scripts'),(690,'Command: reload spell_required'),(691,'Command: reload spell_area'),(692,'Command: reload spell_bonus_data'),(693,'Command: reload spell_group'),(694,'Command: reload spell_learn_spell'),(695,'Command: reload spell_loot_template'),(696,'Command: reload spell_linked_spell'),(697,'Command: reload spell_pet_auras'),(698,'Command: reload spell_proc_event'),(699,'Command: reload spell_proc'),(700,'Command: reload spell_scripts'),(701,'Command: reload spell_target_position'),(702,'Command: reload spell_threats'),(703,'Command: reload spell_group_stack_rules'),(704,'Command: reload trinity_string'),(705,'Command: reload warden_action'),(706,'Command: reload waypoint_scripts'),(707,'Command: reload waypoint_data'),(708,'Command: reload vehicle_accessory'),(709,'Command: reload vehicle_template_accessory'),(710,'Command: reset'),(711,'Command: reset achievements'),(712,'Command: reset honor'),(713,'Command: reset level'),(714,'Command: reset spells'),(715,'Command: reset stats'),(716,'Command: reset talents'),(717,'Command: reset all'),(718,'Command: server'),(719,'Command: server corpses'),(720,'Command: server exit'),(721,'Command: server idlerestart'),(722,'Command: server idlerestart cancel'),(723,'Command: server idleshutdown'),(724,'Command: server idleshutdown cancel'),(725,'Command: server info'),(726,'Command: server plimit'),(727,'Command: server restart'),(728,'Command: server restart cancel'),(729,'Command: server set'),(730,'Command: server set closed'),(731,'Command: server set difftime'),(732,'Command: server set loglevel'),(733,'Command: server set motd'),(734,'Command: server shutdown'),(735,'Command: server shutdown cancel'),(736,'Command: server motd'),(737,'Command: tele'),(738,'Command: tele add'),(739,'Command: tele del'),(740,'Command: tele name'),(741,'Command: tele group'),(742,'Command: ticket'),(743,'Command: ticket assign'),(744,'Command: ticket close'),(745,'Command: ticket closedlist'),(746,'Command: ticket comment'),(747,'Command: ticket complete'),(748,'Command: ticket delete'),(749,'Command: ticket escalate'),(750,'Command: ticket escalatedlist'),(751,'Command: ticket list'),(752,'Command: ticket onlinelist'),(753,'Command: ticket reset'),(754,'Command: ticket response'),(755,'Command: ticket response append'),(756,'Command: ticket response appendln'),(757,'Command: ticket togglesystem'),(758,'Command: ticket unassign'),(759,'Command: ticket viewid'),(760,'Command: ticket viewname'),(761,'Command: titles'),(762,'Command: titles add'),(763,'Command: titles current'),(764,'Command: titles remove'),(765,'Command: titles set'),(766,'Command: titles set mask'),(767,'Command: wp'),(768,'Command: wp add'),(769,'Command: wp event'),(770,'Command: wp load'),(771,'Command: wp modify'),(772,'Command: wp unload'),(773,'Command: wp reload'),(774,'Command: wp show'),(777,'Command: mailbox');
/*!40000 ALTER TABLE `rbac_permissions` ENABLE KEYS */;
UNLOCK TABLES;
@@ -471,4 +471,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2014-06-25 18:37:31
+-- Dump completed on 2014-07-08 11:39:12
diff --git a/sql/updates/auth/2014_07_09_00_auth_rbac_permission.sql b/sql/updates/auth/2014_07_09_00_auth_rbac_permission.sql
new file mode 100644
index 00000000000..068c9c0a098
--- /dev/null
+++ b/sql/updates/auth/2014_07_09_00_auth_rbac_permission.sql
@@ -0,0 +1,10 @@
+SET @id = 631;
+
+-- Add new permissions
+DELETE FROM `rbac_permissions` WHERE `id`=@id;
+INSERT INTO `rbac_permissions` (`id`, `name`) VALUES
+(@id, 'Command: reload battleground_template');
+
+DELETE FROM `rbac_linked_permissions` WHERE `linkedId`=@id;
+INSERT INTO `rbac_linked_permissions` (`id`, `linkedId`) VALUES
+(196, @id);
diff --git a/sql/updates/world/2014_07_07_00_world_creature_text.sql b/sql/updates/world/2014_07_07_00_world_creature_text.sql
new file mode 100644
index 00000000000..e553a6fced9
--- /dev/null
+++ b/sql/updates/world/2014_07_07_00_world_creature_text.sql
@@ -0,0 +1,5 @@
+--
+DELETE FROM `creature_text` WHERE `entry` = 10262 AND id IN (6,7);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextID`) VALUES
+(10262,0,6, 'Bijou lost! SQUAWK! *cough',12,0,100,0,0,0, 'Opus - Random Say',5541),
+(10262,0,7, 'Dragons controlling orcs!? SQUAWK!',12,0,100,0,0,0, 'Opus - Random Say',5546);
diff --git a/sql/updates/world/2014_07_07_01_world_spell_script_names.sql b/sql/updates/world/2014_07_07_01_world_spell_script_names.sql
new file mode 100644
index 00000000000..5926d055b0d
--- /dev/null
+++ b/sql/updates/world/2014_07_07_01_world_spell_script_names.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE spell_id=7434;
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(7434,'spell_item_fate_rune_of_unsurpassed_vigor');
diff --git a/sql/updates/world/2014_07_07_02_world_spell_game_event_creature.sql b/sql/updates/world/2014_07_07_02_world_spell_game_event_creature.sql
new file mode 100644
index 00000000000..c512521337d
--- /dev/null
+++ b/sql/updates/world/2014_07_07_02_world_spell_game_event_creature.sql
@@ -0,0 +1,34 @@
+--
+SET @CGUID := 127340;
+DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @CGUID+00 AND @CGUID+29;
+INSERT INTO `game_event_creature` (`eventEntry`, `guid`) VALUES
+(1, @CGUID+00),
+(1, @CGUID+01),
+(1, @CGUID+02),
+(1, @CGUID+03),
+(1, @CGUID+04),
+(1, @CGUID+05),
+(1, @CGUID+06),
+(1, @CGUID+07),
+(1, @CGUID+08),
+(1, @CGUID+09),
+(1, @CGUID+10),
+(1, @CGUID+11),
+(1, @CGUID+12),
+(1, @CGUID+13),
+(1, @CGUID+14),
+(1, @CGUID+15),
+(1, @CGUID+16),
+(1, @CGUID+17),
+(1, @CGUID+18),
+(1, @CGUID+19),
+(1, @CGUID+20),
+(1, @CGUID+21),
+(1, @CGUID+22),
+(1, @CGUID+23),
+(1, @CGUID+24),
+(1, @CGUID+25),
+(1, @CGUID+26),
+(1, @CGUID+27),
+(1, @CGUID+28),
+(1, @CGUID+29);
diff --git a/sql/updates/world/2014_07_07_03_world_spell_misc.sql b/sql/updates/world/2014_07_07_03_world_spell_misc.sql
new file mode 100644
index 00000000000..8e200267797
--- /dev/null
+++ b/sql/updates/world/2014_07_07_03_world_spell_misc.sql
@@ -0,0 +1,7 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=70811;
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(70811,'spell_sha_item_t10_elemental_2p_bonus');
+
+DELETE FROM `spell_proc_event` WHERE `entry`=70811;
+INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
+(70811, 0, 11, 3, 0, 0, 0, 0, 0, 0, 0);
diff --git a/sql/updates/world/2014_07_08_00_world_creature_queststarter.sql b/sql/updates/world/2014_07_08_00_world_creature_queststarter.sql
new file mode 100644
index 00000000000..ee9c49139c8
--- /dev/null
+++ b/sql/updates/world/2014_07_08_00_world_creature_queststarter.sql
@@ -0,0 +1,99 @@
+-- Alliance
+--
+DELETE FROM `creature_queststarter` WHERE `quest` IN (6071,6072,6073,6074,6075,6076,9757);
+
+-- Thorgas Grimson (Coldridge Valley, Dun Morogh)
+-- Note: There is a discrepancy wether this NPC actually starts the chain, wowhead is outdated
+SET @npcId=895;
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6072); -- Night Elf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6075); -- Dwarf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,9757); -- Draenei
+
+-- Tristane Shadowstone (Brenwall Village, Dun Morogh)
+-- Note: This NPC is not a trainer but wowhead / wowwiki show that she offers the starter. Possibly because she is in a quest hub.
+SET @npcId=11807;
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6072); -- Night Elf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6075); -- Dwarf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,9757); -- Draenei
+
+-- Ayanna Everstride (Teldrassil)
+SET @npcId=3596;
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6071); -- Night Elf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6074); -- Dwarf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,9757); -- Draenei
+
+-- Jocaste (Darnassus)
+SET @npcId=4146;
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6071); -- Night Elf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6074); -- Dwarf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,9757); -- Draenei
+
+-- Dorion (Darnassus)
+SET @npcId=4205;
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6071); -- Night Elf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6074); -- Dwarf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,9757); -- Draenei
+
+-- Regnus Thundergranite (Ironforge)
+SET @npcId=5117;
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6072); -- Night Elf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6074); -- Dwarf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,9757); -- Draenei
+
+-- Einris Brightspear (Stormwind)
+SET @npcId=5515;
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6073); -- Night Elf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6076); -- Dwarf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,9757); -- Draenei
+
+-- Acteon (Azuremyst Isle)
+SET @npcId=17110;
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6073); -- Night Elf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6074); -- Dwarf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,9757); -- Draenei
+
+-- Deremiis (The Exodar)
+SET @npcId=16738;
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6073); -- Night Elf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6074); -- Dwarf
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,9757); -- Draenei
+
+-- Horde
+--
+DELETE FROM `creature_queststarter` WHERE `quest` IN (6065,6066,6067,6068,6069,6070,9617,10530);
+
+-- Kary Thunderhorn (Thunder Bluff)
+SET @npcId=3038;
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6066); -- Tauren
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6068); -- Orc / Troll
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,9617); -- Blood Elf
+
+-- Lanka Farshot (Camp Narache)
+SET @npcId=3061;
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6067); -- Tauren
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6069); -- Orc / Troll
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,9617); -- Blood Elf
+
+-- Jen'shan Note: Unknown location, wowhead data was outdated
+SET @npcId=3154;
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6067); -- Tauren
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6069); -- Orc / Troll
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,9617); -- Blood Elf
+
+-- Thotar (Durotar)
+SET @npcId=3171;
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6065); -- Tauren
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6069); -- Orc / Troll
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,9617); -- Blood Elf
+
+-- Sian'dur - Note: Unknown location, wowhead data was outdated
+SET @npcId=3407;
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6067); -- Tauren
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6070); -- Orc / Troll
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,9617); -- Blood Elf
+
+-- Telenus (Farstrider Square) - NOTE: He is actually a "Pet Trainer"
+SET @npcId=16271;
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6067); -- Tauren
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,6069); -- Orc / Troll
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (@npcId,9617); -- Blood Elf
diff --git a/sql/updates/world/2014_07_08_00_world_misc.sql b/sql/updates/world/2014_07_08_00_world_misc.sql
new file mode 100644
index 00000000000..8e989f15b6f
--- /dev/null
+++ b/sql/updates/world/2014_07_08_00_world_misc.sql
@@ -0,0 +1,39 @@
+--
+UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry`=24359;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=24359 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
+(24359,0,0,0,25,0,100,1,0,0,0,0,11,8722,0,0,0,0,0,1,0,0,0,0,0,0,0,'Apothecary Anastasia <Royal Apothecary Society> - On Spawn Summon Succubus');
+
+DELETE FROM `creature` WHERE `guid` IN (84989,112617,74136,74475,123937,123936,123933,74178);
+
+UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry`=35475;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=35475 AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(-84660,-84661,-84664,-84665) 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
+(-84660,0,0,0,25,0,100,1,0,0,0,0,11,8722,0,0,0,0,0,1,0,0,0,0,0,0,0,'Visting Warlock - On Spawn Summon Succubus'),
+(-84661,0,0,0,25,0,100,1,0,0,0,0,11,12746,0,0,0,0,0,1,0,0,0,0,0,0,0,'Visting Warlock - On Spawn Summon Voidwalker'),
+(-84664,0,0,0,25,0,100,1,0,0,0,0,11,12746,0,0,0,0,0,1,0,0,0,0,0,0,0,'Visting Warlock - On Spawn Summon Voidwalker'),
+(-84665,0,0,0,25,0,100,1,0,0,0,0,11,12746,0,0,0,0,0,1,0,0,0,0,0,0,0,'Visting Warlock - On Spawn Summon Voidwalker');
+
+UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry`=29614;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=29614 AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(2961400,2961401) AND `source_type`=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
+(29614,0,0,0,25,0,100,1,0,0,0,0,87,2961400,2961401,2961400,2961401,2961400,2961401,1,0,0,0,0,0,0,0,'Onslaught Darkweaver - On Spawn - Run Random Script'),
+(29614,0,1,0,1,0,100,0,0,0,1800000,1800000,11,13787,0,0,0,0,0,1,0,0,0,0,0,0,0,'Onslaught Darkweaver - On Spawn - Cast Demon Armor'),
+(29614,0,2,0,0,0,100,0,1000,3000,3000,3500,11,12739,0,0,0,0,0,2,0,0,0,0,0,0,0,'Onslaught Darkweaver - IC - Cast Shadow Bolt'),
+(29614,0,3,4,0,0,100,0,7000,15000,180000,210000,11,54840,0,0,0,0,0,1,0,0,0,0,0,0,0,'Onslaught Darkweaver - IC - Cast Metamorphosis'),
+(29614,0,4,0,61,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Onslaught Darkweaver - Linked with Previous event - Say'),
+(29614,0,5,0,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Onslaught Darkweaver - On Agro Say'),
+(2961400,9,0,0,0,0,100,0,0,0,0,0,11,8722,2,0,0,0,0,1,0,0,0,0,0,0,0,'Onslaught Darkweaver - Script - Summon Succubus'),
+(2961401,9,0,0,0,0,100,0,0,0,0,0,11,11939,2,0,0,0,0,1,0,0,0,0,0,0,0,'Onslaught Darkweaver - Script - Summon Imp');
+
+DELETE FROM `creature_text` WHERE `entry` =29614;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES (29614, 0, 0, 'Even in death there will be no escape for you!', 12, 0, 100, 0, 0, 0, 'Onslaught Darkweaver', 30267),
+(29614, 0, 1, 'I shall feast upon your soul!', 12, 0, 100, 0, 0, 0, 'Onslaught Darkweaver', 30268),
+(29614, 0, 2, 'Now you know. Now you must die!', 12, 0, 100, 0, 0, 0, 'Onslaught Darkweaver', 30266),
+(29614, 0, 3, 'You will not leave this cavern alive!', 12, 0, 100, 0, 0, 0, 'Onslaught Darkweaver', 30269),
+(29614, 1, 0, 'The darkweaver pierces you with an evil grin as he shifts into an entirely different form.', 16, 0, 100, 0, 0, 0, 'Onslaught Darkweaver', 30265);
diff --git a/sql/updates/world/2014_07_08_01_world_quest_template.sql b/sql/updates/world/2014_07_08_01_world_quest_template.sql
new file mode 100644
index 00000000000..f40808b428d
--- /dev/null
+++ b/sql/updates/world/2014_07_08_01_world_quest_template.sql
@@ -0,0 +1,2 @@
+UPDATE quest_template SET RequiredRaces = 690 WHERE id IN (12375,12381,12383,12362,12378,12379,12377,12374,12361,12386,12366,12367,12380,12365,12373,12387,12369,12382,12363,12385,12364,12376,12370,12371,12384,12368,12394,12389,12388,12391,12393,12392,12395,12390);
+UPDATE quest_template SET RequiredRaces = 1101 WHERE id IN (12345,12341,12334,12349,12350,12331,12333,12338,12348,12337,12347,12332,12286,12351,12339,12336,12343,12344,12346,12335,12342,12340,12358,12352,12357,12356,12354,12359,12353,12360,12355,12340);
diff --git a/sql/updates/world/2014_07_08_02_world_misc.sql b/sql/updates/world/2014_07_08_02_world_misc.sql
new file mode 100644
index 00000000000..12b39f2d975
--- /dev/null
+++ b/sql/updates/world/2014_07_08_02_world_misc.sql
@@ -0,0 +1,593 @@
+--
+SET @Pool := 363; -- Needs 5 2 for sunreavers dailys, 2 for silver covenant dailys and 1 for get kraken/the fate of the fallen
+-- Remove previousquestid from all quests for valiant's seals as this will be dealt with by conditions linked to the valiant's charge for each faction instead
+UPDATE `quest_template` SET `PrevQuestId`=0 WHERE `Id` IN (13771,13776,13781,13786,13765,13760,13744,13749,13755,13592,13768,13762,13773,13778,13783,13757,13741,13746,13752,13603,13600,13742,13747,13753,13758,13763,13769,13774,13779,13784,13847,13851,13852,13854,13855,13856,13857,13858,13859,13860,13616,13747,13748,13754,13759,13764,13770,13775,13780,13785,13665,13745,13750,13756,13761,13767,13772,13777,13782,13787);
+
+-- Set all versions of The Valiants Charge to have no previous quest ID as this will be dealt with by conditions instead as there are 2 quests which need to link to these
+UPDATE `quest_template` SET `PrevQuestId`=0 WHERE `Id` IN (13718,13714,13715,13716,13717,13697,13719,13720,13721,13722);
+
+-- Set all alliance versions of valiant of ....., valiants charge, the valliants challenge and associated dailys to be completable by any alliance char rather than a specific race
+UPDATE `quest_template` SET `RequiredRaces`=1101 WHERE `Id` IN (13718,13714,13715,13716,13717,13759,13670,13743,13748,13754,13616,13757.13666,13741,13746,13752,13758,13669,13742,13747,13753,13600,13760,13744,13749,13755,13592,13855,13851,13852,13854,13847,13725,13713,13723,13724,13699,13665,13745,13750,13756,13761);
+
+-- Set all horde versions of valiant of ....., valiants charge, the valliants challenge and associated dailys to be completable by any horde char rather than a specific race
+UPDATE `quest_template` SET `RequiredRaces`=690 WHERE `Id` IN (13697,13719,13720,13721,13722,13770,13764,13775,13780,13785,13675,13768,13762,13773,13778,13783,13769,13763,13774,13779,13784,13674,13771,13776,13781,13786,13765,13857,13858,13859,13860,13856,13727,13728,13729,13731,13726,13767,13772,13777,13782,13787);
+
+-- Set next questquestidchain for valiant of ..../a valiant of .... quests
+UPDATE `quest_template` SET `NextQuestId`=13718 WHERE `Id` IN (13593,13684);
+UPDATE `quest_template` SET `NextQuestId`=13714 WHERE `Id` IN (13685,13703);
+UPDATE `quest_template` SET `NextQuestId`=13715 WHERE `Id` IN (13688,13704);
+UPDATE `quest_template` SET `NextQuestId`=13717 WHERE `Id` IN (13689,13706);
+UPDATE `quest_template` SET `NextQuestId`=13716 WHERE `Id` IN (13690,13705);
+UPDATE `quest_template` SET `NextQuestId`=13697 WHERE `Id` IN (13691,13707);
+UPDATE `quest_template` SET `NextQuestId`=13719 WHERE `Id` IN (13693,13708);
+UPDATE `quest_template` SET `NextQuestId`=13720 WHERE `Id` IN (13694,13709);
+UPDATE `quest_template` SET `NextQuestId`=13721 WHERE `Id` IN (13695,13710);
+UPDATE `quest_template` SET `NextQuestId`=13722 WHERE `Id` IN (13593,13711);
+
+-- Conditions to ensure player cannot take another valiant of ... quest while has one in log, conditions for tournament eligibility marker take care of rest of chain once these are turned in but player does not get flag until quest is turned in
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `ConditionTypeOrReference`=28 AND `SourceEntry` IN (13593,13703,13704,13705,13706,13707,13708,13709,13710,13711);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=20 AND `ConditionTypeOrReference`=28 AND `SourceEntry` IN (13593,13703,13704,13705,13706,13707,13708,13709,13710,13711);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(19,0,13593,0,0,28,0,13706,0,0,1,0,'','Show valiant of stormwind only if player does not have any valliant of ... quest in quest log'),
+(20,0,13593,0,0,28,0,13706,0,0,1,0,'','Show valiant of stormwind only if player does not have any valliant of ... quest in quest log'),
+(19,0,13593,0,0,28,0,13704,0,0,1,0,'','Show valiant of stormwind only if player does not have any valliant of ... quest in quest log'),
+(20,0,13593,0,0,28,0,13704,0,0,1,0,'','Show valiant of stormwind only if player does not have any valliant of ... quest in quest log'),
+(19,0,13593,0,0,28,0,13703,0,0,1,0,'','Show valiant of stormwind only if player does not have any valliant of ... quest in quest log'),
+(20,0,13593,0,0,28,0,13703,0,0,1,0,'','Show valiant of stormwind only if player does not have any valliant of ... quest in quest log'),
+(19,0,13593,0,0,28,0,13705,0,0,1,0,'','Show valiant of stormwind only if player does not have any valliant of ... quest in quest log'),
+(20,0,13593,0,0,28,0,13705,0,0,1,0,'','Show valiant of stormwind only if player does not have any valliant of ... quest in quest log'),
+(19,0,13706,0,0,28,0,13593,0,0,1,0,'','Show valiant of Darnassus only if player does not have any valliant of ... quest in quest log'),
+(20,0,13706,0,0,28,0,13593,0,0,1,0,'','Show valiant of Darnassus only if player does not have any valliant of ... quest in quest log'),
+(19,0,13706,0,0,28,0,13704,0,0,1,0,'','Show valiant of Darnassus only if player does not have any valliant of ... quest in quest log'),
+(20,0,13706,0,0,28,0,13704,0,0,1,0,'','Show valiant of Darnassus only if player does not have any valliant of ... quest in quest log'),
+(19,0,13706,0,0,28,0,13703,0,0,1,0,'','Show valiant of Darnassus only if player does not have any valliant of ... quest in quest log'),
+(20,0,13706,0,0,28,0,13703,0,0,1,0,'','Show valiant of Darnassus only if player does not have any valliant of ... quest in quest log'),
+(19,0,13706,0,0,28,0,13705,0,0,1,0,'','Show valiant of Darnassus only if player does not have any valliant of ... quest in quest log'),
+(20,0,13706,0,0,28,0,13705,0,0,1,0,'','Show valiant of Darnassus only if player does not have any valliant of ... quest in quest log'),
+(19,0,13704,0,0,28,0,13593,0,0,1,0,'','Show valiant of Gnomeregan only if player does not have any valliant of ... quest in quest log'),
+(20,0,13704,0,0,28,0,13593,0,0,1,0,'','Show valiant of Gnomeregan only if player does not have any valliant of ... quest in quest log'),
+(19,0,13704,0,0,28,0,13706,0,0,1,0,'','Show valiant of Gnomeregan only if player does not have any valliant of ... quest in quest log'),
+(20,0,13704,0,0,28,0,13706,0,0,1,0,'','Show valiant of Gnomeregan only if player does not have any valliant of ... quest in quest log'),
+(19,0,13704,0,0,28,0,13703,0,0,1,0,'','Show valiant of Gnomeregan only if player does not have any valliant of ... quest in quest log'),
+(20,0,13704,0,0,28,0,13703,0,0,1,0,'','Show valiant of Gnomeregan only if player does not have any valliant of ... quest in quest log'),
+(19,0,13704,0,0,28,0,13705,0,0,1,0,'','Show valiant of Gnomeregan only if player does not have any valliant of ... quest in quest log'),
+(20,0,13704,0,0,28,0,13705,0,0,1,0,'','Show valiant of Gnomeregan only if player does not have any valliant of ... quest in quest log'),
+(19,0,13703,0,0,28,0,13593,0,0,1,0,'','Show valiant of Ironforge only if player does not have any valliant of ... quest in quest log'),
+(20,0,13703,0,0,28,0,13593,0,0,1,0,'','Show valiant of Ironforge only if player does not have any valliant of ... quest in quest log'),
+(19,0,13703,0,0,28,0,13706,0,0,1,0,'','Show valiant of Ironforge only if player does not have any valliant of ... quest in quest log'),
+(20,0,13703,0,0,28,0,13706,0,0,1,0,'','Show valiant of Ironforge only if player does not have any valliant of ... quest in quest log'),
+(19,0,13703,0,0,28,0,13704,0,0,1,0,'','Show valiant of Ironforge only if player does not have any valliant of ... quest in quest log'),
+(20,0,13703,0,0,28,0,13704,0,0,1,0,'','Show valiant of Ironforge only if player does not have any valliant of ... quest in quest log'),
+(19,0,13703,0,0,28,0,13705,0,0,1,0,'','Show valiant of Ironforge only if player does not have any valliant of ... quest in quest log'),
+(20,0,13703,0,0,28,0,13705,0,0,1,0,'','Show valiant of Ironforge only if player does not have any valliant of ... quest in quest log'),
+(19,0,13705,0,0,28,0,13593,0,0,1,0,'','Show valiant of the exodar only if player does not have any valliant of ... quest in quest log'),
+(20,0,13705,0,0,28,0,13593,0,0,1,0,'','Show valiant of the exodar only if player does not have any valliant of ... quest in quest log'),
+(19,0,13705,0,0,28,0,13706,0,0,1,0,'','Show valiant of the exodar only if player does not have any valliant of ... quest in quest log'),
+(20,0,13705,0,0,28,0,13706,0,0,1,0,'','Show valiant of the exodar only if player does not have any valliant of ... quest in quest log'),
+(19,0,13705,0,0,28,0,13704,0,0,1,0,'','Show valiant of the exodar only if player does not have any valliant of ... quest in quest log'),
+(20,0,13705,0,0,28,0,13704,0,0,1,0,'','Show valiant of the exodar only if player does not have any valliant of ... quest in quest log'),
+(19,0,13705,0,0,28,0,13703,0,0,1,0,'','Show valiant of the exodar only if player does not have any valliant of ... quest in quest log'),
+(20,0,13705,0,0,28,0,13703,0,0,1,0,'','Show valiant of the exodar only if player does not have any valliant of ... quest in quest log'),
+(19,0,13707,0,0,28,0,13708,0,0,1,0,'','Show valiant of orgrimmar only if player does not have any valliant of ... quest in quest log'),
+(20,0,13707,0,0,28,0,13708,0,0,1,0,'','Show valiant of orgrimmar only if player does not have any valliant of ... quest in quest log'),
+(19,0,13707,0,0,28,0,13711,0,0,1,0,'','Show valiant of orgrimmar only if player does not have any valliant of ... quest in quest log'),
+(20,0,13707,0,0,28,0,13711,0,0,1,0,'','Show valiant of orgrimmar only if player does not have any valliant of ... quest in quest log'),
+(19,0,13707,0,0,28,0,13709,0,0,1,0,'','Show valiant of orgrimmar only if player does not have any valliant of ... quest in quest log'),
+(20,0,13707,0,0,28,0,13709,0,0,1,0,'','Show valiant of orgrimmar only if player does not have any valliant of ... quest in quest log'),
+(19,0,13707,0,0,28,0,13710,0,0,1,0,'','Show valiant of orgrimmar only if player does not have any valliant of ... quest in quest log'),
+(20,0,13707,0,0,28,0,13710,0,0,1,0,'','Show valiant of orgrimmar only if player does not have any valliant of ... quest in quest log'),
+(19,0,13708,0,0,28,0,13707,0,0,1,0,'','Show valiant of senjin only if player does not have any valliant of ... quest in quest log'),
+(20,0,13708,0,0,28,0,13707,0,0,1,0,'','Show valiant of senjin only if player does not have any valliant of ... quest in quest log'),
+(19,0,13708,0,0,28,0,13711,0,0,1,0,'','Show valiant of senjin only if player does not have any valliant of ... quest in quest log'),
+(20,0,13708,0,0,28,0,13711,0,0,1,0,'','Show valiant of senjin only if player does not have any valliant of ... quest in quest log'),
+(19,0,13708,0,0,28,0,13709,0,0,1,0,'','Show valiant of senjin only if player does not have any valliant of ... quest in quest log'),
+(20,0,13708,0,0,28,0,13709,0,0,1,0,'','Show valiant of senjin only if player does not have any valliant of ... quest in quest log'),
+(19,0,13708,0,0,28,0,13710,0,0,1,0,'','Show valiant of senjin only if player does not have any valliant of ... quest in quest log'),
+(20,0,13708,0,0,28,0,13710,0,0,1,0,'','Show valiant of senjin only if player does not have any valliant of ... quest in quest log'),
+(19,0,13711,0,0,28,0,13707,0,0,1,0,'','Show valiant of silvermoon only if player does not have any valliant of ... quest in quest log'),
+(20,0,13711,0,0,28,0,13707,0,0,1,0,'','Show valiant of silvermoon only if player does not have any valliant of ... quest in quest log'),
+(19,0,13711,0,0,28,0,13708,0,0,1,0,'','Show valiant of silvermoon only if player does not have any valliant of ... quest in quest log'),
+(20,0,13711,0,0,28,0,13708,0,0,1,0,'','Show valiant of silvermoon only if player does not have any valliant of ... quest in quest log'),
+(19,0,13711,0,0,28,0,13709,0,0,1,0,'','Show valiant of silvermoon only if player does not have any valliant of ... quest in quest log'),
+(20,0,13711,0,0,28,0,13709,0,0,1,0,'','Show valiant of silvermoon only if player does not have any valliant of ... quest in quest log'),
+(19,0,13711,0,0,28,0,13710,0,0,1,0,'','Show valiant of silvermoon only if player does not have any valliant of ... quest in quest log'),
+(20,0,13711,0,0,28,0,13710,0,0,1,0,'','Show valiant of silvermoon only if player does not have any valliant of ... quest in quest log'),
+(19,0,13709,0,0,28,0,13707,0,0,1,0,'','Show valiant of thunderbluff only if player does not have any valliant of ... quest in quest log'),
+(20,0,13709,0,0,28,0,13707,0,0,1,0,'','Show valiant of thunderbluff only if player does not have any valliant of ... quest in quest log'),
+(19,0,13709,0,0,28,0,13708,0,0,1,0,'','Show valiant of thunderbluff only if player does not have any valliant of ... quest in quest log'),
+(20,0,13709,0,0,28,0,13708,0,0,1,0,'','Show valiant of thunderbluff only if player does not have any valliant of ... quest in quest log'),
+(19,0,13709,0,0,28,0,13711,0,0,1,0,'','Show valiant of thunderbluff only if player does not have any valliant of ... quest in quest log'),
+(20,0,13709,0,0,28,0,13711,0,0,1,0,'','Show valiant of thunderbluff only if player does not have any valliant of ... quest in quest log'),
+(19,0,13709,0,0,28,0,13710,0,0,1,0,'','Show valiant of thunderbluff only if player does not have any valliant of ... quest in quest log'),
+(20,0,13709,0,0,28,0,13710,0,0,1,0,'','Show valiant of thunderbluff only if player does not have any valliant of ... quest in quest log'),
+(19,0,13710,0,0,28,0,13707,0,0,1,0,'','Show valiant of undercity only if player does not have any valliant of ... quest in quest log'),
+(20,0,13710,0,0,28,0,13707,0,0,1,0,'','Show valiant of undercity only if player does not have any valliant of ... quest in quest log'),
+(19,0,13710,0,0,28,0,13708,0,0,1,0,'','Show valiant of undercity only if player does not have any valliant of ... quest in quest log'),
+(20,0,13710,0,0,28,0,13708,0,0,1,0,'','Show valiant of undercity only if player does not have any valliant of ... quest in quest log'),
+(19,0,13710,0,0,28,0,13711,0,0,1,0,'','Show valiant of undercity only if player does not have any valliant of ... quest in quest log'),
+(20,0,13710,0,0,28,0,13711,0,0,1,0,'','Show valiant of undercity only if player does not have any valliant of ... quest in quest log'),
+(19,0,13710,0,0,28,0,13709,0,0,1,0,'','Show valiant of undercity only if player does not have any valliant of ... quest in quest log'),
+(20,0,13710,0,0,28,0,13709,0,0,1,0,'','Show valiant of undercity only if player does not have any valliant of ... quest in quest log');
+
+-- group dailies from all cities which give valiants seals to prevent player from doing same quests again that day if they already did them that day and become champion of one faction start next faction.
+UPDATE `quest_template` SET `ExclusiveGroup`=13847 WHERE `Id` IN (13847,13851,13852,13854,13855);
+UPDATE `quest_template` SET `ExclusiveGroup`=13856 WHERE `Id` IN (13856,13857,13858,13859,13860);
+UPDATE `quest_template` SET `ExclusiveGroup`=13592 WHERE `Id` IN (13592,13744,13749,13755,13760);
+UPDATE `quest_template` SET `ExclusiveGroup`=13765 WHERE `Id` IN (13765,13771,13776,13781,13786);
+UPDATE `quest_template` SET `ExclusiveGroup`=13665 WHERE `Id` IN (13665,13745,13750,13756,13761);
+UPDATE `quest_template` SET `ExclusiveGroup`=13767 WHERE `Id` IN (13767,13772,13777,13782,13787);
+UPDATE `quest_template` SET `ExclusiveGroup`=13603 WHERE `Id` IN (13600,13603,13616,13741,13742,13743,13746,13747,13748,13752,13753,13754,13757,13758,13759);
+UPDATE `quest_template` SET `ExclusiveGroup`=13762 WHERE `Id` IN (13762,13763,13764,13768,13769,13770,13773,13774,13775,13778,13779,13780,13783,13784,13785);
+
+-- Conditions for chaining the valliants charge from both valiant of ..... and a valiant of ..... quests
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `ConditionTypeOrReference`=8 AND`SourceEntry` IN (13697,13714,13715,13716,13717,13718,13719,13720,13721,13722);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=20 AND `ConditionTypeOrReference`=8 AND`SourceEntry` IN (13697,13714,13715,13716,13717,13718,13719,13720,13721,13722);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(19, 0, 13697, 0, 0, 8, 13691, 0, 0, 0, '', 'The valiants charge after a valiant of ogrimmar'),
+(19, 0, 13697, 0, 1, 8, 13707, 0, 0, 0, '', 'The valiants charge after valiant of orgrimmar'),
+(19, 0, 13714, 0, 0, 8, 13685, 0, 0, 0, '', 'The valiants charge after a valiant of iron forge'),
+(19, 0, 13714, 0, 1, 8, 13703, 0, 0, 0, '', 'The valiants charge after valiant of iron forge'),
+(19, 0, 13715, 0, 0, 8, 13688, 0, 0, 0, '', 'The valiants charge after a valiant of gomregan'),
+(19, 0, 13715, 0, 1, 8, 13704, 0, 0, 0, '', 'The valiants charge after valiant of gomregan'),
+(19, 0, 13716, 0, 0, 8, 13690, 0, 0, 0, '', 'The valiants charge after a valiant of exodar'),
+(19, 0, 13716, 0, 1, 8, 13705, 0, 0, 0, '', 'The valiants charge after valiant of exodar'),
+(19, 0, 13717, 0, 0, 8, 13689, 0, 0, 0, '', 'The valiants charge after a valiant of darnassus'),
+(19, 0, 13717, 0, 1, 8, 13706, 0, 0, 0, '', 'The valiants charge after valiant of darnassus'),
+(19, 0, 13718, 0, 0, 8, 13684, 0, 0, 0, '', 'The valiants charge after a valiant of stormwind'),
+(19, 0, 13718, 0, 1, 8, 13593, 0, 0, 0, '', 'The valiants charge after valiant of stormwind'),
+(19, 0, 13719, 0, 0, 8, 13693, 0, 0, 0, '', 'The valiants charge after a valiant of sen''jin'),
+(19, 0, 13719, 0, 1, 8, 13708, 0, 0, 0, '', 'The valiants charge after valiant of sen''jin'),
+(19, 0, 13720, 0, 0, 8, 13694, 0, 0, 0, '', 'The valiants charge after a valiant of thunderbluff'),
+(19, 0, 13720, 0, 1, 8, 13709, 0, 0, 0, '', 'The valiants charge after valiant of thunderbluff'),
+(19, 0, 13721, 0, 0, 8, 13695, 0, 0, 0, '', 'The valiants charge after a valiant of undercity'),
+(19, 0, 13721, 0, 1, 8, 13710, 0, 0, 0, '', 'The valiants charge after valiant of undercity'),
+(19, 0, 13722, 0, 0, 8, 13696, 0, 0, 0, '', 'The valiants charge after a valiant of silvermoon'),
+(19, 0, 13722, 0, 1, 8, 13711, 0, 0, 0, '', 'The valiants charge after valiant of silvermoon'),
+(20, 0, 13697, 0, 0, 8, 13691, 0, 0, 0, '', 'The valiants charge after a valiant of orgrimmar'),
+(20, 0, 13697, 0, 1, 8, 13707, 0, 0, 0, '', 'The valiants charge after valiant of orgrimmar'),
+(20, 0, 13714, 0, 0, 8, 13685, 0, 0, 0, '', 'The valiants charge after a valiant of iron forge'),
+(20, 0, 13714, 0, 1, 8, 13703, 0, 0, 0, '', 'The valiants charge after valiant of iron forge'),
+(20, 0, 13715, 0, 0, 8, 13688, 0, 0, 0, '', 'The valiants charge after a valiant of gomregan'),
+(20, 0, 13715, 0, 1, 8, 13704, 0, 0, 0, '', 'The valiants charge after valiant of gomregan'),
+(20, 0, 13716, 0, 0, 8, 13690, 0, 0, 0, '', 'The valiants charge after a valiant of exodar'),
+(20, 0, 13716, 0, 1, 8, 13705, 0, 0, 0, '', 'The valiants charge after valiant of exodar'),
+(20, 0, 13717, 0, 0, 8, 13689, 0, 0, 0, '', 'The valiants charge after a valiant of darnassus'),
+(20, 0, 13717, 0, 1, 8, 13706, 0, 0, 0, '', 'The valiants charge after valiant of darnassus'),
+(20, 0, 13718, 0, 0, 8, 13684, 0, 0, 0, '', 'The valiants charge after a valiant of stormwind'),
+(20, 0, 13718, 0, 1, 8, 13593, 0, 0, 0, '', 'The valiants charge after valiant of stormwind'),
+(20, 0, 13719, 0, 0, 8, 13693, 0, 0, 0, '', 'The valiants charge after a valiant of sen''jin'),
+(20, 0, 13719, 0, 1, 8, 13708, 0, 0, 0, '', 'The valiants charge after valiant of sen''jin'),
+(20, 0, 13720, 0, 0, 8, 13694, 0, 0, 0, '', 'The valiants charge after a valiant of thunderbluff'),
+(20, 0, 13720, 0, 1, 8, 13709, 0, 0, 0, '', 'The valiants charge after valiant of tunderbluff'),
+(20, 0, 13721, 0, 0, 8, 13695, 0, 0, 0, '', 'The valiants charge after a valiant of undercity'),
+(20, 0, 13721, 0, 1, 8, 13710, 0, 0, 0, '', 'The valiants charge after valiant of undercity'),
+(20, 0, 13722, 0, 0, 8, 13696, 0, 0, 0, '', 'The valiants charge after a valiant of silvermoon'),
+(20, 0, 13722, 0, 1, 8, 13711, 0, 0, 0, '', 'The valiants charge after valiant of silvermoon');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `ConditionTypeOrReference` IN (8,14) AND `SourceEntry` IN (13593,13703,13704,13705,13706,13707,13708,13709,13710,13711);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=20 AND `ConditionTypeOrReference` IN (8,14) AND `SourceEntry` IN (13593,13703,13704,13705,13706,13707,13708,13709,13710,13711);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(19, 0, 13593, 0, 0, 8, 13700, 0, 0, 0, '', 'Valiant Of Stormwind - Alliance Champion Marker'),
+(19, 0, 13703, 0, 0, 8, 13700, 0, 0, 0, '', 'Valiant Of Ironforge - Alliance Champion Marker'),
+(19, 0, 13704, 0, 0, 8, 13700, 0, 0, 0, '', 'Valiant Of Gnomeregan - Alliance Champion Marker'),
+(19, 0, 13705, 0, 0, 8, 13700, 0, 0, 0, '', 'Valiant Of The Exodar - Alliance Champion Marker'),
+(19, 0, 13706, 0, 0, 8, 13700, 0, 0, 0, '', 'Valiant Of Darnassus - Alliance Champion Marker'),
+(19, 0, 13707, 0, 0, 8, 13701, 0, 0, 0, '', 'Valiant Of Orgrimmar - Horde Champion Marker'),
+(19, 0, 13708, 0, 0, 8, 13701, 0, 0, 0, '', 'Valiant Of Sen''jin - Horde Champion Marker'),
+(19, 0, 13709, 0, 0, 8, 13701, 0, 0, 0, '', 'Valiant Of Thunder Bluff - Horde Champion Marker'),
+(19, 0, 13710, 0, 0, 8, 13701, 0, 0, 0, '', 'Valiant Of Undercity - Horde Champion Marker'),
+(19, 0, 13711, 0, 0, 8, 13701, 0, 0, 0, '', 'Valiant Of Silvermoon - Horde Champion Marker'),
+(20, 0, 13593, 0, 0, 8, 13700, 0, 0, 0, '', 'Valiant Of Stormwind - Alliance Champion Marker'),
+(20, 0, 13703, 0, 0, 8, 13700, 0, 0, 0, '', 'Valiant Of Ironforge - Alliance Champion Marker'),
+(20, 0, 13704, 0, 0, 8, 13700, 0, 0, 0, '', 'Valiant Of Gnomeregan - Alliance Champion Marker'),
+(20, 0, 13705, 0, 0, 8, 13700, 0, 0, 0, '', 'Valiant Of The Exodar - Alliance Champion Marker'),
+(20, 0, 13706, 0, 0, 8, 13700, 0, 0, 0, '', 'Valiant Of Darnassus - Alliance Champion Marker'),
+(20, 0, 13707, 0, 0, 8, 13701, 0, 0, 0, '', 'Valiant Of Orgrimmar - Horde Champion Marker'),
+(20, 0, 13708, 0, 0, 8, 13701, 0, 0, 0, '', 'Valiant Of Sen''jin - Horde Champion Marker'),
+(20, 0, 13709, 0, 0, 8, 13701, 0, 0, 0, '', 'Valiant Of Thunder Bluff - Horde Champion Marker'),
+(20, 0, 13710, 0, 0, 8, 13701, 0, 0, 0, '', 'Valiant Of Undercity - Horde Champion Marker'),
+(20, 0, 13711, 0, 0, 8, 13701, 0, 0, 0, '', 'Valiant Of Silvermoon - Horde Champion Marker'),
+(19, 0, 13593, 0, 0, 14, 13686, 0, 0, 0, '', 'Valiant of Stormwind if no tournament eligility marker'),
+(19, 0, 13703, 0, 0, 14, 13686, 0, 0, 0, '', 'Valiant of Iron Forge if no tournament eligility marker'),
+(19, 0, 13704, 0, 0, 14, 13686, 0, 0, 0, '', 'Valiant of Gomregan if no tournament eligility marker'),
+(19, 0, 13705, 0, 0, 14, 13686, 0, 0, 0, '', 'Valiant of Exodar if no tournament eligility marker'),
+(19, 0, 13706, 0, 0, 14, 13686, 0, 0, 0, '', 'Valiant of Darnassus if no tournament eligility marker'),
+(19, 0, 13707, 0, 0, 14, 13687, 0, 0, 0, '', 'Valiant of Orgrimmar if no tournament eligility marker'),
+(19, 0, 13708, 0, 0, 14, 13687, 0, 0, 0, '', 'Valiant of Sen''Jin if no tournament eligility marker'),
+(19, 0, 13709, 0, 0, 14, 13687, 0, 0, 0, '', 'Valiant of Thunderbluff if no tournament eligility marker'),
+(19, 0, 13710, 0, 0, 14, 13687, 0, 0, 0, '', 'Valiant of Undercity if no tournament eligility marker'),
+(19, 0, 13711, 0, 0, 14, 13687, 0, 0, 0, '', 'Valiant of Silvermoon if no tournament eligility marker'),
+(20, 0, 13593, 0, 0, 14, 13686, 0, 0, 0, '', 'Valiant of Stormwind if no tournament eligility marker'),
+(20, 0, 13703, 0, 0, 14, 13686, 0, 0, 0, '', 'Valiant of Iron Forge if no tournament eligility marker'),
+(20, 0, 13704, 0, 0, 14, 13686, 0, 0, 0, '', 'Valiant of gomregan if no tournament eligility marker'),
+(20, 0, 13705, 0, 0, 14, 13686, 0, 0, 0, '', 'Valiant of Exodar if no tournament eligility marker'),
+(20, 0, 13706, 0, 0, 14, 13686, 0, 0, 0, '', 'Valiant of Darnassus if no tournament eligility marker'),
+(20, 0, 13707, 0, 0, 14, 13687, 0, 0, 0, '', 'Valiant of Orgrimmar if no tournament eligility marker'),
+(20, 0, 13708, 0, 0, 14, 13687, 0, 0, 0, '', 'Valiant of Sen''Jin if no tournament eligility marker'),
+(20, 0, 13709, 0, 0, 14, 13687, 0, 0, 0, '', 'Valiant of Thunderbluff if no tournament eligility marker'),
+(20, 0, 13710, 0, 0, 14, 13687, 0, 0, 0, '', 'Valiant of Undercity if no tournament eligility marker'),
+(20, 0, 13711, 0, 0, 14, 13687, 0, 0, 0, '', 'Valiant of Silvermoon if no tournament eligility marker');-- Conditions so all versions of the edge of winter which give valliants seals can only be taken while the player has the valliants charge for that faction in quest log (whether completed or not as players can continue doing these quests for rep and valiants seals as long as they dont turn it in.
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `ConditionTypeOrReference` IN (9,28) AND `SourceEntry` IN (13616,13743,13748,13754,13759,13764,13770,13775,13780,13785);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=20 AND `ConditionTypeOrReference` IN (9,28) AND `SourceEntry` IN (13616,13743,13748,13754,13759,13764,13770,13775,13780,13785);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(19, 0, 13616, 0, 0, 9, 13718, 0, 0, 0, '', 'edge of winter- Stormwind'),
+(19, 0, 13743, 0, 0, 9, 13714, 0, 0, 0, '', 'edge of winter- Iron Forge'),
+(19, 0, 13748, 0, 0, 9, 13715, 0, 0, 0, '', 'edge of winter- Gnomeregan'),
+(19, 0, 13754, 0, 0, 9, 13716, 0, 0, 0, '', 'edge of winter- Exodar'),
+(19, 0, 13759, 0, 0, 9, 13717, 0, 0, 0, '', 'edge of winter- darnassus'),
+(19, 0, 13764, 0, 0, 9, 13697, 0, 0, 0, '', 'edge of winter- Ogrimmar'),
+(19, 0, 13770, 0, 0, 9, 13719, 0, 0, 0, '', 'edge of winter- Darkspear'),
+(19, 0, 13775, 0, 0, 9, 13720, 0, 0, 0, '', 'edge of winter- Thunderbluff'),
+(19, 0, 13780, 0, 0, 9, 13721, 0, 0, 0, '', 'edge of winter- Undercity'),
+(19, 0, 13785, 0, 0, 9, 13722, 0, 0, 0, '', 'edge of winter- Silvermoon'),
+(20, 0, 13616, 0, 0, 9, 13718, 0, 0, 0, '', 'edge of winter- Stormwind'),
+(20, 0, 13743, 0, 0, 9, 13714, 0, 0, 0, '', 'edge of winter- Iron Forge'),
+(20, 0, 13748, 0, 0, 9, 13715, 0, 0, 0, '', 'edge of winter- Gnomeregan'),
+(20, 0, 13754, 0, 0, 9, 13716, 0, 0, 0, '', 'edge of winter- Exodar'),
+(20, 0, 13759, 0, 0, 9, 13717, 0, 0, 0, '', 'edge of winter- darnassus'),
+(20, 0, 13764, 0, 0, 9, 13697, 0, 0, 0, '', 'edge of winter- Ogrimmar'),
+(20, 0, 13770, 0, 0, 9, 13719, 0, 0, 0, '', 'edge of winter- Darkspear'),
+(20, 0, 13775, 0, 0, 9, 13720, 0, 0, 0, '', 'edge of winter- Thunderbluff'),
+(20, 0, 13780, 0, 0, 9, 13721, 0, 0, 0, '', 'edge of winter- Undercity'),
+(20, 0, 13785, 0, 0, 9, 13722, 0, 0, 0, '', 'edge of winter- Silvermoon'),
+(19, 0, 13616, 0, 1 ,28, 13718, 0, 0, 0, '', 'edge of winter- Stormwind'),
+(19, 0, 13743, 0, 1 ,28, 13714, 0, 0, 0, '', 'edge of winter- Iron Forge'),
+(19, 0, 13748, 0, 1 ,28, 13715, 0, 0, 0, '', 'edge of winter- Gnomeregan'),
+(19, 0, 13754, 0, 1 ,28, 13716, 0, 0, 0, '', 'edge of winter- Exodar'),
+(19, 0, 13759, 0, 1 ,28, 13717, 0, 0, 0, '', 'edge of winter- darnassus'),
+(19, 0, 13764, 0, 1 ,28, 13697, 0, 0, 0, '', 'edge of winter- Ogrimmar'),
+(19, 0, 13770, 0, 1 ,28, 13719, 0, 0, 0, '', 'edge of winter- Darkspear'),
+(19, 0, 13775, 0, 1 ,28, 13720, 0, 0, 0, '', 'edge of winter- Thunderbluff'),
+(19, 0, 13780, 0, 1 ,28, 13721, 0, 0, 0, '', 'edge of winter- Undercity'),
+(19, 0, 13785, 0, 1 ,28, 13722, 0, 0, 0, '', 'edge of winter- Silvermoon'),
+(20, 0, 13616, 0, 1 ,28, 13718, 0, 0, 0, '', 'edge of winter- Stormwind'),
+(20, 0, 13743, 0, 1 ,28, 13714, 0, 0, 0, '', 'edge of winter- Iron Forge'),
+(20, 0, 13748, 0, 1 ,28, 13715, 0, 0, 0, '', 'edge of winter- Gnomeregan'),
+(20, 0, 13754, 0, 1 ,28, 13716, 0, 0, 0, '', 'edge of winter- Exodar'),
+(20, 0, 13759, 0, 1 ,28, 13717, 0, 0, 0, '', 'edge of winter- darnassus'),
+(20, 0, 13764, 0, 1 ,28, 13697, 0, 0, 0, '', 'edge of winter- Ogrimmar'),
+(20, 0, 13770, 0, 1 ,28, 13719, 0, 0, 0, '', 'edge of winter- Darkspear'),
+(20, 0, 13775, 0, 1 ,28, 13720, 0, 0, 0, '', 'edge of winter- Thunderbluff'),
+(20, 0, 13780, 0, 1 ,28, 13721, 0, 0, 0, '', 'edge of winter- Undercity'),
+(20, 0, 13785, 0, 1 ,28, 13722, 0, 0, 0, '', 'edge of winter- Silvermoon');
+
+-- Conditions so all versions of the a blade fit for a champion which give valliants seals can only be taken while the player has the valliants charge for that faction in quest log (whether completed or not as players can continue doing these quests for rep and valiants seals as long as they dont turn it in.
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `ConditionTypeOrReference` IN (9,28) AND `SourceEntry` IN (13603,13741,13746,13752,13757,13762,13768,13773,13778,13783);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=20 AND `ConditionTypeOrReference` IN (9,28) AND `SourceEntry` IN (13603,13741,13746,13752,13757,13762,13768,13773,13778,13783);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(19, 0, 13603, 0, 0, 9, 13718, 0, 0, 0, '', 'a blade fit for a champion- Stormwind'),
+(19, 0, 13741, 0, 0, 9, 13714, 0, 0, 0, '', 'a blade fit for a champion- Iron Forge'),
+(19, 0, 13746, 0, 0, 9, 13715, 0, 0, 0, '', 'a blade fit for a champion- Gnomeregan'),
+(19, 0, 13752, 0, 0, 9, 13716, 0, 0, 0, '', 'a blade fit for a champion- Exodar'),
+(19, 0, 13757, 0, 0, 9, 13717, 0, 0, 0, '', 'a blade fit for a champion- darnassus'),
+(19, 0, 13762, 0, 0, 9, 13697, 0, 0, 0, '', 'a blade fit for a champion- Ogrimmar'),
+(19, 0, 13768, 0, 0, 9, 13719, 0, 0, 0, '', 'a blade fit for a champion- Darkspear'),
+(19, 0, 13773, 0, 0, 9, 13720, 0, 0, 0, '', 'a blade fit for a champion- Thunderbluff'),
+(19, 0, 13778, 0, 0, 9, 13721, 0, 0, 0, '', 'a blade fit for a champion- Undercity'),
+(19, 0, 13783, 0, 0, 9, 13722, 0, 0, 0, '', 'a blade fit for a champion- Silvermoon'),
+(20, 0, 13603, 0, 0, 9, 13718, 0, 0, 0, '', 'a blade fit for a champion- Stormwind'),
+(20, 0, 13741, 0, 0, 9, 13714, 0, 0, 0, '', 'a blade fit for a champion- Iron Forge'),
+(20, 0, 13746, 0, 0, 9, 13715, 0, 0, 0, '', 'a blade fit for a champion- Gnomeregan'),
+(20, 0, 13752, 0, 0, 9, 13716, 0, 0, 0, '', 'a blade fit for a champion- Exodar'),
+(20, 0, 13757, 0, 0, 9, 13717, 0, 0, 0, '', 'a blade fit for a champion- darnassus'),
+(20, 0, 13762, 0, 0, 9, 13697, 0, 0, 0, '', 'a blade fit for a champion- Ogrimmar'),
+(20, 0, 13768, 0, 0, 9, 13719, 0, 0, 0, '', 'a blade fit for a champion- Darkspear'),
+(20, 0, 13773, 0, 0, 9, 13720, 0, 0, 0, '', 'a blade fit for a champion- Thunderbluff'),
+(20, 0, 13778, 0, 0, 9, 13721, 0, 0, 0, '', 'a blade fit for a champion- Undercity'),
+(20, 0, 13783, 0, 0, 9, 13722, 0, 0, 0, '', 'a blade fit for a champion- Silvermoon'),
+(19, 0, 13603, 0, 1 ,28, 13718, 0, 0, 0, '', 'a blade fit for a champion- Stormwind'),
+(19, 0, 13741, 0, 1 ,28, 13714, 0, 0, 0, '', 'a blade fit for a champion- Iron Forge'),
+(19, 0, 13746, 0, 1 ,28, 13715, 0, 0, 0, '', 'a blade fit for a champion- Gnomeregan'),
+(19, 0, 13752, 0, 1 ,28, 13716, 0, 0, 0, '', 'a blade fit for a champion- Exodar'),
+(19, 0, 13757, 0, 1 ,28, 13717, 0, 0, 0, '', 'a blade fit for a champion- darnassus'),
+(19, 0, 13762, 0, 1 ,28, 13697, 0, 0, 0, '', 'a blade fit for a champion- Ogrimmar'),
+(19, 0, 13768, 0, 1 ,28, 13719, 0, 0, 0, '', 'a blade fit for a champion- Darkspear'),
+(19, 0, 13773, 0, 1 ,28, 13720, 0, 0, 0, '', 'a blade fit for a champion- Thunderbluff'),
+(19, 0, 13778, 0, 1 ,28, 13721, 0, 0, 0, '', 'a blade fit for a champion- Undercity'),
+(19, 0, 13783, 0, 1 ,28, 13722, 0, 0, 0, '', 'a blade fit for a champion- Silvermoon'),
+(20, 0, 13603, 0, 1 ,28, 13718, 0, 0, 0, '', 'a blade fit for a champion- Stormwind'),
+(20, 0, 13741, 0, 1 ,28, 13714, 0, 0, 0, '', 'a blade fit for a champion- Iron Forge'),
+(20, 0, 13746, 0, 1 ,28, 13715, 0, 0, 0, '', 'a blade fit for a champion- Gnomeregan'),
+(20, 0, 13752, 0, 1 ,28, 13716, 0, 0, 0, '', 'a blade fit for a champion- Exodar'),
+(20, 0, 13757, 0, 1 ,28, 13717, 0, 0, 0, '', 'a blade fit for a champion- darnassus'),
+(20, 0, 13762, 0, 1 ,28, 13697, 0, 0, 0, '', 'a blade fit for a champion- Ogrimmar'),
+(20, 0, 13768, 0, 1 ,28, 13719, 0, 0, 0, '', 'a blade fit for a champion- Darkspear'),
+(20, 0, 13773, 0, 1 ,28, 13720, 0, 0, 0, '', 'a blade fit for a champion- Thunderbluff'),
+(20, 0, 13778, 0, 1 ,28, 13721, 0, 0, 0, '', 'a blade fit for a champion- Undercity'),
+(20, 0, 13783, 0, 1 ,28, 13722, 0, 0, 0, '', 'a blade fit for a champion- Silvermoon');
+
+-- Conditions so all versions of the A Worthy Weapon which give valliants seals can only be taken while the player has the valliants charge for that faction in quest log (whether completed or not as players can continue doing these quests for rep and valiants seals as long as they dont turn it in.
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `ConditionTypeOrReference` IN (9,28) AND `SourceEntry` IN (13600,13742,13747,13753,13758,13763,13769,13774,13779,13784);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=20 AND `ConditionTypeOrReference` IN (9,28) AND `SourceEntry` IN (13600,13742,13747,13753,13758,13763,13769,13774,13779,13784);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(19, 0, 13600, 0, 0, 9, 13718, 0, 0, 0, '', 'a worthy weapon- Stormwind'),
+(19, 0, 13742, 0, 0, 9, 13714, 0, 0, 0, '', 'a worthy weapon- Iron Forge'),
+(19, 0, 13747, 0, 0, 9, 13715, 0, 0, 0, '', 'a worthy weapon- Gnomeregan'),
+(19, 0, 13753, 0, 0, 9, 13716, 0, 0, 0, '', 'a worthy weapon- Exodar'),
+(19, 0, 13758, 0, 0, 9, 13717, 0, 0, 0, '', 'a worthy weapon- darnassus'),
+(19, 0, 13763, 0, 0, 9, 13697, 0, 0, 0, '', 'a worthy weapon- Ogrimmar'),
+(19, 0, 13769, 0, 0, 9, 13719, 0, 0, 0, '', 'a worthy weapon- Darkspear'),
+(19, 0, 13774, 0, 0, 9, 13720, 0, 0, 0, '', 'a worthy weapon- Thunderbluff'),
+(19, 0, 13779, 0, 0, 9, 13721, 0, 0, 0, '', 'a worthy weapon- Undercity'),
+(19, 0, 13784, 0, 0, 9, 13722, 0, 0, 0, '', 'a worthy weapon- Silvermoon'),
+(20, 0, 13600, 0, 0, 9, 13718, 0, 0, 0, '', 'a worthy weapon- Stormwind'),
+(20, 0, 13742, 0, 0, 9, 13714, 0, 0, 0, '', 'a worthy weapon- Iron Forge'),
+(20, 0, 13747, 0, 0, 9, 13715, 0, 0, 0, '', 'a worthy weapon- Gnomeregan'),
+(20, 0, 13753, 0, 0, 9, 13716, 0, 0, 0, '', 'a worthy weapon- Exodar'),
+(20, 0, 13758, 0, 0, 9, 13717, 0, 0, 0, '', 'a worthy weapon- darnassus'),
+(20, 0, 13763, 0, 0, 9, 13697, 0, 0, 0, '', 'a worthy weapon- Ogrimmar'),
+(20, 0, 13769, 0, 0, 9, 13719, 0, 0, 0, '', 'a worthy weapon- Darkspear'),
+(20, 0, 13774, 0, 0, 9, 13720, 0, 0, 0, '', 'a worthy weapon- Thunderbluff'),
+(20, 0, 13779, 0, 0, 9, 13721, 0, 0, 0, '', 'a worthy weapon- Undercity'),
+(20, 0, 13784, 0, 0, 9, 13722, 0, 0, 0, '', 'a worthy weapon- Silvermoon'),
+(19, 0, 13600, 0, 1 ,28, 13718, 0, 0, 0, '', 'a worthy weapon- Stormwind'),
+(19, 0, 13742, 0, 1 ,28, 13714, 0, 0, 0, '', 'a worthy weapon- Iron Forge'),
+(19, 0, 13747, 0, 1 ,28, 13715, 0, 0, 0, '', 'a worthy weapon- Gnomeregan'),
+(19, 0, 13753, 0, 1 ,28, 13716, 0, 0, 0, '', 'a worthy weapon- Exodar'),
+(19, 0, 13758, 0, 1 ,28, 13717, 0, 0, 0, '', 'a worthy weapon- darnassus'),
+(19, 0, 13763, 0, 1 ,28, 13697, 0, 0, 0, '', 'a worthy weapon- Ogrimmar'),
+(19, 0, 13769, 0, 1 ,28, 13719, 0, 0, 0, '', 'a worthy weapon- Darkspear'),
+(19, 0, 13774, 0, 1 ,28, 13720, 0, 0, 0, '', 'a worthy weapon- Thunderbluff'),
+(19, 0, 13779, 0, 1 ,28, 13721, 0, 0, 0, '', 'a worthy weapon- Undercity'),
+(19, 0, 13784, 0, 1 ,28, 13722, 0, 0, 0, '', 'a worthy weapon- Silvermoon'),
+(20, 0, 13600, 0, 1 ,28, 13718, 0, 0, 0, '', 'a worthy weapon- Stormwind'),
+(20, 0, 13742, 0, 1 ,28, 13714, 0, 0, 0, '', 'a worthy weapon- Iron Forge'),
+(20, 0, 13747, 0, 1 ,28, 13715, 0, 0, 0, '', 'a worthy weapon- Gnomeregan'),
+(20, 0, 13753, 0, 1 ,28, 13716, 0, 0, 0, '', 'a worthy weapon- Exodar'),
+(20, 0, 13758, 0, 1 ,28, 13717, 0, 0, 0, '', 'a worthy weapon- darnassus'),
+(20, 0, 13763, 0, 1 ,28, 13697, 0, 0, 0, '', 'a worthy weapon- Ogrimmar'),
+(20, 0, 13769, 0, 1 ,28, 13719, 0, 0, 0, '', 'a worthy weapon- Darkspear'),
+(20, 0, 13774, 0, 1 ,28, 13720, 0, 0, 0, '', 'a worthy weapon- Thunderbluff'),
+(20, 0, 13779, 0, 1 ,28, 13721, 0, 0, 0, '', 'a worthy weapon- Undercity'),
+(20, 0, 13784, 0, 1 ,28, 13722, 0, 0, 0, '', 'a worthy weapon- Silvermoon');
+
+-- Conditions so all versions of at the enemies gates which give valliants seals can only be taken while the player has the valliants charge for that faction in quest log (whether completed or not as players can continue doing these quests for rep and valiants seals as long as they dont turn it in.
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `ConditionTypeOrReference` IN (9,28) AND `SourceEntry` IN (13847,13851,13852,13854,13855,13856,13857,13858,13859,13860);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=20 AND `ConditionTypeOrReference` IN (9,28) AND `SourceEntry` IN (13847,13851,13852,13854,13855,13856,13857,13858,13859,13860);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(19, 0, 13847, 0, 0, 9, 13718, 0, 0, 0, '', 'at the enemies gates- Stormwind'),
+(19, 0, 13847, 0, 1, 28, 13718, 0, 0, 0, '', 'at the enemies gates- Stormwind'),
+(19, 0, 13851, 0, 0, 9, 13714, 0, 0, 0, '', 'at the enemies gates- Iron Forge'),
+(19, 0, 13851, 0, 1, 28, 13714, 0, 0, 0, '', 'at the enemies gates- Iron Forge'),
+(19, 0, 13852, 0, 0, 9, 13715, 0, 0, 0, '', 'at the enemies gates- Gnomeregan'),
+(19, 0, 13852, 0, 1, 28, 13715, 0, 0, 0, '', 'at the enemies gates- Gnomeregan'),
+(19, 0, 13854, 0, 0, 9, 13716, 0, 0, 0, '', 'at the enemies gates- Exodar'),
+(19, 0, 13854, 0, 1, 28, 13716, 0, 0, 0, '', 'at the enemies gates- Exodar'),
+(19, 0, 13855, 0, 0, 9, 13717, 0, 0, 0, '', 'at the enemies gates- darnassus'),
+(19, 0, 13855, 0, 1, 28, 13717, 0, 0, 0, '', 'at the enemies gates- darnassus'),
+(19, 0, 13856, 0, 0, 9, 13697, 0, 0, 0, '', 'at the enemies gates- Ogrimmar'),
+(19, 0, 13856, 0, 1, 28, 13697, 0, 0, 0, '', 'at the enemies gates- Ogrimmar'),
+(19, 0, 13857, 0, 0, 9, 13719, 0, 0, 0, '', 'at the enemies gates- Darkspear'),
+(19, 0, 13857, 0, 1, 28, 13719, 0, 0, 0, '', 'at the enemies gates- Darkspear'),
+(19, 0, 13858, 0, 0, 9, 13720, 0, 0, 0, '', 'at the enemies gates- Thunderbluff'),
+(19, 0, 13858, 0, 1, 28, 13720, 0, 0, 0, '', 'at the enemies gates- Thunderbluff'),
+(19, 0, 13859, 0, 0, 9, 13722, 0, 0, 0, '', 'at the enemies gates- Silvermoon'),
+(19, 0, 13859, 0, 1, 28, 13722, 0, 0, 0, '', 'at the enemies gates- Silvermoon'),
+(19, 0, 13860, 0, 0, 9, 13721, 0, 0, 0, '', 'at the enemies gates- Undercity'),
+(19, 0, 13860, 0, 1, 28, 13721, 0, 0, 0, '', 'at the enemies gates- Undercity'),
+(20, 0, 13847, 0, 0, 9, 13718, 0, 0, 0, '', 'at the ememies gates- Stormwind'),
+(20, 0, 13851, 0, 0, 9, 13714, 0, 0, 0, '', 'at the ememies gates- Iron Forge'),
+(20, 0, 13852, 0, 0, 9, 13715, 0, 0, 0, '', 'at the ememies gates- Gnomeregan'),
+(20, 0, 13854, 0, 0, 9, 13716, 0, 0, 0, '', 'at the ememies gates- Exodar'),
+(20, 0, 13855, 0, 0, 9, 13717, 0, 0, 0, '', 'at the ememies gates- darnassus'),
+(20, 0, 13856, 0, 0, 9, 13697, 0, 0, 0, '', 'at the ememies gates- Ogrimmar'),
+(20, 0, 13857, 0, 0, 9, 13719, 0, 0, 0, '', 'at the ememies gates- Darkspear'),
+(20, 0, 13858, 0, 0, 9, 13720, 0, 0, 0, '', 'at the ememies gates- Thunderbluff'),
+(20, 0, 13859, 0, 0, 9, 13722, 0, 0, 0, '', 'at the ememies gates- Silvermoon'),
+(20, 0, 13860, 0, 0, 9, 13721, 0, 0, 0, '', 'at the ememies gates- Undercity'),
+(20, 0, 13847, 0, 1 ,28, 13718, 0, 0, 0, '', 'at the ememies gates- Stormwind'),
+(20, 0, 13851, 0, 1 ,28, 13714, 0, 0, 0, '', 'at the ememies gates- Iron Forge'),
+(20, 0, 13852, 0, 1 ,28, 13715, 0, 0, 0, '', 'at the ememies gates- Gnomeregan'),
+(20, 0, 13854, 0, 1 ,28, 13716, 0, 0, 0, '', 'at the ememies gates- Exodar'),
+(20, 0, 13855, 0, 1 ,28, 13717, 0, 0, 0, '', 'at the ememies gates- darnassus'),
+(20, 0, 13856, 0, 1 ,28, 13697, 0, 0, 0, '', 'at the ememies gates- Ogrimmar'),
+(20, 0, 13857, 0, 1 ,28, 13719, 0, 0, 0, '', 'at the ememies gates- Darkspear'),
+(20, 0, 13858, 0, 1 ,28, 13720, 0, 0, 0, '', 'at the ememies gates- Thunderbluff'),
+(20, 0, 13859, 0, 1 ,28, 13722, 0, 0, 0, '', 'at the ememies gates- Silvermoon'),
+(20, 0, 13860, 0, 1 ,28, 13721, 0, 0, 0, '', 'at the ememies gates- Undercity');
+
+-- Conditions so all versions of a valiants field training which give valliants seals can only be taken while the player has the valliants charge for that faction in quest log (whether completed or not as players can continue doing these quests for rep and valiants seals as long as they dont turn it in.
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `ConditionTypeOrReference` IN (9,28) AND `SourceEntry` IN (13592,13744,13749,13755,13760,13765,13771,13776,13781,13786);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=20 AND `ConditionTypeOrReference` IN (9,28) AND `SourceEntry` IN (13592,13744,13749,13755,13760,13765,13771,13776,13781,13786);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(19, 0, 13592, 0, 0, 9, 13718, 0, 0, 0, '', 'A Valiants Field Training- Stormwind'),
+(19, 0, 13744, 0, 0, 9, 13714, 0, 0, 0, '', 'A Valiants Field Training- Iron Forge'),
+(19, 0, 13749, 0, 0, 9, 13715, 0, 0, 0, '', 'A Valiants Field Training- Gnomeregan'),
+(19, 0, 13755, 0, 0, 9, 13716, 0, 0, 0, '', 'A Valiants Field Training- Exodar'),
+(19, 0, 13760, 0, 0, 9, 13717, 0, 0, 0, '', 'A Valiants Field Training- darnassus'),
+(19, 0, 13765, 0, 0, 9, 13697, 0, 0, 0, '', 'A Valiants Field Training- Ogrimmar'),
+(19, 0, 13771, 0, 0, 9, 13719, 0, 0, 0, '', 'A Valiants Field Training- Darkspear'),
+(19, 0, 13776, 0, 0, 9, 13720, 0, 0, 0, '', 'A Valiants Field Training- Thunderbluff'),
+(19, 0, 13781, 0, 0, 9, 13721, 0, 0, 0, '', 'A Valiants Field Training- Undercity'),
+(19, 0, 13786, 0, 0, 9, 13722, 0, 0, 0, '', 'A Valiants Field Training- Silvermoon'),
+(20, 0, 13592, 0, 0, 9, 13718, 0, 0, 0, '', 'A Valiants Field Training- Stormwind'),
+(20, 0, 13744, 0, 0, 9, 13714, 0, 0, 0, '', 'A Valiants Field Training- Iron Forge'),
+(20, 0, 13749, 0, 0, 9, 13715, 0, 0, 0, '', 'A Valiants Field Training- Gnomeregan'),
+(20, 0, 13755, 0, 0, 9, 13716, 0, 0, 0, '', 'A Valiants Field Training- Exodar'),
+(20, 0, 13760, 0, 0, 9, 13717, 0, 0, 0, '', 'A Valiants Field Training- darnassus'),
+(20, 0, 13765, 0, 0, 9, 13697, 0, 0, 0, '', 'A Valiants Field Training- Ogrimmar'),
+(20, 0, 13771, 0, 0, 9, 13719, 0, 0, 0, '', 'A Valiants Field Training- Darkspear'),
+(20, 0, 13776, 0, 0, 9, 13720, 0, 0, 0, '', 'A Valiants Field Training- Thunderbluff'),
+(20, 0, 13781, 0, 0, 9, 13721, 0, 0, 0, '', 'A Valiants Field Training- Undercity'),
+(20, 0, 13786, 0, 0, 9, 13722, 0, 0, 0, '', 'A Valiants Field Training- Silvermoon'),
+(19, 0, 13592, 0, 1 ,28, 13718, 0, 0, 0, '', 'A Valiants Field Training- Stormwind'),
+(19, 0, 13744, 0, 1 ,28, 13714, 0, 0, 0, '', 'A Valiants Field Training- Iron Forge'),
+(19, 0, 13749, 0, 1 ,28, 13715, 0, 0, 0, '', 'A Valiants Field Training- Gnomeregan'),
+(19, 0, 13755, 0, 1 ,28, 13716, 0, 0, 0, '', 'A Valiants Field Training- Exodar'),
+(19, 0, 13760, 0, 1 ,28, 13717, 0, 0, 0, '', 'A Valiants Field Training- darnassus'),
+(19, 0, 13765, 0, 1 ,28, 13697, 0, 0, 0, '', 'A Valiants Field Training- Ogrimmar'),
+(19, 0, 13771, 0, 1 ,28, 13719, 0, 0, 0, '', 'A Valiants Field Training- Darkspear'),
+(19, 0, 13776, 0, 1 ,28, 13720, 0, 0, 0, '', 'A Valiants Field Training- Thunderbluff'),
+(19, 0, 13781, 0, 1 ,28, 13721, 0, 0, 0, '', 'A Valiants Field Training- Undercity'),
+(19, 0, 13786, 0, 1 ,28, 13722, 0, 0, 0, '', 'A Valiants Field Training- Silvermoon'),
+(20, 0, 13592, 0, 1 ,28, 13718, 0, 0, 0, '', 'A Valiants Field Training- Stormwind'),
+(20, 0, 13744, 0, 1 ,28, 13714, 0, 0, 0, '', 'A Valiants Field Training- Iron Forge'),
+(20, 0, 13749, 0, 1 ,28, 13715, 0, 0, 0, '', 'A Valiants Field Training- Gnomeregan'),
+(20, 0, 13755, 0, 1 ,28, 13716, 0, 0, 0, '', 'A Valiants Field Training- Exodar'),
+(20, 0, 13760, 0, 1 ,28, 13717, 0, 0, 0, '', 'A Valiants Field Training- darnassus'),
+(20, 0, 13765, 0, 1 ,28, 13697, 0, 0, 0, '', 'A Valiants Field Training- Ogrimmar'),
+(20, 0, 13771, 0, 1 ,28, 13719, 0, 0, 0, '', 'A Valiants Field Training- Darkspear'),
+(20, 0, 13776, 0, 1 ,28, 13720, 0, 0, 0, '', 'A Valiants Field Training- Thunderbluff'),
+(20, 0, 13781, 0, 1 ,28, 13721, 0, 0, 0, '', 'A Valiants Field Training- Undercity'),
+(20, 0, 13786, 0, 1 ,28, 13722, 0, 0, 0, '', 'A Valiants Field Training- Silvermoon');
+
+-- Conditions so all versions of the grand melee which give valliants seals can only be taken while the player has the valliants charge for that faction in quest log (whether completed or not as players can continue doing these quests for rep and valiants seals as long as they dont turn it in.
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `ConditionTypeOrReference` IN (9,28) AND `SourceEntry` IN (13665,13745,13750,13756,13761,13767,13772,13777,13782,13787);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=20 AND `ConditionTypeOrReference` IN (9,28) AND `SourceEntry` IN (13665,13745,13750,13756,13761,13767,13772,13777,13782,13787);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(19, 0, 13665, 0, 0, 9, 13718, 0, 0, 0, '', 'the grand melee- Stormwind'),
+(19, 0, 13665, 0, 1, 28, 13718, 0, 0, 0, '', 'the grand melee- Stormwind'),
+(19, 0, 13745, 0, 0, 9, 13714, 0, 0, 0, '', 'the grand melee- Iron Forge'),
+(19, 0, 13745, 0, 1, 28, 13714, 0, 0, 0, '', 'the grand melee- Iron Forge'),
+(19, 0, 13750, 0, 0, 9, 13715, 0, 0, 0, '', 'the grand melee- Gnomeregan'),
+(19, 0, 13750, 0, 1, 28, 13715, 0, 0, 0, '', 'the grand melee- Gnomeregan'),
+(19, 0, 13756, 0, 0, 9, 13716, 0, 0, 0, '', 'the grand melee- Exodar'),
+(19, 0, 13756, 0, 1, 28, 13716, 0, 0, 0, '', 'the grand melee- Exodar'),
+(19, 0, 13761, 0, 0, 9, 13717, 0, 0, 0, '', 'the grand melee- darnassus'),
+(19, 0, 13761, 0, 1, 28, 13717, 0, 0, 0, '', 'the grand melee- darnassus'),
+(19, 0, 13767, 0, 0, 9, 13697, 0, 0, 0, '', 'the grand melee- Ogrimmar'),
+(19, 0, 13767, 0, 1, 28, 13697, 0, 0, 0, '', 'the grand melee- Ogrimmar'),
+(19, 0, 13772, 0, 0, 9, 13719, 0, 0, 0, '', 'the grand melee- Darkspear'),
+(19, 0, 13772, 0, 1, 28, 13719, 0, 0, 0, '', 'the grand melee- Darkspear'),
+(19, 0, 13777, 0, 0, 9, 13720, 0, 0, 0, '', 'the grand melee- Thunderbluff'),
+(19, 0, 13777, 0, 1, 28, 13720, 0, 0, 0, '', 'the grand melee- Thunderbluff'),
+(19, 0, 13782, 0, 0, 9, 13721, 0, 0, 0, '', 'the grand melee- Undercity'),
+(19, 0, 13782, 0, 1, 28, 13721, 0, 0, 0, '', 'the grand melee- Undercity'),
+(19, 0, 13787, 0, 0, 9, 13722, 0, 0, 0, '', 'the grand melee- Silvermoon'),
+(19, 0, 13787, 0, 1, 28, 13722, 0, 0, 0, '', 'the grand melee- Silvermoon'),
+(20, 0, 13665, 0, 0, 9, 13718, 0, 0, 0, '', 'the grand melee- Stormwind'),
+(20, 0, 13665, 0, 1, 28, 13718, 0, 0, 0, '', 'the grand melee- Stormwind'),
+(20, 0, 13745, 0, 0, 9, 13714, 0, 0, 0, '', 'the grand melee- Iron Forge'),
+(20, 0, 13745, 0, 1, 28, 13714, 0, 0, 0, '', 'the grand melee- Iron Forge'),
+(20, 0, 13750, 0, 0, 9, 13715, 0, 0, 0, '', 'the grand melee- Gnomeregan'),
+(20, 0, 13750, 0, 1, 28, 13715, 0, 0, 0, '', 'the grand melee- Gnomeregan'),
+(20, 0, 13756, 0, 0, 9, 13716, 0, 0, 0, '', 'the grand melee- Exodar'),
+(20, 0, 13756, 0, 1, 28, 13716, 0, 0, 0, '', 'the grand melee- Exodar'),
+(20, 0, 13761, 0, 0, 9, 13717, 0, 0, 0, '', 'the grand melee- darnassus'),
+(20, 0, 13761, 0, 1, 28, 13717, 0, 0, 0, '', 'the grand melee- darnassus'),
+(20, 0, 13767, 0, 0, 9, 13697, 0, 0, 0, '', 'the grand melee- Ogrimmar'),
+(20, 0, 13767, 0, 1, 28, 13697, 0, 0, 0, '', 'the grand melee- Ogrimmar'),
+(20, 0, 13772, 0, 0, 9, 13719, 0, 0, 0, '', 'the grand melee- Darkspear'),
+(20, 0, 13772, 0, 1, 28, 13719, 0, 0, 0, '', 'the grand melee- Darkspear'),
+(20, 0, 13777, 0, 0, 9, 13720, 0, 0, 0, '', 'the grand melee- Thunderbluff'),
+(20, 0, 13777, 0, 1, 28, 13720, 0, 0, 0, '', 'the grand melee- Thunderbluff'),
+(20, 0, 13782, 0, 0, 9, 13721, 0, 0, 0, '', 'the grand melee- Undercity'),
+(20, 0, 13782, 0, 1, 28, 13721, 0, 0, 0, '', 'the grand melee- Undercity'),
+(20, 0, 13787, 0, 0, 9, 13722, 0, 0, 0, '', 'the grand melee- Silvermoon'),
+(20, 0, 13787, 0, 1, 28, 13722, 0, 0, 0, '', 'the grand melee- Silvermoon');
+
+-- Conditions for sunreavers/silver covenant and crusader dailies so these can only be done if players have earnt the achievement which unlocks them.
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `ConditionTypeOrReference`= 17 AND `SourceEntry` IN (14101,14102,14104,14105,14107,14108,14074,14076,14077,14080,14090,14096,14112,14152,14092,14136,14140,14141,14142,14143,14144,14145);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=20 AND `ConditionTypeOrReference`= 17 AND `SourceEntry` IN (14101,14102,14104,14105,14107,14108,14074,14076,14077,14080,14090,14096,14112,14152,14092,14136,14140,14141,14142,14143,14144,14145);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(19, 0, 14101, 0, 0, 17, 2817, 0, 0, 0, '', 'Drottinn Hrothgar requires crusader'),
+(19, 0, 14101, 0, 1, 17, 2816, 0, 0, 0, '', 'Drottinn Hrothgar requires crusader'),
+(19, 0, 14102, 0, 0, 17, 2817, 0, 0, 0, '', 'Mistcaller Yngvar requires crusader'),
+(19, 0, 14102, 0, 1, 17, 2816, 0, 0, 0, '', 'Mistcaller Yngvar requires crusader'),
+(19, 0, 14104, 0, 0, 17, 2817, 0, 0, 0, '', 'Ornolf The Scarred requires crusader'),
+(19, 0, 14104, 0, 1, 17, 2816, 0, 0, 0, '', 'Ornolf The Scarred requires crusader'),
+(19, 0, 14105, 0, 0, 17, 2817, 0, 0, 0, '', 'Deathspeaker Kharos requires crusader'),
+(19, 0, 14105, 0, 1, 17, 2816, 0, 0, 0, '', 'Deathspeaker Kharos requires crusader'),
+(19, 0, 14107, 0, 0, 17, 2817, 0, 0, 0, '', 'The Fate Of The Fallen requires crusader'),
+(19, 0, 14107, 0, 1, 17, 2816, 0, 0, 0, '', 'The Fate Of The Fallen requires crusader'),
+(19, 0, 14108, 0, 0, 17, 2817, 0, 0, 0, '', 'Get Kraken requires crusader'),
+(19, 0, 14108, 0, 1, 17, 2816, 0, 0, 0, '', 'Get Kraken requires crusader'),
+(19, 0, 14074, 0, 0, 17, 3676, 0, 0, 0, '', 'A Leg Up requires A silver confident'),
+(19, 0, 14076, 0, 0, 17, 3676, 0, 0, 0, '', 'Breakfast Of Champions requires A silver confident'),
+(19, 0, 14077, 0, 0, 17, 3676, 0, 0, 0, '', 'The Light''s Mercy requires A silver confident'),
+(19, 0, 14080, 0, 0, 17, 3676, 0, 0, 0, '', 'Stop The Aggressors requires A silver confident'),
+(19, 0, 14090, 0, 0, 17, 3676, 0, 0, 0, '', 'Gormok Wants His Snobolds requires A silver confident'),
+(19, 0, 14096, 0, 0, 17, 3676, 0, 0, 0, '', 'You''ve Really Done It This Time, Kul requires A silver confident'),
+(19, 0, 14112, 0, 0, 17, 3676, 0, 0, 0, '', 'What Do You Feed a Yeti, Anyway? requires A silver confident'),
+(19, 0, 14152, 0, 0, 17, 3676, 0, 0, 0, '', 'Rescue at Sea requires A silver confident'),
+(19, 0, 14092, 0, 0, 17, 3677, 0, 0, 0, '', 'Breakfast Of Champions requires The sunreavers'),
+(19, 0, 14136, 0, 0, 17, 3677, 0, 0, 0, '', 'Rescue at Sea requires The sunreavers'),
+(19, 0, 14140, 0, 0, 17, 3677, 0, 0, 0, '', 'Stop The Aggressors requires The sunreavers'),
+(19, 0, 14141, 0, 0, 17, 3677, 0, 0, 0, '', 'Gormok Wants His Snobolds requires The sunreavers'),
+(19, 0, 14142, 0, 0, 17, 3677, 0, 0, 0, '', 'You''ve Really Done It This Time, Kul requires The sunreavers'),
+(19, 0, 14143, 0, 0, 17, 3677, 0, 0, 0, '', 'A Leg Up requires The sunreavers'),
+(19, 0, 14144, 0, 0, 17, 3677, 0, 0, 0, '', 'The Light''s Mercy requires The sunreavers'),
+(19, 0, 14145, 0, 0, 17, 3677, 0, 0, 0, '', 'What Do You Feed a Yeti, Anyway? requires The sunreavers'),
+(20, 0, 14101, 0, 0, 17, 2817, 0, 0, 0, '', 'Drottinn Hrothgar requires crusader'),
+(20, 0, 14101, 0, 1, 17, 2816, 0, 0, 0, '', 'Drottinn Hrothgar requires crusader'),
+(20, 0, 14102, 0, 0, 17, 2817, 0, 0, 0, '', 'Mistcaller Yngvar requires crusader'),
+(20, 0, 14102, 0, 1, 17, 2816, 0, 0, 0, '', 'Mistcaller Yngvar requires crusader'),
+(20, 0, 14104, 0, 0, 17, 2817, 0, 0, 0, '', 'Ornolf The Scarred requires crusader'),
+(20, 0, 14104, 0, 1, 17, 2816, 0, 0, 0, '', 'Ornolf The Scarred requirescrusader'),
+(20, 0, 14105, 0, 0, 17, 2817, 0, 0, 0, '', 'Deathspeaker Kharos requires crusader'),
+(20, 0, 14105, 0, 1, 17, 2816, 0, 0, 0, '', 'Deathspeaker Kharos requires crusader'),
+(20, 0, 14107, 0, 0, 17, 2817, 0, 0, 0, '', 'The Fate Of The Fallen requires crusader'),
+(20, 0, 14107, 0, 1, 17, 2816, 0, 0, 0, '', 'The Fate Of The Fallen requires crusader'),
+(20, 0, 14108, 0, 0, 17, 2817, 0, 0, 0, '', 'Get Kraken requires crusader'),
+(20, 0, 14108, 0, 1, 17, 2816, 0, 0, 0, '', 'Get Kraken requires crusader'),
+(20, 0, 14074, 0, 0, 17, 3676, 0, 0, 0, '', 'A Leg Up requires A silver confident'),
+(20, 0, 14076, 0, 0, 17, 3676, 0, 0, 0, '', 'Breakfast Of Champions requires A silver confident'),
+(20, 0, 14077, 0, 0, 17, 3676, 0, 0, 0, '', 'The Light''s Mercy requires A silver confident'),
+(20, 0, 14080, 0, 0, 17, 3676, 0, 0, 0, '', 'Stop The Aggressors requires A silver confident'),
+(20, 0, 14090, 0, 0, 17, 3676, 0, 0, 0, '', 'Gormok Wants His Snobolds requires A silver confident'),
+(20, 0, 14096, 0, 0, 17, 3676, 0, 0, 0, '', 'You''ve Really Done It This Time, Kul requires A silver confident'),
+(20, 0, 14112, 0, 0, 17, 3676, 0, 0, 0, '', 'What Do You Feed a Yeti, Anyway? requires A silver confident'),
+(20, 0, 14152, 0, 0, 17, 3676, 0, 0, 0, '', 'Rescue at Sea requires A silver confident'),
+(20, 0, 14092, 0, 0, 17, 3677, 0, 0, 0, '', 'Breakfast Of Champions requires The sunreavers'),
+(20, 0, 14136, 0, 0, 17, 3677, 0, 0, 0, '', 'Rescue at Sea requires The sunreavers'),
+(20, 0, 14140, 0, 0, 17, 3677, 0, 0, 0, '', 'Stop The Aggressors requires The sunreavers'),
+(20, 0, 14141, 0, 0, 17, 3677, 0, 0, 0, '', 'Gormok Wants His Snobolds requires The sunreavers'),
+(20, 0, 14142, 0, 0, 17, 3677, 0, 0, 0, '', 'You''ve Really Done It This Time, Kul requires The sunreavers'),
+(20, 0, 14143, 0, 0, 17, 3677, 0, 0, 0, '', 'A Leg Up requires The sunreavers'),
+(20, 0, 14144, 0, 0, 17, 3677, 0, 0, 0, '', 'The Light''s Mercy requires The sunreavers'),
+(20, 0, 14145, 0, 0, 17, 3677, 0, 0, 0, '', 'What Do You Feed a Yeti, Anyway? arequires The sunreavers');
+
+-- conditions so quests which give aspirants seals can only be taken while player has upto the challenge
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `ConditionTypeOrReference`= 9 AND `SourceEntry` IN (13625,13666,13669,13670,13671,13673,13674,13675,13676,13677);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=20 AND `ConditionTypeOrReference`= 9 AND `SourceEntry` IN (13625,13666,13669,13670,13671,13673,13674,13675,13676,13677);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(19, 0, 13625, 0, 0, 9, 13672, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(19, 0, 13666, 0, 0, 9, 13672, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(19, 0, 13669, 0, 0, 9, 13672, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(19, 0, 13670, 0, 0, 9, 13672, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(19, 0, 13671, 0, 0, 9, 13672, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(19, 0, 13673, 0, 0, 9, 13678, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(19, 0, 13674, 0, 0, 9, 13678, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(19, 0, 13675, 0, 0, 9, 13678, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(19, 0, 13676, 0, 0, 9, 13678, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(19, 0, 13677, 0, 0, 9, 13678, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(20, 0, 13625, 0, 0, 9, 13672, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(20, 0, 13666, 0, 0, 9, 13672, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(20, 0, 13669, 0, 0, 9, 13672, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(20, 0, 13670, 0, 0, 9, 13672, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(20, 0, 13671, 0, 0, 9, 13672, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(20, 0, 13673, 0, 0, 9, 13678, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(20, 0, 13674, 0, 0, 9, 13678, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(20, 0, 13675, 0, 0, 9, 13678, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(20, 0, 13676, 0, 0, 9, 13678, 0, 0, 0, '', 'player needs to be on quest upto the challenge'),
+(20, 0, 13677, 0, 0, 9, 13678, 0, 0, 0, '', 'player needs to be on quest upto the challenge');
+
+-- quest pooling for sunreavers/silver covenant and crusader silverdawn dailys
+DELETE FROM `pool_quest` WHERE `pool_entry` IN (@Pool, @Pool+1, @Pool+2, @Pool+3, @Pool+4);
+INSERT INTO `pool_quest` (`entry`, `pool_entry`, `description`) VALUES
+(14074, @Pool, 'A Leg Up'),
+(14152, @Pool, 'Rescue at Sea'),
+(14080, @Pool, 'Stop The Aggressors'),
+(14077, @Pool, 'The Light''s Mercy'),
+(14076, @Pool+1, 'Breakfast of Champions'),
+(14090, @Pool+1, 'Gormok Wants His Snobolds'),
+(14112, @Pool+1, 'What Do You Feed a Yeti, Anyway?'),
+(14143, @Pool+2, 'A Leg Up'),
+(14136, @Pool+2, 'Rescue at Sea'),
+(14140, @Pool+2, 'Stop The Aggressors'),
+(14144, @Pool+2, 'The Light''s Mercy'),
+(14092, @Pool+3, 'Breakfast of Champions'),
+(14141, @Pool+3, 'Gormok Wants His Snobolds'),
+(14145, @Pool+3, 'What Do You Feed a Yeti, Anyway?'),
+(14108, @Pool+4, 'Crusader Silverdawn - Get Kraken'),
+(14107, @Pool+4, 'Crusader Silverdawn - The Fate of the Fallen');
+
+DELETE FROM `pool_template` WHERE `entry` IN (@Pool, @Pool+1, @Pool+2, @Pool+3, @Pool+4);
+INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
+(@Pool, 1, 'Narasi Snowdawn <The Silver Covenant> - Daily Quests'),
+(@Pool+1, 1, 'Savinia Loresong <The Silver Covenant> - Daily Quests'),
+(@Pool+2, 1, 'Girana the Blooded <The Sunreavers> - Daily Quests'),
+(@Pool+3, 1, 'Tylos Dawnrunner <The Sunreavers> - Daily Quests'),
+(@Pool+4, 1, 'Crusader Silverdawn Dailies');
diff --git a/sql/updates/world/2014_07_08_03_world_creature.sql b/sql/updates/world/2014_07_08_03_world_creature.sql
new file mode 100644
index 00000000000..b31f8be34c0
--- /dev/null
+++ b/sql/updates/world/2014_07_08_03_world_creature.sql
@@ -0,0 +1,5 @@
+--
+SET @CGUID := 43498;
+DELETE FROM `creature` WHERE id=37527;
+INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES
+(@CGUID, 37527, 530, 1, 1, 12559.3, -6783.323, 15.06894, 0.06981317, 120, 0, 0);
diff --git a/sql/updates/world/2014_07_08_04_world_creature.sql b/sql/updates/world/2014_07_08_04_world_creature.sql
new file mode 100644
index 00000000000..0b6fa9ec8e4
--- /dev/null
+++ b/sql/updates/world/2014_07_08_04_world_creature.sql
@@ -0,0 +1,11 @@
+--
+SET @CGUID := 43502;
+DELETE FROM `creature` WHERE `id`=14494;
+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, 14494, 0, 1, 1, 0, 0, 3325.180420 , -2997.122803, 164.205444, 5.663, 300, 0, 0, 3052, 0, 0, 0, 0, 0);
+
+UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 14494;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=14494;
+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
+(14494, 0, 0, 0,11, 0, 100, 0, 0, 0, 0, 0, 11, 32648, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Eris Havenfire - On Spawn - Cast Ancestor Invisibility');
diff --git a/sql/updates/world/2014_07_08_05_world_misc.sql b/sql/updates/world/2014_07_08_05_world_misc.sql
new file mode 100644
index 00000000000..ad16a1efc1d
--- /dev/null
+++ b/sql/updates/world/2014_07_08_05_world_misc.sql
@@ -0,0 +1,48 @@
+-- [Q] [H] Catch the Wild Wolpertinger!
+-- Alliance version already had this
+DELETE FROM `creature_queststarter` WHERE `id`=24657 AND `quest`=11431;
+INSERT INTO `creature_queststarter` (`id`,`quest`) VALUES (24657,11431);
+DELETE FROM `creature_questender` WHERE `id`=24657 AND `quest`=11431;
+INSERT INTO `creature_questender` (`id`,`quest`) VALUES (24657,11431);
+
+-- [Q] [A/H] Did Someone Say "Souvenir?" (removed in 2.4.3) & Say, There Wouldn't Happen to be a Souvenir This Year, Would There?
+DELETE FROM `creature_queststarter` WHERE `quest` IN (11321,11413,12193);
+DELETE FROM `creature_questender` WHERE `quest` IN (11321,11413);
+
+-- [Q] [A/H] Save Brewfest! should have pre-req Welcome to Brewfest!
+UPDATE `quest_template` SET `PrevQuestId`=11442 WHERE `id`=12318;
+
+-- [Q] [A/H] Save Brewfest! - removed in 2.4.3
+DELETE FROM `creature_queststarter` WHERE `quest`=12318;
+DELETE FROM `creature_questender` WHERE `quest`=12318;
+
+-- [Q] [A] Direbrew's Dire Brew - removed PrevQuestId in 2010
+-- Horde version already had this
+UPDATE `quest_template` SET `PrevQuestId`=0 WHERE `id`=12491;
+
+-- Misc.
+UPDATE `creature_template_addon` SET `auras`='43905' WHERE `entry`=23698; -- Drunken Brewfest Reveler
+UPDATE `creature_template` SET `AIName`='' WHERE `entry`=23698; -- Drunken Brewfest Reveler
+UPDATE `creature` SET `spawntimesecs`=450 WHERE `id`=24484; -- Brewfest Reveler had 12 hour respawntime ...
+
+-- Send a mail on quest complete "Brew of the Month Club" - there is no wait time so we won't use RewMailDelaySecs
+-- Alliance quest missed quest texts
+SET @MAIL_A := 209;
+SET @MAIL_H := 210;
+UPDATE `quest_template` SET `RewardMailTemplateId`=0 WHERE `id`=12278; -- old "Brew of the Month Club" quests
+UPDATE `quest_template` SET `RewardMailTemplateId`=0 WHERE `id`=12306; -- old "Brew of the Month Club" quests
+UPDATE `quest_template` SET `RewardMailTemplateId`=@MAIL_A,`OfferRewardText`="Your paperwork looks to be in order. Welcome to the club, $N!$B$BYou can expect to get our mail at the start of every month. If you like what you got, stop by and we can sell you some more. This is the club that keeps on giving.",`RequestItemsText`="Do you have your membership forms filled out?" WHERE `id`=12420;
+UPDATE `quest_template` SET `RewardMailTemplateId`=@MAIL_H WHERE `id`=12421;
+
+-- Ray'ma and Larkin were also finishing quest no longer available within the game.
+DELETE FROM `creature_questender` WHERE `quest` IN (12278,12306); -- old "Brew of the Month Club" quests
+DELETE FROM `creature_questender` WHERE `id`=27489 AND `quest`=12421;
+INSERT INTO `creature_questender` (`id`,`quest`) VALUES (27489,12421);
+
+-- Insert missing Wolpertinger's Tankard
+DELETE FROM `npc_vendor` WHERE `item`=32233;
+INSERT INTO `npc_vendor` (`entry`,`slot`,`item`,`maxcount`,`incrtime`,`ExtendedCost`) VALUES
+(23710,0,32233,0,0,0), -- Belbi Quikswitch
+(27478,0,32233,0,0,0), -- Larkin Thunderbrew
+(24495,0,32233,0,0,0), -- Blix Fixwidget
+(27489,0,32233,0,0,0); -- Ray'ma
diff --git a/sql/updates/world/2014_07_08_06_world_misc.sql b/sql/updates/world/2014_07_08_06_world_misc.sql
new file mode 100644
index 00000000000..dfbf6381dee
--- /dev/null
+++ b/sql/updates/world/2014_07_08_06_world_misc.sql
@@ -0,0 +1,14 @@
+-- Corporal Thund Splithoof SAI
+SET @ENTRY := 7750;
+SET @QUEST := 2701;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,0,20,0,100,0,@QUEST,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Corporal Thund Splithoof - On Quest Complete - Forced Despawn"),
+(@ENTRY,0,1,2,19,0,100,0,@QUEST,0,0,0,70,0,0,0,0,0,0,14,44733,141980,0,0,0,0,0,"Corporal Thund Splithoof - On Quest Accept - Respawn Spectral Lockbox (GO)"),
+(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,70,0,0,0,0,0,0,14,44732,141981,0,0,0,0,0,"Corporal Thund Splithoof - On Quest Accept - Respawn Spectral Lockbox Particles (GO)");
+
+UPDATE `conditions` SET `ConditionTypeOrReference`=28 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=840 AND `SourceEntry`=2 AND `SourceId`=0 AND `ElseGroup`=0 AND `ConditionTypeOrReference`=9 AND `ConditionTarget`=0 AND `ConditionValue1`=2702 AND `ConditionValue2`=0 AND `ConditionValue3`=0;
+
+-- Modifying condition for Gossip on Fallen Hero of the Horde to spawn Corporal Thund Splithoof so condition is met on condition 28 Quest complete instead of 9 quest taken
+-- reason for this change is that this quest is completed as soon as taken and condition taken is not met here as core sees the quest has complete as soon as it is taken by player
diff --git a/sql/updates/world/2014_07_08_07_world_quest_template.sql b/sql/updates/world/2014_07_08_07_world_quest_template.sql
new file mode 100644
index 00000000000..146d8d2d34f
--- /dev/null
+++ b/sql/updates/world/2014_07_08_07_world_quest_template.sql
@@ -0,0 +1,2 @@
+--
+UPDATE `quest_template` SET `RequestItemsText` = 'I was told a visitor from Quel''Thalas was coming. I was expecting a blood elf, to tell you the truth.$b$bWhat news do you bring?' WHERE `id` = 9812;
diff --git a/sql/updates/world/2014_07_08_08_world_quest_template.sql b/sql/updates/world/2014_07_08_08_world_quest_template.sql
new file mode 100644
index 00000000000..1f40994cefd
--- /dev/null
+++ b/sql/updates/world/2014_07_08_08_world_quest_template.sql
@@ -0,0 +1,2 @@
+--
+UPDATE `quest_template` SET `OfferRewardText` = '<Thrall begins to read the letter.>$b$bSo the blood elves finally took care of their little problem. It is no surprise that it took your help as well as that of an entire Forsaken regiment to get the job done.$b$b<The Warchief breaks into laughter.>$b$bI suppose there''s no stopping this. In the end we need them just as much as they need us.' WHERE `id` = 9813;
diff --git a/sql/updates/world/2014_07_08_09_world_misc.sql b/sql/updates/world/2014_07_08_09_world_misc.sql
new file mode 100644
index 00000000000..4600cb80847
--- /dev/null
+++ b/sql/updates/world/2014_07_08_09_world_misc.sql
@@ -0,0 +1,17 @@
+-- Darkweb Victim SAI
+-- To Fix 12037 Search and Rescue
+
+UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` =27909;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` =27909 and `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(2790900,2790901,2790902) and `source_type`=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
+(27909, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 42, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darkweb Victim - On Spawn - Set Invincibility Hp'),
+(27909, 0, 1, 0, 2, 0, 100, 1, 0, 1, 0, 0, 87, 2790900, 2790901, 2790902, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darkweb Victim - On 1% HP - Set Random script'),
+(2790900, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 49952, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darkweb Victim - Script 1 - Cast Summon Kurzel'),
+(2790900, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darkweb Victim - Script 1 - Die'),
+(2790901, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 49958, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darkweb Victim - Script 2 - Cast Summon Drakkari Shaman'),
+(2790901, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darkweb Victim - Script 2 - Die'),
+(2790902, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 49959, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darkweb Victim - Script 3 - Cast Summon Drakkari Guardian'),
+(2790902, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Darkweb Victim - Script 3 - Die');
diff --git a/sql/updates/world/2014_07_08_10_world_misc.sql b/sql/updates/world/2014_07_08_10_world_misc.sql
new file mode 100644
index 00000000000..5e055a61b15
--- /dev/null
+++ b/sql/updates/world/2014_07_08_10_world_misc.sql
@@ -0,0 +1,34 @@
+--
+DELETE FROM `creature_addon` WHERE `guid` IN(124405,124406);
+INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
+(124405, 0, 0, 0x10000, 0x1, 0, '27622'),
+(124406, 0, 0, 0x10000, 0x1, 0, '27622');
+
+-- Instructor Hroegar
+DELETE FROM `creature_template_addon` WHERE `entry`=29915;
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(29915,0,0,1,0, '56058');
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(-124405,-124406);
+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
+(-124406, 0, 0, 0, 1, 0, 100, 0, 5000, 5000, 5000, 5000, 11, 55796, 2, 0, 0, 0, 0, 19, 30056, 0, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) - On Respawn - Cast Get the Key: Vaelens Chains - Left Hand'),
+(-124405, 0, 0, 0, 1, 0, 100, 0, 5000, 5000, 5000, 5000, 11, 54112, 2, 0, 0, 0, 0, 19, 30056, 0, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny (scale x0.01) - On Respawn - Cast Get the Key: Vaelens Chains - Right Hand');
+
+UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`IN(30056,29915);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN(30056,29915);
+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
+(30056, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 11, 27622, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Vaelen the Flayed - On Reset - Cast Get the Key: Vaelens Invisibility & See Invisibility');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN(55796,54112);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 55796, 0, 0, 31, 0, 3, 30056, 0, 0, 0, 0, '', ''),
+(13, 1, 54112, 0, 0, 31, 0, 3, 30056, 0, 0, 0, 0, '', '');
+
+DELETE FROM `spell_area` WHERE `spell`IN(27105,56057) AND `area` IN(4492,4497);
+INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`, `quest_start_status`, `quest_end_status`) VALUES
+(27105, 4492, 0, 12951, 0, 0, 2, 1, 64, 11), -- Ufrang's Hall: See Vaelen's Invisibility
+(56057, 4497, 0, 12949, 0, 0, 2, 1, 64, 11); -- Savage Ledge: See Instructor Hroegar's Invisibility
+
+DELETE FROM `creature_loot_template` WHERE `entry`=29915 AND `item`=41843;
+INSERT INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
+(29915, 41843, -100, 1, 0, 1, 1); -- Key to Vaelen's Chains
diff --git a/sql/updates/world/2014_07_08_11_world_misc.sql b/sql/updates/world/2014_07_08_11_world_misc.sql
new file mode 100644
index 00000000000..357d1b6ac94
--- /dev/null
+++ b/sql/updates/world/2014_07_08_11_world_misc.sql
@@ -0,0 +1,53 @@
+-- Eredar Soul eater
+
+SET @SOULEATER := 20879;
+SET @SOULEATERHC := 21595;
+SET @GUID := 52355; -- TC Unused GUID search tool
+SET @POOL := 368;
+
+UPDATE `creature_template` SET `spell1` = 0, `spell2` = 0, `spell3` = 0, `AIName` = 'SmartAI' WHERE `entry` = @SOULEATER;
+UPDATE `creature_template` SET `spell1` = 0, `spell2` = 0, `spell3` = 0 WHERE `entry` = @SOULEATERHC;
+
+-- Eredar Soul Eater SAI // not sure how to implement behaviour for spell:36778(SOUL STEAL)
+DELETE FROM `smart_scripts` WHERE (`entryorguid`=@SOULEATER 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
+(@SOULEATER, 0, 0, 0, 1, 0, 100, 0, 0, 0, 0, 0, 11, 36784, 0, 0, 0, 0, 0, 17, 0, 100, 0, 0, 0, 0, 0, "Eredar Soul Eater - At Range - Cast Entropic Aura"),
+(@SOULEATER, 0, 1, 0, 0, 0, 100, 0, 6000, 12000, 30000, 30000, 11, 36786, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, "Eredar Soul Eater - In Combat - Cast Soul Chill");
+
+-- Creature location for Eredar Soul Eater
+DELETE FROM `linked_respawn` WHERE `guid` = 86053;
+DELETE FROM `creature` WHERE `guid` IN (@GUID, @GUID+1) OR id = @SOULEATER;
+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
+(@GUID, @SOULEATER, 552, 3, 1, 19950, 0, 280.787, 145.315, 22.22593, 0.005122, 7200, 0, 0, 39123, 12620, 0, 0, 0, 8),
+(@GUID+1, @SOULEATER, 552, 3, 1, 19950, 0, 307.477, 150.934, 24.85841, 3.959065, 7200, 0, 0, 39123, 12620, 0, 0, 0, 8);
+
+
+-- Creature Loot for Eredar Soul Eater
+DELETE FROM `creature_loot_template` WHERE `entry`=@SOULEATER;
+INSERT INTO `creature_loot_template` VALUES
+(@SOULEATER, 30809, 70, 1, 0, 1, 1),
+(@SOULEATER, 21877, 39, 1, 0, 2, 3),
+(@SOULEATER, 32902, 11, 1, 0, 1, 2),
+(@SOULEATER, 27854, 7, 1, 0, 1, 1),
+(@SOULEATER, 29740, 5, 1, 0, 1, 1),
+(@SOULEATER, 27860, 1.8, 1, 0, 1, 1);
+
+-- Creature Pickpocketing Loot for Eredar Soul Eater
+DELETE FROM `pickpocketing_loot_template` WHERE (`entry`=@SOULEATER);
+INSERT INTO `pickpocketing_loot_template` VALUES
+(@SOULEATER, 29570, 67, 1, 0, 1, 1),
+(@SOULEATER, 29569, 42, 1, 0, 1, 1),
+(@SOULEATER, 27855, 25, 1, 0, 1, 1),
+(@SOULEATER, 22829, 17, 1, 0, 1, 1),
+(@SOULEATER, 27854, 8, 1, 0, 1, 1);
+
+-- Pool_template for Eredar Soul Eater Spawns
+DELETE FROM `pool_template` WHERE entry = @POOL;
+INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
+(@POOL, 2, 'Eredar Soul-Eater');
+
+-- Pool_creature for Eredar Soul Eater Spawns
+DELETE FROM `pool_creature` WHERE guid IN (@GUID, @GUID+1);
+INSERT INTO `pool_creature` (`guid`, `pool_entry`, `chance`, `description`) VALUES
+(@GUID, @POOL, 0, 'Eredar Soul-Eater - Spawn 1'),
+(@GUID+1, @POOL, 0, 'Eredar Soul-Eater - Spawn 2');
diff --git a/sql/updates/world/2014_07_09_00_world_misc.sql b/sql/updates/world/2014_07_09_00_world_misc.sql
new file mode 100644
index 00000000000..4fb7fa99dcc
--- /dev/null
+++ b/sql/updates/world/2014_07_09_00_world_misc.sql
@@ -0,0 +1,18 @@
+-- Chromie -- at start of CoS
+SET @SPELL_TRIGGER := 53435; -- Teleport to CoT Stratholme Phase 4
+SET @SPELL_EFFECT := 53436; -- Teleport to CoT Stratholme Phase 4
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` = 11277 or `menu_id` = 9586 and `id` = 2;
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES
+(9586, 2, 0, 'Chromie, you and I both know what\'s going to happen in this time stream. We\'ve seen this all before. Can you just skip us ahead to all the real action?', 39667, 1, 1, 11277, 0, 0, 0, '', 0),
+(11277, 0, 0, 'Yes, please!', 32024, 1, 1, 0, 0, 0, 0, '', 0);
+
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=@SPELL_TRIGGER;
+INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
+(@SPELL_TRIGGER,@SPELL_EFFECT,1,'Teleport to CoT Stratholme Phase 4');
+
+DELETE FROM `spell_target_position` WHERE `id`=@SPELL_EFFECT;
+INSERT INTO `spell_target_position` (`id`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES
+(@SPELL_EFFECT,595,2071.55,1287.68,141.687,0);
+
+UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=18338;
diff --git a/sql/updates/world/2014_07_09_01_world_creature.sql b/sql/updates/world/2014_07_09_01_world_creature.sql
new file mode 100644
index 00000000000..a66cd896383
--- /dev/null
+++ b/sql/updates/world/2014_07_09_01_world_creature.sql
@@ -0,0 +1 @@
+UPDATE `creature` SET `modelid`=0 WHERE `id`=10262;
diff --git a/sql/updates/world/2014_07_09_02_world_creature_template_addon.sql b/sql/updates/world/2014_07_09_02_world_creature_template_addon.sql
new file mode 100644
index 00000000000..801eb08e306
--- /dev/null
+++ b/sql/updates/world/2014_07_09_02_world_creature_template_addon.sql
@@ -0,0 +1,7 @@
+DELETE FROM `creature_addon` WHERE `guid` IN (SELECT guid FROM `creature` WHERE `id` = 684);
+DELETE FROM `creature_template_addon` WHERE `entry` IN (21337,636,684);
+
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
+(21337, 0, 0, 131072, 1, 0, '5916 30982'),
+(636, 0, 0, 131072, 1, 0, '6408'),
+(684, 0, 0, 131072, 1, 0, '22766');
diff --git a/sql/updates/world/2014_07_09_03_world_command.sql b/sql/updates/world/2014_07_09_03_world_command.sql
new file mode 100644
index 00000000000..6ffac8a631a
--- /dev/null
+++ b/sql/updates/world/2014_07_09_03_world_command.sql
@@ -0,0 +1,3 @@
+DELETE FROM `command` WHERE `name` LIKE 'reload battleground_template';
+INSERT INTO `command` (`name`, `permission`, `help`) VALUES
+('reload battleground_template', 631, 'Syntax: .reload battleground_template\r\nReload Battleground Templates.');
diff --git a/sql/updates/world/2014_07_09_04_world_quest_template.sql b/sql/updates/world/2014_07_09_04_world_quest_template.sql
new file mode 100644
index 00000000000..d9fb0a988a6
--- /dev/null
+++ b/sql/updates/world/2014_07_09_04_world_quest_template.sql
@@ -0,0 +1,12 @@
+--
+UPDATE `quest_template` SET `NextQuestId`=13722 WHERE `Id` =13696;
+UPDATE `quest_template` SET `NextQuestId`=13593 WHERE `Id` =13593;
+-- The below is to fix the alliance chain, horde chain works fine with above 2 changes, but http://www.wowhead.com/quest=13593
+-- Valiant Of Stormwind had `NextQuestIdChain` set to http://www.wowhead.com/quest=13722 The Valiant's Charge which is
+-- Horde (Bloodelf) quest, wowhead says quest is horde but wrongly says it grants stormwind rep too so maybe someone got this wrong
+-- whole chain worked fine for humans but for non-humans chain would break after turning in http://www.wowhead.com/quest=13593 as
+-- http://www.wowhead.com/quest=13718 would never be offered to non humans once they picked to champion stormwind after doing own faction
+
+-- Basically the non human quest for starting stormwind chain had nextquestchainid pointing to horde quest and thats what
+-- was breaking it for alliance.
+UPDATE `quest_template` SET `NextQuestIdChain`=13718 WHERE `Id`=13593;
diff --git a/sql/updates/world/2014_07_09_05_world_gameobject_template.sql b/sql/updates/world/2014_07_09_05_world_gameobject_template.sql
new file mode 100644
index 00000000000..497d7a4b42b
--- /dev/null
+++ b/sql/updates/world/2014_07_09_05_world_gameobject_template.sql
@@ -0,0 +1,2 @@
+-- Template updates for gameobject 1721 (Locked ball and chain)
+UPDATE `gameobject_template` SET `flags`=`flags`|4 WHERE `entry`=1721;
diff --git a/sql/updates/world/2014_07_09_06_world_misc.sql b/sql/updates/world/2014_07_09_06_world_misc.sql
new file mode 100644
index 00000000000..add24e16e9b
--- /dev/null
+++ b/sql/updates/world/2014_07_09_06_world_misc.sql
@@ -0,0 +1,16 @@
+--
+UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry`=19823;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=19823 AND `source_type`=0;
+INSERT INTO `smart_scripts` VALUES
+(19823,0,0,0,6,0,100,0,0,0,0,0,33,22051,0,0,0,0,0,16,0,0,0,0,0,0,0,'Crazed Colossus - On Death - Quest Credit');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=19823;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(22,1,19823,0,0,1,0,38224,0,0,0,0,0,'','Execute only if invoker has equipped Enchanted Illidari Tabard');
+
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=38224;
+INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
+(38224, 38225, 2, 'Illidari Agent Illusion - Illidari Disguise (Male)');
+
+UPDATE `quest_template` SET `NextQuestId`=13718 WHERE `Id` =13593;
diff --git a/sql/updates/world/2014_07_09_07_world_misc.sql b/sql/updates/world/2014_07_09_07_world_misc.sql
new file mode 100644
index 00000000000..b42a34a38d3
--- /dev/null
+++ b/sql/updates/world/2014_07_09_07_world_misc.sql
@@ -0,0 +1,28 @@
+--
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=49859;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17, 0, 49859, 0, 0, 31, 1, 3, 23725, 0, 0, 0, 0, '', NULL);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=43546;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 43546, 0, 0, 31, 0, 3, 24336, 0, 0, 0, 0, '', 'Runed Orb Targets Orb Target');
+
+UPDATE `creature` SET `MovementType`=0 WHERE `guid` IN (97715,97748);
+
+UPDATE `creature_template` SET AIName='SmartAI' WHERE `entry`=24335;
+DELETE FROM `smart_scripts` WHERE (`entryorguid`=24335 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
+(24335, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 11, 43546, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Runed Orb - On Spawn - Cast Runed Orb");
+
+UPDATE `creature_template` SET AIName='SmartAI' WHERE `entry`=23725;
+DELETE FROM `smart_scripts` WHERE (`entryorguid`=23725 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
+(23725, 0, 0, 1, 8, 0, 100, 0, 49859, 0, 0, 0, 11, 43564, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Stone Giant - On Spellhit - Cast Captive Stone Giant Kill Credit"),
+(23725, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Stone Giant - On Spellhit - Evade");
+
+UPDATE `creature_template` SET AIName='SmartAI' WHERE `entry`=24345;
+DELETE FROM `smart_scripts` WHERE (`entryorguid`=24345 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
+(24345, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 11, 43312, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Captive Stone Giant - On Spawn - Cast Elemental Prison (Cosmetic)");
+
+UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=24336;
diff --git a/sql/updates/world/2014_07_09_08_world_misc.sql b/sql/updates/world/2014_07_09_08_world_misc.sql
new file mode 100644
index 00000000000..d82b011bbae
--- /dev/null
+++ b/sql/updates/world/2014_07_09_08_world_misc.sql
@@ -0,0 +1,7 @@
+-- Grimtotem Spirit-Shifter
+SET @ENTRY := 23593;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,1,0,0,100,0,0,0,30000,45000,11,43110,0,0,0,0,0,1,0,0,0,5,0,0,0,'Grimtotem Spirit-Shifter - IC - Cast Summon Spirit Wolf'),
+(@ENTRY,0,2,0,0,0,100,0,2000,3000,12000,13000,11,11824,0,0,0,0,0,2,0,0,0,0,0,0,0,'Grimtotem Spirit-Shifter IC - Cast Shock');
diff --git a/sql/updates/world/2014_07_10_00_world_misc.sql b/sql/updates/world/2014_07_10_00_world_misc.sql
new file mode 100644
index 00000000000..9422bfced0a
--- /dev/null
+++ b/sql/updates/world/2014_07_10_00_world_misc.sql
@@ -0,0 +1,2 @@
+UPDATE `creature` SET `spawndist`=0 WHERE `id` IN (24335,24336);
+UPDATE `smart_scripts` SET `action_type`=85,`action_param1`=38228,`action_param2`=1 WHERE `entryorguid`=19823 AND `source_type`=0 AND `id`=0;
diff --git a/sql/updates/world/2014_07_10_01_world_misc.sql b/sql/updates/world/2014_07_10_01_world_misc.sql
new file mode 100644
index 00000000000..040e3f54909
--- /dev/null
+++ b/sql/updates/world/2014_07_10_01_world_misc.sql
@@ -0,0 +1,3 @@
+--
+UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=23593 AND `source_type`=0 AND `id`=0;
+UPDATE `smart_scripts` SET `id`=1 WHERE `entryorguid`=23593 AND `source_type`=0 AND `id`=2;
diff --git a/sql/updates/world/2014_07_12_00_world_misc.sql b/sql/updates/world/2014_07_12_00_world_misc.sql
new file mode 100644
index 00000000000..18de044cf2e
--- /dev/null
+++ b/sql/updates/world/2014_07_12_00_world_misc.sql
@@ -0,0 +1,14 @@
+--
+DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=24992;
+INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
+(24992, 45008, 0, 0);
+
+UPDATE `creature_template` SET `npcflag`=16777216 WHERE `entry`=24992;
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=45008;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 45008, 0, 0, 31, 0, 3, 24914, 0, 0, 0, 0, '', 'Spell Cannon Assault targets Sorlof');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18 AND `SourceGroup`=24992;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(18, 24992, 45008, 0, 0, 9, 0, 11529, 0, 0, 0, 0, 0, '', 'Required quest active for spellclick');
diff --git a/sql/updates/world/2014_07_12_01_world_misc.sql b/sql/updates/world/2014_07_12_01_world_misc.sql
new file mode 100644
index 00000000000..5b641280e22
--- /dev/null
+++ b/sql/updates/world/2014_07_12_01_world_misc.sql
@@ -0,0 +1,21 @@
+DELETE FROM `smart_scripts` WHERE `entryorguid`=2755 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
+(2755, 0, 0, 0, 0, 0, 100, 0, 5000, 5000, 10000, 15000, 11, 4938, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Myzrael - In Combat - Cast Myzrael Earthquake'),
+(2755, 0, 1, 0, 2, 0, 100, 0, 0, 75, 60000, 90000, 11, 10388, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Myzrael - At 75% Hp - Cast Summon Prismatic Exile'),
+(2755, 0, 2, 0, 2, 0, 100, 0, 0, 50, 60000, 90000, 11, 10388, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Myzrael - At 50% Hp - Cast Summon Prismatic Exile'),
+(2755, 0, 3, 0, 2, 0, 100, 0, 0, 25, 60000, 90000, 11, 4937, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Myzrael - At 25% Hp - Cast Summon Prismatic Exiles'),
+(2755, 0, 4, 5, 54, 0, 100, 1, 0, 0, 0, 0, 1, 0, 5000, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 'Myzrael - On Spawn - Say 0'),
+(2755, 0, 5, 0, 61, 0, 100, 1, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 'Myzrael - Linked with Previous event - Store Targetlist'),
+
+(2755, 0, 6, 0, 52, 0, 100, 1, 0, 2755, 0, 0, 1, 1, 5000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Myzrael - On Text Over Line 0 - Say Line 1'),
+(2755, 0, 7, 8, 52, 0, 100, 1, 1, 2755, 0, 0, 1, 2, 5000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Myzrael - On Text Over Line 1 - Say Line 2'),
+(2755, 0, 8, 0, 61, 0, 100, 1, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 50, 0, 0, 0, 0, 0, 0, 'Myzrael - Linked with Previous event - Attack');
+
+DELETE FROM `creature_text` WHERE `entry`=2755;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(2755, 0, 0, 'What? $n, you served me well, but...', 12, 0, 0, 0, 0, 0, 'Myzrael', 842),
+(2755, 1, 0, 'Why have you summoned me so soon? I haven''t yet reached my full power!', 12, 0, 0, 0, 0, 0, 'Myzrael', 843),
+(2755, 2, 0, 'No matter. You were a fool to help me, and now you will pay!', 12, 0, 0, 0, 0, 0, 'Myzrael', 844);
+
+-- Myzreal is only meant to spawn for 10 mins
+UPDATE `event_scripts` SET `datalong2`=600000 WHERE `id`=420;
diff --git a/sql/updates/world/2014_07_13_00_world_misc.sql b/sql/updates/world/2014_07_13_00_world_misc.sql
new file mode 100644
index 00000000000..3529596d344
--- /dev/null
+++ b/sql/updates/world/2014_07_13_00_world_misc.sql
@@ -0,0 +1,6 @@
+--
+SET @OGUID := 5414;
+
+DELETE FROM `gameobject` WHERE `guid` = @OGUID;
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@OGUID, 179345, 369, 1, 1, 57.43581, 1206.985, -121.5893, -2.652894, 0, 0, 0, 1, 7200, 255, 1);
diff --git a/sql/updates/world/2014_07_13_01_world_misc.sql b/sql/updates/world/2014_07_13_01_world_misc.sql
new file mode 100644
index 00000000000..2e0b0f56ccf
--- /dev/null
+++ b/sql/updates/world/2014_07_13_01_world_misc.sql
@@ -0,0 +1,40 @@
+--
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN(13,17) AND `SourceEntry`=28268;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17, 0, 48268, 0, 0, 36, 1, 0, 0, 0, 1, 0, 0, '', 'Target needs to be dead'),
+(17, 0, 48268, 0, 0, 31, 1, 3, 27202, 0, 0, 0, 0, '', 'Target needs to be Onslaught Raven Priest'),
+(17, 0, 48268, 0, 1, 36, 1, 0, 0, 0, 1, 0, 0, '', 'Target needs to be dead'),
+(17, 0, 48268, 0, 1, 31, 1, 3, 27203, 0, 0, 0, 0, '', 'Target needs to be Onslaught Footman'),
+(17, 0, 48268, 0, 2, 36, 1, 0, 0, 0, 1, 0, 0, '', 'Target needs to be dead'),
+(17, 0, 48268, 0, 2, 31, 1, 3, 27206, 0, 0, 0, 0, '', 'Target needs to be Onslaught Knight'),
+(17, 0, 48268, 0, 3, 36, 1, 0, 0, 0, 1, 0, 0, '', 'Target needs to be dead'),
+(17, 0, 48268, 0, 3, 31, 1, 3, 27207, 0, 0, 0, 0, '', 'Target needs to be Onslaught Workman'),
+(17, 0, 48268, 0, 4, 36, 1, 0, 0, 0, 1, 0, 0, '', 'Target needs to be dead'),
+(17, 0, 48268, 0, 4, 31, 1, 3, 27211, 0, 0, 0, 0, '', 'Target needs to be Onslaught Executioner'),
+(13, 1, 48268, 0, 0, 31, 1, 3, 27202, 0, 0, 0, 0, '', 'Target needs to be Onslaught Raven Priest'),
+(13, 1, 48268, 0, 1, 31, 1, 3, 27203, 0, 0, 0, 0, '', 'Target needs to be Onslaught Footman'),
+(13, 1, 48268, 0, 2, 31, 1, 3, 27206, 0, 0, 0, 0, '', 'Target needs to be Onslaught Knight'),
+(13, 1, 48268, 0, 3, 31, 1, 3, 27207, 0, 0, 0, 0, '', 'Target needs to be Onslaught Workman'),
+(13, 1, 48268, 0, 4, 31, 1, 3, 27211, 0, 0, 0, 0, '', 'Target needs to be Onslaught Executioner');
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=27202 AND `source_type`=0 AND `id`=13;
+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 #
+(27202, 0, 13, 0, 8, 0, 100, 0, 48268, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Onslaught Raven Priest - On Spellhit Despawn');
+-- Onslaught footman had ai set to smartai but there was no existing sai in db
+DELETE FROM `smart_scripts` WHERE `entryorguid`=27203 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 #
+(27203, 0, 0, 0, 8, 0, 100, 0, 48268, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Onslaught Footman - On Spellhit Despawn');
+DELETE FROM `smart_scripts` WHERE `entryorguid`=27206 AND `source_type`=0 AND `id`=1;
+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 #
+(27206, 0, 1, 0, 8, 0, 100, 0, 48268, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Onslaught Knight - On Spellhit Despawn');
+DELETE FROM `smart_scripts` WHERE `entryorguid`=27207 AND `source_type`=0 AND `id`=1;
+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 #
+(27207, 0, 1, 0, 8, 0, 100, 0, 48268, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Onslaught Workman - On Spellhit Despawn');
+DELETE FROM `smart_scripts` WHERE `entryorguid`=27211 AND `source_type`=0 AND `id`=2;
+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 #
+(27211, 0, 2, 0, 8, 0, 100, 0, 48268, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Onslaught Executioner - On Spellhit Despawn');
+
+-- Summon Rats
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=48268;
+INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
+(48268, 48272, 0, 'Let Them Not Rise!: Summon Rat');
diff --git a/sql/updates/world/2014_07_13_02_world_misc.sql b/sql/updates/world/2014_07_13_02_world_misc.sql
new file mode 100644
index 00000000000..51dfb365d08
--- /dev/null
+++ b/sql/updates/world/2014_07_13_02_world_misc.sql
@@ -0,0 +1,73 @@
+--
+SET @GHOST := 85732;
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=6492;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (6492, 649200);
+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
+(6492, 0, 1, 2, 8, 0, 100, 0, 9095, 0, 0, 0, 28, 34426, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - On Spellhit - Remove Aura'),
+(6492, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 28, 9095, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - On Spellhit - Remove Aura'),
+(6492, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 11, 9096, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - On Spellhit - Cast Rift Spawn Manifestation'),
+(6492, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - On Spellhit - Attack ActionInvoker'),
+(6492, 0, 5, 6, 11, 0, 100, 0, 0, 0, 0, 0, 11, 34426, 19, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - on spawn - add aura'),
+(6492, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 19, 33685508, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - On spawn - remove Flag'),
+(6492, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 2, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - on spawn - set faction'),
+(6492, 0, 8, 0, 61, 0, 100, 0, 0, 0, 0, 0, 42, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - on Spawn - Set Invincible HP'),
+(6492, 0, 9, 0, 25, 0, 100, 0, 0, 0, 0, 0, 11, 34426, 19, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - on reset - add aura'),
+(6492, 0, 10, 11, 2, 0, 100, 1, 0, 1, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - on 1% Hp - set faction'),
+(6492, 0, 11, 12, 61, 0, 100, 0, 0, 0, 0, 0, 18, 33685508, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - on 1% HP - add flag'),
+(6492, 0, 12, 13, 61, 0, 100, 0, 0, 0, 0, 0, 11, 9032, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - On On 1% HP - Cast Self Stun - 30 seconds'),
+(6492, 0, 13, 14, 61, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - On 1% HP - Set Phase 2'),
+(6492, 0, 14, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 31000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - On 1% HP - despawn'),
+(6492, 0, 15, 16, 38, 0, 100, 0, 1, 1, 0, 0, 12, 23837, 1, 15000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - on data 1|1 - Spawn ELM General Purpose Bunny'),
+(6492, 0, 16, 0, 61, 0, 100, 0, 0, 0, 0, 0, 45, 32, 32, 0, 0, 0, 0, 19, 23837, 0, 0, 0, 0, 0, 0, 'Rift Spawn - On 1% HP - Set Data ELM General Purpose Bunny'),
+(6492, 0, 17, 0, 38, 0, 100, 0, 2, 2, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - on data 2|2 - Set Invisible'),
+(6492, 0, 18, 19, 25, 0, 100, 0, 0, 0, 0, 0, 2, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - on reset - set faction'),
+(6492, 0, 19, 0, 61, 0, 100, 0, 0, 0, 0, 0, 19, 33685508, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - on reset - remove aura'),
+(6492, 0, 20, 0, 4, 0, 100, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - On Aggro - Say Line 0'),
+(6492, 0, 21, 0, 7, 2, 100, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rift Spawn - On Evade (Phase 2) - Say line 1');
+
+DELETE FROM `creature_text` WHERE `entry`=6492;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(6492, 0, 0, '%s is angered and attacks!', 16, 0, 100, 0, 0, 0, 'Rift Spawn', 3074),
+(6492, 1, 0, '%s escapes into the void!', 16, 0, 100, 0, 0, 0, 'Rift Spawn', 2564);
+
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=122088;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (122088, 12208800);
+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
+(122088, 1, 0, 0, 1, 0, 100, 1, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 6492, 1, 0, 0, 0, 0, 0, 'Containment Coffer - On reset - Set data to Rift Spawn'),
+(122088, 1, 1, 0, 1, 0, 100, 1, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 6492, 1, 0, 0, 0, 0, 0, 'Containment Coffer - On reset - Set data to Rift Spawn'),
+(122088, 1, 2, 0, 1, 0, 100, 1, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Containment Coffer - On reset - activate self'),
+(122088, 1, 3, 0, 1, 0, 100, 1, 4000, 4000, 4000, 4000, 44, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Containment Coffer - On reset - set phasemask');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=6492;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(22, 16, 6492, 0, 0, 38, 1, 1, 4, 0, 0, 0, 0, '', 'Rift Spawn - Only run SAI if Rift Spawn hp at 1% or lower'),
+(22, 18, 6492, 0, 0, 38, 1, 1, 4, 0, 0, 0, 0, '', 'Rift Spawn - Only run SAI if Rift Spawn hp at 1% or lower'),
+(22, 16, 6492, 0, 0, 1, 1, 9032, 0, 0, 0, 0, 0, '', 'Rift Spawn - Only run SAI if Rift Spawn is stuned'),
+(22, 18, 6492, 0, 0, 1, 1, 9032, 0, 0, 0, 0, 0, '', 'Rift Spawn - Only run SAI if Rift Spawn is stuned');
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=23837 AND `source_type`=0 AND `id`=2;
+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
+(23837, 0, 2, 0, 38, 0, 100, 1, 32, 32, 0, 0, 11, 9010, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'ELM General Purpose Bunny - On Data Set - Cast Create Filled Containment Coffer');
+
+DELETE FROM `disables` WHERE `sourceType`=0 AND `entry`=9095;
+INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES
+(0, 9095, 64, '', '', 'Ignore LOS on Cantation of Manifestation');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=9082;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17, 0, 9082, 0, 0, 29, 0, 6492, 10, 0, 0, 0, 0, '', 'Create Containment Coffer can only be cast if there is rift spawn near');
+
+DELETE FROM `creature` WHERE `id`=6492 AND `guid` BETWEEN @GHOST AND @GHOST+7;
+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
+-- Undercity
+(@GHOST, 6492, 0, 1, 1, 0, 0, 1414.51, 365.095, -66.0066, 4.99293, 300, 0, 0, 386, 0, 0, 0, 0, 0),
+(@GHOST+1, 6492, 0, 1, 1, 0, 0, 1406.47, 369.853, -66.0231, 5.29334, 300, 0, 0, 356, 0, 0, 0, 0, 0),
+(@GHOST+2, 6492, 0, 1, 1, 0, 0, 1400.28, 366.915, -66.0388, 5.57844, 300, 0, 0, 386, 0, 0, 0, 0, 0),
+(@GHOST+3, 6492, 0, 1, 1, 0, 0, 1399.22, 362.385, -66.0382, 5.77244, 300, 0, 0, 386, 0, 0, 0, 0, 0),
+-- Stormwind (Quest removed on cata, no sniffs)
+(@GHOST+4, 6492, 0, 1, 1, 0, 0, -9090.36, 838.109, 115.667, 0.231248, 300, 0, 0, 356, 0, 0, 0, 0, 0),
+(@GHOST+5, 6492, 0, 1, 1, 0, 0, -9081.7, 817.472, 115.667, 0.394612, 300, 0, 0, 386, 0, 0, 0, 0, 0),
+(@GHOST+6, 6492, 0, 1, 1, 0, 0, -9090.38, 818.76, 115.667, 0.456658, 300, 0, 0, 386, 0, 0, 0, 0, 0),
+(@GHOST+7, 6492, 0, 1, 1, 0, 0, -9094.42, 828.962, 115.667, 0.270519, 300, 0, 0, 386, 0, 0, 0, 0, 0);
diff --git a/sql/updates/world/2014_07_13_03_world_misc.sql b/sql/updates/world/2014_07_13_03_world_misc.sql
new file mode 100644
index 00000000000..94cd1f2bff3
--- /dev/null
+++ b/sql/updates/world/2014_07_13_03_world_misc.sql
@@ -0,0 +1,2 @@
+--
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN( 13) AND `SourceEntry`=48268;
diff --git a/src/server/game/Accounts/RBAC.h b/src/server/game/Accounts/RBAC.h
index 9ce1f9bb67a..f2637a5febc 100644
--- a/src/server/game/Accounts/RBAC.h
+++ b/src/server/game/Accounts/RBAC.h
@@ -534,7 +534,7 @@ enum RBACPermissions
RBAC_PERM_COMMAND_RELOAD_COMMAND = 628,
RBAC_PERM_COMMAND_RELOAD_CONDITIONS = 629,
RBAC_PERM_COMMAND_RELOAD_CONFIG = 630,
- RBAC_PERM_UNUSED_631 = 631, // unused
+ RBAC_PERM_COMMAND_RELOAD_BATTLEGROUND_TEMPLATE = 631,
RBAC_PERM_UNUSED_632 = 632, // unused
RBAC_PERM_COMMAND_RELOAD_CREATURE_LINKED_RESPAWN = 633,
RBAC_PERM_COMMAND_RELOAD_CREATURE_LOOT_TEMPLATE = 634,
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
index 41539b9cda6..b16ac1e84de 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
@@ -683,9 +683,9 @@ void BattlefieldWG::PromotePlayer(Player* killer)
if (!m_isActive)
return;
// Updating rank of player
- if (Aura* aur = killer->GetAura(SPELL_RECRUIT))
+ if (Aura* auraRecruit = killer->GetAura(SPELL_RECRUIT))
{
- if (aur->GetStackAmount() >= 5)
+ if (auraRecruit->GetStackAmount() >= 5)
{
killer->RemoveAura(SPELL_RECRUIT);
killer->CastSpell(killer, SPELL_CORPORAL, true);
@@ -694,9 +694,9 @@ void BattlefieldWG::PromotePlayer(Player* killer)
else
killer->CastSpell(killer, SPELL_RECRUIT, true);
}
- else if (Aura* aur = killer->GetAura(SPELL_CORPORAL))
+ else if (Aura* auraCorporal = killer->GetAura(SPELL_CORPORAL))
{
- if (aur->GetStackAmount() >= 5)
+ if (auraCorporal->GetStackAmount() >= 5)
{
killer->RemoveAura(SPELL_CORPORAL);
killer->CastSpell(killer, SPELL_LIEUTENANT, true);
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h
index 3a64458c48b..c01e6eb22ee 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.h
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h
@@ -1277,10 +1277,10 @@ struct BfWGGameObjectBuilding
for (uint8 i = 0; i < AttackTowers[towerid - 4].nbObject; i++)
{
WintergraspObjectPositionData gobData = AttackTowers[towerid - 4].GameObject[i];
- if (GameObject* go = m_WG->SpawnGameObject(gobData.entryHorde, gobData.x, gobData.y, gobData.z, gobData.o))
- m_GameObjectList[TEAM_HORDE].insert(go->GetGUID());
- if (GameObject* go = m_WG->SpawnGameObject(gobData.entryAlliance, gobData.x, gobData.y, gobData.z, gobData.o))
- m_GameObjectList[TEAM_ALLIANCE].insert(go->GetGUID());
+ if (GameObject* goHorde = m_WG->SpawnGameObject(gobData.entryHorde, gobData.x, gobData.y, gobData.z, gobData.o))
+ m_GameObjectList[TEAM_HORDE].insert(goHorde->GetGUID());
+ if (GameObject* goAlliance = m_WG->SpawnGameObject(gobData.entryAlliance, gobData.x, gobData.y, gobData.z, gobData.o))
+ m_GameObjectList[TEAM_ALLIANCE].insert(goAlliance->GetGUID());
}
// Spawn associate npc bottom
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 4e077979b3e..a0d35d4c742 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -152,18 +152,6 @@ Battleground::Battleground()
m_StartMaxDist = 0.0f;
ScriptId = 0;
- m_TeamStartLocX[TEAM_ALLIANCE] = 0;
- m_TeamStartLocX[TEAM_HORDE] = 0;
-
- m_TeamStartLocY[TEAM_ALLIANCE] = 0;
- m_TeamStartLocY[TEAM_HORDE] = 0;
-
- m_TeamStartLocZ[TEAM_ALLIANCE] = 0;
- m_TeamStartLocZ[TEAM_HORDE] = 0;
-
- m_TeamStartLocO[TEAM_ALLIANCE] = 0;
- m_TeamStartLocO[TEAM_HORDE] = 0;
-
m_ArenaTeamIds[TEAM_ALLIANCE] = 0;
m_ArenaTeamIds[TEAM_HORDE] = 0;
@@ -300,16 +288,15 @@ inline void Battleground::_CheckSafePositions(uint32 diff)
{
m_ValidStartPositionTimer = 0;
- float x, y, z, o;
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
if (Player* player = ObjectAccessor::FindPlayer(itr->first))
{
Position pos = player->GetPosition();
- GetTeamStartLoc(player->GetBGTeam(), x, y, z, o);
- if (pos.GetExactDistSq(x, y, z) > maxDist)
+ Position const* startPos = GetTeamStartPosition(Battleground::GetTeamIndexByTeamId(player->GetBGTeam()));
+ if (pos.GetExactDistSq(startPos) > maxDist)
{
TC_LOG_DEBUG("bg.battleground", "BATTLEGROUND: Sending %s back to start location (map: %u) (possible exploit)", player->GetName().c_str(), GetMapId());
- player->TeleportTo(GetMapId(), x, y, z, o);
+ player->TeleportTo(GetMapId(), startPos->GetPositionX(), startPos->GetPositionY(), startPos->GetPositionZ(), startPos->GetOrientation());
}
}
}
@@ -550,7 +537,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
}
// Announce BG starting
if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE))
- sWorld->SendWorldText(LANG_BG_STARTED_ANNOUNCE_WORLD, GetName(), GetMinLevel(), GetMaxLevel());
+ sWorld->SendWorldText(LANG_BG_STARTED_ANNOUNCE_WORLD, GetName().c_str(), GetMinLevel(), GetMaxLevel());
}
}
}
@@ -614,13 +601,16 @@ inline Player* Battleground::_GetPlayerForTeam(uint32 teamId, BattlegroundPlayer
return player;
}
-void Battleground::SetTeamStartLoc(uint32 TeamID, float X, float Y, float Z, float O)
+void Battleground::SetTeamStartPosition(TeamId teamId, Position const& pos)
+{
+ ASSERT(teamId < TEAM_NEUTRAL);
+ StartPosition[teamId] = pos;
+}
+
+Position const* Battleground::GetTeamStartPosition(TeamId teamId) const
{
- TeamId idx = GetTeamIndexByTeamId(TeamID);
- m_TeamStartLocX[idx] = X;
- m_TeamStartLocY[idx] = Y;
- m_TeamStartLocZ[idx] = Z;
- m_TeamStartLocO[idx] = O;
+ ASSERT(teamId < TEAM_NEUTRAL);
+ return &StartPosition[teamId];
}
void Battleground::SendPacketToAll(WorldPacket* packet)
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
index 2904ec1dc7e..468b73c51ab 100644
--- a/src/server/game/Battlegrounds/Battleground.h
+++ b/src/server/game/Battlegrounds/Battleground.h
@@ -23,6 +23,7 @@
#include "SharedDefines.h"
#include "DBCEnums.h"
#include "WorldPacket.h"
+#include "Object.h"
class Creature;
class GameObject;
@@ -34,7 +35,6 @@ class WorldPacket;
class BattlegroundMap;
struct BattlegroundScore;
-struct Position;
struct PvPDifficultyEntry;
struct WorldSafeLocsEntry;
@@ -256,7 +256,7 @@ class Battleground
/* Battleground */
// Get methods:
- char const* GetName() const { return m_Name; }
+ std::string const& GetName() const { return m_Name; }
BattlegroundTypeId GetTypeID(bool GetRandom = false) const { return GetRandom ? m_RandomTypeID : m_TypeID; }
BattlegroundBracketId GetBracketId() const { return m_BracketId; }
uint32 GetInstanceID() const { return m_InstanceID; }
@@ -282,7 +282,7 @@ class Battleground
bool IsRandom() const { return m_IsRandom; }
// Set methods:
- void SetName(char const* Name) { m_Name = Name; }
+ void SetName(std::string const& name) { m_Name = name; }
void SetTypeID(BattlegroundTypeId TypeID) { m_TypeID = TypeID; }
void SetRandomTypeID(BattlegroundTypeId TypeID) { m_RandomTypeID = TypeID; }
//here we can count minlevel and maxlevel for players
@@ -352,15 +352,8 @@ class Battleground
BattlegroundMap* GetBgMap() const { ASSERT(m_Map); return m_Map; }
BattlegroundMap* FindBgMap() const { return m_Map; }
- void SetTeamStartLoc(uint32 TeamID, float X, float Y, float Z, float O);
- void GetTeamStartLoc(uint32 TeamID, float &X, float &Y, float &Z, float &O) const
- {
- TeamId idx = GetTeamIndexByTeamId(TeamID);
- X = m_TeamStartLocX[idx];
- Y = m_TeamStartLocY[idx];
- Z = m_TeamStartLocZ[idx];
- O = m_TeamStartLocO[idx];
- }
+ void SetTeamStartPosition(TeamId teamId, Position const& pos);
+ Position const* GetTeamStartPosition(TeamId teamId) const;
void SetStartMaxDist(float startMaxDist) { m_StartMaxDist = startMaxDist; }
float GetStartMaxDist() const { return m_StartMaxDist; }
@@ -559,7 +552,7 @@ class Battleground
bool m_IsRated; // is this battle rated?
bool m_PrematureCountDown;
uint32 m_PrematureCountDownTimer;
- char const* m_Name;
+ std::string m_Name;
/* Pre- and post-update hooks */
@@ -669,10 +662,7 @@ class Battleground
// Start location
uint32 m_MapId;
BattlegroundMap* m_Map;
- float m_TeamStartLocX[BG_TEAMS_COUNT];
- float m_TeamStartLocY[BG_TEAMS_COUNT];
- float m_TeamStartLocZ[BG_TEAMS_COUNT];
- float m_TeamStartLocO[BG_TEAMS_COUNT];
+ Position StartPosition[BG_TEAMS_COUNT];
float m_StartMaxDist;
uint32 ScriptId;
};
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
index ef78594626a..615bbc12199 100644
--- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
@@ -343,20 +343,7 @@ uint32 BattlegroundMgr::CreateClientVisibleInstanceId(BattlegroundTypeId bgTypeI
// create a new battleground that will really be used to play
Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId originalBgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 arenaType, bool isRated)
{
- BattlegroundTypeId bgTypeId = originalBgTypeId;
- bool isRandom = false;
-
- switch (originalBgTypeId)
- {
- case BATTLEGROUND_RB:
- isRandom = true;
- /// Intentional fallback, "All Arenas" is random too
- case BATTLEGROUND_AA:
- bgTypeId = GetRandomBG(originalBgTypeId);
- break;
- default:
- break;
- }
+ BattlegroundTypeId bgTypeId = GetRandomBG(originalBgTypeId);
// get the template BG
Battleground* bg_template = GetBattlegroundTemplate(bgTypeId);
@@ -406,15 +393,15 @@ Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId original
break;
case BATTLEGROUND_RB:
case BATTLEGROUND_AA:
- bg = new Battleground(*bg_template);
- break;
default:
return NULL;
}
+ bool isRandom = bgTypeId != originalBgTypeId && !bg->isArena();
+
bg->SetBracket(bracketEntry);
bg->SetInstanceID(sMapMgr->GenerateInstanceId());
- bg->SetClientInstanceID(CreateClientVisibleInstanceId(isRandom ? BATTLEGROUND_RB : bgTypeId, bracketEntry->GetBracketId()));
+ bg->SetClientInstanceID(CreateClientVisibleInstanceId(originalBgTypeId, bracketEntry->GetBracketId()));
bg->Reset(); // reset the new bg (set status to status_wait_queue from status_none)
bg->SetStatus(STATUS_WAIT_JOIN); // start the joining of the bg
bg->SetArenaType(arenaType);
@@ -448,82 +435,88 @@ Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId original
}
// used to create the BG templates
-bool BattlegroundMgr::CreateBattleground(CreateBattlegroundData& data)
+bool BattlegroundMgr::CreateBattleground(BattlegroundTemplate const* bgTemplate)
{
- // Create the BG
- Battleground* bg = NULL;
- switch (data.bgTypeId)
+ Battleground* bg = GetBattlegroundTemplate(bgTemplate->Id);
+ if (!bg)
{
- case BATTLEGROUND_AV:
- bg = new BattlegroundAV;
- break;
- case BATTLEGROUND_WS:
- bg = new BattlegroundWS;
- break;
- case BATTLEGROUND_AB:
- bg = new BattlegroundAB;
- break;
- case BATTLEGROUND_NA:
- bg = new BattlegroundNA;
- break;
- case BATTLEGROUND_BE:
- bg = new BattlegroundBE;
- break;
- case BATTLEGROUND_EY:
- bg = new BattlegroundEY;
- break;
- case BATTLEGROUND_RL:
- bg = new BattlegroundRL;
- break;
- case BATTLEGROUND_SA:
- bg = new BattlegroundSA;
- break;
- case BATTLEGROUND_DS:
- bg = new BattlegroundDS;
- break;
- case BATTLEGROUND_RV:
- bg = new BattlegroundRV;
- break;
- case BATTLEGROUND_IC:
- bg = new BattlegroundIC;
- break;
- case BATTLEGROUND_AA:
- bg = new Battleground;
- break;
- case BATTLEGROUND_RB:
- bg = new Battleground;
- bg->SetRandom(true);
- break;
- default:
- return false;
+ // Create the BG
+ switch (bgTemplate->Id)
+ {
+ case BATTLEGROUND_AV:
+ bg = new BattlegroundAV();
+ break;
+ case BATTLEGROUND_WS:
+ bg = new BattlegroundWS();
+ break;
+ case BATTLEGROUND_AB:
+ bg = new BattlegroundAB();
+ break;
+ case BATTLEGROUND_NA:
+ bg = new BattlegroundNA();
+ break;
+ case BATTLEGROUND_BE:
+ bg = new BattlegroundBE();
+ break;
+ case BATTLEGROUND_EY:
+ bg = new BattlegroundEY();
+ break;
+ case BATTLEGROUND_RL:
+ bg = new BattlegroundRL();
+ break;
+ case BATTLEGROUND_SA:
+ bg = new BattlegroundSA();
+ break;
+ case BATTLEGROUND_DS:
+ bg = new BattlegroundDS();
+ break;
+ case BATTLEGROUND_RV:
+ bg = new BattlegroundRV();
+ break;
+ case BATTLEGROUND_IC:
+ bg = new BattlegroundIC();
+ break;
+ case BATTLEGROUND_AA:
+ bg = new Battleground();
+ break;
+ case BATTLEGROUND_RB:
+ bg = new Battleground();
+ bg->SetRandom(true);
+ break;
+ default:
+ return false;
+ }
+
+ bg->SetTypeID(bgTemplate->Id);
+ bg->SetInstanceID(0);
+ AddBattleground(bg);
}
- bg->SetMapId(data.MapID);
- bg->SetTypeID(data.bgTypeId);
- bg->SetInstanceID(0);
- bg->SetArenaorBGType(data.IsArena);
- bg->SetMinPlayersPerTeam(data.MinPlayersPerTeam);
- bg->SetMaxPlayersPerTeam(data.MaxPlayersPerTeam);
- bg->SetMinPlayers(data.MinPlayersPerTeam * 2);
- bg->SetMaxPlayers(data.MaxPlayersPerTeam * 2);
- bg->SetName(data.BattlegroundName);
- bg->SetTeamStartLoc(ALLIANCE, data.Team1StartLocX, data.Team1StartLocY, data.Team1StartLocZ, data.Team1StartLocO);
- bg->SetTeamStartLoc(HORDE, data.Team2StartLocX, data.Team2StartLocY, data.Team2StartLocZ, data.Team2StartLocO);
- bg->SetStartMaxDist(data.StartMaxDist);
- bg->SetLevelRange(data.LevelMin, data.LevelMax);
- bg->SetScriptId(data.scriptId);
-
- AddBattleground(bg);
+ bg->SetMapId(bgTemplate->BattlemasterEntry->mapid[0]);
+ bg->SetName(bgTemplate->BattlemasterEntry->name[sWorld->GetDefaultDbcLocale()]);
+ bg->SetArenaorBGType(bgTemplate->IsArena());
+ bg->SetMinPlayersPerTeam(bgTemplate->MinPlayersPerTeam);
+ bg->SetMaxPlayersPerTeam(bgTemplate->MaxPlayersPerTeam);
+ bg->SetMinPlayers(bgTemplate->MinPlayersPerTeam * 2);
+ bg->SetMaxPlayers(bgTemplate->MaxPlayersPerTeam * 2);
+ bg->SetTeamStartPosition(TEAM_ALLIANCE, bgTemplate->StartLocation[TEAM_ALLIANCE]);
+ bg->SetTeamStartPosition(TEAM_HORDE, bgTemplate->StartLocation[TEAM_HORDE]);
+ bg->SetStartMaxDist(bgTemplate->MaxStartDistSq);
+ bg->SetLevelRange(bgTemplate->MinLevel, bgTemplate->MaxLevel);
+ bg->SetScriptId(bgTemplate->ScriptId);
return true;
}
-void BattlegroundMgr::CreateInitialBattlegrounds()
+void BattlegroundMgr::LoadBattlegroundTemplates()
{
uint32 oldMSTime = getMSTime();
+
+ _battlegroundMapTemplates.clear();
+ _battlegroundTemplates.clear();
+
// 0 1 2 3 4 5 6 7 8 9 10 11
QueryResult result = WorldDatabase.Query("SELECT id, MinPlayersPerTeam, MaxPlayersPerTeam, MinLvl, MaxLvl, AllianceStartLoc, AllianceStartO, HordeStartLoc, HordeStartO, StartMaxDist, Weight, ScriptName FROM battleground_template");
-
if (!result)
{
TC_LOG_ERROR("server.loading", ">> Loaded 0 battlegrounds. DB table `battleground_template` is empty.");
@@ -536,7 +529,8 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
{
Field* fields = result->Fetch();
- uint32 bgTypeId = fields[0].GetUInt32();
+ BattlegroundTypeId bgTypeId = BattlegroundTypeId(fields[0].GetUInt32());
+
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, bgTypeId, NULL))
continue;
@@ -548,86 +542,64 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
continue;
}
- CreateBattlegroundData data;
- data.bgTypeId = BattlegroundTypeId(bgTypeId);
- data.IsArena = (bl->type == TYPE_ARENA);
- data.MinPlayersPerTeam = fields[1].GetUInt16();
- data.MaxPlayersPerTeam = fields[2].GetUInt16();
- data.LevelMin = fields[3].GetUInt8();
- data.LevelMax = fields[4].GetUInt8();
- float dist = fields[9].GetFloat();
- data.StartMaxDist = dist * dist;
-
- data.scriptId = sObjectMgr->GetScriptId(fields[11].GetCString());
- data.BattlegroundName = bl->name[sWorld->GetDefaultDbcLocale()];
- data.MapID = bl->mapid[0];
-
- if (data.MaxPlayersPerTeam == 0 || data.MinPlayersPerTeam > data.MaxPlayersPerTeam)
+ BattlegroundTemplate bgTemplate;
+ bgTemplate.Id = bgTypeId;
+ bgTemplate.MinPlayersPerTeam = fields[1].GetUInt16();
+ bgTemplate.MaxPlayersPerTeam = fields[2].GetUInt16();
+ bgTemplate.MinLevel = fields[3].GetUInt8();
+ bgTemplate.MaxLevel = fields[4].GetUInt8();
+ float dist = fields[9].GetFloat();
+ bgTemplate.MaxStartDistSq = dist * dist;
+ bgTemplate.Weight = fields[10].GetUInt8();
+ bgTemplate.ScriptId = sObjectMgr->GetScriptId(fields[11].GetCString());
+ bgTemplate.BattlemasterEntry = bl;
+
+ if (bgTemplate.MaxPlayersPerTeam == 0 || bgTemplate.MinPlayersPerTeam > bgTemplate.MaxPlayersPerTeam)
{
TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id %u has bad values for MinPlayersPerTeam (%u) and MaxPlayersPerTeam(%u)",
- data.bgTypeId, data.MinPlayersPerTeam, data.MaxPlayersPerTeam);
+ bgTemplate.Id, bgTemplate.MinPlayersPerTeam, bgTemplate.MaxPlayersPerTeam);
continue;
}
- if (data.LevelMin == 0 || data.LevelMax == 0 || data.LevelMin > data.LevelMax)
+ if (bgTemplate.MinLevel == 0 || bgTemplate.MaxLevel == 0 || bgTemplate.MinLevel > bgTemplate.MaxLevel)
{
- TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id %u has bad values for LevelMin (%u) and LevelMax(%u)",
- data.bgTypeId, data.LevelMin, data.LevelMax);
+ TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id %u has bad values for MinLevel (%u) and MaxLevel (%u)",
+ bgTemplate.Id, bgTemplate.MinLevel, bgTemplate.MaxLevel);
continue;
}
- if (data.bgTypeId == BATTLEGROUND_AA || data.bgTypeId == BATTLEGROUND_RB)
- {
- data.Team1StartLocX = 0;
- data.Team1StartLocY = 0;
- data.Team1StartLocZ = 0;
- data.Team1StartLocO = fields[6].GetFloat();
- data.Team2StartLocX = 0;
- data.Team2StartLocY = 0;
- data.Team2StartLocZ = 0;
- data.Team2StartLocO = fields[8].GetFloat();
- }
- else
+ if (bgTemplate.Id != BATTLEGROUND_AA && bgTemplate.Id != BATTLEGROUND_RB)
{
uint32 startId = fields[5].GetUInt32();
if (WorldSafeLocsEntry const* start = sWorldSafeLocsStore.LookupEntry(startId))
{
- data.Team1StartLocX = start->x;
- data.Team1StartLocY = start->y;
- data.Team1StartLocZ = start->z;
- data.Team1StartLocO = fields[6].GetFloat();
+ bgTemplate.StartLocation[TEAM_ALLIANCE].Relocate(start->x, start->y, start->z, fields[6].GetFloat());
}
else
{
- TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id %u have non-existed WorldSafeLocs.dbc id %u in field `AllianceStartLoc`. BG not created.", data.bgTypeId, startId);
+ TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id %u has non-existed WorldSafeLocs.dbc id %u in field `AllianceStartLoc`. BG not created.", bgTemplate.Id, startId);
continue;
}
startId = fields[7].GetUInt32();
if (WorldSafeLocsEntry const* start = sWorldSafeLocsStore.LookupEntry(startId))
{
- data.Team2StartLocX = start->x;
- data.Team2StartLocY = start->y;
- data.Team2StartLocZ = start->z;
- data.Team2StartLocO = fields[8].GetFloat();
+ bgTemplate.StartLocation[TEAM_HORDE].Relocate(start->x, start->y, start->z, fields[8].GetFloat());
}
else
{
- TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id %u have non-existed WorldSafeLocs.dbc id %u in field `HordeStartLoc`. BG not created.", data.bgTypeId, startId);
+ TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id %u has non-existed WorldSafeLocs.dbc id %u in field `HordeStartLoc`. BG not created.", bgTemplate.Id, startId);
continue;
}
}
- if (!CreateBattleground(data))
+ if (!CreateBattleground(&bgTemplate))
continue;
- if (data.IsArena)
- {
- if (data.bgTypeId != BATTLEGROUND_AA)
- m_ArenaSelectionWeights[data.bgTypeId] = fields[10].GetUInt8();
- }
- else if (data.bgTypeId != BATTLEGROUND_RB)
- m_BGSelectionWeights[data.bgTypeId] = fields[10].GetUInt8();
+ _battlegroundTemplates[bgTypeId] = bgTemplate;
+
+ if (bgTemplate.BattlemasterEntry->mapid[1] == -1) // in this case we have only one mapId
+ _battlegroundMapTemplates[bgTemplate.BattlemasterEntry->mapid[0]] = &_battlegroundTemplates[bgTypeId];
++count;
}
@@ -722,15 +694,14 @@ void BattlegroundMgr::SendToBattleground(Player* player, uint32 instanceId, Batt
{
if (Battleground* bg = GetBattleground(instanceId, bgTypeId))
{
- float x, y, z, O;
uint32 mapid = bg->GetMapId();
uint32 team = player->GetBGTeam();
if (team == 0)
team = player->GetTeam();
- bg->GetTeamStartLoc(team, x, y, z, O);
- TC_LOG_DEBUG("bg.battleground", "BattlegroundMgr::SendToBattleground: Sending %s to map %u, X %f, Y %f, Z %f, O %f (bgType %u)", player->GetName().c_str(), mapid, x, y, z, O, bgTypeId);
- player->TeleportTo(mapid, x, y, z, O);
+ Position const* pos = bg->GetTeamStartPosition(Battleground::GetTeamIndexByTeamId(team));
+ TC_LOG_DEBUG("bg.battleground", "BattlegroundMgr::SendToBattleground: Sending %s to map %u, %s (bgType %u)", player->GetName().c_str(), mapid, pos->ToString().c_str(), bgTypeId);
+ player->TeleportTo(mapid, pos->GetPositionX(), pos->GetPositionY(), pos->GetPositionZ(), pos->GetOrientation());
}
else
TC_LOG_ERROR("bg.battleground", "BattlegroundMgr::SendToBattleground: Instance %u (bgType %u) not found while trying to teleport player %s", instanceId, bgTypeId, player->GetName().c_str());
@@ -987,51 +958,43 @@ bool BattlegroundMgr::IsBGWeekend(BattlegroundTypeId bgTypeId)
BattlegroundTypeId BattlegroundMgr::GetRandomBG(BattlegroundTypeId bgTypeId)
{
- uint32 weight = 0;
- BattlegroundTypeId returnBgTypeId = BATTLEGROUND_TYPE_NONE;
- BattlegroundSelectionWeightMap selectionWeights;
-
- if (bgTypeId == BATTLEGROUND_AA)
+ if (BattlegroundTemplate const* bgTemplate = GetBattlegroundTemplateByTypeId(bgTypeId))
{
- for (BattlegroundSelectionWeightMap::const_iterator it = m_ArenaSelectionWeights.begin(); it != m_ArenaSelectionWeights.end(); ++it)
- {
- if (it->second)
- {
- weight += it->second;
- selectionWeights[it->first] = it->second;
- }
- }
- }
- else if (bgTypeId == BATTLEGROUND_RB)
- {
- for (BattlegroundSelectionWeightMap::const_iterator it = m_BGSelectionWeights.begin(); it != m_BGSelectionWeights.end(); ++it)
+ uint32 weight = 0;
+ BattlegroundSelectionWeightMap selectionWeights;
+
+ for (int32 mapId : bgTemplate->BattlemasterEntry->mapid)
{
- if (it->second)
+ if (mapId == -1)
+ break;
+
+ if (BattlegroundTemplate const* bg = GetBattlegroundTemplateByMapId(mapId))
{
- weight += it->second;
- selectionWeights[it->first] = it->second;
+ weight += bg->Weight;
+ selectionWeights[bg->Id] = bg->Weight;
}
}
- }
- if (weight)
- {
- // Select a random value
- uint32 selectedWeight = urand(0, weight - 1);
- // Select the correct bg (if we have in DB A(10), B(20), C(10), D(15) --> [0---A---9|10---B---29|30---C---39|40---D---54])
- weight = 0;
- for (BattlegroundSelectionWeightMap::const_iterator it = selectionWeights.begin(); it != selectionWeights.end(); ++it)
+ // there is only one bg to select
+ if (selectionWeights.size() == 1)
+ return bgTypeId;
+
+ if (weight)
{
- weight += it->second;
- if (selectedWeight < weight)
+ // Select a random value
+ uint32 selectedWeight = urand(0, weight - 1);
+ // Select the correct bg (if we have in DB A(10), B(20), C(10), D(15) --> [0---A---9|10---B---29|30---C---39|40---D---54])
+ weight = 0;
+ for (auto it : selectionWeights)
{
- returnBgTypeId = it->first;
- break;
+ weight += it.second;
+ if (selectedWeight < weight)
+ return it.first;
}
}
}
- return returnBgTypeId;
+ return BATTLEGROUND_TYPE_NONE;
}
BGFreeSlotQueueContainer& BattlegroundMgr::GetBGFreeSlotQueueStore(BattlegroundTypeId bgTypeId)
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.h b/src/server/game/Battlegrounds/BattlegroundMgr.h
index d9cedbc4546..20cd8e4f7be 100644
--- a/src/server/game/Battlegrounds/BattlegroundMgr.h
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.h
@@ -23,6 +23,7 @@
#include "DBCEnums.h"
#include "Battleground.h"
#include "BattlegroundQueue.h"
+#include <ace/Singleton.h>
typedef std::map<uint32, Battleground*> BattlegroundContainer;
typedef std::set<uint32> BattlegroundClientIdsContainer;
@@ -32,28 +33,6 @@ typedef std::unordered_map<uint32, BattlegroundTypeId> BattleMastersMap;
#define BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY 86400 // seconds in a day
#define WS_ARENA_DISTRIBUTION_TIME 20001 // Custom worldstate
-struct CreateBattlegroundData
-{
- BattlegroundTypeId bgTypeId;
- bool IsArena;
- uint32 MinPlayersPerTeam;
- uint32 MaxPlayersPerTeam;
- uint32 LevelMin;
- uint32 LevelMax;
- char* BattlegroundName;
- uint32 MapID;
- float Team1StartLocX;
- float Team1StartLocY;
- float Team1StartLocZ;
- float Team1StartLocO;
- float Team2StartLocX;
- float Team2StartLocY;
- float Team2StartLocZ;
- float Team2StartLocO;
- float StartMaxDist;
- uint32 scriptId;
-};
-
struct BattlegroundData
{
BattlegroundContainer m_Battlegrounds;
@@ -61,19 +40,31 @@ struct BattlegroundData
BGFreeSlotQueueContainer BGFreeSlotQueue;
};
+struct BattlegroundTemplate
+{
+ BattlegroundTypeId Id;
+ uint16 MinPlayersPerTeam;
+ uint16 MaxPlayersPerTeam;
+ uint8 MinLevel;
+ uint8 MaxLevel;
+ Position StartLocation[BG_TEAMS_COUNT];
+ float MaxStartDistSq;
+ uint8 Weight;
+ uint32 ScriptId;
+ BattlemasterListEntry const* BattlemasterEntry;
+
+ bool IsArena() const { return BattlemasterEntry->type == MAP_ARENA; }
+};
+
class BattlegroundMgr
{
+ friend class ACE_Singleton<BattlegroundMgr, ACE_Null_Mutex>;
+
private:
BattlegroundMgr();
~BattlegroundMgr();
public:
- static BattlegroundMgr* instance()
- {
- static BattlegroundMgr* instance = new BattlegroundMgr();
- return instance;
- }
-
void Update(uint32 diff);
/* Packet Building */
@@ -98,7 +89,7 @@ class BattlegroundMgr
void RemoveFromBGFreeSlotQueue(BattlegroundTypeId bgTypeId, uint32 instanceId);
BGFreeSlotQueueContainer& GetBGFreeSlotQueueStore(BattlegroundTypeId bgTypeId);
- void CreateInitialBattlegrounds();
+ void LoadBattlegroundTemplates();
void DeleteAllBattlegrounds();
void SendToBattleground(Player* player, uint32 InstanceID, BattlegroundTypeId bgTypeId);
@@ -138,7 +129,7 @@ class BattlegroundMgr
}
private:
- bool CreateBattleground(CreateBattlegroundData& data);
+ bool CreateBattleground(BattlegroundTemplate const* bgTemplate);
uint32 CreateClientVisibleInstanceId(BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id);
static bool IsArenaType(BattlegroundTypeId bgTypeId);
BattlegroundTypeId GetRandomBG(BattlegroundTypeId id);
@@ -148,9 +139,6 @@ class BattlegroundMgr
BattlegroundQueue m_BattlegroundQueues[MAX_BATTLEGROUND_QUEUE_TYPES];
- typedef std::map<BattlegroundTypeId, uint8> BattlegroundSelectionWeightMap; // TypeId and its selectionWeight
- BattlegroundSelectionWeightMap m_ArenaSelectionWeights;
- BattlegroundSelectionWeightMap m_BGSelectionWeights;
std::vector<uint64> m_QueueUpdateScheduler;
uint32 m_NextRatedArenaUpdate;
time_t m_NextAutoDistributionTime;
@@ -158,7 +146,31 @@ class BattlegroundMgr
bool m_ArenaTesting;
bool m_Testing;
BattleMastersMap mBattleMastersMap;
+
+ BattlegroundTemplate const* GetBattlegroundTemplateByTypeId(BattlegroundTypeId id)
+ {
+ BattlegroundTemplateMap::const_iterator itr = _battlegroundTemplates.find(id);
+ if (itr != _battlegroundTemplates.end())
+ return &itr->second;
+ return nullptr;
+ }
+
+ BattlegroundTemplate const* GetBattlegroundTemplateByMapId(uint32 mapId)
+ {
+ BattlegroundMapTemplateContainer::const_iterator itr = _battlegroundMapTemplates.find(mapId);
+ if (itr != _battlegroundMapTemplates.end())
+ return itr->second;
+ return nullptr;
+ }
+
+ typedef std::map<BattlegroundTypeId, uint8 /*weight*/> BattlegroundSelectionWeightMap;
+
+ typedef std::map<BattlegroundTypeId, BattlegroundTemplate> BattlegroundTemplateMap;
+ typedef std::map<uint32 /*mapId*/, BattlegroundTemplate*> BattlegroundMapTemplateContainer;
+ BattlegroundTemplateMap _battlegroundTemplates;
+ BattlegroundMapTemplateContainer _battlegroundMapTemplates;
};
-#define sBattlegroundMgr BattlegroundMgr::instance()
-#endif
+#define sBattlegroundMgr ACE_Singleton<BattlegroundMgr, ACE_Null_Mutex>::instance()
+
+#endif // __BATTLEGROUNDMGR_H
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
index 2f632377756..e52f75a1c41 100644
--- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
@@ -198,7 +198,6 @@ GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, Battlegr
{
if (Battleground* bg = sBattlegroundMgr->GetBattlegroundTemplate(ginfo->BgTypeId))
{
- char const* bgName = bg->GetName();
uint32 MinPlayers = bg->GetMinPlayersPerTeam();
uint32 qHorde = 0;
uint32 qAlliance = 0;
@@ -215,13 +214,13 @@ GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, Battlegr
// Show queue status to player only (when joining queue)
if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY))
{
- ChatHandler(leader->GetSession()).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bgName, q_min_level, q_max_level,
+ ChatHandler(leader->GetSession()).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bg->GetName().c_str(), q_min_level, q_max_level,
qAlliance, (MinPlayers > qAlliance) ? MinPlayers - qAlliance : (uint32)0, qHorde, (MinPlayers > qHorde) ? MinPlayers - qHorde : (uint32)0);
}
// System message
else
{
- sWorld->SendWorldText(LANG_BG_QUEUE_ANNOUNCE_WORLD, bgName, q_min_level, q_max_level,
+ sWorld->SendWorldText(LANG_BG_QUEUE_ANNOUNCE_WORLD, bg->GetName().c_str(), q_min_level, q_max_level,
qAlliance, (MinPlayers > qAlliance) ? MinPlayers - qAlliance : (uint32)0, qHorde, (MinPlayers > qHorde) ? MinPlayers - qHorde : (uint32)0);
}
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
index da0b00af40f..1685f06f92d 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
@@ -110,8 +110,8 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
GetBGObject(BG_IC_GO_DOODAD_ND_HUMAN_GATE_CLOSEDFX_DOOR01)->RemoveFromWorld();
GetBGObject(BG_IC_GO_DOODAD_ND_WINTERORC_WALL_GATEFX_DOOR01)->RemoveFromWorld();
- GetBGObject(BG_IC_GO_ALLIANCE_GATE_3)->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED); // Alliance door
- GetBGObject(BG_IC_GO_HORDE_GATE_1)->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED); // Horde door
+ GetBGObject(BG_IC_GO_ALLIANCE_GATE_3)->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED); // Alliance door
+ GetBGObject(BG_IC_GO_HORDE_GATE_1)->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED); // Horde door
doorsClosed = true;
} else closeFortressDoorsTimer -= diff;
@@ -241,10 +241,10 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
void BattlegroundIC::StartingEventCloseDoors()
{
// Show Full Gate Displays
- GetBGObject(BG_IC_GO_ALLIANCE_GATE_1)->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED); // Alliance door
- GetBGObject(BG_IC_GO_ALLIANCE_GATE_2)->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED); // Alliance door
- GetBGObject(BG_IC_GO_HORDE_GATE_2)->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED); // Horde door
- GetBGObject(BG_IC_GO_HORDE_GATE_3)->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED); // Horde door
+ GetBGObject(BG_IC_GO_ALLIANCE_GATE_1)->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
+ GetBGObject(BG_IC_GO_ALLIANCE_GATE_2)->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
+ GetBGObject(BG_IC_GO_HORDE_GATE_2)->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
+ GetBGObject(BG_IC_GO_HORDE_GATE_3)->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
}
void BattlegroundIC::StartingEventOpenDoors()
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index d353efb58c7..a24b3e3878a 100644
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -355,7 +355,6 @@ void LFGMgr::Update(uint32 diff)
if (m_QueueTimer > LFG_QUEUEUPDATE_INTERVAL)
{
m_QueueTimer = 0;
- time_t currTime = time(NULL);
for (LfgQueueContainer::iterator it = QueuesStore.begin(); it != QueuesStore.end(); ++it)
it->second.UpdateQueueTimers(currTime);
}
@@ -1707,14 +1706,13 @@ void LFGMgr::RemoveGroupData(uint64 guid)
LfgState state = GetState(guid);
// If group is being formed after proposal success do nothing more
LfgGuidSet const& players = it->second.GetPlayers();
- for (LfgGuidSet::const_iterator it = players.begin(); it != players.end(); ++it)
+ for (uint64 playerGUID : players)
{
- uint64 guid = (*it);
- SetGroup(*it, 0);
+ SetGroup(playerGUID, 0);
if (state != LFG_STATE_PROPOSAL)
{
- SetState(*it, LFG_STATE_NONE);
- SendLfgUpdateParty(guid, LfgUpdateData(LFG_UPDATETYPE_REMOVED_FROM_QUEUE));
+ SetState(playerGUID, LFG_STATE_NONE);
+ SendLfgUpdateParty(playerGUID, LfgUpdateData(LFG_UPDATETYPE_REMOVED_FROM_QUEUE));
}
}
GroupsStore.erase(it);
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index fd8aaff8159..341225741ea 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -2276,6 +2276,7 @@ void Creature::AllLootRemovedFromCorpse()
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
time_t now = time(NULL);
+ // Do not reset corpse remove time if corpse is already removed
if (m_corpseRemoveTime <= now)
return;
@@ -2283,7 +2284,7 @@ void Creature::AllLootRemovedFromCorpse()
// corpse skinnable, but without skinning flag, and then skinned, corpse will despawn next update
if (loot.loot_type == LOOT_SKINNING)
- m_corpseRemoveTime = time(NULL);
+ m_corpseRemoveTime = now;
else
m_corpseRemoveTime = now + m_corpseDelay * decayRate;
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index ae08a4251a5..23e40382fa2 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -958,6 +958,17 @@ void GameObject::SaveRespawnTime()
GetMap()->SaveGORespawnTime(m_DBTableGuid, m_respawnTime);
}
+bool GameObject::IsNeverVisible() const
+{
+ if (WorldObject::IsNeverVisible())
+ return true;
+
+ if (GetGoType() == GAMEOBJECT_TYPE_SPELL_FOCUS && GetGOInfo()->spellFocus.serverOnly == 1)
+ return true;
+
+ return false;
+}
+
bool GameObject::IsAlwaysVisibleFor(WorldObject const* seer) const
{
if (WorldObject::IsAlwaysVisibleFor(seer))
diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h
index 8f70fc0e907..549de28bb12 100644
--- a/src/server/game/Entities/GameObject/GameObject.h
+++ b/src/server/game/Entities/GameObject/GameObject.h
@@ -778,6 +778,8 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
void TriggeringLinkedGameObject(uint32 trapEntry, Unit* target);
+ bool IsNeverVisible() const override;
+
bool IsAlwaysVisibleFor(WorldObject const* seer) const;
bool IsInvisibleDueToDespawn() const;
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index e00728d25c6..6eda51667e1 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -3116,7 +3116,7 @@ void Player::InitTalentForLevel()
// Remove all talent points
if (m_usedTalentCount > 0) // Free any used talents
{
- resetTalents(true); /// @todo: Has to (collectively) be renamed to ResetTalents
+ ResetTalents(true); /// @todo: Has to (collectively) be renamed to ResetTalents
SetFreeTalentPoints(0);
}
}
@@ -3134,7 +3134,7 @@ void Player::InitTalentForLevel()
if (m_usedTalentCount > talentPointsForLevel)
{
if (!GetSession()->HasPermission(rbac::RBAC_PERM_SKIP_CHECK_MORE_TALENTS_THAN_ALLOWED))
- resetTalents(true);
+ ResetTalents(true);
else
SetFreeTalentPoints(0);
}
@@ -3525,7 +3525,7 @@ bool Player::AddTalent(uint32 spellId, uint8 spec, bool learning)
return false;
}
-bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent, bool disabled, bool loading /*= false*/)
+bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent, bool disabled, bool loading /*= false*/, bool fromSkill /*= false*/)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)
@@ -3688,7 +3688,7 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent
if (!rankSpellId || rankSpellId == spellId)
continue;
- removeSpell(rankSpellId, false, false);
+ RemoveSpell(rankSpellId, false, false);
}
}
}
@@ -3696,9 +3696,9 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent
else if (uint32 prev_spell = sSpellMgr->GetPrevSpellInChain(spellId))
{
if (!IsInWorld() || disabled) // at spells loading, no output, but allow save
- addSpell(prev_spell, active, true, true, disabled);
+ AddSpell(prev_spell, active, true, true, disabled, false, fromSkill);
else // at normal learning
- learnSpell(prev_spell, true);
+ LearnSpell(prev_spell, true, fromSkill);
}
PlayerSpell* newspell = new PlayerSpell;
@@ -3797,45 +3797,44 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent
SetFreePrimaryProfessions(freeProfs-1);
}
- // add dependent skills
- uint16 maxskill = GetMaxSkillValueForLevel();
-
- SpellLearnSkillNode const* spellLearnSkill = sSpellMgr->GetSpellLearnSkill(spellId);
-
SkillLineAbilityMapBounds skill_bounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellId);
- if (spellLearnSkill)
+ // add dependent skills if this spell is not learned from adding skill already
+ if (!fromSkill)
{
- uint32 skill_value = GetPureSkillValue(spellLearnSkill->skill);
- uint32 skill_max_value = GetPureMaxSkillValue(spellLearnSkill->skill);
+ if (SpellLearnSkillNode const* spellLearnSkill = sSpellMgr->GetSpellLearnSkill(spellId))
+ {
+ uint32 skill_value = GetPureSkillValue(spellLearnSkill->skill);
+ uint32 skill_max_value = GetPureMaxSkillValue(spellLearnSkill->skill);
- if (skill_value < spellLearnSkill->value)
- skill_value = spellLearnSkill->value;
+ if (skill_value < spellLearnSkill->value)
+ skill_value = spellLearnSkill->value;
- uint32 new_skill_max_value = spellLearnSkill->maxvalue == 0 ? maxskill : spellLearnSkill->maxvalue;
+ uint32 new_skill_max_value = spellLearnSkill->maxvalue == 0 ? GetMaxSkillValueForLevel() : spellLearnSkill->maxvalue;
- if (skill_max_value < new_skill_max_value)
- skill_max_value = new_skill_max_value;
+ if (skill_max_value < new_skill_max_value)
+ skill_max_value = new_skill_max_value;
- SetSkill(spellLearnSkill->skill, spellLearnSkill->step, skill_value, skill_max_value);
- }
- else
- {
- // not ranked skills
- for (SkillLineAbilityMap::const_iterator _spell_idx = skill_bounds.first; _spell_idx != skill_bounds.second; ++_spell_idx)
+ SetSkill(spellLearnSkill->skill, spellLearnSkill->step, skill_value, skill_max_value);
+ }
+ else
{
- SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(_spell_idx->second->skillId);
- if (!pSkill)
- continue;
+ // not ranked skills
+ for (SkillLineAbilityMap::const_iterator _spell_idx = skill_bounds.first; _spell_idx != skill_bounds.second; ++_spell_idx)
+ {
+ SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(_spell_idx->second->skillId);
+ if (!pSkill)
+ continue;
- if (_spell_idx->second->AutolearnType == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && !HasSkill(pSkill->id))
- LearnDefaultSkill(pSkill->id, 0);
+ if (_spell_idx->second->AutolearnType == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && !HasSkill(pSkill->id))
+ LearnDefaultSkill(pSkill->id, 0);
- if (pSkill->id == SKILL_MOUNTS && !Has310Flyer(false))
- for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
- if (spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED &&
- spellInfo->Effects[i].CalcValue() == 310)
- SetHas310Flyer(true);
+ if (pSkill->id == SKILL_MOUNTS && !Has310Flyer(false))
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ if (spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED &&
+ spellInfo->Effects[i].CalcValue() == 310)
+ SetHas310Flyer(true);
+ }
}
}
@@ -3847,9 +3846,9 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent
if (!itr2->second.autoLearned)
{
if (!IsInWorld() || !itr2->second.active) // at spells loading, no output, but allow save
- addSpell(itr2->second.spell, itr2->second.active, true, true, false);
+ AddSpell(itr2->second.spell, itr2->second.active, true, true, false);
else // at normal learning
- learnSpell(itr2->second.spell, true);
+ LearnSpell(itr2->second.spell, true);
}
}
@@ -3908,14 +3907,14 @@ bool Player::IsNeedCastPassiveSpellAtLearn(SpellInfo const* spellInfo) const
return need_cast && (!spellInfo->CasterAuraState || HasAuraState(AuraStateType(spellInfo->CasterAuraState)));
}
-void Player::learnSpell(uint32 spell_id, bool dependent)
+void Player::LearnSpell(uint32 spell_id, bool dependent, bool fromSkill /*= false*/)
{
PlayerSpellMap::iterator itr = m_spells.find(spell_id);
bool disabled = (itr != m_spells.end()) ? itr->second->disabled : false;
bool active = disabled ? itr->second->active : true;
- bool learning = addSpell(spell_id, active, true, dependent, false);
+ bool learning = AddSpell(spell_id, active, true, dependent, false, false, fromSkill);
// prevent duplicated entires in spell book, also not send if not in world (loading)
if (learning && IsInWorld())
@@ -3933,7 +3932,7 @@ void Player::learnSpell(uint32 spell_id, bool dependent)
{
PlayerSpellMap::iterator iter = m_spells.find(nextSpell);
if (iter != m_spells.end() && iter->second->disabled)
- learnSpell(nextSpell, false);
+ LearnSpell(nextSpell, false, fromSkill);
}
SpellsRequiringSpellMapBounds spellsRequiringSpell = sSpellMgr->GetSpellsRequiringSpellBounds(spell_id);
@@ -3941,12 +3940,12 @@ void Player::learnSpell(uint32 spell_id, bool dependent)
{
PlayerSpellMap::iterator iter2 = m_spells.find(itr2->second);
if (iter2 != m_spells.end() && iter2->second->disabled)
- learnSpell(itr2->second, false);
+ LearnSpell(itr2->second, false, fromSkill);
}
}
}
-void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
+void Player::RemoveSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
{
PlayerSpellMap::iterator itr = m_spells.find(spell_id);
if (itr == m_spells.end())
@@ -3959,12 +3958,12 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
if (uint32 nextSpell = sSpellMgr->GetNextSpellInChain(spell_id))
{
if (HasSpell(nextSpell) && !GetTalentSpellPos(nextSpell))
- removeSpell(nextSpell, disabled, false);
+ RemoveSpell(nextSpell, disabled, false);
}
//unlearn spells dependent from recently removed spells
SpellsRequiringSpellMapBounds spellsRequiringSpell = sSpellMgr->GetSpellsRequiringSpellBounds(spell_id);
for (SpellsRequiringSpellMap::const_iterator itr2 = spellsRequiringSpell.first; itr2 != spellsRequiringSpell.second; ++itr2)
- removeSpell(itr2->second, disabled);
+ RemoveSpell(itr2->second, disabled);
// re-search, it can be corrupted in prev loop
itr = m_spells.find(spell_id);
@@ -4089,7 +4088,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
SpellLearnSpellMapBounds spell_bounds = sSpellMgr->GetSpellLearnSpellMapBounds(spell_id);
for (SpellLearnSpellMap::const_iterator itr2 = spell_bounds.first; itr2 != spell_bounds.second; ++itr2)
- removeSpell(itr2->second.spell, disabled);
+ RemoveSpell(itr2->second.spell, disabled);
// activate lesser rank in spellbook/action bar, and cast it if need
bool prev_activate = false;
@@ -4121,7 +4120,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
// now re-learn if need re-activate
if (cur_active && !prev_itr->second->active && learn_low_rank)
{
- if (addSpell(prev_id, true, false, prev_itr->second->dependent, prev_itr->second->disabled))
+ if (AddSpell(prev_id, true, false, prev_itr->second->dependent, prev_itr->second->disabled))
{
// downgrade spell ranks in spellbook and action bar
WorldPacket data(SMSG_SUPERCEDED_SPELL, 4 + 4);
@@ -4336,7 +4335,7 @@ void Player::_SaveSpellCooldowns(SQLTransaction& trans)
trans->Append(ss.str().c_str());
}
-uint32 Player::resetTalentsCost() const
+uint32 Player::ResetTalentsCost() const
{
// The first time reset costs 1 gold
if (m_resetTalentsCost < 1*GOLD)
@@ -4369,7 +4368,7 @@ uint32 Player::resetTalentsCost() const
}
}
-bool Player::resetTalents(bool no_cost)
+bool Player::ResetTalents(bool no_cost)
{
sScriptMgr->OnPlayerTalentsReset(this, no_cost);
@@ -4389,7 +4388,7 @@ bool Player::resetTalents(bool no_cost)
if (!no_cost && !sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST))
{
- cost = resetTalentsCost();
+ cost = ResetTalentsCost();
if (!HasEnoughMoney(cost))
{
@@ -4426,11 +4425,11 @@ bool Player::resetTalents(bool no_cost)
const SpellInfo* _spellEntry = sSpellMgr->GetSpellInfo(talentInfo->RankID[rank]);
if (!_spellEntry)
continue;
- removeSpell(talentInfo->RankID[rank], true);
+ RemoveSpell(talentInfo->RankID[rank], true);
// search for spells that the talent teaches and unlearn them
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if (_spellEntry->Effects[i].TriggerSpell > 0 && _spellEntry->Effects[i].Effect == SPELL_EFFECT_LEARN_SPELL)
- removeSpell(_spellEntry->Effects[i].TriggerSpell, true);
+ RemoveSpell(_spellEntry->Effects[i].TriggerSpell, true);
// if this talent rank can be found in the PlayerTalentMap, mark the talent as removed so it gets deleted
PlayerTalentMap::iterator plrTalent = m_talents[m_activeSpec]->find(talentInfo->RankID[rank]);
if (plrTalent != m_talents[m_activeSpec]->end())
@@ -6113,7 +6112,7 @@ bool Player::UpdateCraftSkill(uint32 spellid)
if (spellEntry && spellEntry->Mechanic == MECHANIC_DISCOVERY)
{
if (uint32 discoveredSpell = GetSkillDiscoverySpell(_spell_idx->second->skillId, spellid, this))
- learnSpell(discoveredSpell, false);
+ LearnSpell(discoveredSpell, false);
}
uint32 craft_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_CRAFTING);
@@ -6216,7 +6215,7 @@ bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
uint32 bsl = bonusSkillLevels[i];
if (SkillValue < bsl && new_value >= bsl)
{
- learnSkillRewardedSpells(SkillId, new_value);
+ LearnSkillRewardedSpells(SkillId, new_value);
break;
}
}
@@ -6423,7 +6422,7 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal)
SetUInt32Value(PLAYER_SKILL_VALUE_INDEX(itr->second.pos), MAKE_SKILL_VALUE(newVal, maxVal));
if (itr->second.uState != SKILL_NEW)
itr->second.uState = SKILL_CHANGED;
- learnSkillRewardedSpells(id, newVal);
+ LearnSkillRewardedSpells(id, newVal);
// if skill value is going up, update enchantments after setting the new value
if (newVal > currVal)
UpdateSkillEnchantments(id, currVal, newVal);
@@ -6449,55 +6448,57 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal)
for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
if (SkillLineAbilityEntry const* pAbility = sSkillLineAbilityStore.LookupEntry(j))
if (pAbility->skillId == id)
- removeSpell(sSpellMgr->GetFirstSpellInChain(pAbility->spellId));
+ RemoveSpell(sSpellMgr->GetFirstSpellInChain(pAbility->spellId));
}
}
else if (newVal) //add
{
currVal = 0;
for (int i=0; i < PLAYER_MAX_SKILLS; ++i)
- if (!GetUInt32Value(PLAYER_SKILL_INDEX(i)))
{
- SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(id);
- if (!pSkill)
+ if (!GetUInt32Value(PLAYER_SKILL_INDEX(i)))
{
- TC_LOG_ERROR("entities.player.skills", "Skill not found in SkillLineStore: skill #%u", id);
- return;
- }
+ SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(id);
+ if (!pSkill)
+ {
+ TC_LOG_ERROR("entities.player.skills", "Skill not found in SkillLineStore: skill #%u", id);
+ return;
+ }
- SetUInt32Value(PLAYER_SKILL_INDEX(i), MAKE_PAIR32(id, step));
- SetUInt32Value(PLAYER_SKILL_VALUE_INDEX(i), MAKE_SKILL_VALUE(newVal, maxVal));
- UpdateSkillEnchantments(id, currVal, newVal);
- UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL, id);
- UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL, id);
+ SetUInt32Value(PLAYER_SKILL_INDEX(i), MAKE_PAIR32(id, step));
+ SetUInt32Value(PLAYER_SKILL_VALUE_INDEX(i), MAKE_SKILL_VALUE(newVal, maxVal));
+ UpdateSkillEnchantments(id, currVal, newVal);
+ UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL, id);
+ UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL, id);
- // insert new entry or update if not deleted old entry yet
- if (itr != mSkillStatus.end())
- {
- itr->second.pos = i;
- itr->second.uState = SKILL_CHANGED;
- }
- else
- mSkillStatus.insert(SkillStatusMap::value_type(id, SkillStatusData(i, SKILL_NEW)));
+ // insert new entry or update if not deleted old entry yet
+ if (itr != mSkillStatus.end())
+ {
+ itr->second.pos = i;
+ itr->second.uState = SKILL_CHANGED;
+ }
+ else
+ mSkillStatus.insert(SkillStatusMap::value_type(id, SkillStatusData(i, SKILL_NEW)));
- // apply skill bonuses
- SetUInt32Value(PLAYER_SKILL_BONUS_INDEX(i), 0);
+ // apply skill bonuses
+ SetUInt32Value(PLAYER_SKILL_BONUS_INDEX(i), 0);
- // temporary bonuses
- AuraEffectList const& mModSkill = GetAuraEffectsByType(SPELL_AURA_MOD_SKILL);
- for (AuraEffectList::const_iterator j = mModSkill.begin(); j != mModSkill.end(); ++j)
- if ((*j)->GetMiscValue() == int32(id))
+ // temporary bonuses
+ AuraEffectList const& mModSkill = GetAuraEffectsByType(SPELL_AURA_MOD_SKILL);
+ for (AuraEffectList::const_iterator j = mModSkill.begin(); j != mModSkill.end(); ++j)
+ if ((*j)->GetMiscValue() == int32(id))
(*j)->HandleEffect(this, AURA_EFFECT_HANDLE_SKILL, true);
- // permanent bonuses
- AuraEffectList const& mModSkillTalent = GetAuraEffectsByType(SPELL_AURA_MOD_SKILL_TALENT);
- for (AuraEffectList::const_iterator j = mModSkillTalent.begin(); j != mModSkillTalent.end(); ++j)
- if ((*j)->GetMiscValue() == int32(id))
+ // permanent bonuses
+ AuraEffectList const& mModSkillTalent = GetAuraEffectsByType(SPELL_AURA_MOD_SKILL_TALENT);
+ for (AuraEffectList::const_iterator j = mModSkillTalent.begin(); j != mModSkillTalent.end(); ++j)
+ if ((*j)->GetMiscValue() == int32(id))
(*j)->HandleEffect(this, AURA_EFFECT_HANDLE_SKILL, true);
- // Learn all spells for skill
- learnSkillRewardedSpells(id, newVal);
- return;
+ // Learn all spells for skill
+ LearnSkillRewardedSpells(id, newVal);
+ return;
+ }
}
}
}
@@ -9774,7 +9775,7 @@ void Player::SendTalentWipeConfirm(uint64 guid)
{
WorldPacket data(MSG_TALENT_WIPE_CONFIRM, (8+4));
data << uint64(guid);
- uint32 cost = sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST) ? 0 : resetTalentsCost();
+ uint32 cost = sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST) ? 0 : ResetTalentsCost();
data << cost;
GetSession()->SendPacket(&data);
}
@@ -18502,7 +18503,7 @@ void Player::_LoadQuestStatusRewarded(PreparedQueryResult result)
if (quest)
{
// learn rewarded spell if unknown
- learnQuestRewardedSpells(quest);
+ LearnQuestRewardedSpells(quest);
// set rewarded title if any
if (quest->GetCharTitleId())
@@ -18650,7 +18651,7 @@ void Player::_LoadSpells(PreparedQueryResult result)
if (result)
{
do
- addSpell((*result)[0].GetUInt32(), (*result)[1].GetBool(), false, false, (*result)[2].GetBool(), true);
+ AddSpell((*result)[0].GetUInt32(), (*result)[1].GetBool(), false, false, (*result)[2].GetBool(), true);
while (result->NextRow());
}
}
@@ -22061,6 +22062,27 @@ void Player::AddSpellCooldown(uint32 spellid, uint32 itemid, time_t end_time)
m_spellCooldowns[spellid] = sc;
}
+void Player::ModifySpellCooldown(uint32 spellId, int32 cooldown)
+{
+ SpellCooldowns::iterator itr = m_spellCooldowns.find(spellId);
+ if (itr == m_spellCooldowns.end())
+ return;
+
+ time_t now = time(NULL);
+ if (itr->second.end + (cooldown / IN_MILLISECONDS) > now)
+ itr->second.end += (cooldown / IN_MILLISECONDS);
+ else
+ m_spellCooldowns.erase(itr);
+
+ WorldPacket data(SMSG_MODIFY_COOLDOWN, 4 + 8 + 4);
+ data << uint32(spellId); // Spell ID
+ data << uint64(GetGUID()); // Player GUID
+ data << int32(cooldown); // Cooldown mod in milliseconds
+ GetSession()->SendPacket(&data);
+
+ TC_LOG_DEBUG("misc", "ModifySpellCooldown:: Player: %s (GUID: %u) Spell: %u cooldown: %u", GetName().c_str(), GetGUIDLow(), spellId, GetSpellCooldownDelay(spellId));
+}
+
void Player::SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId /*= 0*/, Spell* spell /*= NULL*/, bool setCooldown /*= true*/)
{
// start cooldowns at server side, if any
@@ -23017,7 +23039,7 @@ void Player::ApplyEquipCooldown(Item* pItem)
}
}
-void Player::resetSpells(bool myClassOnly)
+void Player::ResetSpells(bool myClassOnly)
{
// not need after this call
if (HasAtLoginFlag(AT_LOGIN_RESET_SPELLS))
@@ -23066,11 +23088,11 @@ void Player::resetSpells(bool myClassOnly)
}
else
for (PlayerSpellMap::const_iterator iter = smap.begin(); iter != smap.end(); ++iter)
- removeSpell(iter->first, false, false); // only iter->first can be accessed, object by iter->second can be deleted already
+ RemoveSpell(iter->first, false, false); // only iter->first can be accessed, object by iter->second can be deleted already
LearnDefaultSkills();
LearnCustomSpells();
- learnQuestRewardedSpells();
+ LearnQuestRewardedSpells();
}
void Player::LearnCustomSpells()
@@ -23085,9 +23107,9 @@ void Player::LearnCustomSpells()
uint32 tspell = *itr;
TC_LOG_DEBUG("entities.player.loading", "PLAYER (Class: %u Race: %u): Adding initial spell, id = %u", uint32(getClass()), uint32(getRace()), tspell);
if (!IsInWorld()) // will send in INITIAL_SPELLS in list anyway at map add
- addSpell(tspell, true, true, true, false);
+ AddSpell(tspell, true, true, true, false);
else // but send in normal spell in game learn case
- learnSpell(tspell, true);
+ LearnSpell(tspell, true);
}
}
@@ -23153,7 +23175,7 @@ void Player::LearnDefaultSkill(uint32 skillId, uint16 rank)
}
}
-void Player::learnQuestRewardedSpells(Quest const* quest)
+void Player::LearnQuestRewardedSpells(Quest const* quest)
{
int32 spell_id = quest->GetRewSpellCast();
uint32 src_spell_id = quest->GetSrcSpell();
@@ -23233,7 +23255,7 @@ void Player::learnQuestRewardedSpells(Quest const* quest)
CastSpell(this, spell_id, true);
}
-void Player::learnQuestRewardedSpells()
+void Player::LearnQuestRewardedSpells()
{
// learn spells received from quest completing
for (RewardedQuestSet::const_iterator itr = m_RewardedQuests.begin(); itr != m_RewardedQuests.end(); ++itr)
@@ -23242,43 +23264,42 @@ void Player::learnQuestRewardedSpells()
if (!quest)
continue;
- learnQuestRewardedSpells(quest);
+ LearnQuestRewardedSpells(quest);
}
}
-void Player::learnSkillRewardedSpells(uint32 skill_id, uint32 skill_value)
+void Player::LearnSkillRewardedSpells(uint32 skillId, uint32 skillValue)
{
uint32 raceMask = getRaceMask();
uint32 classMask = getClassMask();
for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
{
- SkillLineAbilityEntry const* pAbility = sSkillLineAbilityStore.LookupEntry(j);
- if (!pAbility || pAbility->skillId != skill_id)
+ SkillLineAbilityEntry const* ability = sSkillLineAbilityStore.LookupEntry(j);
+ if (!ability || ability->skillId != skillId)
continue;
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pAbility->spellId);
- if (!spellInfo)
+ if (!sSpellMgr->GetSpellInfo(ability->spellId))
continue;
- if (pAbility->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE && pAbility->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN)
+ if (ability->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE && ability->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN)
continue;
// Check race if set
- if (pAbility->racemask && !(pAbility->racemask & raceMask))
+ if (ability->racemask && !(ability->racemask & raceMask))
continue;
// Check class if set
- if (pAbility->classmask && !(pAbility->classmask & classMask))
+ if (ability->classmask && !(ability->classmask & classMask))
continue;
// need unlearn spell
- if (skill_value < pAbility->req_skill_value && pAbility->AutolearnType == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE)
- removeSpell(pAbility->spellId);
+ if (skillValue < ability->req_skill_value && ability->AutolearnType == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE)
+ RemoveSpell(ability->spellId);
// need learn
else if (!IsInWorld())
- addSpell(pAbility->spellId, true, true, true, false);
+ AddSpell(ability->spellId, true, true, true, false, false, true);
else
- learnSpell(pAbility->spellId, true);
+ LearnSpell(ability->spellId, true, true);
}
}
@@ -24946,12 +24967,12 @@ bool Player::IsKnowHowFlyIn(uint32 mapid, uint32 zone) const
return v_map != 571 || HasSpell(54197); // Cold Weather Flying
}
-void Player::learnSpellHighRank(uint32 spellid)
+void Player::LearnSpellHighestRank(uint32 spellid)
{
- learnSpell(spellid, false);
+ LearnSpell(spellid, false);
if (uint32 next = sSpellMgr->GetNextSpellInChain(spellid))
- learnSpellHighRank(next);
+ LearnSpellHighestRank(next);
}
void Player::_LoadSkills(PreparedQueryResult result)
@@ -24972,7 +24993,10 @@ void Player::_LoadSkills(PreparedQueryResult result)
SkillRaceClassInfoEntry const* rcEntry = GetSkillRaceClassInfo(skill, getRace(), getClass());
if (!rcEntry)
{
- TC_LOG_ERROR("entities.player", "Character %u has skill %u that does not exist.", GetGUIDLow(), skill);
+ TC_LOG_ERROR("entities.player", "Character: %s (GUID: %u Race: %u Class: %u) has skill %u not allowed for his race/class combination",
+ GetName().c_str(), GetGUIDLow(), uint32(getRace()), uint32(getClass()), skill);
+
+ mSkillStatus.insert(SkillStatusMap::value_type(skill, SkillStatusData(0, SKILL_DELETED)));
continue;
}
@@ -25025,7 +25049,7 @@ void Player::_LoadSkills(PreparedQueryResult result)
mSkillStatus.insert(SkillStatusMap::value_type(skill, SkillStatusData(count, SKILL_UNCHANGED)));
- learnSkillRewardedSpells(skill, value);
+ LearnSkillRewardedSpells(skill, value);
++count;
@@ -25333,7 +25357,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
return;
// learn! (other talent ranks will unlearned at learning)
- learnSpell(spellid, false);
+ LearnSpell(spellid, false);
AddTalent(spellid, m_activeSpec, true);
TC_LOG_INFO("entities.player", "TalentID: %u Rank: %u Spell: %u Spec: %u\n", talentId, talentRank, spellid, m_activeSpec);
@@ -26144,11 +26168,11 @@ void Player::ActivateSpec(uint8 spec)
// skip non-existant talent ranks
if (talentInfo->RankID[rank] == 0)
continue;
- removeSpell(talentInfo->RankID[rank], true); // removes the talent, and all dependant, learned, and chained spells..
+ RemoveSpell(talentInfo->RankID[rank], true); // removes the talent, and all dependant, learned, and chained spells..
if (const SpellInfo* _spellEntry = sSpellMgr->GetSpellInfo(talentInfo->RankID[rank]))
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) // search through the SpellInfo for valid trigger spells
if (_spellEntry->Effects[i].TriggerSpell > 0 && _spellEntry->Effects[i].Effect == SPELL_EFFECT_LEARN_SPELL)
- removeSpell(_spellEntry->Effects[i].TriggerSpell, true); // and remove any spells that the talent teaches
+ RemoveSpell(_spellEntry->Effects[i].TriggerSpell, true); // and remove any spells that the talent teaches
// if this talent rank can be found in the PlayerTalentMap, mark the talent as removed so it gets deleted
//PlayerTalentMap::iterator plrTalent = m_talents[m_activeSpec]->find(talentInfo->RankID[rank]);
//if (plrTalent != m_talents[m_activeSpec]->end())
@@ -26191,7 +26215,7 @@ void Player::ActivateSpec(uint8 spec)
// if the talent can be found in the newly activated PlayerTalentMap
if (HasTalent(talentInfo->RankID[rank], m_activeSpec))
{
- learnSpell(talentInfo->RankID[rank], false); // add the talent to the PlayerSpellMap
+ LearnSpell(talentInfo->RankID[rank], false); // add the talent to the PlayerSpellMap
spentTalents += (rank + 1); // increment the spentTalents count
}
}
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 5f500b7f1d8..d815b37f98f 100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -1578,16 +1578,16 @@ class Player : public Unit, public GridObject<Player>
void SendProficiency(ItemClass itemClass, uint32 itemSubclassMask);
void SendInitialSpells();
- bool addSpell(uint32 spellId, bool active, bool learning, bool dependent, bool disabled, bool loading = false);
- void learnSpell(uint32 spell_id, bool dependent);
- void removeSpell(uint32 spell_id, bool disabled = false, bool learn_low_rank = true);
- void resetSpells(bool myClassOnly = false);
+ bool AddSpell(uint32 spellId, bool active, bool learning, bool dependent, bool disabled, bool loading = false, bool fromSkill = false);
+ void LearnSpell(uint32 spell_id, bool dependent, bool fromSkill = false);
+ void RemoveSpell(uint32 spell_id, bool disabled = false, bool learn_low_rank = true);
+ void ResetSpells(bool myClassOnly = false);
void LearnCustomSpells();
void LearnDefaultSkills();
void LearnDefaultSkill(uint32 skillId, uint16 rank);
- void learnQuestRewardedSpells();
- void learnQuestRewardedSpells(Quest const* quest);
- void learnSpellHighRank(uint32 spellid);
+ void LearnQuestRewardedSpells();
+ void LearnQuestRewardedSpells(Quest const* quest);
+ void LearnSpellHighestRank(uint32 spellid);
void AddTemporarySpell(uint32 spellId);
void RemoveTemporarySpell(uint32 spellId);
void SetReputation(uint32 factionentry, uint32 value);
@@ -1595,8 +1595,8 @@ class Player : public Unit, public GridObject<Player>
std::string const& GetGuildName();
uint32 GetFreeTalentPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS1); }
void SetFreeTalentPoints(uint32 points);
- bool resetTalents(bool no_cost = false);
- uint32 resetTalentsCost() const;
+ bool ResetTalents(bool no_cost = false);
+ uint32 ResetTalentsCost() const;
void InitTalentForLevel();
void BuildPlayerTalentsInfoData(WorldPacket* data);
void BuildPetTalentsInfoData(WorldPacket* data);
@@ -1647,6 +1647,7 @@ class Player : public Unit, public GridObject<Player>
uint32 GetSpellCooldownDelay(uint32 spell_id) const;
void AddSpellAndCategoryCooldowns(SpellInfo const* spellInfo, uint32 itemId, Spell* spell = NULL, bool infinityCooldown = false);
void AddSpellCooldown(uint32 spell_id, uint32 itemid, time_t end_time);
+ void ModifySpellCooldown(uint32 spellId, int32 cooldown);
void SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId = 0, Spell* spell = NULL, bool setCooldown = true);
void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs);
void RemoveSpellCooldown(uint32 spell_id, bool update = false);
@@ -1889,7 +1890,7 @@ class Player : public Unit, public GridObject<Player>
int16 GetSkillTempBonusValue(uint32 skill) const;
uint16 GetSkillStep(uint16 skill) const; // 0...6
bool HasSkill(uint32 skill) const;
- void learnSkillRewardedSpells(uint32 id, uint32 value);
+ void LearnSkillRewardedSpells(uint32 skillId, uint32 skillValue);
WorldLocation& GetTeleportDest() { return m_teleport_dest; }
bool IsBeingTeleported() const { return mSemaphoreTeleport_Near || mSemaphoreTeleport_Far; }
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 72c1a071487..730bafa4c06 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -6889,31 +6889,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
}
break;
}
- // Item - Shaman T10 Elemental 2P Bonus
- case 70811:
- {
- // Lightning Bolt & Chain Lightning
- if (procSpell->SpellFamilyFlags[0] & 0x3)
- {
- if (ToPlayer()->HasSpellCooldown(16166))
- {
- uint32 newCooldownDelay = ToPlayer()->GetSpellCooldownDelay(16166);
- if (newCooldownDelay < 3)
- newCooldownDelay = 0;
- else
- newCooldownDelay -= 2;
- ToPlayer()->AddSpellCooldown(16166, 0, uint32(time(NULL) + newCooldownDelay));
-
- WorldPacket data(SMSG_MODIFY_COOLDOWN, 4+8+4);
- data << uint32(16166); // Spell ID
- data << uint64(GetGUID()); // Player GUID
- data << int32(-2000); // Cooldown mod in milliseconds
- ToPlayer()->GetSession()->SendPacket(&data);
- return true;
- }
- }
- return false;
- }
// Item - Shaman T10 Elemental 4P Bonus
case 70817:
{
@@ -11156,6 +11131,9 @@ bool Unit::IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) cons
if (!spellInfo || !spellInfo->Effects[index].IsEffect())
return false;
+ if (spellInfo->Attributes & SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY)
+ return false;
+
// If m_immuneToEffect type contain this effect type, IMMUNE effect.
uint32 effect = spellInfo->Effects[index].Effect;
SpellImmuneList const& effectList = m_spellImmune[IMMUNITY_EFFECT];
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index 45ecbf0c3df..00106d971ec 100644
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -400,7 +400,6 @@ bool Group::AddMember(Player* player)
stmt->setUInt8(4, member.roles);
CharacterDatabase.Execute(stmt);
-
}
SendUpdate();
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index 9ad382b4686..6c4c657ba2c 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -1003,13 +1003,13 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
// Apply at_login requests
if (pCurrChar->HasAtLoginFlag(AT_LOGIN_RESET_SPELLS))
{
- pCurrChar->resetSpells();
+ pCurrChar->ResetSpells();
SendNotification(LANG_RESET_SPELLS);
}
if (pCurrChar->HasAtLoginFlag(AT_LOGIN_RESET_TALENTS))
{
- pCurrChar->resetTalents(true);
+ pCurrChar->ResetTalents(true);
pCurrChar->SendTalentsInfoData(false); // original talents send already in to SendInitialPacketsBeforeAddToMap, resend reset state
SendNotification(LANG_RESET_TALENTS);
}
diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp
index d8a518a24db..4f65bcee4e5 100644
--- a/src/server/game/Handlers/NPCHandler.cpp
+++ b/src/server/game/Handlers/NPCHandler.cpp
@@ -288,7 +288,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData)
if (trainer_spell->IsCastable())
_player->CastSpell(_player, trainer_spell->spell, true);
else
- _player->learnSpell(spellId, false);
+ _player->LearnSpell(spellId, false);
WorldPacket data(SMSG_TRAINER_BUY_SUCCEEDED, 12);
data << uint64(guid);
diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp
index 8a94753b692..92c7c60bca0 100644
--- a/src/server/game/Handlers/SkillHandler.cpp
+++ b/src/server/game/Handlers/SkillHandler.cpp
@@ -80,7 +80,7 @@ void WorldSession::HandleTalentWipeConfirmOpcode(WorldPacket& recvData)
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- if (!(_player->resetTalents()))
+ if (!(_player->ResetTalents()))
{
WorldPacket data(MSG_TALENT_WIPE_CONFIRM, 8+4); //you have not any talent
data << uint64(0);
diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp
index d21ebca9a91..adef21fe7a2 100644
--- a/src/server/game/Instances/InstanceScript.cpp
+++ b/src/server/game/Instances/InstanceScript.cpp
@@ -148,7 +148,7 @@ void InstanceScript::AddDoor(GameObject* door, bool add)
if (add)
{
- data.bossInfo->door[data.type].insert(door);
+ data.bossInfo->door[data.type].insert(door->GetGUID());
switch (data.boundary)
{
default:
@@ -173,7 +173,7 @@ void InstanceScript::AddDoor(GameObject* door, bool add)
}
}
else
- data.bossInfo->door[data.type].erase(door);
+ data.bossInfo->door[data.type].erase(door->GetGUID());
}
if (add)
@@ -187,9 +187,9 @@ void InstanceScript::AddMinion(Creature* minion, bool add)
return;
if (add)
- itr->second.bossInfo->minion.insert(minion);
+ itr->second.bossInfo->minion.insert(minion->GetGUID());
else
- itr->second.bossInfo->minion.erase(minion);
+ itr->second.bossInfo->minion.erase(minion->GetGUID());
}
bool InstanceScript::SetBossState(uint32 id, EncounterState state)
@@ -210,8 +210,9 @@ bool InstanceScript::SetBossState(uint32 id, EncounterState state)
if (state == DONE)
for (MinionSet::iterator i = bossInfo->minion.begin(); i != bossInfo->minion.end(); ++i)
- if ((*i)->isWorldBoss() && (*i)->IsAlive())
- return false;
+ if (Creature* minion = instance->GetCreature(*i))
+ if (minion->isWorldBoss() && minion->IsAlive())
+ return false;
bossInfo->state = state;
SaveToDB();
@@ -219,10 +220,12 @@ bool InstanceScript::SetBossState(uint32 id, EncounterState state)
for (uint32 type = 0; type < MAX_DOOR_TYPES; ++type)
for (DoorSet::iterator i = bossInfo->door[type].begin(); i != bossInfo->door[type].end(); ++i)
- UpdateDoorState(*i);
+ if (GameObject* door = instance->GetGameObject(*i))
+ UpdateDoorState(door);
for (MinionSet::iterator i = bossInfo->minion.begin(); i != bossInfo->minion.end(); ++i)
- UpdateMinionState(*i, state);
+ if (Creature* minion = instance->GetCreature(*i))
+ UpdateMinionState(minion, state);
return true;
}
diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h
index 9e11c566c22..f379572961c 100644
--- a/src/server/game/Instances/InstanceScript.h
+++ b/src/server/game/Instances/InstanceScript.h
@@ -35,8 +35,8 @@ class Player;
class GameObject;
class Creature;
-typedef std::set<GameObject*> DoorSet;
-typedef std::set<Creature*> MinionSet;
+typedef std::set<uint64> DoorSet;
+typedef std::set<uint64> MinionSet;
enum EncounterFrameType
{
diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp
index 1de13d137c4..9c023b86bc9 100644
--- a/src/server/game/Maps/MapManager.cpp
+++ b/src/server/game/Maps/MapManager.cpp
@@ -131,21 +131,15 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
if (!instance)
return false;
- Difficulty targetDifficulty = player->GetDifficulty(entry->IsRaid());
- //The player has a heroic mode and tries to enter into instance which has no a heroic mode
- MapDifficulty const* mapDiff = GetMapDifficultyData(entry->MapID, targetDifficulty);
+ Difficulty targetDifficulty, requestedDifficulty;
+ targetDifficulty = requestedDifficulty = player->GetDifficulty(entry->IsRaid());
+ // Get the highest available difficulty if current setting is higher than the instance allows
+ MapDifficulty const* mapDiff = GetDownscaledMapDifficultyData(entry->MapID, targetDifficulty);
if (!mapDiff)
{
- // Send aborted message for dungeons
- if (entry->IsNonRaidDungeon())
- {
- player->SendTransferAborted(mapid, TRANSFER_ABORT_DIFFICULTY, player->GetDungeonDifficulty());
- return false;
- }
- else // attempt to downscale
- mapDiff = GetDownscaledMapDifficultyData(entry->MapID, targetDifficulty);
+ player->SendTransferAborted(mapid, TRANSFER_ABORT_DIFFICULTY, requestedDifficulty);
+ return false;
}
- // FIXME: mapDiff is never used
//Bypass checks for GMs
if (player->IsGameMaster())
diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp
index 3140fc23296..f2e1bb518d4 100644
--- a/src/server/game/Movement/PathGenerator.cpp
+++ b/src/server/game/Movement/PathGenerator.cpp
@@ -477,11 +477,29 @@ void PathGenerator::BuildPointPath(const float *startPoint, const float *endPoin
dtStatus dtResult = DT_FAILURE;
if (_straightLine)
{
- // if the path is a straight line then start and end position are enough
dtResult = DT_SUCCESS;
- pointCount = 2;
- memcpy(&pathPoints[0], startPoint, sizeof(float)* 3);
- memcpy(&pathPoints[3], endPoint, sizeof(float)* 3);
+ pointCount = 1;
+ memcpy(&pathPoints[VERTEX_SIZE * 0], startPoint, sizeof(float)* 3); // first point
+
+ // path has to be split into polygons with dist SMOOTH_PATH_STEP_SIZE between them
+ G3D::Vector3 startVec = G3D::Vector3(startPoint[0], startPoint[1], startPoint[2]);
+ G3D::Vector3 endVec = G3D::Vector3(endPoint[0], endPoint[1], endPoint[2]);
+ G3D::Vector3 diffVec = (endVec - startVec);
+ G3D::Vector3 prevVec = startVec;
+ float len = diffVec.length();
+ diffVec *= SMOOTH_PATH_STEP_SIZE / len;
+ while (len > SMOOTH_PATH_STEP_SIZE)
+ {
+ len -= SMOOTH_PATH_STEP_SIZE;
+ prevVec += diffVec;
+ pathPoints[VERTEX_SIZE * pointCount + 0] = prevVec.x;
+ pathPoints[VERTEX_SIZE * pointCount + 1] = prevVec.y;
+ pathPoints[VERTEX_SIZE * pointCount + 2] = prevVec.z;
+ ++pointCount;
+ }
+
+ memcpy(&pathPoints[VERTEX_SIZE * pointCount], endPoint, sizeof(float)* 3); // last point
+ ++pointCount;
}
else if (_useStraightPath)
{
diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp
index f1359b70aa6..ce01273ab3b 100644
--- a/src/server/game/Scripting/ScriptLoader.cpp
+++ b/src/server/game/Scripting/ScriptLoader.cpp
@@ -263,7 +263,6 @@ void AddSC_instance_zulgurub();
//void AddSC_alterac_mountains();
void AddSC_arathi_highlands();
void AddSC_blasted_lands();
-void AddSC_boss_kruul();
void AddSC_burning_steppes();
void AddSC_duskwood();
void AddSC_eastern_plaguelands();
@@ -978,7 +977,6 @@ void AddEasternKingdomsScripts()
//AddSC_alterac_mountains();
AddSC_arathi_highlands();
AddSC_blasted_lands();
- AddSC_boss_kruul();
AddSC_burning_steppes();
AddSC_duskwood();
AddSC_eastern_plaguelands();
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 0d7dd8819af..d223425a027 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -1305,6 +1305,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
void Spell::SelectImplicitTargetDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType)
{
+ ASSERT(m_targets.GetObjectTarget() && "Spell::SelectImplicitTargetDestTargets - no explicit object target available!");
WorldObject* target = m_targets.GetObjectTarget();
SpellDestination dest(*target);
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index abeeb394218..4c0d5770cea 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -866,7 +866,10 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
if (spellInfo->GetExplicitTargetMask() & TARGET_FLAG_DEST_LOCATION)
targets.SetDst(m_targets);
- targets.SetUnitTarget(m_caster);
+ if (Unit* target = m_targets.GetUnitTarget())
+ targets.SetUnitTarget(target);
+ else
+ targets.SetUnitTarget(m_caster);
}
CustomSpellValues values;
@@ -1227,7 +1230,7 @@ void Spell::EffectUnlearnSpecialization(SpellEffIndex effIndex)
Player* player = unitTarget->ToPlayer();
uint32 spellToUnlearn = m_spellInfo->Effects[effIndex].TriggerSpell;
- player->removeSpell(spellToUnlearn);
+ player->RemoveSpell(spellToUnlearn);
TC_LOG_DEBUG("spells", "Spell: Player %u has unlearned spell %u from NpcGUID: %u", player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow());
}
@@ -2370,7 +2373,7 @@ void Spell::EffectLearnSpell(SpellEffIndex effIndex)
Player* player = unitTarget->ToPlayer();
uint32 spellToLearn = (m_spellInfo->Id == 483 || m_spellInfo->Id == 55884) ? damage : m_spellInfo->Effects[effIndex].TriggerSpell;
- player->learnSpell(spellToLearn, false);
+ player->LearnSpell(spellToLearn, false);
TC_LOG_DEBUG("spells", "Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow());
}
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 08bccd75f0c..631c4e61d5f 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -1781,7 +1781,7 @@ void World::SetInitialWorldSettings()
///- Initialize Battlegrounds
TC_LOG_INFO("server.loading", "Starting Battleground System");
- sBattlegroundMgr->CreateInitialBattlegrounds();
+ sBattlegroundMgr->LoadBattlegroundTemplates();
sBattlegroundMgr->InitAutomaticArenaPointDistribution();
///- Initialize outdoor pvp
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp
index 1121e4d0a2f..4b7aa8ecad3 100644
--- a/src/server/scripts/Commands/cs_account.cpp
+++ b/src/server/scripts/Commands/cs_account.cpp
@@ -51,8 +51,8 @@ public:
};
static ChatCommand accountLockCommandTable[] =
{
- { "country", rbac::RBAC_PERM_COMMAND_ACCOUNT_LOCK_COUNTRY, true, &HandleAccountLockCountryCommand, "", NULL },
- { "ip", rbac::RBAC_PERM_COMMAND_ACCOUNT_LOCK_IP, true, &HandleAccountLockIpCommand, "", NULL },
+ { "country", rbac::RBAC_PERM_COMMAND_ACCOUNT_LOCK_COUNTRY, false, &HandleAccountLockCountryCommand, "", NULL },
+ { "ip", rbac::RBAC_PERM_COMMAND_ACCOUNT_LOCK_IP, false, &HandleAccountLockIpCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand accountCommandTable[] =
diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp
index 03d10149ae5..88acd491427 100644
--- a/src/server/scripts/Commands/cs_learn.cpp
+++ b/src/server/scripts/Commands/cs_learn.cpp
@@ -112,9 +112,9 @@ public:
}
if (allRanks)
- targetPlayer->learnSpellHighRank(spell);
+ targetPlayer->LearnSpellHighestRank(spell);
else
- targetPlayer->learnSpell(spell, false);
+ targetPlayer->LearnSpell(spell, false);
if (GetTalentSpellCost(spellInfo->GetFirstRankSpell()->Id))
targetPlayer->SendTalentsInfoData(false);
@@ -133,7 +133,7 @@ public:
if (!spellInfo->IsAbilityOfSkillType(SKILL_INTERNAL))
continue;
- handler->GetSession()->GetPlayer()->learnSpell(i, false);
+ handler->GetSession()->GetPlayer()->LearnSpell(i, false);
}
handler->SendSysMessage(LANG_LEARNING_GM_SKILLS);
@@ -184,7 +184,7 @@ public:
if (!SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer(), false))
continue;
- handler->GetSession()->GetPlayer()->learnSpell(spellInfo->Id, false);
+ handler->GetSession()->GetPlayer()->LearnSpell(spellInfo->Id, false);
}
handler->SendSysMessage(LANG_COMMAND_LEARN_CLASS_SPELLS);
@@ -228,7 +228,7 @@ public:
continue;
// learn highest rank of talent and learn all non-talent spell ranks (recursive by tree)
- player->learnSpellHighRank(spellId);
+ player->LearnSpellHighestRank(spellId);
player->AddTalent(spellId, player->GetActiveSpec(), true);
}
@@ -320,7 +320,7 @@ public:
{
// skipping UNIVERSAL language (0)
for (uint8 i = 1; i < LANGUAGES_COUNT; ++i)
- handler->GetSession()->GetPlayer()->learnSpell(lang_description[i].spell_id, false);
+ handler->GetSession()->GetPlayer()->LearnSpell(lang_description[i].spell_id, false);
handler->SendSysMessage(LANG_COMMAND_LEARN_ALL_LANG);
return true;
@@ -334,7 +334,7 @@ public:
target->LearnDefaultSkills();
target->LearnCustomSpells();
- target->learnQuestRewardedSpells();
+ target->LearnQuestRewardedSpells();
handler->PSendSysMessage(LANG_COMMAND_LEARN_ALL_DEFAULT_AND_QUEST, handler->GetNameLink(target).c_str());
return true;
@@ -470,7 +470,7 @@ public:
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, player, false))
continue;
- player->learnSpell(skillLine->spellId, false);
+ player->LearnSpell(skillLine->spellId, false);
}
}
@@ -499,7 +499,7 @@ public:
spellId = sSpellMgr->GetFirstSpellInChain(spellId);
if (target->HasSpell(spellId))
- target->removeSpell(spellId, false, !allRanks);
+ target->RemoveSpell(spellId, false, !allRanks);
else
handler->SendSysMessage(LANG_FORGET_SPELL);
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp
index 89dc08d5737..f39dd0f0616 100644
--- a/src/server/scripts/Commands/cs_reload.cpp
+++ b/src/server/scripts/Commands/cs_reload.cpp
@@ -25,6 +25,7 @@ EndScriptData */
#include "AccountMgr.h"
#include "AchievementMgr.h"
#include "AuctionHouseMgr.h"
+#include "BattlegroundMgr.h"
#include "Chat.h"
#include "CreatureTextMgr.h"
#include "DisableMgr.h"
@@ -74,6 +75,7 @@ public:
{ "areatrigger_tavern", rbac::RBAC_PERM_COMMAND_RELOAD_AREATRIGGER_TAVERN, true, &HandleReloadAreaTriggerTavernCommand, "", NULL },
{ "areatrigger_teleport", rbac::RBAC_PERM_COMMAND_RELOAD_AREATRIGGER_TELEPORT, true, &HandleReloadAreaTriggerTeleportCommand, "", NULL },
{ "autobroadcast", rbac::RBAC_PERM_COMMAND_RELOAD_AUTOBROADCAST, true, &HandleReloadAutobroadcastCommand, "", NULL },
+ { "battleground_template", rbac::RBAC_PERM_COMMAND_RELOAD_BATTLEGROUND_TEMPLATE, true, &HandleReloadBattlegroundTemplate, "", NULL },
{ "broadcast_text", rbac::RBAC_PERM_COMMAND_RELOAD_BROADCAST_TEXT, true, &HandleReloadBroadcastTextCommand, "", NULL },
{ "command", rbac::RBAC_PERM_COMMAND_RELOAD_COMMAND, true, &HandleReloadCommandCommand, "", NULL },
{ "conditions", rbac::RBAC_PERM_COMMAND_RELOAD_CONDITIONS, true, &HandleReloadConditions, "", NULL },
@@ -200,6 +202,7 @@ public:
HandleReloadVehicleTemplateAccessoryCommand(handler, "");
HandleReloadAutobroadcastCommand(handler, "");
+ HandleReloadBattlegroundTemplate(handler, "");
return true;
}
@@ -376,6 +379,14 @@ public:
return true;
}
+ static bool HandleReloadBattlegroundTemplate(ChatHandler* handler, char const* /*args*/)
+ {
+ TC_LOG_INFO("misc", "Re-Loading Battleground Templates...");
+ sBattlegroundMgr->LoadBattlegroundTemplates();
+ handler->SendGlobalGMSysMessage("DB table `battleground_template` reloaded.");
+ return true;
+ }
+
static bool HandleReloadBroadcastTextCommand(ChatHandler* handler, const char* /*args*/)
{
TC_LOG_INFO("misc", "Re-Loading Broadcast texts...");
diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp
index 279f9c2ef4c..00a669609f9 100644
--- a/src/server/scripts/Commands/cs_reset.cpp
+++ b/src/server/scripts/Commands/cs_reset.cpp
@@ -165,7 +165,7 @@ public:
if (target)
{
- target->resetSpells(/* bool myClassOnly */);
+ target->ResetSpells(/* bool myClassOnly */);
ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_SPELLS);
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target)
@@ -233,7 +233,7 @@ public:
if (target)
{
- target->resetTalents(true);
+ target->ResetTalents(true);
target->SendTalentsInfoData(false);
ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_TALENTS);
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target)
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
index 4be139c2ee9..2bd43e7283c 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
@@ -212,13 +212,12 @@ public:
std::list<Creature*> creatureList;
GetCreatureListWithEntryInGrid(creatureList, me, NPC_BLACKHAND_INCARCERATOR, 35.0f);
for (std::list<Creature*>::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
- if (Creature* creatureList = *itr)
+ if (Creature* creature = *itr)
{
- if (!creatureList->IsAlive())
- {
- creatureList->Respawn();
- }
- creatureList->AI()->SetData(1, 1);
+ if (!creature->IsAlive())
+ creature->Respawn();
+
+ creature->AI()->SetData(1, 1);
}
me->AddAura(SPELL_ENCAGED_EMBERSEER, me);
instance->SetBossState(DATA_PYROGAURD_EMBERSEER, NOT_STARTED);
@@ -231,8 +230,8 @@ public:
GetCreatureListWithEntryInGrid(creatureList, me, NPC_BLACKHAND_INCARCERATOR, 35.0f);
for (std::list<Creature*>::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
{
- if (Creature* creatureList = *itr)
- creatureList->AI()->SetData(1, 1);
+ if (Creature* creature = *itr)
+ creature->AI()->SetData(1, 1);
}
events.ScheduleEvent(EVENT_PRE_FIGHT_2, 32000);
break;
@@ -355,9 +354,7 @@ public:
}
if (data == 1 && value == 2)
- {
_events.ScheduleEvent(EVENT_ENCAGED_EMBERSEER, 1000);
- }
}
void EnterCombat(Unit* /*who*/) override
@@ -371,8 +368,8 @@ public:
GetCreatureListWithEntryInGrid(creatureList, me, NPC_BLACKHAND_INCARCERATOR, 60.0f);
for (std::list<Creature*>::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
{
- if (Creature* creatureList = *itr)
- creatureList->SetInCombatWithZone(); // AI()->AttackStart(me->GetVictim());
+ if (Creature* creature = *itr)
+ creature->SetInCombatWithZone(); // AI()->AttackStart(me->GetVictim());
}
_events.ScheduleEvent(EVENT_STRIKE, urand(8000, 16000));
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp
index b3a55e1fe4a..555eac21c43 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp
@@ -410,24 +410,24 @@ public:
void Dragonspireroomstore()
{
- uint8 creaturecount;
+ uint8 creatureCount;
for (uint8 i = 0; i < 7; ++i)
{
- creaturecount = 0;
+ creatureCount = 0;
if (GameObject* rune = instance->GetGameObject(go_roomrunes[i]))
{
- for (uint8 ii = 0; ii < 3; ++ii)
+ for (uint8 j = 0; j < 3; ++j)
{
std::list<Creature*> creatureList;
- GetCreatureListWithEntryInGrid(creatureList, rune, DragonspireMobs[ii], 15.0f);
+ GetCreatureListWithEntryInGrid(creatureList, rune, DragonspireMobs[j], 15.0f);
for (std::list<Creature*>::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
{
- if (Creature* creatureList = *itr)
+ if (Creature* creature = *itr)
{
- runecreaturelist[i] [creaturecount] = creatureList->GetGUID();
- ++creaturecount;
+ runecreaturelist[i][creatureCount] = creature->GetGUID();
+ ++creatureCount;
}
}
}
diff --git a/src/server/scripts/EasternKingdoms/CMakeLists.txt b/src/server/scripts/EasternKingdoms/CMakeLists.txt
index 4adb087921b..ef2e9fceb21 100644
--- a/src/server/scripts/EasternKingdoms/CMakeLists.txt
+++ b/src/server/scripts/EasternKingdoms/CMakeLists.txt
@@ -85,7 +85,6 @@ set(scripts_STAT_SRCS
EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp
EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp
EasternKingdoms/zone_isle_of_queldanas.cpp
- EasternKingdoms/boss_kruul.cpp
EasternKingdoms/ZulGurub/boss_hakkar.cpp
EasternKingdoms/ZulGurub/boss_mandokir.cpp
EasternKingdoms/ZulGurub/boss_marli.cpp
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
index 3b499b649cf..256ab06a7b7 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
@@ -84,29 +84,20 @@ public:
InstanceScript* instance;
- uint64 TerestianGUID;
-
uint32 AmplifyTimer;
void Reset() override
{
- TerestianGUID = 0;
AmplifyTimer = 2000;
}
- void EnterCombat(Unit* /*who*/) override
- {
- }
+ void EnterCombat(Unit* /*who*/) override { }
void JustDied(Unit* /*killer*/) override
{
- uint64 TerestianGUID = instance->GetData64(DATA_TERESTIAN);
- if (TerestianGUID)
- {
- Unit* Terestian = ObjectAccessor::GetUnit(*me, TerestianGUID);
- if (Terestian && Terestian->IsAlive())
- DoCast(Terestian, SPELL_BROKEN_PACT, true);
- }
+ Creature* Terestian = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_TERESTIAN));
+ if (Terestian && Terestian->IsAlive())
+ DoCast(Terestian, SPELL_BROKEN_PACT, true);
}
void UpdateAI(uint32 diff) override
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
index 787bf7584e5..f18c0aac8bb 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* 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
@@ -16,15 +15,9 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Arcanist_Doan
-SD%Complete: 100
-SDComment:
-SDCategory: Scarlet Monastery
-EndScriptData */
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "scarlet_monastery.h"
enum Yells
{
@@ -34,103 +27,100 @@ enum Yells
enum Spells
{
- SPELL_POLYMORPH = 13323,
- SPELL_AOESILENCE = 8988,
- SPELL_ARCANEEXPLOSION = 9433,
- SPELL_FIREAOE = 9435,
- SPELL_ARCANEBUBBLE = 9438
+ SPELL_SILENCE = 8988,
+ SPELL_ARCANE_EXPLOSION = 9433,
+ SPELL_DETONATION = 9435,
+ SPELL_ARCANE_BUBBLE = 9438,
+ SPELL_POLYMORPH = 13323
};
-class boss_arcanist_doan : public CreatureScript
+enum Events
{
-public:
- boss_arcanist_doan() : CreatureScript("boss_arcanist_doan") { }
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new boss_arcanist_doanAI(creature);
- }
-
- struct boss_arcanist_doanAI : public ScriptedAI
- {
- boss_arcanist_doanAI(Creature* creature) : ScriptedAI(creature) { }
-
- uint32 Polymorph_Timer;
- uint32 AoESilence_Timer;
- uint32 ArcaneExplosion_Timer;
- bool bCanDetonate;
- bool bShielded;
-
- void Reset() override
- {
- Polymorph_Timer = 20000;
- AoESilence_Timer = 15000;
- ArcaneExplosion_Timer = 3000;
- bCanDetonate = false;
- bShielded = false;
- }
+ EVENT_SILENCE = 1,
+ EVENT_ARCANE_EXPLOSION = 2,
+ EVENT_ARCANE_BUBBLE = 3,
+ EVENT_POLYMORPH = 4
+};
- void EnterCombat(Unit* /*who*/) override
- {
- Talk(SAY_AGGRO);
- }
+class boss_arcanist_doan : public CreatureScript
+{
+ public:
+ boss_arcanist_doan() : CreatureScript("boss_arcanist_doan") { }
- void UpdateAI(uint32 diff) override
+ struct boss_arcanist_doanAI : public BossAI
{
- if (!UpdateVictim())
- return;
-
- if (bShielded && bCanDetonate)
+ boss_arcanist_doanAI(Creature* creature) : BossAI(creature, DATA_ARCANIST_DOAN)
{
- DoCast(me, SPELL_FIREAOE);
- bCanDetonate = false;
+ _healthAbove50Pct = true;
}
- if (me->HasAura(SPELL_ARCANEBUBBLE))
- return;
-
- //If we are <50% hp cast Arcane Bubble
- if (!bShielded && !HealthAbovePct(50))
+ void Reset() override
{
- //wait if we already casting
- if (me->IsNonMeleeSpellCast(false))
- return;
-
- Talk(SAY_SPECIALAE);
- DoCast(me, SPELL_ARCANEBUBBLE);
-
- bCanDetonate = true;
- bShielded = true;
+ _Reset();
+ _healthAbove50Pct = true;
}
- if (Polymorph_Timer <= diff)
+ void EnterCombat(Unit* /*who*/) override
{
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
- DoCast(target, SPELL_POLYMORPH);
+ _EnterCombat();
+ Talk(SAY_AGGRO);
- Polymorph_Timer = 20000;
+ events.ScheduleEvent(EVENT_SILENCE, 15 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 3 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_POLYMORPH, 30 * IN_MILLISECONDS);
}
- else Polymorph_Timer -= diff;
- //AoESilence_Timer
- if (AoESilence_Timer <= diff)
+ void UpdateAI(uint32 diff) override
{
- DoCastVictim(SPELL_AOESILENCE);
- AoESilence_Timer = urand(15000, 20000);
- }
- else AoESilence_Timer -= diff;
+ if (!UpdateVictim())
+ return;
- //ArcaneExplosion_Timer
- if (ArcaneExplosion_Timer <= diff)
- {
- DoCastVictim(SPELL_ARCANEEXPLOSION);
- ArcaneExplosion_Timer = 8000;
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_SILENCE:
+ DoCastVictim(SPELL_SILENCE);
+ events.ScheduleEvent(EVENT_SILENCE, urand(15, 20) * IN_MILLISECONDS);
+ break;
+ case EVENT_ARCANE_EXPLOSION:
+ DoCastVictim(SPELL_ARCANE_EXPLOSION);
+ events.ScheduleEvent(EVENT_SILENCE, 8 * IN_MILLISECONDS);
+ break;
+ case EVENT_POLYMORPH:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 30.0f, true))
+ DoCast(target, SPELL_POLYMORPH);
+ events.ScheduleEvent(EVENT_POLYMORPH, 20 * IN_MILLISECONDS);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (_healthAbove50Pct && HealthBelowPct(50))
+ {
+ _healthAbove50Pct = false;
+ Talk(SAY_SPECIALAE);
+ DoCast(me, SPELL_ARCANE_BUBBLE);
+ DoCastAOE(SPELL_DETONATION);
+ }
+
+ DoMeleeAttackIfReady();
}
- else ArcaneExplosion_Timer -= diff;
- DoMeleeAttackIfReady();
+ private:
+ bool _healthAbove50Pct;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const override
+ {
+ return new boss_arcanist_doanAI(creature);
}
- };
};
void AddSC_boss_arcanist_doan()
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h
index cd5a74ee478..bdac6b089fd 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h
@@ -30,7 +30,8 @@ enum DataTypes
DATA_HORSEMAN_EVENT = 5,
GAMEOBJECT_PUMPKIN_SHRINE = 6,
- DATA_VORREL = 7
+ DATA_VORREL = 7,
+ DATA_ARCANIST_DOAN = 8
};
#endif // SCARLET_M_
diff --git a/src/server/scripts/EasternKingdoms/boss_kruul.cpp b/src/server/scripts/EasternKingdoms/boss_kruul.cpp
deleted file mode 100644
index 13f9f76532e..00000000000
--- a/src/server/scripts/EasternKingdoms/boss_kruul.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- *
- * 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/>.
- */
-
-/* ScriptData
-SDName: Boss_Kruul
-SD%Complete: 100
-SDComment: Highlord Kruul are presumably no longer in-game on regular bases, however future events could bring him back.
-SDCategory: Bosses
-EndScriptData */
-
-#include "ScriptMgr.h"
-#include "ScriptedCreature.h"
-
-enum Spells
-{
- SPELL_SHADOWVOLLEY = 21341,
- SPELL_CLEAVE = 20677,
- SPELL_THUNDERCLAP = 23931,
- SPELL_TWISTEDREFLECTION = 21063,
- SPELL_VOIDBOLT = 21066,
- SPELL_RAGE = 21340,
- SPELL_CAPTURESOUL = 21054
-};
-
-class boss_kruul : public CreatureScript
-{
-public:
- boss_kruul() : CreatureScript("boss_kruul") { }
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new boss_kruulAI(creature);
- }
-
- struct boss_kruulAI : public ScriptedAI
- {
- boss_kruulAI(Creature* creature) : ScriptedAI(creature) { }
-
- uint32 ShadowVolley_Timer;
- uint32 Cleave_Timer;
- uint32 ThunderClap_Timer;
- uint32 TwistedReflection_Timer;
- uint32 VoidBolt_Timer;
- uint32 Rage_Timer;
- uint32 Hound_Timer;
-
- void Reset() override
- {
- ShadowVolley_Timer = 10000;
- Cleave_Timer = 14000;
- ThunderClap_Timer = 20000;
- TwistedReflection_Timer = 25000;
- VoidBolt_Timer = 30000;
- Rage_Timer = 60000; //Cast rage after 1 minute
- Hound_Timer = 8000;
- }
-
- void EnterCombat(Unit* /*who*/) override
- {
- }
-
- void KilledUnit(Unit* /*victim*/) override
- {
- // When a player, pet or totem gets killed, Lord Kazzak casts this spell to instantly regenerate 70, 000 health.
- DoCast(me, SPELL_CAPTURESOUL);
- }
-
- void SummonHounds(Unit* victim)
- {
- if (Creature* Hound = DoSpawnCreature(19207, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
- Hound->AI()->AttackStart(victim);
- }
-
- void UpdateAI(uint32 diff) override
- {
- //Return since we have no target
- if (!UpdateVictim())
- return;
-
- //ShadowVolley_Timer
- if (ShadowVolley_Timer <= diff)
- {
- if (urand(0, 99) < 45)
- DoCastVictim(SPELL_SHADOWVOLLEY);
-
- ShadowVolley_Timer = 5000;
- } else ShadowVolley_Timer -= diff;
-
- //Cleave_Timer
- if (Cleave_Timer <= diff)
- {
- if (urand(0, 1))
- DoCastVictim(SPELL_CLEAVE);
-
- Cleave_Timer = 10000;
- } else Cleave_Timer -= diff;
-
- //ThunderClap_Timer
- if (ThunderClap_Timer <= diff)
- {
- if (urand(0, 9) < 2)
- DoCastVictim(SPELL_THUNDERCLAP);
-
- ThunderClap_Timer = 12000;
- } else ThunderClap_Timer -= diff;
-
- //TwistedReflection_Timer
- if (TwistedReflection_Timer <= diff)
- {
- DoCastVictim(SPELL_TWISTEDREFLECTION);
- TwistedReflection_Timer = 30000;
- } else TwistedReflection_Timer -= diff;
-
- //VoidBolt_Timer
- if (VoidBolt_Timer <= diff)
- {
- if (urand(0, 9) < 4)
- DoCastVictim(SPELL_VOIDBOLT);
-
- VoidBolt_Timer = 18000;
- } else VoidBolt_Timer -= diff;
-
- //Rage_Timer
- if (Rage_Timer <= diff)
- {
- DoCast(me, SPELL_RAGE);
- Rage_Timer = 70000;
- } else Rage_Timer -= diff;
-
- //Hound_Timer
- if (Hound_Timer <= diff)
- {
- SummonHounds(me->GetVictim());
- SummonHounds(me->GetVictim());
- SummonHounds(me->GetVictim());
-
- Hound_Timer = 45000;
- } else Hound_Timer -= diff;
-
- DoMeleeAttackIfReady();
- }
- };
-};
-
-void AddSC_boss_kruul()
-{
- new boss_kruul();
-}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
index 14f9bfb2e2f..da40ec333a6 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
@@ -283,8 +283,6 @@ public:
InstanceScript* instance;
- uint64 TarethaGUID;
-
bool LowHp;
bool HadMount;
@@ -400,11 +398,8 @@ public:
me->SummonCreature(NPC_INN_GUARDSMAN, 2656.39f, 659.77f, 61.93f, 2.61f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 94:
- if (uint64 TarethaGUID = instance->GetData64(DATA_TARETHA))
- {
- if (Creature* Taretha = ObjectAccessor::GetCreature(*me, TarethaGUID))
- Taretha->AI()->Talk(SAY_TA_ESCAPED, me);
- }
+ if (Creature* Taretha = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_TARETHA)))
+ Taretha->AI()->Talk(SAY_TA_ESCAPED, me);
break;
case 95:
Talk(SAY_TH_MEET_TARETHA);
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
index ecb28a5b0cb..04be688d8aa 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
+++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
@@ -148,9 +148,9 @@ public:
if (Player* target = ObjectAccessor::GetPlayer(*me, PlayerGUID))
AttackStart(target);
- switchFactionIfAlive(instance, ENTRY_RAVEN);
- switchFactionIfAlive(instance, ENTRY_ORO);
- switchFactionIfAlive(instance, ENTRY_MURTA);
+ switchFactionIfAlive(ENTRY_RAVEN);
+ switchFactionIfAlive(ENTRY_ORO);
+ switchFactionIfAlive(ENTRY_MURTA);
}
postGossipStep++;
}
@@ -185,9 +185,9 @@ public:
Text_Timer = 0;
}
- void switchFactionIfAlive(InstanceScript* instance, uint32 entry)
+ void switchFactionIfAlive(uint32 entry)
{
- if (Creature* crew = instance->instance->GetCreature(instance->GetData64(entry)))
+ if (Creature* crew = ObjectAccessor::GetCreature(*me, instance->GetData64(entry)))
if (crew->IsAlive())
crew->setFaction(FACTION_HOSTILE);
}
diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.cpp b/src/server/scripts/Outland/BlackTemple/black_temple.cpp
index 5edae14d47a..3a33561e998 100644
--- a/src/server/scripts/Outland/BlackTemple/black_temple.cpp
+++ b/src/server/scripts/Outland/BlackTemple/black_temple.cpp
@@ -95,32 +95,34 @@ public:
{
npc_wrathbone_flayerAI(Creature* creature) : ScriptedAI(creature)
{
- instance = creature->GetInstanceScript();
+ _instance = creature->GetInstanceScript();
}
void Reset() override
{
- events.ScheduleEvent(EVENT_GET_CHANNELERS, 3000);
- enteredCombat = false;
+ _events.ScheduleEvent(EVENT_GET_CHANNELERS, 3000);
+ _enteredCombat = false;
+ _bloodmageList.clear();
+ _deathshaperList.clear();
}
void JustDied(Unit* /*killer*/) override { }
void EnterCombat(Unit* /*who*/) override
{
- events.ScheduleEvent(EVENT_CLEAVE, 5000);
- events.ScheduleEvent(EVENT_IGNORED, 7000);
- enteredCombat = true;
+ _events.ScheduleEvent(EVENT_CLEAVE, 5000);
+ _events.ScheduleEvent(EVENT_IGNORED, 7000);
+ _enteredCombat = true;
}
void UpdateAI(uint32 diff) override
{
- if (!enteredCombat)
+ if (!_enteredCombat)
{
- events.Update(diff);
+ _events.Update(diff);
- while (uint32 eventId = events.ExecuteEvent())
+ while (uint32 eventId = _events.ExecuteEvent())
{
switch (eventId)
{
@@ -132,7 +134,7 @@ public:
if (!BloodMageList.empty())
for (std::list<Creature*>::const_iterator itr = BloodMageList.begin(); itr != BloodMageList.end(); ++itr)
{
- bloodmage.push_back((*itr)->GetGUID());
+ _bloodmageList.push_back((*itr)->GetGUID());
if ((*itr)->isDead())
(*itr)->Respawn();
}
@@ -143,26 +145,26 @@ public:
if (!DeathShaperList.empty())
for (std::list<Creature*>::const_iterator itr = DeathShaperList.begin(); itr != DeathShaperList.end(); ++itr)
{
- deathshaper.push_back((*itr)->GetGUID());
+ _deathshaperList.push_back((*itr)->GetGUID());
if ((*itr)->isDead())
(*itr)->Respawn();
}
- events.ScheduleEvent(EVENT_SET_CHANNELERS, 3000);
+ _events.ScheduleEvent(EVENT_SET_CHANNELERS, 3000);
break;
}
case EVENT_SET_CHANNELERS:
{
- for (std::list<uint64>::const_iterator itr = bloodmage.begin(); itr != bloodmage.end(); ++itr)
- if (Creature* bloodmage = (ObjectAccessor::GetCreature(*me, *itr)))
+ for (uint64 guid : _bloodmageList)
+ if (Creature* bloodmage = ObjectAccessor::GetCreature(*me, guid))
bloodmage->CastSpell((Unit*)NULL, SPELL_SUMMON_CHANNEL);
- for (std::list<uint64>::const_iterator itr = deathshaper.begin(); itr != deathshaper.end(); ++itr)
- if (Creature* deathshaper = (ObjectAccessor::GetCreature(*me, *itr)))
+ for (uint64 guid : _deathshaperList)
+ if (Creature* deathshaper = ObjectAccessor::GetCreature(*me, guid))
deathshaper->CastSpell((Unit*)NULL, SPELL_SUMMON_CHANNEL);
- events.ScheduleEvent(EVENT_SET_CHANNELERS, 12000);
+ _events.ScheduleEvent(EVENT_SET_CHANNELERS, 12000);
break;
}
@@ -175,20 +177,20 @@ public:
if (!UpdateVictim())
return;
- events.Update(diff);
+ _events.Update(diff);
- while (uint32 eventId = events.ExecuteEvent())
+ while (uint32 eventId = _events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_CLEAVE:
DoCastVictim(SPELL_CLEAVE);
- events.ScheduleEvent(EVENT_CLEAVE, urand (1000, 2000));
+ _events.ScheduleEvent(EVENT_CLEAVE, urand (1000, 2000));
break;
case EVENT_IGNORED:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_IGNORED);
- events.ScheduleEvent(EVENT_IGNORED, 10000);
+ _events.ScheduleEvent(EVENT_IGNORED, 10000);
break;
default:
break;
@@ -198,12 +200,12 @@ public:
}
private:
- InstanceScript* instance;
- EventMap events;
- std::list<uint64> bloodmage;
- std::list<uint64> deathshaper;
- bool enteredCombat;
- };
+ InstanceScript* _instance;
+ EventMap _events;
+ std::list<uint64> _bloodmageList;
+ std::list<uint64> _deathshaperList;
+ bool _enteredCombat;
+ };
CreatureAI* GetAI(Creature* creature) const override
{
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index e466c15d417..5f432bb8b61 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -578,11 +578,11 @@ class spell_dru_rip : public SpellScriptLoader
uint8 cp = caster->ToPlayer()->GetComboPoints();
// Idol of Feral Shadows. Can't be handled as SpellMod due its dependency from CPs
- if (AuraEffect const* idol = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_FERAL_SHADOWS, EFFECT_0))
- amount += cp * idol->GetAmount();
+ if (AuraEffect const* auraEffIdolOfFeralShadows = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_FERAL_SHADOWS, EFFECT_0))
+ amount += cp * auraEffIdolOfFeralShadows->GetAmount();
// Idol of Worship. Can't be handled as SpellMod due its dependency from CPs
- else if (AuraEffect const* idol = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_WORSHIP, EFFECT_0))
- amount += cp * idol->GetAmount();
+ else if (AuraEffect const* auraEffIdolOfWorship = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_WORSHIP, EFFECT_0))
+ amount += cp * auraEffIdolOfWorship->GetAmount();
amount += int32(CalculatePct(caster->GetTotalAttackPowerValue(BASE_ATTACK), cp));
}
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 4c72d790059..a8a73310592 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -449,9 +449,9 @@ class spell_gen_bonked : public SpellScriptLoader
target->CastSpell(target, SPELL_FOAM_SWORD_DEFEAT, true);
target->RemoveAurasDueToSpell(SPELL_BONKED);
- if (Aura const* aura = target->GetAura(SPELL_ON_GUARD))
+ if (Aura const* auraOnGuard = target->GetAura(SPELL_ON_GUARD))
{
- if (Item* item = target->GetItemByGuid(aura->GetCastItemGUID()))
+ if (Item* item = target->GetItemByGuid(auraOnGuard->GetCastItemGUID()))
target->DestroyItemCount(item->GetEntry(), 1, true);
}
}
@@ -2912,7 +2912,7 @@ class spell_gen_profession_research : public SpellScriptLoader
// learn random explicit discovery recipe (if any)
if (uint32 discoveredSpellId = GetExplicitDiscoverySpell(spellId, caster))
- caster->learnSpell(discoveredSpellId, false);
+ caster->LearnSpell(discoveredSpellId, false);
caster->UpdateCraftSkill(spellId);
}
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index a17d7dce2ea..7139c9ecfba 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -383,6 +383,45 @@ class spell_item_echoes_of_light : public SpellScriptLoader
}
};
+// 7434 - Fate Rune of Unsurpassed Vigor
+enum FateRuneOfUnsurpassedVigor
+{
+ SPELL_UNSURPASSED_VIGOR = 25733
+};
+
+class spell_item_fate_rune_of_unsurpassed_vigor : public SpellScriptLoader
+{
+ public:
+ spell_item_fate_rune_of_unsurpassed_vigor() : SpellScriptLoader("spell_item_fate_rune_of_unsurpassed_vigor") { }
+
+ class spell_item_fate_rune_of_unsurpassed_vigor_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_item_fate_rune_of_unsurpassed_vigor_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_UNSURPASSED_VIGOR))
+ return false;
+ return true;
+ }
+
+ void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
+ {
+ GetTarget()->CastSpell(GetTarget(), SPELL_UNSURPASSED_VIGOR, true);
+ }
+
+ void Register() override
+ {
+ OnEffectProc += AuraEffectProcFn(spell_item_fate_rune_of_unsurpassed_vigor_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_item_fate_rune_of_unsurpassed_vigor_AuraScript();
+ }
+};
+
// http://www.wowhead.com/item=47499 Flask of the North
// 67019 Flask of the North
enum FlaskOfTheNorthSpells
@@ -1413,7 +1452,7 @@ class spell_item_book_of_glyph_mastery : public SpellScriptLoader
// learn random explicit discovery recipe (if any)
if (uint32 discoveredSpellId = GetExplicitDiscoverySpell(spellId, caster))
- caster->learnSpell(discoveredSpellId, false);
+ caster->LearnSpell(discoveredSpellId, false);
}
void Register() override
@@ -2607,6 +2646,7 @@ void AddSC_item_spell_scripts()
new spell_item_desperate_defense();
new spell_item_deviate_fish();
new spell_item_echoes_of_light();
+ new spell_item_fate_rune_of_unsurpassed_vigor();
new spell_item_flask_of_the_north();
new spell_item_gnomish_death_ray();
new spell_item_make_a_wish();
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp
index 447cb645e76..53af04c2e98 100644
--- a/src/server/scripts/Spells/spell_paladin.cpp
+++ b/src/server/scripts/Spells/spell_paladin.cpp
@@ -1211,11 +1211,11 @@ class spell_pal_sacred_shield : public SpellScriptLoader
amount += int32(bonus);
// Arena - Dampening
- if (AuraEffect const* dampening = caster->GetAuraEffect(SPELL_GENERIC_ARENA_DAMPENING, EFFECT_0))
- AddPct(amount, dampening->GetAmount());
+ if (AuraEffect const* auraEffArenaDampening = caster->GetAuraEffect(SPELL_GENERIC_ARENA_DAMPENING, EFFECT_0))
+ AddPct(amount, auraEffArenaDampening->GetAmount());
// Battleground - Dampening
- else if (AuraEffect const* dampening = caster->GetAuraEffect(SPELL_GENERIC_BATTLEGROUND_DAMPENING, EFFECT_0))
- AddPct(amount, dampening->GetAmount());
+ else if (AuraEffect const* auraEffBattlegroudDampening = caster->GetAuraEffect(SPELL_GENERIC_BATTLEGROUND_DAMPENING, EFFECT_0))
+ AddPct(amount, auraEffBattlegroudDampening->GetAmount());
}
}
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index 61ff79c505e..a1c2d0e1d1c 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -34,6 +34,7 @@ enum ShamanSpells
SPELL_SHAMAN_BIND_SIGHT = 6277,
SPELL_SHAMAN_CLEANSING_TOTEM_EFFECT = 52025,
SPELL_SHAMAN_EARTH_SHIELD_HEAL = 379,
+ SPELL_SHAMAN_ELEMENTAL_MASTERY = 16166,
SPELL_SHAMAN_EXHAUSTION = 57723,
SPELL_SHAMAN_FIRE_NOVA_R1 = 1535,
SPELL_SHAMAN_FIRE_NOVA_TRIGGERED_R1 = 8349,
@@ -767,6 +768,42 @@ class spell_sha_item_mana_surge : public SpellScriptLoader
}
};
+// 70811 - Item - Shaman T10 Elemental 2P Bonus
+class spell_sha_item_t10_elemental_2p_bonus : public SpellScriptLoader
+{
+ public:
+ spell_sha_item_t10_elemental_2p_bonus() : SpellScriptLoader("spell_sha_item_t10_elemental_2p_bonus") { }
+
+ class spell_sha_item_t10_elemental_2p_bonus_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_sha_item_t10_elemental_2p_bonus_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_ELEMENTAL_MASTERY))
+ return false;
+ return true;
+ }
+
+ void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
+ {
+ PreventDefaultAction();
+ if (Player* target = GetTarget()->ToPlayer())
+ target->ModifySpellCooldown(SPELL_SHAMAN_ELEMENTAL_MASTERY, -aurEff->GetAmount());
+ }
+
+ void Register() override
+ {
+ OnEffectProc += AuraEffectProcFn(spell_sha_item_t10_elemental_2p_bonus_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_sha_item_t10_elemental_2p_bonus_AuraScript();
+ }
+};
+
// 60103 - Lava Lash
class spell_sha_lava_lash : public SpellScriptLoader
{
@@ -989,6 +1026,7 @@ void AddSC_shaman_spell_scripts()
new spell_sha_item_lightning_shield();
new spell_sha_item_lightning_shield_trigger();
new spell_sha_item_mana_surge();
+ new spell_sha_item_t10_elemental_2p_bonus();
new spell_sha_lava_lash();
new spell_sha_mana_spring_totem();
new spell_sha_mana_tide_totem();
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index 21489c714e2..083105b6aa4 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -260,90 +260,90 @@ void ProfessionUnlearnSpells(Player* player, uint32 type)
switch (type)
{
case S_UNLEARN_WEAPON: // S_UNLEARN_WEAPON
- player->removeSpell(36125); // Light Earthforged Blade
- player->removeSpell(36128); // Light Emberforged Hammer
- player->removeSpell(36126); // Light Skyforged Axe
+ player->RemoveSpell(36125); // Light Earthforged Blade
+ player->RemoveSpell(36128); // Light Emberforged Hammer
+ player->RemoveSpell(36126); // Light Skyforged Axe
break;
case S_UNLEARN_ARMOR: // S_UNLEARN_ARMOR
- player->removeSpell(36122); // Earthforged Leggings
- player->removeSpell(36129); // Heavy Earthforged Breastplate
- player->removeSpell(36130); // Stormforged Hauberk
- player->removeSpell(34533); // Breastplate of Kings
- player->removeSpell(34529); // Nether Chain Shirt
- player->removeSpell(34534); // Bulwark of Kings
- player->removeSpell(36257); // Bulwark of the Ancient Kings
- player->removeSpell(36256); // Embrace of the Twisting Nether
- player->removeSpell(34530); // Twisting Nether Chain Shirt
- player->removeSpell(36124); // Windforged Leggings
+ player->RemoveSpell(36122); // Earthforged Leggings
+ player->RemoveSpell(36129); // Heavy Earthforged Breastplate
+ player->RemoveSpell(36130); // Stormforged Hauberk
+ player->RemoveSpell(34533); // Breastplate of Kings
+ player->RemoveSpell(34529); // Nether Chain Shirt
+ player->RemoveSpell(34534); // Bulwark of Kings
+ player->RemoveSpell(36257); // Bulwark of the Ancient Kings
+ player->RemoveSpell(36256); // Embrace of the Twisting Nether
+ player->RemoveSpell(34530); // Twisting Nether Chain Shirt
+ player->RemoveSpell(36124); // Windforged Leggings
break;
case S_UNLEARN_HAMMER: // S_UNLEARN_HAMMER
- player->removeSpell(36262); // Dragonstrike
- player->removeSpell(34546); // Dragonmaw
- player->removeSpell(34545); // Drakefist Hammer
- player->removeSpell(36136); // Lavaforged Warhammer
- player->removeSpell(34547); // Thunder
- player->removeSpell(34567); // Deep Thunder
- player->removeSpell(36263); // Stormherald
- player->removeSpell(36137); // Great Earthforged Hammer
+ player->RemoveSpell(36262); // Dragonstrike
+ player->RemoveSpell(34546); // Dragonmaw
+ player->RemoveSpell(34545); // Drakefist Hammer
+ player->RemoveSpell(36136); // Lavaforged Warhammer
+ player->RemoveSpell(34547); // Thunder
+ player->RemoveSpell(34567); // Deep Thunder
+ player->RemoveSpell(36263); // Stormherald
+ player->RemoveSpell(36137); // Great Earthforged Hammer
break;
case S_UNLEARN_AXE: // S_UNLEARN_AXE
- player->removeSpell(36260); // Wicked Edge of the Planes
- player->removeSpell(34562); // Black Planar Edge
- player->removeSpell(34541); // The Planar Edge
- player->removeSpell(36134); // Stormforged Axe
- player->removeSpell(36135); // Skyforged Great Axe
- player->removeSpell(36261); // Bloodmoon
- player->removeSpell(34543); // Lunar Crescent
- player->removeSpell(34544); // Mooncleaver
+ player->RemoveSpell(36260); // Wicked Edge of the Planes
+ player->RemoveSpell(34562); // Black Planar Edge
+ player->RemoveSpell(34541); // The Planar Edge
+ player->RemoveSpell(36134); // Stormforged Axe
+ player->RemoveSpell(36135); // Skyforged Great Axe
+ player->RemoveSpell(36261); // Bloodmoon
+ player->RemoveSpell(34543); // Lunar Crescent
+ player->RemoveSpell(34544); // Mooncleaver
break;
case S_UNLEARN_SWORD: // S_UNLEARN_SWORD
- player->removeSpell(36258); // Blazefury
- player->removeSpell(34537); // Blazeguard
- player->removeSpell(34535); // Fireguard
- player->removeSpell(36131); // Windforged Rapier
- player->removeSpell(36133); // Stoneforged Claymore
- player->removeSpell(34538); // Lionheart Blade
- player->removeSpell(34540); // Lionheart Champion
- player->removeSpell(36259); // Lionheart Executioner
+ player->RemoveSpell(36258); // Blazefury
+ player->RemoveSpell(34537); // Blazeguard
+ player->RemoveSpell(34535); // Fireguard
+ player->RemoveSpell(36131); // Windforged Rapier
+ player->RemoveSpell(36133); // Stoneforged Claymore
+ player->RemoveSpell(34538); // Lionheart Blade
+ player->RemoveSpell(34540); // Lionheart Champion
+ player->RemoveSpell(36259); // Lionheart Executioner
break;
case S_UNLEARN_DRAGON: // S_UNLEARN_DRAGON
- player->removeSpell(36076); // Dragonstrike Leggings
- player->removeSpell(36079); // Golden Dragonstrike Breastplate
- player->removeSpell(35576); // Ebon Netherscale Belt
- player->removeSpell(35577); // Ebon Netherscale Bracers
- player->removeSpell(35575); // Ebon Netherscale Breastplate
- player->removeSpell(35582); // Netherstrike Belt
- player->removeSpell(35584); // Netherstrike Bracers
- player->removeSpell(35580); // Netherstrike Breastplate
+ player->RemoveSpell(36076); // Dragonstrike Leggings
+ player->RemoveSpell(36079); // Golden Dragonstrike Breastplate
+ player->RemoveSpell(35576); // Ebon Netherscale Belt
+ player->RemoveSpell(35577); // Ebon Netherscale Bracers
+ player->RemoveSpell(35575); // Ebon Netherscale Breastplate
+ player->RemoveSpell(35582); // Netherstrike Belt
+ player->RemoveSpell(35584); // Netherstrike Bracers
+ player->RemoveSpell(35580); // Netherstrike Breastplate
break;
case S_UNLEARN_ELEMENTAL: // S_UNLEARN_ELEMENTAL
- player->removeSpell(36074); // Blackstorm Leggings
- player->removeSpell(36077); // Primalstorm Breastplate
- player->removeSpell(35590); // Primalstrike Belt
- player->removeSpell(35591); // Primalstrike Bracers
- player->removeSpell(35589); // Primalstrike Vest
+ player->RemoveSpell(36074); // Blackstorm Leggings
+ player->RemoveSpell(36077); // Primalstorm Breastplate
+ player->RemoveSpell(35590); // Primalstrike Belt
+ player->RemoveSpell(35591); // Primalstrike Bracers
+ player->RemoveSpell(35589); // Primalstrike Vest
break;
case S_UNLEARN_TRIBAL: // S_UNLEARN_TRIBAL
- player->removeSpell(35585); // Windhawk Hauberk
- player->removeSpell(35587); // Windhawk Belt
- player->removeSpell(35588); // Windhawk Bracers
- player->removeSpell(36075); // Wildfeather Leggings
- player->removeSpell(36078); // Living Crystal Breastplate
+ player->RemoveSpell(35585); // Windhawk Hauberk
+ player->RemoveSpell(35587); // Windhawk Belt
+ player->RemoveSpell(35588); // Windhawk Bracers
+ player->RemoveSpell(36075); // Wildfeather Leggings
+ player->RemoveSpell(36078); // Living Crystal Breastplate
break;
case S_UNLEARN_SPELLFIRE: // S_UNLEARN_SPELLFIRE
- player->removeSpell(26752); // Spellfire Belt
- player->removeSpell(26753); // Spellfire Gloves
- player->removeSpell(26754); // Spellfire Robe
+ player->RemoveSpell(26752); // Spellfire Belt
+ player->RemoveSpell(26753); // Spellfire Gloves
+ player->RemoveSpell(26754); // Spellfire Robe
break;
case S_UNLEARN_MOONCLOTH: // S_UNLEARN_MOONCLOTH
- player->removeSpell(26760); // Primal Mooncloth Belt
- player->removeSpell(26761); // Primal Mooncloth Shoulders
- player->removeSpell(26762); // Primal Mooncloth Robe
+ player->RemoveSpell(26760); // Primal Mooncloth Belt
+ player->RemoveSpell(26761); // Primal Mooncloth Shoulders
+ player->RemoveSpell(26762); // Primal Mooncloth Robe
break;
case S_UNLEARN_SHADOWEAVE: // S_UNLEARN_SHADOWEAVE
- player->removeSpell(26756); // Frozen Shadoweave Shoulders
- player->removeSpell(26757); // Frozen Shadoweave Boots
- player->removeSpell(26758); // Frozen Shadoweave Robe
+ player->RemoveSpell(26756); // Frozen Shadoweave Shoulders
+ player->RemoveSpell(26757); // Frozen Shadoweave Boots
+ player->RemoveSpell(26758); // Frozen Shadoweave Robe
break;
}
}