aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/base/auth_database.sql12
-rw-r--r--sql/updates/auth/2014_04_28_00_rbac_permissions.sql21
-rw-r--r--sql/updates/world/2014_04_28_01_world_creature_template.sql24
-rw-r--r--sql/updates/world/2014_04_28_02_world_creature_template.sql11
-rw-r--r--sql/updates/world/2014_04_28_03_world_command.sql10
-rw-r--r--sql/updates/world/2014_04_28_04_world_misc.sql7
-rw-r--r--sql/updates/world/2014_04_28_05_world_misc.sql3
-rw-r--r--sql/updates/world/2014_04_28_06_world_creature_template.sql8
-rw-r--r--sql/updates/world/2014_04_28_07_world_creature_template.sql5
-rw-r--r--sql/updates/world/2014_04_28_08_world_creature_template.sql7
-rw-r--r--sql/updates/world/2014_04_28_09_world_creature_template.sql7
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h3
-rw-r--r--src/server/game/Accounts/AccountMgr.cpp7
-rw-r--r--src/server/game/Battlefield/Battlefield.cpp7
-rw-r--r--src/server/game/Battlefield/Battlefield.h2
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp24
-rw-r--r--src/server/game/Battlegrounds/Battleground.h9
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp32
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAB.h7
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp37
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAV.h6
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp12
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp9
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundEY.h6
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp53
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundIC.h6
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp34
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp4
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp57
-rw-r--r--src/server/game/Entities/Creature/Creature.h8
-rw-r--r--src/server/game/Entities/Object/Object.cpp7
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp63
-rw-r--r--src/server/game/Entities/Player/Player.cpp7
-rw-r--r--src/server/game/Entities/Transport/Transport.cpp7
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp6
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp4
-rw-r--r--src/server/game/Globals/ObjectMgr.h2
-rw-r--r--src/server/game/Handlers/PetHandler.cpp5
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvP.cpp4
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvP.h16
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp2
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp10
-rw-r--r--src/server/scripts/Commands/cs_wp.cpp10
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp8
-rw-r--r--src/server/scripts/Kalimdor/boss_azuregos.cpp266
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp12
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp6
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp34
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp22
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp10
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp16
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp9
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp8
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPNA.h80
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp4
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPZM.h4
59 files changed, 563 insertions, 503 deletions
diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql
index 96d234edb46..0a989cdcb92 100644
--- a/sql/base/auth_database.sql
+++ b/sql/base/auth_database.sql
@@ -1,8 +1,8 @@
--- MySQL dump 10.13 Distrib 5.6.9-rc, for Win64 (x86_64)
+-- MySQL dump 10.15 Distrib 10.0.10-MariaDB, for Win64 (x86)
--
-- Host: localhost Database: auth_4x
-- ------------------------------------------------------
--- Server version 5.6.9-rc
+-- Server version 10.0.10-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -224,7 +224,7 @@ DROP TABLE IF EXISTS `logs`;
CREATE TABLE `logs` (
`time` int(10) unsigned NOT NULL,
`realm` int(10) unsigned NOT NULL,
- `type` varchar(250),
+ `type` varchar(250) DEFAULT NULL,
`level` tinyint(3) unsigned NOT NULL DEFAULT '0',
`string` text CHARACTER SET latin1
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -289,7 +289,7 @@ CREATE TABLE `rbac_default_permissions` (
LOCK TABLES `rbac_default_permissions` WRITE;
/*!40000 ALTER TABLE `rbac_default_permissions` DISABLE KEYS */;
-INSERT INTO `rbac_default_permissions` VALUES (3,192),(2,193),(1,194),(0,195);
+INSERT INTO `rbac_default_permissions` VALUES (0,195),(1,194),(2,193),(3,192);
/*!40000 ALTER TABLE `rbac_default_permissions` ENABLE KEYS */;
UNLOCK TABLES;
@@ -341,7 +341,7 @@ CREATE TABLE `rbac_permissions` (
LOCK TABLES `rbac_permissions` WRITE;
/*!40000 ALTER TABLE `rbac_permissions` DISABLE KEYS */;
-INSERT INTO `rbac_permissions` VALUES (1,'Instant logout'),(2,'Skip Queue'),(3,'Join Normal Battleground'),(4,'Join Random Battleground'),(5,'Join Arenas'),(6,'Join Dungeon Finder'),(11,'Log GM trades'),(13,'Skip Instance required bosses check'),(14,'Skip character creation team mask check'),(15,'Skip character creation class mask check'),(16,'Skip character creation race mask check'),(17,'Skip character creation reserved name check'),(18,'Skip character creation heroic min level check'),(19,'Skip needed requirements to use channel check'),(20,'Skip disable map check'),(21,'Skip reset talents when used more than allowed check'),(22,'Skip spam chat check'),(23,'Skip over-speed ping check'),(24,'Two side faction characters on the same account'),(25,'Allow say chat between factions'),(26,'Allow channel chat between factions'),(27,'Two side mail interaction'),(28,'See two side who list'),(29,'Add friends of other faction'),(30,'Save character without delay with .save command'),(31,'Use params with .unstuck command'),(32,'Can be assigned tickets with .assign ticket command'),(33,'Notify if a command was not found'),(34,'Check if should appear in list using .gm ingame command'),(35,'See all security levels with who command'),(36,'Filter whispers'),(37,'Use staff badge in chat'),(38,'Resurrect with full Health Points'),(39,'Restore saved gm setting states'),(40,'Allows to add a gm to friend list'),(41,'Use Config option START_GM_LEVEL to assign new character level'),(42,'Allows to use CMSG_WORLD_TELEPORT opcode'),(43,'Allows to use CMSG_WHOIS opcode'),(44,'Receive global GM messages/texts'),(45,'Join channels without announce'),(46,'Change channel settings without being channel moderator'),(47,'Enables lower security than target check'),(48,'Enable IP, Last Login and EMail output in pinfo'),(49,'Forces to enter the email for confirmation on password change'),(50,'Allow user to check his own email with .account'),(192,'Role: Sec Level Administrator'),(193,'Role: Sec Level Gamemaster'),(194,'Role: Sec Level Moderator'),(195,'Role: Sec Level Player'),(196,'Role: Administrator Commands'),(197,'Role: Gamemaster Commands'),(198,'Role: Moderator Commands'),(199,'Role: Player Commands'),(200,'Command: rbac'),(201,'Command: rbac account'),(202,'Command: rbac account list'),(203,'Command: rbac account grant'),(204,'Command: rbac account deny'),(205,'Command: rbac account revoke'),(206,'Command: rbac list'),(217,'Command: account'),(218,'Command: account addon'),(219,'Command: account create'),(220,'Command: account delete'),(221,'Command: account lock'),(222,'Command: account lock country'),(223,'Command: account lock ip'),(224,'Command: account onlinelist'),(225,'Command: account password'),(226,'Command: account set'),(227,'Command: account set addon'),(228,'Command: account set gmlevel'),(229,'Command: account set password'),(230,'Command: achievement'),(231,'Command: achievement add'),(232,'Command: arena'),(233,'Command: arena captain'),(234,'Command: arena create'),(235,'Command: arena disband'),(236,'Command: arena info'),(237,'Command: arena lookup'),(238,'Command: arena rename'),(239,'Command: ban'),(240,'Command: ban account'),(241,'Command: ban character'),(242,'Command: ban ip'),(243,'Command: ban playeraccount'),(244,'Command: baninfo'),(245,'Command: baninfo account'),(246,'Command: baninfo character'),(247,'Command: baninfo ip'),(248,'Command: banlist'),(249,'Command: banlist account'),(250,'Command: banlist character'),(251,'Command: banlist ip'),(252,'Command: unban'),(253,'Command: unban account'),(254,'Command: unban character'),(255,'Command: unban ip'),(256,'Command: unban playeraccount'),(257,'Command: bf'),(258,'Command: bf start'),(259,'Command: bf stop'),(260,'Command: bf switch'),(261,'Command: bf timer'),(262,'Command: bf enable'),(263,'Command: account email'),(264,'Command: account set sec'),(265,'Command: account set sec email'),(266,'Command: account set sec regmail'),(267,'Command: cast'),(268,'Command: cast back'),(269,'Command: cast dist'),(270,'Command: cast self'),(271,'Command: cast target'),(272,'Command: cast dest'),(273,'Command: character'),(274,'Command: character customize'),(275,'Command: character changefaction'),(276,'Command: character changerace'),(277,'Command: character deleted'),(279,'Command: character deleted list'),(280,'Command: character deleted restore'),(283,'Command: character level'),(284,'Command: character rename'),(285,'Command: character reputation'),(286,'Command: character titles'),(287,'Command: levelup'),(288,'Command: pdump'),(289,'Command: pdump load'),(290,'Command: pdump write'),(291,'Command: cheat'),(292,'Command: cheat casttime'),(293,'Command: cheat cooldown'),(294,'Command: cheat explore'),(295,'Command: cheat god'),(296,'Command: cheat power'),(297,'Command: cheat status'),(298,'Command: cheat taxi'),(299,'Command: cheat waterwalk'),(300,'Command: debug'),(301,'Command: debug anim'),(302,'Command: debug areatriggers'),(303,'Command: debug arena'),(304,'Command: debug bg'),(305,'Command: debug entervehicle'),(306,'Command: debug getitemstate'),(307,'Command: debug getitemvalue'),(308,'Command: debug getvalue'),(309,'Command: debug hostil'),(310,'Command: debug itemexpire'),(311,'Command: debug lootrecipient'),(312,'Command: debug los'),(313,'Command: debug mod32value'),(314,'Command: debug moveflags'),(315,'Command: debug play'),(316,'Command: debug play cinematics'),(317,'Command: debug play movie'),(318,'Command: debug play sound'),(319,'Command: debug send'),(320,'Command: debug send buyerror'),(321,'Command: debug send channelnotify'),(322,'Command: debug send chatmessage'),(323,'Command: debug send equiperror'),(324,'Command: debug send largepacket'),(325,'Command: debug send opcode'),(326,'Command: debug send qinvalidmsg'),(327,'Command: debug send qpartymsg'),(328,'Command: debug send sellerror'),(329,'Command: debug send setphaseshift'),(330,'Command: debug send spellfail'),(331,'Command: debug setaurastate'),(332,'Command: debug setbit'),(333,'Command: debug setitemvalue'),(334,'Command: debug setvalue'),(335,'Command: debug setvid'),(336,'Command: debug spawnvehicle'),(337,'Command: debug threat'),(338,'Command: debug update'),(339,'Command: debug uws'),(340,'Command: wpgps'),(341,'Command: deserter'),(342,'Command: deserter bg'),(343,'Command: deserter bg add'),(344,'Command: deserter bg remove'),(345,'Command: deserter instance'),(346,'Command: deserter instance add'),(347,'Command: deserter instance remove'),(348,'Command: disable'),(349,'Command: disable add'),(350,'Command: disable add achievement_criteria'),(351,'Command: disable add battleground'),(352,'Command: disable add map'),(353,'Command: disable add mmap'),(354,'Command: disable add outdoorpvp'),(355,'Command: disable add quest'),(356,'Command: disable add spell'),(357,'Command: disable add vmap'),(358,'Command: disable remove'),(359,'Command: disable remove achievement_criteria'),(360,'Command: disable remove battleground'),(361,'Command: disable remove map'),(362,'Command: disable remove mmap'),(363,'Command: disable remove outdoorpvp'),(364,'Command: disable remove quest'),(365,'Command: disable remove spell'),(366,'Command: disable remove vmap'),(367,'Command: event'),(368,'Command: event activelist'),(369,'Command: event start'),(370,'Command: event stop'),(371,'Command: gm'),(372,'Command: gm chat'),(373,'Command: gm fly'),(374,'Command: gm ingame'),(375,'Command: gm list'),(376,'Command: gm visible'),(377,'Command: go'),(378,'Command: go creature'),(379,'Command: go graveyard'),(380,'Command: go grid'),(381,'Command: go object'),(382,'Command: go taxinode'),(383,'Command: go ticket'),(384,'Command: go trigger'),(385,'Command: go xyz'),(386,'Command: go zonexy'),(387,'Command: gobject'),(388,'Command: gobject activate'),(389,'Command: gobject add'),(390,'Command: gobject add temp'),(391,'Command: gobject delete'),(392,'Command: gobject info'),(393,'Command: gobject move'),(394,'Command: gobject near'),(395,'Command: gobject set'),(396,'Command: gobject set phase'),(397,'Command: gobject set state'),(398,'Command: gobject target'),(399,'Command: gobject turn'),(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'),(631,'Command: reload creature_text'),(632,'Command: reload creature_ai_scripts'),(633,'Command: reload creature_ai_texts'),(634,'Command: reload creature_questender'),(635,'Command: reload creature_linked_respawn'),(636,'Command: reload creature_loot_template'),(637,'Command: reload creature_onkill_reputation'),(638,'Command: reload creature_queststarter'),(639,'Command: reload creature_summon_groups'),(640,'Command: reload creature_template'),(641,'Command: reload disables'),(642,'Command: reload disenchant_loot_template'),(643,'Command: reload event_scripts'),(644,'Command: reload fishing_loot_template'),(645,'Command: reload game_graveyard_zone'),(646,'Command: reload game_tele'),(647,'Command: reload gameobject_questender'),(648,'Command: reload gameobject_loot_template'),(649,'Command: reload gameobject_queststarter'),(650,'Command: reload gm_tickets'),(651,'Command: reload gossip_menu'),(652,'Command: reload gossip_menu_option'),(653,'Command: reload item_enchantment_template'),(654,'Command: reload item_loot_template'),(655,'Command: reload item_set_names'),(656,'Command: reload lfg_dungeon_rewards'),(657,'Command: reload locales_achievement_reward'),(658,'Command: reload locales_creature'),(659,'Command: reload locales_creature_text'),(660,'Command: reload locales_gameobject'),(661,'Command: reload locales_gossip_menu_option'),(662,'Command: reload locales_item'),(663,'Command: reload locales_item_set_name'),(664,'Command: reload locales_npc_text'),(665,'Command: reload locales_page_text'),(666,'Command: reload locales_points_of_interest'),(667,'Command: reload locales_quest'),(668,'Command: reload mail_level_reward'),(669,'Command: reload mail_loot_template'),(670,'Command: reload milling_loot_template'),(671,'Command: reload npc_spellclick_spells'),(672,'Command: reload npc_trainer'),(673,'Command: reload npc_vendor'),(674,'Command: reload page_text'),(675,'Command: reload pickpocketing_loot_template'),(676,'Command: reload points_of_interest'),(677,'Command: reload prospecting_loot_template'),(678,'Command: reload quest_poi'),(679,'Command: reload quest_template'),(680,'Command: reload rbac'),(681,'Command: reload reference_loot_template'),(682,'Command: reload reserved_name'),(683,'Command: reload reputation_reward_rate'),(684,'Command: reload reputation_spillover_template'),(685,'Command: reload skill_discovery_template'),(686,'Command: reload skill_extra_item_template'),(687,'Command: reload skill_fishing_base_level'),(688,'Command: reload skinning_loot_template'),(689,'Command: reload smart_scripts'),(690,'Command: reload spell_required'),(691,'Command: reload spell_area'),(692,'Command: reload spell_bonus_data'),(693,'Command: reload spell_group'),(694,'Command: reload spell_learn_spell'),(695,'Command: reload spell_loot_template'),(696,'Command: reload spell_linked_spell'),(697,'Command: reload spell_pet_auras'),(698,'Command: reload spell_proc_event'),(699,'Command: reload spell_proc'),(700,'Command: reload spell_scripts'),(701,'Command: reload spell_target_position'),(702,'Command: reload spell_threats'),(703,'Command: reload spell_group_stack_rules'),(704,'Command: reload trinity_string'),(705,'Command: reload warden_action'),(706,'Command: reload waypoint_scripts'),(707,'Command: reload waypoint_data'),(708,'Command: reload vehicle_accessory'),(709,'Command: reload vehicle_template_accessory'),(710,'Command: reset'),(711,'Command: reset achievements'),(712,'Command: reset honor'),(713,'Command: reset level'),(714,'Command: reset spells'),(715,'Command: reset stats'),(716,'Command: reset talents'),(717,'Command: reset all'),(718,'Command: server'),(719,'Command: server corpses'),(720,'Command: server exit'),(721,'Command: server idlerestart'),(722,'Command: server idlerestart cancel'),(723,'Command: server idleshutdown'),(724,'Command: server idleshutdown cancel'),(725,'Command: server info'),(726,'Command: server plimit'),(727,'Command: server restart'),(728,'Command: server restart cancel'),(729,'Command: server set'),(730,'Command: server set closed'),(731,'Command: server set difftime'),(732,'Command: server set loglevel'),(733,'Command: server set motd'),(734,'Command: server shutdown'),(735,'Command: server shutdown cancel'),(736,'Command: server motd'),(737,'Command: tele'),(738,'Command: tele add'),(739,'Command: tele del'),(740,'Command: tele name'),(741,'Command: tele group'),(742,'Command: ticket'),(743,'Command: ticket assign'),(744,'Command: ticket close'),(745,'Command: ticket closedlist'),(746,'Command: ticket comment'),(747,'Command: ticket complete'),(748,'Command: ticket delete'),(749,'Command: ticket escalate'),(750,'Command: ticket escalatedlist'),(751,'Command: ticket list'),(752,'Command: ticket onlinelist'),(753,'Command: ticket reset'),(754,'Command: ticket response'),(755,'Command: ticket response append'),(756,'Command: ticket response appendln'),(757,'Command: ticket togglesystem'),(758,'Command: ticket unassign'),(759,'Command: ticket viewid'),(760,'Command: ticket viewname'),(761,'Command: titles'),(762,'Command: titles add'),(763,'Command: titles current'),(764,'Command: titles remove'),(765,'Command: titles set'),(766,'Command: titles set mask'),(767,'Command: wp'),(768,'Command: wp add'),(769,'Command: wp event'),(770,'Command: wp load'),(771,'Command: wp modify'),(772,'Command: wp unload'),(773,'Command: wp reload'),(774,'Command: wp show'),(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: 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');
/*!40000 ALTER TABLE `rbac_permissions` ENABLE KEYS */;
UNLOCK TABLES;
@@ -440,4 +440,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2013-09-10 23:18:53
+-- Dump completed on 2014-04-28 13:43:54
diff --git a/sql/updates/auth/2014_04_28_00_rbac_permissions.sql b/sql/updates/auth/2014_04_28_00_rbac_permissions.sql
new file mode 100644
index 00000000000..290052764dd
--- /dev/null
+++ b/sql/updates/auth/2014_04_28_00_rbac_permissions.sql
@@ -0,0 +1,21 @@
+DELETE FROM `rbac_permissions` WHERE `id` IN (631,632,633,634,635,636,637,638,639,640);
+INSERT INTO `rbac_permissions` (`id`, `name`) VALUES
+(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');
+
+DELETE FROM `rbac_linked_permissions` WHERE `linkedId` IN (631,632,633,634,635,636,637,638,639,640);
+INSERT INTO `rbac_linked_permissions` (`id`, `linkedId`) VALUES
+(196, 633),
+(196, 634),
+(196, 635),
+(196, 636),
+(196, 637),
+(196, 638),
+(196, 639),
+(196, 640);
diff --git a/sql/updates/world/2014_04_28_01_world_creature_template.sql b/sql/updates/world/2014_04_28_01_world_creature_template.sql
new file mode 100644
index 00000000000..0bdd9657c65
--- /dev/null
+++ b/sql/updates/world/2014_04_28_01_world_creature_template.sql
@@ -0,0 +1,24 @@
+UPDATE `creature_template` SET `difficulty_entry_3`=37292 WHERE `entry`=13446;
+UPDATE `creature_template` SET `difficulty_entry_3`=37276 WHERE `entry`=13153;
+UPDATE `creature_template` SET `faction`=1214 WHERE `entry`=37279;
+UPDATE `creature_template` SET `faction`=1214 WHERE `entry`=37299;
+UPDATE `creature_template` SET `npcflag`=3 WHERE `entry`=37279;
+UPDATE `creature_template` SET `npcflag`=2 WHERE `entry`=37299;
+UPDATE `creature_template` SET `faction`=29 WHERE `entry`=37248;
+UPDATE `creature_template` SET `npcflag`=2 WHERE `entry`=37248;
+UPDATE `creature_template` SET `faction`=85 WHERE `entry`=37261;
+UPDATE `creature_template` SET `npcflag`=2 WHERE `entry`=37261;
+UPDATE `creature_template` SET `faction`=29 WHERE `entry`=37365;
+UPDATE `creature_template` SET `npcflag`=2 WHERE `entry`=37365;
+UPDATE `creature_template` SET `faction`=1216 WHERE `entry`=37271;
+UPDATE `creature_template` SET `npcflag`=2 WHERE `entry`=37271;
+UPDATE `creature_template` SET `faction`=85 WHERE `entry`=37280;
+UPDATE `creature_template` SET `npcflag`=2 WHERE `entry`=37280;
+UPDATE `creature_template` SET `faction`=1214 WHERE `entry`=37273;
+UPDATE `creature_template` SET `npcflag`=3 WHERE `entry`=37273;
+UPDATE `creature_template` SET `faction`=1214 WHERE `entry`=37270;
+UPDATE `creature_template` SET `npcflag`=1 WHERE `entry`=37270;
+UPDATE `creature_template` SET `faction`=1214 WHERE `entry`=37276;
+UPDATE `creature_template` SET `npcflag`=2 WHERE `entry`=37276;
+UPDATE `creature_template` SET `faction`=14 WHERE `entry`=37292;
+UPDATE `creature_template` SET `npcflag`=2 WHERE `entry`=37292;
diff --git a/sql/updates/world/2014_04_28_02_world_creature_template.sql b/sql/updates/world/2014_04_28_02_world_creature_template.sql
new file mode 100644
index 00000000000..f01b87d53ff
--- /dev/null
+++ b/sql/updates/world/2014_04_28_02_world_creature_template.sql
@@ -0,0 +1,11 @@
+--
+UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `exp`=2 WHERE `entry`=37610;
+UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `exp`=2 WHERE `entry`=35425;
+UPDATE `creature_template` SET `minlevel`=82, `maxlevel`=82, `exp`=2 WHERE `entry`=35353;
+UPDATE `creature_template` SET `minlevel`=82, `maxlevel`=82, `exp`=2 WHERE `entry`=35354;
+UPDATE `creature_template` SET `minlevel`=82, `maxlevel`=82, `exp`=2 WHERE `entry`=35355;
+UPDATE `creature_template` SET `minlevel`=82, `maxlevel`=82, `exp`=2 WHERE `entry`=35356;
+UPDATE `creature_template` SET `minlevel`=82, `maxlevel`=82, `exp`=2 WHERE `entry`=35357;
+UPDATE `creature_template` SET `minlevel`=82, `maxlevel`=82, `exp`=2 WHERE `entry`=35358;
+UPDATE `creature_template` SET `exp`=1 WHERE `entry`=37272;
+UPDATE `creature_template` SET `exp`=2 WHERE `entry`=25389;
diff --git a/sql/updates/world/2014_04_28_03_world_command.sql b/sql/updates/world/2014_04_28_03_world_command.sql
new file mode 100644
index 00000000000..85d17f87fb6
--- /dev/null
+++ b/sql/updates/world/2014_04_28_03_world_command.sql
@@ -0,0 +1,10 @@
+DELETE FROM `command` WHERE `permission` IN (631,632,633,634,635,636,637,638,639,640);
+INSERT INTO `command` (`name`, `permission`, `help`) VALUES
+('reload creature_linked_respawn', 633, 'Syntax: .reload creature_linked_respawn\r\nReload creature_linked_respawn table.'),
+('reload creature_loot_template', 634, 'Syntax: .reload creature_loot_template\nReload creature_loot_template table.'),
+('reload creature_onkill_reputation', 635, 'Syntax: .reload creature_onkill_reputation\r\nReload creature_onkill_reputation table.'),
+('reload creature_questender', 636, 'Syntax: .reload creature_questender\nReload creature_questender table.'),
+('reload creature_queststarter', 637, 'Syntax: .reload creature_queststarter\nReload creature_queststarter table.'),
+('reload creature_summon_groups', 638, 'Syntax: .reload creature_summon_groups\nReload creature_summon_groups table.'),
+('reload creature_template', 639, 'Syntax: .reload creature_template $entry\r\nReload the specified creature''s template.'),
+('reload creature_text', 640, 'Syntax: .reload creature_text\nReload creature_text Table.');
diff --git a/sql/updates/world/2014_04_28_04_world_misc.sql b/sql/updates/world/2014_04_28_04_world_misc.sql
new file mode 100644
index 00000000000..d3dfec611ea
--- /dev/null
+++ b/sql/updates/world/2014_04_28_04_world_misc.sql
@@ -0,0 +1,7 @@
+DELETE FROM `spell_dbc` WHERE `Id`=23183;
+INSERT INTO `spell_dbc` (`Id`, `Dispel`, `Mechanic`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `AttributesEx5`, `AttributesEx6`, `AttributesEx7`, `Stances`, `StancesNot`, `Targets`, `CastingTimeIndex`, `AuraInterruptFlags`, `ProcFlags`, `ProcChance`, `ProcCharges`, `MaxLevel`, `BaseLevel`, `SpellLevel`, `DurationIndex`, `RangeIndex`, `StackAmount`, `EquippedItemClass`, `EquippedItemSubClassMask`, `EquippedItemInventoryTypeMask`, `Effect1`, `Effect2`, `Effect3`, `EffectDieSides1`, `EffectDieSides2`, `EffectDieSides3`, `EffectRealPointsPerLevel1`, `EffectRealPointsPerLevel2`, `EffectRealPointsPerLevel3`, `EffectBasePoints1`, `EffectBasePoints2`, `EffectBasePoints3`, `EffectMechanic1`, `EffectMechanic2`, `EffectMechanic3`, `EffectImplicitTargetA1`, `EffectImplicitTargetA2`, `EffectImplicitTargetA3`, `EffectImplicitTargetB1`, `EffectImplicitTargetB2`, `EffectImplicitTargetB3`, `EffectRadiusIndex1`, `EffectRadiusIndex2`, `EffectRadiusIndex3`, `EffectApplyAuraName1`, `EffectApplyAuraName2`, `EffectApplyAuraName3`, `EffectAmplitude1`, `EffectAmplitude2`, `EffectAmplitude3`, `EffectMultipleValue1`, `EffectMultipleValue2`, `EffectMultipleValue3`, `EffectMiscValue1`, `EffectMiscValue2`, `EffectMiscValue3`, `EffectMiscValueB1`, `EffectMiscValueB2`, `EffectMiscValueB3`, `EffectTriggerSpell1`, `EffectTriggerSpell2`, `EffectTriggerSpell3`, `EffectSpellClassMaskA1`, `EffectSpellClassMaskA2`, `EffectSpellClassMaskA3`, `EffectSpellClassMaskB1`, `EffectSpellClassMaskB2`, `EffectSpellClassMaskB3`, `EffectSpellClassMaskC1`, `EffectSpellClassMaskC2`, `EffectSpellClassMaskC3`, `MaxTargetLevel`, `SpellFamilyName`, `SpellFamilyFlags1`, `SpellFamilyFlags2`, `SpellFamilyFlags3`, `MaxAffectedTargets`, `DmgClass`, `PreventionType`, `DmgMultiplier1`, `DmgMultiplier2`, `DmgMultiplier3`, `AreaGroupId`, `SchoolMask`, `Comment`) VALUES
+(23183, 0, 0, 536871296, 268435592, 4, 196864, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 101, 0, 0, 0, 0, 29, 1, 0, -1, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 15, 0, 0, 12, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 'Mark of Frost - Triggered spell');
+
+DELETE FROM `spell_script_names` WHERE `spell_id`=23183;
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(23183, 'spell_mark_of_frost');
diff --git a/sql/updates/world/2014_04_28_05_world_misc.sql b/sql/updates/world/2014_04_28_05_world_misc.sql
new file mode 100644
index 00000000000..924e479d07b
--- /dev/null
+++ b/sql/updates/world/2014_04_28_05_world_misc.sql
@@ -0,0 +1,3 @@
+UPDATE `creature_template` SET `faction`=35 WHERE `entry` IN (27881,28094,28366);
+DELETE FROM `conditions` WHERE `SourceEntry`=52226 AND `SourceTypeOrReferenceId`=17;
+UPDATE `smart_scripts` SET `action_param2`=0 WHERE `action_type`=36;
diff --git a/sql/updates/world/2014_04_28_06_world_creature_template.sql b/sql/updates/world/2014_04_28_06_world_creature_template.sql
new file mode 100644
index 00000000000..04c8667d5b7
--- /dev/null
+++ b/sql/updates/world/2014_04_28_06_world_creature_template.sql
@@ -0,0 +1,8 @@
+--
+UPDATE `creature_template` SET `minlevel`=83, `maxlevel`=83 WHERE `entry`=38590;
+UPDATE `creature_template` SET `difficulty_entry_1`=37620 WHERE `entry`=37577;
+UPDATE `creature_template` SET `difficulty_entry_1`=37619 WHERE `entry`=37579;
+UPDATE `creature_template` SET `difficulty_entry_1`=37621 WHERE `entry`=37578;
+UPDATE `creature_template` SET `difficulty_entry_1`=37617 WHERE `entry`=37575;
+UPDATE `creature_template` SET `difficulty_entry_1`=37615 WHERE `entry`=37576;
+UPDATE `creature_template` SET `difficulty_entry_1`=37616 WHERE `entry`=37572;
diff --git a/sql/updates/world/2014_04_28_07_world_creature_template.sql b/sql/updates/world/2014_04_28_07_world_creature_template.sql
new file mode 100644
index 00000000000..e8852982748
--- /dev/null
+++ b/sql/updates/world/2014_04_28_07_world_creature_template.sql
@@ -0,0 +1,5 @@
+--
+UPDATE `creature_template` SET `minlevel`=83, `maxlevel`=83 WHERE `entry` IN (30786,30784,30780,30782,34110,34109,34108,34106,33909,30786,30784,30782,30780,39232,39233,39234,40673,40674,40675,40670,40671,40672,38590,38698);
+UPDATE `creature_template` SET `minlevel`=82, `maxlevel`=82 WHERE `entry` IN (33999,34200,33989,33986,33984,33839,33831,33832,33828,33830,33829,33827,33700,33161,32550,38094);
+UPDATE `creature_template` SET `minlevel`=81, `maxlevel`=81 WHERE `entry` IN (34142,34141,33942,33815,33730,33737,33729,33164,33116,33163);
+UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80 WHERE `entry` IN (38601,38137,38134,38495,38552,38496,39011,39012,39013,37634,37611,37654,37653,37657,37678,35546,35717,35568,34170,33691);
diff --git a/sql/updates/world/2014_04_28_08_world_creature_template.sql b/sql/updates/world/2014_04_28_08_world_creature_template.sql
new file mode 100644
index 00000000000..e1260de43b1
--- /dev/null
+++ b/sql/updates/world/2014_04_28_08_world_creature_template.sql
@@ -0,0 +1,7 @@
+--
+UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `exp`=2, `faction`=714, `unit_class`=2 WHERE `entry`=37619;
+UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `exp`=2, `faction`=714 WHERE `entry`=37621;
+UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `exp`=2 WHERE `entry`=37615;
+UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `exp`=2 WHERE `entry`=37617;
+UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `exp`=2 WHERE `entry`=37620;
+UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `exp`=2 WHERE `entry`=37616;
diff --git a/sql/updates/world/2014_04_28_09_world_creature_template.sql b/sql/updates/world/2014_04_28_09_world_creature_template.sql
new file mode 100644
index 00000000000..e7c740b8aca
--- /dev/null
+++ b/sql/updates/world/2014_04_28_09_world_creature_template.sql
@@ -0,0 +1,7 @@
+--
+UPDATE `creature_template` SET `difficulty_entry_1`=38486 WHERE `entry`=38471;
+UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `exp`=2, `npcflag`=2 WHERE `entry`=38486;
+UPDATE `creature_template` SET `unit_class`=2 WHERE `entry`=37615;
+UPDATE `creature_template` SET `unit_class`=2 WHERE `entry`=37617;
+UPDATE `creature_template` SET `unit_class`=2 WHERE `entry`=37621;
+UPDATE `creature_template` SET `faction`=714 WHERE `entry`=37620;
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 5949484cd23..6c250fdfba6 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -972,7 +972,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
if (IsCreature(*itr))
- (*itr)->ToCreature()->UpdateEntry(e.action.updateTemplate.creature, e.action.updateTemplate.team ? HORDE : ALLIANCE);
+ (*itr)->ToCreature()->UpdateEntry(e.action.updateTemplate.creature);
delete targets;
break;
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index 78a26e7e836..e69a11d57e5 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -453,7 +453,7 @@ enum SMART_ACTION
SMART_ACTION_CALL_KILLEDMONSTER = 33, // CreatureId,
SMART_ACTION_SET_INST_DATA = 34, // Field, Data
SMART_ACTION_SET_INST_DATA64 = 35, // Field,
- SMART_ACTION_UPDATE_TEMPLATE = 36, // Entry, Team
+ SMART_ACTION_UPDATE_TEMPLATE = 36, // Entry
SMART_ACTION_DIE = 37, // No Params
SMART_ACTION_SET_IN_COMBAT_WITH_ZONE = 38, // No Params
SMART_ACTION_CALL_FOR_HELP = 39, // Radius, With Emote
@@ -702,7 +702,6 @@ struct SmartAction
struct
{
uint32 creature;
- uint32 team;
} updateTemplate;
struct
diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp
index 8a5c6937ca0..d8f61a22314 100644
--- a/src/server/game/Accounts/AccountMgr.cpp
+++ b/src/server/game/Accounts/AccountMgr.cpp
@@ -348,13 +348,8 @@ bool AccountMgr::normalizeString(std::string& utf8String)
size_t maxLength = MAX_ACCOUNT_STR;
if (!Utf8toWStr(utf8String, buffer, maxLength))
return false;
-#ifdef _MSC_VER
-#pragma warning(disable: 4996)
-#endif
+
std::transform(&buffer[0], buffer+maxLength, &buffer[0], wcharToUpperOnlyLatin);
-#ifdef _MSC_VER
-#pragma warning(default: 4996)
-#endif
return WStrToUtf8(buffer, maxLength, utf8String);
}
diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp
index bd5ffc057dc..a136ed8a438 100644
--- a/src/server/game/Battlefield/Battlefield.cpp
+++ b/src/server/game/Battlefield/Battlefield.cpp
@@ -783,7 +783,7 @@ Creature* Battlefield::SpawnCreature(uint32 entry, const Position& pos, TeamId t
return SpawnCreature(entry, pos.m_positionX, pos.m_positionY, pos.m_positionZ, pos.m_orientation, team);
}
-Creature* Battlefield::SpawnCreature(uint32 entry, float x, float y, float z, float o, TeamId team)
+Creature* Battlefield::SpawnCreature(uint32 entry, float x, float y, float z, float o, TeamId /*team*/)
{
//Get map object
Map* map = sMapMgr->CreateBaseMap(m_MapId);
@@ -794,7 +794,7 @@ Creature* Battlefield::SpawnCreature(uint32 entry, float x, float y, float z, fl
}
Creature* creature = new Creature();
- if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, PHASEMASK_NORMAL, entry, 0, team, x, y, z, o))
+ if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, PHASEMASK_NORMAL, entry, x, y, z, o))
{
TC_LOG_ERROR("bg.battlefield", "Battlefield::SpawnCreature: Can't create creature entry: %u", entry);
delete creature;
@@ -809,9 +809,6 @@ Creature* Battlefield::SpawnCreature(uint32 entry, float x, float y, float z, fl
TC_LOG_ERROR("bg.battlefield", "Battlefield::SpawnCreature: entry %u does not exist.", entry);
return NULL;
}
- // force using DB speeds -- do we really need this?
- creature->SetSpeed(MOVE_WALK, cinfo->speed_walk);
- creature->SetSpeed(MOVE_RUN, cinfo->speed_run);
// Set creature in world
map->AddToMap(creature);
diff --git a/src/server/game/Battlefield/Battlefield.h b/src/server/game/Battlefield/Battlefield.h
index 1781209e779..4e2e28f124c 100644
--- a/src/server/game/Battlefield/Battlefield.h
+++ b/src/server/game/Battlefield/Battlefield.h
@@ -287,7 +287,7 @@ class Battlefield : public ZoneScript
BfGraveyard* GetGraveyardById(uint32 id) const;
// Misc methods
- Creature* SpawnCreature(uint32 entry, float x, float y, float z, float o, TeamId team);
+ virtual Creature* SpawnCreature(uint32 entry, float x, float y, float z, float o, TeamId team);
Creature* SpawnCreature(uint32 entry, const Position& pos, TeamId team);
GameObject* SpawnGameObject(uint32 entry, float x, float y, float z, float o);
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 2ab98795f36..24e01cf5b37 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -1652,7 +1652,7 @@ void Battleground::SpawnBGObject(uint32 type, uint32 respawntime)
}
}
-Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, float x, float y, float z, float o, uint32 respawntime)
+Creature* Battleground::AddCreature(uint32 entry, uint32 type, float x, float y, float z, float o, TeamId /*teamId = TEAM_NEUTRAL*/, uint32 respawntime /*= 0*/)
{
// If the assert is called, means that BgCreatures must be resized!
ASSERT(type < BgCreatures.size());
@@ -1662,7 +1662,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
return NULL;
Creature* creature = new Creature();
- if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, PHASEMASK_NORMAL, entry, 0, teamval, x, y, z, o))
+ if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, PHASEMASK_NORMAL, entry, x, y, z, o))
{
TC_LOG_ERROR("bg.battleground", "Battleground::AddCreature: cannot create creature (entry: %u) for BG (map: %u, instance id: %u)!",
entry, m_MapId, m_InstanceID);
@@ -1680,9 +1680,6 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
delete creature;
return NULL;
}
- // Force using DB speeds
- creature->SetSpeed(MOVE_WALK, cinfo->speed_walk);
- creature->SetSpeed(MOVE_RUN, cinfo->speed_run);
if (!map->AddToMap(creature))
{
@@ -1698,9 +1695,9 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
return creature;
}
-Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, Position const& pos, uint32 respawntime /*= 0*/)
+Creature* Battleground::AddCreature(uint32 entry, uint32 type, Position const& pos, TeamId teamId /*= TEAM_NEUTRAL*/, uint32 respawntime /*= 0*/)
{
- return AddCreature(entry, type, teamval, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), respawntime);
+ return AddCreature(entry, type, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teamId, respawntime);
}
bool Battleground::DelCreature(uint32 type)
@@ -1739,13 +1736,11 @@ bool Battleground::DelObject(uint32 type)
return false;
}
-bool Battleground::AddSpiritGuide(uint32 type, float x, float y, float z, float o, uint32 team)
+bool Battleground::AddSpiritGuide(uint32 type, float x, float y, float z, float o, TeamId teamId /*= TEAM_NEUTRAL*/)
{
- uint32 entry = (team == ALLIANCE) ?
- BG_CREATURE_ENTRY_A_SPIRITGUIDE :
- BG_CREATURE_ENTRY_H_SPIRITGUIDE;
+ uint32 entry = (teamId == TEAM_ALLIANCE) ? BG_CREATURE_ENTRY_A_SPIRITGUIDE : BG_CREATURE_ENTRY_H_SPIRITGUIDE;
- if (Creature* creature = AddCreature(entry, type, team, x, y, z, o))
+ if (Creature* creature = AddCreature(entry, type, x, y, z, o, teamId))
{
creature->setDeathState(DEAD);
creature->SetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT, creature->GetGUID());
@@ -1766,6 +1761,11 @@ bool Battleground::AddSpiritGuide(uint32 type, float x, float y, float z, float
return false;
}
+bool Battleground::AddSpiritGuide(uint32 type, Position const& pos, TeamId teamId /*= TEAM_NEUTRAL*/)
+{
+ return AddSpiritGuide(type, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teamId);
+}
+
void Battleground::SendMessageToAll(int32 entry, ChatMsg type, Player const* source)
{
if (!entry)
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
index 0aad3f24c6c..2feb15e2ee6 100644
--- a/src/server/game/Battlegrounds/Battleground.h
+++ b/src/server/game/Battlegrounds/Battleground.h
@@ -513,13 +513,14 @@ class Battleground
BGObjects BgObjects;
BGCreatures BgCreatures;
void SpawnBGObject(uint32 type, uint32 respawntime);
- bool AddObject(uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime = 0);
+ virtual bool AddObject(uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime = 0);
bool AddObject(uint32 type, uint32 entry, Position const& pos, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime = 0);
- Creature* AddCreature(uint32 entry, uint32 type, uint32 teamval, float x, float y, float z, float o, uint32 respawntime = 0);
- Creature* AddCreature(uint32 entry, uint32 type, uint32 teamval, Position const& pos, uint32 respawntime = 0);
+ virtual Creature* AddCreature(uint32 entry, uint32 type, float x, float y, float z, float o, TeamId teamId = TEAM_NEUTRAL, uint32 respawntime = 0);
+ Creature* AddCreature(uint32 entry, uint32 type, Position const& pos, TeamId teamId = TEAM_NEUTRAL, uint32 respawntime = 0);
bool DelCreature(uint32 type);
bool DelObject(uint32 type);
- bool AddSpiritGuide(uint32 type, float x, float y, float z, float o, uint32 team);
+ virtual bool AddSpiritGuide(uint32 type, float x, float y, float z, float o, TeamId teamId = TEAM_NEUTRAL);
+ bool AddSpiritGuide(uint32 type, Position const& pos, TeamId teamId = TEAM_NEUTRAL);
int32 GetObjectType(uint64 guid);
void DoorOpen(uint32 type);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
index c05bd98b908..38b0e3e084b 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
@@ -23,7 +23,6 @@
#include "BattlegroundMgr.h"
#include "Creature.h"
#include "Language.h"
-#include "Object.h"
#include "Player.h"
#include "Util.h"
#include "WorldSession.h"
@@ -381,7 +380,7 @@ void BattlegroundAB::_SendNodeUpdate(uint8 node)
void BattlegroundAB::_NodeOccupied(uint8 node, Team team)
{
- if (!AddSpiritGuide(node, BG_AB_SpiritGuidePos[node][0], BG_AB_SpiritGuidePos[node][1], BG_AB_SpiritGuidePos[node][2], BG_AB_SpiritGuidePos[node][3], team))
+ if (!AddSpiritGuide(node, BG_AB_SpiritGuidePos[node], GetTeamIndexByTeamId(team)))
TC_LOG_ERROR("bg.battleground", "Failed to spawn spirit guide! point: %u, team: %u, ", node, team);
if (node >= BG_AB_DYNAMIC_NODES_COUNT)//only dynamic nodes, no start points
@@ -397,9 +396,9 @@ void BattlegroundAB::_NodeOccupied(uint8 node, Team team)
if (capturedNodes >= 4)
CastSpellOnTeam(SPELL_AB_QUEST_REWARD_4_BASES, team);
- Creature* trigger = BgCreatures[node+7] ? GetBGCreature(node+7) : NULL;//0-6 spirit guides
+ Creature* trigger = BgCreatures[node+7] ? GetBGCreature(node+7) : NULL; // 0-6 spirit guides
if (!trigger)
- trigger = AddCreature(WORLD_TRIGGER, node+7, team, BG_AB_NodePositions[node][0], BG_AB_NodePositions[node][1], BG_AB_NodePositions[node][2], BG_AB_NodePositions[node][3]);
+ trigger = AddCreature(WORLD_TRIGGER, node+7, BG_AB_NodePositions[node], GetTeamIndexByTeamId(team));
//add bonus honor aura trigger creature when node is accupied
//cast bonus aura (+50% honor in 25yards)
@@ -578,34 +577,33 @@ bool BattlegroundAB::SetupBattleground()
{
for (int i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i)
{
- if (!AddObject(BG_AB_OBJECT_BANNER_NEUTRAL + 8*i, BG_AB_OBJECTID_NODE_BANNER_0 + i, BG_AB_NodePositions[i][0], BG_AB_NodePositions[i][1], BG_AB_NodePositions[i][2], BG_AB_NodePositions[i][3], 0, 0, std::sin(BG_AB_NodePositions[i][3]/2), std::cos(BG_AB_NodePositions[i][3]/2), RESPAWN_ONE_DAY)
- || !AddObject(BG_AB_OBJECT_BANNER_CONT_A + 8*i, BG_AB_OBJECTID_BANNER_CONT_A, BG_AB_NodePositions[i][0], BG_AB_NodePositions[i][1], BG_AB_NodePositions[i][2], BG_AB_NodePositions[i][3], 0, 0, std::sin(BG_AB_NodePositions[i][3]/2), std::cos(BG_AB_NodePositions[i][3]/2), RESPAWN_ONE_DAY)
- || !AddObject(BG_AB_OBJECT_BANNER_CONT_H + 8*i, BG_AB_OBJECTID_BANNER_CONT_H, BG_AB_NodePositions[i][0], BG_AB_NodePositions[i][1], BG_AB_NodePositions[i][2], BG_AB_NodePositions[i][3], 0, 0, std::sin(BG_AB_NodePositions[i][3]/2), std::cos(BG_AB_NodePositions[i][3]/2), RESPAWN_ONE_DAY)
- || !AddObject(BG_AB_OBJECT_BANNER_ALLY + 8*i, BG_AB_OBJECTID_BANNER_A, BG_AB_NodePositions[i][0], BG_AB_NodePositions[i][1], BG_AB_NodePositions[i][2], BG_AB_NodePositions[i][3], 0, 0, std::sin(BG_AB_NodePositions[i][3]/2), std::cos(BG_AB_NodePositions[i][3]/2), RESPAWN_ONE_DAY)
- || !AddObject(BG_AB_OBJECT_BANNER_HORDE + 8*i, BG_AB_OBJECTID_BANNER_H, BG_AB_NodePositions[i][0], BG_AB_NodePositions[i][1], BG_AB_NodePositions[i][2], BG_AB_NodePositions[i][3], 0, 0, std::sin(BG_AB_NodePositions[i][3]/2), std::cos(BG_AB_NodePositions[i][3]/2), RESPAWN_ONE_DAY)
- || !AddObject(BG_AB_OBJECT_AURA_ALLY + 8*i, BG_AB_OBJECTID_AURA_A, BG_AB_NodePositions[i][0], BG_AB_NodePositions[i][1], BG_AB_NodePositions[i][2], BG_AB_NodePositions[i][3], 0, 0, std::sin(BG_AB_NodePositions[i][3]/2), std::cos(BG_AB_NodePositions[i][3]/2), RESPAWN_ONE_DAY)
- || !AddObject(BG_AB_OBJECT_AURA_HORDE + 8*i, BG_AB_OBJECTID_AURA_H, BG_AB_NodePositions[i][0], BG_AB_NodePositions[i][1], BG_AB_NodePositions[i][2], BG_AB_NodePositions[i][3], 0, 0, std::sin(BG_AB_NodePositions[i][3]/2), std::cos(BG_AB_NodePositions[i][3]/2), RESPAWN_ONE_DAY)
- || !AddObject(BG_AB_OBJECT_AURA_CONTESTED + 8*i, BG_AB_OBJECTID_AURA_C, BG_AB_NodePositions[i][0], BG_AB_NodePositions[i][1], BG_AB_NodePositions[i][2], BG_AB_NodePositions[i][3], 0, 0, std::sin(BG_AB_NodePositions[i][3]/2), std::cos(BG_AB_NodePositions[i][3]/2), RESPAWN_ONE_DAY)
-)
+ if (!AddObject(BG_AB_OBJECT_BANNER_NEUTRAL + 8*i, BG_AB_OBJECTID_NODE_BANNER_0 + i, BG_AB_NodePositions[i], 0, 0, std::sin(BG_AB_NodePositions[i].GetOrientation()/2), std::cos(BG_AB_NodePositions[i].GetOrientation()/2), RESPAWN_ONE_DAY)
+ || !AddObject(BG_AB_OBJECT_BANNER_CONT_A + 8*i, BG_AB_OBJECTID_BANNER_CONT_A, BG_AB_NodePositions[i], 0, 0, std::sin(BG_AB_NodePositions[i].GetOrientation()/2), std::cos(BG_AB_NodePositions[i].GetOrientation()/2), RESPAWN_ONE_DAY)
+ || !AddObject(BG_AB_OBJECT_BANNER_CONT_H + 8*i, BG_AB_OBJECTID_BANNER_CONT_H, BG_AB_NodePositions[i], 0, 0, std::sin(BG_AB_NodePositions[i].GetOrientation()/2), std::cos(BG_AB_NodePositions[i].GetOrientation()/2), RESPAWN_ONE_DAY)
+ || !AddObject(BG_AB_OBJECT_BANNER_ALLY + 8*i, BG_AB_OBJECTID_BANNER_A, BG_AB_NodePositions[i], 0, 0, std::sin(BG_AB_NodePositions[i].GetOrientation()/2), std::cos(BG_AB_NodePositions[i].GetOrientation()/2), RESPAWN_ONE_DAY)
+ || !AddObject(BG_AB_OBJECT_BANNER_HORDE + 8*i, BG_AB_OBJECTID_BANNER_H, BG_AB_NodePositions[i], 0, 0, std::sin(BG_AB_NodePositions[i].GetOrientation()/2), std::cos(BG_AB_NodePositions[i].GetOrientation()/2), RESPAWN_ONE_DAY)
+ || !AddObject(BG_AB_OBJECT_AURA_ALLY + 8*i, BG_AB_OBJECTID_AURA_A, BG_AB_NodePositions[i], 0, 0, std::sin(BG_AB_NodePositions[i].GetOrientation()/2), std::cos(BG_AB_NodePositions[i].GetOrientation()/2), RESPAWN_ONE_DAY)
+ || !AddObject(BG_AB_OBJECT_AURA_HORDE + 8*i, BG_AB_OBJECTID_AURA_H, BG_AB_NodePositions[i], 0, 0, std::sin(BG_AB_NodePositions[i].GetOrientation()/2), std::cos(BG_AB_NodePositions[i].GetOrientation()/2), RESPAWN_ONE_DAY)
+ || !AddObject(BG_AB_OBJECT_AURA_CONTESTED + 8*i, BG_AB_OBJECTID_AURA_C, BG_AB_NodePositions[i], 0, 0, std::sin(BG_AB_NodePositions[i].GetOrientation()/2), std::cos(BG_AB_NodePositions[i].GetOrientation()/2), RESPAWN_ONE_DAY))
{
TC_LOG_ERROR("sql.sql", "BatteGroundAB: Failed to spawn some object Battleground not created!");
return false;
}
}
+
if (!AddObject(BG_AB_OBJECT_GATE_A, BG_AB_OBJECTID_GATE_A, BG_AB_DoorPositions[0][0], BG_AB_DoorPositions[0][1], BG_AB_DoorPositions[0][2], BG_AB_DoorPositions[0][3], BG_AB_DoorPositions[0][4], BG_AB_DoorPositions[0][5], BG_AB_DoorPositions[0][6], BG_AB_DoorPositions[0][7], RESPAWN_IMMEDIATELY)
- || !AddObject(BG_AB_OBJECT_GATE_H, BG_AB_OBJECTID_GATE_H, BG_AB_DoorPositions[1][0], BG_AB_DoorPositions[1][1], BG_AB_DoorPositions[1][2], BG_AB_DoorPositions[1][3], BG_AB_DoorPositions[1][4], BG_AB_DoorPositions[1][5], BG_AB_DoorPositions[1][6], BG_AB_DoorPositions[1][7], RESPAWN_IMMEDIATELY)
-)
+ || !AddObject(BG_AB_OBJECT_GATE_H, BG_AB_OBJECTID_GATE_H, BG_AB_DoorPositions[1][0], BG_AB_DoorPositions[1][1], BG_AB_DoorPositions[1][2], BG_AB_DoorPositions[1][3], BG_AB_DoorPositions[1][4], BG_AB_DoorPositions[1][5], BG_AB_DoorPositions[1][6], BG_AB_DoorPositions[1][7], RESPAWN_IMMEDIATELY))
{
TC_LOG_ERROR("sql.sql", "BatteGroundAB: Failed to spawn door object Battleground not created!");
return false;
}
+
//buffs
for (int i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i)
{
if (!AddObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + 3 * i, Buff_Entries[0], BG_AB_BuffPositions[i][0], BG_AB_BuffPositions[i][1], BG_AB_BuffPositions[i][2], BG_AB_BuffPositions[i][3], 0, 0, std::sin(BG_AB_BuffPositions[i][3]/2), std::cos(BG_AB_BuffPositions[i][3]/2), RESPAWN_ONE_DAY)
|| !AddObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + 3 * i + 1, Buff_Entries[1], BG_AB_BuffPositions[i][0], BG_AB_BuffPositions[i][1], BG_AB_BuffPositions[i][2], BG_AB_BuffPositions[i][3], 0, 0, std::sin(BG_AB_BuffPositions[i][3]/2), std::cos(BG_AB_BuffPositions[i][3]/2), RESPAWN_ONE_DAY)
- || !AddObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + 3 * i + 2, Buff_Entries[2], BG_AB_BuffPositions[i][0], BG_AB_BuffPositions[i][1], BG_AB_BuffPositions[i][2], BG_AB_BuffPositions[i][3], 0, 0, std::sin(BG_AB_BuffPositions[i][3]/2), std::cos(BG_AB_BuffPositions[i][3]/2), RESPAWN_ONE_DAY)
-)
+ || !AddObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + 3 * i + 2, Buff_Entries[2], BG_AB_BuffPositions[i][0], BG_AB_BuffPositions[i][1], BG_AB_BuffPositions[i][2], BG_AB_BuffPositions[i][3], 0, 0, std::sin(BG_AB_BuffPositions[i][3]/2), std::cos(BG_AB_BuffPositions[i][3]/2), RESPAWN_ONE_DAY))
TC_LOG_ERROR("sql.sql", "BatteGroundAB: Failed to spawn buff object!");
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
index 9ed34691adf..9abc7627b24 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
@@ -20,6 +20,7 @@
#define __BATTLEGROUNDAB_H
#include "Battleground.h"
+#include "Object.h"
enum BG_AB_WorldStates
{
@@ -184,8 +185,7 @@ enum BG_AB_Objectives
#define AB_EVENT_START_BATTLE 9158 // Achievement: Let's Get This Done
-// x, y, z, o
-const float BG_AB_NodePositions[BG_AB_DYNAMIC_NODES_COUNT][4] =
+Position const BG_AB_NodePositions[BG_AB_DYNAMIC_NODES_COUNT] =
{
{1166.785f, 1200.132f, -56.70859f, 0.9075713f}, // stables
{977.0156f, 1046.616f, -44.80923f, -2.600541f}, // blacksmith
@@ -218,8 +218,7 @@ const float BG_AB_BuffPositions[BG_AB_DYNAMIC_NODES_COUNT][4] =
{1146.62f, 816.94f, -98.49f, 6.14f} // gold mine
};
-// x, y, z, o
-const float BG_AB_SpiritGuidePos[BG_AB_ALL_NODES_COUNT][4] =
+Position const BG_AB_SpiritGuidePos[BG_AB_ALL_NODES_COUNT] =
{
{1200.03f, 1171.09f, -56.47f, 5.15f}, // stables
{1017.43f, 960.61f, -42.95f, 4.88f}, // blacksmith
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
index 610e0bcecc7..16576aa888e 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
@@ -289,7 +289,6 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type)
cinfoid=uint16(BG_AV_StaticCreaturePos[type][4]);
creature = AddCreature(BG_AV_StaticCreatureInfo[cinfoid][0],
(type+AV_CPLACE_MAX),
- BG_AV_StaticCreatureInfo[cinfoid][1],
BG_AV_StaticCreaturePos[type][0],
BG_AV_StaticCreaturePos[type][1],
BG_AV_StaticCreaturePos[type][2],
@@ -303,11 +302,7 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type)
{
creature = AddCreature(BG_AV_CreatureInfo[cinfoid][0],
type,
- BG_AV_CreatureInfo[cinfoid][1],
- BG_AV_CreaturePos[type][0],
- BG_AV_CreaturePos[type][1],
- BG_AV_CreaturePos[type][2],
- BG_AV_CreaturePos[type][3]);
+ BG_AV_CreaturePos[type]);
level = (BG_AV_CreatureInfo[cinfoid][2] == BG_AV_CreatureInfo[cinfoid][3])
? BG_AV_CreatureInfo[cinfoid][2]
: urand(BG_AV_CreatureInfo[cinfoid][2], BG_AV_CreatureInfo[cinfoid][3]);
@@ -365,11 +360,7 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type)
{
if (Creature* trigger = AddCreature(WORLD_TRIGGER,
triggerSpawnID,
- BG_AV_CreatureInfo[creature->GetEntry()][1],
- BG_AV_CreaturePos[triggerSpawnID][0],
- BG_AV_CreaturePos[triggerSpawnID][1],
- BG_AV_CreaturePos[triggerSpawnID][2],
- BG_AV_CreaturePos[triggerSpawnID][3]))
+ BG_AV_CreaturePos[triggerSpawnID]))
{
trigger->setFaction(newFaction);
trigger->CastSpell(trigger, SPELL_HONORABLE_DEFENDER_25Y, false);
@@ -782,7 +773,7 @@ void BattlegroundAV::PopulateNode(BG_AV_Nodes node)
//spiritguide
if (BgCreatures[node])
DelCreature(node);
- if (!AddSpiritGuide(node, BG_AV_CreaturePos[node][0], BG_AV_CreaturePos[node][1], BG_AV_CreaturePos[node][2], BG_AV_CreaturePos[node][3], owner))
+ if (!AddSpiritGuide(node, BG_AV_CreaturePos[node], GetTeamIndexByTeamId(owner)))
TC_LOG_ERROR("bg.battleground", "AV: couldn't spawn spiritguide at node %i", node);
}
for (uint8 i=0; i<4; i++)
@@ -795,11 +786,8 @@ void BattlegroundAV::PopulateNode(BG_AV_Nodes node)
{
trigger = AddCreature(WORLD_TRIGGER,
node + 302,
- owner,
- BG_AV_CreaturePos[node + 302][0],
- BG_AV_CreaturePos[node + 302][1],
- BG_AV_CreaturePos[node + 302][2],
- BG_AV_CreaturePos[node + 302][3]);
+ BG_AV_CreaturePos[node + 302],
+ GetTeamIndexByTeamId(owner));
}
//add bonus honor aura trigger creature when node is accupied
@@ -1219,15 +1207,10 @@ WorldSafeLocsEntry const* BattlegroundAV::GetClosestGraveYard(Player* player)
bool BattlegroundAV::SetupBattleground()
{
// Create starting objects
- if (
- // alliance gates
- !AddObject(BG_AV_OBJECT_DOOR_A, BG_AV_OBJECTID_GATE_A,
- BG_AV_DoorPositons[0][0], BG_AV_DoorPositons[0][1], BG_AV_DoorPositons[0][2], BG_AV_DoorPositons[0][3],
- 0, 0, std::sin(BG_AV_DoorPositons[0][3]/2), std::cos(BG_AV_DoorPositons[0][3]/2), RESPAWN_IMMEDIATELY)
+ if (// alliance gates
+ !AddObject(BG_AV_OBJECT_DOOR_A, BG_AV_OBJECTID_GATE_A, BG_AV_DoorPositons[0], 0, 0, std::sin(BG_AV_DoorPositons[0].GetOrientation()/2), std::cos(BG_AV_DoorPositons[0].GetOrientation()/2), RESPAWN_IMMEDIATELY)
// horde gates
- || !AddObject(BG_AV_OBJECT_DOOR_H, BG_AV_OBJECTID_GATE_H,
- BG_AV_DoorPositons[1][0], BG_AV_DoorPositons[1][1], BG_AV_DoorPositons[1][2], BG_AV_DoorPositons[1][3],
- 0, 0, std::sin(BG_AV_DoorPositons[1][3]/2), std::cos(BG_AV_DoorPositons[1][3]/2), RESPAWN_IMMEDIATELY))
+ || !AddObject(BG_AV_OBJECT_DOOR_H, BG_AV_OBJECTID_GATE_H, BG_AV_DoorPositons[1], 0, 0, std::sin(BG_AV_DoorPositons[1].GetOrientation()/2), std::cos(BG_AV_DoorPositons[1].GetOrientation()/2), RESPAWN_IMMEDIATELY))
{
TC_LOG_ERROR("sql.sql", "BatteGroundAV: Failed to spawn some object Battleground not created!1");
return false;
@@ -1504,8 +1487,8 @@ bool BattlegroundAV::SetupBattleground()
AddAVCreature(0, i + AV_CPLACE_MAX);
//mainspiritguides:
TC_LOG_DEBUG("bg.battleground", "BG_AV: start spawning spiritguides creatures");
- AddSpiritGuide(7, BG_AV_CreaturePos[7][0], BG_AV_CreaturePos[7][1], BG_AV_CreaturePos[7][2], BG_AV_CreaturePos[7][3], ALLIANCE);
- AddSpiritGuide(8, BG_AV_CreaturePos[8][0], BG_AV_CreaturePos[8][1], BG_AV_CreaturePos[8][2], BG_AV_CreaturePos[8][3], HORDE);
+ AddSpiritGuide(7, BG_AV_CreaturePos[7], TEAM_ALLIANCE);
+ AddSpiritGuide(8, BG_AV_CreaturePos[8], TEAM_HORDE);
//spawn the marshals (those who get deleted, if a tower gets destroyed)
TC_LOG_DEBUG("bg.battleground", "BG_AV: start spawning marshal creatures");
for (i = AV_NPC_A_MARSHAL_SOUTH; i <= AV_NPC_H_MARSHAL_WTOWER; i++)
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
index 716e675a840..03dd0ffcf5c 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
@@ -20,6 +20,7 @@
#define __BATTLEGROUNDAV_H
#include "Battleground.h"
+#include "Object.h"
#define LANG_BG_AV_A_CAPTAIN_BUFF "Begone. Uncouth scum! The Alliance shall prevail in Alterac Valley!"
#define LANG_BG_AV_H_CAPTAIN_BUFF "Now is the time to attack! For the Horde!"
@@ -528,7 +529,7 @@ const float BG_AV_ObjectPos[AV_OPLACE_MAX][4] =
{-951.394f, -193.695f, 67.634f, 0.802851f}
};
-const float BG_AV_DoorPositons[2][4] =
+Position const BG_AV_DoorPositons[2] =
{
{780.487f, -493.024f, 99.9553f, 3.0976f}, //alliance
{-1375.193f, -538.981f, 55.2824f, 0.72178f} //horde
@@ -624,8 +625,7 @@ enum BG_AV_CreaturePlace
AV_CPLACE_MAX = 321
};
-//x, y, z, o
-const float BG_AV_CreaturePos[AV_CPLACE_MAX][4] =
+Position const BG_AV_CreaturePos[AV_CPLACE_MAX] =
{
//spiritguides
{643.000000f, 44.000000f, 69.740196f, -0.001854f},
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
index 3eb52945236..9e9e82b32b8 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
@@ -223,16 +223,16 @@ bool BattlegroundDS::SetupBattleground()
// gates
if (!AddObject(BG_DS_OBJECT_DOOR_1, BG_DS_OBJECT_TYPE_DOOR_1, 1350.95f, 817.2f, 20.8096f, 3.15f, 0, 0, 0.99627f, 0.0862864f, RESPAWN_IMMEDIATELY)
|| !AddObject(BG_DS_OBJECT_DOOR_2, BG_DS_OBJECT_TYPE_DOOR_2, 1232.65f, 764.913f, 20.0729f, 6.3f, 0, 0, 0.0310211f, -0.999519f, RESPAWN_IMMEDIATELY)
- // water
+ // water
|| !AddObject(BG_DS_OBJECT_WATER_1, BG_DS_OBJECT_TYPE_WATER_1, 1291.56f, 790.837f, 7.1f, 3.14238f, 0, 0, 0.694215f, -0.719768f, 120)
|| !AddObject(BG_DS_OBJECT_WATER_2, BG_DS_OBJECT_TYPE_WATER_2, 1291.56f, 790.837f, 7.1f, 3.14238f, 0, 0, 0.694215f, -0.719768f, 120)
- // buffs
+ // buffs
|| !AddObject(BG_DS_OBJECT_BUFF_1, BG_DS_OBJECT_TYPE_BUFF_1, 1291.7f, 813.424f, 7.11472f, 4.64562f, 0, 0, 0.730314f, -0.683111f, 120)
|| !AddObject(BG_DS_OBJECT_BUFF_2, BG_DS_OBJECT_TYPE_BUFF_2, 1291.7f, 768.911f, 7.11472f, 1.55194f, 0, 0, 0.700409f, 0.713742f, 120)
- // knockback creatures
- || !AddCreature(BG_DS_NPC_TYPE_WATER_SPOUT, BG_DS_NPC_WATERFALL_KNOCKBACK, 0, 1292.587f, 790.2205f, 7.19796f, 3.054326f, RESPAWN_IMMEDIATELY)
- || !AddCreature(BG_DS_NPC_TYPE_WATER_SPOUT, BG_DS_NPC_PIPE_KNOCKBACK_1, 0, 1369.977f, 817.2882f, 16.08718f, 3.106686f, RESPAWN_IMMEDIATELY)
- || !AddCreature(BG_DS_NPC_TYPE_WATER_SPOUT, BG_DS_NPC_PIPE_KNOCKBACK_2, 0, 1212.833f, 765.3871f, 16.09484f, 0.0f, RESPAWN_IMMEDIATELY))
+ // knockback creatures
+ || !AddCreature(BG_DS_NPC_TYPE_WATER_SPOUT, BG_DS_NPC_WATERFALL_KNOCKBACK, 1292.587f, 790.2205f, 7.19796f, 3.054326f, TEAM_NEUTRAL, RESPAWN_IMMEDIATELY)
+ || !AddCreature(BG_DS_NPC_TYPE_WATER_SPOUT, BG_DS_NPC_PIPE_KNOCKBACK_1, 1369.977f, 817.2882f, 16.08718f, 3.106686f, TEAM_NEUTRAL, RESPAWN_IMMEDIATELY)
+ || !AddCreature(BG_DS_NPC_TYPE_WATER_SPOUT, BG_DS_NPC_PIPE_KNOCKBACK_2, 1212.833f, 765.3871f, 16.09484f, 0.0f, TEAM_NEUTRAL, RESPAWN_IMMEDIATELY))
{
TC_LOG_ERROR("sql.sql", "BatteGroundDS: Failed to spawn some object!");
return false;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
index bc684aed176..213a91bea88 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
@@ -23,7 +23,6 @@
#include "BattlegroundMgr.h"
#include "Creature.h"
#include "Language.h"
-#include "Object.h"
#include "Player.h"
#include "Util.h"
@@ -523,14 +522,14 @@ bool BattlegroundEY::SetupBattleground()
WorldSafeLocsEntry const* sg = NULL;
sg = sWorldSafeLocsStore.LookupEntry(EY_GRAVEYARD_MAIN_ALLIANCE);
- if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, ALLIANCE))
+ if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, TEAM_ALLIANCE))
{
TC_LOG_ERROR("sql.sql", "BatteGroundEY: Failed to spawn spirit guide! Battleground not created!");
return false;
}
sg = sWorldSafeLocsStore.LookupEntry(EY_GRAVEYARD_MAIN_HORDE);
- if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_HORDE, sg->x, sg->y, sg->z, 3.193953f, HORDE))
+ if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_HORDE, sg->x, sg->y, sg->z, 3.193953f, TEAM_HORDE))
{
TC_LOG_ERROR("sql.sql", "BatteGroundEY: Failed to spawn spirit guide! Battleground not created!");
return false;
@@ -768,7 +767,7 @@ void BattlegroundEY::EventTeamCapturedPoint(Player* player, uint32 Point)
WorldSafeLocsEntry const* sg = NULL;
sg = sWorldSafeLocsStore.LookupEntry(m_CapturingPointTypes[Point].GraveYardId);
- if (!sg || !AddSpiritGuide(Point, sg->x, sg->y, sg->z, 3.124139f, Team))
+ if (!sg || !AddSpiritGuide(Point, sg->x, sg->y, sg->z, 3.124139f, GetTeamIndexByTeamId(Team)))
TC_LOG_ERROR("bg.battleground", "BatteGroundEY: Failed to spawn spirit guide! point: %u, team: %u, graveyard_id: %u",
Point, Team, m_CapturingPointTypes[Point].GraveYardId);
@@ -782,7 +781,7 @@ void BattlegroundEY::EventTeamCapturedPoint(Player* player, uint32 Point)
Creature* trigger = GetBGCreature(Point + 6, false);//0-5 spirit guides
if (!trigger)
- trigger = AddCreature(WORLD_TRIGGER, Point+6, Team, BG_EY_TriggerPositions[Point][0], BG_EY_TriggerPositions[Point][1], BG_EY_TriggerPositions[Point][2], BG_EY_TriggerPositions[Point][3]);
+ trigger = AddCreature(WORLD_TRIGGER, Point+6, BG_EY_TriggerPositions[Point], GetTeamIndexByTeamId(Team));
//add bonus honor aura trigger creature when node is accupied
//cast bonus aura (+50% honor in 25yards)
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
index baa75129c1e..9e5088d7ba5 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
@@ -19,8 +19,9 @@
#ifndef __BATTLEGROUNDEY_H
#define __BATTLEGROUNDEY_H
-#include "Language.h"
#include "Battleground.h"
+#include "Language.h"
+#include "Object.h"
enum BG_EY_Misc
{
@@ -255,8 +256,7 @@ struct BattlegroundEYPointIconsStruct
uint32 WorldStateHordeControlledIndex;
};
-// x, y, z, o
-const float BG_EY_TriggerPositions[EY_POINTS_MAX][4] =
+Position const BG_EY_TriggerPositions[EY_POINTS_MAX] =
{
{2044.28f, 1729.68f, 1189.96f, 0.017453f}, // FEL_REAVER center
{2048.83f, 1393.65f, 1194.49f, 0.20944f}, // BLOOD_ELF center
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
index 7940aaf0585..9e9cc6c63ee 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
@@ -369,20 +369,20 @@ bool BattlegroundIC::SetupBattleground()
for (uint8 i = 2; i < MAX_NORMAL_NPCS_SPAWNS; ++i)
{
- if (!AddCreature(BG_IC_NpcSpawnlocs[i].entry, BG_IC_NpcSpawnlocs[i].type, BG_IC_NpcSpawnlocs[i].team,
+ if (!AddCreature(BG_IC_NpcSpawnlocs[i].entry, BG_IC_NpcSpawnlocs[i].type,
BG_IC_NpcSpawnlocs[i].x, BG_IC_NpcSpawnlocs[i].y,
BG_IC_NpcSpawnlocs[i].z, BG_IC_NpcSpawnlocs[i].o,
- RESPAWN_ONE_DAY))
+ BG_IC_NpcSpawnlocs[i].team, RESPAWN_ONE_DAY))
{
TC_LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[i].entry);
return false;
}
}
- if (!AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1+5, BG_IC_SpiritGuidePos[5][0], BG_IC_SpiritGuidePos[5][1], BG_IC_SpiritGuidePos[5][2], BG_IC_SpiritGuidePos[5][3], ALLIANCE)
- || !AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1+6, BG_IC_SpiritGuidePos[6][0], BG_IC_SpiritGuidePos[6][1], BG_IC_SpiritGuidePos[6][2], BG_IC_SpiritGuidePos[6][3], HORDE)
- || !AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1+3, BG_IC_SpiritGuidePos[7][0], BG_IC_SpiritGuidePos[7][1], BG_IC_SpiritGuidePos[7][2], BG_IC_SpiritGuidePos[7][3], ALLIANCE)
- || !AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1+4, BG_IC_SpiritGuidePos[8][0], BG_IC_SpiritGuidePos[8][1], BG_IC_SpiritGuidePos[8][2], BG_IC_SpiritGuidePos[8][3], HORDE))
+ if (!AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1+5, BG_IC_SpiritGuidePos[5], TEAM_ALLIANCE)
+ || !AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1+6, BG_IC_SpiritGuidePos[6], TEAM_HORDE)
+ || !AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1+3, BG_IC_SpiritGuidePos[7], TEAM_ALLIANCE)
+ || !AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1+4, BG_IC_SpiritGuidePos[8], TEAM_HORDE))
{
TC_LOG_ERROR("bg.battleground", "Isle of Conquest: Failed to spawn initial spirit guide!");
return false;
@@ -607,10 +607,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
{
if (nodePoint->nodeType != NODE_TYPE_REFINERY && nodePoint->nodeType != NODE_TYPE_QUARRY)
{
- if (!AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1+nodePoint->nodeType-2,
- BG_IC_SpiritGuidePos[nodePoint->nodeType][0], BG_IC_SpiritGuidePos[nodePoint->nodeType][1],
- BG_IC_SpiritGuidePos[nodePoint->nodeType][2], BG_IC_SpiritGuidePos[nodePoint->nodeType][3],
- (nodePoint->faction == TEAM_ALLIANCE ? ALLIANCE : HORDE)))
+ if (!AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1+nodePoint->nodeType-2, BG_IC_SpiritGuidePos[nodePoint->nodeType], nodePoint->faction))
TC_LOG_ERROR("bg.battleground", "Isle of Conquest: Failed to spawn spirit guide! point: %u, team: %u, ", nodePoint->nodeType, nodePoint->faction);
}
@@ -625,9 +622,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
{
uint8 type = BG_IC_GO_HANGAR_TELEPORTER_1+u;
if (!AddObject(type, (nodePoint->faction == TEAM_ALLIANCE ? GO_ALLIANCE_GUNSHIP_PORTAL : GO_HORDE_GUNSHIP_PORTAL),
- BG_IC_HangarTeleporters[u].GetPositionX(), BG_IC_HangarTeleporters[u].GetPositionY(),
- BG_IC_HangarTeleporters[u].GetPositionZ(), BG_IC_HangarTeleporters[u].GetOrientation(),
- 0, 0, 0, 0, RESPAWN_ONE_DAY))
+ BG_IC_HangarTeleporters[u], 0, 0, 0, 0, RESPAWN_ONE_DAY))
{
TC_LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning a gunship portal. Type: %u", BG_IC_GO_HANGAR_TELEPORTER_1+u);
}
@@ -688,11 +683,9 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
if (GetBGCreature(type, false) && GetBGCreature(type)->IsAlive())
continue;
- if (AddCreature(nodePoint->faction == TEAM_ALLIANCE ? NPC_GLAIVE_THROWER_A : NPC_GLAIVE_THROWER_H, type, nodePoint->faction,
- BG_IC_DocksVehiclesGlaives[i].GetPositionX(), BG_IC_DocksVehiclesGlaives[i].GetPositionY(),
- BG_IC_DocksVehiclesGlaives[i].GetPositionZ(), BG_IC_DocksVehiclesGlaives[i].GetOrientation(),
- RESPAWN_ONE_DAY))
- GetBGCreature(type)->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
+ if (AddCreature(nodePoint->faction == TEAM_ALLIANCE ? NPC_GLAIVE_THROWER_A : NPC_GLAIVE_THROWER_H, type,
+ BG_IC_DocksVehiclesGlaives[i], nodePoint->faction, RESPAWN_ONE_DAY))
+ GetBGCreature(type)->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
}
// spawning catapults
@@ -703,11 +696,8 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
if (GetBGCreature(type, false) && GetBGCreature(type)->IsAlive())
continue;
- if (AddCreature(NPC_CATAPULT, type, nodePoint->faction,
- BG_IC_DocksVehiclesCatapults[i].GetPositionX(), BG_IC_DocksVehiclesCatapults[i].GetPositionY(),
- BG_IC_DocksVehiclesCatapults[i].GetPositionZ(), BG_IC_DocksVehiclesCatapults[i].GetOrientation(),
- RESPAWN_ONE_DAY))
- GetBGCreature(type)->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
+ if (AddCreature(NPC_CATAPULT, type, BG_IC_DocksVehiclesCatapults[i], nodePoint->faction, RESPAWN_ONE_DAY))
+ GetBGCreature(type)->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
}
break;
case BG_IC_GO_WORKSHOP_BANNER:
@@ -738,10 +728,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
if (GetBGCreature(type, false) && GetBGCreature(type)->IsAlive())
continue;
- if (AddCreature(NPC_DEMOLISHER, type, nodePoint->faction,
- BG_IC_WorkshopVehicles[i].GetPositionX(), BG_IC_WorkshopVehicles[i].GetPositionY(),
- BG_IC_WorkshopVehicles[i].GetPositionZ(), BG_IC_WorkshopVehicles[i].GetOrientation(),
- RESPAWN_ONE_DAY))
+ if (AddCreature(NPC_DEMOLISHER, type, BG_IC_WorkshopVehicles[i], nodePoint->faction, RESPAWN_ONE_DAY))
GetBGCreature(type)->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
}
@@ -761,10 +748,8 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
uint8 siegeType = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_SIEGE_ENGINE_A : BG_IC_NPC_SIEGE_ENGINE_H);
if (!GetBGCreature(siegeType, false) || !GetBGCreature(siegeType)->IsAlive())
{
- AddCreature((nodePoint->faction == TEAM_ALLIANCE ? NPC_SIEGE_ENGINE_A : NPC_SIEGE_ENGINE_H), siegeType, nodePoint->faction,
- BG_IC_WorkshopVehicles[4].GetPositionX(), BG_IC_WorkshopVehicles[4].GetPositionY(),
- BG_IC_WorkshopVehicles[4].GetPositionZ(), BG_IC_WorkshopVehicles[4].GetOrientation(),
- RESPAWN_ONE_DAY);
+ AddCreature((nodePoint->faction == TEAM_ALLIANCE ? NPC_SIEGE_ENGINE_A : NPC_SIEGE_ENGINE_H), siegeType,
+ BG_IC_WorkshopVehicles[4], nodePoint->faction, RESPAWN_ONE_DAY);
if (Creature* siegeEngine = GetBGCreature(siegeType))
{
@@ -784,7 +769,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
if (GameObject* seaforiumBombs = GetBGObject(BG_IC_GO_SEAFORIUM_BOMBS_1+i))
{
seaforiumBombs->SetRespawnTime(10);
- seaforiumBombs->SetUInt32Value(GAMEOBJECT_FACTION, BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
+ seaforiumBombs->SetFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
}
}
break;
@@ -830,12 +815,12 @@ void BattlegroundIC::DestroyGate(Player* player, GameObject* go)
if (go->GetEntry() == GO_HORDE_GATE_1 || go->GetEntry() == GO_HORDE_GATE_2 || go->GetEntry() == GO_HORDE_GATE_3)
{
- if (!GetBgMap()->GetCreature(BgCreatures[BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].type]) && !AddCreature(BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].entry, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].type, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].team, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].x, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].y, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].z, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].o, RESPAWN_ONE_DAY))
+ if (!GetBgMap()->GetCreature(BgCreatures[BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].type]) && !AddCreature(BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].entry, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].type, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].x, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].y, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].z, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].o, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].team, RESPAWN_ONE_DAY))
TC_LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].entry);
}
else if (go->GetEntry() == GO_ALLIANCE_GATE_1 || go->GetEntry() == GO_ALLIANCE_GATE_2 || go->GetEntry() == GO_ALLIANCE_GATE_3)
{
- if (!GetBgMap()->GetCreature(BgCreatures[BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].type]) && !AddCreature(BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].entry, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].type, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].team, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].x, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].y, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].z, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].o, RESPAWN_ONE_DAY))
+ if (!GetBgMap()->GetCreature(BgCreatures[BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].type]) && !AddCreature(BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].entry, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].type, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].x, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].y, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].z, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].o, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].team, RESPAWN_ONE_DAY))
TC_LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].entry);
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
index 9bed8cdc2cd..091a75e7449 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
@@ -204,7 +204,7 @@ struct ICNpc
{
uint32 type;
uint32 entry;
- uint32 team;
+ TeamId team;
float x;
float y;
float z;
@@ -783,7 +783,7 @@ const uint32 BG_IC_GraveyardIds[MAX_NODE_TYPES+2] = {0, 0, 1480, 1481, 1482, 148
const Position TransportMovementInfo = {7.305609f, -0.095246f, 34.51022f, 0.0f};
const Position TeleportToTransportPosition = {661.0f, -1244.0f, 288.0f, 0.0f};
-const float BG_IC_SpiritGuidePos[MAX_NODE_TYPES+2][4] =
+Position const BG_IC_SpiritGuidePos[MAX_NODE_TYPES+2] =
{
{0.0f, 0.0f, 0.0f, 0.0f}, // no grave
{0.0f, 0.0f, 0.0f, 0.0f}, // no grave
@@ -819,7 +819,7 @@ struct ICNodePoint
{
uint32 gameobject_type; // with this we will get the GameObject of that point
uint32 gameobject_entry; // what gameobject entry is active here.
- uint8 faction; // who has this node
+ TeamId faction; // who has this node
ICNodePointType nodeType; // here we can specify if it is graveyards, hangar etc...
uint32 banners[4]; // the banners that have this point
bool needChange; // this is used for the 1 minute time period after the point is captured
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
index 470bc549be5..c2586e8aa64 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
@@ -103,7 +103,7 @@ bool BattlegroundSA::ResetObjs()
for (uint8 i = 0; i < 6; i++)
GateStatus[i] = BG_SA_GATE_OK;
- AddCreature(BG_SA_NpcEntries[BG_SA_NPC_KANRETHAD], BG_SA_NPC_KANRETHAD, 0, BG_SA_NpcSpawnlocs[BG_SA_NPC_KANRETHAD]);
+ AddCreature(BG_SA_NpcEntries[BG_SA_NPC_KANRETHAD], BG_SA_NPC_KANRETHAD, BG_SA_NpcSpawnlocs[BG_SA_NPC_KANRETHAD]);
for (uint8 i = 0; i <= BG_SA_PORTAL_DEFFENDER_RED; i++)
{
@@ -148,7 +148,7 @@ bool BattlegroundSA::ResetObjs()
//By capturing GYs.
for (uint8 i = 0; i < BG_SA_DEMOLISHER_5; i++)
{
- if (!AddCreature(BG_SA_NpcEntries[i], i, (Attackers == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE), BG_SA_NpcSpawnlocs[i], 600))
+ if (!AddCreature(BG_SA_NpcEntries[i], i, BG_SA_NpcSpawnlocs[i], Attackers == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE, 600))
return false;
}
@@ -185,12 +185,12 @@ bool BattlegroundSA::ResetObjs()
if (i == BG_SA_BEACH_GY)
{
GraveyardStatus[i] = Attackers;
- AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], ((Attackers == TEAM_HORDE)? HORDE : ALLIANCE));
+ AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], Attackers);
}
else
{
GraveyardStatus[i] = ((Attackers == TEAM_HORDE)? TEAM_ALLIANCE : TEAM_HORDE);
- if (!AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], ((Attackers == TEAM_HORDE)? ALLIANCE : HORDE)))
+ if (!AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], Attackers == TEAM_HORDE ? TEAM_ALLIANCE : TEAM_HORDE))
TC_LOG_ERROR("bg.battleground", "SOTA: couldn't spawn GY: %u", i);
}
}
@@ -681,7 +681,7 @@ void BattlegroundSA::DemolisherStartState(bool start)
}
}
-void BattlegroundSA::DestroyGate(Player* player, GameObject* go)
+void BattlegroundSA::DestroyGate(Player* /*player*/, GameObject* /*go*/)
{
}
@@ -766,7 +766,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
return;
}
- AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], (GraveyardStatus[i] == TEAM_ALLIANCE? ALLIANCE : HORDE));
+ AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], GraveyardStatus[i]);
uint32 npc = 0;
uint32 flag = 0;
@@ -779,20 +779,19 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
BG_SA_ObjSpawnlocs[flag], 0, 0, 0, 0, RESPAWN_ONE_DAY);
npc = BG_SA_NPC_RIGSPARK;
- if (Creature* rigspark = AddCreature(BG_SA_NpcEntries[npc], npc, Attackers, BG_SA_NpcSpawnlocs[npc]))
+ if (Creature* rigspark = AddCreature(BG_SA_NpcEntries[npc], npc, BG_SA_NpcSpawnlocs[npc], Attackers))
rigspark->AI()->Talk(TEXT_SPARKLIGHT_RIGSPARK_SPAWN);
for (uint8 j = BG_SA_DEMOLISHER_7; j <= BG_SA_DEMOLISHER_8; j++)
{
- AddCreature(BG_SA_NpcEntries[j], j, (Attackers == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE),
- BG_SA_NpcSpawnlocs[j], 600);
+ AddCreature(BG_SA_NpcEntries[j], j, BG_SA_NpcSpawnlocs[j], (Attackers == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE), 600);
if (Creature* dem = GetBGCreature(j))
dem->setFaction(BG_SA_Factions[Attackers]);
}
- UpdateWorldState(BG_SA_LEFT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE ? 1 : 0));
- UpdateWorldState(BG_SA_LEFT_GY_HORDE, (GraveyardStatus[i] == TEAM_ALLIANCE ? 0 : 1));
+ UpdateWorldState(BG_SA_LEFT_GY_ALLIANCE, GraveyardStatus[i] == TEAM_ALLIANCE);
+ UpdateWorldState(BG_SA_LEFT_GY_HORDE, GraveyardStatus[i] == TEAM_HORDE);
if (Creature* c = Source->FindNearestCreature(NPC_WORLD_TRIGGER, 500.0f))
SendChatMessage(c, Source->GetTeamId() == TEAM_ALLIANCE ? TEXT_WEST_GRAVEYARD_CAPTURED_A : TEXT_WEST_GRAVEYARD_CAPTURED_H, Source);
@@ -805,20 +804,19 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
BG_SA_ObjSpawnlocs[flag], 0, 0, 0, 0, RESPAWN_ONE_DAY);
npc = BG_SA_NPC_SPARKLIGHT;
- if (Creature* sparklight = AddCreature(BG_SA_NpcEntries[npc], npc, Attackers, BG_SA_NpcSpawnlocs[npc]))
+ if (Creature* sparklight = AddCreature(BG_SA_NpcEntries[npc], npc, BG_SA_NpcSpawnlocs[npc], Attackers))
sparklight->AI()->Talk(TEXT_SPARKLIGHT_RIGSPARK_SPAWN);
for (uint8 j = BG_SA_DEMOLISHER_5; j <= BG_SA_DEMOLISHER_6; j++)
{
- AddCreature(BG_SA_NpcEntries[j], j, (Attackers == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE),
- BG_SA_NpcSpawnlocs[j], 600);
+ AddCreature(BG_SA_NpcEntries[j], j, BG_SA_NpcSpawnlocs[j], Attackers == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE, 600);
if (Creature* dem = GetBGCreature(j))
dem->setFaction(BG_SA_Factions[Attackers]);
}
- UpdateWorldState(BG_SA_RIGHT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE ? 1 : 0));
- UpdateWorldState(BG_SA_RIGHT_GY_HORDE, (GraveyardStatus[i] == TEAM_ALLIANCE ? 0 : 1));
+ UpdateWorldState(BG_SA_RIGHT_GY_ALLIANCE, GraveyardStatus[i] == TEAM_ALLIANCE);
+ UpdateWorldState(BG_SA_RIGHT_GY_HORDE, GraveyardStatus[i] == TEAM_HORDE);
if (Creature* c = Source->FindNearestCreature(NPC_WORLD_TRIGGER, 500.0f))
SendChatMessage(c, Source->GetTeamId() == TEAM_ALLIANCE ? TEXT_EAST_GRAVEYARD_CAPTURED_A : TEXT_EAST_GRAVEYARD_CAPTURED_H, Source);
@@ -830,8 +828,8 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
AddObject(flag, (BG_SA_ObjEntries[flag] - (Source->GetTeamId() == TEAM_ALLIANCE ? 0 : 1)),
BG_SA_ObjSpawnlocs[flag], 0, 0, 0, 0, RESPAWN_ONE_DAY);
- UpdateWorldState(BG_SA_CENTER_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE ? 1 : 0));
- UpdateWorldState(BG_SA_CENTER_GY_HORDE, (GraveyardStatus[i] == TEAM_ALLIANCE ? 0 : 1));
+ UpdateWorldState(BG_SA_CENTER_GY_ALLIANCE, GraveyardStatus[i] == TEAM_ALLIANCE);
+ UpdateWorldState(BG_SA_CENTER_GY_HORDE, GraveyardStatus[i] == TEAM_HORDE);
if (Creature* c = Source->FindNearestCreature(NPC_WORLD_TRIGGER, 500.0f))
SendChatMessage(c, Source->GetTeamId() == TEAM_ALLIANCE ? TEXT_SOUTH_GRAVEYARD_CAPTURED_A : TEXT_SOUTH_GRAVEYARD_CAPTURED_H, Source);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
index 4814728c26d..eb5ffed657f 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
@@ -711,14 +711,14 @@ bool BattlegroundWS::SetupBattleground()
}
WorldSafeLocsEntry const* sg = sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_ALLIANCE);
- if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, ALLIANCE))
+ if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, TEAM_ALLIANCE))
{
TC_LOG_ERROR("sql.sql", "BatteGroundWS: Failed to spawn Alliance spirit guide! Battleground not created!");
return false;
}
sg = sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_HORDE);
- if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_HORDE, sg->x, sg->y, sg->z, 3.193953f, HORDE))
+ if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_HORDE, sg->x, sg->y, sg->z, 3.193953f, TEAM_HORDE))
{
TC_LOG_ERROR("sql.sql", "BatteGroundWS: Failed to spawn Horde spirit guide! Battleground not created!");
return false;
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 5c25b9454cb..03e32028232 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -257,7 +257,7 @@ void Creature::RemoveCorpse(bool setSpawnTime)
/**
* change the entry of creature until respawn
*/
-bool Creature::InitEntry(uint32 entry, uint32 /*team*/, const CreatureData* data)
+bool Creature::InitEntry(uint32 entry, CreatureData const* data /*= nullptr*/)
{
CreatureTemplate const* normalInfo = sObjectMgr->GetCreatureTemplate(entry);
if (!normalInfo)
@@ -334,10 +334,10 @@ bool Creature::InitEntry(uint32 entry, uint32 /*team*/, const CreatureData* data
SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0f);
SetFloatValue(UNIT_MOD_CAST_HASTE, 1.0f);
- SetSpeed(MOVE_WALK, cinfo->speed_walk);
- SetSpeed(MOVE_RUN, cinfo->speed_run);
- SetSpeed(MOVE_SWIM, 1.0f); // using 1.0 rate
- SetSpeed(MOVE_FLIGHT, 1.0f); // using 1.0 rate
+ SetSpeed(MOVE_WALK, cinfo->speed_walk);
+ SetSpeed(MOVE_RUN, cinfo->speed_run);
+ SetSpeed(MOVE_SWIM, 1.0f); // using 1.0 rate
+ SetSpeed(MOVE_FLIGHT, 1.0f); // using 1.0 rate
// Will set UNIT_FIELD_BOUNDINGRADIUS and UNIT_FIELD_COMBATREACH
SetObjectScale(cinfo->scale);
@@ -355,9 +355,9 @@ bool Creature::InitEntry(uint32 entry, uint32 /*team*/, const CreatureData* data
return true;
}
-bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData* data)
+bool Creature::UpdateEntry(uint32 entry, CreatureData const* data /*= nullptr*/)
{
- if (!InitEntry(Entry, team, data))
+ if (!InitEntry(entry, data))
return false;
CreatureTemplate const* cInfo = GetCreatureTemplate();
@@ -368,7 +368,7 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData* data)
if (!GetCreatureAddon())
SetSheath(SHEATH_STATE_MELEE);
- setFaction(cInfo->faction);
+ setFaction(cInfo->faction);
uint32 npcflag, unit_flags, dynamicflags;
ObjectMgr::ChooseCreatureFlags(cInfo, npcflag, unit_flags, dynamicflags, data);
@@ -734,16 +734,16 @@ void Creature::Motion_Initialize()
GetMotionMaster()->Initialize();
}
-bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry, uint32 vehId, uint32 team, float x, float y, float z, float ang, const CreatureData* data)
+bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 entry, float x, float y, float z, float ang, CreatureData const* data /*= nullptr*/, uint32 vehId /*= 0*/)
{
ASSERT(map);
SetMap(map);
SetPhaseMask(phaseMask, false);
- CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(Entry);
+ CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(entry);
if (!cinfo)
{
- TC_LOG_ERROR("sql.sql", "Creature::Create(): creature template (guidlow: %u, entry: %u) does not exist.", guidlow, Entry);
+ TC_LOG_ERROR("sql.sql", "Creature::Create(): creature template (guidlow: %u, entry: %u) does not exist.", guidlow, entry);
return false;
}
@@ -751,13 +751,12 @@ bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry,
//! returning correct zone id for selecting OutdoorPvP/Battlefield script
Relocate(x, y, z, ang);
- //oX = x; oY = y; dX = x; dY = y; m_moveTime = 0; m_startMove = 0;
- if (!CreateFromProto(guidlow, Entry, vehId, team, data))
+ if (!CreateFromProto(guidlow, entry, data, vehId))
return false;
if (!IsPositionValid())
{
- TC_LOG_ERROR("entities.unit", "Creature::Create(): given coordinates for creature (guidlow %d, entry %d) are not valid (X: %f, Y: %f, Z: %f, O: %f)", guidlow, Entry, x, y, z, ang);
+ TC_LOG_ERROR("entities.unit", "Creature::Create(): given coordinates for creature (guidlow %d, entry %d) are not valid (X: %f, Y: %f, Z: %f, O: %f)", guidlow, entry, x, y, z, ang);
return false;
}
@@ -809,9 +808,6 @@ bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry,
m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_GHOST);
}
- if (Entry == VISUAL_WAYPOINT)
- SetVisible(false);
-
return true;
}
@@ -819,10 +815,12 @@ void Creature::InitializeReactState()
{
if (IsTotem() || IsTrigger() || GetCreatureType() == CREATURE_TYPE_CRITTER || IsSpiritService())
SetReactState(REACT_PASSIVE);
+ /*
+ else if (IsCivilian())
+ SetReactState(REACT_DEFENSIVE);
+ */
else
SetReactState(REACT_AGGRESSIVE);
- /*else if (IsCivilian())
- SetReactState(REACT_DEFENSIVE);*/;
}
bool Creature::isCanInteractWithBattleMaster(Player* player, bool msg) const
@@ -1163,35 +1161,35 @@ float Creature::GetSpellDamageMod(int32 Rank) const
}
}
-bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint32 team, const CreatureData* data)
+bool Creature::CreateFromProto(uint32 guidlow, uint32 entry, CreatureData const* data /*= nullptr*/, uint32 vehId /*= 0*/)
{
SetZoneScript();
if (GetZoneScript() && data)
{
- Entry = GetZoneScript()->GetCreatureEntry(guidlow, data);
- if (!Entry)
+ entry = GetZoneScript()->GetCreatureEntry(guidlow, data);
+ if (!entry)
return false;
}
- CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(Entry);
+ CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(entry);
if (!cinfo)
{
- TC_LOG_ERROR("sql.sql", "Creature::CreateFromProto(): creature template (guidlow: %u, entry: %u) does not exist.", guidlow, Entry);
+ TC_LOG_ERROR("sql.sql", "Creature::CreateFromProto(): creature template (guidlow: %u, entry: %u) does not exist.", guidlow, entry);
return false;
}
- SetOriginalEntry(Entry);
+ SetOriginalEntry(entry);
if (!vehId)
vehId = cinfo->VehicleId;
- Object::_Create(guidlow, Entry, vehId ? HIGHGUID_VEHICLE : HIGHGUID_UNIT);
+ Object::_Create(guidlow, entry, vehId ? HIGHGUID_VEHICLE : HIGHGUID_UNIT);
- if (!UpdateEntry(Entry, team, data))
+ if (!UpdateEntry(entry, data))
return false;
if (vehId)
- CreateVehicleKit(vehId, Entry);
+ CreateVehicleKit(vehId, entry);
return true;
}
@@ -1215,8 +1213,7 @@ bool Creature::LoadCreatureFromDB(uint32 guid, Map* map, bool addToMap)
else
guid = sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT);
- uint16 team = 0;
- if (!Create(guid, map, data->phaseMask, data->id, 0, team, data->posX, data->posY, data->posZ, data->orientation, data))
+ if (!Create(guid, map, data->phaseMask, data->id, data->posX, data->posY, data->posZ, data->orientation, data))
return false;
//We should set first home position, because then AI calls home movement
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index 2db17b6fa1d..587567ba158 100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -439,7 +439,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
void DisappearAndDie();
- bool Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry, uint32 vehId, uint32 team, float x, float y, float z, float ang, const CreatureData* data = NULL);
+ bool Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 entry, float x, float y, float z, float ang, CreatureData const* data = nullptr, uint32 vehId = 0);
bool LoadCreaturesAddon(bool reload = false);
void SelectLevel();
void LoadEquipment(int8 id = 1, bool force = false);
@@ -497,7 +497,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
bool HasSpell(uint32 spellID) const;
- bool UpdateEntry(uint32 entry, uint32 team=ALLIANCE, const CreatureData* data=NULL);
+ bool UpdateEntry(uint32 entry, CreatureData const* data = nullptr);
void UpdateMovementFlags();
@@ -671,8 +671,8 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
void ReleaseFocus(Spell const* focusSpell);
protected:
- bool CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint32 team, const CreatureData* data = NULL);
- bool InitEntry(uint32 entry, uint32 team=ALLIANCE, const CreatureData* data=NULL);
+ bool CreateFromProto(uint32 guidlow, uint32 entry, CreatureData const* data = nullptr, uint32 vehId = 0);
+ bool InitEntry(uint32 entry, CreatureData const* data = nullptr);
// vendor items
VendorItemCounts m_vendorItemCounts;
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 42176df7a67..a7ebde51372 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -2330,13 +2330,8 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert
}
uint32 phase = PHASEMASK_NORMAL;
- uint32 team = 0;
if (summoner)
- {
phase = summoner->GetPhaseMask();
- if (summoner->GetTypeId() == TYPEID_PLAYER)
- team = summoner->ToPlayer()->GetTeam();
- }
TempSummon* summon = NULL;
switch (mask)
@@ -2358,7 +2353,7 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert
break;
}
- if (!summon->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), this, phase, entry, vehId, team, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()))
+ if (!summon->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), this, phase, entry, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), nullptr, vehId))
{
delete summon;
return NULL;
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index 79f95e5db18..7f4bead4656 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -40,7 +40,7 @@ Pet::Pet(Player* owner, PetType type) :
m_petType(type), m_duration(0), m_auraRaidUpdateMask(0), m_loading(false),
m_declinedname(NULL)
{
- ASSERT(m_owner->GetTypeId() == TYPEID_PLAYER);
+ ASSERT(GetOwner());
m_unitTypeMask |= UNIT_MASK_PET;
if (type == HUNTER_PET)
@@ -383,8 +383,6 @@ void Pet::SavePetToDB(PetSaveMode mode)
return;
Player* owner = GetOwner();
- if (!owner)
- return;
// not save pet as current if another pet temporary unsummoned
if (mode == PET_SAVE_AS_CURRENT && owner->GetTemporaryUnsummonedPetNumber() &&
@@ -555,7 +553,7 @@ void Pet::Update(uint32 diff)
{
// unsummon pet that lost owner
Player* owner = GetOwner();
- if (!owner || (!IsWithinDistInMap(owner, GetMap()->GetVisibilityRange()) && !isPossessed()) || (isControlled() && !owner->GetPetGUID()))
+ if ((!IsWithinDistInMap(owner, GetMap()->GetVisibilityRange()) && !isPossessed()) || (isControlled() && !owner->GetPetGUID()))
//if (!owner || (!IsWithinDistInMap(owner, GetMap()->GetVisibilityDistance()) && (owner->GetCharmGUID() && (owner->GetCharmGUID() != GetGUID()))) || (isControlled() && !owner->GetPetGUID()))
{
Remove(PET_SAVE_NOT_IN_SLOT, true);
@@ -803,8 +801,8 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
if (IsPet() && GetOwner()->GetTypeId() == TYPEID_PLAYER)
{
if (GetOwner()->getClass() == CLASS_WARLOCK
- || GetOwner()->getClass() == CLASS_SHAMAN // Fire Elemental
- || GetOwner()->getClass() == CLASS_DEATH_KNIGHT) // Risen Ghoul
+ || GetOwner()->getClass() == CLASS_SHAMAN // Fire Elemental
+ || GetOwner()->getClass() == CLASS_DEATH_KNIGHT) // Risen Ghoul
{
petType = SUMMON_PET;
}
@@ -1108,7 +1106,7 @@ void Pet::_LoadSpellCooldowns()
}
while (result->NextRow());
- if (!cooldowns.empty() && GetOwner())
+ if (!cooldowns.empty())
{
BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_NONE, cooldowns);
GetOwner()->GetSession()->SendPacket(&data);
@@ -1587,12 +1585,7 @@ bool Pet::removeSpell(uint32 spell_id, bool learn_prev, bool clear_ab)
if (clear_ab && !learn_prev && m_charmInfo->RemoveSpellFromActionBar(spell_id))
{
if (!m_loading)
- {
- // need update action bar for last removed rank
- if (Unit* owner = GetOwner())
- if (owner->GetTypeId() == TYPEID_PLAYER)
- owner->ToPlayer()->PetSpellInitialize();
- }
+ GetOwner()->PetSpellInitialize(); // need update action bar for last removed rank
}
return true;
@@ -1627,13 +1620,11 @@ void Pet::InitPetCreateSpells()
bool Pet::resetTalents()
{
- Unit* owner = GetOwner();
- if (!owner || owner->GetTypeId() != TYPEID_PLAYER)
- return false;
+ Player* player = GetOwner();
// not need after this call
- if (owner->ToPlayer()->HasAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS))
- owner->ToPlayer()->RemoveAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS, true);
+ if (player->HasAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS))
+ player->RemoveAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS, true);
CreatureTemplate const* ci = GetCreatureTemplate();
if (!ci)
@@ -1643,8 +1634,6 @@ bool Pet::resetTalents()
if (!pet_family || pet_family->petTalentType < 0)
return false;
- Player* player = owner->ToPlayer();
-
uint8 level = getLevel();
uint32 talentPointsForLevel = GetMaxTalentPointsForLevel(level);
@@ -1789,20 +1778,15 @@ void Pet::InitTalentForLevel()
SetFreeTalentPoints(talentPointsForLevel - m_usedTalentCount);
- Unit* owner = GetOwner();
- if (!owner || owner->GetTypeId() != TYPEID_PLAYER)
- return;
-
if (!m_loading)
- owner->ToPlayer()->SendTalentsInfoData(true);
+ GetOwner()->SendTalentsInfoData(true);
}
uint8 Pet::GetMaxTalentPointsForLevel(uint8 level)
{
uint8 points = (level >= 20) ? ((level - 16) / 4) : 0;
// Mod points from owner SPELL_AURA_MOD_PET_TALENT_POINTS
- if (Unit* owner = GetOwner())
- points+=owner->GetTotalAuraModifier(SPELL_AURA_MOD_PET_TALENT_POINTS);
+ points += GetOwner()->GetTotalAuraModifier(SPELL_AURA_MOD_PET_TALENT_POINTS);
return points;
}
@@ -1927,11 +1911,9 @@ void Pet::LearnPetPassives()
void Pet::CastPetAuras(bool current)
{
- Unit* owner = GetOwner();
- if (!owner || owner->GetTypeId() != TYPEID_PLAYER)
- return;
+ Player* owner = GetOwner();
- if (!IsPermanentPetFor(owner->ToPlayer()))
+ if (!IsPermanentPetFor(owner))
return;
for (PetAuraSet::const_iterator itr = owner->m_petAuras.begin(); itr != owner->m_petAuras.end();)
@@ -1963,10 +1945,7 @@ void Pet::CastPetAura(PetAura const* aura)
bool Pet::IsPetAura(Aura const* aura)
{
- Unit* owner = GetOwner();
-
- if (!owner || owner->GetTypeId() != TYPEID_PLAYER)
- return false;
+ Player* owner = GetOwner();
// if the owner has that pet aura, return true
for (PetAuraSet::const_iterator itr = owner->m_petAuras.begin(); itr != owner->m_petAuras.end(); ++itr)
@@ -1987,9 +1966,7 @@ void Pet::learnSpellHighRank(uint32 spellid)
void Pet::SynchronizeLevelWithOwner()
{
- Unit* owner = GetOwner();
- if (!owner || owner->GetTypeId() != TYPEID_PLAYER)
- return;
+ Player* owner = GetOwner();
switch (getPetType())
{
@@ -2039,9 +2016,7 @@ void Pet::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs)
if (!cooldowns.empty())
{
BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_NONE, cooldowns);
-
- if (Player* owner = GetOwner())
- owner->GetSession()->SendPacket(&data);
+ GetOwner()->GetSession()->SendPacket(&data);
}
}
@@ -2057,8 +2032,6 @@ void Pet::SetDisplayId(uint32 modelId)
if (!isControlled())
return;
- if (Unit* owner = GetOwner())
- if (Player* player = owner->ToPlayer())
- if (player->GetGroup())
- player->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_MODEL_ID);
+ if (GetOwner()->GetGroup())
+ GetOwner()->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_MODEL_ID);
}
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 3c16cf0df4e..45dd7f1b641 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -664,15 +664,8 @@ void KillRewarder::Reward()
// we can disable this warning for this since it only
// causes undefined behavior when passed to the base class constructor
-#ifdef _MSC_VER
-#pragma warning(disable:4355)
-#endif
Player::Player(WorldSession* session): Unit(true), phaseMgr(this)
{
-#ifdef _MSC_VER
-#pragma warning(default:4355)
-#endif
-
m_speakTime = 0;
m_speakCount = 0;
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index 8099dc1bc8e..d7af98b47d1 100644
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -382,13 +382,8 @@ TempSummon* Transport::SummonPassenger(uint32 entry, Position const& pos, TempSu
}
uint32 phase = PHASEMASK_NORMAL;
- uint32 team = 0;
if (summoner)
- {
phase = summoner->GetPhaseMask();
- if (summoner->GetTypeId() == TYPEID_PLAYER)
- team = summoner->ToPlayer()->GetTeam();
- }
TempSummon* summon = NULL;
switch (mask)
@@ -414,7 +409,7 @@ TempSummon* Transport::SummonPassenger(uint32 entry, Position const& pos, TempSu
pos.GetPosition(x, y, z, o);
CalculatePassengerPosition(x, y, z, &o);
- if (!summon->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, phase, entry, vehId, team, x, y, z, o))
+ if (!summon->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, phase, entry, x, y, z, o, nullptr, vehId))
{
delete summon;
return NULL;
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 32882de75ea..f016b226ee2 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -157,9 +157,6 @@ ProcEventInfo::ProcEventInfo(Unit* actor, Unit* actionTarget, Unit* procTarget,
// we can disable this warning for this since it only
// causes undefined behavior when passed to the base class constructor
-#ifdef _MSC_VER
-#pragma warning(disable:4355)
-#endif
Unit::Unit(bool isWorldObject) :
WorldObject(isWorldObject), m_movedPlayer(NULL), m_lastSanctuaryTime(0),
IsAIEnabled(false), NeedChangeAI(false), LastCharmerGUID(0),
@@ -169,9 +166,6 @@ Unit::Unit(bool isWorldObject) :
m_vehicle(NULL), m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE),
m_HostileRefManager(this), _lastDamagedTime(0)
{
-#ifdef _MSC_VER
-#pragma warning(default:4355)
-#endif
m_objectType |= TYPEMASK_UNIT;
m_objectTypeId = TYPEID_UNIT;
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 676023507f8..7204b821138 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -720,7 +720,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
if (cInfo->trainer_class != difficultyInfo->trainer_class)
{
- TC_LOG_ERROR("sql.sql", "Creature (Entry: %u, trainer_class: %u) has different `trainer_class` in difficulty %u mode (Entry: %u).",
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u, trainer_class: %u) has different `trainer_class` in difficulty %u mode (Entry: %u, trainer_class: %u).",
cInfo->Entry, cInfo->trainer_class, diff + 1, cInfo->DifficultyEntry[diff], difficultyInfo->trainer_class);
TC_LOG_ERROR("sql.sql", "Possible FIX: UPDATE `creature_template` SET `trainer_class`=%u WHERE `entry`=%u;",
cInfo->trainer_class, cInfo->DifficultyEntry[diff]);
@@ -1876,7 +1876,7 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, const Position& pos)
return true;
}
-uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float x, float y, float z, float o, uint32 spawntimedelay)
+uint32 ObjectMgr::AddCreData(uint32 entry, uint32 mapId, float x, float y, float z, float o, uint32 spawntimedelay /*= 0*/)
{
CreatureTemplate const* cInfo = GetCreatureTemplate(entry);
if (!cInfo)
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index e19bda45e4a..f5bd18a2609 100644
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -1184,7 +1184,7 @@ class ObjectMgr
void AddGameobjectToGrid(uint32 guid, GameObjectData const* data);
void RemoveGameobjectFromGrid(uint32 guid, GameObjectData const* data);
uint32 AddGOData(uint32 entry, uint32 map, float x, float y, float z, float o, uint32 spawntimedelay = 0, float rotation0 = 0, float rotation1 = 0, float rotation2 = 0, float rotation3 = 0);
- uint32 AddCreData(uint32 entry, uint32 team, uint32 map, float x, float y, float z, float o, uint32 spawntimedelay = 0);
+ uint32 AddCreData(uint32 entry, uint32 map, float x, float y, float z, float o, uint32 spawntimedelay = 0);
bool MoveCreData(uint32 guid, uint32 map, const Position& pos);
// reserved names
diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp
index 1d33747d1e9..974f06975fa 100644
--- a/src/server/game/Handlers/PetHandler.cpp
+++ b/src/server/game/Handlers/PetHandler.cpp
@@ -633,9 +633,8 @@ void WorldSession::HandlePetRename(WorldPacket& recvData)
pet->SetName(name);
- Player* owner = pet->GetOwner();
- if (owner && owner->GetGroup())
- owner->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_NAME);
+ if (pet->GetOwner()->GetGroup())
+ pet->GetOwner()->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_NAME);
pet->RemoveByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED);
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
index 01ee5238789..cacec14d5e6 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
@@ -103,9 +103,9 @@ bool OPvPCapturePoint::AddObject(uint32 type, uint32 entry, uint32 map, float x,
return false;
}
-bool OPvPCapturePoint::AddCreature(uint32 type, uint32 entry, uint32 team, uint32 map, float x, float y, float z, float o, uint32 spawntimedelay)
+bool OPvPCapturePoint::AddCreature(uint32 type, uint32 entry, uint32 map, float x, float y, float z, float o, TeamId /*teamId = TEAM_NEUTRAL*/, uint32 spawntimedelay /*= 0*/)
{
- if (uint32 guid = sObjectMgr->AddCreData(entry, team, map, x, y, z, o, spawntimedelay))
+ if (uint32 guid = sObjectMgr->AddCreData(entry, map, x, y, z, o, spawntimedelay))
{
AddCre(type, guid, entry);
return true;
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h
index c2248c72fd0..577d70021a6 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.h
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.h
@@ -67,7 +67,6 @@ struct go_type
struct creature_type
{
uint32 entry;
- uint32 teamval;
uint32 map;
float x;
float y;
@@ -144,7 +143,7 @@ class OPvPCapturePoint
bool AddObject(uint32 type, uint32 entry, uint32 map, float x, float y, float z, float o,
float rotation0, float rotation1, float rotation2, float rotation3);
- bool AddCreature(uint32 type, uint32 entry, uint32 teamval, uint32 map, float x, float y, float z, float o, uint32 spawntimedelay = 0);
+ virtual bool AddCreature(uint32 type, uint32 entry, uint32 map, float x, float y, float z, float o, TeamId teamId = TEAM_NEUTRAL, uint32 spawntimedelay = 0);
bool DelCreature(uint32 type);
bool DelObject(uint32 type);
@@ -248,6 +247,19 @@ class OutdoorPvP : public ZoneScript
void TeamApplyBuff(TeamId team, uint32 spellId, uint32 spellId2 = 0);
+ static TeamId GetTeamIdByTeam(uint32 team)
+ {
+ switch (team)
+ {
+ case ALLIANCE:
+ return TEAM_ALLIANCE;
+ case HORDE:
+ return TEAM_HORDE;
+ default:
+ return TEAM_NEUTRAL;
+ }
+ }
+
protected:
// the map of the objectives belonging to this outdoorpvp
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp
index 4f9381ce78d..fa423d2db85 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -928,7 +928,7 @@ public:
Map* map = handler->GetSession()->GetPlayer()->GetMap();
- if (!v->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_VEHICLE), map, handler->GetSession()->GetPlayer()->GetPhaseMask(), entry, id, handler->GetSession()->GetPlayer()->GetTeam(), x, y, z, o))
+ if (!v->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_VEHICLE), map, handler->GetSession()->GetPlayer()->GetPhaseMask(), entry, x, y, z, o, nullptr, id))
{
delete v;
return false;
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index 6fdc3b9f5ef..6cc049b48ea 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -227,14 +227,6 @@ public:
if (!charID)
return false;
- char* team = strtok(NULL, " ");
- int32 teamval = 0;
- if (team)
- teamval = atoi(team);
-
- if (teamval < 0)
- teamval = 0;
-
uint32 id = atoi(charID);
if (!sObjectMgr->GetCreatureTemplate(id))
return false;
@@ -266,7 +258,7 @@ public:
}
Creature* creature = new Creature();
- if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMgr().GetPhaseMaskForSpawn(), id, 0, (uint32)teamval, x, y, z, o))
+ if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMgr().GetPhaseMaskForSpawn(), id, x, y, z, o))
{
delete creature;
return false;
diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp
index 041823896ba..b529e718d3e 100644
--- a/src/server/scripts/Commands/cs_wp.cpp
+++ b/src/server/scripts/Commands/cs_wp.cpp
@@ -565,7 +565,7 @@ public:
// Check
// Remember: "show" must also be the name of a column!
if ((show != "delay") && (show != "action") && (show != "action_chance")
- && (show != "move_flag") && (show != "del") && (show != "move") && (show != "wpadd")
+ && (show != "move_flag") && (show != "del") && (show != "move")
)
{
return false;
@@ -694,7 +694,7 @@ public:
}
// re-create
Creature* wpCreature2 = new Creature();
- if (!wpCreature2->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMgr().GetPhaseMaskForSpawn(), VISUAL_WAYPOINT, 0, 0, chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), chr->GetOrientation()))
+ if (!wpCreature2->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMgr().GetPhaseMaskForSpawn(), VISUAL_WAYPOINT, chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), chr->GetOrientation()))
{
handler->PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, VISUAL_WAYPOINT);
delete wpCreature2;
@@ -918,7 +918,7 @@ public:
float o = chr->GetOrientation();
Creature* wpCreature = new Creature();
- if (!wpCreature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMgr().GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
+ if (!wpCreature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMgr().GetPhaseMaskForSpawn(), id, x, y, z, o))
{
handler->PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, id);
delete wpCreature;
@@ -982,7 +982,7 @@ public:
Map* map = chr->GetMap();
Creature* creature = new Creature();
- if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMgr().GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
+ if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMgr().GetPhaseMaskForSpawn(), id, x, y, z, o))
{
handler->PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, id);
delete creature;
@@ -1031,7 +1031,7 @@ public:
Map* map = chr->GetMap();
Creature* creature = new Creature();
- if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMgr().GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
+ if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMgr().GetPhaseMaskForSpawn(), id, x, y, z, o))
{
handler->PSendSysMessage(LANG_WAYPOINT_NOTCREATED, id);
delete creature;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
index 60352f7d55c..9316aaa7cd8 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
@@ -856,7 +856,7 @@ public:
if (!pZombie)
pZombie = GetClosestCreatureWithEntry(malganis, NPC_CITY_MAN2, 100.0f);
if (pZombie)
- pZombie->UpdateEntry(NPC_ZOMBIE, 0);
+ pZombie->UpdateEntry(NPC_ZOMBIE);
else //There's no one else to transform
step++;
}
@@ -1017,7 +1017,7 @@ public:
case 68:
if (Creature* disguised2 = Unit::GetCreature(*me, infiniteDraconianGUID[2]))
{
- disguised2->UpdateEntry(NPC_INFINITE_HUNTER, 0);
+ disguised2->UpdateEntry(NPC_INFINITE_HUNTER);
//Make them unattackable
disguised2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
disguised2->SetReactState(REACT_PASSIVE);
@@ -1027,7 +1027,7 @@ public:
case 69:
if (Creature* disguised1 = Unit::GetCreature(*me, infiniteDraconianGUID[1]))
{
- disguised1->UpdateEntry(NPC_INFINITE_AGENT, 0);
+ disguised1->UpdateEntry(NPC_INFINITE_AGENT);
//Make them unattackable
disguised1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
disguised1->SetReactState(REACT_PASSIVE);
@@ -1037,7 +1037,7 @@ public:
case 70:
if (Creature* disguised0 = Unit::GetCreature(*me, infiniteDraconianGUID[0]))
{
- disguised0->UpdateEntry(NPC_INFINITE_ADVERSARY, 0);
+ disguised0->UpdateEntry(NPC_INFINITE_ADVERSARY);
//Make them unattackable
disguised0->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
disguised0->SetReactState(REACT_PASSIVE);
diff --git a/src/server/scripts/Kalimdor/boss_azuregos.cpp b/src/server/scripts/Kalimdor/boss_azuregos.cpp
index 3eceb2adcf7..02ceb9b34c9 100644
--- a/src/server/scripts/Kalimdor/boss_azuregos.cpp
+++ b/src/server/scripts/Kalimdor/boss_azuregos.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,151 +15,206 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Azuregos
-SD%Complete: 90
-SDComment: Teleport not included, spell reflect not effecting dots (Core problem)
-SDCategory: Azshara
-EndScriptData */
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "SpellScript.h"
+#include "SpellAuraEffects.h"
+#include "Player.h"
enum Say
{
- SAY_TELEPORT = 0
+ SAY_TELEPORT = 0
};
enum Spells
{
- SPELL_MARKOFFROST = 23182,
- SPELL_MANASTORM = 21097,
- SPELL_CHILL = 21098,
- SPELL_FROSTBREATH = 21099,
- SPELL_REFLECT = 22067,
- SPELL_CLEAVE = 8255, //Perhaps not right ID
- SPELL_ENRAGE = 23537
+ SPELL_MARK_OF_FROST = 23182,
+ SPELL_AURA_OF_FROST = 23186,
+ SPELL_MARK_OF_FROST_AURA = 23184,
+ SPELL_MANA_STORM = 21097,
+ SPELL_CHILL = 21098,
+ SPELL_FROST_BREATH = 21099,
+ SPELL_REFLECT = 22067,
+ SPELL_CLEAVE = 8255, // Perhaps not right ID
+ SPELL_ENRAGE = 23537
+};
+
+enum Events
+{
+ EVENT_MARK_OF_FROST = 1,
+ EVENT_MANA_STORM,
+ EVENT_CHILL,
+ EVENT_BREATH,
+ EVENT_TELEPORT,
+ EVENT_REFLECT,
+ EVENT_CLEAVE,
+ EVENT_ENRAGE
};
class boss_azuregos : public CreatureScript
{
-public:
- boss_azuregos() : CreatureScript("boss_azuregos") { }
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new boss_azuregosAI(creature);
- }
-
- struct boss_azuregosAI : public ScriptedAI
- {
- boss_azuregosAI(Creature* creature) : ScriptedAI(creature) { }
-
- uint32 MarkOfFrostTimer;
- uint32 ManaStormTimer;
- uint32 ChillTimer;
- uint32 BreathTimer;
- uint32 TeleportTimer;
- uint32 ReflectTimer;
- uint32 CleaveTimer;
- uint32 EnrageTimer;
- bool Enraged;
-
- void Reset() OVERRIDE
+ public:
+ boss_azuregos() : CreatureScript("boss_azuregos") { }
+
+ struct boss_azuregosAI : public WorldBossAI
{
- MarkOfFrostTimer = 35000;
- ManaStormTimer = urand(5000, 17000);
- ChillTimer = urand(10000, 30000);
- BreathTimer = urand(2000, 8000);
- TeleportTimer = 30000;
- ReflectTimer = urand(15000, 30000);
- CleaveTimer = 7000;
- EnrageTimer = 0;
- Enraged = false;
- }
+ boss_azuregosAI(Creature* creature) : WorldBossAI(creature) { }
- void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void Reset() OVERRIDE
+ {
+ _Reset();
+ }
- void UpdateAI(uint32 diff) OVERRIDE
- {
- //Return since we have no target
- if (!UpdateVictim())
- return;
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ DoCast(me, SPELL_MARK_OF_FROST_AURA, true);
+ _enraged = false;
+
+ events.ScheduleEvent(EVENT_MARK_OF_FROST, 35000);
+ events.ScheduleEvent(EVENT_MANA_STORM, urand(5000, 17000));
+ events.ScheduleEvent(EVENT_CHILL, urand(10000, 30000));
+ events.ScheduleEvent(EVENT_BREATH, urand(2000, 8000));
+ events.ScheduleEvent(EVENT_TELEPORT, 30000);
+ events.ScheduleEvent(EVENT_REFLECT, urand(15000, 30000));
+ events.ScheduleEvent(EVENT_CLEAVE, 7000);
+ }
- if (TeleportTimer <= diff)
+ void KilledUnit(Unit* who) OVERRIDE
{
- Talk(SAY_TELEPORT);
- ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList();
- ThreatContainer::StorageType::const_iterator i = threatlist.begin();
- for (i = threatlist.begin(); i != threatlist.end(); ++i)
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ who->CastSpell(who, SPELL_MARK_OF_FROST, true);
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
{
- Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());
- if (unit && (unit->GetTypeId() == TYPEID_PLAYER))
+ switch (eventId)
{
- DoTeleportPlayer(unit, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+3, unit->GetOrientation());
+ case EVENT_MANA_STORM:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 60.0f, true))
+ DoCast(target, SPELL_MANA_STORM);
+ events.ScheduleEvent(EVENT_MANA_STORM, urand(7500, 12500));
+ break;
+ case EVENT_CHILL:
+ DoCastVictim(SPELL_CHILL);
+ events.ScheduleEvent(EVENT_CHILL, urand(13000, 25000));
+ break;
+ case EVENT_BREATH:
+ DoCastVictim(SPELL_FROST_BREATH);
+ events.ScheduleEvent(EVENT_BREATH, urand(10000, 15000));
+ break;
+ case EVENT_TELEPORT:
+ {
+ Talk(SAY_TELEPORT);
+ ThreatContainer::StorageType const& threatlist = me->getThreatManager().getThreatList();
+ for (ThreatContainer::StorageType::const_iterator i = threatlist.begin(); i != threatlist.end(); ++i)
+ {
+ if (Player* player = ObjectAccessor::GetPlayer(*me, (*i)->getUnitGuid()))
+ DoTeleportPlayer(player, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+3, player->GetOrientation());
+ }
+
+ DoResetThreat();
+ events.ScheduleEvent(EVENT_TELEPORT, 30000);
+ break;
+ }
+ case EVENT_REFLECT:
+ DoCast(me, SPELL_REFLECT);
+ events.ScheduleEvent(EVENT_REFLECT, urand(20000, 35000));
+ break;
+ case EVENT_CLEAVE:
+ DoCastVictim(SPELL_CLEAVE);
+ events.ScheduleEvent(EVENT_CLEAVE, 7000);
+ break;
+ default:
+ break;
}
}
- DoResetThreat();
- TeleportTimer = 30000;
- } else TeleportTimer -= diff;
+ if (HealthBelowPct(26) && !_enraged)
+ {
+ DoCast(me, SPELL_ENRAGE);
+ _enraged = true;
+ }
- // //MarkOfFrostTimer
- // if (MarkOfFrostTimer <= diff)
- // {
- // DoCastVictim(SPELL_MARKOFFROST);
- // MarkOfFrostTimer = 25000;
- // } else MarkOfFrostTimer -= diff;
+ DoMeleeAttackIfReady();
+ }
- //ChillTimer
- if (ChillTimer <= diff)
- {
- DoCastVictim(SPELL_CHILL);
- ChillTimer = urand(13000, 25000);
- } else ChillTimer -= diff;
+ private:
+ bool _enraged;
+ };
- //BreathTimer
- if (BreathTimer <= diff)
- {
- DoCastVictim(SPELL_FROSTBREATH);
- BreathTimer = urand(10000, 15000);
- } else BreathTimer -= diff;
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new boss_azuregosAI(creature);
+ }
+};
- //ManaStormTimer
- if (ManaStormTimer <= diff)
+class MarkOfFrostTargetSelector
+{
+ public:
+ MarkOfFrostTargetSelector() { }
+
+ bool operator()(WorldObject* object) const
+ {
+ if (Unit* unit = object->ToUnit())
+ return !(unit->HasAura(SPELL_MARK_OF_FROST) && !unit->HasAura(SPELL_AURA_OF_FROST));
+ return true;
+ }
+};
+
+class spell_mark_of_frost : public SpellScriptLoader
+{
+ public:
+ spell_mark_of_frost() : SpellScriptLoader("spell_mark_of_frost") { }
+
+ class spell_mark_of_frost_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_mark_of_frost_SpellScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_MANASTORM);
- ManaStormTimer = urand(7500, 12500);
- } else ManaStormTimer -= diff;
+ if (!sSpellMgr->GetSpellInfo(SPELL_MARK_OF_FROST))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SPELL_AURA_OF_FROST))
+ return false;
+ return true;
+ }
- //ReflectTimer
- if (ReflectTimer <= diff)
+ void FilterTargets(std::list<WorldObject*>& targets)
{
- DoCast(me, SPELL_REFLECT);
- ReflectTimer = urand(20000, 35000);
- } else ReflectTimer -= diff;
+ targets.remove_if(MarkOfFrostTargetSelector());
+ }
- //CleaveTimer
- if (CleaveTimer <= diff)
+ void HandleEffect(SpellEffIndex effIndex)
{
- DoCastVictim(SPELL_CLEAVE);
- CleaveTimer = 7000;
- } else CleaveTimer -= diff;
+ PreventHitDefaultEffect(effIndex);
+ GetHitUnit()->CastSpell(GetHitUnit(), SPELL_AURA_OF_FROST, true);
+ }
- //EnrageTimer
- if (HealthBelowPct(26) && !Enraged)
+ void Register() OVERRIDE
{
- DoCast(me, SPELL_ENRAGE);
- Enraged = true;
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mark_of_frost_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
+ OnEffectHitTarget += SpellEffectFn(spell_mark_of_frost_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
}
+ };
- DoMeleeAttackIfReady();
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_mark_of_frost_SpellScript();
}
- };
};
void AddSC_boss_azuregos()
{
new boss_azuregos();
+ new spell_mark_of_frost();
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp
index 1f8b281b807..b02722106ee 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp
@@ -117,29 +117,29 @@ public:
// Champions
case VEHICLE_MOKRA_SKILLCRUSHER_MOUNT:
if (TeamInInstance == HORDE)
- creature->UpdateEntry(VEHICLE_MARSHAL_JACOB_ALERIUS_MOUNT, ALLIANCE);
+ creature->UpdateEntry(VEHICLE_MARSHAL_JACOB_ALERIUS_MOUNT);
break;
case VEHICLE_ERESSEA_DAWNSINGER_MOUNT:
if (TeamInInstance == HORDE)
- creature->UpdateEntry(VEHICLE_AMBROSE_BOLTSPARK_MOUNT, ALLIANCE);
+ creature->UpdateEntry(VEHICLE_AMBROSE_BOLTSPARK_MOUNT);
break;
case VEHICLE_RUNOK_WILDMANE_MOUNT:
if (TeamInInstance == HORDE)
- creature->UpdateEntry(VEHICLE_COLOSOS_MOUNT, ALLIANCE);
+ creature->UpdateEntry(VEHICLE_COLOSOS_MOUNT);
break;
case VEHICLE_ZUL_TORE_MOUNT:
if (TeamInInstance == HORDE)
- creature->UpdateEntry(VEHICLE_EVENSONG_MOUNT, ALLIANCE);
+ creature->UpdateEntry(VEHICLE_EVENSONG_MOUNT);
break;
case VEHICLE_DEATHSTALKER_VESCERI_MOUNT:
if (TeamInInstance == HORDE)
- creature->UpdateEntry(VEHICLE_LANA_STOUTHAMMER_MOUNT, ALLIANCE);
+ creature->UpdateEntry(VEHICLE_LANA_STOUTHAMMER_MOUNT);
break;
// Coliseum Announcer || Just NPC_JAEREN must be spawned.
case NPC_JAEREN:
uiAnnouncerGUID = creature->GetGUID();
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_ARELAS, ALLIANCE);
+ creature->UpdateEntry(NPC_ARELAS);
break;
case VEHICLE_ARGENT_WARHORSE:
case VEHICLE_ARGENT_BATTLEWORG:
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp
index cb03842cf3f..c8734f67812 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp
@@ -69,15 +69,15 @@ class instance_forge_of_souls : public InstanceMapScript
break;
case NPC_SYLVANAS_PART1:
if (teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_JAINA_PART1, ALLIANCE);
+ creature->UpdateEntry(NPC_JAINA_PART1);
break;
case NPC_LORALEN:
if (teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_ELANDRA, ALLIANCE);
+ creature->UpdateEntry(NPC_ELANDRA);
break;
case NPC_KALIRA:
if (teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_KORELN, ALLIANCE);
+ creature->UpdateEntry(NPC_KORELN);
break;
}
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp
index 364246e05f1..6dc787cb47f 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp
@@ -91,73 +91,73 @@ class instance_pit_of_saron : public InstanceMapScript
break;
case NPC_SYLVANAS_PART1:
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_JAINA_PART1, ALLIANCE);
+ creature->UpdateEntry(NPC_JAINA_PART1);
_jainaOrSylvanas1GUID = creature->GetGUID();
break;
case NPC_SYLVANAS_PART2:
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_JAINA_PART2, ALLIANCE);
+ creature->UpdateEntry(NPC_JAINA_PART2);
_jainaOrSylvanas2GUID = creature->GetGUID();
break;
case NPC_KILARA:
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_ELANDRA, ALLIANCE);
+ creature->UpdateEntry(NPC_ELANDRA);
break;
case NPC_KORALEN:
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_KORLAEN, ALLIANCE);
+ creature->UpdateEntry(NPC_KORLAEN);
break;
case NPC_CHAMPION_1_HORDE:
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_CHAMPION_1_ALLIANCE, ALLIANCE);
+ creature->UpdateEntry(NPC_CHAMPION_1_ALLIANCE);
break;
case NPC_CHAMPION_2_HORDE:
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_CHAMPION_2_ALLIANCE, ALLIANCE);
+ creature->UpdateEntry(NPC_CHAMPION_2_ALLIANCE);
break;
case NPC_CHAMPION_3_HORDE: // No 3rd set for Alliance?
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_CHAMPION_2_ALLIANCE, ALLIANCE);
+ creature->UpdateEntry(NPC_CHAMPION_2_ALLIANCE);
break;
case NPC_HORDE_SLAVE_1:
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_ALLIANCE_SLAVE_1, ALLIANCE);
+ creature->UpdateEntry(NPC_ALLIANCE_SLAVE_1);
break;
case NPC_HORDE_SLAVE_2:
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_ALLIANCE_SLAVE_2, ALLIANCE);
+ creature->UpdateEntry(NPC_ALLIANCE_SLAVE_2);
break;
case NPC_HORDE_SLAVE_3:
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_ALLIANCE_SLAVE_3, ALLIANCE);
+ creature->UpdateEntry(NPC_ALLIANCE_SLAVE_3);
break;
case NPC_HORDE_SLAVE_4:
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_ALLIANCE_SLAVE_4, ALLIANCE);
+ creature->UpdateEntry(NPC_ALLIANCE_SLAVE_4);
break;
case NPC_FREED_SLAVE_1_HORDE:
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_FREED_SLAVE_1_ALLIANCE, ALLIANCE);
+ creature->UpdateEntry(NPC_FREED_SLAVE_1_ALLIANCE);
break;
case NPC_FREED_SLAVE_2_HORDE:
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_FREED_SLAVE_2_ALLIANCE, ALLIANCE);
+ creature->UpdateEntry(NPC_FREED_SLAVE_2_ALLIANCE);
break;
case NPC_FREED_SLAVE_3_HORDE:
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_FREED_SLAVE_3_ALLIANCE, ALLIANCE);
+ creature->UpdateEntry(NPC_FREED_SLAVE_3_ALLIANCE);
break;
case NPC_RESCUED_SLAVE_HORDE:
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_RESCUED_SLAVE_ALLIANCE, ALLIANCE);
+ creature->UpdateEntry(NPC_RESCUED_SLAVE_ALLIANCE);
break;
case NPC_MARTIN_VICTUS_1:
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_MARTIN_VICTUS_1, ALLIANCE);
+ creature->UpdateEntry(NPC_MARTIN_VICTUS_1);
break;
case NPC_MARTIN_VICTUS_2:
if (_teamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_MARTIN_VICTUS_2, ALLIANCE);
+ creature->UpdateEntry(NPC_MARTIN_VICTUS_2);
break;
default:
break;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
index 3a334f4d59c..e7d8e056ed0 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
@@ -1319,7 +1319,7 @@ struct npc_argent_captainAI : public ScriptedAI
}
Talk(SAY_CAPTAIN_RESURRECTED);
- me->UpdateEntry(newEntry, instance->GetData(DATA_TEAM_IN_INSTANCE), me->GetCreatureData());
+ me->UpdateEntry(newEntry, me->GetCreatureData());
DoCast(me, SPELL_UNDEATH, true);
}
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
index 51de8a1fe23..adf30410d01 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
@@ -194,39 +194,39 @@ class instance_icecrown_citadel : public InstanceMapScript
{
case NPC_KOR_KRON_GENERAL:
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_ALLIANCE_COMMANDER, ALLIANCE);
+ creature->UpdateEntry(NPC_ALLIANCE_COMMANDER);
break;
case NPC_KOR_KRON_LIEUTENANT:
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_SKYBREAKER_LIEUTENANT, ALLIANCE);
+ creature->UpdateEntry(NPC_SKYBREAKER_LIEUTENANT);
break;
case NPC_TORTUNOK:
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_ALANA_MOONSTRIKE, ALLIANCE);
+ creature->UpdateEntry(NPC_ALANA_MOONSTRIKE);
break;
case NPC_GERARDO_THE_SUAVE:
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_TALAN_MOONSTRIKE, ALLIANCE);
+ creature->UpdateEntry(NPC_TALAN_MOONSTRIKE);
break;
case NPC_UVLUS_BANEFIRE:
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_MALFUS_GRIMFROST, ALLIANCE);
+ creature->UpdateEntry(NPC_MALFUS_GRIMFROST);
break;
case NPC_IKFIRUS_THE_VILE:
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_YILI, ALLIANCE);
+ creature->UpdateEntry(NPC_YILI);
break;
case NPC_VOL_GUK:
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_JEDEBIA, ALLIANCE);
+ creature->UpdateEntry(NPC_JEDEBIA);
break;
case NPC_HARAGG_THE_UNSEEN:
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_NIBY_THE_ALMIGHTY, ALLIANCE);
+ creature->UpdateEntry(NPC_NIBY_THE_ALMIGHTY);
break;
case NPC_GARROSH_HELLSCREAM:
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_KING_VARIAN_WRYNN, ALLIANCE);
+ creature->UpdateEntry(NPC_KING_VARIAN_WRYNN);
break;
case NPC_DEATHBRINGER_SAURFANG:
DeathbringerSaurfangGUID = creature->GetGUID();
@@ -237,7 +237,7 @@ class instance_icecrown_citadel : public InstanceMapScript
break;
case NPC_SE_HIGH_OVERLORD_SAURFANG:
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_SE_MURADIN_BRONZEBEARD, ALLIANCE, creature->GetCreatureData());
+ creature->UpdateEntry(NPC_SE_MURADIN_BRONZEBEARD, creature->GetCreatureData());
// no break;
case NPC_SE_MURADIN_BRONZEBEARD:
DeathbringerSaurfangEventGUID = creature->GetGUID();
@@ -245,7 +245,7 @@ class instance_icecrown_citadel : public InstanceMapScript
break;
case NPC_SE_KOR_KRON_REAVER:
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_SE_SKYBREAKER_MARINE, ALLIANCE);
+ creature->UpdateEntry(NPC_SE_SKYBREAKER_MARINE);
break;
case NPC_FESTERGUT:
FestergutGUID = creature->GetGUID();
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
index 851e16fe576..c73e0eeef44 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
@@ -88,7 +88,7 @@ public:
if (ServerAllowsTwoSideGroups())
creature->setFaction(FACTION_HOSTILE_FOR_ALL);
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(26799, HORDE);
+ creature->UpdateEntry(26799);
break;
}
case 26802:
@@ -96,7 +96,7 @@ public:
if (ServerAllowsTwoSideGroups())
creature->setFaction(FACTION_HOSTILE_FOR_ALL);
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(26801, HORDE);
+ creature->UpdateEntry(26801);
break;
}
case 26805:
@@ -104,7 +104,7 @@ public:
if (ServerAllowsTwoSideGroups())
creature->setFaction(FACTION_HOSTILE_FOR_ALL);
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(26803, HORDE);
+ creature->UpdateEntry(26803);
break;
}
case 27949:
@@ -112,7 +112,7 @@ public:
if (ServerAllowsTwoSideGroups())
creature->setFaction(FACTION_HOSTILE_FOR_ALL);
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(27947, HORDE);
+ creature->UpdateEntry(27947);
break;
}
case 26796:
@@ -120,7 +120,7 @@ public:
if (ServerAllowsTwoSideGroups())
creature->setFaction(FACTION_HOSTILE_FOR_ALL);
if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(26798, HORDE);
+ creature->UpdateEntry(26798);
break;
}
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
index 5e44d97299e..8c025c013e9 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
@@ -2709,7 +2709,7 @@ class spell_yogg_saron_revealed_tentacle : public SpellScriptLoader // 64012
{
caster->CastSpell(caster, SPELL_TENTACLE_VOID_ZONE, true);
caster->CastSpell(caster, SPELL_GRIM_REPRISAL, true);
- caster->UpdateEntry(NPC_INFLUENCE_TENTACLE, 0, caster->GetCreatureData());
+ caster->UpdateEntry(NPC_INFLUENCE_TENTACLE, caster->GetCreatureData());
}
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
index c98a3db2334..2c25f567321 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
@@ -298,35 +298,35 @@ class instance_ulduar : public InstanceMapScript
break;
case NPC_EIVI_NIGHTFEATHER:
if (TeamInInstance == HORDE)
- creature->UpdateEntry(NPC_TOR_GREYCLOUD, HORDE);
+ creature->UpdateEntry(NPC_TOR_GREYCLOUD);
break;
case NPC_ELLIE_NIGHTFEATHER:
if (TeamInInstance == HORDE)
- creature->UpdateEntry(NPC_KAR_GREYCLOUD, HORDE);
+ creature->UpdateEntry(NPC_KAR_GREYCLOUD);
break;
case NPC_ELEMENTALIST_MAHFUUN:
if (TeamInInstance == HORDE)
- creature->UpdateEntry(NPC_SPIRITWALKER_TARA, HORDE);
+ creature->UpdateEntry(NPC_SPIRITWALKER_TARA);
break;
case NPC_ELEMENTALIST_AVUUN:
if (TeamInInstance == HORDE)
- creature->UpdateEntry(NPC_SPIRITWALKER_YONA, HORDE);
+ creature->UpdateEntry(NPC_SPIRITWALKER_YONA);
break;
case NPC_MISSY_FLAMECUFFS:
if (TeamInInstance == HORDE)
- creature->UpdateEntry(NPC_AMIRA_BLAZEWEAVER, HORDE);
+ creature->UpdateEntry(NPC_AMIRA_BLAZEWEAVER);
break;
case NPC_SISSY_FLAMECUFFS:
if (TeamInInstance == HORDE)
- creature->UpdateEntry(NPC_VEESHA_BLAZEWEAVER, HORDE);
+ creature->UpdateEntry(NPC_VEESHA_BLAZEWEAVER);
break;
case NPC_FIELD_MEDIC_PENNY:
if (TeamInInstance == HORDE)
- creature->UpdateEntry(NPC_BATTLE_PRIEST_ELIZA, HORDE);
+ creature->UpdateEntry(NPC_BATTLE_PRIEST_ELIZA);
break;
case NPC_FIELD_MEDIC_JESSI:
if (TeamInInstance == HORDE)
- creature->UpdateEntry(NPC_BATTLE_PRIEST_GINA, HORDE);
+ creature->UpdateEntry(NPC_BATTLE_PRIEST_GINA);
break;
case NPC_THORIM:
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp
index ea9ebbdc15c..6e6f100c106 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -1085,7 +1085,7 @@ public:
case 2:
if (talbot)
{
- talbot->UpdateEntry(NPC_PRINCE_VALANAR, ALLIANCE);
+ talbot->UpdateEntry(NPC_PRINCE_VALANAR);
talbot->setFaction(14);
talbot->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
talbot->SetReactState(REACT_PASSIVE);
@@ -1630,19 +1630,18 @@ public:
{
EnterEvadeMode(); //We make sure that the npc is not attacking the player!
me->SetReactState(REACT_PASSIVE);
- StartFollow(pCaster->ToPlayer(), 0, NULL);
- me->UpdateEntry(NPC_CAPTURED_BERLY_SORCERER, TEAM_NEUTRAL);
+ StartFollow(pCaster->ToPlayer());
+ me->UpdateEntry(NPC_CAPTURED_BERLY_SORCERER);
DoCast(me, SPELL_COSMETIC_ENSLAVE_CHAINS_SELF, true);
if (Player* player = pCaster->ToPlayer())
- player->KilledMonsterCredit(NPC_CAPTURED_BERLY_SORCERER, 0);
+ player->KilledMonsterCredit(NPC_CAPTURED_BERLY_SORCERER);
bEnslaved = true;
}
}
void MoveInLineOfSight(Unit* who) OVERRIDE
-
{
FollowerAI::MoveInLineOfSight(who);
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
index 41cd17e1afd..3cfe765493f 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
@@ -82,15 +82,15 @@ uint32 OPvPCapturePointNA::GetControllingFaction() const
void OPvPCapturePointNA::SpawnNPCsForTeam(uint32 team)
{
- const creature_type * creatures = NULL;
+ creature_type const* creatures = nullptr;
if (team == ALLIANCE)
- creatures=AllianceControlNPCs;
+ creatures = AllianceControlNPCs;
else if (team == HORDE)
- creatures=HordeControlNPCs;
+ creatures = HordeControlNPCs;
else
return;
for (int i = 0; i < NA_CONTROL_NPC_NUM; ++i)
- AddCreature(i, creatures[i].entry, creatures[i].teamval, creatures[i].map, creatures[i].x, creatures[i].y, creatures[i].z, creatures[i].o, 1000000);
+ AddCreature(i, creatures[i].entry, creatures[i].map, creatures[i].x, creatures[i].y, creatures[i].z, creatures[i].o, OutdoorPvP::GetTeamIdByTeam(team), 1000000);
}
void OPvPCapturePointNA::DeSpawnNPCs()
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
index cc32397741c..011775e1715 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h
@@ -183,50 +183,50 @@ enum ControlNPCTypes
const creature_type HordeControlNPCs[NA_CONTROL_NPC_NUM] =
{
- {18816, 67, 530, -1523.92f, 7951.76f, -17.6942f, 3.51172f},
- {18821, 67, 530, -1527.75f, 7952.46f, -17.6948f, 3.99317f},
- {21474, 67, 530, -1520.14f, 7927.11f, -20.2527f, 3.39389f},
- {21484, 67, 530, -1524.84f, 7930.34f, -20.182f, 3.6405f},
- {21483, 67, 530, -1570.01f, 7993.8f, -22.4505f, 5.02655f},
- {18192, 67, 530, -1654.06f, 8000.46f, -26.59f, 3.37f},
- {18192, 67, 530, -1487.18f, 7899.1f, -19.53f, 0.954f},
- {18192, 67, 530, -1480.88f, 7908.79f, -19.19f, 4.485f},
- {18192, 67, 530, -1540.56f, 7995.44f, -20.45f, 0.947f},
- {18192, 67, 530, -1546.95f, 8000.85f, -20.72f, 6.035f},
- {18192, 67, 530, -1595.31f, 7860.53f, -21.51f, 3.747f},
- {18192, 67, 530, -1642.31f, 7995.59f, -25.8f, 3.317f},
- {18192, 67, 530, -1545.46f, 7995.35f, -20.63f, 1.094f},
- {18192, 67, 530, -1487.58f, 7907.99f, -19.27f, 5.567f},
- {18192, 67, 530, -1651.54f, 7988.56f, -26.5289f, 2.98451f},
- {18192, 67, 530, -1602.46f, 7866.43f, -22.1177f, 4.74729f},
- {18192, 67, 530, -1591.22f, 7875.29f, -22.3536f, 4.34587f},
- {18192, 67, 530, -1550.6f, 7944.45f, -21.63f, 3.559f},
- {18192, 67, 530, -1545.57f, 7935.83f, -21.13f, 3.448f},
- {18192, 67, 530, -1550.86f, 7937.56f, -21.7f, 3.801f}
+ {18816, 530, -1523.92f, 7951.76f, -17.6942f, 3.51172f},
+ {18821, 530, -1527.75f, 7952.46f, -17.6948f, 3.99317f},
+ {21474, 530, -1520.14f, 7927.11f, -20.2527f, 3.39389f},
+ {21484, 530, -1524.84f, 7930.34f, -20.182f, 3.6405f},
+ {21483, 530, -1570.01f, 7993.8f, -22.4505f, 5.02655f},
+ {18192, 530, -1654.06f, 8000.46f, -26.59f, 3.37f},
+ {18192, 530, -1487.18f, 7899.1f, -19.53f, 0.954f},
+ {18192, 530, -1480.88f, 7908.79f, -19.19f, 4.485f},
+ {18192, 530, -1540.56f, 7995.44f, -20.45f, 0.947f},
+ {18192, 530, -1546.95f, 8000.85f, -20.72f, 6.035f},
+ {18192, 530, -1595.31f, 7860.53f, -21.51f, 3.747f},
+ {18192, 530, -1642.31f, 7995.59f, -25.8f, 3.317f},
+ {18192, 530, -1545.46f, 7995.35f, -20.63f, 1.094f},
+ {18192, 530, -1487.58f, 7907.99f, -19.27f, 5.567f},
+ {18192, 530, -1651.54f, 7988.56f, -26.5289f, 2.98451f},
+ {18192, 530, -1602.46f, 7866.43f, -22.1177f, 4.74729f},
+ {18192, 530, -1591.22f, 7875.29f, -22.3536f, 4.34587f},
+ {18192, 530, -1550.6f, 7944.45f, -21.63f, 3.559f},
+ {18192, 530, -1545.57f, 7935.83f, -21.13f, 3.448f},
+ {18192, 530, -1550.86f, 7937.56f, -21.7f, 3.801f}
};
const creature_type AllianceControlNPCs[NA_CONTROL_NPC_NUM] =
{
- {18817, 469, 530, -1591.18f, 8020.39f, -22.2042f, 4.59022f},
- {18822, 469, 530, -1588.0f, 8019.0f, -22.2042f, 4.06662f},
- {21485, 469, 530, -1521.93f, 7927.37f, -20.2299f, 3.24631f},
- {21487, 469, 530, -1540.33f, 7971.95f, -20.7186f, 3.07178f},
- {21488, 469, 530, -1570.01f, 7993.8f, -22.4505f, 5.02655f},
- {18256, 469, 530, -1654.06f, 8000.46f, -26.59f, 3.37f},
- {18256, 469, 530, -1487.18f, 7899.1f, -19.53f, 0.954f},
- {18256, 469, 530, -1480.88f, 7908.79f, -19.19f, 4.485f},
- {18256, 469, 530, -1540.56f, 7995.44f, -20.45f, 0.947f},
- {18256, 469, 530, -1546.95f, 8000.85f, -20.72f, 6.035f},
- {18256, 469, 530, -1595.31f, 7860.53f, -21.51f, 3.747f},
- {18256, 469, 530, -1642.31f, 7995.59f, -25.8f, 3.317f},
- {18256, 469, 530, -1545.46f, 7995.35f, -20.63f, 1.094f},
- {18256, 469, 530, -1487.58f, 7907.99f, -19.27f, 5.567f},
- {18256, 469, 530, -1651.54f, 7988.56f, -26.5289f, 2.98451f},
- {18256, 469, 530, -1602.46f, 7866.43f, -22.1177f, 4.74729f},
- {18256, 469, 530, -1591.22f, 7875.29f, -22.3536f, 4.34587f},
- {18256, 469, 530, -1603.75f, 8000.36f, -24.18f, 4.516f},
- {18256, 469, 530, -1585.73f, 7994.68f, -23.29f, 4.439f},
- {18256, 469, 530, -1595.5f, 7991.27f, -23.53f, 4.738f}
+ {18817, 530, -1591.18f, 8020.39f, -22.2042f, 4.59022f},
+ {18822, 530, -1588.0f, 8019.0f, -22.2042f, 4.06662f},
+ {21485, 530, -1521.93f, 7927.37f, -20.2299f, 3.24631f},
+ {21487, 530, -1540.33f, 7971.95f, -20.7186f, 3.07178f},
+ {21488, 530, -1570.01f, 7993.8f, -22.4505f, 5.02655f},
+ {18256, 530, -1654.06f, 8000.46f, -26.59f, 3.37f},
+ {18256, 530, -1487.18f, 7899.1f, -19.53f, 0.954f},
+ {18256, 530, -1480.88f, 7908.79f, -19.19f, 4.485f},
+ {18256, 530, -1540.56f, 7995.44f, -20.45f, 0.947f},
+ {18256, 530, -1546.95f, 8000.85f, -20.72f, 6.035f},
+ {18256, 530, -1595.31f, 7860.53f, -21.51f, 3.747f},
+ {18256, 530, -1642.31f, 7995.59f, -25.8f, 3.317f},
+ {18256, 530, -1545.46f, 7995.35f, -20.63f, 1.094f},
+ {18256, 530, -1487.58f, 7907.99f, -19.27f, 5.567f},
+ {18256, 530, -1651.54f, 7988.56f, -26.5289f, 2.98451f},
+ {18256, 530, -1602.46f, 7866.43f, -22.1177f, 4.74729f},
+ {18256, 530, -1591.22f, 7875.29f, -22.3536f, 4.34587f},
+ {18256, 530, -1603.75f, 8000.36f, -24.18f, 4.516f},
+ {18256, 530, -1585.73f, 7994.68f, -23.29f, 4.439f},
+ {18256, 530, -1595.5f, 7991.27f, -23.53f, 4.738f}
};
enum WyvernStates
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp
index df526ed068d..8063d4fc090 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp
@@ -256,8 +256,8 @@ OPvPCapturePointZM_GraveYard::OPvPCapturePointZM_GraveYard(OutdoorPvP* pvp)
m_GraveYardState = ZM_GRAVEYARD_N;
m_FlagCarrierGUID = 0;
// add field scouts here
- AddCreature(ZM_ALLIANCE_FIELD_SCOUT, ZM_AllianceFieldScout.entry, ZM_AllianceFieldScout.teamval, ZM_AllianceFieldScout.map, ZM_AllianceFieldScout.x, ZM_AllianceFieldScout.y, ZM_AllianceFieldScout.z, ZM_AllianceFieldScout.o);
- AddCreature(ZM_HORDE_FIELD_SCOUT, ZM_HordeFieldScout.entry, ZM_HordeFieldScout.teamval, ZM_HordeFieldScout.map, ZM_HordeFieldScout.x, ZM_HordeFieldScout.y, ZM_HordeFieldScout.z, ZM_HordeFieldScout.o);
+ AddCreature(ZM_ALLIANCE_FIELD_SCOUT, ZM_AllianceFieldScout.entry, ZM_AllianceFieldScout.map, ZM_AllianceFieldScout.x, ZM_AllianceFieldScout.y, ZM_AllianceFieldScout.z, ZM_AllianceFieldScout.o);
+ AddCreature(ZM_HORDE_FIELD_SCOUT, ZM_HordeFieldScout.entry, ZM_HordeFieldScout.map, ZM_HordeFieldScout.x, ZM_HordeFieldScout.y, ZM_HordeFieldScout.z, ZM_HordeFieldScout.o);
// add neutral banner
AddObject(0, ZM_Banner_N.entry, ZM_Banner_N.map, ZM_Banner_N.x, ZM_Banner_N.y, ZM_Banner_N.z, ZM_Banner_N.o, ZM_Banner_N.rot0, ZM_Banner_N.rot1, ZM_Banner_N.rot2, ZM_Banner_N.rot3);
}
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
index 4b810ddb15f..fdd093a1bfe 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
@@ -52,10 +52,10 @@ const go_type ZM_Banner_H = { 182528, 530, 253.54f, 7083.81f, 36.7728f, -0.01745
const go_type ZM_Banner_N = { 182529, 530, 253.54f, 7083.81f, 36.7728f, -0.017453f, 0.0f, 0.0f, 0.008727f, -0.999962f };
// horde field scout spawn data
-const creature_type ZM_HordeFieldScout = {18564, 67, 530, 296.625f, 7818.4f, 42.6294f, 5.18363f};
+const creature_type ZM_HordeFieldScout = {18564, 530, 296.625f, 7818.4f, 42.6294f, 5.18363f};
// alliance field scout spawn data
-const creature_type ZM_AllianceFieldScout = {18581, 469, 530, 374.395f, 6230.08f, 22.8351f, 0.593412f};
+const creature_type ZM_AllianceFieldScout = {18581, 530, 374.395f, 6230.08f, 22.8351f, 0.593412f};
enum ZMCreatureTypes
{