aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-23 14:23:25 -0600
committermegamage <none@none>2009-01-23 14:23:25 -0600
commitf0ebb960642ad0fa43fa49fd3cc76f6516de6cd3 (patch)
treea6fa76445cfa07bf060a473ad1910c724fa679a4
parentb28b8b5ced6f0e0a7b52403010a7b465b5a765ae (diff)
parentc3ce24c30fc824d73f719780d7791a0095c14d61 (diff)
*Update to HG 957.
--HG-- branch : trunk
-rw-r--r--CMakeLists.txt10
-rw-r--r--README.AHBOT175
-rw-r--r--sql/characters.sql59
-rw-r--r--sql/updates/832_characters.sql1
-rw-r--r--sql/updates/927_characters.sql1
-rw-r--r--sql/updates/930_characters.sql56
-rw-r--r--sql/updates/933_world_scripts.sql1
-rw-r--r--sql/updates/935_world_scripts.sql6
-rw-r--r--sql/updates/940_world_scripts.sql2
-rw-r--r--sql/updates/945_world_scripts.sql41
-rw-r--r--sql/updates/947_world_scripts.sql12
-rw-r--r--sql/updates/948_world_scripts.sql5
-rw-r--r--sql/updates/950_world_scripts.sql23
-rw-r--r--sql/updates/951_world_scripts.sql16
-rw-r--r--sql/updates/952_world_scripts.sql10
-rw-r--r--sql/updates/953_world_scripts.sql9
-rw-r--r--sql/updates/954_world_scripts.sql19
-rw-r--r--sql/updates/955_world_scripts.sql59
-rw-r--r--sql/updates/956_world_scripts.sql26
-rw-r--r--sql/updates/957_world_scripts.sql36
-rw-r--r--sql/updates/CMakeLists.txt17
-rw-r--r--src/bindings/scripts/CMakeLists.txt5
-rw-r--r--src/bindings/scripts/Makefile.am2
-rw-r--r--src/bindings/scripts/ScriptMgr.cpp4
-rw-r--r--src/bindings/scripts/VC71/71ScriptDev2.vcproj12
-rw-r--r--src/bindings/scripts/VC80/80ScriptDev2.vcproj12
-rw-r--r--src/bindings/scripts/VC90/90ScriptDev2.vcproj12
-rw-r--r--src/bindings/scripts/scripts/item/item_scripts.cpp3
-rw-r--r--src/bindings/scripts/scripts/npc/npcs_special.cpp144
-rw-r--r--src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp53
-rw-r--r--src/bindings/scripts/scripts/zone/azshara/azshara.cpp21
-rw-r--r--src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp93
-rw-r--r--src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp165
-rw-r--r--src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp8
-rw-r--r--src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp37
-rw-r--r--src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp3
-rw-r--r--src/bindings/scripts/scripts/zone/deadmines/deadmines.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/dun_morogh/dun_morogh.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp3
-rw-r--r--src/bindings/scripts/scripts/zone/elwynn_forest/elwynn_forest.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp45
-rw-r--r--src/bindings/scripts/scripts/zone/felwood/felwood.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/feralas/feralas.cpp6
-rw-r--r--src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp28
-rw-r--r--src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp155
-rw-r--r--src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/def_blood_furnace.h9
-rw-r--r--src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp112
-rw-r--r--src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp490
-rw-r--r--src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp20
-rw-r--r--src/bindings/scripts/scripts/zone/karazhan/boss_moroes.cpp6
-rw-r--r--src/bindings/scripts/scripts/zone/loch_modan/loch_modan.cpp25
-rw-r--r--src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp52
-rw-r--r--src/bindings/scripts/scripts/zone/mulgore/mulgore.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp128
-rw-r--r--src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp53
-rw-r--r--src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp28
-rw-r--r--src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp775
-rw-r--r--src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp120
-rw-r--r--src/bindings/scripts/scripts/zone/silvermoon/silvermoon_city.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp57
-rw-r--r--src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp28
-rw-r--r--src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp28
-rw-r--r--src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp356
-rw-r--r--src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp26
-rw-r--r--src/bindings/scripts/scripts/zone/thunder_bluff/thunder_bluff.cpp3
-rw-r--r--src/bindings/scripts/scripts/zone/undercity/undercity.cpp33
-rw-r--r--src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp25
-rw-r--r--src/bindings/scripts/scripts/zone/winterspring/winterspring.cpp24
-rw-r--r--src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp43
-rw-r--r--src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/zulgurub/boss_mandokir.cpp7
-rw-r--r--src/game/AuctionHouse.cpp6
-rw-r--r--src/game/AuctionHouseBot.cpp1198
-rw-r--r--src/game/AuctionHouseBot.h687
-rw-r--r--src/game/CMakeLists.txt2
-rw-r--r--src/game/Chat.cpp1
-rw-r--r--src/game/Chat.h1
-rw-r--r--src/game/Creature.h1
-rw-r--r--src/game/Level3.cpp375
-rw-r--r--src/game/Mail.cpp18
-rw-r--r--src/game/Spell.cpp13
-rw-r--r--src/game/Spell.h2
-rw-r--r--src/game/SpellEffects.cpp24
-rw-r--r--src/game/SpellMgr.h16
-rw-r--r--src/game/Unit.cpp95
-rw-r--r--src/game/Unit.h7
-rw-r--r--src/game/World.cpp7
-rw-r--r--src/shared/revision.h4
-rw-r--r--src/trinitycore/Master.cpp2
-rw-r--r--src/trinitycore/trinitycore.conf.dist75
-rw-r--r--win/VC71/game.vcproj16
-rw-r--r--win/VC80/game.vcproj16
-rw-r--r--win/VC90/game.vcproj10
95 files changed, 5208 insertions, 1241 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 35e518476d9..9d03b0ff681 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -156,12 +156,12 @@ ${CMAKE_CURRENT_SOURCE_DIR}/..
${ACE_INCLUDE_DIR}
)
-if(PREFIX)
-message("* Running ldconfig")
-file(WRITE /etc/ld.so.conf.d/trinitycore.conf "${CMAKE_INSTALL_PREFIX}/lib")
-execute_process(COMMAND ldconfig)
-endif(PREFIX)
+SET(CMAKE_SKIP_BUILD_RPATH FALSE)
+SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
add_subdirectory(dep)
add_subdirectory(doc)
add_subdirectory(src)
+add_subdirectory(sql)
diff --git a/README.AHBOT b/README.AHBOT
new file mode 100644
index 00000000000..ef96d1f0fe8
--- /dev/null
+++ b/README.AHBOT
@@ -0,0 +1,175 @@
+This patch modifies the core so it populates the auction houses with items. It
+makes the game feel a bit more like official. Items and prices are chosen
+randomly based on the parameters you define. If an auction expires, auctions
+are deleted quietly. AHBot will not buy it's own items, and will not receive
+mail from the AH or get returned mail.
+
+===============================================================================
+~~HOW TO CONFIGURE~~
+===============================================================================
+Step 1.) Create a character that you are going to use as the auction house bot
+ character. This character will be the auction's owner for all the
+ items created by the bot.
+Step 2.) Go into the realm database and note the account number for the
+ character.
+Step 3.) Go into the characters database and note the character's GUID.
+Step 4.) Log in at least once with this character.
+ (Do not change the configuration before this)
+Step 5.) Tune the configuration options in the configuration file and the
+ Database.
+
+#These are the settings in the configuration file:
+AuctionHouseBot.EnableSeller = 0
+AuctionHouseBot.EnableBuyer = 0
+AuctionHouseBot.Account = 0
+AuctionHouseBot.GUID = 0
+AuctionHouseBot.VendorItems = 0
+AuctionHouseBot.LootItems = 1
+AuctionHouseBot.OtherItems = 0
+AuctionHouseBot.No_Bind = 1
+AuctionHouseBot.Bind_When_Picked_Up = 0
+AuctionHouseBot.Bind_When_Equipped = 1
+AuctionHouseBot.Bind_When_Use = 1
+AuctionHouseBot.Bind_Quest_Item = 0
+AuctionHouseBot.ItemsPerCycle = 200
+AuctionHouseBot.UseBuyPriceForSeller = 0
+AuctionHouseBot.UseBuyPriceForBuyer = 0
+
+AuctionHouseBot.EnableSeller enables (1) or disables (0) the Seller
+AuctionHouseBot.EnableBuyer enables (1) or disables (0) the Buyer
+AuctionHouseBot.Account is the account number (in realmd->account table) of the player you want to run as the auction bot. Note: a value of 0 will disable the bot.
+AuctionHouseBot.GUID is the GUID (in characters->characters table) of the player you want to run as the auction bot. Note: a value of 0 will disable the bot.
+AuctionHouseBot.VendorItems is a boolean value (0 or 1) that indicates whether to include Vendor only items
+AuctionHouseBot.LootItems is a boolean value (0 or 1) that indicates whether to include Loot/Fish/Skin/etc. only items
+AuctionHouseBot.OtherItems is a boolean value (0 or 1) that indicates whether to include Other items not covered by the first 2
+AuctionHouseBot.No_Bind is a boolean value (0 or 1) that indicates whether to include items with a bonding of 0
+AuctionHouseBot.Bind_When_Picked_Up = is a boolean value (0 or 1) that indicates whether to include items with a bonding of 1
+AuctionHouseBot.Bind_When_Equipped = is a boolean value (0 or 1) that indicates whether to include items with a bonding of 2
+AuctionHouseBot.Bind_When_Use = is a boolean value (0 or 1) that indicates whether to include items with a bonding of 3
+AuctionHouseBot.Bind_Quest_Item = is a boolean value (0 or 1) that indicates whether to include items with a bonding of 4
+AuctionHouseBot.ItemsPerCycle determines how many items are added each time AHBot is run (once per minute, by default)
+AuctionHouseBot.UseBuyPriceForSeller Use SellPrice (0) or BuyPrice (1) for determining prices
+AuctionHouseBot.UseBuyPriceForBuyer Use SellPrice (0) or BuyPrice (1) for determining prices
+
+#These are the settings in the Database:
+#Each Auctionhouse has it's own set of these
+MinItems = 0
+MaxItems = 0
+MinTime = 8
+MaxTime = 24
+
+PercentWhiteTradeGoods = 27
+PercentGreenTradeGoods = 12
+PercentBlueTradeGoods = 10
+PercentPurpleTradeGoods = 1
+
+PercentWhiteItems = 10
+PercentGreenItems = 30
+PercentBlueItems = 8
+PercentPurpleItems = 2
+
+MinPriceWhite = 150
+MaxPriceWhite = 250
+MinBidPriceWhite = 70
+MaxBidPriceWhite = 100
+MaxStackWhite = 0
+MinPriceGreen = 800
+MaxPriceGreen = 1400
+MinBidPriceGreen = 80
+MaxBidPriceGreen = 100
+MaxStackGreen = 3
+MinPriceBlue = 1250
+MaxPriceBlue = 1750
+MinBidPriceBlue = 75
+MaxBidPriceBlue = 100
+MaxStackBlue = 2
+MinPricePurple = 2250
+MaxPricePurple = 4550
+MinBidPricePurple = 80
+MaxBidPricePurple = 100
+MaxStackPurple = 1
+
+BuyerPriceGrey = 1
+BuyerPriceWhite = 1
+BuyerPriceGreen = 5
+BuyerPriceBlue = 12
+BuyerPricePurple = 15
+BuyerBiddingInterval = 1
+BuyerBidsPerInterval = 1
+
+MaxItems is the number of items you want to keep in the auction houses.
+MinItems Minimum items in auctionhouses (default 0 - minimum will be the same as maximum). If it is higher than the value of the corresponding maxItems setting, it will be set down to match the maxItems setting.
+MinTime is the minimum number of hours for an auction.
+MaxTime is the maximum number of hours for an auction.
+
+#These must add up to 100
+PercentWhiteTradeGoods is the percentage of the auction items that should be trade goods of white quality. A value of 0 will disable.
+PercentGreenTradeGoods is the percentage of the auction items that should be trade goods of green quality. A value of 0 will disable.
+PercentBlueTradeGoods is the percentage of the auction items that should be trade goods of blue quality. A value of 0 will disable.
+PercentPurpleTradeGoods is the percentage of the auction items that should be trade goods of purple quality. A value of 0 will disable.
+PercentWhiteItems is the percentage of the auction items that should be items of white quality. A value of 0 will disable.
+PercentGreenItems is the percentage of the auction items that should be items of green quality. A value of 0 will disable.
+PercentBlueItems is the percentage of the auction items that should be items of blue quality. A value of 0 will disable.
+PercentPurpleItems is the percentage of the auction items that should be items of purple quality. A value of 0 will disable.
+
+MinPriceWhite is the minimum price adjustment for white items. For example the default is 150, which means 150%. So if an item vendors for 1g it would go to auction for a minimum of 1.5g.
+MaxPriceWhite is the maximum price adjustment for white items.
+MinBidPriceWhite these two control the starting bid as a percent of the buyout price. For example, if MinBidPrice is 30 and MaxBidPrice is 80 the starting bid for the auction will randomly be between 30-80% of the randomly chosen buyout price.
+MaxBidPriceWhite these two control the starting bid as a percent of the buyout price. For example, if MinBidPrice is 30 and MaxBidPrice is 80 the starting bid for the auction will randomly be between 30-80% of the randomly chosen buyout price.
+MaxStackWhite is maximum stack size to create for this quality type. A value of zero will disable the maximum stack size for this quality allowing the bot to create stacks (of random size) of items as big as the item type allows.
+
+MinPriceGreen - see above
+MaxPriceGreen - see above
+MinBidPriceGreen - see above
+MaxBidPriceGreen - see above
+MaxStackGreen - see above
+MinPriceBlue - see above
+MaxPriceBlue - see above
+MinBidPriceBlue - see above
+MaxBidPriceBlue - see above
+MaxStackBlue - see above
+MinPricePurple - see above
+MaxPricePurple - see above
+MinBidPricePurple - see above
+MaxBidPricePurple - see above
+MaxStackPurple - see above
+
+#These are the multipliers that are applied to the vendor price for an item, that determines if AHBot will buy it or not.
+#1 means AHBot will pay the same as (or less than) a vendor would pay, 2 means up to twice as much, etc.
+BuyerPriceGrey
+BuyerPriceWhite
+BuyerPriceGreen
+BuyerPriceBlue
+BuyerPricePurple
+
+BuyerBiddingInterval is the time (in minutes) between bids.
+BuyerBidsPerInterval is the number of bids the buyer will make in a cycle
+
+How to use ahcommands from the console (CLI) or in game with GM level 3 players:
+ahbotoptions - will display usage instructions
+ahbotoptions help - will display the list of commands
+
+ahexpire - will expire all the auctions in the requested auction house that were created by AHBot.
+minitems - will set the minimum number of items in the AH before it starts being filled again.
+maxitems - will set the maximum number of items in the AH.
+mintime - will set the minimum time (in hours) for auctions to expire.
+maxtime - will set the maximum time (in hours) for auctions to expire.
+percentages - will set the percentage of each quality in the AH
+minprice - will set the minimum price multiplier for auctions.
+maxprice - will set the maximum price multiplier for auctions.
+minbidprice - will set the minimum starting bid as a percent of the buyout price for auctions.
+maxbidprice - will set the maximum starting bid as a percent of the buyout price for auctions.
+maxstack - will set the maximum number of items in stacks for auctions. 0 will set the maximum to the maximum for that item type.
+buyerprice - will set the bid price multiplier for auctions.
+biddinginterval - will set the number of minutes between bids on auctions.
+bidsperinterval - will set the number of bids to enter per cycle.
+
+The auction house IDs are:
+2 - Alliance
+6 - Horde
+7 - Neutral
+
+
+AHBot Originally made by Chris K.
+Much thanks to Chris K, grether and Dolomit6!
+AHBot Now includes AHBuyer created by Kerbe as a derivative of AHBot, and later modified by Paradox \ No newline at end of file
diff --git a/sql/characters.sql b/sql/characters.sql
index 92cda40fdf6..ad691159878 100644
--- a/sql/characters.sql
+++ b/sql/characters.sql
@@ -165,6 +165,65 @@ LOCK TABLES `auctionhouse` WRITE;
UNLOCK TABLES;
--
+-- Table structure for table `auctionhousebot`
+--
+
+DROP TABLE IF EXISTS `auctionhousebot`;
+CREATE TABLE `auctionhousebot` (
+ `auctionhouse` int(11) NOT NULL default '0' COMMENT 'mapID of the auctionhouse.',
+ `name` char(25) default NULL COMMENT 'Text name of the auctionhouse.',
+ `minitems` int(11) default '0' COMMENT 'This is the minimum number of items you want to keep in the auction house. a 0 here will make it the same as the maximum.',
+ `maxitems` int(11) default '0' COMMENT 'This is the number of items you want to keep in the auction house.',
+ `mintime` int(11) default '8' COMMENT 'Sets the minimum number of hours for an auction.',
+ `maxtime` int(11) default '24' COMMENT 'Sets the maximum number of hours for an auction.',
+ `percentwhitetradegoods` int(11) default '27' COMMENT 'Sets the percentage of the White Trade Goods auction items',
+ `percentgreentradegoods` int(11) default '12' COMMENT 'Sets the percentage of the Green Trade Goods auction items',
+ `percentbluetradegoods` int(11) default '10' COMMENT 'Sets the percentage of the Blue Trade Goods auction items',
+ `percentpurpletradegoods` int(11) default '1' COMMENT 'Sets the percentage of the Purple Trade Goods auction items',
+ `percentwhiteitems` int(11) default '10' COMMENT 'Sets the percentage of the non trade White auction items',
+ `percentgreenitems` int(11) default '30' COMMENT 'Sets the percentage of the non trade Green auction items',
+ `percentblueitems` int(11) default '8' COMMENT 'Sets the percentage of the non trade Blue auction items',
+ `percentpurpleitems` int(11) default '2' COMMENT 'Sets the percentage of the non trade Purple auction items',
+ `minpricewhite` int(11) default '150' COMMENT 'Minimum price of White items (percentage).',
+ `maxpricewhite` int(11) default '250' COMMENT 'Maximum price of White items (percentage).',
+ `minpricegreen` int(11) default '800' COMMENT 'Minimum price of Green items (percentage).',
+ `maxpricegreen` int(11) default '1400' COMMENT 'Maximum price of Green items (percentage).',
+ `minpriceblue` int(11) default '1250' COMMENT 'Minimum price of Blue items (percentage).',
+ `maxpriceblue` int(11) default '1750' COMMENT 'Maximum price of Blue items (percentage).',
+ `minpricepurple` int(11) default '2250' COMMENT 'Minimum price of Purple items (percentage).',
+ `maxpricepurple` int(11) default '4550' COMMENT 'Maximum price of Purple items (percentage).',
+ `minbidpricewhite` int(11) default '70' COMMENT 'Starting bid price of White items as a percentage of the randomly chosen buyout price. Default: 100 (Bid and buyout price the same)',
+ `maxbidpricewhite` int(11) default '100' COMMENT 'Starting bid price of White items as a percentage of the randomly chosen buyout price. Default: 100 (Bid and buyout price the same)',
+ `minbidpricegreen` int(11) default '80' COMMENT 'Starting bid price of Green items as a percentage of the randomly chosen buyout price. Default: 100 (Bid and buyout price the same)',
+ `maxbidpricegreen` int(11) default '100' COMMENT 'Starting bid price of Green items as a percentage of the randomly chosen buyout price. Default: 100 (Bid and buyout price the same)',
+ `minbidpriceblue` int(11) default '75' COMMENT 'Starting bid price of Blue items as a percentage of the randomly chosen buyout price. Default: 100 (Bid and buyout price the same)',
+ `maxbidpriceblue` int(11) default '100' COMMENT 'Starting bid price of Blue items as a percentage of the randomly chosen buyout price. Default: 100 (Bid and buyout price the same)',
+ `minbidpricepurple` int(11) default '80' COMMENT 'Starting bid price of Purple items as a percentage of the randomly chosen buyout price. Default: 100 (Bid and buyout price the same)',
+ `maxbidpricepurple` int(11) default '100' COMMENT 'Starting bid price of Purple items as a percentage of the randomly chosen buyout price. Default: 100 (Bid and buyout price the same)',
+ `maxstackwhite` int(11) default '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
+ `maxstackgreen` int(11) default '3' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
+ `maxstackblue` int(11) default '2' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
+ `maxstackpurple` int(11) default '1' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
+ `buyerpricegrey` int(11) default '1' COMMENT 'Multiplier to vendorprice when buying grey items from auctionhouse',
+ `buyerpricewhite` int(11) default '1' COMMENT 'Multiplier to vendorprice when buying white items from auctionhouse',
+ `buyerpricegreen` int(11) default '5' COMMENT 'Multiplier to vendorprice when buying green items from auctionhouse',
+ `buyerpriceblue` int(11) default '12' COMMENT 'Multiplier to vendorprice when buying blue items from auctionhouse',
+ `buyerpricepurple` int(11) default '15' COMMENT 'Multiplier to vendorprice when buying purple items from auctionhouse',
+ `buyerbiddinginterval` int(11) default '1' COMMENT 'Interval how frequently AHB bids on each AH. Time in minutes',
+ `buyerbidsperinterval` int(11) default '1' COMMENT 'number of bids to put in per bidding interval',
+ PRIMARY KEY (`auctionhouse`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Data for table `auctionhousebot`
+--
+
+insert into `auctionhousebot`(`auctionhouse`,`name`,`minitems`,`maxitems`,`mintime`,`maxtime`,`percentwhitetradegoods`,`percentgreentradegoods`,`percentbluetradegoods`,`percentpurpletradegoods`,`percentwhiteitems`,`percentgreenitems`,`percentblueitems`,`percentpurpleitems`,`minpricewhite`,`maxpricewhite`,`minpricegreen`,`maxpricegreen`,`minpriceblue`,`maxpriceblue`,`minpricepurple`,`maxpricepurple`,`minbidpricewhite`,`maxbidpricewhite`,`minbidpricegreen`,`maxbidpricegreen`,`minbidpriceblue`,`maxbidpriceblue`,`minbidpricepurple`,`maxbidpricepurple`,`maxstackwhite`,`maxstackgreen`,`maxstackblue`,`maxstackpurple`,`buyerpricegrey`,`buyerpricewhite`,`buyerpricegreen`,`buyerpriceblue`,`buyerpricepurple`,`buyerbiddinginterval`,`buyerbidsperinterval`) values
+(2,'Alliance',0,0,8,24,27,12,10,1,10,30,8,2,150,250,800,1400,1250,1750,2250,4550,70,100,80,100,75,100,80,100,0,3,2,1,1,1,5,12,15,1,1),
+(6,'Horde',0,0,8,24,27,12,10,1,10,30,8,2,150,250,800,1400,1250,1750,2250,4550,70,100,80,100,75,100,80,100,0,3,2,1,1,1,5,12,15,1,1),
+(7,'Neutral',0,0,8,24,27,12,10,1,10,30,8,2,150,250,800,1400,1250,1750,2250,4550,70,100,80,100,75,100,80,100,0,3,2,1,1,1,5,12,15,1,1);
+
+--
-- Table structure for table `bugreport`
--
diff --git a/sql/updates/832_characters.sql b/sql/updates/832_characters.sql
deleted file mode 100644
index 1330aef891e..00000000000
--- a/sql/updates/832_characters.sql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE `gm_tickets` CHANGE `closed` `closed` tinyint(1) NOT NULL default '0'; \ No newline at end of file
diff --git a/sql/updates/927_characters.sql b/sql/updates/927_characters.sql
new file mode 100644
index 00000000000..6cbcf21e7bd
--- /dev/null
+++ b/sql/updates/927_characters.sql
@@ -0,0 +1 @@
+ALTER TABLE `gm_tickets` CHANGE `closed` `closed` int(10) NOT NULL default '0'; \ No newline at end of file
diff --git a/sql/updates/930_characters.sql b/sql/updates/930_characters.sql
new file mode 100644
index 00000000000..f0ec58c2dc6
--- /dev/null
+++ b/sql/updates/930_characters.sql
@@ -0,0 +1,56 @@
+--
+-- Table structure for table `auctionhousebot`
+--
+
+CREATE TABLE IF NOT EXISTS `auctionhousebot` (
+ `auctionhouse` int(11) NOT NULL default '0' COMMENT 'mapID of the auctionhouse.',
+ `name` char(25) default NULL COMMENT 'Text name of the auctionhouse.',
+ `minitems` int(11) default '0' COMMENT 'This is the minimum number of items you want to keep in the auction house. a 0 here will make it the same as the maximum.',
+ `maxitems` int(11) default '0' COMMENT 'This is the number of items you want to keep in the auction house.',
+ `mintime` int(11) default '8' COMMENT 'Sets the minimum number of hours for an auction.',
+ `maxtime` int(11) default '24' COMMENT 'Sets the maximum number of hours for an auction.',
+ `percentwhitetradegoods` int(11) default '27' COMMENT 'Sets the percentage of the White Trade Goods auction items',
+ `percentgreentradegoods` int(11) default '12' COMMENT 'Sets the percentage of the Green Trade Goods auction items',
+ `percentbluetradegoods` int(11) default '10' COMMENT 'Sets the percentage of the Blue Trade Goods auction items',
+ `percentpurpletradegoods` int(11) default '1' COMMENT 'Sets the percentage of the Purple Trade Goods auction items',
+ `percentwhiteitems` int(11) default '10' COMMENT 'Sets the percentage of the non trade White auction items',
+ `percentgreenitems` int(11) default '30' COMMENT 'Sets the percentage of the non trade Green auction items',
+ `percentblueitems` int(11) default '8' COMMENT 'Sets the percentage of the non trade Blue auction items',
+ `percentpurpleitems` int(11) default '2' COMMENT 'Sets the percentage of the non trade Purple auction items',
+ `minpricewhite` int(11) default '150' COMMENT 'Minimum price of White items (percentage).',
+ `maxpricewhite` int(11) default '250' COMMENT 'Maximum price of White items (percentage).',
+ `minpricegreen` int(11) default '800' COMMENT 'Minimum price of Green items (percentage).',
+ `maxpricegreen` int(11) default '1400' COMMENT 'Maximum price of Green items (percentage).',
+ `minpriceblue` int(11) default '1250' COMMENT 'Minimum price of Blue items (percentage).',
+ `maxpriceblue` int(11) default '1750' COMMENT 'Maximum price of Blue items (percentage).',
+ `minpricepurple` int(11) default '2250' COMMENT 'Minimum price of Purple items (percentage).',
+ `maxpricepurple` int(11) default '4550' COMMENT 'Maximum price of Purple items (percentage).',
+ `minbidpricewhite` int(11) default '70' COMMENT 'Starting bid price of White items as a percentage of the randomly chosen buyout price. Default: 100 (Bid and buyout price the same)',
+ `maxbidpricewhite` int(11) default '100' COMMENT 'Starting bid price of White items as a percentage of the randomly chosen buyout price. Default: 100 (Bid and buyout price the same)',
+ `minbidpricegreen` int(11) default '80' COMMENT 'Starting bid price of Green items as a percentage of the randomly chosen buyout price. Default: 100 (Bid and buyout price the same)',
+ `maxbidpricegreen` int(11) default '100' COMMENT 'Starting bid price of Green items as a percentage of the randomly chosen buyout price. Default: 100 (Bid and buyout price the same)',
+ `minbidpriceblue` int(11) default '75' COMMENT 'Starting bid price of Blue items as a percentage of the randomly chosen buyout price. Default: 100 (Bid and buyout price the same)',
+ `maxbidpriceblue` int(11) default '100' COMMENT 'Starting bid price of Blue items as a percentage of the randomly chosen buyout price. Default: 100 (Bid and buyout price the same)',
+ `minbidpricepurple` int(11) default '80' COMMENT 'Starting bid price of Purple items as a percentage of the randomly chosen buyout price. Default: 100 (Bid and buyout price the same)',
+ `maxbidpricepurple` int(11) default '100' COMMENT 'Starting bid price of Purple items as a percentage of the randomly chosen buyout price. Default: 100 (Bid and buyout price the same)',
+ `maxstackwhite` int(11) default '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
+ `maxstackgreen` int(11) default '3' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
+ `maxstackblue` int(11) default '2' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
+ `maxstackpurple` int(11) default '1' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
+ `buyerpricegrey` int(11) default '1' COMMENT 'Multiplier to vendorprice when buying grey items from auctionhouse',
+ `buyerpricewhite` int(11) default '1' COMMENT 'Multiplier to vendorprice when buying white items from auctionhouse',
+ `buyerpricegreen` int(11) default '5' COMMENT 'Multiplier to vendorprice when buying green items from auctionhouse',
+ `buyerpriceblue` int(11) default '12' COMMENT 'Multiplier to vendorprice when buying blue items from auctionhouse',
+ `buyerpricepurple` int(11) default '15' COMMENT 'Multiplier to vendorprice when buying purple items from auctionhouse',
+ `buyerbiddinginterval` int(11) default '1' COMMENT 'Interval how frequently AHB bids on each AH. Time in minutes',
+ `buyerbidsperinterval` int(11) default '1' COMMENT 'number of bids to put in per bidding interval',
+ PRIMARY KEY (`auctionhouse`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Data for table `auctionhousebot`
+--
+insert into `auctionhousebot` (`auctionhouse`,`name`,`minitems`,`maxitems`,`mintime`,`maxtime`,`percentwhitetradegoods`,`percentgreentradegoods`,`percentbluetradegoods`,`percentpurpletradegoods`,`percentwhiteitems`,`percentgreenitems`,`percentblueitems`,`percentpurpleitems`,`minpricewhite`,`maxpricewhite`,`minpricegreen`,`maxpricegreen`,`minpriceblue`,`maxpriceblue`,`minpricepurple`,`maxpricepurple`,`minbidpricewhite`,`maxbidpricewhite`,`minbidpricegreen`,`maxbidpricegreen`,`minbidpriceblue`,`maxbidpriceblue`,`minbidpricepurple`,`maxbidpricepurple`,`maxstackwhite`,`maxstackgreen`,`maxstackblue`,`maxstackpurple`,`buyerpricegrey`,`buyerpricewhite`,`buyerpricegreen`,`buyerpriceblue`,`buyerpricepurple`,`buyerbiddinginterval`,`buyerbidsperinterval`) values
+(2,'Alliance',0,0,8,24,27,12,10,1,10,30,8,2,150,250,800,1400,1250,1750,2250,4550,70,100,80,100,75,100,80,100,0,3,2,1,1,1,5,12,15,1,1),
+(6,'Horde',0,0,8,24,27,12,10,1,10,30,8,2,150,250,800,1400,1250,1750,2250,4550,70,100,80,100,75,100,80,100,0,3,2,1,1,1,5,12,15,1,1),
+(7,'Neutral',0,0,8,24,27,12,10,1,10,30,8,2,150,250,800,1400,1250,1750,2250,4550,70,100,80,100,75,100,80,100,0,3,2,1,1,1,5,12,15,1,1);
diff --git a/sql/updates/933_world_scripts.sql b/sql/updates/933_world_scripts.sql
new file mode 100644
index 00000000000..7b1271e25cc
--- /dev/null
+++ b/sql/updates/933_world_scripts.sql
@@ -0,0 +1 @@
+update creature_template set scriptname='npc_snake_trap_serpents' where entry in (19921, 19833);
diff --git a/sql/updates/935_world_scripts.sql b/sql/updates/935_world_scripts.sql
new file mode 100644
index 00000000000..de02b51d490
--- /dev/null
+++ b/sql/updates/935_world_scripts.sql
@@ -0,0 +1,6 @@
+DELETE FROM `creature` WHERE `id` = '17653';
+
+UPDATE `gameobject_template` SET `flags` = '4' WHERE `entry` IN ('181766','181823');
+UPDATE `gameobject` SET `SpawnMask` = '3',`state` = '1' WHERE `id` IN ('181766','181823');
+
+UPDATE `instance_template` SET `script` = 'instance_blood_furnace' WHERE `map` = '542'; \ No newline at end of file
diff --git a/sql/updates/940_world_scripts.sql b/sql/updates/940_world_scripts.sql
new file mode 100644
index 00000000000..c9ad252f41f
--- /dev/null
+++ b/sql/updates/940_world_scripts.sql
@@ -0,0 +1,2 @@
+ALTER TABLE custom_texts CHANGE COLUMN emote emote smallint(5) unsigned NOT NULL DEFAULT '0';
+ALTER TABLE script_texts CHANGE COLUMN emote emote smallint(5) unsigned NOT NULL DEFAULT '0'; \ No newline at end of file
diff --git a/sql/updates/945_world_scripts.sql b/sql/updates/945_world_scripts.sql
new file mode 100644
index 00000000000..8d007e347f9
--- /dev/null
+++ b/sql/updates/945_world_scripts.sql
@@ -0,0 +1,41 @@
+update creature_template set scriptname='' where entry=22083;
+update creature_template set scriptname='npc_overlord_morghor' where entry=23139;
+update creature_template set scriptname='' where entry=23141;
+DELETE FROM script_texts WHERE entry BETWEEN -1000221 and -1000206;
+INSERT INTO script_texts (entry, content_default, type, emote, comment) VALUES
+(-1000206, 'Come, $N. Lord Stormrage awaits.', 0, 1, 'OVERLORD_SAY_1'),
+(-1000207, 'Lord Illidan will be here shortly.', 0, 1, 'OVERLORD_SAY_2'),
+(-1000208, 'Lord Illidan, this is the Dragonmaw that I, and others, have told you about. He will lead us to victory!', 0, 1, 'OVERLORD_SAY_3'),
+(-1000209, 'But... My lord, I do not understand. $N... He is the orc that has...', 0, 1, 'OVERLORD_SAY_4'),
+(-1000210, 'It will be done, my lord.', 0, 1, 'OVERLORD_SAY_5'),
+(-1000211, 'So you thought to make a fool of Mor\'ghor, eh? Before you are delivered to Lord Illidan, you will feel pain that you could not know to exist. I will take pleasure in exacting my own vengeance.', 0, 25, 'OVERLORD_SAY_6'),
+(-1000212, 'Warriors of Dragonmaw, gather \'round! One among you has attained the rank of highlord! Bow your heads in reverence! Show your respect and allegiance to Highlord $N!', 1, 22, 'OVERLORD_YELL_1'),
+(-1000213, 'All hail Lord Illidan!', 1, 66, 'OVERLORD_YELL_2'),
+(-1000214, 'What is the meaning of this, Mor\'ghor?', 0, 1, 'LORD_ILLIDAN_SAY_1'),
+(-1000215, 'SILENCE!', 0, 22, 'LORD_ILLIDAN_SAY_2'),
+(-1000216, 'Blathering idiot. You incomprehensibly incompetent buffoon...', 0, 1, 'LORD_ILLIDAN_SAY_3'),
+(-1000217, 'THIS is your hero?', 0, 6, 'LORD_ILLIDAN_SAY_4'),
+(-1000218, 'You have been deceived, imbecile.', 0, 1, 'LORD_ILLIDAN_SAY_5'),
+(-1000219, 'This... whole... operation... HAS BEEN COMPROMISED!', 0, 22, 'LORD_ILLIDAN_SAY_6'),
+(-1000220, 'I expect to see this insect\'s carcass in pieces in my lair within the hour. Fail and you will suffer a fate so much worse than death.', 0, 1, 'LORD_ILLIDAN_SAY_7'),
+(-1000221, 'You will not harm the boy, Mor\'ghor! Quickly, $N, climb on my back!', 0, 22, 'YARZILL_THE_MERC_SAY');
+
+DELETE FROM script_texts WHERE entry='-1000222';
+INSERT INTO script_texts (entry, content_default, type, language, emote, comment) VALUES
+(-1000222, 'Thank you, mortal.', 0, 11, 1, 'SAY_JUST_EATEN');
+
+DELETE FROM script_texts WHERE entry BETWEEN -1000234 and -1000223;
+INSERT INTO script_texts (entry, content_default, emote, comment) VALUES
+(-1000223, 'I sense the tortured spirits, $N. They are this way, come quickly!', 1, 'SAY_START'),
+(-1000224, 'Watch out!', 0, 'SAY_AGGRO1'),
+(-1000225, 'Naga attackers! Defend yourself!', 0, 'SAY_AGGRO2'),
+(-1000226, 'Kill them all!', 0, 'ASSASSIN_SAY_AGGRO1'),
+(-1000227, 'You will never essscape Coilssskarrr...', 0, 'ASSASSIN_SAY_AGGRO2'),
+(-1000228, 'Grant me protection $N, i must break trough their foul magic!', 0, 'SAY_PROGRESS1'),
+(-1000229, 'The naga of Coilskar are exceptionally cruel to their prisoners. It is a miracle that I survived inside that watery prison for as long as I did. Earthmother be praised.', 0, 'SAY_PROGRESS2'),
+(-1000230, 'Now we must find the exit.', 0, 'SAY_PROGRESS3'),
+(-1000231, 'Lady Vashj must answer for these atrocities. She must be brought to justice!', 0, 'SAY_PROGRESS4'),
+(-1000232, 'The tumultuous nature of the great waterways of Azeroth and Draenor are a direct result of tormented water spirits.', 0, 'SAY_PROGRESS5'),
+(-1000233, 'It shouldn\'t be much further, $N. The exit is just up ahead.', 0, 'SAY_PROGRESS6'),
+(-1000234, 'Thank you, $N. Please return to my brethren at the Altar of Damnation, near the Hand of Gul\'dan, and tell them that Wilda is safe. May the Earthmother watch over you...', 0, 'SAY_END');
+
diff --git a/sql/updates/947_world_scripts.sql b/sql/updates/947_world_scripts.sql
new file mode 100644
index 00000000000..7067a1ed706
--- /dev/null
+++ b/sql/updates/947_world_scripts.sql
@@ -0,0 +1,12 @@
+DELETE FROM script_texts WHERE entry BETWEEN -1000244 and -1000235;
+INSERT INTO script_texts (entry, content_default, type, emote, comment) VALUES
+(-1000235, 'Ok, $N. Follow me to the cave where I\'ll attempt to harness the power of the rune stone into these goggles.', 0, 1, 'phizzlethorpe - SAY_PROGRESS_1'),
+(-1000236, 'I discovered this cave on our first day here. I believe the energy in the stone can be used to our advantage.', 0, 1, 'phizzlethorpe - SAY_PROGRESS_2'),
+(-1000237, 'I\'ll begin drawing energy from the stone. Your job, $N, is to defend me. This place is cursed... trust me.', 0, 1, 'phizzlethorpe - SAY_PROGRESS_3'),
+(-1000238, 'begins tinkering with the goggles before the stone.', 2, 0, 'phizzlethorpe - EMOTE_PROGRESS_4'),
+(-1000239, 'Help!!! Get these things off me so I can get my work done!', 0, 0, 'SAY_AGGRO'),
+(-1000240, 'Almost done! Just a little longer!', 0, 1, 'phizzlethorpe - SAY_PROGRESS_5'),
+(-1000241, 'I\'ve done it! I have harnessed the power of the stone into the goggles! Let\'s get out of here!', 0, 1, 'phizzlethorpe - SAY_PROGRESS_6'),
+(-1000242, 'Phew! Glad to be back from that creepy cave.', 0, 1, 'phizzlethorpe - SAY_PROGRESS_7'),
+(-1000243, 'hands one glowing goggles over to Doctor Draxlegauge.', 2, 0, 'phizzlethorpe - EMOTE_PROGRESS_8'),
+(-1000244, 'Doctor Draxlegauge will give you further instructions, $N. Many thanks for your help!', 0, 1, 'phizzlethorpe - SAY_PROGRESS_9'); \ No newline at end of file
diff --git a/sql/updates/948_world_scripts.sql b/sql/updates/948_world_scripts.sql
new file mode 100644
index 00000000000..5f8f74cb5c0
--- /dev/null
+++ b/sql/updates/948_world_scripts.sql
@@ -0,0 +1,5 @@
+DELETE FROM script_texts WHERE entry BETWEEN -1000247 and -1000245;
+INSERT INTO script_texts (entry, content_default, type, comment) VALUES
+(-1000245, 'You, there! Hand over that moonstone and nobody gets hurt!', 1, 'SAY_RIZZLE_START'),
+(-1000246, 'Just chill!', 4, 'SAY_RIZZLE_GRENADE'),
+(-1000247, 'All right, you win! I surrender! Just don\'t hurt me!', 1, 'SAY_RIZZLE_FINAL'); \ No newline at end of file
diff --git a/sql/updates/950_world_scripts.sql b/sql/updates/950_world_scripts.sql
new file mode 100644
index 00000000000..789ad810123
--- /dev/null
+++ b/sql/updates/950_world_scripts.sql
@@ -0,0 +1,23 @@
+DELETE FROM script_texts WHERE entry BETWEEN -1000266 and -1000248;
+INSERT INTO script_texts (entry, content_default, type, emote, comment) VALUES
+(-1000248, 'The last thing I remember is the ship falling and us getting into the pods. I\'ll go see how I can help. Thank you!', 0, 0, 'draenei survivor - HEAL1'),
+(-1000249, '$C, Where am I? Who are you? Oh no! What happened to the ship?.', 0, 0, 'draenei survivor - HEAL2'),
+(-1000250, '$C You saved me! I owe you a debt that I can never repay. I\'ll go see if I can help the others.', 0, 0, 'draenei survivor - HEAL3'),
+(-1000251, 'Ugh... what is this place? Is that all that\'s left of the ship over there?', 0, 0, 'draenei survivor - HEAL4'),
+(-1000252, 'Oh, the pain...', 0, 0, 'draenei survivor - HELP1'),
+(-1000253, 'Everything hurts, Please make it stop...', 0, 0, 'draenei survivor - HELP2'),
+(-1000254, 'Ughhh... I hurt. Can you help me?', 0, 0, 'draenei survivor - HELP3'),
+(-1000255, 'I don\'t know if I can make it, please help me...', 0, 0, 'draenei survivor - HELP4'),
+
+(-1000256, 'Yes Master, all goes along as planned.', 0, 1, 'overgrind - SAY_TEXT'),
+(-1000257, 'puts the shell to his ear.', 2, 0, 'overgrind - SAY_EMOTE'),
+(-1000258, 'Now I cut you!', 1, 0, 'overgrind - YELL_ATTACK'),
+
+(-1000259, 'What\'s the big idea, Spark?', 0, 0, 'geezle - GEEZLE_SAY_1'),
+(-1000260, 'What\'s the big idea? You nearly blew my cover, idiot! I told you to put the compass and navigation maps somewhere safe - not out in the open for any fool to discover.', 0, 0, 'geezle - SPARK_SAY_2'),
+(-1000261, 'The Master has gone to great lengths to secure information about the whereabouts of the Exodar. You could have blown the entire operation, including the cover of our spy on the inside.', 0, 0, 'geezle - SPARK_SAY_3'),
+(-1000262, 'Relax, Spark! I have it all under control. We\'ll strip mine the Exodar right out from under \'em - making both you and I very, very rich in the process.', 0, 0, 'geezle - GEEZLE_SAY_4'),
+(-1000263, 'Relax? Do you know what Kael\'thas does to those that fail him, Geezle? Eternal suffering and pain... Do NOT screw this up, fool.', 0, 0, 'geezle - SPARK_SAY_5'),
+(-1000264, 'Our Bloodmyst scouts have located our contact. The fool, Velen, will soon leave himself open and defenseless -- long enough for us to strike! Now get out of my sight before I vaporize you...', 0, 0, 'geezle - SPARK_SAY_6'),
+(-1000265, 'Yes, sir. It won\'t happen again...', 0, 0, 'geezle - GEEZLE_SAY_7'),
+(-1000266, 'picks up the naga flag.', 2, 0, 'geezle - EMOTE_SPARK'); \ No newline at end of file
diff --git a/sql/updates/951_world_scripts.sql b/sql/updates/951_world_scripts.sql
new file mode 100644
index 00000000000..39208672b32
--- /dev/null
+++ b/sql/updates/951_world_scripts.sql
@@ -0,0 +1,16 @@
+DELETE FROM script_texts WHERE entry BETWEEN -1000279 and -1000267;
+INSERT INTO script_texts (entry, content_default, type, comment) VALUES
+(-1000267, 'Ready when you are, warrior.', 1, 'flathead - SAY_BIG_WILL_READY'),
+(-1000268, 'The Affray has begun, get ready to fight!', 1, 'flathead - SAY_TWIGGY_FLATHEAD_BEGIN'),
+(-1000269, 'You! Enter the fray!', 1, 'flathead - SAY_TWIGGY_FLATHEAD_FRAY'),
+(-1000270, 'Challenger is down!', 1, 'flathead - SAY_TWIGGY_FLATHEAD_DOWN'),
+(-1000271, 'The Affray is over.', 1, 'flathead - SAY_TWIGGY_FLATHEAD_OVER'),
+
+(-1000272, 'Alright, alright I think I can figure out how to operate this thing...', 0, 'shredder - SAY_PROGRESS_1'),
+(-1000273, 'Arrrgh! This isn\'t right!', 0, 'shredder - SAY_PROGRESS_2'),
+(-1000274, 'Okay, I think I\'ve got it, now. Follow me, $N!', 0, 'shredder - SAY_PROGRESS_3'),
+(-1000275, 'There\'s the stolen shredder! Stop it or Lugwizzle will have our hides!', 1, 'shredder - SAY_MERCENARY_4'),
+(-1000276, 'Looks like we\'re out of woods, eh? Wonder what this does...', 0, 'shredder - SAY_PROGRESS_5'),
+(-1000277, 'Come on, don\'t break down on me now!', 0, 'shredder - SAY_PROGRESS_6'),
+(-1000278, 'That was a close one! Well, let\'s get going, it\'s still a ways to Ratchet!', 0, 'shredder - SAY_PROGRESS_7'),
+(-1000279, 'Hmm... I don\'t think this blinking red light is a good thing...', 0, 'shredder - SAY_PROGRESS_8'); \ No newline at end of file
diff --git a/sql/updates/952_world_scripts.sql b/sql/updates/952_world_scripts.sql
new file mode 100644
index 00000000000..e06302538a2
--- /dev/null
+++ b/sql/updates/952_world_scripts.sql
@@ -0,0 +1,10 @@
+DELETE FROM script_texts where entry BETWEEN -1000285 and -1000280;
+INSERT INTO script_texts (entry, content_default, type, language, comment) VALUES
+(-1000280, 'Thank you, dear Paladin, you just saved my life.', 0, 7, 'faulk - SAY_HEAL'),
+
+(-1000281, 'Very well. Let\'s see what you have to show me, $N.', 0, 0, 'anvilvard - SAY_PR_1'),
+(-1000282, 'What manner of trick is this, $R? If you seek to ambush me, I warn you I will not go down quietly!', 0, 0, 'anvilvard - SAY_PR_2'),
+(-1000283, 'releases the last of its energies into the nerarby runestone, succesfully reactivating it.', 2, 0, 'crystal - EMOTE'),
+
+(-1000284, 'Deployment sucessful. Trespassers will be neutralized.', 0, 0, 'sentry - SAY_CONVERTED_1'),
+(-1000285, 'Objective acquired. Initiating security routines.', 0, 0, 'sentry - SAY_CONVERTED_1'); \ No newline at end of file
diff --git a/sql/updates/953_world_scripts.sql b/sql/updates/953_world_scripts.sql
new file mode 100644
index 00000000000..3811b6a98cf
--- /dev/null
+++ b/sql/updates/953_world_scripts.sql
@@ -0,0 +1,9 @@
+DELETE FROM script_texts where entry BETWEEN -1000292 and -1000286;
+INSERT INTO script_texts (entry, content_default, type, emote, comment) VALUES
+(-1000286, 'A shadowy, sinister presence has invader the Emerald Dream. Its power is poised to spill over into our world, $N. We must oppose it! That\'s why I cannot accompany you in person.', 0, 0, 'clintar_spirit'),
+(-1000287, 'The Emerald Dream will never be yours!', 0, 0, 'clintar_spirit'),
+(-1000288, 'Begone from this place!', 0, 0, 'clintar_spirit'),
+(-1000289, 'That\'s the first relic, but there are still two more. Follow me, $N.', 0, 0, 'clintar_spirit'),
+(-1000290, 'I\'ve recovered the second relic. Take a moment to rest, and then we\'ll continue to the last reliquary.', 0, 0, 'clintar_spirit'),
+(-1000291, 'We have all three of the relics, but my energy is rapidly fading. We must make our way back to Dreamwarden Lurosa! He will let you know what to do next.', 0, 0, 'clintar_spirit'),
+(-1000292, 'Lurosa, I am entrusting the Relics of Aviana to $N, who will take them to Morthis Whisperwing. I must return completely to the Emerald Dream now. Do not let $N fail!', 0, 0, 'clintar_spirit'); \ No newline at end of file
diff --git a/sql/updates/954_world_scripts.sql b/sql/updates/954_world_scripts.sql
new file mode 100644
index 00000000000..009f59517ac
--- /dev/null
+++ b/sql/updates/954_world_scripts.sql
@@ -0,0 +1,19 @@
+DELETE FROM script_texts WHERE entry BETWEEN -1000305 and -1000293;
+INSERT INTO script_texts (entry, content_default, type, comment) VALUES
+(-1000293, 'In Nagrand, food hunt ogre!', 0, 'LUMP_SAY0'),
+(-1000294, 'You taste good with maybe a little salt and pepper.', 0, 'LUMP_SAY1'),
+(-1000295, 'OK, OK! Lump give up!', 0, 'LUMP_DEFEAT'),
+
+(-1000296, 'Warning! Emergency shutdown process initiated by $N. Shutdown will complete in two minutes.', 2, 'npc_manaforge_control_console - EMOTE_START'),
+(-1000297, 'Emergency shutdown will complete in one minute.', 2, 'npc_manaforge_control_console - EMOTE_60'),
+(-1000298, 'Emergency shutdown will complete in thirty seconds.', 2, 'npc_manaforge_control_console - EMOTE_30'),
+(-1000299, 'Emergency shutdown will complete in ten seconds.', 2, 'npc_manaforge_control_console - EMOTE_10'),
+(-1000300, 'Emergency shutdown complete.', 2, 'npc_manaforge_control_console - EMOTE_COMPLETE'),
+(-1000301, 'Emergency shutdown aborted.', 2, 'npc_manaforge_control_console - EMOTE_ABORT'),
+
+(-1000302, 'Saeed is currently engaged or awaiting orders to engage. You may check directly east of me and see if Saeed is ready for you. If he is not present then he is off fighting another battle. I recommend that you wait for him to return before attacking Dimensius.', 4, 'npc_professor_dabiri - WHISPER_DABIRI'),
+
+(-1000303, 'is very weak', 2, 'mob_phase_hunter - EMOTE_WEAK'),
+
+(-1000304, 'Bessy, is that you?', 0, 'npc_bessy- SAY_THADELL_1'),
+(-1000305, 'Thank you for bringing back my Bessy, $N. I couldn\'t live without her!', 0, 'npc_bessy- SAY_THADELL_2'); \ No newline at end of file
diff --git a/sql/updates/955_world_scripts.sql b/sql/updates/955_world_scripts.sql
new file mode 100644
index 00000000000..7c389377433
--- /dev/null
+++ b/sql/updates/955_world_scripts.sql
@@ -0,0 +1,59 @@
+DELETE FROM script_texts WHERE entry BETWEEN -1000333 and -1000306;
+INSERT INTO script_texts (entry, content_default, type, comment) VALUES
+(-1000306, 'Follow me, stranger. This won\'t take long.', 0, 'npc_kservant - SAY1'),
+(-1000307, 'Shattrath was once the draenei capital of this world. Its name means \"dwelling of light.\"', 4, 'npc_kservant - WHISP1'),
+(-1000308, 'When the Burning Legion turned the orcs against the draenei, the fiercest battle was fought here. The draenei fought tooth and nail, but in the end the city fell.', 4, 'npc_kservant - WHISP2'),
+(-1000309, 'The city was left in ruins and darkness... until the Sha\'tar arrived.', 4, 'npc_kservant - WHISP3'),
+(-1000310, 'Let us go into the Lower City. I will warn you that as one of the only safe havens in Outland, Shattrath has attracted droves of refugees from all wars, current and past.', 4, 'npc_kservant - WHISP4'),
+(-1000311, 'The Sha\'tar, or \"born from light\" are the naaru that came to Outland to fight the demons of the Burning Legion.', 4, 'npc_kservant - WHISP5'),
+(-1000312, 'They were drawn to the ruins of Shattrath City where a small remnant of the draenei priesthood conducted its rites inside a ruined temple on this very spot.', 4, 'npc_kservant - WHISP6'),
+(-1000313, 'The priesthood, known as the Aldor, quickly regained its strength as word spread that the naaru had returned and reconstruction soon began. The ruined temple is now used as an infirmary for injured refugees.', 4, 'npc_kservant - WHISP7'),
+(-1000314, 'It wouldn\'t be long, however, before the city came under attack once again. This time, the attack came from Illidan\'s armies. A large regiment of blood elves had been sent by Illidan\'s ally, Kael\'thas Sunstrider, to lay waste to the city.', 4, 'npc_kservant - WHISP8'),
+(-1000315, 'As the regiment of blood elves crossed this very bridge, the Aldor\'s exarchs and vindicators lined up to defend the Terrace of Light. But then the unexpected happened.', 4, 'npc_kservant - WHISP9'),
+(-1000316, 'The blood elves laid down their weapons in front of the city\'s defenders; their leader, a blood elf elder known as Voren\'thal, stormed into the Terrace of Light and demanded to speak to A\'dal.', 4, 'npc_kservant - WHISP10'),
+(-1000317, 'As the naaru approached him, Voren\'thal kneeled before him and uttered the following words: \"I\'ve seen you in a vision, naaru. My race\'s only hope for survival lies with you. My followers and I are here to serve you.\"', 4, 'npc_kservant - WHISP11'),
+(-1000318, 'The defection of Voren\'thal and his followers was the largest loss ever incurred by Kael\'s forces. And these weren\'t just any blood elves. Many of the best and brightest amongst Kael\'s scholars and magisters had been swayed by Voren\'thal\'s influence.', 4, 'npc_kservant - WHISP12'),
+(-1000319, 'The naaru accepted the defectors, who would become known as the Scryers; their dwelling lies in the platform above. Only those initiated with the Scryers are allowed there.', 4, 'npc_kservant - WHISP13'),
+(-1000320, 'The Aldor are followers of the Light and forgiveness and redemption are values they understand. However, they found hard to forget the deeds of the blood elves while under Kael\'s command.', 4, 'npc_kservant - WHISP14'),
+(-1000321, 'Many of the priesthood had been slain by the same magisters who now vowed to serve the naaru. They were not happy to share the city with their former enemies.', 4, 'npc_kservant - WHISP15'),
+(-1000322, 'The Aldor\'s most holy temple and its surrounding dwellings lie on the terrace above. As a holy site, only the initiated are welcome inside.', 4, 'npc_kservant - WHISP16'),
+(-1000323, 'The attacks against Shattrath continued, but the city did not fall, as you can see. On the contrary, the naaru known as Xi\'ri led a successful incursion into Shadowmoon Valley - Illidan\'s doorstep.', 4, 'npc_kservant - WHISP17'),
+(-1000324, 'There he continues to wage war on Illidan with the assistance of the Aldor and the Scryers. The two factions have not given up on their old feuds, though.', 4, 'npc_kservant - WHISP18'),
+(-1000325, 'Such is their animosity that they vie for the honor of being sent to assist the naaru there. Each day, that decision is made here by A\'dal. The armies gather here to receive A\'dal\'s blessing before heading to Shadowmoon.', 4, 'npc_kservant - WHISP19'),
+(-1000326, 'Khadgar should be ready to see you again. Just remember that to serve the Sha\'tar you will most likely have to ally with the Aldor or the Scryers. And seeking the favor of one group will cause the others\' dislike.', 4, 'npc_kservant - WHISP20'),
+(-1000327, 'Good luck stranger, and welcome to Shattrath City.', 4, 'npc_kservant - WHISP21'),
+
+
+(-1000328, 'Time to teach you a lesson in manners, little boy!', 0, ''),
+(-1000329, 'Now I\'m gonna give you to the count of \'3\' to get out of here before I sick the dogs on you.', 0, ''),
+(-1000330, '1...', 0, ''),
+(-1000331, '2...', 0, ''),
+(-1000332, 'Time to meet your maker!', 0, ''),
+(-1000333, 'Alright, we give up! Don\'t hurt us!', 0, '');
+
+DELETE FROM script_texts WHERE entry=-1000334;
+INSERT INTO script_texts (entry, content_default, type, language, comment) VALUES
+(-1000334, 'Thank you, dear Paladin, you just saved my life.', 0, 10, 'stillblade - SAY_HEAL');
+
+DELETE FROM script_texts WHERE entry BETWEEN -1000349 and -1000335;
+INSERT INTO script_texts (entry, content_default, type, comment) VALUES
+(-1000335, 'Let\'s get to the others, and keep an eye open for those wolves cutside...', 0, 'npc_deathstalker_erland
+- SAY_QUESTACCEPT'),
+(-1000336, 'Be careful, $N. Those wolves like to hide among the trees.', 0, 'npc_deathstalker_erland - SAY_START'),
+(-1000337, 'A $C attacks!', 0, 'npc_deathstalker_erland - SAY_AGGRO_1'),
+(-1000338, 'Beware! I am under attack!', 0, 'npc_deathstalker_erland - SAY_AGGRO_2'),
+(-1000339, 'We\'re almost there!', 0, 'npc_deathstalker_erland - SAY_LAST'),
+(-1000340, 'We made it! Thanks, $N. I couldn\'t have gotten without you.', 0, 'npc_deathstalker_erland -
+SAY_THANKS'),
+(-1000341, 'It\'s good to see you again, Erland. What is your report?', 0, 'npc_deathstalker_erland - SAY_RANE'),
+(-1000342, 'Masses of wolves are to the east, and whoever lived at Malden\'s Orchard is gone.', 0,
+'npc_deathstalker_erland - SAY_ANSWER'),
+(-1000343, 'If I am excused, then I\'d like to check on Quinn...', 0, 'npc_deathstalker_erland - SAY_MOVE_QUINN'),
+(-1000344, 'Hello, Quinn. How are you faring?', 0, 'npc_deathstalker_erland - SAY_GREETINGS'),
+(-1000345, 'I\'ve been better. Ivar the Foul got the better of me...', 0, 'npc_deathstalker_erland - SAY_QUINN'),
+(-1000346, 'Try to take better care of yourself, Quinn. You were lucky this time.', 0, 'npc_deathstalker_erland -
+SAY_ON_BYE'),
+
+(-1000347, 'Let\'s go before they find out I\'m free!', 0, 'npc_kaya_flathoof - SAY_START'),
+(-1000348, 'Look out! We\'re under attack!', 0, 'npc_kaya_flathoof - SAY_AMBUSH'),
+(-1000349, 'Thank you for helping me. I know my way back from here.', 0, 'npc_kaya_flathoof - SAY_END'); \ No newline at end of file
diff --git a/sql/updates/956_world_scripts.sql b/sql/updates/956_world_scripts.sql
new file mode 100644
index 00000000000..35859f191b5
--- /dev/null
+++ b/sql/updates/956_world_scripts.sql
@@ -0,0 +1,26 @@
+DELETE FROM script_texts WHERE entry BETWEEN -1000365 and -1000350;
+INSERT INTO script_texts (entry, content_default, type, comment) VALUES
+(-1000350, 'Who dares awaken Aquementas?', 1, 'mob_aquementas - AGGRO_YELL_AQUE'),
+
+(-1000351, 'I give up! Please don\'t kill me!', 0, 'mob_unkor_the_ruthless - SAY_SUBMIT'),
+
+(-1000352, 'I choose the third option: KILLING YOU!', 0, 'npc_floon - SAY_FLOON_ATTACK'),
+
+(-1000353, 'Ok let\'s get out of here!', 0, 'npc_isla_starmane - SAY_PROGRESS_1'),
+(-1000354, 'You sure you\'re ready? Take a moment.', 0, 'npc_isla_starmane - SAY_PROGRESS_2'),
+(-1000355, 'Alright, let\'s do this!', 0, 'npc_isla_starmane - SAY_PROGRESS_3'),
+(-1000356, 'Ok, I think I can make it on my own from here. Thank you so much for breaking me out of there!', 0,
+
+'npc_isla_starmane - SAY_PROGRESS_4'),
+
+(-1000357, 'Belore...', 0, 'npc_lady_sylvanas_windrunner - SAY_LAMENT_END'),
+(-1000358, 'kneels down and pick up the amulet.', 2, 'npc_lady_sylvanas_windrunner - EMOTE_LAMENT_END'),
+
+(-1000359, 'You have my blessing', 0, 'npcs_ashyen_and_keleth - GOSSIP_REWARD_BLESS'),
+
+(-1000360, 'Is the way clear? Let\'s get out while we can, $N.', 0, 'npc_kayra_longmane - SAY_PROGRESS_1'),
+(-1000361, 'Looks like we won\'t get away so easy. Get ready!', 0, 'npc_kayra_longmane - SAY_PROGRESS_2'),
+(-1000362, 'Let\'s keep moving. We\'re not safe here!', 0, 'npc_kayra_longmane - SAY_PROGRESS_3'),
+(-1000363, 'Look out, $N! Enemies ahead!', 0, 'npc_kayra_longmane - SAY_PROGRESS_4'),
+(-1000364, 'We\'re almost to the refuge! Let\'s go.', 0, 'npc_kayra_longmane - SAY_PROGRESS_5'),
+(-1000365, 'I can see my fellow druids from here. Thank you, $N. I\'m sure Ysiel will reward you for your actions!', 0, 'npc_kayra_longmane - SAY_PROGRESS_6'); \ No newline at end of file
diff --git a/sql/updates/957_world_scripts.sql b/sql/updates/957_world_scripts.sql
new file mode 100644
index 00000000000..8cae6b3fe87
--- /dev/null
+++ b/sql/updates/957_world_scripts.sql
@@ -0,0 +1,36 @@
+-- Liquid Fire
+UPDATE `gameobject_template` SET `data2`='5',`data11`='1' WHERE `entry` IN ('180125','182533');
+
+-- Scripts & Stats
+UPDATE `creature_template` SET `ScriptName`='boss_vazruden_the_herald' WHERE `entry` = '17307';
+UPDATE `creature_template` SET `ScriptName`='boss_vazruden',`heroic_entry`='18434' WHERE `entry` = '17537';
+UPDATE `creature_template` SET `ScriptName`='boss_nazan' WHERE `entry` = '17536';
+UPDATE `creature_template` SET `ScriptName`='mob_hellfire_sentry' WHERE `entry` = '17517';
+UPDATE `creature_template` SET `equipment_id`='2183',`mechanic_immune_mask`='805306367' WHERE `entry` = '18434';
+
+-- Reinforced Fel Iron Chest
+DELETE FROM `gameobject` WHERE `id` IN ('185168','185169');
+
+-- Script Texts
+DELETE FROM `script_texts` WHERE `entry` BETWEEN '-1543025' AND '-1543017';
+INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES
+('-1543017','You have faced many challenges, pity they were all in vain. Soon your people will kneel to my lord!',10292,1,0,'vazruden SAY_INTRO'),
+('-1543018','Is there no one left to test me?',10293,1,0,'vazruden SAY_WIPE'),
+('-1543019','Your time is running out!',10294,1,0,'vazruden SAY_AGGRO_1'),
+('-1543020','You are nothing, I answer a higher call!',10295,1,0,'vazruden SAY_AGGRO_2'),
+('-1543021','The Dark Lord laughs at you!',10296,1,0,'vazruden SAY_AGGRO_3'),
+('-1543022','It is over. Finished!',10297,1,0,'vazruden SAY_KILL_1'),
+('-1543023','Your days are done!',10298,1,0,'vazruden SAY_KILL_2'),
+('-1543024','My lord will be the end you all...',10299,1,0,'vazruden SAY_DIE'),
+('-1543025','descends from the sky',0,3,0,'vazruden EMOTE');
+
+-- Waypoint Movement
+DELETE FROM `waypoint_data` WHERE `id` = '2081';
+INSERT INTO `waypoint_data`(`id`,`point`,`position_x`,`position_y`,`position_z`) VALUES
+('2081','1','-1412.2','1784','112'),
+('2081','2','-1447.9','1760.9','112'),
+('2081','3','-1454.2','1729.3','112'),
+('2081','4','-1430','1705','112'),
+('2081','5','-1393.5','1705.5','112'),
+('2081','6','-1369.8','1724.5','112'),
+('2081','7','-1377','1760','112');
diff --git a/sql/updates/CMakeLists.txt b/sql/updates/CMakeLists.txt
index dc983f8c14d..05287e091be 100644
--- a/sql/updates/CMakeLists.txt
+++ b/sql/updates/CMakeLists.txt
@@ -124,7 +124,6 @@ INSTALL(FILES
817_world_scripts.sql
822_world_scripts.sql
826_world_scripts.sql
-832_characters.sql
833_world_scripts.sql
834_world_scripts.sql
837_world_scripts.sql
@@ -142,4 +141,20 @@ INSTALL(FILES
905_world_scripts.sql
917_world.sql
919_world.sql
+927_characters.sql
+930_characters.sql
+933_world_scripts.sql
+935_world_scripts.sql
+940_world_scripts.sql
+945_world_scripts.sql
+947_world_scripts.sql
+948_world_scripts.sql
+950_world_scripts.sql
+951_world_scripts.sql
+952_world_scripts.sql
+953_world_scripts.sql
+954_world_scripts.sql
+955_world_scripts.sql
+956_world_scripts.sql
+957_world_scripts.sql
DESTINATION share/trinity/sql/updates)
diff --git a/src/bindings/scripts/CMakeLists.txt b/src/bindings/scripts/CMakeLists.txt
index 1995d80e9f6..5193297610d 100644
--- a/src/bindings/scripts/CMakeLists.txt
+++ b/src/bindings/scripts/CMakeLists.txt
@@ -157,8 +157,11 @@ SET(trinityscript_LIB_SRCS
scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp
scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp
+ scripts/zone/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp
+ scripts/zone/hellfire_citadel/blood_furnace/def_blood_furnace.h
scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp
scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp
+ scripts/zone/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp
scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp
scripts/zone/hellfire_citadel/magtheridons_lair/def_magtheridons_lair.h
scripts/zone/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp
@@ -377,6 +380,8 @@ SET(trinityscript_LIB_SRCS
add_library(trinityscript SHARED ${trinityscript_LIB_SRCS})
+add_definitions(-D_TRINITY_SCRIPT_CONFIG='"${CONF_DIR}/trinitycore.conf"')
+
target_link_libraries(trinityscript)
set_target_properties(trinityscript PROPERTIES VERSION 4.2.0 SOVERSION 4)
diff --git a/src/bindings/scripts/Makefile.am b/src/bindings/scripts/Makefile.am
index e5eb629a84d..564fa1c16b2 100644
--- a/src/bindings/scripts/Makefile.am
+++ b/src/bindings/scripts/Makefile.am
@@ -191,6 +191,8 @@ scripts/zone/gruuls_lair/instance_gruuls_lair.cpp \
scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp \
scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp \
scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp \
+scripts/zone/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp \
+scripts/zone/hellfire_citadel/blood_furnace/def_blood_furnace.h \
scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp \
scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp \
scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp \
diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp
index cbfda734989..2108015d327 100644
--- a/src/bindings/scripts/ScriptMgr.cpp
+++ b/src/bindings/scripts/ScriptMgr.cpp
@@ -299,6 +299,7 @@ extern void AddSC_instance_gruuls_lair();
extern void AddSC_boss_broggok();
extern void AddSC_boss_kelidan_the_breaker();
extern void AddSC_boss_the_maker();
+extern void AddSC_instance_blood_furnace();
//--Magtheridon's Lair
extern void AddSC_boss_magtheridon();
@@ -313,6 +314,7 @@ extern void AddSC_instance_shattered_halls();
//--Ramparts
extern void AddSC_boss_watchkeeper_gargolmar();
extern void AddSC_boss_omor_the_unscarred();
+extern void AddSC_boss_vazruden_the_herald();
//Hellfire Peninsula
extern void AddSC_boss_doomlordkazzak();
@@ -1503,6 +1505,7 @@ void ScriptsInit()
AddSC_boss_broggok();
AddSC_boss_kelidan_the_breaker();
AddSC_boss_the_maker();
+ AddSC_instance_blood_furnace();
//--Magtheridon's Lair
AddSC_boss_magtheridon();
@@ -1517,6 +1520,7 @@ void ScriptsInit()
//--Ramparts
AddSC_boss_watchkeeper_gargolmar();
AddSC_boss_omor_the_unscarred();
+ AddSC_boss_vazruden_the_herald();
//Hellfire Peninsula
AddSC_boss_doomlordkazzak();
diff --git a/src/bindings/scripts/VC71/71ScriptDev2.vcproj b/src/bindings/scripts/VC71/71ScriptDev2.vcproj
index a6e625e9c30..3c5a2c0fa46 100644
--- a/src/bindings/scripts/VC71/71ScriptDev2.vcproj
+++ b/src/bindings/scripts/VC71/71ScriptDev2.vcproj
@@ -1431,6 +1431,14 @@
RelativePath="..\scripts\zone\hellfire_citadel\blood_furnace\boss_the_maker.cpp"
>
</File>
+ <File
+ RelativePath="..\scripts\zone\hellfire_citadel\blood_furnace\def_blood_furnace.h"
+ >
+ </File>
+ <File
+ RelativePath="..\scripts\zone\hellfire_citadel\blood_furnace\instance_blood_furnace.cpp"
+ >
+ </File>
</Filter>
<Filter
Name="Magtheridon&apos;s lair"
@@ -1459,6 +1467,10 @@
RelativePath="..\scripts\zone\hellfire_citadel\hellfire_ramparts\boss_watchkeeper_gargolmar.cpp"
>
</File>
+ <File
+ RelativePath="..\scripts\zone\hellfire_citadel\hellfire_ramparts\boss_vazruden_the_herald.cpp"
+ >
+ </File>
</Filter>
<Filter
Name="Shattered Halls"
diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj
index 540a6d0fa30..39a817899d0 100644
--- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj
+++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj
@@ -1693,6 +1693,14 @@
RelativePath="..\scripts\zone\hellfire_citadel\blood_furnace\boss_the_maker.cpp"
>
</File>
+ <File
+ RelativePath="..\scripts\zone\hellfire_citadel\blood_furnace\def_blood_furnace.h"
+ >
+ </File>
+ <File
+ RelativePath="..\scripts\zone\hellfire_citadel\blood_furnace\instance_blood_furnace.cpp"
+ >
+ </File>
</Filter>
<Filter
Name="Magtheridon&apos;s lair"
@@ -1721,6 +1729,10 @@
RelativePath="..\scripts\zone\hellfire_citadel\hellfire_ramparts\boss_watchkeeper_gargolmar.cpp"
>
</File>
+ <File
+ RelativePath="..\scripts\zone\hellfire_citadel\hellfire_ramparts\boss_vazruden_the_herald.cpp"
+ >
+ </File>
</Filter>
<Filter
Name="Shattered Halls"
diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj
index d8cda32f0e8..49668b76f48 100644
--- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj
+++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj
@@ -1713,6 +1713,14 @@
RelativePath="..\scripts\zone\hellfire_citadel\blood_furnace\boss_the_maker.cpp"
>
</File>
+ <File
+ RelativePath="..\scripts\zone\hellfire_citadel\blood_furnace\def_blood_furnace.h"
+ >
+ </File>
+ <File
+ RelativePath="..\scripts\zone\hellfire_citadel\blood_furnace\instance_blood_furnace.cpp"
+ >
+ </File>
</Filter>
<Filter
Name="Magtheridon&apos;s lair"
@@ -1738,6 +1746,10 @@
>
</File>
<File
+ RelativePath="..\scripts\zone\hellfire_citadel\hellfire_ramparts\boss_vazruden_the_herald.cpp"
+ >
+ </File>
+ <File
RelativePath="..\scripts\zone\hellfire_citadel\hellfire_ramparts\boss_watchkeeper_gargolmar.cpp"
>
</File>
diff --git a/src/bindings/scripts/scripts/item/item_scripts.cpp b/src/bindings/scripts/scripts/item/item_scripts.cpp
index 9d1c35f1781..ba92a4adcd7 100644
--- a/src/bindings/scripts/scripts/item/item_scripts.cpp
+++ b/src/bindings/scripts/scripts/item/item_scripts.cpp
@@ -104,7 +104,8 @@ bool ItemUse_item_only_for_flight(Player *player, Item* _Item, SpellCastTargets
bool ItemUse_item_attuned_crystal_cores(Player *player, Item* _Item, SpellCastTargets const& targets)
{
if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
- targets.getUnitTarget()->GetEntry() == 24972 && targets.getUnitTarget()->isDead() )
+ targets.getUnitTarget()->GetEntry() == 24972 && targets.getUnitTarget()->isDead() &&
+ (player->GetQuestStatus(11524) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(11525) == QUEST_STATUS_INCOMPLETE) )
{
((Creature*)targets.getUnitTarget())->RemoveCorpse();
return false;
diff --git a/src/bindings/scripts/scripts/npc/npcs_special.cpp b/src/bindings/scripts/scripts/npc/npcs_special.cpp
index e67fa031d42..eaa841fe59d 100644
--- a/src/bindings/scripts/scripts/npc/npcs_special.cpp
+++ b/src/bindings/scripts/scripts/npc/npcs_special.cpp
@@ -31,6 +31,7 @@ npc_doctor 100% Gustaf Vanhowzen and Gregory Victor, quest 6622
npc_mount_vendor 100% Regular mount vendors all over the world. Display gossip if player doesn't meet the requirements to buy
npc_rogue_trainer 80% Scripted trainers, so they are able to offer item 17126 for class quest 6681
npc_sayge 100% Darkmoon event fortune teller, buff player based on answers given
+npc_snake_trap_serpents 80% AI for snakes that summoned by Snake Trap
EndContentData */
#include "precompiled.h"
@@ -272,7 +273,7 @@ static Location HordeCoords[]=
{ // Left, front
-1017.25, -3500.85, 62.98, 4.34
},
- { // Right, Front
+ { // Right, Front
-1020.95, -3499.21, 62.98, 4.34
}
};
@@ -993,6 +994,142 @@ bool ReceiveEmote_npc_brewfest_reveler( Player *player, Creature *_Creature, uin
return true;
}
+/*####
+## npc_snake_trap_serpents
+####*/
+
+#define SPELL_MIND_NUMBING_POISON 8692 //Viper
+#define SPELL_DEADLY_POISON 34655 //Venomous Snake
+#define SPELL_CRIPPLING_POISON 3409 //Viper
+
+#define VENOMOUS_SNAKE_TIMER 1200
+#define VIPER_TIMER 3000
+
+#define C_VIPER 19921
+
+#define RAND 5
+
+struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
+{
+ npc_snake_trap_serpentsAI(Creature *c) : ScriptedAI(c) {Reset();}
+
+ uint32 SpellTimer;
+ Unit *Owner;
+ bool IsViper;
+
+ void Aggro(Unit *who) {}
+
+ void Reset()
+ {
+ Owner = m_creature->GetOwner();
+
+ if (!m_creature->isPet() || !Owner)
+ return;
+
+ CreatureInfo const *Info = m_creature->GetCreatureInfo();
+
+ if(Info->Entry == C_VIPER)
+ IsViper = true;
+
+ //We have to reload the states from db for summoned guardians
+ m_creature->SetMaxHealth(Info->maxhealth);
+ m_creature->SetHealth(Info->maxhealth);
+ m_creature->SetStatFloatValue(UNIT_FIELD_MINDAMAGE, Info->mindmg);
+ m_creature->SetStatFloatValue(UNIT_FIELD_MAXDAMAGE, Info->maxdmg);
+
+ //Add delta to make them not all hit the same time
+ uint32 delta = (rand() % 7) *100;
+ m_creature->SetStatFloatValue(UNIT_FIELD_BASEATTACKTIME, Info->baseattacktime + delta);
+ m_creature->SetStatFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER , Info->attackpower);
+
+ InCombat = false;
+
+ }
+
+ //Redefined for random target selection:
+ void MoveInLineOfSight(Unit *who)
+ {
+ if (!m_creature->isPet() || !Owner)
+ return;
+
+ if( !m_creature->getVictim() && who->isTargetableForAttack() && ( m_creature->IsHostileTo( who )) && who->isInAccessiblePlaceFor(m_creature) && Owner->IsHostileTo(who))//don't attack not-pvp-flaged
+ {
+ if (m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
+ return;
+
+ float attackRadius = m_creature->GetAttackDistance(who);
+ if( m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who) )
+ {
+ if (!(rand() % RAND) )
+ {
+ m_creature->setAttackTimer(BASE_ATTACK, (rand() % 10) * 100);
+ SpellTimer = (rand() % 10) * 100;
+ AttackStart(who);
+ InCombat = true;
+ }
+ }
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!m_creature->isPet() || !Owner)
+ return;
+
+ //Follow if not in combat
+ if (!m_creature->hasUnitState(UNIT_STAT_FOLLOW)&& !InCombat)
+ {
+ m_creature->GetMotionMaster()->Clear();
+ m_creature->GetMotionMaster()->MoveFollow(Owner,PET_FOLLOW_DIST,PET_FOLLOW_ANGLE);
+ }
+
+ //No victim -> get new from owner (need this because MoveInLineOfSight won't work while following -> corebug)
+ if (!m_creature->getVictim())
+ {
+ if (InCombat)
+ DoStopAttack();
+
+ InCombat = false;
+
+ if(Owner->getAttackerForHelper())
+ AttackStart(Owner->getAttackerForHelper());
+
+ return;
+ }
+
+ if (SpellTimer < diff)
+ {
+ if (IsViper) //Viper
+ {
+ if (rand() % 3 == 0) //33% chance to cast
+ {
+ uint32 spell;
+ if( rand() % 2 == 0)
+ spell = SPELL_MIND_NUMBING_POISON;
+ else
+ spell = SPELL_CRIPPLING_POISON;
+
+ DoCast(m_creature->getVictim(),spell);
+ }
+
+ SpellTimer = VIPER_TIMER;
+ }
+ else //Venomous Snake
+ {
+ if (rand() % 10 < 8) //80% chance to cast
+ DoCast(m_creature->getVictim(),SPELL_DEADLY_POISON);
+ SpellTimer = VENOMOUS_SNAKE_TIMER + (rand() %5)*100;
+ }
+ }else SpellTimer-=diff;
+ DoMeleeAttackIfReady();
+ }
+};
+
+CreatureAI* GetAI_npc_snake_trap_serpents(Creature *_Creature)
+{
+ return new npc_snake_trap_serpentsAI(_Creature);
+}
+
void AddSC_npcs_special()
{
Script *newscript;
@@ -1064,4 +1201,9 @@ void AddSC_npcs_special()
newscript->Name="npc_brewfest_reveler";
newscript->pReceiveEmote = &ReceiveEmote_npc_brewfest_reveler;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="npc_snake_trap_serpents";
+ newscript->GetAI = &GetAI_npc_snake_trap_serpents;
+ newscript->RegisterSelf();
}
diff --git a/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp b/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp
index 7aff80c0d02..ad03e9e8987 100644
--- a/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp
+++ b/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp
@@ -32,16 +32,16 @@ EndContentData */
## npc_professor_phizzlethorpe
######*/
-#define SAY_PROGRESS_1 "Ok, $N. Follow me to the cave where I'll attempt to harness the power of the rune stone into these goggles."
-#define SAY_PROGRESS_2 "I discovered this cave on our first day here. I believe the energy in the stone can be used to our advantage."
-#define SAY_PROGRESS_3 "I'll begin drawing energy from the stone. Your job, $N, is to defend me. This place is cursed... trust me."
-#define EMOTE_PROGRESS_4 "begins tinkering with the goggles before the stone."
-#define SAY_AGGRO "Help!!! Get these things off me so I can get my work done!"
-#define SAY_PROGRESS_5 "Almost done! Just a little longer!"
-#define SAY_PROGRESS_6 "I've done it! I have harnessed the power of the stone into the goggles! Let's get out of here!"
-#define SAY_PROGRESS_7 "Phew! Glad to be back from that creepy cave."
-#define EMOTE_PROGRESS_8 "hands one glowing goggles over to Doctor Draxlegauge."
-#define SAY_PROGRESS_9 "Doctor Draxlegauge will give you further instructions, $N. Many thanks for your help!"
+#define SAY_PROGRESS_1 -1000235
+#define SAY_PROGRESS_2 -1000236
+#define SAY_PROGRESS_3 -1000237
+#define EMOTE_PROGRESS_4 -1000238
+#define SAY_AGGRO -1000239
+#define SAY_PROGRESS_5 -1000240
+#define SAY_PROGRESS_6 -1000241
+#define SAY_PROGRESS_7 -1000242
+#define EMOTE_PROGRESS_8 -1000243
+#define SAY_PROGRESS_9 -1000244
#define QUEST_SUNKEN_TREASURE 665
#define MOB_VENGEFUL_SURGE 2776
@@ -50,29 +50,32 @@ struct TRINITY_DLL_DECL npc_professor_phizzlethorpeAI : public npc_escortAI
{
npc_professor_phizzlethorpeAI(Creature *c) : npc_escortAI(c) {Reset();}
+ bool Completed;
+
void WaypointReached(uint32 i)
{
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
switch(i)
{
- case 4:DoSay(SAY_PROGRESS_2, LANG_UNIVERSAL, player, true);break;
- case 5:DoSay(SAY_PROGRESS_3, LANG_UNIVERSAL, player, true);break;
- case 8:DoTextEmote(EMOTE_PROGRESS_4, NULL);break;
+ case 4:DoScriptText(SAY_PROGRESS_2, m_creature, player);break;
+ case 5:DoScriptText(SAY_PROGRESS_3, m_creature, player);break;
+ case 8:DoScriptText(EMOTE_PROGRESS_4, m_creature);break;
case 9:
{
m_creature->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96, -2142.49, 20.15, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
m_creature->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96, -2142.49, 20.15, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
break;
}
- case 10:DoSay(SAY_PROGRESS_5, LANG_UNIVERSAL, player, true);break;
- case 11:DoSay(SAY_PROGRESS_6, LANG_UNIVERSAL, player, true);break;
- case 19:DoSay(SAY_PROGRESS_7, LANG_UNIVERSAL, player, true); break;
+ case 10:DoScriptText(SAY_PROGRESS_5, m_creature, player);break;
+ case 11:DoScriptText(SAY_PROGRESS_6, m_creature, player);break;
+ case 19:DoScriptText(SAY_PROGRESS_7, m_creature, player); break;
case 20:
- DoTextEmote(EMOTE_PROGRESS_8, NULL);
- DoSay(SAY_PROGRESS_9, LANG_UNIVERSAL, player, true);
+ DoScriptText(EMOTE_PROGRESS_8, m_creature);
+ DoScriptText(SAY_PROGRESS_9, m_creature, player);
+ Completed = true;
if(player)
- ((Player*)player)->GroupEventHappens(QUEST_SUNKEN_TREASURE, m_creature);
+ ((Player*)player)->GroupEventHappens(QUEST_SUNKEN_TREASURE, m_creature);
break;
}
}
@@ -82,16 +85,20 @@ struct TRINITY_DLL_DECL npc_professor_phizzlethorpeAI : public npc_escortAI
summoned->AI()->AttackStart(m_creature);
}
- void Reset(){}
+ void Reset()
+ {
+ Completed = true;
+ m_creature->setFaction(35);
+ }
void Aggro(Unit* who)
{
- DoSay(SAY_AGGRO, LANG_UNIVERSAL, NULL);
+ DoScriptText(SAY_AGGRO, m_creature, NULL);
}
void JustDied(Unit* killer)
{
- if (PlayerGUID)
+ if (PlayerGUID && !Completed )
{
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
if (player)
@@ -109,7 +116,7 @@ bool QuestAccept_npc_professor_phizzlethorpe(Player* player, Creature* creature,
{
if (quest->GetQuestId() == QUEST_SUNKEN_TREASURE)
{
- creature->Say(SAY_PROGRESS_1, LANG_UNIVERSAL, player->GetGUID());
+ DoScriptText(SAY_PROGRESS_1, creature, player);
((npc_escortAI*)(creature->AI()))->Start(false, false, false, player->GetGUID());
creature->setFaction(113);
}
diff --git a/src/bindings/scripts/scripts/zone/azshara/azshara.cpp b/src/bindings/scripts/scripts/zone/azshara/azshara.cpp
index 972bb2b81d5..262754a0f92 100644
--- a/src/bindings/scripts/scripts/zone/azshara/azshara.cpp
+++ b/src/bindings/scripts/scripts/zone/azshara/azshara.cpp
@@ -154,6 +154,7 @@ bool GossipSelect_npc_loramus_thalipedes(Player *player, Creature *_Creature, ui
/*####
# mob_rizzle_sprysprocket
####*/
+
#define MOB_DEPTH_CHARGE 23025
#define SPELL_RIZZLE_BLACKJACK 39865
#define SPELL_RIZZLE_ESCAPE 39871
@@ -162,9 +163,12 @@ bool GossipSelect_npc_loramus_thalipedes(Player *player, Creature *_Creature, ui
#define SPELL_PERIODIC_DEPTH_CHARGE 39912
#define SPELL_GIVE_SOUTHFURY_MOONSTONE 39886
-#define SAY_RIZZLE_START "You, there! Hand over that moonstone and nobody gets hurt!"
-#define SAY_RIZZLE_GRENADE "Just chill!"
-#define SAY_RIZZLE_FINAL "All right, you win! I surrender! Just don't hurt me!"
+#define SAY_RIZZLE_START -1000245
+#define SAY_RIZZLE_GRENADE -1000246
+#define SAY_RIZZLE_FINAL -1000247
+
+#define GOSSIP_GET_MOONSTONE "Hand over the Southfury moonstone and I'll let you go."
+
//next message must be send to player when Rizzle jump into river, not implemented
#define MSG_ESCAPE_NOTICE "Rizzle Sprysprocket takes the Southfury moonstone and escapes into the river. Follow her!"
@@ -231,7 +235,6 @@ float WPs[58][4] =
{1873.57, -3695.32, 33.9118, 3.44}
};
-
struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
{
mob_rizzle_sprysprocketAI(Creature *c) : ScriptedAI(c) {Reset();}
@@ -327,7 +330,7 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
Player *player = (Player *)Unit::GetUnit((*m_creature), PlayerGUID);
if(player)
{
- DoWhisper(SAY_RIZZLE_GRENADE, player);
+ DoScriptText(SAY_RIZZLE_GRENADE, m_creature, player);
DoCast(player, SPELL_RIZZLE_FROST_GRENADE, true);
}
Grenade_Timer = 30000;
@@ -344,7 +347,7 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
float dist = m_creature->GetDistance(player);
if(dist < 10 && m_creature->GetPositionX() > player->GetPositionX() && !Reached)
{
- DoYell(SAY_RIZZLE_FINAL, LANG_UNIVERSAL, NULL);
+ DoScriptText(SAY_RIZZLE_FINAL, m_creature);
m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 1);
m_creature->setFaction(35);
m_creature->StopMoving();
@@ -375,7 +378,7 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
if(who->GetTypeId() == TYPEID_PLAYER && ((Player *)who)->GetQuestStatus(10994) == QUEST_STATUS_INCOMPLETE)
{
PlayerGUID = who->GetGUID();
- DoYell(SAY_RIZZLE_START, LANG_UNIVERSAL, NULL);
+ DoScriptText(SAY_RIZZLE_START, m_creature);
DoCast(who, SPELL_RIZZLE_BLACKJACK, false);
return;
}
@@ -394,7 +397,7 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
return;
}
- CurrWP++;
+ ++CurrWP;
ContinueWP = true;
}
@@ -404,7 +407,7 @@ bool GossipHello_mob_rizzle_sprysprocket(Player *player, Creature *_Creature)
{
if(player->GetQuestStatus(10994) != QUEST_STATUS_INCOMPLETE)
return true;
- player->ADD_GOSSIP_ITEM( 0, "Hand over the Southfury moonstone and I'll let you go.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_GET_MOONSTONE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(10811,_Creature->GetGUID());
return true;
}
diff --git a/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp b/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp
index 8e94e1adc18..569e2ae8bc5 100644
--- a/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp
+++ b/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp
@@ -39,15 +39,15 @@ EndContentData */
## npc_draenei_survivor
######*/
-#define HEAL1 "The last thing I remember is the ship falling and us getting into the pods. I'll go see how I can help. Thank you!"
-#define HEAL2 "$C, Where am I? Who are you? Oh no! What happened to the ship?."
-#define HEAL3 "$C You saved me! I owe you a debt that I can never repay. I'll go see if I can help the others."
-#define HEAL4 "Ugh... what is this place? Is that all that's left of the ship over there?"
+#define HEAL1 -1000248
+#define HEAL2 -1000249
+#define HEAL3 -1000250
+#define HEAL4 -1000251
-#define HELP1 "Oh, the pain..."
-#define HELP2 "Everything hurts, Please make it stop..."
-#define HELP3 "Ughhh... I hurt. Can you help me?"
-#define HELP4 "I don't know if I can make it, please help me..."
+#define HELP1 -1000252
+#define HELP2 -1000253
+#define HELP3 -1000254
+#define HELP4 -1000255
struct TRINITY_DLL_DECL npc_draenei_survivorAI : public ScriptedAI
{
@@ -94,22 +94,22 @@ struct TRINITY_DLL_DECL npc_draenei_survivorAI : public ScriptedAI
switch (rand()%4) //Random switch between 4 texts
{
case 0:
- DoSay(HELP1, LANG_UNIVERSAL, NULL);
+ DoScriptText(HELP1, m_creature);
SayingTimer = 15000;
say = false;
break;
case 1:
- DoSay(HELP2, LANG_UNIVERSAL, NULL);
+ DoScriptText(HELP2, m_creature);
SayingTimer = 15000;
say = false;
break;
case 2:
- DoSay(HELP3, LANG_UNIVERSAL, NULL);
+ DoScriptText(HELP3, m_creature);
SayingTimer = 15000;
say = false;
break;
case 3:
- DoSay(HELP4, LANG_UNIVERSAL, NULL);
+ DoScriptText(HELP4, m_creature);
SayingTimer = 15000;
say = false;
break;
@@ -181,10 +181,10 @@ struct TRINITY_DLL_DECL npc_draenei_survivorAI : public ScriptedAI
m_creature->HandleEmoteCommand(ANIM_RISE);
switch (rand()%4) //This switch doesn't work at all, creature say nothing!
{
- case 0: DoSay(HEAL1, LANG_UNIVERSAL, Hitter); break;
- case 1: DoSay(HEAL2, LANG_UNIVERSAL, Hitter); break;
- case 2: DoSay(HEAL3, LANG_UNIVERSAL, Hitter); break;
- case 3: DoSay(HEAL4, LANG_UNIVERSAL, Hitter); break;
+ case 0: DoScriptText(HEAL1, m_creature, Hitter); break;
+ case 1: DoScriptText(HEAL2, m_creature, Hitter); break;
+ case 2: DoScriptText(HEAL3, m_creature, Hitter); break;
+ case 3: DoScriptText(HEAL4, m_creature, Hitter); break;
}
HealSay = true;
}
@@ -199,10 +199,12 @@ CreatureAI* GetAI_npc_draenei_survivor(Creature *_Creature)
## npc_engineer_spark_overgrind
######*/
-#define SAY_TEXT "Yes Master, all goes along as planned."
-#define SAY_EMOTE "puts the shell to his ear."
+#define SAY_TEXT -1000256
+#define SAY_EMOTE -1000257
+#define ATTACK_YELL -1000258
+
#define GOSSIP_FIGHT "Traitor! You will be brought to justice!"
-#define ATTACK_YELL "Now I cut you!"
+
#define SPELL_DYNAMITE 7978
struct TRINITY_DLL_DECL npc_engineer_spark_overgrindAI : public ScriptedAI
@@ -227,8 +229,8 @@ struct TRINITY_DLL_DECL npc_engineer_spark_overgrindAI : public ScriptedAI
{
if (Emote_Timer < diff)
{
- DoSay(SAY_TEXT,LANG_UNIVERSAL,NULL);
- DoTextEmote(SAY_EMOTE,NULL);
+ DoScriptText(SAY_TEXT, m_creature);
+ DoScriptText(SAY_EMOTE, m_creature);
Emote_Timer = 120000 + rand()%30000;
}else Emote_Timer -= diff;
}
@@ -266,7 +268,7 @@ bool GossipSelect_npc_engineer_spark_overgrind(Player *player, Creature *_Creatu
{
player->CLOSE_GOSSIP_MENU();
_Creature->setFaction(14);
- _Creature->Yell(ATTACK_YELL, LANG_UNIVERSAL, player->GetGUID());
+ DoScriptText(ATTACK_YELL, _Creature, player);
((npc_engineer_spark_overgrindAI*)_Creature->AI())->AttackStart(player);
}
return true;
@@ -468,15 +470,16 @@ bool GossipSelect_npc_susurrus(Player *player, Creature *_Creature, uint32 sende
## npc_geezle
######*/
-#define GEEZLE_SAY_1 "What's the big idea, Spark?"
-#define SPARK_SAY_2 "What's the big idea? You nearly blew my cover, idiot! I told you to put the compass and navigation maps somewhere safe - not out in the open for any fool to discover."
-#define SPARK_SAY_3 "The Master has gone to great lengths to secure information about the whereabouts of the Exodar. You could have blown the entire operation, including the cover of our spy on the inside."
-#define GEEZLE_SAY_4 "Relax, Spark! I have it all under control. We'll strip mine the Exodar right out from under 'em - making both you and I very, very rich in the process."
-#define SPARK_SAY_5 "Relax? Do you know what Kael'thas does to those that fail him, Geezle? Eternal suffering and pain... Do NOT screw this up, fool."
-#define SPARK_SAY_6 "Our Bloodmyst scouts have located our contact. The fool, Velen, will soon leave himself open and defenseless -- long enough for us to strike! Now get out of my sight before I vaporize you..."
-#define GEEZLE_SAY_7 "Yes, sir. It won't happen again..."
+#define GEEZLE_SAY_1 -1000259
+#define SPARK_SAY_2 -1000260
+#define SPARK_SAY_3 -1000261
+#define GEEZLE_SAY_4 -1000262
+#define SPARK_SAY_5 -1000263
+#define SPARK_SAY_6 -1000264
+#define GEEZLE_SAY_7 -1000265
+
+#define EMOTE_SPARK -1000266
-#define EMOTE_SPARK "picks up the naga flag."
#define MOB_SPARK 17243
#define GO_NAGA_FLAG 181694
@@ -526,31 +529,19 @@ struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI
case 0: return 99999;
case 1:
//DespawnNagaFlag(true);
- ((Creature*)Spark)->TextEmote(EMOTE_SPARK, NULL, false);
+ DoScriptText(EMOTE_SPARK, Spark);
return 1000;
case 2:
- DoSay(GEEZLE_SAY_1, LANG_UNIVERSAL, Spark);
+ DoScriptText(GEEZLE_SAY_1, m_creature, Spark);
Spark->SetInFront(m_creature);
m_creature->SetInFront(Spark);
return 5000;
- case 3:
- ((Creature*)Spark)->Say(SPARK_SAY_2, LANG_UNIVERSAL, NULL);
- return 7000;
- case 4:
- ((Creature*)Spark)->Say(SPARK_SAY_3, LANG_UNIVERSAL, NULL);
- return 8000;
- case 5:
- DoSay(GEEZLE_SAY_4, LANG_UNIVERSAL, Spark);
- return 8000;
- case 6:
- ((Creature*)Spark)->Say(SPARK_SAY_5, LANG_UNIVERSAL, NULL);
- return 9000;
- case 7:
- ((Creature*)Spark)->Say(SPARK_SAY_6, LANG_UNIVERSAL, NULL);
- return 8000;
- case 8:
- DoSay(GEEZLE_SAY_7, LANG_UNIVERSAL, Spark);
- return 2000;
+ case 3: DoScriptText(SPARK_SAY_2, Spark); return 7000;
+ case 4: DoScriptText(SPARK_SAY_3, Spark); return 8000;
+ case 5: DoScriptText(GEEZLE_SAY_4, m_creature, Spark); return 8000;
+ case 6: DoScriptText(SPARK_SAY_5, Spark); return 9000;
+ case 7: DoScriptText(SPARK_SAY_6, Spark); return 8000;
+ case 8: DoScriptText(GEEZLE_SAY_7, m_creature, Spark); return 2000;
case 9:
m_creature->GetMotionMaster()->MoveTargetedHome();
Spark->GetMotionMaster()->MovePoint(0, -5030.95, -11291.99, 7.97);
@@ -597,7 +588,7 @@ struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI
{
if(EventStarted)
{
- SayTimer = NextStep(Step++);
+ SayTimer = NextStep(++Step);
}
}else SayTimer -= diff;
}
diff --git a/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp b/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp
index 24f4d134464..d7049a3b0f4 100644
--- a/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp
+++ b/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp
@@ -24,7 +24,7 @@ EndScriptData */
/* ContentData
npc_beaten_corpse
npc_sputtervalve
-npc_taskmaster_fizzule remove hack when Trinity implement feature/detect spell kind to not aggro
+npc_taskmaster_fizzule
npc_twiggy_flathead
npc_wizzlecrank_shredder
EndContentData */
@@ -36,12 +36,14 @@ EndContentData */
## npc_beaten_corpse
######*/
+#define GOSSIP_CORPSE "Examine corpse in detail..."
+
bool GossipHello_npc_beaten_corpse(Player *player, Creature *_Creature)
{
if( player->GetQuestStatus(4921) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(4921) == QUEST_STATUS_COMPLETE)
- player->ADD_GOSSIP_ITEM(0,"Examine corpse in detail...",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_CORPSE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- player->SEND_GOSSIP_MENU(3557,_Creature->GetGUID());
+ player->SEND_GOSSIP_MENU(3557, _Creature->GetGUID());
return true;
}
@@ -49,7 +51,7 @@ bool GossipSelect_npc_beaten_corpse(Player *player, Creature *_Creature, uint32
{
if(action == GOSSIP_ACTION_INFO_DEF +1)
{
- player->SEND_GOSSIP_MENU(3558,_Creature->GetGUID());
+ player->SEND_GOSSIP_MENU(3558, _Creature->GetGUID());
player->KilledMonster( 10668,_Creature->GetGUID() );
}
return true;
@@ -59,15 +61,17 @@ bool GossipSelect_npc_beaten_corpse(Player *player, Creature *_Creature, uint32
## npc_sputtervalve
######*/
+#define GOSSIP_SPUTTERVALVE "Can you tell me about this shard?"
+
bool GossipHello_npc_sputtervalve(Player *player, Creature *_Creature)
{
if (_Creature->isQuestGiver())
player->PrepareQuestMenu( _Creature->GetGUID() );
if( player->GetQuestStatus(6981) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(0,"Can you tell me about this shard?",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_SPUTTERVALVE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
- player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(),_Creature->GetGUID());
+ player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
return true;
}
@@ -75,7 +79,7 @@ bool GossipSelect_npc_sputtervalve(Player *player, Creature *_Creature, uint32 s
{
if(action == GOSSIP_ACTION_INFO_DEF)
{
- player->SEND_GOSSIP_MENU(2013,_Creature->GetGUID());
+ player->SEND_GOSSIP_MENU(2013, _Creature->GetGUID());
player->AreaExploredOrEventHappens(6981);
}
return true;
@@ -85,7 +89,7 @@ bool GossipSelect_npc_sputtervalve(Player *player, Creature *_Creature, uint32 s
## npc_taskmaster_fizzule
######*/
-//#define FACTION_HOSTILE_F 430
+//#define FACTION_HOSTILE_F 430
#define FACTION_HOSTILE_F 16
#define FACTION_FRIENDLY_F 35
@@ -173,11 +177,11 @@ bool ReciveEmote_npc_taskmaster_fizzule(Player *player, Creature *_Creature, uin
#define BIG_WILL 6238
#define AFFRAY_CHALLENGER 6240
-#define SAY_BIG_WILL_READY "Ready when you are, warrior"
-#define SAY_TWIGGY_FLATHEAD_BEGIN "The Affray has begun, get ready to fight!"
-#define SAY_TWIGGY_FLATHEAD_FRAY "You! Enter the fray!"
-#define SAY_TWIGGY_FLATHEAD_DOWN "Challenger is down!"
-#define SAY_TWIGGY_FLATHEAD_OVER "The Affray is over"
+#define SAY_BIG_WILL_READY -1000267
+#define SAY_TWIGGY_FLATHEAD_BEGIN -1000268
+#define SAY_TWIGGY_FLATHEAD_FRAY -1000269
+#define SAY_TWIGGY_FLATHEAD_DOWN -1000270
+#define SAY_TWIGGY_FLATHEAD_OVER -1000271
float AffrayChallengerLoc[6][4]=
{
@@ -214,7 +218,8 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
Wave = 0;
PlayerGUID = 0;
- for(uint8 i = 0; i < 6; i++) {
+ for(uint8 i = 0; i < 6; ++i)
+ {
AffrayChallenger[i] = 0;
Challenger_down[i] = false;
}
@@ -249,14 +254,17 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
if(!pWarrior->isAlive() && pWarrior->GetQuestStatus(1719) == QUEST_STATUS_INCOMPLETE) {
EventInProgress = false;
- DoYell(SAY_TWIGGY_FLATHEAD_DOWN,LANG_UNIVERSAL,NULL);
+ DoScriptText(SAY_TWIGGY_FLATHEAD_DOWN, m_creature);
pWarrior->FailQuest(1719);
- for(uint8 i = 0; i < 6; i++) {
- if (AffrayChallenger[i]) {
+ for(uint8 i = 0; i < 6; ++i)
+ {
+ if (AffrayChallenger[i])
+ {
Creature* pCreature = (Creature*)Unit::GetUnit((*m_creature), AffrayChallenger[i]);
if(pCreature) {
- if(pCreature->isAlive()) {
+ if(pCreature->isAlive())
+ {
pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
pCreature->setDeathState(JUST_DIED);
@@ -267,7 +275,8 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
Challenger_down[i] = false;
}
- if (BigWill) {
+ if (BigWill)
+ {
Creature* pCreature = (Creature*)Unit::GetUnit((*m_creature), BigWill);
if(pCreature) {
if(pCreature->isAlive()) {
@@ -280,22 +289,24 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
BigWill = 0;
}
- if (!EventGrate && EventInProgress) {
+ if (!EventGrate && EventInProgress)
+ {
float x,y,z;
pWarrior->GetPosition(x, y, z);
if (x >= -1684 && x <= -1674 && y >= -4334 && y <= -4324) {
pWarrior->AreaExploredOrEventHappens(1719);
- DoYell(SAY_TWIGGY_FLATHEAD_BEGIN,LANG_UNIVERSAL,NULL);
+ DoScriptText(SAY_TWIGGY_FLATHEAD_BEGIN, m_creature);
- for(uint8 i = 0; i < 6; i++) {
+ for(uint8 i = 0; i < 6; ++i)
+ {
Creature* pCreature = m_creature->SummonCreature(AFFRAY_CHALLENGER, AffrayChallengerLoc[i][0], AffrayChallengerLoc[i][1], AffrayChallengerLoc[i][2], AffrayChallengerLoc[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000);
if(!pCreature)
continue;
pCreature->setFaction(35);
pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- pCreature->HandleEmoteCommand(15);
+ pCreature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
AffrayChallenger[i] = pCreature->GetGUID();
}
Wave_Timer = 5000;
@@ -303,13 +314,18 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
EventGrate = true;
}
}
- else if (EventInProgress) {
- if (Challenger_checker < diff) {
- for(uint8 i = 0; i < 6; i++) {
- if (AffrayChallenger[i]) {
+ else if (EventInProgress)
+ {
+ if (Challenger_checker < diff)
+ {
+ for(uint8 i = 0; i < 6; ++i)
+ {
+ if (AffrayChallenger[i])
+ {
Creature* pCreature = (Creature*)Unit::GetUnit((*m_creature), AffrayChallenger[i]);
- if((!pCreature || (!pCreature->isAlive())) && !Challenger_down[i]) {
- DoYell(SAY_TWIGGY_FLATHEAD_DOWN,LANG_UNIVERSAL,NULL);
+ if((!pCreature || (!pCreature->isAlive())) && !Challenger_down[i])
+ {
+ DoScriptText(SAY_TWIGGY_FLATHEAD_DOWN, m_creature);
Challenger_down[i] = true;
}
}
@@ -317,17 +333,20 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
Challenger_checker = 1000;
} else Challenger_checker -= diff;
- if(Wave_Timer < diff) {
- if (AffrayChallenger[Wave] && Wave < 6 && !EventBigWill) {
- DoYell(SAY_TWIGGY_FLATHEAD_FRAY,LANG_UNIVERSAL,NULL);
+ if(Wave_Timer < diff)
+ {
+ if (AffrayChallenger[Wave] && Wave < 6 && !EventBigWill)
+ {
+ DoScriptText(SAY_TWIGGY_FLATHEAD_FRAY, m_creature);
Creature* pCreature = (Creature*)Unit::GetUnit((*m_creature), AffrayChallenger[Wave]);
- if(pCreature && (pCreature->isAlive())) {
+ if(pCreature && (pCreature->isAlive()))
+ {
pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- pCreature->HandleEmoteCommand(15);
+ pCreature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
pCreature->setFaction(14);
((CreatureAI*)pCreature->AI())->AttackStart(pWarrior);
- Wave++;
+ ++Wave;
Wave_Timer = 20000;
}
}
@@ -338,16 +357,18 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
//pCreature->GetMotionMaster()->MovePoint(0, -1693, -4343, 4.32);
//pCreature->GetMotionMaster()->MovePoint(1, -1684, -4333, 2.78);
pCreature->GetMotionMaster()->MovePoint(2, -1682, -4329, 2.79);
- //pCreature->HandleEmoteCommand(15);
- pCreature->HandleEmoteCommand(27);
+ //pCreature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
+ pCreature->HandleEmoteCommand(EMOTE_STATE_READYUNARMED);
EventBigWill = true;
Wave_Timer = 1000;
}
}
- else if (Wave >= 6 && EventBigWill && BigWill) {
+ else if (Wave >= 6 && EventBigWill && BigWill)
+ {
Creature* pCreature = (Creature*)Unit::GetUnit((*m_creature), BigWill);
- if (!pCreature || !pCreature->isAlive()) {
- DoYell(SAY_TWIGGY_FLATHEAD_OVER,LANG_UNIVERSAL,NULL);
+ if (!pCreature || !pCreature->isAlive())
+ {
+ DoScriptText(SAY_TWIGGY_FLATHEAD_OVER, m_creature);
EventInProgress = false;
EventBigWill = false;
EventGrate = false;
@@ -360,25 +381,26 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
}
}
};
+
CreatureAI* GetAI_npc_twiggy_flathead(Creature *_Creature)
{
return new npc_twiggy_flatheadAI (_Creature);
}
/*#####
-## npc_wizzlecrank_shredder NOTE: Part2 will be in ACID
+## npc_wizzlecrank_shredder
#####*/
-#define SAY_PROGRESS_1 "Alright, alright I think I can figure out how to operate this thing..."
-#define SAY_PROGRESS_2 "Arrrgh! This isn't right!"
-#define SAY_PROGRESS_3 "Okay, I think I've got it, now. Follow me, $N!"
+#define SAY_PROGRESS_1 -1000272
+#define SAY_PROGRESS_2 -1000273
+#define SAY_PROGRESS_3 -1000274
-#define SAY_MERCENARY_4 "There's the stolen shredder! Stop it or Lugwizzle will have our hides!"
+#define SAY_MERCENARY_4 -1000275
-#define SAY_PROGRESS_5 "Looks like we're out of woods, eh? Wonder what this does..."
-#define SAY_PROGRESS_6 "Come on, don't break down on me now!"
-#define SAY_PROGRESS_7 "That was a close one! Well, let's get going, it's still a ways to Ratchet!"
-#define SAY_PROGRESS_8 "Hmm... I don't think this blinking red light is a good thing..."
+#define SAY_PROGRESS_5 -1000276
+#define SAY_PROGRESS_6 -1000277
+#define SAY_PROGRESS_7 -1000278
+#define SAY_PROGRESS_8 -1000279
#define QUEST_ESCAPE 863
#define NPC_PILOT 3451
@@ -388,6 +410,8 @@ struct TRINITY_DLL_DECL npc_wizzlecrank_shredderAI : public npc_escortAI
{
npc_wizzlecrank_shredderAI(Creature* c) : npc_escortAI(c) {Reset();}
+ bool Completed;
+
void WaypointReached(uint32 i)
{
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
@@ -397,27 +421,28 @@ struct TRINITY_DLL_DECL npc_wizzlecrank_shredderAI : public npc_escortAI
switch(i)
{
- case 0: DoSay(SAY_PROGRESS_1, LANG_UNIVERSAL, NULL);
+ case 0: DoScriptText(SAY_PROGRESS_1, m_creature);
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
- case 1: DoSay(SAY_PROGRESS_2, LANG_UNIVERSAL, NULL); break;
- case 10: DoSay(SAY_PROGRESS_3, LANG_UNIVERSAL, player);
+ case 1: DoScriptText(SAY_PROGRESS_2, m_creature); break;
+ case 10: DoScriptText(SAY_PROGRESS_3, m_creature, player);
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
case 20:{
Unit* Mercenary = FindCreature(MOB_MERCENARY, 99);
if(Mercenary)
{
- ((Creature*)Mercenary)->Yell(SAY_MERCENARY_4, LANG_UNIVERSAL, NULL);
+ DoScriptText(SAY_MERCENARY_4, Mercenary);
((Creature*)Mercenary)->AI()->AttackStart(m_creature);
AttackStart(Mercenary);
}
}break;
- case 21: DoSay(SAY_PROGRESS_5, LANG_UNIVERSAL, NULL);
+ case 21: DoScriptText(SAY_PROGRESS_5, m_creature);
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
- case 28: DoSay(SAY_PROGRESS_6, LANG_UNIVERSAL, NULL); break;
- case 29: DoSay(SAY_PROGRESS_7, LANG_UNIVERSAL, NULL); break;
- case 30: DoSay(SAY_PROGRESS_8, LANG_UNIVERSAL, NULL); break;
+ case 28: DoScriptText(SAY_PROGRESS_6, m_creature); break;
+ case 29: DoScriptText(SAY_PROGRESS_7, m_creature); break;
+ case 30: DoScriptText(SAY_PROGRESS_8, m_creature); break;
case 31: m_creature->SummonCreature(NPC_PILOT, 1088.77, -2985.39, 91.84, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
m_creature->setDeathState(JUST_DIED);
+ Completed = true;
if (player && player->GetTypeId() == TYPEID_PLAYER)
((Player*)player)->GroupEventHappens(QUEST_ESCAPE, m_creature);
break;
@@ -427,13 +452,15 @@ struct TRINITY_DLL_DECL npc_wizzlecrank_shredderAI : public npc_escortAI
void Reset()
{
m_creature->setDeathState(ALIVE);
+ Completed = false;
+ m_creature->setFaction(69);
}
void Aggro(Unit* who){}
void JustDied(Unit* killer)
{
- if (PlayerGUID)
+ if (PlayerGUID && !Completed)
{
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
if (player)
@@ -461,8 +488,8 @@ CreatureAI* GetAI_npc_wizzlecrank_shredderAI(Creature *_Creature)
{
npc_wizzlecrank_shredderAI* thisAI = new npc_wizzlecrank_shredderAI(_Creature);
- thisAI->AddWaypoint(0, 1109.15, -3104.11, 82.41, 6000);//say1 spw
- thisAI->AddWaypoint(1, 1105.39, -3102.86, 82.74, 2000);//say2 crazy running
+ thisAI->AddWaypoint(0, 1109.15, -3104.11, 82.41, 6000);
+ thisAI->AddWaypoint(1, 1105.39, -3102.86, 82.74, 2000);
thisAI->AddWaypoint(2, 1104.97, -3108.52, 83.10, 1000);
thisAI->AddWaypoint(3, 1110.01, -3110.48, 82.81, 1000);
thisAI->AddWaypoint(4, 1111.72, -3103.03, 82.21, 1000);
@@ -471,7 +498,7 @@ CreatureAI* GetAI_npc_wizzlecrank_shredderAI(Creature *_Creature)
thisAI->AddWaypoint(7, 1112.55, -3106.56, 82.31, 1000);
thisAI->AddWaypoint(8, 1108.12, -3111.04, 82.99, 1000);
thisAI->AddWaypoint(9, 1109.32, -3100.39, 82.08, 1000);
- thisAI->AddWaypoint(10, 1109.32, -3100.39, 82.08, 6000);//end of crazy running
+ thisAI->AddWaypoint(10, 1109.32, -3100.39, 82.08, 6000);
thisAI->AddWaypoint(11, 1098.92, -3095.14, 82.97);
thisAI->AddWaypoint(12, 1100.94, -3082.60, 82.83);
thisAI->AddWaypoint(13, 1101.12, -3068.83, 82.53);
@@ -480,19 +507,19 @@ CreatureAI* GetAI_npc_wizzlecrank_shredderAI(Creature *_Creature)
thisAI->AddWaypoint(16, 1098.22, -3027.84, 83.79);
thisAI->AddWaypoint(17, 1109.51, -3015.92, 85.73);
thisAI->AddWaypoint(18, 1119.87, -3007.21, 87.08);
- thisAI->AddWaypoint(19, 1130.23, -3002.49, 91.27, 5000);//twice
- thisAI->AddWaypoint(20, 1130.23, -3002.49, 91.27, 3000);//mercenary
- thisAI->AddWaypoint(21, 1130.23, -3002.49, 91.27, 4000);//say
- thisAI->AddWaypoint(22, 1129.73, -2985.89, 92.46);//crazy running
+ thisAI->AddWaypoint(19, 1130.23, -3002.49, 91.27, 5000);
+ thisAI->AddWaypoint(20, 1130.23, -3002.49, 91.27, 3000);
+ thisAI->AddWaypoint(21, 1130.23, -3002.49, 91.27, 4000);
+ thisAI->AddWaypoint(22, 1129.73, -2985.89, 92.46);
thisAI->AddWaypoint(23, 1124.10, -2983.29, 92.81);
thisAI->AddWaypoint(24, 1111.74, -2992.38, 91.59);
thisAI->AddWaypoint(25, 1111.06, -2976.54, 91.81);
thisAI->AddWaypoint(26, 1099.91, -2991.17, 91.67);
thisAI->AddWaypoint(27, 1096.32, -2981.55, 91.73);
- thisAI->AddWaypoint(28, 1091.28, -2985.82, 91.74, 4000);//6
- thisAI->AddWaypoint(29, 1091.28, -2985.82, 91.74, 3000);//7
- thisAI->AddWaypoint(30, 1091.28, -2985.82, 91.74, 7000);//8
- thisAI->AddWaypoint(31, 1091.28, -2985.82, 91.74, 3000);//justdied summon creature
+ thisAI->AddWaypoint(28, 1091.28, -2985.82, 91.74, 4000);
+ thisAI->AddWaypoint(29, 1091.28, -2985.82, 91.74, 3000);
+ thisAI->AddWaypoint(30, 1091.28, -2985.82, 91.74, 7000);
+ thisAI->AddWaypoint(31, 1091.28, -2985.82, 91.74, 3000);
return (CreatureAI*)thisAI;
}
diff --git a/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp b/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp
index b47abcb4c15..0d89f711148 100644
--- a/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp
+++ b/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp
@@ -62,6 +62,8 @@ bool GossipSelect_npc_deathly_usher(Player *player, Creature *_Creature, uint32
/*######
## npc_fallen_hero_of_horde
######*/
+#define GOSSIP_H_F1 "Why are you here?"
+#define GOSSIP_H_F2 "Continue story..."
#define GOSSIP_ITEM_FALLEN "Continue..."
@@ -77,13 +79,13 @@ bool GossipHello_npc_fallen_hero_of_horde(Player *player, Creature *_Creature)
player->PrepareQuestMenu( _Creature->GetGUID() );
if (player->GetQuestStatus(2784) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM( 0, "Why are you here?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_H_F1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
if (player->GetQuestStatus(2801) == QUEST_STATUS_INCOMPLETE && player->GetTeam() == HORDE)
- player->ADD_GOSSIP_ITEM( 0, "Continue story...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_H_F2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
if (player->GetQuestStatus(2801) == QUEST_STATUS_INCOMPLETE && player->GetTeam() == ALLIANCE)
- player->ADD_GOSSIP_ITEM( 0, "Why are you here?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_H_F1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
diff --git a/src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp b/src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp
index 935bf302705..e61ce75c92c 100644
--- a/src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp
+++ b/src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp
@@ -31,6 +31,19 @@ EndContentData */
## npc_ragged_john
######*/
+#define GOSSIP_HELLO "Official buisness, John. I need some information about Marsha Windsor. Tell me about the last time you saw him."
+#define GOSSIP_SELECT1 "So what did you do?"
+#define GOSSIP_SELECT2 "Start making sense, dwarf. I don't want to have anything to do with your cracker, your pappy, or any sort of 'discreditin'."
+#define GOSSIP_SELECT3 "Ironfoe?"
+#define GOSSIP_SELECT4 "Interesting... continue John."
+#define GOSSIP_SELECT5 "So that's how Windsor died..."
+#define GOSSIP_SELECT6 "So how did he die?"
+#define GOSSIP_SELECT7 "Ok so where the hell is he? Wait a minute! Are you drunk?"
+#define GOSSIP_SELECT8 "WHY is he in Blackrock Depths?"
+#define GOSSIP_SELECT9 "300? So the Dark Irons killed him and dragged him into the Depths?"
+#define GOSSIP_SELECT10 "Ahh... Ironfoe"
+#define GOSSIP_SELECT11 "Thanks, Ragged John. Your story was very uplifting and informative"
+
struct TRINITY_DLL_DECL npc_ragged_johnAI : public ScriptedAI
{
npc_ragged_johnAI(Creature *c) : ScriptedAI(c) { Reset(); }
@@ -65,7 +78,7 @@ bool GossipHello_npc_ragged_john(Player *player, Creature *_Creature)
player->PrepareQuestMenu( _Creature->GetGUID() );
if (player->GetQuestStatus(4224) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM( 0, "Official buisness, John. I need some information about Marsha Windsor. Tell me about the last time you saw him.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HELLO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
player->SEND_GOSSIP_MENU(2713, _Creature->GetGUID());
return true;
@@ -76,47 +89,47 @@ bool GossipSelect_npc_ragged_john(Player *player, Creature *_Creature, uint32 se
switch (action)
{
case GOSSIP_ACTION_INFO_DEF:
- player->ADD_GOSSIP_ITEM( 0, "So what did you do?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SELECT1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(2714, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM( 0, "Start making sense, dwarf. I don't want to have anything to do with your cracker, your pappy, or any sort of 'discreditin'.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SELECT2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
player->SEND_GOSSIP_MENU(2715, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM( 0, "Ironfoe?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SELECT3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
player->SEND_GOSSIP_MENU(2716, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
- player->ADD_GOSSIP_ITEM( 0, "Interesting... continue John.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SELECT4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
player->SEND_GOSSIP_MENU(2717, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
- player->ADD_GOSSIP_ITEM( 0, "So that's how Windsor died...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SELECT5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
player->SEND_GOSSIP_MENU(2718, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
- player->ADD_GOSSIP_ITEM( 0, "So how did he die?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SELECT6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
player->SEND_GOSSIP_MENU(2719, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+6:
- player->ADD_GOSSIP_ITEM( 0, "Ok so where the hell is he? Wait a minute! Are you drunk?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SELECT7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
player->SEND_GOSSIP_MENU(2720, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+7:
- player->ADD_GOSSIP_ITEM( 0, "WHY is he in Blackrock Depths?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SELECT8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
player->SEND_GOSSIP_MENU(2721, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+8:
- player->ADD_GOSSIP_ITEM( 0, "300? So the Dark Irons killed him and dragged him into the Depths?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SELECT9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
player->SEND_GOSSIP_MENU(2722, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+9:
- player->ADD_GOSSIP_ITEM( 0, "Ahh... Ironfoe", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SELECT10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
player->SEND_GOSSIP_MENU(2723, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+10:
- player->ADD_GOSSIP_ITEM( 0, "Thanks, Ragged John. Your story was very uplifting and informative", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SELECT11, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
player->SEND_GOSSIP_MENU(2725, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+11:
diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp
index 8cafa2f99c0..466fb647e40 100644
--- a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp
+++ b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp
@@ -86,7 +86,10 @@ struct TRINITY_DLL_DECL boss_aeonusAI : public ScriptedAI
DoScriptText(SAY_DEATH, m_creature);
if (pInstance)
+ {
pInstance->SetData(TYPE_RIFT,DONE);
+ pInstance->SetData(TYPE_MEDIVH,DONE);//FIXME: later should be removed
+ }
}
void KilledUnit(Unit *victim)
diff --git a/src/bindings/scripts/scripts/zone/deadmines/deadmines.cpp b/src/bindings/scripts/scripts/zone/deadmines/deadmines.cpp
index df7ea54efb0..0e22bbaef54 100644
--- a/src/bindings/scripts/scripts/zone/deadmines/deadmines.cpp
+++ b/src/bindings/scripts/scripts/zone/deadmines/deadmines.cpp
@@ -197,9 +197,9 @@ bool ItemUse_item_defias_gunpowder(Player *player, Item* _Item, SpellCastTargets
player->GetSession()->SendNotification("Instance script not initialized");
return true;
}
- if (pInstance->GetData(EVENT_STATE)!=CANNON_NOT_USED)
+ if (pInstance->GetData(EVENT_STATE)!= CANNON_NOT_USED)
return false;
- if(targets.getGOTarget() && targets.getGOTarget()->GetTypeId()==TYPEID_GAMEOBJECT &&
+ if(targets.getGOTarget() && targets.getGOTarget()->GetTypeId() == TYPEID_GAMEOBJECT &&
targets.getGOTarget()->GetEntry() == GO_DEFIAS_CANNON)
{
pInstance->SetData(EVENT_STATE, CANNON_GUNPOWDER_USED);
diff --git a/src/bindings/scripts/scripts/zone/dun_morogh/dun_morogh.cpp b/src/bindings/scripts/scripts/zone/dun_morogh/dun_morogh.cpp
index a03fd7c775b..634a05d3ebe 100644
--- a/src/bindings/scripts/scripts/zone/dun_morogh/dun_morogh.cpp
+++ b/src/bindings/scripts/scripts/zone/dun_morogh/dun_morogh.cpp
@@ -31,7 +31,7 @@ EndContentData */
## npc_narm_faulk
######*/
-#define SAY_HEAL "Thank you, dear Paladin, you just saved my life."
+#define SAY_HEAL -1000280
struct TRINITY_DLL_DECL npc_narm_faulkAI : public ScriptedAI
{
@@ -76,7 +76,7 @@ struct TRINITY_DLL_DECL npc_narm_faulkAI : public ScriptedAI
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0);
//m_creature->RemoveAllAuras();
- DoSay(SAY_HEAL,LANG_COMMON,NULL);
+ DoScriptText(SAY_HEAL, m_creature);
spellHit = true;
}
}
diff --git a/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp b/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp
index 96cbe5729bb..44abf0da806 100644
--- a/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp
+++ b/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp
@@ -45,9 +45,8 @@ struct TRINITY_DLL_DECL mobs_ghoul_flayerAI : public ScriptedAI
void JustDied(Unit* Killer)
{
if( Killer->GetTypeId() == TYPEID_PLAYER )
- DoSpawnCreature(11064,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,60000);
+ DoSpawnCreature(11064, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000);
}
-
};
CreatureAI* GetAI_mobs_ghoul_flayer(Creature *_Creature)
diff --git a/src/bindings/scripts/scripts/zone/elwynn_forest/elwynn_forest.cpp b/src/bindings/scripts/scripts/zone/elwynn_forest/elwynn_forest.cpp
index 72b166b5703..4e18572260f 100644
--- a/src/bindings/scripts/scripts/zone/elwynn_forest/elwynn_forest.cpp
+++ b/src/bindings/scripts/scripts/zone/elwynn_forest/elwynn_forest.cpp
@@ -31,7 +31,7 @@ EndContentData */
## npc_henze_faulk
######*/
-#define SAY_HEAL "Thank you, dear Paladin, you just saved my life."
+#define SAY_HEAL -1000280
struct TRINITY_DLL_DECL npc_henze_faulkAI : public ScriptedAI
{
@@ -76,7 +76,7 @@ struct TRINITY_DLL_DECL npc_henze_faulkAI : public ScriptedAI
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0);
//m_creature->RemoveAllAuras();
- DoSay(SAY_HEAL,LANG_COMMON,NULL);
+ DoScriptText(SAY_HEAL, m_creature);
spellHit = true;
}
}
diff --git a/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp b/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp
index 1126352de8c..6149b185cfa 100644
--- a/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp
+++ b/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp
@@ -60,6 +60,12 @@ CreatureAI* GetAI_mobs_mana_tapped(Creature *_Creature)
## npc_prospector_anvilward
######*/
+#define GOSSIP_HELLO "I need a moment of your time, sir."
+#define GOSSIP_SELECT "Why... yes, of course. I've something to show you right inside this building, Mr. Anvilward."
+
+#define SAY_PR_1 -1000281
+#define SAY_PR_2 -1000282
+
#define QUEST_THE_DWARVEN_SPY 8483
struct TRINITY_DLL_DECL npc_prospector_anvilwardAI : public npc_escortAI
@@ -70,17 +76,16 @@ struct TRINITY_DLL_DECL npc_prospector_anvilwardAI : public npc_escortAI
// Pure Virtual Functions
void WaypointReached(uint32 i)
{
+ Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
+
+ if(!player)
+ return;
+
switch (i)
{
- case 0:
- m_creature->Say("Very well. Let's see what you have to show me, $N.", LANG_UNIVERSAL, PlayerGUID);
- break;
- case 5:
- m_creature->Say("What manner of trick is this, $R? If you seek to ambush me, I warn you I will not go down quietly!", LANG_UNIVERSAL, PlayerGUID);
- break;
- case 6:
- m_creature->setFaction(24);
- break;
+ case 0: DoScriptText(SAY_PR_1, m_creature, player); break;
+ case 5: DoScriptText(SAY_PR_2, m_creature, player); break;
+ case 6: m_creature->setFaction(24); break;
}
}
@@ -88,20 +93,17 @@ struct TRINITY_DLL_DECL npc_prospector_anvilwardAI : public npc_escortAI
void Reset()
{
- //Default npc faction
m_creature->setFaction(35);
}
void JustDied(Unit* killer)
- {
- //Default npc faction
+ {
m_creature->setFaction(35);
}
void UpdateAI(const uint32 diff)
{
- npc_escortAI::UpdateAI(diff); //Must update npc_escortAI
-
+ npc_escortAI::UpdateAI(diff);
}
};
@@ -114,8 +116,8 @@ CreatureAI* GetAI_npc_prospector_anvilward(Creature *_Creature)
thisAI->AddWaypoint(2, 9309.63, -6658.84, 22.43);
thisAI->AddWaypoint(3, 9304.43, -6649.31, 26.46);
thisAI->AddWaypoint(4, 9298.83, -6648.00, 28.61);
- thisAI->AddWaypoint(5, 9291.06, -6653.46, 31.83,2500);
- thisAI->AddWaypoint(6, 9289.08, -6660.17, 31.85,5000);
+ thisAI->AddWaypoint(5, 9291.06, -6653.46, 31.83, 2500);
+ thisAI->AddWaypoint(6, 9289.08, -6660.17, 31.85, 5000);
thisAI->AddWaypoint(7, 9291.06, -6653.46, 31.83);
return (CreatureAI*)thisAI;
@@ -124,7 +126,7 @@ CreatureAI* GetAI_npc_prospector_anvilward(Creature *_Creature)
bool GossipHello_npc_prospector_anvilward(Player *player, Creature *_Creature)
{
if( player->GetQuestStatus(QUEST_THE_DWARVEN_SPY) == QUEST_STATUS_INCOMPLETE )
- player->ADD_GOSSIP_ITEM(0, "I need a moment of your time, sir.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_HELLO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(8239, _Creature->GetGUID());
return true;
@@ -135,12 +137,11 @@ bool GossipSelect_npc_prospector_anvilward(Player *player, Creature *_Creature,
switch(action)
{
case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM( 0, "Why... yes, of course. I've something to show you right inside this building, Mr. Anvilward.",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SELECT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
player->SEND_GOSSIP_MENU(8240, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
player->CLOSE_GOSSIP_MENU();
- //attack,defend,walk
((npc_escortAI*)(_Creature->AI()))->Start(true, true, false, player->GetGUID());
break;
}
@@ -636,11 +637,11 @@ CreatureAI* GetAI_npc_apprentice_mirvedaAI(Creature *_Creature)
}
/*######
-## npc_infused_crystal not working yet.
+## npc_infused_crystal
######*/
#define MOB_ENRAGED_WRAITH 17086
-#define EMOTE "releases the last of its energies into the nerarby runestone, succesfully reactivating it."
+#define EMOTE -1000283
#define QUEST_POWERING_OUR_DEFENSES 8490
struct Location
@@ -718,7 +719,7 @@ struct TRINITY_DLL_DECL npc_infused_crystalAI : public Scripted_NoMovementAI
{
if(EndTimer < diff && Progress)
{
- DoTextEmote(EMOTE, NULL);
+ DoScriptText(EMOTE, m_creature);
Completed = true;
if (PlayerGUID)
{
diff --git a/src/bindings/scripts/scripts/zone/felwood/felwood.cpp b/src/bindings/scripts/scripts/zone/felwood/felwood.cpp
index 2cd6d05579e..4aa752add77 100644
--- a/src/bindings/scripts/scripts/zone/felwood/felwood.cpp
+++ b/src/bindings/scripts/scripts/zone/felwood/felwood.cpp
@@ -17,7 +17,7 @@
/* ScriptData
SDName: Felwood
SD%Complete: 95
-SDComment: Quest support: related to 4101&4102 (To obtain Cenarion Beacon)
+SDComment: Quest support: 4101, 4102
SDCategory: Felwood
EndScriptData */
@@ -58,7 +58,7 @@ bool GossipHello_npcs_riverbreeze_and_silversky(Player *player, Creature *_Creat
{
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_BEACON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(2849, _Creature->GetGUID());
- }else if( player->GetTeam()==ALLIANCE )
+ }else if( player->GetTeam() == ALLIANCE )
player->SEND_GOSSIP_MENU(2843, _Creature->GetGUID());
else
player->SEND_GOSSIP_MENU(2842, _Creature->GetGUID());
diff --git a/src/bindings/scripts/scripts/zone/feralas/feralas.cpp b/src/bindings/scripts/scripts/zone/feralas/feralas.cpp
index e0a89fe5905..0abd9fdf34f 100644
--- a/src/bindings/scripts/scripts/zone/feralas/feralas.cpp
+++ b/src/bindings/scripts/scripts/zone/feralas/feralas.cpp
@@ -27,13 +27,15 @@ EndScriptData */
## npc_gregan_brewspewer
######*/
+#define GOSSIP_HELLO "Buy somethin', will ya?"
+
bool GossipHello_npc_gregan_brewspewer(Player *player, Creature *_Creature)
{
if( _Creature->isQuestGiver() )
player->PrepareQuestMenu( _Creature->GetGUID() );
if( _Creature->isVendor() && player->GetQuestStatus(3909) == QUEST_STATUS_INCOMPLETE )
- player->ADD_GOSSIP_ITEM(0, "Buy somethin', will ya?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_HELLO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(2433,_Creature->GetGUID());
return true;
@@ -57,7 +59,7 @@ bool GossipSelect_npc_gregan_brewspewer(Player *player, Creature *_Creature, uin
bool GossipHello_npc_screecher_spirit(Player *player, Creature *_Creature)
{
- player->SEND_GOSSIP_MENU(2039,_Creature->GetGUID() );
+ player->SEND_GOSSIP_MENU(2039, _Creature->GetGUID() );
player->TalkedToCreature(_Creature->GetEntry(), _Creature->GetGUID());
_Creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
diff --git a/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp b/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp
index acef59df670..cf0bce15bae 100644
--- a/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp
+++ b/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp
@@ -35,10 +35,12 @@ EndContentData */
## npc_blood_knight_dawnstar
######*/
+#define GOSSIP_H_BKD "Take Blood Knight Insignia"
+
bool GossipHello_npc_blood_knight_dawnstar(Player *player, Creature *_Creature)
{
if (player->GetQuestStatus(9692) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(24226,1,true))
- player->ADD_GOSSIP_ITEM( 0, "Take Blood Knight Insignia", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_H_BKD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
@@ -64,21 +66,23 @@ bool GossipSelect_npc_blood_knight_dawnstar(Player *player, Creature *_Creature,
## npc_budd_nedreck
######*/
+#define GOSSIP_HBN "You gave the crew disguises?"
+
bool GossipHello_npc_budd_nedreck(Player *player, Creature *_Creature)
{
if( _Creature->isQuestGiver())
player->PrepareQuestMenu( _Creature->GetGUID() );
if( player->GetQuestStatus(11166) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(0,"You gave the crew disguises?",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_HBN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
- player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(),_Creature->GetGUID());
+ player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
return true;
}
bool GossipSelect_npc_budd_nedreck(Player *player, Creature *_Creature, uint32 sender, uint32 action )
{
- if( action==GOSSIP_ACTION_INFO_DEF )
+ if( action == GOSSIP_ACTION_INFO_DEF )
{
player->CLOSE_GOSSIP_MENU();
_Creature->CastSpell(player, 42540, false);
@@ -98,7 +102,7 @@ bool GossipHello_npc_rathis_tomber(Player *player, Creature *_Creature)
if( _Creature->isVendor() && player->GetQuestRewardStatus(9152) )
{
player->ADD_GOSSIP_ITEM(1, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
- player->SEND_GOSSIP_MENU(8432,_Creature->GetGUID());
+ player->SEND_GOSSIP_MENU(8432, _Creature->GetGUID());
}else
player->SEND_GOSSIP_MENU(8431,_Creature->GetGUID());
@@ -137,11 +141,11 @@ bool GOHello_gilded_brazier(Player *player, GameObject* _GO)
#define SAY_PROGRESS3 -1000143
#define SAY_END1 -1000144
#define SAY_END2 -1000145
-#define SAY_CAPTAIN_ANSWER -1000146
+#define SAY_CAPTAIN_ANSWER -1000146
-#define QUEST_ESCAPE_FROM_THE_CATACOMBS 9212
-#define GO_CAGE 181152
-#define NPC_CAPTAIN_HELIOS 16220
+#define QUEST_ESCAPE_FROM_THE_CATACOMBS 9212
+#define GO_CAGE 181152
+#define NPC_CAPTAIN_HELIOS 16220
struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI
{
@@ -183,10 +187,8 @@ struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI
m_creature->AI()->AttackStart(Summ1);
break;
}
- case 19:
- m_creature->SetSpeed(MOVE_RUN, 1.5f); break;
- case 25:
- m_creature->SetSpeed(MOVE_WALK, 1.0f); break;
+ case 19: m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
+ case 25: m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
case 30:
if (player && player->GetTypeId() == TYPEID_PLAYER)
((Player*)player)->GroupEventHappens(QUEST_ESCAPE_FROM_THE_CATACOMBS,m_creature);
diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
index 73d07388f6e..94a75db6149 100644
--- a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
+++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
@@ -16,8 +16,8 @@
/* ScriptData
SDName: Boss_Kelidan_The_Breaker
-SD%Complete: 60
-SDComment: Event with channeleres vs. boss not implemented yet
+SD%Complete: 100
+SDComment:
SDCategory: Hellfire Citadel, Blood Furnace
EndScriptData */
@@ -27,6 +27,7 @@ mob_shadowmoon_channeler
EndContentData */
#include "precompiled.h"
+#include "def_blood_furnace.h"
#define SAY_WAKE -1542000
@@ -40,6 +41,8 @@ EndContentData */
#define SAY_DIE -1542007
#define SPELL_CORRUPTION 30938
+#define SPELL_EVOCATION 30935
+#define SPELL_BURNING_NOVA 30940
#define SPELL_FIRE_NOVA 33132
#define H_SPELL_FIRE_NOVA 37371
@@ -47,8 +50,23 @@ EndContentData */
#define SPELL_SHADOW_BOLT_VOLLEY 28599
#define H_SPELL_SHADOW_BOLT_VOLLEY 40070
-#define SPELL_BURNING_NOVA 30940
-#define SPELL_VORTEX 37370
+#define ENTRY_KELIDAN 17377
+#define ENTRY_CHANNELER 17653
+
+const float ShadowmoonChannelers[5][4]=
+{
+ {302,-87,-24.4,0.157},
+ {321,-63.5,-24.6,4.887},
+ {346,-74.5,-24.6,3.595},
+ {344,-103.5,-24.5,2.356},
+ {316,-109,-24.6,1.257}
+};
+
+class TRINITY_DLL_DECL BurningNovaAura : public Aura
+{
+ public:
+ BurningNovaAura(SpellEntry *spell, uint32 eff, Unit *target, Unit *caster) : Aura(spell, eff, NULL, target, caster, NULL){}
+};
struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI
{
@@ -56,6 +74,7 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI
{
pInstance = ((ScriptedInstance*)c->GetInstanceData());
HeroicMode = m_creature->GetMap()->IsHeroic();
+ for(int i=0; i<5; ++i) Channelers[i] = 0;
Reset();
}
@@ -66,19 +85,28 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI
uint32 BurningNova_Timer;
uint32 Firenova_Timer;
uint32 Corruption_Timer;
+ uint32 check_Timer;
bool Firenova;
+ bool addYell;
+ uint64 Channelers[5];
void Reset()
{
ShadowVolley_Timer = 1000;
BurningNova_Timer = 15000;
Corruption_Timer = 5000;
+ check_Timer = 0;
Firenova = false;
+ addYell = false;
+ SummonChannelers();
}
void Aggro(Unit *who)
{
DoScriptText(SAY_WAKE, m_creature);
+ if (m_creature->IsNonMeleeSpellCasted(false))
+ m_creature->InterruptNonMeleeSpells(true);
+ DoStartMovement(who);
}
void KilledUnit(Unit* victim)
@@ -93,21 +121,89 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI
}
}
+ void ChannelerEngaged(Unit* who)
+ {
+ if(who && !addYell)
+ {
+ addYell = true;
+ switch(rand()%3)
+ {
+ case 0: DoScriptText(SAY_ADD_AGGRO_1, m_creature); break;
+ case 1: DoScriptText(SAY_ADD_AGGRO_2, m_creature); break;
+ default: DoScriptText(SAY_ADD_AGGRO_3, m_creature); break;
+ }
+ }
+ for(int i=0; i<5; ++i)
+ {
+ Creature *channeler = (Creature*)Unit::GetUnit(*m_creature, Channelers[i]);
+ if(who && channeler && !channeler->isInCombat())
+ channeler->AI()->AttackStart(who);
+ }
+ }
+
+ void ChannelerDied(Unit* killer)
+ {
+ for(int i=0; i<5; ++i)
+ {
+ Creature *channeler = (Creature*)Unit::GetUnit(*m_creature, Channelers[i]);
+ if(channeler && channeler->isAlive())
+ return;
+ }
+
+ if(killer)
+ m_creature->AI()->AttackStart(killer);
+ }
+
+ uint64 GetChanneled(Creature *channeler1)
+ {
+ SummonChannelers();
+ if(!channeler1) return NULL;
+ int i;
+ for(i=0; i<5; ++i)
+ {
+ Creature *channeler = (Creature*)Unit::GetUnit(*m_creature, Channelers[i]);
+ if(channeler && channeler->GetGUID()==channeler1->GetGUID())
+ break;
+ }
+ return Channelers[(i+2)%5];
+ }
+
+ void SummonChannelers()
+ {
+ for(int i=0; i<5; ++i)
+ {
+ Creature *channeler = (Creature*)Unit::GetUnit(*m_creature, Channelers[i]);
+ if(!channeler || channeler->isDead())
+ channeler = m_creature->SummonCreature(ENTRY_CHANNELER,ShadowmoonChannelers[i][0],ShadowmoonChannelers[i][1],ShadowmoonChannelers[i][2],ShadowmoonChannelers[i][3],TEMPSUMMON_CORPSE_TIMED_DESPAWN,300000);
+ Channelers[i] = channeler->GetGUID();
+ }
+ }
+
void JustDied(Unit* Killer)
{
DoScriptText(SAY_DIE, m_creature);
+ if(pInstance)
+ pInstance->SetData(DATA_KELIDANEVENT, DONE);
}
void UpdateAI(const uint32 diff)
{
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
+ {
+ if(check_Timer < diff)
+ {
+ if (!m_creature->IsNonMeleeSpellCasted(false))
+ DoCast(m_creature,SPELL_EVOCATION);
+ check_Timer = 5000;
+ }else check_Timer -= diff;
return;
+ }
if (Firenova)
{
if (Firenova_Timer < diff)
{
- DoCast(m_creature,HeroicMode ? H_SPELL_FIRE_NOVA : SPELL_FIRE_NOVA);
+ DoCast(m_creature,HeroicMode ? H_SPELL_FIRE_NOVA : SPELL_FIRE_NOVA,true);
Firenova = false;
ShadowVolley_Timer = 2000;
}else Firenova_Timer -=diff;
@@ -134,10 +230,18 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI
DoScriptText(SAY_NOVA, m_creature);
- if (HeroicMode)
- DoCast(m_creature,SPELL_VORTEX);
+ if(SpellEntry *nova = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_BURNING_NOVA))
+ {
+ for(uint32 i = 0; i < 3; ++i)
+ if(nova->Effect[i] == SPELL_EFFECT_APPLY_AURA)
+ {
+ Aura *Aur = new BurningNovaAura(nova, i, m_creature, m_creature);
+ m_creature->AddAura(Aur);
+ }
+ }
- DoCast(m_creature,SPELL_BURNING_NOVA);
+ if (HeroicMode)
+ DoTeleportAll(m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation());
BurningNova_Timer = 20000+rand()%8000;
Firenova_Timer= 5000;
@@ -161,9 +265,7 @@ CreatureAI* GetAI_boss_kelidan_the_breaker(Creature *_Creature)
#define H_SPELL_SHADOW_BOLT 15472
#define SPELL_MARK_OF_SHADOW 30937
-
-#define SPELL_CHANNELING 0 //initial spell channeling boss/each other not known
- //when engaged all channelers must stop, trigger yell (SAY_ADD_AGGRO_*), and engage.
+#define SPELL_CHANNELING 39123
struct TRINITY_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI
{
@@ -179,22 +281,49 @@ struct TRINITY_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI
uint32 ShadowBolt_Timer;
uint32 MarkOfShadow_Timer;
+ uint32 check_Timer;
void Reset()
{
ShadowBolt_Timer = 1000+rand()%1000;
MarkOfShadow_Timer = 5000+rand()%2000;
+ check_Timer = 0;
+ if (m_creature->IsNonMeleeSpellCasted(false))
+ m_creature->InterruptNonMeleeSpells(true);
}
void Aggro(Unit* who)
{
- //trigger boss to yell
+ if(Creature *Kelidan = (Creature *)FindCreature(ENTRY_KELIDAN, 100))
+ ((boss_kelidan_the_breakerAI*)Kelidan->AI())->ChannelerEngaged(who);
+ if (m_creature->IsNonMeleeSpellCasted(false))
+ m_creature->InterruptNonMeleeSpells(true);
+ DoStartMovement(who);
+ }
+
+ void JustDied(Unit* Killer)
+ {
+ if(Creature *Kelidan = (Creature *)FindCreature(ENTRY_KELIDAN, 100))
+ ((boss_kelidan_the_breakerAI*)Kelidan->AI())->ChannelerDied(Killer);
}
void UpdateAI(const uint32 diff)
{
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
+ {
+ if(check_Timer < diff)
+ {
+ if (!m_creature->IsNonMeleeSpellCasted(false))
+ if(Creature *Kelidan = (Creature *)FindCreature(ENTRY_KELIDAN, 100))
+ {
+ uint64 channeler = ((boss_kelidan_the_breakerAI*)Kelidan->AI())->GetChanneled(m_creature);
+ if(Unit *channeled = Unit::GetUnit(*m_creature, channeler))
+ DoCast(channeled,SPELL_CHANNELING);
+ }
+ check_Timer = 5000;
+ }else check_Timer -= diff;
return;
+ }
if (MarkOfShadow_Timer < diff)
{
@@ -231,4 +360,4 @@ void AddSC_boss_kelidan_the_breaker()
newscript->Name="mob_shadowmoon_channeler";
newscript->GetAI = &GetAI_mob_shadowmoon_channeler;
newscript->RegisterSelf();
-}
+} \ No newline at end of file
diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/def_blood_furnace.h b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/def_blood_furnace.h
new file mode 100644
index 00000000000..6462b401d3d
--- /dev/null
+++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/def_blood_furnace.h
@@ -0,0 +1,9 @@
+/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+ * This program is free software licensed under GPL version 2
+ * Please see the included DOCS/LICENSE.TXT for more information */
+
+#ifndef DEF_BLOOD_FURNACE_H
+#define DEF_BLOOD_FURNACE_H
+
+#define DATA_KELIDANEVENT 1
+#endif \ No newline at end of file
diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp
new file mode 100644
index 00000000000..3c803350bb6
--- /dev/null
+++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp
@@ -0,0 +1,112 @@
+/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+SDName: Instance_Blood_Furnace
+SD%Complete: 85
+SDComment:
+SDCategory: Hellfire Citadel, Blood Furnace
+EndScriptData */
+
+#include "precompiled.h"
+#include "def_blood_furnace.h"
+
+#define ENTRY_SEWER1 181823
+#define ENTRY_SEWER2 181766
+
+struct TRINITY_DLL_DECL instance_blood_furnace : public ScriptedInstance
+{
+ instance_blood_furnace(Map *map) : ScriptedInstance(map) {Initialize();};
+
+
+ uint64 Sewer1GUID;
+ uint64 Sewer2GUID;
+
+
+ void Initialize()
+ {
+ Sewer1GUID = 0;
+ Sewer2GUID = 0;
+ }
+
+ void OnObjectCreate(GameObject *go)
+ {
+ switch(go->GetEntry())
+ {
+ case ENTRY_SEWER1: Sewer1GUID = go->GetGUID(); break;
+ case ENTRY_SEWER2: Sewer2GUID = go->GetGUID(); break;
+ }
+ }
+
+ Player* GetPlayerInMap()
+ {
+ Map::PlayerList const& players = instance->GetPlayers();
+
+ if (!players.isEmpty())
+ {
+ for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ {
+ if (Player* plr = itr->getSource())
+ return plr;
+ }
+ }
+
+ debug_log("TSCR: Instance Blood Furnace: GetPlayerInMap, but PlayerList is empty!");
+ return NULL;
+ }
+
+ void HandleGameObject(uint64 guid, uint32 state)
+ {
+ Player *player = GetPlayerInMap();
+
+ if (!player || !guid)
+ {
+ debug_log("TSCR: Blood Furnace: HandleGameObject fail");
+ return;
+ }
+
+ if (GameObject *go = GameObject::GetGameObject(*player,guid))
+ go->SetGoState(state);
+ }
+
+ void SetData(uint32 type, uint32 data)
+ {
+ switch(type)
+ {
+ case DATA_KELIDANEVENT:
+ if( data == DONE )
+ {
+ HandleGameObject(Sewer1GUID,0);
+ HandleGameObject(Sewer2GUID,0);
+ }
+ break;
+ }
+ }
+};
+
+InstanceData* GetInstanceData_instance_blood_furnace(Map* map)
+{
+ return new instance_blood_furnace(map);
+}
+
+void AddSC_instance_blood_furnace()
+{
+ Script *newscript;
+ newscript = new Script;
+ newscript->Name = "instance_blood_furnace";
+ newscript->GetInstanceData = &GetInstanceData_instance_blood_furnace;
+ newscript->RegisterSelf();
+} \ No newline at end of file
diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp
new file mode 100644
index 00000000000..a62c4e06217
--- /dev/null
+++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp
@@ -0,0 +1,490 @@
+/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* ScriptData
+Name: Boss_Vazruden_the_Herald
+%Complete: 90
+Comment:
+Category: Hellfire Citadel, Hellfire Ramparts
+EndScriptData */
+
+#include "precompiled.h"
+
+#define SPELL_FIREBALL (HeroicMode?36920:34653)
+#define SPELL_CONE_OF_FIRE (HeroicMode?36921:30926)
+#define SPELL_SUMMON_LIQUID_FIRE (HeroicMode?30928:23971)
+#define SPELL_BELLOWING_ROAR 39427
+#define SPELL_REVENGE (HeroicMode?40392:19130)
+#define SPELL_KIDNEY_SHOT 30621
+#define SPELL_FIRE_NOVA_VISUAL 19823
+
+#define ENTRY_HELLFIRE_SENTRY 17517
+#define ENTRY_VAZRUDEN_HERALD 17307
+#define ENTRY_VAZRUDEN 17537
+#define ENTRY_NAZAN 17536
+#define ENTRY_LIQUID_FIRE 22515
+#define ENTRY_REINFORCED_FEL_IRON_CHEST (HeroicMode?185169:185168)
+
+#define SAY_INTRO -1543017
+#define SAY_WIPE -1543018
+#define SAY_AGGRO_1 -1543019
+#define SAY_AGGRO_2 -1543020
+#define SAY_AGGRO_3 -1543021
+#define SAY_KILL_1 -1543022
+#define SAY_KILL_2 -1543023
+#define SAY_DIE -1543024
+#define EMOTE -1543025
+
+#define PATH_ENTRY 2081
+
+const float VazrudenMiddle[3] = {-1406.5, 1746.5, 81.2};
+const float VazrudenRing[2][3] =
+{
+ {-1430, 1705, 112},
+ {-1377, 1760, 112}
+};
+
+struct TRINITY_DLL_DECL boss_nazanAI : public ScriptedAI
+{
+ boss_nazanAI(Creature *c) : ScriptedAI(c)
+ {
+ HeroicMode = m_creature->GetMap()->IsHeroic();
+ VazrudenGUID = 0;
+ flight = true;
+ Reset();
+ }
+
+ uint32 Fireball_Timer;
+ uint32 ConeOfFire_Timer;
+ uint32 BellowingRoar_Timer;
+ uint32 Fly_Timer;
+ uint32 Turn_Timer;
+ uint32 UnsummonCheck;
+ bool flight;
+ uint64 VazrudenGUID;
+ bool HeroicMode;
+ SpellEntry *liquid_fire;
+
+ void Reset()
+ {
+ Fireball_Timer = 4000;
+ Fly_Timer = 45000;
+ Turn_Timer = 0;
+ UnsummonCheck = 5000;
+ }
+
+ void Aggro(Unit* who) {}
+
+ void JustSummoned(Creature *summoned)
+ {
+ if(summoned && summoned->GetEntry() == ENTRY_LIQUID_FIRE)
+ {
+ summoned->SetLevel(m_creature->getLevel());
+ summoned->setFaction(m_creature->getFaction());
+ summoned->CastSpell(summoned,SPELL_SUMMON_LIQUID_FIRE,true);
+ summoned->CastSpell(summoned,SPELL_FIRE_NOVA_VISUAL,true);
+ }
+ }
+
+ void SpellHitTarget(Unit* target, const SpellEntry* entry)
+ {
+ if(target && entry->Id == SPELL_FIREBALL)
+ m_creature->SummonCreature(ENTRY_LIQUID_FIRE,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),target->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,30000);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
+ {
+ if(UnsummonCheck < diff && m_creature->isAlive())
+ {
+ m_creature->SetLootRecipient(NULL);
+ m_creature->SetVisibility(VISIBILITY_OFF);
+ m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ m_creature->RemoveCorpse();
+ }else UnsummonCheck -= diff;
+ return;
+ }
+
+ if(Fireball_Timer < diff)
+ {
+ if(Unit *victim = SelectUnit(SELECT_TARGET_RANDOM,0))
+ DoCast(victim, SPELL_FIREBALL,true);
+ Fireball_Timer = 4000+rand()%3000;
+ }else Fireball_Timer -= diff;
+
+ if(flight) // phase 1 - the flight
+ {
+ Creature *Vazruden = (Creature*)Unit::GetUnit(*m_creature,VazrudenGUID);
+ if(Fly_Timer < diff || !(Vazruden && Vazruden->isAlive() && (Vazruden->GetHealth()*5 > Vazruden->GetMaxHealth())))
+ {
+ flight = false;
+ BellowingRoar_Timer = 6000;
+ ConeOfFire_Timer = 12000;
+ m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING);
+ m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
+ m_creature->GetMotionMaster()->Clear();
+ if(Unit *victim = SelectUnit(SELECT_TARGET_NEAREST,0))
+ m_creature->AI()->AttackStart(victim);
+ DoStartMovement(m_creature->getVictim());
+ DoScriptText(EMOTE, m_creature);
+ return;
+ }else Fly_Timer -= diff;
+
+ if(Turn_Timer < diff)
+ {
+ uint32 waypoint = (Fly_Timer/10000)%2;
+ if(m_creature->GetDistance(VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2]) > 5)
+ m_creature->GetMotionMaster()->MovePoint(0,VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2]);
+ Turn_Timer = 10000;
+ }else Turn_Timer -= diff;
+ }
+ else // phase 2 - land fight
+ {
+ if(ConeOfFire_Timer < diff)
+ {
+ DoCast(m_creature, SPELL_CONE_OF_FIRE);
+ ConeOfFire_Timer = 12000;
+ Fireball_Timer = 4000;
+ }else ConeOfFire_Timer -= diff;
+
+ if(HeroicMode && BellowingRoar_Timer < diff)
+ {
+ DoCast(m_creature, SPELL_BELLOWING_ROAR);
+ BellowingRoar_Timer = 45000;
+ }else BellowingRoar_Timer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+ }
+};
+
+struct TRINITY_DLL_DECL boss_vazrudenAI : public ScriptedAI
+{
+ boss_vazrudenAI(Creature *c) : ScriptedAI(c)
+ {
+ HeroicMode = m_creature->GetMap()->IsHeroic();
+ Reset();
+ }
+
+ uint32 Revenge_Timer;
+ bool HeroicMode;
+ bool WipeSaid;
+ uint32 UnsummonCheck;
+
+ void Reset()
+ {
+ Revenge_Timer = 4000;
+ UnsummonCheck = 2000;
+ WipeSaid = false;
+ }
+
+ void Aggro(Unit *who)
+ {
+ switch(rand()%3)
+ {
+ case 0: DoScriptText(SAY_AGGRO_1, m_creature); break;
+ case 1: DoScriptText(SAY_AGGRO_2, m_creature); break;
+ default: DoScriptText(SAY_AGGRO_3, m_creature); break;
+ }
+ }
+
+ void KilledUnit(Unit* who)
+ {
+ if(who && who->GetEntry()!=ENTRY_VAZRUDEN)
+ switch(rand()%2)
+ {
+ case 0: DoScriptText(SAY_KILL_1, m_creature); break;
+ default: DoScriptText(SAY_KILL_2, m_creature); break;
+ }
+ }
+
+ void JustDied(Unit* who)
+ {
+ if(who && who != m_creature)
+ DoScriptText(SAY_DIE, m_creature);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
+ {
+ if(UnsummonCheck < diff && m_creature->isAlive())
+ {
+ if(!WipeSaid)
+ {
+ DoScriptText(SAY_WIPE, m_creature);
+ WipeSaid = true;
+ }
+ m_creature->SetLootRecipient(NULL);
+ m_creature->SetVisibility(VISIBILITY_OFF);
+ m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ m_creature->RemoveCorpse();
+ }else UnsummonCheck -= diff;
+ return;
+ }
+
+ if(Revenge_Timer < diff)
+ {
+ if(Unit *victim = m_creature->getVictim())
+ DoCast(victim, SPELL_REVENGE);
+ Revenge_Timer = 5000;
+ }else Revenge_Timer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+struct TRINITY_DLL_DECL boss_vazruden_the_heraldAI : public ScriptedAI
+{
+ boss_vazruden_the_heraldAI(Creature *c) : ScriptedAI(c)
+ {
+ summoned = false;
+ sentryDown = false;
+ NazanGUID = 0;
+ VazrudenGUID = 0;
+ HeroicMode = m_creature->GetMap()->IsHeroic();
+ Reset();
+ }
+
+ uint32 phase;
+ uint32 waypoint;
+ uint32 check;
+ bool sentryDown;
+ uint64 NazanGUID;
+ uint64 VazrudenGUID;
+ bool summoned;
+ bool HeroicMode;
+
+ void Reset()
+ {
+ phase = 0;
+ waypoint = 0;
+ check = 0;
+ UnsummonAdds();
+ m_creature->GetMotionMaster()->MovePath(PATH_ENTRY, true);
+ }
+
+ void UnsummonAdds()
+ {
+ if(summoned)
+ {
+ Creature *Nazan = (Creature*)Unit::GetUnit(*m_creature, NazanGUID);
+ Creature *Vazruden = (Creature*)Unit::GetUnit(*m_creature, VazrudenGUID);
+ if(Nazan || (Nazan = (Creature *)FindCreature(ENTRY_NAZAN, 5000)))
+ {
+ Nazan->SetLootRecipient(NULL);
+ Nazan->SetVisibility(VISIBILITY_OFF);
+ Nazan->DealDamage(Nazan, Nazan->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ Nazan->RemoveCorpse();
+ NazanGUID = 0;
+ }
+ if(Vazruden || (Vazruden = (Creature *)FindCreature(ENTRY_VAZRUDEN, 5000)))
+ {
+ Vazruden->SetLootRecipient(NULL);
+ Vazruden->SetVisibility(VISIBILITY_OFF);
+ Vazruden->DealDamage(Vazruden, Vazruden->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ Vazruden->RemoveCorpse();
+ VazrudenGUID = 0;
+ }
+ summoned = false;
+ m_creature->clearUnitState(UNIT_STAT_ROOT);
+ m_creature->SetVisibility(VISIBILITY_ON);
+ }
+ }
+
+ void SummonAdds()
+ {
+ if(!summoned)
+ {
+ Creature* Vazruden = m_creature->SummonCreature(ENTRY_VAZRUDEN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000);
+ VazrudenGUID = Vazruden->GetGUID();
+ Creature* Nazan = m_creature->SummonCreature(ENTRY_NAZAN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000);
+ NazanGUID = Nazan->GetGUID();
+ summoned = true;
+ m_creature->SetVisibility(VISIBILITY_OFF);
+ m_creature->addUnitState(UNIT_STAT_ROOT);
+ }
+ }
+
+ void Aggro(Unit *who)
+ {
+ if(phase==0)
+ {
+ phase = 1;
+ check = 0;
+ DoScriptText(SAY_INTRO, m_creature);
+ }
+ }
+
+ void JustSummoned(Creature *summoned)
+ {
+ if(!summoned) return;
+ Unit *victim = m_creature->getVictim();
+ if(summoned->GetEntry() == ENTRY_NAZAN)
+ {
+ ((boss_nazanAI *)summoned->AI())->VazrudenGUID = VazrudenGUID;
+ summoned->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING);
+ summoned->SetSpeed(MOVE_FLIGHT, 2.5);
+ if(victim)
+ ((ScriptedAI*)summoned->AI())->AttackStart(victim,false);
+ }
+ else if(victim)
+ summoned->AI()->AttackStart(victim);
+ }
+
+ void SentryDownBy(Unit* killer)
+ {
+ if(sentryDown)
+ {
+ AttackStart(killer, false);
+ sentryDown = false;
+ }
+ else
+ sentryDown = true;
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ switch(phase)
+ {
+ case 0: // circle around the platform
+ return;
+ break;
+ case 1: // go to the middle and begin the fight
+ if(check < diff)
+ {
+ if(m_creature->GetDistance(VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2])>5)
+ {
+ m_creature->GetMotionMaster()->Clear();
+ m_creature->GetMotionMaster()->MovePoint(0,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2]);
+ check = 1000;
+ }
+ else
+ {
+ SummonAdds();
+ phase = 2;
+ return;
+ }
+ }else check -= diff;
+ break;
+ default: // adds do the job now
+ if(check < diff)
+ {
+ Creature *Nazan = (Creature*)Unit::GetUnit(*m_creature, NazanGUID);
+ Creature *Vazruden = (Creature*)Unit::GetUnit(*m_creature, VazrudenGUID);
+ if(Nazan && Nazan->isAlive() || Vazruden && Vazruden->isAlive())
+ {
+ if(Nazan && Nazan->getVictim() || Vazruden && Vazruden->getVictim())
+ return;
+ else
+ {
+ UnsummonAdds();
+ EnterEvadeMode();
+ }
+ }else
+ {
+ m_creature->SummonGameObject(ENTRY_REINFORCED_FEL_IRON_CHEST,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,0,0,0,0,0);
+ m_creature->SetLootRecipient(NULL);
+ m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ }
+ check = 2000;
+ }else check -= diff;
+ break;
+ }
+ }
+};
+
+struct TRINITY_DLL_DECL mob_hellfire_sentryAI : public ScriptedAI
+{
+ mob_hellfire_sentryAI(Creature *c) : ScriptedAI(c)
+ { Reset();}
+
+ uint32 KidneyShot_Timer;
+
+ void Reset()
+ {
+ KidneyShot_Timer = 3000+rand()%4000;
+ }
+
+ void Aggro(Unit* who) {}
+
+ void JustDied(Unit* who)
+ {
+ if(Creature *herald = (Creature *)FindCreature(ENTRY_VAZRUDEN_HERALD,150))
+ ((boss_vazruden_the_heraldAI *)herald->AI())->SentryDownBy(who);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
+ return;
+
+ if(KidneyShot_Timer < diff)
+ {
+ if(Unit *victim = m_creature->getVictim())
+ DoCast(victim, SPELL_KIDNEY_SHOT);
+ KidneyShot_Timer = 20000;
+ }else KidneyShot_Timer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+CreatureAI* GetAI_boss_vazruden_the_herald(Creature *_Creature)
+{
+ return new boss_vazruden_the_heraldAI (_Creature);
+}
+
+CreatureAI* GetAI_boss_vazruden(Creature *_Creature)
+{
+ return new boss_vazrudenAI (_Creature);
+}
+
+
+CreatureAI* GetAI_boss_nazan(Creature *_Creature)
+{
+ return new boss_nazanAI (_Creature);
+}
+
+CreatureAI* GetAI_mob_hellfire_sentry(Creature *_Creature)
+{
+ return new mob_hellfire_sentryAI (_Creature);
+}
+
+void AddSC_boss_vazruden_the_herald()
+{
+ Script *newscript;
+ newscript = new Script;
+ newscript->Name="boss_vazruden_the_herald";
+ newscript->GetAI = &GetAI_boss_vazruden_the_herald;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="boss_vazruden";
+ newscript->GetAI = &GetAI_boss_vazruden;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="boss_nazan";
+ newscript->GetAI = &GetAI_boss_nazan;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="mob_hellfire_sentry";
+ newscript->GetAI = &GetAI_mob_hellfire_sentry;
+ newscript->RegisterSelf();
+} \ No newline at end of file
diff --git a/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp b/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp
index 903787adebe..7cea5685e55 100644
--- a/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp
+++ b/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp
@@ -34,13 +34,15 @@ EndContentData */
## npc_ayren_cloudbreaker
######*/
+#define GOSSIP_FLY1 "Speaking of action, I've been ordered to undertake an air strike."
+#define GOSSIP_FLY2 "I need to intercept the Dawnblade reinforcements."
bool GossipHello_npc_ayren_cloudbreaker(Player *player, Creature *_Creature)
{
if( player->GetQuestStatus(11532) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(11533) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(0,"Speaking of action, I've been ordered to undertake an air strike.",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_FLY1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
if( player->GetQuestStatus(11542) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(11543) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(0,"I need to intercept the Dawnblade reinforcements.",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_FLY2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(),_Creature->GetGUID());
return true;
@@ -65,8 +67,8 @@ bool GossipSelect_npc_ayren_cloudbreaker(Player *player, Creature *_Creature, ui
## npc_converted_sentry
######*/
-#define SAY_CONVERTED_1 "Deployment sucessful. Trespassers will be neutralized."
-#define SAY_CONVERTED_2 "Objective acquired. Initiating security routines."
+#define SAY_CONVERTED_1 -1000284
+#define SAY_CONVERTED_2 -1000284
#define SPELL_CONVERT_CREDIT 45009
@@ -95,10 +97,10 @@ struct TRINITY_DLL_DECL npc_converted_sentryAI : public ScriptedAI
if( Timer <= diff )
{
uint32 i = urand(1,2);
- if( i=1 ) DoSay(SAY_CONVERTED_1,LANG_UNIVERSAL,NULL);
- else DoSay(SAY_CONVERTED_2,LANG_UNIVERSAL,NULL);
+ if( i=1 ) DoScriptText(SAY_CONVERTED_1, m_creature);
+ else DoScriptText(SAY_CONVERTED_2, m_creature);
- DoCast(m_creature,SPELL_CONVERT_CREDIT);
+ DoCast(m_creature, SPELL_CONVERT_CREDIT);
((Pet*)m_creature)->SetDuration(7500);
Credit = true;
}else Timer -= diff;
@@ -114,10 +116,12 @@ CreatureAI* GetAI_npc_converted_sentry(Creature *_Creature)
## npc_unrestrained_dragonhawk
######*/
+#define GOSSIP_UD "<Ride the dragonhawk to Sun's Reach>"
+
bool GossipHello_npc_unrestrained_dragonhawk(Player *player, Creature *_Creature)
{
if( player->GetQuestStatus(11542) == QUEST_STATUS_COMPLETE || player->GetQuestStatus(11543) == QUEST_STATUS_COMPLETE )
- player->ADD_GOSSIP_ITEM(0,"<Ride the dragonhawk to Sun's Reach>",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_UD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(),_Creature->GetGUID());
return true;
diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_moroes.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_moroes.cpp
index 3f0d6dd7a27..99283ca7097 100644
--- a/src/bindings/scripts/scripts/zone/karazhan/boss_moroes.cpp
+++ b/src/bindings/scripts/scripts/zone/karazhan/boss_moroes.cpp
@@ -276,13 +276,13 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
{
for (uint8 i = 0; i < 4; ++i)
{
- Unit* Temp = NULL;
+ Creature* Temp = NULL;
if (AddGUID[i])
{
- Temp = Unit::GetUnit((*m_creature),AddGUID[i]);
+ Temp = (Creature*)Unit::GetUnit((*m_creature),AddGUID[i]);
if (Temp && Temp->isAlive())
if (!Temp->SelectHostilTarget() || !Temp->getVictim() )
- ((Creature*)Temp)->AI()->AttackStart(m_creature->getVictim());
+ Temp->AI()->AttackStart(m_creature->getVictim());
}
}
CheckAdds_Timer = 5000;
diff --git a/src/bindings/scripts/scripts/zone/loch_modan/loch_modan.cpp b/src/bindings/scripts/scripts/zone/loch_modan/loch_modan.cpp
index 0e48a72535f..5d0cbad452b 100644
--- a/src/bindings/scripts/scripts/zone/loch_modan/loch_modan.cpp
+++ b/src/bindings/scripts/scripts/zone/loch_modan/loch_modan.cpp
@@ -17,7 +17,7 @@
/* ScriptData
SDName: Loch_Modan
SD%Complete: 100
-SDComment: Quest support: 3181 (only to argue with pebblebitty to get to searing gorge, before quest rewarded)
+SDComment: Quest support: 3181
SDCategory: Loch Modan
EndScriptData */
@@ -31,13 +31,22 @@ EndContentData */
## npc_mountaineer_pebblebitty
######*/
+#define GOSSIP_MP "Open the gate please, i need to get to Searing Gorge"
+
+#define GOSSIP_MP1 "But i need to get there, now open the gate!"
+#define GOSSIP_MP2 "Ok, so what is this other way?"
+#define GOSSIP_MP3 "Doesn't matter, i'm invulnerable."
+#define GOSSIP_MP4 "Yes..."
+#define GOSSIP_MP5 "Ok, i'll try to remember that."
+#define GOSSIP_MP6 "A key? Ok!"
+
bool GossipHello_npc_mountaineer_pebblebitty(Player *player, Creature *_Creature)
{
if (_Creature->isQuestGiver())
player->PrepareQuestMenu( _Creature->GetGUID() );
if (!player->GetQuestRewardStatus(3181) == 1)
- player->ADD_GOSSIP_ITEM( 0, "Open the gate please, i need to get to Searing Gorge", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_MP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
@@ -49,27 +58,27 @@ bool GossipSelect_npc_mountaineer_pebblebitty(Player *player, Creature *_Creatur
switch (action)
{
case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM( 0, "But i need to get there, now open the gate!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_MP1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
player->SEND_GOSSIP_MENU(1833, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM( 0, "Ok, so what is this other way?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_MP2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
player->SEND_GOSSIP_MENU(1834, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
- player->ADD_GOSSIP_ITEM( 0, "Doesn't matter, i'm invulnerable.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_MP3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
player->SEND_GOSSIP_MENU(1835, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
- player->ADD_GOSSIP_ITEM( 0, "Yes...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_MP4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
player->SEND_GOSSIP_MENU(1836, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
- player->ADD_GOSSIP_ITEM( 0, "Ok, i'll try to remember that.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_MP5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
player->SEND_GOSSIP_MENU(1837, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+6:
- player->ADD_GOSSIP_ITEM( 0, "A key? Ok!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_MP6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
player->SEND_GOSSIP_MENU(1838, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+7:
diff --git a/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp b/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp
index 38b38fe9c6b..f2433ea9234 100644
--- a/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp
+++ b/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp
@@ -36,6 +36,9 @@ EndContentData */
## npc_bunthen_plainswind
######*/
+#define GOSSIP_BP1 "Do you know where I can find Half Pendant of Aquatic Endurance?"
+#define GOSSIP_BP2 "I'd like to fly to Thunder Bluff."
+
bool GossipHello_npc_bunthen_plainswind(Player *player, Creature *_Creature)
{
if(player->getClass() != CLASS_DRUID)
@@ -43,16 +46,16 @@ bool GossipHello_npc_bunthen_plainswind(Player *player, Creature *_Creature)
else if(player->GetTeam() != HORDE)
{
if(player->GetQuestStatus(272) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM( 0, "Do you know where I can find Half Pendant of Aquatic Endurance?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_BP1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
player->SEND_GOSSIP_MENU(4917,_Creature->GetGUID());
}
else if(player->getClass() == CLASS_DRUID && player->GetTeam() == HORDE)
{
- player->ADD_GOSSIP_ITEM( 0, "I'd like to fly to Thunder Bluff.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_BP2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
if(player->GetQuestStatus(30) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM( 0, "Do you know where I can find Half Pendant of Aquatic Endurance?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_BP1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
player->SEND_GOSSIP_MENU(4918,_Creature->GetGUID());
}
@@ -141,6 +144,8 @@ bool GossipSelect_npc_great_bear_spirit(Player *player, Creature *_Creature, uin
## npc_silva_filnaveth
######*/
+#define GOSSIP_SF1 "Do you know where I can find Half Pendant of Aquatic Agility?"
+#define GOSSIP_SF2 "I'd like to fly to Rut'theran Village."
bool GossipHello_npc_silva_filnaveth(Player *player, Creature *_Creature)
{
if(player->getClass() != CLASS_DRUID)
@@ -148,16 +153,16 @@ bool GossipHello_npc_silva_filnaveth(Player *player, Creature *_Creature)
else if(player->GetTeam() != ALLIANCE)
{
if(player->GetQuestStatus(30) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM( 0, "Do you know where I can find Half Pendant of Aquatic Agility?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SF1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
player->SEND_GOSSIP_MENU(4915,_Creature->GetGUID());
}
else if(player->getClass() == CLASS_DRUID && player->GetTeam() == ALLIANCE)
{
- player->ADD_GOSSIP_ITEM( 0, "I'd like to fly to Rut'theran Village.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SF2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
if(player->GetQuestStatus(272) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM( 0, "Do you know where I can find Half Pendant of Aquatic Agility?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SF1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
player->SEND_GOSSIP_MENU(4914,_Creature->GetGUID());
}
@@ -243,6 +248,7 @@ float Clintar_spirit_WP[41][5] =
};
#define ASPECT_RAVEN 22915
+
#define ASPECT_RAVEN_SUMMON_X 7472.96
#define ASPECT_RAVEN_SUMMON_Y -3074.18
#define ASPECT_RAVEN_SUMMON_Z 427.566
@@ -250,13 +256,14 @@ float Clintar_spirit_WP[41][5] =
#define CLINTAR_SPIRIT_SUMMON_Y -3122.5632
#define CLINTAR_SPIRIT_SUMMON_Z 438.9842
#define CLINTAR_SPIRIT_SUMMON_O 0.8594
-#define CLINTAR_SPIRIT_SAY_START "A shadowy, sinister presence has invader the Emerald Dream. Its power is poised to spill over into our world, $N. We must oppose it! That's why I cannot accompany you in person."
-#define CLINTAR_SPIRIT_SAY_UNDER_ATTACK_1 "The Emerald Dream will never be yours!"
-#define CLINTAR_SPIRIT_SAY_UNDER_ATTACK_2 "Begone from this place!"
-#define CLINTAR_SPIRIT_SAY_GET_ONE "That's the first relic, but there are still two more. Follow me, $N."
-#define CLINTAR_SPIRIT_SAY_GET_TWO "I've recovered the second relic. Take a moment to rest, and then we'll continue to the last reliquary."
-#define CLINTAR_SPIRIT_SAY_GET_THREE "We have all three of the relics, but my energy is rapidly fading. We must make our way back to Dreamwarden Lurosa! He will let you know what to do next."
-#define CLINTAR_SPIRIT_SAY_GET_FINAL "Lurosa, I am entrusting the Relics of Aviana to $N, who will take them to Morthis Whisperwing. I must return completely to the Emerald Dream now. Do not let $N fail!"
+
+#define CLINTAR_SPIRIT_SAY_START -1000286
+#define CLINTAR_SPIRIT_SAY_UNDER_ATTACK_1 -1000287
+#define CLINTAR_SPIRIT_SAY_UNDER_ATTACK_2 -1000288
+#define CLINTAR_SPIRIT_SAY_GET_ONE -1000289
+#define CLINTAR_SPIRIT_SAY_GET_TWO -1000290
+#define CLINTAR_SPIRIT_SAY_GET_THREE -1000291
+#define CLINTAR_SPIRIT_SAY_GET_FINAL -1000292
struct TRINITY_DLL_DECL npc_clintar_spiritAI : public npc_escortAI
{
@@ -289,6 +296,7 @@ public:
{
if(!PlayerGUID)
return;
+
Player *player = (Player *)Unit::GetUnit((*m_creature), PlayerGUID);
if(player && player->GetQuestStatus(10965) == QUEST_STATUS_INCOMPLETE)
{
@@ -314,12 +322,8 @@ public:
uint32 rnd = rand()%2;
switch(rnd)
{
- case 0:
- m_creature->Say(CLINTAR_SPIRIT_SAY_UNDER_ATTACK_1, 0, who->GetGUID());
- break;
- case 1:
- m_creature->Say(CLINTAR_SPIRIT_SAY_UNDER_ATTACK_2, 0,who->GetGUID());
- break;
+ case 0: DoScriptText(CLINTAR_SPIRIT_SAY_UNDER_ATTACK_1, m_creature, who); break;
+ case 1: DoScriptText(CLINTAR_SPIRIT_SAY_UNDER_ATTACK_2, m_creature, who); break;
}
}
@@ -329,7 +333,7 @@ public:
return;
if(player->GetQuestStatus(10965) == QUEST_STATUS_INCOMPLETE)
{
- for(uint8 i = 0; i < 41; i++)
+ for(uint8 i = 0; i < 41; ++i)
{
AddWaypoint(i, Clintar_spirit_WP[i][0], Clintar_spirit_WP[i][1], Clintar_spirit_WP[i][2], (uint32)Clintar_spirit_WP[i][4]);
}
@@ -392,7 +396,7 @@ public:
break;
case 1:
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
- m_creature->Say(CLINTAR_SPIRIT_SAY_GET_ONE,0,PlayerGUID);
+ DoScriptText(CLINTAR_SPIRIT_SAY_GET_ONE, m_creature, player);
Event_onWait = false;
break;
}
@@ -415,7 +419,7 @@ public:
switch(Step)
{
case 0:
- m_creature->Say(CLINTAR_SPIRIT_SAY_GET_TWO,0,PlayerGUID);
+ DoScriptText(CLINTAR_SPIRIT_SAY_GET_TWO, m_creature, player);
Event_Timer = 15000;
Step = 1;
break;
@@ -462,7 +466,7 @@ public:
switch(Step)
{
case 0:
- m_creature->Say(CLINTAR_SPIRIT_SAY_GET_THREE, 0, PlayerGUID);
+ DoScriptText(CLINTAR_SPIRIT_SAY_GET_THREE, m_creature, player);
Event_Timer = 4000;
Step = 1;
break;
@@ -476,7 +480,7 @@ public:
{
case 0:
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, 2);
- m_creature->Say(CLINTAR_SPIRIT_SAY_GET_FINAL, 0, PlayerGUID);
+ DoScriptText(CLINTAR_SPIRIT_SAY_GET_FINAL, m_creature, player);
player->CompleteQuest(10965);
Event_Timer = 1500;
Step = 1;
diff --git a/src/bindings/scripts/scripts/zone/mulgore/mulgore.cpp b/src/bindings/scripts/scripts/zone/mulgore/mulgore.cpp
index 72125a8e2d9..a2027ac3904 100644
--- a/src/bindings/scripts/scripts/zone/mulgore/mulgore.cpp
+++ b/src/bindings/scripts/scripts/zone/mulgore/mulgore.cpp
@@ -32,13 +32,15 @@ EndContentData */
# npc_skorn_whitecloud
######*/
+#define GOSSIP_SW "Tell me a story, Skorn."
+
bool GossipHello_npc_skorn_whitecloud(Player *player, Creature *_Creature)
{
if (_Creature->isQuestGiver())
player->PrepareQuestMenu( _Creature->GetGUID() );
if (!player->GetQuestRewardStatus(770))
- player->ADD_GOSSIP_ITEM( 0, "Tell me a story, Skorn.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF );
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SW, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF );
player->SEND_GOSSIP_MENU(522,_Creature->GetGUID());
diff --git a/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp b/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp
index c4647f207f2..598d64fdc8d 100644
--- a/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp
+++ b/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp
@@ -80,10 +80,15 @@ CreatureAI* GetAI_mob_shattered_rumbler(Creature *_Creature)
#define SPELL_VISUAL_SLEEP 16093
#define SPELL_SPEAR_THROW 32248
-#define LUMP_SAY0 "In Nagrand, food hunt ogre!"
-#define LUMP_SAY1 "You taste good with maybe a little salt and pepper."
+#define LUMP_SAY0 -1000293
+#define LUMP_SAY1 -1000294
-#define LUMP_DEFEAT "OK, OK! Lump give up!"
+#define LUMP_DEFEAT -1000295
+
+#define GOSSIP_HL "I need answers, ogre!"
+#define GOSSIP_SL1 "Why are Boulderfist out this far? You know that this is Kurenai territory."
+#define GOSSIP_SL2 "And you think you can just eat anything you want? You're obviously trying to eat the Broken of Telaar."
+#define GOSSIP_SL3 "This means war, Lump! War I say!"
struct TRINITY_DLL_DECL mob_lumpAI : public ScriptedAI
{
@@ -121,7 +126,7 @@ struct TRINITY_DLL_DECL mob_lumpAI : public ScriptedAI
m_creature->CombatStop();
m_creature->setFaction(1080); //friendly
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_SIT);
- m_creature->Say(LUMP_DEFEAT, LANG_UNIVERSAL, 0);
+ DoScriptText(LUMP_DEFEAT, m_creature);
bReset = true;
}
@@ -138,12 +143,8 @@ struct TRINITY_DLL_DECL mob_lumpAI : public ScriptedAI
switch(rand()%2)
{
- case 0:
- DoSay(LUMP_SAY0,LANG_UNIVERSAL,NULL);
- break;
- case 1:
- DoSay(LUMP_SAY1,LANG_UNIVERSAL,NULL);
- break;
+ case 0: DoScriptText(LUMP_SAY0, m_creature); break;
+ case 1: DoScriptText(LUMP_SAY1, m_creature); break;
}
}
@@ -184,7 +185,7 @@ CreatureAI* GetAI_mob_lump(Creature *_creature)
bool GossipHello_mob_lump(Player *player, Creature *_Creature)
{
if (player->GetQuestStatus(9918) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM( 0, "I need answers, ogre!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
player->SEND_GOSSIP_MENU(9352, _Creature->GetGUID());
@@ -196,15 +197,15 @@ bool GossipSelect_mob_lump(Player *player, Creature *_Creature, uint32 sender, u
switch (action)
{
case GOSSIP_ACTION_INFO_DEF:
- player->ADD_GOSSIP_ITEM( 0, "Why are Boulderfist out this far? You know that this is Kurenai territory.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SL1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(9353, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM( 0, "And you think you can just eat anything you want? You're obviously trying to eat the Broken of Telaar.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SL2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
player->SEND_GOSSIP_MENU(9354, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM( 0, "This means war, Lump! War I say!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SL3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
player->SEND_GOSSIP_MENU(9355, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
@@ -249,6 +250,17 @@ CreatureAI* GetAI_mob_sunspring_villager(Creature *_Creature)
## npc_altruis_the_sufferer
######*/
+#define GOSSIP_HATS1 "I see twisted steel and smell sundered earth."
+#define GOSSIP_HATS2 "Well...?"
+#define GOSSIP_HATS3 "[PH] Story about Illidan's Pupil"
+
+#define GOSSIP_SATS1 "Legion?"
+#define GOSSIP_SATS2 "And now?"
+#define GOSSIP_SATS3 "How do you see them now?"
+#define GOSSIP_SATS4 "Forge camps?"
+#define GOSSIP_SATS5 "Ok."
+#define GOSSIP_SATS6 "[PH] Story done"
+
bool GossipHello_npc_altruis_the_sufferer(Player *player, Creature *_Creature)
{
if (_Creature->isQuestGiver())
@@ -256,15 +268,15 @@ bool GossipHello_npc_altruis_the_sufferer(Player *player, Creature *_Creature)
//gossip before obtaining Survey the Land
if ( player->GetQuestStatus(9991) == QUEST_STATUS_NONE )
- player->ADD_GOSSIP_ITEM( 0, "I see twisted steel and smell sundered earth.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+10);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HATS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+10);
//gossip when Survey the Land is incomplete (technically, after the flight)
if (player->GetQuestStatus(9991) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM( 0, "Well...?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+20);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HATS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+20);
//wowwiki.com/Varedis
if (player->GetQuestStatus(10646) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM( 0, "[PH] Story about Illidan's Pupil", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+30);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HATS3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+30);
player->SEND_GOSSIP_MENU(9419, _Creature->GetGUID());
@@ -276,19 +288,19 @@ bool GossipSelect_npc_altruis_the_sufferer(Player *player, Creature *_Creature,
switch (action)
{
case GOSSIP_ACTION_INFO_DEF+10:
- player->ADD_GOSSIP_ITEM( 0, "Legion?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SATS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
player->SEND_GOSSIP_MENU(9420, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+11:
- player->ADD_GOSSIP_ITEM( 0, "And now?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SATS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
player->SEND_GOSSIP_MENU(9421, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+12:
- player->ADD_GOSSIP_ITEM( 0, "How do you see them now?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SATS3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13);
player->SEND_GOSSIP_MENU(9422, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+13:
- player->ADD_GOSSIP_ITEM( 0, "Forge camps?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SATS4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14);
player->SEND_GOSSIP_MENU(9423, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+14:
@@ -296,7 +308,7 @@ bool GossipSelect_npc_altruis_the_sufferer(Player *player, Creature *_Creature,
break;
case GOSSIP_ACTION_INFO_DEF+20:
- player->ADD_GOSSIP_ITEM( 0, "Ok.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SATS5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
player->SEND_GOSSIP_MENU(9427, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+21:
@@ -305,7 +317,7 @@ bool GossipSelect_npc_altruis_the_sufferer(Player *player, Creature *_Creature,
break;
case GOSSIP_ACTION_INFO_DEF+30:
- player->ADD_GOSSIP_ITEM( 0, "[PH] Story done", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 31);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SATS6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 31);
player->SEND_GOSSIP_MENU(384, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+31:
@@ -336,6 +348,21 @@ bool QuestAccept_npc_altruis_the_sufferer(Player *player, Creature *creature, Qu
## npc_greatmother_geyah
######*/
+#define GOSSIP_HGG1 "Hello, Greatmother. Garrosh told me that you wanted to speak with me."
+#define GOSSIP_HGG2 "Garrosh is beyond redemption, Greatmother. I fear that in helping the Mag'har, I have convinced Garrosh that he is unfit to lead."
+
+#define GOSSIP_SGG1 "You raised all of the orcs here, Greatmother?"
+#define GOSSIP_SGG2 "Do you believe that?"
+#define GOSSIP_SGG3 "What can be done? I have tried many different things. I have done my best to help the people of Nagrand. Each time I have approached Garrosh, he has dismissed me."
+#define GOSSIP_SGG4 "Left? How can you choose to leave?"
+#define GOSSIP_SGG5 "What is this duty?"
+#define GOSSIP_SGG6 "Is there anything I can do for you, Greatmother?"
+#define GOSSIP_SGG7 "I have done all that I could, Greatmother. I thank you for your kind words."
+#define GOSSIP_SGG8 "Greatmother, you are the mother of Durotan?"
+#define GOSSIP_SGG9 "Greatmother, I never had the honor. Durotan died long before my time, but his heroics are known to all on my world. The orcs of Azeroth reside in a place known as Durotar, named after your son. And ... (You take a moment to breathe and think through what you are about to tell the Greatmother.)"
+#define GOSSIP_SGG10 "It is my Warchief, Greatmother. The leader of my people. From my world. He ... He is the son of Durotan. He is your grandchild."
+#define GOSSIP_SGG11 "I will return to Azeroth at once, Greatmother."
+
//all the textId's for the below is unknown, but i do believe the gossip item texts are proper.
bool GossipHello_npc_greatmother_geyah(Player *player, Creature *_Creature)
{
@@ -344,12 +371,12 @@ bool GossipHello_npc_greatmother_geyah(Player *player, Creature *_Creature)
if (player->GetQuestStatus(10044) == QUEST_STATUS_INCOMPLETE)
{
- player->ADD_GOSSIP_ITEM( 0, "Hello, Greatmother. Garrosh told me that you wanted to speak with me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HGG1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(),_Creature->GetGUID());
}
else if (player->GetQuestStatus(10172) == QUEST_STATUS_INCOMPLETE)
{
- player->ADD_GOSSIP_ITEM( 0, "Garrosh is beyond redemption, Greatmother. I fear that in helping the Mag'har, I have convinced Garrosh that he is unfit to lead.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HGG2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(),_Creature->GetGUID());
}
else
@@ -364,27 +391,27 @@ bool GossipSelect_npc_greatmother_geyah(Player *player, Creature *_Creature, uin
switch (action)
{
case GOSSIP_ACTION_INFO_DEF + 1:
- player->ADD_GOSSIP_ITEM( 0, "You raised all of the orcs here, Greatmother?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SGG1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 2:
- player->ADD_GOSSIP_ITEM( 0, "Do you believe that?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SGG2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 3:
- player->ADD_GOSSIP_ITEM( 0, "What can be done? I have tried many different things. I have done my best to help the people of Nagrand. Each time I have approached Garrosh, he has dismissed me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SGG3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 4:
- player->ADD_GOSSIP_ITEM( 0, "Left? How can you choose to leave?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SGG4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 5:
- player->ADD_GOSSIP_ITEM( 0, "What is this duty?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SGG5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 6:
- player->ADD_GOSSIP_ITEM( 0, "Is there anything I can do for you, Greatmother?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SGG6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 7:
@@ -393,23 +420,23 @@ bool GossipSelect_npc_greatmother_geyah(Player *player, Creature *_Creature, uin
break;
case GOSSIP_ACTION_INFO_DEF + 10:
- player->ADD_GOSSIP_ITEM( 0, "I have done all that I could, Greatmother. I thank you for your kind words.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SGG7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 11:
- player->ADD_GOSSIP_ITEM( 0, "Greatmother, you are the mother of Durotan?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SGG8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 12:
- player->ADD_GOSSIP_ITEM( 0, "Greatmother, I never had the honor. Durotan died long before my time, but his heroics are known to all on my world. The orcs of Azeroth reside in a place known as Durotar, named after your son. And ... (You take a moment to breathe and think through what you are about to tell the Greatmother.)", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SGG9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 13:
- player->ADD_GOSSIP_ITEM( 0, "It is my Warchief, Greatmother. The leader of my people. From my world. He ... He is the son of Durotan. He is your grandchild.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SGG10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 14:
- player->ADD_GOSSIP_ITEM( 0, "I will return to Azeroth at once, Greatmother.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SGG11, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 15:
@@ -424,13 +451,22 @@ bool GossipSelect_npc_greatmother_geyah(Player *player, Creature *_Creature, uin
## npc_lantresor_of_the_blade
######*/
+#define GOSSIP_HLB "I have killed many of your ogres, Lantresor. I have no fear."
+#define GOSSIP_SLB1 "Should I know? You look like an orc to me."
+#define GOSSIP_SLB2 "And the other half?"
+#define GOSSIP_SLB3 "I have heard of your kind, but I never thought to see the day when I would meet a half-breed."
+#define GOSSIP_SLB4 "My apologies. I did not mean to offend. I am here on behalf of my people."
+#define GOSSIP_SLB5 "My people ask that you pull back your Boulderfist ogres and cease all attacks on our territories. In return, we will also pull back our forces."
+#define GOSSIP_SLB6 "We will fight you until the end, then, Lantresor. We will not stand idly by as you pillage our towns and kill our people."
+#define GOSSIP_SLB7 "What do I need to do?"
+
bool GossipHello_npc_lantresor_of_the_blade(Player *player, Creature *_Creature)
{
if (_Creature->isQuestGiver())
player->PrepareQuestMenu( _Creature->GetGUID() );
if (player->GetQuestStatus(10107) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(10108) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM( 0, "I have killed many of your ogres, Lantresor. I have no fear.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HLB, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
player->SEND_GOSSIP_MENU(9361, _Creature->GetGUID());
@@ -442,31 +478,31 @@ bool GossipSelect_npc_lantresor_of_the_blade(Player *player, Creature *_Creature
switch (action)
{
case GOSSIP_ACTION_INFO_DEF:
- player->ADD_GOSSIP_ITEM( 0, "Should I know? You look like an orc to me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SLB1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(9362, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM( 0, "And the other half?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SLB2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
player->SEND_GOSSIP_MENU(9363, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM( 0, "I have heard of your kind, but I never thought to see the day when I would meet a half-breed.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SLB3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
player->SEND_GOSSIP_MENU(9364, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
- player->ADD_GOSSIP_ITEM( 0, "My apologies. I did not mean to offend. I am here on behalf of my people.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SLB4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
player->SEND_GOSSIP_MENU(9365, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
- player->ADD_GOSSIP_ITEM( 0, "My people ask that you pull back your Boulderfist ogres and cease all attacks on our territories. In return, we will also pull back our forces.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SLB5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
player->SEND_GOSSIP_MENU(9366, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
- player->ADD_GOSSIP_ITEM( 0, "We will fight you until the end, then, Lantresor. We will not stand idly by as you pillage our towns and kill our people.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SLB6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
player->SEND_GOSSIP_MENU(9367, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+6:
- player->ADD_GOSSIP_ITEM( 0, "What do I need to do?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SLB7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
player->SEND_GOSSIP_MENU(9368, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+7:
@@ -481,7 +517,7 @@ bool GossipSelect_npc_lantresor_of_the_blade(Player *player, Creature *_Creature
}
/*######
-## npc_creditmarker_visist_with_ancestors (Quest 10085)
+## npc_creditmarker_visist_with_ancestors
######*/
struct TRINITY_DLL_DECL npc_creditmarker_visit_with_ancestorsAI : public ScriptedAI
@@ -575,7 +611,7 @@ struct TRINITY_DLL_DECL mob_sparrowhawkAI : public ScriptedAI
fleeing = false;
Player *player = (Player *)Unit::GetUnit((*m_creature), PlayerGUID);
- if(player && m_creature->IsWithinDistInMap(player, 30)/* && m_creature->CanFreeMove()*/)
+ if(player && m_creature->IsWithinDistInMap(player, 30))
{
if(!fleeing)
{
diff --git a/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp b/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp
index 9237f9f4b3a..eb1da1748a8 100644
--- a/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp
+++ b/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp
@@ -37,12 +37,12 @@ EndContentData */
## npc_manaforge_control_console
######*/
-#define EMOTE_START "Warning! Emergency shutdown process initiated by $N. Shutdown will complete in two minutes."
-#define EMOTE_60 "Emergency shutdown will complete in one minute."
-#define EMOTE_30 "Emergency shutdown will complete in thirty seconds."
-#define EMOTE_10 "Emergency shutdown will complete in ten seconds."
-#define EMOTE_COMPLETE "Emergency shutdown complete."
-#define EMOTE_ABORT "Emergency shutdown aborted."
+#define EMOTE_START -1000296
+#define EMOTE_60 -1000297
+#define EMOTE_30 -1000298
+#define EMOTE_10 -1000299
+#define EMOTE_COMPLETE -1000300
+#define EMOTE_ABORT -1000301
#define ENTRY_BNAAR_C_CONSOLE 20209
#define ENTRY_CORUU_C_CONSOLE 20417
@@ -95,7 +95,7 @@ struct TRINITY_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI
void JustDied(Unit* killer)
{
- DoTextEmote(EMOTE_ABORT, NULL);
+ DoScriptText(EMOTE_ABORT, m_creature);
if( someplayer )
{
@@ -227,32 +227,32 @@ struct TRINITY_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI
case 1:
if( someplayer )
{
- Unit* u = Unit::GetUnit((*m_creature),someplayer);
- if( u && u->GetTypeId() == TYPEID_PLAYER ) DoTextEmote(EMOTE_START, u);
+ Unit* u = Unit::GetUnit((*m_creature), someplayer);
+ if( u && u->GetTypeId() == TYPEID_PLAYER ) DoScriptText(EMOTE_START, m_creature, u);
}
Event_Timer = 60000;
Wave = true;
++Phase;
break;
case 2:
- DoTextEmote(EMOTE_60, NULL);
+ DoScriptText(EMOTE_60, m_creature);
Event_Timer = 30000;
++Phase;
break;
case 3:
- DoTextEmote(EMOTE_30, NULL);
+ DoScriptText(EMOTE_30, m_creature);
Event_Timer = 20000;
DoFinalSpawnForCreature(m_creature);
++Phase;
break;
case 4:
- DoTextEmote(EMOTE_10, NULL);
+ DoScriptText(EMOTE_10, m_creature);
Event_Timer = 10000;
Wave = false;
++Phase;
break;
case 5:
- DoTextEmote(EMOTE_COMPLETE, NULL);
+ DoScriptText(EMOTE_COMPLETE, m_creature);
if( someplayer )
{
Unit* u = Unit::GetUnit((*m_creature),someplayer);
@@ -488,7 +488,7 @@ struct TRINITY_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI
return true;
}
- debug_log("SD2: npc_commander_dawnforge event already in progress, need to wait.");
+ debug_log("TSCR: npc_commander_dawnforge event already in progress, need to wait.");
return false;
}
@@ -707,7 +707,7 @@ bool GossipSelect_npc_protectorate_nether_drake(Player *player, Creature *_Creat
#define SPELL_PHASE_DISTRUPTOR 35780
#define GOSSIP_ITEM "I need a new phase distruptor, Professor"
-#define WHISPER_DABIRI "Saeed is currently engaged or awaiting orders to engage. You may check directly east of me and see if Saeed is ready for you. If he is not present then he is off fighting another battle. I recommend that you wait for him to return before attacking Dimensius."
+#define WHISPER_DABIRI -1000302
#define QUEST_DIMENSIUS 10439
#define QUEST_ON_NETHERY_WINGS 10438
@@ -739,7 +739,7 @@ bool GossipSelect_npc_professor_dabiri(Player *player, Creature *_Creature, uint
bool QuestAccept_npc_professor_dabiri(Player *player, Creature *creature, Quest const *quest )
{
if(quest->GetQuestId() == QUEST_DIMENSIUS)
- creature->Whisper(WHISPER_DABIRI, player->GetGUID(), false);
+ DoScriptText(WHISPER_DABIRI, creature, player);
return true;
}
@@ -748,6 +748,8 @@ bool QuestAccept_npc_professor_dabiri(Player *player, Creature *creature, Quest
## npc_veronia
######*/
+#define GOSSIP_HV "Fly me to Manaforge Coruu please"
+
bool GossipHello_npc_veronia(Player *player, Creature *_Creature)
{
if (_Creature->isQuestGiver())
@@ -755,7 +757,7 @@ bool GossipHello_npc_veronia(Player *player, Creature *_Creature)
//Behind Enemy Lines
if (player->GetQuestStatus(10652) && !player->GetQuestRewardStatus(10652))
- player->ADD_GOSSIP_ITEM(0, "Fly me to Manaforge Coruu please", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_HV, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
@@ -777,7 +779,7 @@ bool GossipSelect_npc_veronia(Player *player, Creature *_Creature, uint32 sender
######*/
#define SUMMONED_MOB 19595
-#define EMOTE_WEAK "is very weak"
+#define EMOTE_WEAK -1000303
// Spells
#define SPELL_PHASE_SLIP 36574
@@ -853,7 +855,7 @@ struct TRINITY_DLL_DECL mob_phase_hunterAI : public ScriptedAI
if(target && !Weak && m_creature->GetHealth() < (m_creature->GetMaxHealth() / 100 * WeakPercent)
&& ((Player*)target)->GetQuestStatus(10190) == QUEST_STATUS_INCOMPLETE)
{
- DoTextEmote(EMOTE_WEAK, 0);
+ DoScriptText(EMOTE_WEAK, m_creature);
Weak = true;
}
if(Weak && !Drained && m_creature->HasAura(34219, 0))
@@ -896,11 +898,11 @@ CreatureAI* GetAI_mob_phase_hunter(Creature *_Creature)
######*/
#define Q_ALMABTRIEB 10337
-#define N_THADELL 20464
+#define N_THADELL 20464
#define SPAWN_FIRST 20512
-#define SPAWN_SECOND 19881
-#define SAY_THADELL_1 "Bessy, is that you?"
-#define SAY_THADELL_2 "Thank you for bringing back my Bessy, $N. I couldn't live without her!"
+#define SPAWN_SECOND 19881
+#define SAY_THADELL_1 -1000304
+#define SAY_THADELL_2 -1000305
struct TRINITY_DLL_DECL npc_bessyAI : public npc_escortAI
{
@@ -946,11 +948,11 @@ struct TRINITY_DLL_DECL npc_bessyAI : public npc_escortAI
}
{Unit* Thadell = FindCreature(N_THADELL, 30);
if(Thadell)
- ((Creature*)Thadell)->Say(SAY_THADELL_1, LANG_UNIVERSAL, NULL);}break;
+ DoScriptText(SAY_THADELL_1, m_creature);}break;
case 13:
{Unit* Thadell = FindCreature(N_THADELL, 30);
if(Thadell)
- ((Creature*)Thadell)->Say(SAY_THADELL_2, LANG_UNIVERSAL, NULL);}break;
+ DoScriptText(SAY_THADELL_2, m_creature, player);}break;
}
}
@@ -964,6 +966,7 @@ struct TRINITY_DLL_DECL npc_bessyAI : public npc_escortAI
void Reset()
{
Completed = false;
+ m_creature->setFaction(35);
}
void UpdateAI(const uint32 diff)
diff --git a/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp b/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp
index 55b3a3a17df..8c70e1bd501 100644
--- a/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp
+++ b/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp
@@ -35,13 +35,15 @@ EndContentData */
#define QUEST_5727 5727
+#define GOSSIP_HNF "You may speak frankly, Neeru..."
+#define GOSSIP_SNF "[PH] ..."
bool GossipHello_npc_neeru_fireblade(Player *player, Creature *_Creature)
{
if (_Creature->isQuestGiver())
player->PrepareQuestMenu( _Creature->GetGUID() );
if (player->GetQuestStatus(QUEST_5727) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(0, "You may speak frankly, Neeru...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_HNF, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(4513, _Creature->GetGUID());
return true;
@@ -52,7 +54,7 @@ bool GossipSelect_npc_neeru_fireblade(Player *player, Creature *_Creature, uint3
switch (action)
{
case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM(0, "[PH] ...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_SNF, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
player->SEND_GOSSIP_MENU(4513, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
@@ -150,6 +152,14 @@ bool ReciveEmote_npc_shenthul(Player *player, Creature *_Creature, uint32 emote)
#define SPELL_CHAIN_LIGHTNING 16033
#define SPELL_SHOCK 16034
+#define GOSSIP_HTW "Please share your wisdom with me, Warchief."
+#define GOSSIP_STW1 "What discoveries?"
+#define GOSSIP_STW2 "Usurper?"
+#define GOSSIP_STW3 "With all due respect, Warchief - why not allow them to be destroyed? Does this not strengthen our position?"
+#define GOSSIP_STW4 "I... I did not think of it that way, Warchief."
+#define GOSSIP_STW5 "I live only to serve, Warchief! My life is empty and meaningless without your guidance."
+#define GOSSIP_STW6 "Of course, Warchief!"
+
//TODO: verify abilities/timers
struct TRINITY_DLL_DECL npc_thrall_warchiefAI : public ScriptedAI
{
@@ -197,7 +207,7 @@ bool GossipHello_npc_thrall_warchief(Player *player, Creature *_Creature)
player->PrepareQuestMenu( _Creature->GetGUID() );
if (player->GetQuestStatus(QUEST_6566) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(0, "Please share your wisdom with me, Warchief.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_HTW, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
return true;
@@ -208,27 +218,27 @@ bool GossipSelect_npc_thrall_warchief(Player *player, Creature *_Creature, uint3
switch (action)
{
case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM(0, "What discoveries?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_STW1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
player->SEND_GOSSIP_MENU(5733, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM(0, "Usurper?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_STW2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
player->SEND_GOSSIP_MENU(5734, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
- player->ADD_GOSSIP_ITEM(0, "With all due respect, Warchief - why not allow them to be destroyed? Does this not strengthen our position?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_STW3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
player->SEND_GOSSIP_MENU(5735, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
- player->ADD_GOSSIP_ITEM(0, "I... I did not think of it that way, Warchief.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_STW4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
player->SEND_GOSSIP_MENU(5736, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
- player->ADD_GOSSIP_ITEM(0, "I live only to serve, Warchief! My life is empty and meaningless without your guidance.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_STW5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
player->SEND_GOSSIP_MENU(5737, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+6:
- player->ADD_GOSSIP_ITEM(0, "Of course, Warchief!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_STW6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7);
player->SEND_GOSSIP_MENU(5738, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+7:
diff --git a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
index 38f84f5ca7a..b4596fb8a90 100644
--- a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
+++ b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
@@ -30,6 +30,7 @@ npc_murkblood_overseer
npc_neltharaku
npc_karynaku
npc_oronok_tornheart
+npc_overlord_morghor
npc_earthmender_wilda
EndContentData */
@@ -44,7 +45,7 @@ EndContentData */
#define SPELL_JUST_EATEN 38502
#define SPELL_NETHER_BREATH 38467
-#define SAY_JUST_EATEN "Thank you, mortal."
+#define SAY_JUST_EATEN -1000222
struct TRINITY_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI
{
@@ -120,7 +121,7 @@ struct TRINITY_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI
IsEating = false;
DoCast(m_creature, SPELL_JUST_EATEN);
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
- DoSay(SAY_JUST_EATEN, LANG_DRACONIC, NULL);
+ DoScriptText(SAY_JUST_EATEN, m_creature);
if(PlayerGUID)
{
Player* plr = ((Player*)Unit::GetUnit((*m_creature), PlayerGUID));
@@ -416,12 +417,15 @@ bool GossipSelect_npc_drake_dealer_hurlunk(Player *player, Creature *_Creature,
## npc_flanis_swiftwing_and_kagrosh
######*/
+#define GOSSIP_HSK1 "Take Flanis's Pack"
+#define GOSSIP_HSK2 "Take Kagrosh's Pack"
+
bool GossipHello_npcs_flanis_swiftwing_and_kagrosh(Player *player, Creature *_Creature)
{
if (player->GetQuestStatus(10583) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(30658,1,true))
- player->ADD_GOSSIP_ITEM( 0, "Take Flanis's Pack", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HSK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
if (player->GetQuestStatus(10601) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(30659,1,true))
- player->ADD_GOSSIP_ITEM( 0, "Take Kagrosh's Pack", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HSK2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
@@ -459,10 +463,17 @@ bool GossipSelect_npcs_flanis_swiftwing_and_kagrosh(Player *player, Creature *_C
#define QUEST_11082 11082
+#define GOSSIP_HMO "I am here for you, overseer."
+#define GOSSIP_SMO1 "How dare you question an overseer of the Dragonmaw!"
+#define GOSSIP_SMO2 "Who speaks of me? What are you talking about, broken?"
+#define GOSSIP_SMO3 "Continue please."
+#define GOSSIP_SMO4 "Who are these bidders?"
+#define GOSSIP_SMO5 "Well... yes."
+
bool GossipHello_npc_murkblood_overseer(Player *player, Creature *_Creature)
{
if (player->GetQuestStatus(QUEST_11082) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM( 0, "I am here for you, overseer.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HMO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(10940, _Creature->GetGUID());
return true;
@@ -473,27 +484,27 @@ bool GossipSelect_npc_murkblood_overseer(Player *player, Creature *_Creature, ui
switch (action)
{
case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM(0, "How dare you question an overseer of the Dragonmaw!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_SMO1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
//correct id not known
player->SEND_GOSSIP_MENU(10940, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM(0, "Who speaks of me? What are you talking about, broken?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_SMO2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
//correct id not known
player->SEND_GOSSIP_MENU(10940, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
- player->ADD_GOSSIP_ITEM(0, "Continue please.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_SMO3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
//correct id not known
player->SEND_GOSSIP_MENU(10940, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
- player->ADD_GOSSIP_ITEM(0, "Who are these bidders?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_SMO4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
//correct id not known
player->SEND_GOSSIP_MENU(10940, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
- player->ADD_GOSSIP_ITEM(0, "Well... yes.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_SMO5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
//correct id not known
player->SEND_GOSSIP_MENU(10940, _Creature->GetGUID());
break;
@@ -511,13 +522,18 @@ bool GossipSelect_npc_murkblood_overseer(Player *player, Creature *_Creature, ui
## npc_neltharaku
######*/
+#define GOSSIP_HN "I am listening, dragon"
+#define GOSSIP_SN1 "But you are dragons! How could orcs do this to you?"
+#define GOSSIP_SN2 "Your mate?"
+#define GOSSIP_SN3 "I have battled many beasts, dragon. I will help you."
+
bool GossipHello_npc_neltharaku(Player *player, Creature *_Creature)
{
if (_Creature->isQuestGiver())
player->PrepareQuestMenu( _Creature->GetGUID() );
if (player->GetQuestStatus(10814) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM( 0, "I am listening, dragon", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(10613, _Creature->GetGUID());
@@ -529,15 +545,15 @@ bool GossipSelect_npc_neltharaku(Player *player, Creature *_Creature, uint32 sen
switch (action)
{
case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM( 0, "But you are dragons! How could orcs do this to you?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SN1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
player->SEND_GOSSIP_MENU(10614, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM( 0, "Your mate?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SN2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
player->SEND_GOSSIP_MENU(10615, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
- player->ADD_GOSSIP_ITEM( 0, "I have battled many beasts, dragon. I will help you.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SN3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
player->SEND_GOSSIP_MENU(10616, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
@@ -637,402 +653,195 @@ bool QuestAccept_npc_karynaku(Player* player, Creature* creature, Quest const* q
}
/*####
-# quest_lord_illidan_stormrage
+# npc_overlord_morghor
####*/
+
#define QUEST_LORD_ILLIDAN_STORMRAGE 11108
-#define LORD_ILLIDAN_STORMRAGE 22083
+
+#define C_ILLIDAN 22083
+#define C_YARZILL 23141
#define SPELL_ONE 39990 // Red Lightning Bolt
#define SPELL_TWO 41528 // Mark of Stormrage
#define SPELL_THREE 40216 // Dragonaw Faction
#define SPELL_FOUR 42016 // Dragonaw Trasform
-#define OVERLORD_SAY_1 "Come, $N. Lord Stormrage awaits."
-#define OVERLORD_SAY_2 "Lord Illidan will be here shortly."
-#define OVERLORD_SAY_3 "Lord Illidan, this is the Dragonmaw that I, and others, have told you about. He will lead us to victory!"
-#define OVERLORD_SAY_4 "But... My lord, I do not understand. $N... He is the orc that has..."
-#define OVERLORD_SAY_5 "It will be done, my lord."
-#define OVERLORD_SAY_6 "So you thought to make a fool of Mor'ghor, eh? Before you are delivered to Lord Illidan, you will feel pain that you could not know to exist. I will take pleasure in exacting my own vengeance."
-
-#define OVERLORD_YELL_1 "Warriors of Dragonmaw, gather 'round! One among you has attained the rank of highlord! Bow your heads in reverence! Show your respect and allegiance to Highlord $N!"
-#define OVERLORD_YELL_2 "All hail Lord Illidan!"
-
-#define LORD_ILLIDAN_SAY_1 "What is the meaning of this, Mor'ghor?"
-#define LORD_ILLIDAN_SAY_2 "SILENCE!"
-#define LORD_ILLIDAN_SAY_3 "Blathering idiot. You incomprehensibly incompetent buffoon..."
-#define LORD_ILLIDAN_SAY_4 "THIS is your hero?"
-#define LORD_ILLIDAN_SAY_5 "You have been deceived, imbecile."
-#define LORD_ILLIDAN_SAY_6 "This... whole... operation... HAS BEEN COMPROMISED!"
-#define LORD_ILLIDAN_SAY_7 "I expect to see this insect's carcass in pieces in my lair within the hour. Fail and you will suffer a fate so much worse than death."
+#define OVERLORD_SAY_1 -1000206
+#define OVERLORD_SAY_2 -1000207
+#define OVERLORD_SAY_3 -1000208
+#define OVERLORD_SAY_4 -1000209
+#define OVERLORD_SAY_5 -1000210
+#define OVERLORD_SAY_6 -1000211
-#define YARZILL_THE_MERC_SAY "You will not harm the boy, Mor'ghor! Quickly, $N, climb on my back!"
+#define OVERLORD_YELL_1 -1000212
+#define OVERLORD_YELL_2 -1000213
-#define GOSSIP_FLY "Lets Do! <MISSING TEXT>"
+#define LORD_ILLIDAN_SAY_1 -1000214
+#define LORD_ILLIDAN_SAY_2 -1000215
+#define LORD_ILLIDAN_SAY_3 -1000216
+#define LORD_ILLIDAN_SAY_4 -1000217
+#define LORD_ILLIDAN_SAY_5 -1000218
+#define LORD_ILLIDAN_SAY_6 -1000219
+#define LORD_ILLIDAN_SAY_7 -1000220
-bool GossipHello_npc_yarzill_fly(Player *player, Creature *_Creature)
-{
- if (player->GetQuestStatus(QUEST_LORD_ILLIDAN_STORMRAGE) == QUEST_STATUS_COMPLETE)
- {
- player->ADD_GOSSIP_ITEM(0, GOSSIP_FLY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
- player->SEND_GOSSIP_MENU(3961,_Creature->GetGUID());
- return true;
- }else{
- return false;
- }
-}
-
-bool GossipSelect_npc_yarzill_fly(Player *player, Creature *_Creature, uint32 sender, uint32 action)
-{
- if (action == GOSSIP_ACTION_INFO_DEF + 1)
- {
- std::vector<uint32> nodes;
- nodes.resize(2);
- nodes[0] = 173;
- nodes[1] = 174;
- error_log("SD2: Player %s started quest 11108 which has disabled taxi node, need to be fixed in core", player->GetName());
- //player->ActivateTaxiPathTo(nodes, 23468);
- return true;
- }
- return false;
-}
-
-struct TRINITY_DLL_DECL Yarzill_The_MercAI : public ScriptedAI
-{
- Yarzill_The_MercAI(Creature *c) : ScriptedAI(c) {Reset();}
-
-void Reset(){}
-
-void Aggro(Unit *who){}
-
-void DoSpeach(Unit *target)
-{
-DoSay(YARZILL_THE_MERC_SAY,LANG_UNIVERSAL,target);
-}
-};
+#define YARZILL_THE_MERC_SAY -1000221
-struct TRINITY_DLL_DECL Lord_IllidanAI : public ScriptedAI
+struct TRINITY_DLL_DECL npc_overlord_morghorAI : public ScriptedAI
{
-Lord_IllidanAI(Creature *c) : ScriptedAI(c) {Reset();}
-
-void Reset(){}
-
-void Aggro(Unit *who){}
-
-void DoSpeach(int phase)
-{
- switch(phase)
- {
- case 1:
- DoSay(LORD_ILLIDAN_SAY_1,LANG_UNIVERSAL,NULL);
- break;
- case 2:
- DoSay(LORD_ILLIDAN_SAY_2,LANG_UNIVERSAL,NULL);
- break;
- case 3:
- DoSay(LORD_ILLIDAN_SAY_3,LANG_UNIVERSAL,NULL);
- break;
- case 4:
- DoSay(LORD_ILLIDAN_SAY_4,LANG_UNIVERSAL,NULL);
- break;
- case 5:
- DoSay(LORD_ILLIDAN_SAY_5,LANG_UNIVERSAL,NULL);
- break;
- case 6:
- DoSay(LORD_ILLIDAN_SAY_6,LANG_UNIVERSAL,NULL);
- break;
- case 7:
- DoSay(LORD_ILLIDAN_SAY_7,LANG_UNIVERSAL,NULL);
- break;
- case 0:
- default:
- break;
- }
-}
-};
-
-struct TRINITY_DLL_DECL Overlord_MorghorAI : public ScriptedAI
-{
- Overlord_MorghorAI(Creature *c) : ScriptedAI(c)
- {
- Lord = NULL;
- Yarzill = NULL;
- Reset();
- }
-
- Unit* m_player;
- Unit* PlayerCheck;
-
- uint32 SpeachTimer;
- uint32 SpeachNum;
+ npc_overlord_morghorAI(Creature *c) : ScriptedAI(c) {Reset();}
uint64 PlayerGUID;
- uint64 YazillGUID;
+ uint64 IllidanGUID;
- bool DoingSpeach;
- bool Failed;
+ uint32 ConversationTimer;
+ uint32 Step;
- Creature* Lord;
- Creature* Yarzill;
+ bool Event;
void Reset()
{
- if (Lord)
- {
- Lord->SetUInt64Value(UNIT_FIELD_TARGET, 0);
- Lord->SetVisibility(VISIBILITY_OFF);
- Lord->setDeathState(JUST_DIED);
- }
+ PlayerGUID = 0;
+ IllidanGUID = 0;
- if (Yarzill)
- {
- Yarzill->SetUInt64Value(UNIT_FIELD_TARGET, 0);
- }
+ ConversationTimer = 0;
+ Step = 0;
- m_creature->Relocate(-5085.77, 577.231, 86.6719, 2.32608);
- m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 2);
- m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0);
- m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
- m_player = NULL;
- PlayerCheck = NULL;
- PlayerGUID = 0;
- YazillGUID = 0;
- Lord = NULL;
- Yarzill = NULL;
- DoingSpeach = false;
- Failed = false;
- SpeachNum = 0;
- SpeachTimer = 0;
+ Event = false;
}
- void BeginSpeach(Unit* target)
+ void Aggro(Unit* who){}
+
+ void StartEvent()
{
m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 0);
- m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
- DoSay(OVERLORD_SAY_1,LANG_UNIVERSAL,target);
- m_player = target;
- PlayerCheck = NULL;
- PlayerGUID = target->GetGUID();
- SpeachTimer = 4200;
- SpeachNum = 0;
- DoingSpeach = true;
+ m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
+ Unit* Illidan = m_creature->SummonCreature(C_ILLIDAN, -5107.83, 602.584, 85.2393, 4.92598, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ IllidanGUID = Illidan->GetGUID();
+ Illidan->SetVisibility(VISIBILITY_OFF);
+ if(PlayerGUID)
+ {
+ Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
+ DoScriptText(OVERLORD_SAY_1, m_creature, player);
+ }
+ ConversationTimer = 4200;
+ Step = 0;
+ Event = true;
}
- void Aggro(Unit *who){}
-
- void MoveInLineOfSight(Unit *who)
+ uint32 NextStep(uint32 Step)
{
- if (!who)
- return;
+ Unit* plr = Unit::GetUnit((*m_creature), PlayerGUID);
+
+ Unit* Illi = Unit::GetUnit((*m_creature), IllidanGUID);
- if (DoingSpeach)
+ switch(Step)
{
- if (who->GetEntry() == 23141 && m_creature->IsWithinDistInMap(who, 15))
+ case 0: return 0; break;
+ case 1: m_creature->GetMotionMaster()->MovePoint(0, -5104.41, 595.297, 85.6838); return 9000; break;
+ case 2: DoScriptText(OVERLORD_YELL_1, m_creature, plr); return 4500; break;
+ case 3: m_creature->SetInFront(plr); return 3200; break;
+ case 4: DoScriptText(OVERLORD_SAY_2, m_creature, plr); return 2000; break;
+ case 5: Illi->SetVisibility(VISIBILITY_ON); return 350; break;
+ case 6:
+ Illi->CastSpell(Illi, SPELL_ONE, true);
+ Illi->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID());
+ m_creature->SetUInt64Value(UNIT_FIELD_TARGET, IllidanGUID);
+ return 2000; break;
+ case 7: DoScriptText(OVERLORD_YELL_2, m_creature); return 4500; break;
+ case 8: m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 8); return 2500; break;
+ case 9: DoScriptText(OVERLORD_SAY_3, m_creature); return 6500; break;
+ case 10: DoScriptText(LORD_ILLIDAN_SAY_1, Illi); return 5000; break;
+ case 11: DoScriptText(OVERLORD_SAY_4, m_creature, plr); return 6000; break;
+ case 12: DoScriptText(LORD_ILLIDAN_SAY_2, Illi); return 5500; break;
+ case 13: DoScriptText(LORD_ILLIDAN_SAY_3, Illi); return 4000; break;
+ case 14: Illi->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID); return 1500; break;
+ case 15: DoScriptText(LORD_ILLIDAN_SAY_4, Illi); return 1500; break;
+ case 16:
+ if (plr)
{
- if (!YazillGUID)
- {
- YazillGUID = who->GetGUID();
- }
- }
+ Illi->CastSpell(plr, SPELL_TWO, true);
+ plr->RemoveAurasDueToSpell(SPELL_THREE);
+ plr->RemoveAurasDueToSpell(SPELL_FOUR);
+ return 5000;
+ }else{
+ ((Player*)plr)->FailQuest(QUEST_LORD_ILLIDAN_STORMRAGE); Step = 30; return 100;
+ }break;
+ case 17: DoScriptText(LORD_ILLIDAN_SAY_5, Illi); return 5000; break;
+ case 18: DoScriptText(LORD_ILLIDAN_SAY_6, Illi); return 5000; break;
+ case 19: DoScriptText(LORD_ILLIDAN_SAY_7, Illi); return 5000; break;
+ case 20:
+ Illi->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
+ Illi->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING);
+ return 500; break;
+ case 21: DoScriptText(OVERLORD_SAY_5, m_creature); return 500; break;
+ case 22:
+ Illi->SetVisibility(VISIBILITY_OFF);
+ Illi->setDeathState(JUST_DIED);
+ return 1000; break;
+ case 23: m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0); return 2000; break;
+ case 24: m_creature->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID); return 5000; break;
+ case 25: DoScriptText(OVERLORD_SAY_6, m_creature); return 2000; break;
+ case 26: ((Player*)plr)->CompleteQuest(QUEST_LORD_ILLIDAN_STORMRAGE); return 6000; break;
+ case 27:
+ {
+ Unit* Yarzill = FindCreature(C_YARZILL, 50);
+ if (Yarzill)
+ Yarzill->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID);
+ return 500; }break;
+ case 28:
+ plr->RemoveAurasDueToSpell(SPELL_TWO);
+ plr->RemoveAurasDueToSpell(41519);
+ plr->CastSpell(plr, SPELL_THREE, true);
+ plr->CastSpell(plr, SPELL_FOUR, true);
+ return 1000; break;
+ case 29:
+ {
+ Unit* Yarzill = FindCreature(C_YARZILL, 50);
+ if(Yarzill)
+ DoScriptText(YARZILL_THE_MERC_SAY, Yarzill, plr);
+ return 5000; }break;
+ case 30:
+ {
+ Unit* Yarzill = FindCreature(C_YARZILL, 50);
+ if (Yarzill)
+ Yarzill->SetUInt64Value(UNIT_FIELD_TARGET, 0);
+ return 5000; }break;
+ case 31:
+ {
+ Unit* Yarzill = FindCreature(C_YARZILL, 50);
+ if (Yarzill)
+ Yarzill->CastSpell(plr, 41540, true);
+ return 1000;}break;
+ case 32: m_creature->GetMotionMaster()->MovePoint(0, -5085.77, 577.231, 86.6719); return 5000; break;
+ case 33: Reset(); return 100; break;
+
+ default : return 9999999;
}
}
void UpdateAI(const uint32 diff)
{
- //Speach
- if (DoingSpeach)
+ if(ConversationTimer < diff)
{
- if (SpeachTimer < diff)
+ if(Event && IllidanGUID && PlayerGUID)
{
- if (YazillGUID && !Yarzill)
- Yarzill = ((Creature*)Unit::GetUnit((*m_creature), YazillGUID));
-
- if (!m_creature->IsWithinDistInMap(m_player, 50) && ((Player*)m_player)->GetQuestStatus(QUEST_LORD_ILLIDAN_STORMRAGE) == QUEST_STATUS_INCOMPLETE)
- {
- ((Player*)m_player)->FailQuest(QUEST_LORD_ILLIDAN_STORMRAGE);
- SpeachNum = 30;
- }
-
- switch (SpeachNum)
- {
- // Overlord Movement
- case 0:
- m_creature->GetMotionMaster()->MovePoint(0, -5104.41, 595.297, 85.6838);
- SpeachTimer = 9000; SpeachNum++; break;
- // Overlord Yell 1
- case 1:
- m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_SHOUT);
- DoYell(OVERLORD_YELL_1,LANG_UNIVERSAL,m_player);
- SpeachTimer = 4500; SpeachNum++; break;
- // Overlord Angle
- case 2:
- m_creature->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID);
- SpeachTimer = 3200; SpeachNum++; break;
- // Overlord Say 2
- case 3:
- DoSay(OVERLORD_SAY_2,LANG_UNIVERSAL,NULL);
- SpeachTimer = 2000; SpeachNum++; break;
- // Summon Illidan
- case 4:
- Lord = m_creature->SummonCreature(LORD_ILLIDAN_STORMRAGE, -5107.83, 602.584, 85.2393, 4.92598, TEMPSUMMON_CORPSE_DESPAWN, 0);
- Lord->LoadCreaturesAddon();
- SpeachTimer = 350; SpeachNum++; break;
- // Illidan Cast Red Bolt
- case 5:
- Lord->CastSpell(Lord, SPELL_ONE, true);
- Lord->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID());
- m_creature->SetUInt64Value(UNIT_FIELD_TARGET, Lord->GetGUID());
- SpeachTimer = 2000; SpeachNum++; break;
- // Overlord Yell 2
- case 6:
- DoYell(OVERLORD_YELL_2,LANG_UNIVERSAL,NULL);
- SpeachTimer = 4500; SpeachNum++; break;
- // Overlord Kneel
- case 7:
- m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,8);
- SpeachTimer = 2500; SpeachNum++; break;
- // Overlord Say 3
- case 8:
- DoSay(OVERLORD_SAY_3,LANG_UNIVERSAL,NULL);
- SpeachTimer = 6500; SpeachNum++; break;
- // Illidan Say 1
- case 9:
- ((Lord_IllidanAI*)Lord->AI())->DoSpeach(1);
- SpeachTimer = 5000; SpeachNum++; break;
- // Overlord Say 4
- case 10:
- DoSay(OVERLORD_SAY_4,LANG_UNIVERSAL,m_player);
- SpeachTimer = 6000; SpeachNum++; break;
- // Illidan Say 2
- case 11:
- ((Lord_IllidanAI*)Lord->AI())->DoSpeach(2);
- SpeachTimer = 5500; SpeachNum++; break;
- // Illidan Say 3
- case 12:
- ((Lord_IllidanAI*)Lord->AI())->DoSpeach(3);
- SpeachTimer = 4000; SpeachNum++; break;
- // Illidan Angle
- case 13:
- Lord->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID);
- SpeachTimer = 1500; SpeachNum++; break;
- // Illidan Say 4
- case 14:
- ((Lord_IllidanAI*)Lord->AI())->DoSpeach(4);
- SpeachTimer = 1500; SpeachNum++; break;
- // Illidan Cast
- case 15:
- PlayerCheck = Unit::GetUnit(*Lord, PlayerGUID);
- if (PlayerCheck)
- {
- Lord->CastSpell(m_player, SPELL_TWO, true);
- m_player->RemoveAurasDueToSpell(SPELL_THREE);
- m_player->RemoveAurasDueToSpell(SPELL_FOUR);
- SpeachTimer = 5000; SpeachNum++;
- }
- else
- {
- ((Player*)m_player)->FailQuest(QUEST_LORD_ILLIDAN_STORMRAGE);
- SpeachTimer = 100; SpeachNum = 30;
- }
- break;
- // Illidan Say 5
- case 16:
- ((Lord_IllidanAI*)Lord->AI())->DoSpeach(5);
- SpeachTimer = 5000; SpeachNum++; break;
- // Illidan Say 6
- case 17:
- ((Lord_IllidanAI*)Lord->AI())->DoSpeach(6);
- SpeachTimer = 5000; SpeachNum++; break;
- // Illidan Say 7
- case 18:
- ((Lord_IllidanAI*)Lord->AI())->DoSpeach(7);
- SpeachTimer = 5000; SpeachNum++; break;
- // Illidan Fly
- case 19:
- Lord->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
- Lord->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING);
- SpeachTimer = 500; SpeachNum++; break;
- // Overlord Say 5
- case 20:
- DoSay(OVERLORD_SAY_5,LANG_UNIVERSAL,NULL);
- SpeachTimer = 500; SpeachNum++; break;
- // Illidan Despawn
- case 21:
- Lord->SetVisibility(VISIBILITY_OFF);
- Lord->setDeathState(JUST_DIED);
- Lord = NULL;
- SpeachTimer = 1000; SpeachNum++; break;
- // Overlord Stand Up
- case 22:
- m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
- SpeachTimer = 2000; SpeachNum++; break;
- // Overlord Angle
- case 23:
- m_creature->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID);
- SpeachTimer = 5000; SpeachNum++; break;
- // Overlord Say 6
- case 24:
- DoSay(OVERLORD_SAY_6,LANG_UNIVERSAL,NULL);
- SpeachTimer = 2000; SpeachNum++; break;
- // Complete Quest
- case 25:
- ((Player*)m_player)->CompleteQuest(QUEST_LORD_ILLIDAN_STORMRAGE);
- SpeachTimer = 6000; SpeachNum++; break;
- // Goblin Angle
- case 26:
- if (Yarzill)
- Yarzill->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID);
- SpeachTimer = 500; SpeachNum++; break;
- // Cast Again Dragonaw Illusion
- case 27:
- m_player->RemoveAurasDueToSpell(SPELL_TWO);
- m_player->RemoveAurasDueToSpell(41519);
- m_player->CastSpell(m_player, SPELL_THREE, true);
- m_player->CastSpell(m_player, SPELL_FOUR, true);
- SpeachTimer = 1000; SpeachNum++; break;
- // Goblin
- case 28:
- if (Yarzill)
- ((Yarzill_The_MercAI*)Yarzill->AI())->DoSpeach(m_player);
- SpeachTimer = 5000; SpeachNum++; break;
- // Goblin Off
- case 29:
- if (Yarzill)
- Yarzill->SetUInt64Value(UNIT_FIELD_TARGET, 0);
- SpeachTimer = 5000; SpeachNum++; break;
- // Overlord Go Back
- case 30:
- m_creature->GetMotionMaster()->MovePoint(0, -5085.77, 577.231, 86.6719);
- SpeachTimer = 5000; SpeachNum++; break;
- // Reset
- case 31:
- Reset();
- break;
- default: break;
- }
- }else SpeachTimer -= diff;
- }
+ ConversationTimer = NextStep(++Step);
+ }
+ }else ConversationTimer -= diff;
}
};
-CreatureAI* GetAI_Overlord_Morghor(Creature *_Creature)
+CreatureAI* GetAI_npc_overlord_morghorAI(Creature *_Creature)
{
-return new Overlord_MorghorAI(_Creature);
+return new npc_overlord_morghorAI(_Creature);
}
-CreatureAI* GetAI_Lord_Illidan(Creature *_Creature)
-{
-return new Lord_IllidanAI(_Creature);
-}
-
-CreatureAI* GetAI_Yarzill_The_Merc(Creature *_Creature)
-{
-return new Yarzill_The_MercAI(_Creature);
-}
-bool QuestAccept_Overlord_Morghor(Player *player, Creature *_Creature, const Quest *_Quest )
+bool QuestAccept_npc_overlord_morghor(Player *player, Creature *_Creature, const Quest *_Quest )
{
if(_Quest->GetQuestId() == QUEST_LORD_ILLIDAN_STORMRAGE)
{
- ((Overlord_MorghorAI*)_Creature->AI())->BeginSpeach((Unit*)player);
+ ((npc_overlord_morghorAI*)_Creature->AI())->PlayerGUID = player->GetGUID();
+ ((npc_overlord_morghorAI*)_Creature->AI())->StartEvent();
return true;
}
return false;
@@ -1042,42 +851,44 @@ bool QuestAccept_Overlord_Morghor(Player *player, Creature *_Creature, const Que
# npc_earthmender_wilda
####*/
-#define SAY_START "I sense the tortured spirits, $N. They are this way, come quickly!"
-#define SAY_AGGRO1 "Watch out!"
-#define SAY_AGGRO2 "Naga attackers! Defend yourself!"
-#define ASSASSIN_SAY_AGGRO1 "Kill them all!"
-#define ASSASSIN_SAY_AGGRO2 "You will never essscape Coilssskarrr..."
-#define SAY_PROGRESS1 "Grant me protection $N, i must break trough their foul magic!"
-#define SAY_PROGRESS2 "The naga of Coilskar are exceptionally cruel to their prisoners. It is a miracle that I survived inside that watery prison for as long as I did. Earthmother be praised."
-#define SAY_PROGRESS3 "Now we must find the exit."
-#define SAY_PROGRESS4 "Lady Vashj must answer for these atrocities. She must be brought to justice!"
-#define SAY_PROGRESS5 "The tumultuous nature of the great waterways of Azeroth and Draenor are a direct result of tormented water spirits."
-#define SAY_PROGRESS6 "It shouldn't be much further, $N. The exit is just up ahead."
-#define SAY_END "Thank you, $N. Please return to my brethren at the Altar of Damnation, near the Hand of Gul'dan, and tell them that Wilda is safe. May the Earthmother watch over you..."
-
-
-#define QUEST_ESCAPE_FROM_COILSKAR_CISTERN 10451
-#define NPC_COILSKAR_ASSASSIN 21044
+#define SAY_START -1000223
+#define SAY_AGGRO1 -1000224
+#define SAY_AGGRO2 -1000225
+#define ASSASSIN_SAY_AGGRO1 -1000226
+#define ASSASSIN_SAY_AGGRO2 -1000227
+#define SAY_PROGRESS1 -1000228
+#define SAY_PROGRESS2 -1000229
+#define SAY_PROGRESS3 -1000230
+#define SAY_PROGRESS4 -1000231
+#define SAY_PROGRESS5 -1000232
+#define SAY_PROGRESS6 -1000233
+#define SAY_END -1000234
+
+#define QUEST_ESCAPE_FROM_COILSKAR_CISTERN 10451
+#define NPC_COILSKAR_ASSASSIN 21044
struct TRINITY_DLL_DECL npc_earthmender_wildaAI : public npc_escortAI
{
npc_earthmender_wildaAI(Creature *c) : npc_escortAI(c) {Reset();}
- void Aggro(Unit *who)
- {
- Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
+ bool Completed;
- if(who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_COILSKAR_ASSASSIN)
- DoSay(SAY_AGGRO2, LANG_UNIVERSAL, player);
- else DoSay(SAY_AGGRO1, LANG_UNIVERSAL, player);
- }
+ void Aggro(Unit *who)
+ {
+ Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
- void Reset()
- {
- m_creature->setFaction(1726);
- }
+ if(who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_COILSKAR_ASSASSIN)
+ DoScriptText(SAY_AGGRO2, m_creature, player);
+ else DoScriptText(SAY_AGGRO1, m_creature, player);
+ }
+
+ void Reset()
+ {
+ m_creature->setFaction(1726);
+ Completed = false;
+ }
- void WaypointReached(uint32 i)
+ void WaypointReached(uint32 i)
{
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
@@ -1086,120 +897,92 @@ struct TRINITY_DLL_DECL npc_earthmender_wildaAI : public npc_escortAI
switch(i)
{
- case 0:
- DoSay(SAY_START, LANG_UNIVERSAL, player);
- m_creature->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
- break;
- case 13:
- DoSay(SAY_PROGRESS1, LANG_UNIVERSAL, player);
- SummonAssassin();
- break;
- case 14:
- SummonAssassin(); break;
- case 15:
- DoSay(SAY_PROGRESS3, LANG_UNIVERSAL, player); break;
+ case 0: DoScriptText(SAY_START, m_creature, player); break;
+ case 13: DoScriptText(SAY_PROGRESS1, m_creature, player);
+ SummonAssassin();
+ break;
+ case 14: SummonAssassin(); break;
+ case 15: DoScriptText(SAY_PROGRESS3, m_creature, player); break;
case 19:
- switch(rand()%3)
- {
- case 0:
- DoSay(SAY_PROGRESS2, LANG_UNIVERSAL, player); break;
- case 1:
- DoSay(SAY_PROGRESS4, LANG_UNIVERSAL, player); break;
- case 2:
- DoSay(SAY_PROGRESS5, LANG_UNIVERSAL, player); break;
- }
- break;
- case 20:
- SummonAssassin(); break;
+ switch(rand()%3)
+ {
+ case 0: DoScriptText(SAY_PROGRESS2, m_creature, player); break;
+ case 1: DoScriptText(SAY_PROGRESS4, m_creature, player); break;
+ case 2: DoScriptText(SAY_PROGRESS5, m_creature, player); break;
+ }
+ break;
+ case 20: SummonAssassin(); break;
case 26:
- switch(rand()%3)
- {
- case 0:
- DoSay(SAY_PROGRESS2, LANG_UNIVERSAL, player); break;
- case 1:
- DoSay(SAY_PROGRESS4, LANG_UNIVERSAL, player); break;
- case 2:
- DoSay(SAY_PROGRESS5, LANG_UNIVERSAL, player); break;
- }
- break;
- case 27:
- SummonAssassin(); break;
+ switch(rand()%3)
+ {
+ case 0: DoScriptText(SAY_PROGRESS2, m_creature, player); break;
+ case 1: DoScriptText(SAY_PROGRESS4, m_creature, player); break;
+ case 2: DoScriptText(SAY_PROGRESS5, m_creature, player); break;
+ }
+ break;
+ case 27: SummonAssassin(); break;
case 33:
- switch(rand()%3)
- {
- case 0:
- DoSay(SAY_PROGRESS2, LANG_UNIVERSAL, player); break;
- case 1:
- DoSay(SAY_PROGRESS4, LANG_UNIVERSAL, player); break;
- case 2:
- DoSay(SAY_PROGRESS5, LANG_UNIVERSAL, player); break;
- }
- break;
- case 34:
- SummonAssassin(); break;
+ switch(rand()%3)
+ {
+ case 0: DoScriptText(SAY_PROGRESS2, m_creature, player); break;
+ case 1: DoScriptText(SAY_PROGRESS4, m_creature, player); break;
+ case 2: DoScriptText(SAY_PROGRESS5, m_creature, player); break;
+ }
+ break;
+ case 34: SummonAssassin(); break;
case 37:
- switch(rand()%3)
- {
- case 0:
- DoSay(SAY_PROGRESS2, LANG_UNIVERSAL, player); break;
- case 1:
- DoSay(SAY_PROGRESS4, LANG_UNIVERSAL, player); break;
- case 2:
- DoSay(SAY_PROGRESS5, LANG_UNIVERSAL, player); break;
- }
- break;
- case 38:
- SummonAssassin(); break;
- case 39:
- DoSay(SAY_PROGRESS6, LANG_UNIVERSAL, player); break;
+ switch(rand()%3)
+ {
+ case 0: DoScriptText(SAY_PROGRESS2, m_creature, player); break;
+ case 1: DoScriptText(SAY_PROGRESS4, m_creature, player); break;
+ case 2: DoScriptText(SAY_PROGRESS5, m_creature, player); break;
+ }
+ break;
+ case 38: SummonAssassin(); break;
+ case 39: DoScriptText(SAY_PROGRESS6, m_creature, player); break;
case 43:
- switch(rand()%3)
- {
- case 0:
- DoSay(SAY_PROGRESS2, LANG_UNIVERSAL, player); break;
- case 1:
- DoSay(SAY_PROGRESS4, LANG_UNIVERSAL, player); break;
- case 2:
- DoSay(SAY_PROGRESS5, LANG_UNIVERSAL, player); break;
- }
- break;
- case 44:
- SummonAssassin(); break;
- case 50:
- DoSay(SAY_END, LANG_UNIVERSAL, player);
- ((Player*)player)->GroupEventHappens(QUEST_ESCAPE_FROM_COILSKAR_CISTERN, m_creature);
- break;
+ switch(rand()%3)
+ {
+ case 0: DoScriptText(SAY_PROGRESS2, m_creature, player); break;
+ case 1: DoScriptText(SAY_PROGRESS4, m_creature, player); break;
+ case 2: DoScriptText(SAY_PROGRESS5, m_creature, player); break;
+ }
+ break;
+ case 44: SummonAssassin(); break;
+ case 50:
+ DoScriptText(SAY_END, m_creature, player);
+ ((Player*)player)->GroupEventHappens(QUEST_ESCAPE_FROM_COILSKAR_CISTERN, m_creature);
+ Completed = true;
+ break;
}
}
void SummonAssassin()
{
- Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
+ Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
- Creature* CoilskarAssassin = m_creature->SummonCreature(NPC_COILSKAR_ASSASSIN, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0);
- if( CoilskarAssassin )
+ Unit* CoilskarAssassin = m_creature->SummonCreature(NPC_COILSKAR_ASSASSIN, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0);
+ if( CoilskarAssassin )
+ {
+ switch(rand()%2)
{
- switch(rand()%2)
- {
- case 0:
- CoilskarAssassin->Say(ASSASSIN_SAY_AGGRO1, LANG_UNIVERSAL, PlayerGUID); break;
- case 1:
- CoilskarAssassin->Say(ASSASSIN_SAY_AGGRO2, LANG_UNIVERSAL, PlayerGUID); break;
- }
- CoilskarAssassin->AI()->AttackStart(m_creature);
- }
- else error_log("SD2 ERROR: Coilskar Assassin couldn't be summmoned");
+ case 0: DoScriptText(ASSASSIN_SAY_AGGRO1, CoilskarAssassin, player); break;
+ case 1: DoScriptText(ASSASSIN_SAY_AGGRO2, CoilskarAssassin, player); break;
+ }
+ ((Creature*)CoilskarAssassin)->AI()->AttackStart(m_creature);
+ }
+ else error_log("SD2 ERROR: Coilskar Assassin couldn't be summmoned");
}
void JustDied(Unit* killer)
- {
- if (PlayerGUID)
{
- Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
- if (player)
- ((Player*)player)->FailQuest(QUEST_ESCAPE_FROM_COILSKAR_CISTERN);
- }
- }
+ if (PlayerGUID && !Completed)
+ {
+ Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
+ if (player)
+ ((Player*)player)->FailQuest(QUEST_ESCAPE_FROM_COILSKAR_CISTERN);
+ }
+ }
void UpdateAI(const uint32 diff)
{
@@ -1333,20 +1116,8 @@ void AddSC_shadowmoon_valley()
newscript = new Script;
newscript->Name = "npc_overlord_morghor";
- newscript->GetAI = &GetAI_Overlord_Morghor;
- newscript->pQuestAccept = &QuestAccept_Overlord_Morghor;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name = "npc_lord_illidan_stormrage";
- newscript->GetAI = &GetAI_Lord_Illidan;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name = "npc_yarzill_the_merc";
- newscript->GetAI = &GetAI_Yarzill_The_Merc;
- newscript->pGossipHello = &GossipHello_npc_yarzill_fly;
- newscript->pGossipSelect = &GossipSelect_npc_yarzill_fly;
+ newscript->GetAI = &GetAI_npc_overlord_morghorAI;
+ newscript->pQuestAccept = &QuestAccept_npc_overlord_morghor;
newscript->RegisterSelf();
newscript = new Script;
diff --git a/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp b/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp
index 839c6ab1fe8..339f8450c92 100644
--- a/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp
+++ b/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp
@@ -225,10 +225,12 @@ bool GossipSelect_npc_shattrathflaskvendors(Player *player, Creature *_Creature,
# npc_zephyr
######*/
+#define GOSSIP_HZ "Take me to the Caverns of Time."
+
bool GossipHello_npc_zephyr(Player *player, Creature *_Creature)
{
if( player->GetReputationRank(989) >= REP_REVERED )
- player->ADD_GOSSIP_ITEM(0, "Take me to the Caverns of Time.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_HZ, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
@@ -247,28 +249,28 @@ bool GossipSelect_npc_zephyr(Player *player, Creature *_Creature, uint32 sender,
# npc_kservant
######*/
-#define SAY1 "Follow me, stranger. This won't take long."
-#define WHISP1 "Shattrath was once the draenei capital of this world. Its name means \"dwelling of light.\""
-#define WHISP2 "When the Burning Legion turned the orcs against the draenei, the fiercest battle was fought here. The draenei fought tooth and nail, but in the end the city fell."
-#define WHISP3 "The city was left in ruins and darkness... until the Sha'tar arrived."
-#define WHISP4 "Let us go into the Lower City. I will warn you that as one of the only safe havens in Outland, Shattrath has attracted droves of refugees from all wars, current and past. "
-#define WHISP5 "The Sha'tar, or \"born from light\" are the naaru that came to Outland to fight the demons of the Burning Legion."
-#define WHISP6 "They were drawn to the ruins of Shattrath City where a small remnant of the draenei priesthood conducted its rites inside a ruined temple on this very spot."
-#define WHISP7 "The priesthood, known as the Aldor, quickly regained its strength as word spread that the naaru had returned and reconstruction soon began. The ruined temple is now used as an infirmary for injured refugees."
-#define WHISP8 "It wouldn't be long, however, before the city came under attack once again. This time, the attack came from Illidan's armies. A large regiment of blood elves had been sent by Illidan's ally, Kael'thas Sunstrider, to lay waste to the city."
-#define WHISP9 "As the regiment of blood elves crossed this very bridge, the Aldor's exarchs and vindicators lined up to defend the Terrace of Light. But then the unexpected happened. "
-#define WHISP10 "The blood elves laid down their weapons in front of the city's defenders; their leader, a blood elf elder known as Voren'thal, stormed into the Terrace of Light and demanded to speak to A'dal."
-#define WHISP11 "As the naaru approached him, Voren'thal kneeled before him and uttered the following words: \"I've seen you in a vision, naaru. My race's only hope for survival lies with you. My followers and I are here to serve you.\""
-#define WHISP12 "The defection of Voren'thal and his followers was the largest loss ever incurred by Kael's forces. And these weren't just any blood elves. Many of the best and brightest amongst Kael's scholars and magisters had been swayed by Voren'thal's influence."
-#define WHISP13 "The naaru accepted the defectors, who would become known as the Scryers; their dwelling lies in the platform above. Only those initiated with the Scryers are allowed there."
-#define WHISP14 "The Aldor are followers of the Light and forgiveness and redemption are values they understand. However, they found hard to forget the deeds of the blood elves while under Kaell's command."
-#define WHISP15 "Many of the priesthood had been slain by the same magisters who now vowed to serve the naaru. They were not happy to share the city with their former enemies."
-#define WHISP16 "The Aldor's most holy temple and its surrounding dwellings lie on the terrace above. As a holy site, only the initiated are welcome inside."
-#define WHISP17 "The attacks against Shattrath continued, but the city did not fall, as you can see. On the contrary, the naaru known as Xi'ri led a successful incursion into Shadowmoon Valley - Illidan's doorstep."
-#define WHISP18 "There he continues to wage war on Illidan with the assistance of the Aldor and the Scryers. The two factions have not given up on their old feuds, though."
-#define WHISP19 "Such is their animosity that they vie for the honor of being sent to assist the naaru there. Each day, that decision is made here by A'dal. The armies gather here to receive A'dal's blessing before heading to Shadowmoon."
-#define WHISP20 "Khadgar should be ready to see you again. Just remember that to serve the Sha'tar you will most likely have to ally with the Aldor or the Scryers. And seeking the favor of one group will cause the others' dislike."
-#define WHISP21 "Good luck stranger, and welcome to Shattrath City."
+#define SAY1 -1000306
+#define WHISP1 -1000307
+#define WHISP2 -1000308
+#define WHISP3 -1000309
+#define WHISP4 -1000310
+#define WHISP5 -1000311
+#define WHISP6 -1000312
+#define WHISP7 -1000313
+#define WHISP8 -1000314
+#define WHISP9 -1000315
+#define WHISP10 -1000316
+#define WHISP11 -1000317
+#define WHISP12 -1000318
+#define WHISP13 -1000319
+#define WHISP14 -1000320
+#define WHISP15 -1000321
+#define WHISP16 -1000322
+#define WHISP17 -1000323
+#define WHISP18 -1000324
+#define WHISP19 -1000325
+#define WHISP20 -1000326
+#define WHISP21 -1000327
struct TRINITY_DLL_DECL npc_kservantAI : public npc_escortAI
{
@@ -279,33 +281,34 @@ public:
void WaypointReached(uint32 i)
{
Unit *pTemp = Unit::GetUnit(*m_creature,PlayerGUID);
+
if( !pTemp )
return;
switch(i)
{
- case 0: DoSay(SAY1, LANG_UNIVERSAL, pTemp); break;
- case 4: DoWhisper(WHISP1, pTemp); break;
- case 6: DoWhisper(WHISP2, pTemp); break;
- case 7: DoWhisper(WHISP3, pTemp); break;
- case 8: DoWhisper(WHISP4, pTemp); break;
- case 17: DoWhisper(WHISP5, pTemp); break;
- case 18: DoWhisper(WHISP6, pTemp); break;
- case 19: DoWhisper(WHISP7, pTemp); break;
- case 33: DoWhisper(WHISP8, pTemp); break;
- case 34: DoWhisper(WHISP9, pTemp); break;
- case 35: DoWhisper(WHISP10, pTemp); break;
- case 36: DoWhisper(WHISP11, pTemp); break;
- case 43: DoWhisper(WHISP12, pTemp); break;
- case 44: DoWhisper(WHISP13, pTemp); break;
- case 49: DoWhisper(WHISP14, pTemp); break;
- case 50: DoWhisper(WHISP15, pTemp); break;
- case 51: DoWhisper(WHISP16, pTemp); break;
- case 52: DoWhisper(WHISP17, pTemp); break;
- case 53: DoWhisper(WHISP18, pTemp); break;
- case 54: DoWhisper(WHISP19, pTemp); break;
- case 55: DoWhisper(WHISP20, pTemp); break;
- case 56: DoWhisper(WHISP21, pTemp);
+ case 0: DoScriptText(SAY1, m_creature, pTemp); break;
+ case 4: DoScriptText(WHISP1, m_creature, pTemp); break;
+ case 6: DoScriptText(WHISP2, m_creature, pTemp); break;
+ case 7: DoScriptText(WHISP3, m_creature, pTemp); break;
+ case 8: DoScriptText(WHISP4, m_creature, pTemp); break;
+ case 17: DoScriptText(WHISP5, m_creature, pTemp); break;
+ case 18: DoScriptText(WHISP6, m_creature, pTemp); break;
+ case 19: DoScriptText(WHISP7, m_creature, pTemp); break;
+ case 33: DoScriptText(WHISP8, m_creature, pTemp); break;
+ case 34: DoScriptText(WHISP9, m_creature, pTemp); break;
+ case 35: DoScriptText(WHISP10, m_creature, pTemp); break;
+ case 36: DoScriptText(WHISP11, m_creature, pTemp); break;
+ case 43: DoScriptText(WHISP12, m_creature, pTemp); break;
+ case 44: DoScriptText(WHISP13, m_creature, pTemp); break;
+ case 49: DoScriptText(WHISP14, m_creature, pTemp); break;
+ case 50: DoScriptText(WHISP15, m_creature, pTemp); break;
+ case 51: DoScriptText(WHISP16, m_creature, pTemp); break;
+ case 52: DoScriptText(WHISP17, m_creature, pTemp); break;
+ case 53: DoScriptText(WHISP18, m_creature, pTemp); break;
+ case 54: DoScriptText(WHISP19, m_creature, pTemp); break;
+ case 55: DoScriptText(WHISP20, m_creature, pTemp); break;
+ case 56: DoScriptText(WHISP21, m_creature, pTemp);
if( PlayerGUID )
{
Unit* player = ((Creature*)Unit::GetUnit((*m_creature), PlayerGUID));
@@ -414,12 +417,13 @@ CreatureAI* GetAI_npc_kservantAI(Creature *_Creature)
######*/
#define GOSSIP_BOOK "Ezekiel said that you might have a certain book..."
-#define SAY_1 "Time to teach you a lesson in manners, little boy!"
-#define SAY_2 "Now I'm gonna give you to the count of '3' to get out of here before I sick the dogs on you."
-#define SAY_3 "1..."
-#define SAY_4 "2..."
-#define SAY_5 "Time to meet your maker!"
-#define SAY_GIVEUP "Alright, we give up! Don't hurt us!"
+
+#define SAY_1 -1000328
+#define SAY_2 -1000329
+#define SAY_3 -1000330
+#define SAY_4 -1000331
+#define SAY_5 -1000332
+#define SAY_GIVEUP -1000333
#define QUEST_WBI 10231
#define NPC_CREEPJACK 19726
@@ -477,11 +481,11 @@ struct TRINITY_DLL_DECL npc_dirty_larryAI : public ScriptedAI
if(Malone)
Malone->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); }return 2000;
- case 1: DoSay(SAY_1, LANG_UNIVERSAL, player); return 3000;
- case 2: DoSay(SAY_2, LANG_UNIVERSAL, player, true); return 5000;
- case 3: DoSay(SAY_3, LANG_UNIVERSAL, player); return 2000;
- case 4: DoSay(SAY_4, LANG_UNIVERSAL, player); return 2000;
- case 5: DoSay(SAY_5, LANG_UNIVERSAL, player); return 2000;
+ case 1: DoScriptText(SAY_1, m_creature, player); return 3000;
+ case 2: DoScriptText(SAY_2, m_creature, player); return 5000;
+ case 3: DoScriptText(SAY_3, m_creature, player); return 2000;
+ case 4: DoScriptText(SAY_4, m_creature, player); return 2000;
+ case 5: DoScriptText(SAY_5, m_creature, player); return 2000;
case 6: Attack = true; return 2000;
default: return 0;
}
@@ -494,7 +498,7 @@ struct TRINITY_DLL_DECL npc_dirty_larryAI : public ScriptedAI
if(SayTimer < diff)
{
if(Event)
- SayTimer = NextStep(Step++);
+ SayTimer = NextStep(++Step);
}else SayTimer -= diff;
if(Attack)
@@ -541,7 +545,7 @@ struct TRINITY_DLL_DECL npc_dirty_larryAI : public ScriptedAI
}
m_creature->setFaction(1194);
Done = true;
- DoSay(SAY_GIVEUP, LANG_UNIVERSAL, NULL);
+ DoScriptText(SAY_GIVEUP, m_creature, NULL);
m_creature->DeleteThreatList();
m_creature->CombatStop();
m_creature->GetMotionMaster()->MoveTargetedHome();
diff --git a/src/bindings/scripts/scripts/zone/silvermoon/silvermoon_city.cpp b/src/bindings/scripts/scripts/zone/silvermoon/silvermoon_city.cpp
index 53bc93c46a6..fb15929cda9 100644
--- a/src/bindings/scripts/scripts/zone/silvermoon/silvermoon_city.cpp
+++ b/src/bindings/scripts/scripts/zone/silvermoon/silvermoon_city.cpp
@@ -31,7 +31,7 @@ EndContentData */
# npc_blood_knight_stillblade
#######*/
-#define SAY_HEAL "Thank you, dear Paladin, you just saved my life."
+#define SAY_HEAL -1000334
#define QUEST_REDEEMING_THE_DEAD 9685
#define SPELL_SHIMMERING_VESSEL 31225
@@ -82,7 +82,7 @@ struct TRINITY_DLL_DECL npc_blood_knight_stillbladeAI : public ScriptedAI
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0);
//m_creature->RemoveAllAuras();
- DoSay(SAY_HEAL,LANG_THALASSIAN,NULL);
+ DoScriptText(SAY_HEAL, m_creature);
spellHit = true;
}
}
diff --git a/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp b/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp
index fa03fe37add..a350594d860 100644
--- a/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp
+++ b/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp
@@ -33,6 +33,8 @@ EndContentData */
## npc_astor_hadren
######*/
+#define GOSSIP_HAH "You're Astor Hadren, right?"
+#define GOSSIP_SAH "You've got something I need, Astor. And I'll be taking it now."
struct TRINITY_DLL_DECL npc_astor_hadrenAI : public ScriptedAI
{
npc_astor_hadrenAI(Creature *c) : ScriptedAI(c) {Reset();}
@@ -60,7 +62,7 @@ CreatureAI* GetAI_npc_astor_hadren(Creature *_creature)
bool GossipHello_npc_astor_hadren(Player *player, Creature *_Creature)
{
if (player->GetQuestStatus(1886) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM( 0, "You're Astor Hadren, right?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HAH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(623, _Creature->GetGUID());
@@ -72,7 +74,7 @@ bool GossipSelect_npc_astor_hadren(Player *player, Creature *_Creature, uint32 s
switch (action)
{
case GOSSIP_ACTION_INFO_DEF + 1:
- player->ADD_GOSSIP_ITEM( 0, "You've got something I need, Astor. And I'll be taking it now.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SAH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
player->SEND_GOSSIP_MENU(624, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF + 2:
@@ -89,20 +91,20 @@ bool GossipSelect_npc_astor_hadren(Player *player, Creature *_Creature, uint32 s
## npc_deathstalker_erland
######*/
-#define SAY_QUESTACCEPT "Let's get to the others, and keep an eye open for those wolves cutside..."
-#define SAY_START "Be careful, $N. Those wolves like to hide among the trees."
-#define SAY_AGGRO_1 "A Mottled Worg attacks!"
-#define SAY_AGGRO_2 "Beware! I am under attack!"
-#define SAY_LAST "We're almost there!"
+#define SAY_QUESTACCEPT -1000335
+#define SAY_START -1000336
+#define SAY_AGGRO_1 -1000337
+#define SAY_AGGRO_2 -1000338
+#define SAY_LAST -1000339
-#define SAY_THANKS "We made it! Thanks, $N. I couldn't have gotten without you."
-#define SAY_RANE "It's good to see you again, Erland. What is your report?"
-#define SAY_ANSWER "Masses of wolves are to the east, and whoever lived at Malden's Orchard is gone."
-#define SAY_MOVE_QUINN "If I am excused, then I'd like to check on Quinn..."
+#define SAY_THANKS -1000340
+#define SAY_RANE -1000341
+#define SAY_ANSWER -1000342
+#define SAY_MOVE_QUINN -1000343
-#define SAY_GREETINGS "Hello, Quinn. How are you faring?"
-#define SAY_QUINN "I've been better. Ivar the Foul got the better of me..."
-#define SAY_ON_BYE "Try to take better care of yourself, Quinn. You were lucky this time."
+#define SAY_GREETINGS -1000344
+#define SAY_QUINN -1000345
+#define SAY_ON_BYE -1000346
#define QUEST_ESCORTING 435
#define NPC_RANE 1950
@@ -121,25 +123,26 @@ struct TRINITY_DLL_DECL npc_deathstalker_erlandAI : public npc_escortAI
switch(i)
{
- case 1: DoSay(SAY_START, LANG_UNIVERSAL, player);break;
+ case 1: DoScriptText(SAY_START, m_creature, player);break;
case 13:
- DoSay(SAY_LAST, LANG_UNIVERSAL, player);
- ((Player*)player)->GroupEventHappens(QUEST_ESCORTING, m_creature);break;
- case 14: DoSay(SAY_THANKS, LANG_UNIVERSAL, player);break;
+ DoScriptText(SAY_LAST, m_creature, player);
+ if(player)
+ ((Player*)player)->GroupEventHappens(QUEST_ESCORTING, m_creature);break;
+ case 14: DoScriptText(SAY_THANKS, m_creature, player);break;
case 15: {
Unit* Rane = FindCreature(NPC_RANE, 20);
if(Rane)
- ((Creature*)Rane)->Say(SAY_RANE, LANG_UNIVERSAL, NULL);
+ DoScriptText(SAY_RANE, Rane);
break;}
- case 16: DoSay(SAY_ANSWER, LANG_UNIVERSAL, NULL);break;
- case 17: DoSay(SAY_MOVE_QUINN, LANG_UNIVERSAL, NULL); break;
- case 24: DoSay(SAY_GREETINGS, LANG_UNIVERSAL, NULL);break;
+ case 16: DoScriptText(SAY_ANSWER, m_creature);break;
+ case 17: DoScriptText(SAY_MOVE_QUINN, m_creature); break;
+ case 24: DoScriptText(SAY_GREETINGS, m_creature);break;
case 25: {
Unit* Quinn = FindCreature(NPC_QUINN, 20);
if(Quinn)
- ((Creature*)Quinn)->Say(SAY_QUINN, LANG_GUTTERSPEAK, NULL);
+ DoScriptText(SAY_QUINN, Quinn);
break;}
- case 26: DoSay(SAY_ON_BYE, LANG_UNIVERSAL, NULL);break;
+ case 26: DoScriptText(SAY_ON_BYE, m_creature, NULL);break;
}
}
@@ -150,8 +153,8 @@ struct TRINITY_DLL_DECL npc_deathstalker_erlandAI : public npc_escortAI
{
switch(rand()%2)
{
- case 0: DoSay(SAY_AGGRO_1, LANG_UNIVERSAL, who);break;
- case 1: DoSay(SAY_AGGRO_2, LANG_UNIVERSAL, who);break;
+ case 0: DoScriptText(SAY_AGGRO_1, m_creature, who);break;
+ case 1: DoScriptText(SAY_AGGRO_2, m_creature, who);break;
}
}
@@ -165,7 +168,7 @@ bool QuestAccept_npc_deathstalker_erland(Player* player, Creature* creature, Que
{
if (quest->GetQuestId() == QUEST_ESCORTING)
{
- creature->Say(SAY_QUESTACCEPT, LANG_UNIVERSAL, player->GetGUID());
+ DoScriptText(SAY_QUESTACCEPT, creature, player);
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
}
diff --git a/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp b/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp
index a5ea8dd2226..40d3a5c7b9d 100644
--- a/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp
+++ b/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp
@@ -33,6 +33,12 @@ EndContentData */
## npc_braug_dimspirit
######*/
+#define GOSSIP_HBD1 "Ysera"
+#define GOSSIP_HBD2 "Neltharion"
+#define GOSSIP_HBD3 "Nozdormu"
+#define GOSSIP_HBD4 "Alexstrasza"
+#define GOSSIP_HBD5 "Malygos"
+
bool GossipHello_npc_braug_dimspirit(Player *player, Creature *_Creature)
{
if (_Creature->isQuestGiver())
@@ -40,11 +46,11 @@ bool GossipHello_npc_braug_dimspirit(Player *player, Creature *_Creature)
if (player->GetQuestStatus(6627) == QUEST_STATUS_INCOMPLETE)
{
- player->ADD_GOSSIP_ITEM( 0, "Ysera", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- player->ADD_GOSSIP_ITEM( 0, "Neltharion", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
- player->ADD_GOSSIP_ITEM( 0, "Nozdormu", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- player->ADD_GOSSIP_ITEM( 0, "Alexstrasza", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- player->ADD_GOSSIP_ITEM( 0, "Malygos", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HBD1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HBD2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HBD3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HBD4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HBD5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(5820, _Creature->GetGUID());
}
@@ -74,9 +80,9 @@ bool GossipSelect_npc_braug_dimspirit(Player *player, Creature *_Creature, uint3
## npc_kaya_flathoof
######*/
-#define SAY_START "Let's go before they find out I'm free!"
-#define SAY_AMBUSH "Look out! We're under attack!"
-#define SAY_END "Thank you for helping me. I know my way back from here."
+#define SAY_START -1000347
+#define SAY_AMBUSH -1000348
+#define SAY_END -1000349
#define QUEST_PK 6523
#define MOB_GB 11912
@@ -97,13 +103,13 @@ struct TRINITY_DLL_DECL npc_kaya_flathoofAI : public npc_escortAI
switch(i)
{
case 22:
- DoSay(SAY_AMBUSH, LANG_UNIVERSAL, NULL);
+ DoScriptText(SAY_AMBUSH, m_creature);
m_creature->SummonCreature(MOB_GB, -48.53, -503.34, -46.31, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
m_creature->SummonCreature(MOB_GR, -38.85, -503.77, -45.90, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
m_creature->SummonCreature(MOB_GS, -36.37, -496.23, -45.71, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break;
case 23: m_creature->SetInFront(player);
- DoSay(SAY_END, LANG_UNIVERSAL, player, true);
+ DoScriptText(SAY_END, m_creature, player);
if (player && player->GetTypeId() == TYPEID_PLAYER)
((Player*)player)->GroupEventHappens(QUEST_PK, m_creature);
break;
@@ -140,7 +146,7 @@ bool QuestAccept_npc_kaya_flathoof(Player* player, Creature* creature, Quest con
if (quest->GetQuestId() == QUEST_PK)
{
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
- creature->Say(SAY_START, LANG_UNIVERSAL, NULL);
+ DoScriptText(SAY_START, creature);
creature->setFaction(113);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
}
diff --git a/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp b/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp
index 81498a6a7a5..c6ef71f25e5 100644
--- a/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp
+++ b/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp
@@ -17,7 +17,7 @@
/* ScriptData
SDName: Stormwind_City
SD%Complete: 100
-SDComment: Quest support: 1640, 1447, 4185, 11223 (DB support required for spell 42711). Receive emote General Marcus
+SDComment: Quest support: 1640, 1447, 4185, 11223. Receive emote General Marcus
SDCategory: Stormwind City
EndScriptData */
diff --git a/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp b/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp
index 6cf663616bf..7a68227457f 100644
--- a/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp
+++ b/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp
@@ -37,7 +37,7 @@ EndContentData */
## mob_aquementas
######*/
-#define AGGRO_YELL_AQUE "Who dares awaken Aquementas?"
+#define AGGRO_YELL_AQUE -1000350
#define SPELL_AQUA_JET 13586
#define SPELL_FROST_SHOCK 15089
@@ -80,7 +80,7 @@ struct TRINITY_DLL_DECL mob_aquementasAI : public ScriptedAI
void Aggro(Unit* who)
{
- DoYell(AGGRO_YELL_AQUE,LANG_UNIVERSAL,who);
+ DoScriptText(AGGRO_YELL_AQUE, m_creature, who);
}
void UpdateAI(const uint32 diff)
@@ -397,23 +397,23 @@ struct TRINITY_DLL_DECL npc_OOX17AI : public npc_escortAI
m_creature->SummonCreature(SPAWN_FIRST, -8350.96, -4445.79, 10.10, 6.20, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
m_creature->SummonCreature(SPAWN_FIRST, -8355.96, -4447.79, 10.10, 6.27, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
m_creature->SummonCreature(SPAWN_FIRST, -8353.96, -4442.79, 10.10, 6.08, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- m_creature->Say(SAY_CHICKEN_AMB, LANG_UNIVERSAL, NULL);
+ DoScriptText(SAY_CHICKEN_AMB, m_creature);
break;
case 56:
m_creature->SummonCreature(SPAWN_SECOND_1, -7510.07, -4795.50, 9.35, 6.06, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
m_creature->SummonCreature(SPAWN_SECOND_2, -7515.07, -4797.50, 9.35, 6.22, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
m_creature->SummonCreature(SPAWN_SECOND_2, -7518.07, -4792.50, 9.35, 6.22, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- m_creature->Say(SAY_CHICKEN_AMB, LANG_UNIVERSAL, NULL);
+ DoScriptText(SAY_CHICKEN_AMB, m_creature);
{Unit* scoff = FindCreature(SPAWN_SECOND_2, 30);
if(scoff)
- ((Creature*)scoff)->Say(SAY_SCOFF, LANG_UNIVERSAL, NULL);}break;
+ DoScriptText(SAY_SCOFF, scoff);}break;
break;
case 86:
if (player)
{
- m_creature->Say(SAY_CHICKEN_COMP, LANG_UNIVERSAL, NULL);
+ DoScriptText(SAY_CHICKEN_COMP, m_creature);
((Player*)player)->GroupEventHappens(Q_OOX17, m_creature);
}
break;
@@ -424,15 +424,11 @@ struct TRINITY_DLL_DECL npc_OOX17AI : public npc_escortAI
void Aggro(Unit* who)
{
- switch (rand()%2) {
- case 0:
- m_creature->Say(SAY_CHICKEN_AGGRO_1, LANG_UNIVERSAL, 0);
- break;
- case 1:
- m_creature->Say(SAY_CHICKEN_AGGRO_2, LANG_UNIVERSAL, 0);
- break;
- }
-
+ switch (rand()%2)
+ {
+ case 0: DoScriptText(SAY_CHICKEN_AGGRO_1, m_creature); break;
+ case 1: DoScriptText(SAY_CHICKEN_AGGRO_2, m_creature); break;
+ }
}
void JustSummoned(Creature* summoned)
@@ -466,7 +462,7 @@ bool QuestAccept_npc_OOX17(Player* player, Creature* creature, Quest const* ques
creature->SetHealth(creature->GetMaxHealth());
creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
- creature->Say(SAY_CHICKEN_ACC, LANG_UNIVERSAL, NULL);
+ DoScriptText(SAY_CHICKEN_ACC, creature);
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
}
diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp
index 7f649b30495..d46f7cf519f 100644
--- a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp
+++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp
@@ -17,7 +17,7 @@
/* ScriptData
SDName: boss_Kaelthas
SD%Complete: 60
-SDComment: SQL, phase 2, phase 3, Mind Control, taunt immunity
+SDComment: Mind Control, Reset Event if Weapons despawn/reset
SDCategory: Tempest Keep, The Eye
EndScriptData */
@@ -76,14 +76,14 @@ EndScriptData */
#define SPELL_WEAPON_SPAWN 41236
//Phase 4 spells
-#define SPELL_FIREBALL 22088 //wrong but works with CastCustomSpell
+#define SPELL_FIREBALL 36805
#define SPELL_PYROBLAST 36819
#define SPELL_FLAME_STRIKE 36735
#define SPELL_FLAME_STRIKE_VIS 36730
#define SPELL_FLAME_STRIKE_DMG 36731
#define SPELL_ARCANE_DISRUPTION 36834
#define SPELL_SHOCK_BARRIER 36815
-#define SPELL_PHOENIX_ANIMATION 36723
+#define SPELL_SUMMON_PHOENIX 36723
#define SPELL_MIND_CONTROL 32830
//Phase 5 spells
@@ -282,6 +282,8 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
ScriptedInstance* pInstance;
+ std::list<uint64> Phoenix;
+
uint32 Fireball_Timer;
uint32 ArcaneDisruption_Timer;
uint32 Phoenix_Timer;
@@ -292,6 +294,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
uint32 NetherVapor_Timer;
uint32 FlameStrike_Timer;
uint32 MindControl_Timer;
+ uint32 Check_Timer;
uint32 Phase;
uint32 PhaseSubphase; //generic
uint32 Phase_Timer; //generic timer
@@ -302,6 +305,59 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
bool ChainPyros;
uint64 AdvisorGuid[4];
+ uint64 WeaponGuid[7];
+
+ void DeleteLegs()
+ {
+ InstanceMap::PlayerList const &playerliste = ((InstanceMap*)m_creature->GetMap())->GetPlayers();
+ InstanceMap::PlayerList::const_iterator it;
+
+ Map::PlayerList const &PlayerList = ((InstanceMap*)m_creature->GetMap())->GetPlayers();
+ for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
+ {
+ Player* i_pl = i->getSource();
+ i_pl->DestroyItemCount(30312, 1, true);
+ i_pl->DestroyItemCount(30311, 1, true);
+ i_pl->DestroyItemCount(30317, 1, true);
+ i_pl->DestroyItemCount(30316, 1, true);
+ i_pl->DestroyItemCount(30313, 1, true);
+ i_pl->DestroyItemCount(30314, 1, true);
+ i_pl->DestroyItemCount(30318, 1, true);
+ i_pl->DestroyItemCount(30319, 1, true);
+ i_pl->DestroyItemCount(30320, 1, true);
+ }
+ if(pInstance) {
+ for(uint32 i = 0; i < 7; i++) {
+ Creature* weapon = (Creature*)(Unit::GetUnit((*m_creature), WeaponGuid[i]));;
+ delete weapon;
+ }
+ }
+ }
+
+ void CleanPhoenix()
+ {
+ CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
+ Cell cell(pair);
+ cell.data.Part.reserved = ALL_DISTRICT;
+ cell.SetNoCreate();
+
+ std::list<Creature*> PhoenixList;
+
+ Trinity::AllCreaturesOfEntryInRange check(m_creature, PHOENIX, 50);
+ Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(PhoenixList, check);
+ TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> visitor(searcher);
+
+ CellLock<GridReadGuard> cell_lock(cell, pair);
+ cell_lock->Visit(cell_lock, visitor, *(m_creature->GetMap()));
+
+ if(!PhoenixList.empty())
+ {
+ for(std::list<Creature*>::iterator itr = PhoenixList.begin(); itr != PhoenixList.end(); ++itr)
+ {
+ (*itr)->RemoveFromWorld();
+ }
+ }
+ }
void Reset()
{
@@ -315,6 +371,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
GravityLapse_Phase = 0;
NetherBeam_Timer = 8000;
NetherVapor_Timer = 10000;
+ Check_Timer = 4000;
PyrosCasted = 0;
Phase = 0;
InGravityLapse = false;
@@ -324,8 +381,14 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
if(InCombat)
PrepareAdvisors();
+ DeleteLegs();
+ CleanPhoenix();
+
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
+ m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
+
if(pInstance)
pInstance->SetData(DATA_KAELTHASEVENT, NOT_STARTED);
@@ -334,7 +397,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
void PrepareAdvisors()
{
Creature *pCreature;
- for(uint8 i = 0; i < 4; i++)
+ for(uint8 i = 0; i < 4; ++i)
{
pCreature = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[i]));
if(pCreature)
@@ -356,6 +419,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
AdvisorGuid[1] = pInstance->GetData64(DATA_LORDSANGUINAR);
AdvisorGuid[2] = pInstance->GetData64(DATA_GRANDASTROMANCERCAPERNIAN);
AdvisorGuid[3] = pInstance->GetData64(DATA_MASTERENGINEERTELONICUS);
+ m_creature->addUnitState(UNIT_STAT_STUNNED);
if(!AdvisorGuid[0] || !AdvisorGuid[1] || !AdvisorGuid[2] || !AdvisorGuid[3])
{
@@ -400,6 +464,16 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
}
}
+ void JustSummoned(Creature* summoned)
+ {
+ if(summoned->GetEntry() == PHOENIX)
+ {
+ summoned->setFaction(m_creature->getFaction());
+ Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ summoned->AI()->AttackStart(target);
+ }
+ }
+
void JustDied(Unit* Killer)
{
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
@@ -407,11 +481,13 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
DoScriptText(SAY_DEATH, m_creature);
+ DeleteLegs();
+
if(pInstance)
pInstance->SetData(DATA_KAELTHASEVENT, DONE);
Creature *pCreature;
- for(uint8 i = 0; i < 4; i++)
+ for(uint8 i = 0; i < 4; ++i)
{
pCreature = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[i]));
if(pCreature)
@@ -437,7 +513,6 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
float attackRadius = m_creature->GetAttackDistance(who);
if (Phase >= 4 && m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who))
{
- //who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
AttackStart(who);
}
else if(who->isAlive())
@@ -473,7 +548,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
//start advisor within 7 seconds
Phase_Timer = 7000;
- PhaseSubphase++;
+ ++PhaseSubphase;
}else Phase_Timer -= diff;
break;
@@ -493,7 +568,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
Advisor->AI()->AttackStart(target);
}
- PhaseSubphase++;
+ ++PhaseSubphase;
}else Phase_Timer -= diff;
break;
@@ -507,7 +582,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
//start advisor within 12.5 seconds
Phase_Timer = 12500;
- PhaseSubphase++;
+ ++PhaseSubphase;
}
break;
@@ -527,7 +602,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
Advisor->AI()->AttackStart(target);
}
- PhaseSubphase++;
+ ++PhaseSubphase;
}else Phase_Timer -= diff;
break;
@@ -541,7 +616,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
//start advisor within 7 seconds
Phase_Timer = 7000;
- PhaseSubphase++;
+ ++PhaseSubphase;
}
break;
@@ -561,7 +636,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
Advisor->AI()->AttackStart(target);
}
- PhaseSubphase++;
+ ++PhaseSubphase;
}else Phase_Timer -= diff;
break;
@@ -575,7 +650,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
//start advisor within 8.4 seconds
Phase_Timer = 8400;
- PhaseSubphase++;
+ ++PhaseSubphase;
}
break;
@@ -597,7 +672,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
Phase_Timer = 3000;
- PhaseSubphase++;
+ ++PhaseSubphase;
}else Phase_Timer -= diff;
break;
@@ -631,20 +706,20 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
//Spawn weapons
if (PhaseSubphase == 1)
{
- Unit* Target = SelectUnit(SELECT_TARGET_RANDOM, 0);
-
Creature* Weapon;
- for (uint32 i = 0; i < 7; i++)
+ for (uint32 i = 0; i < 7; ++i)
{
+ Unit* Target = SelectUnit(SELECT_TARGET_RANDOM, 0);
Weapon = m_creature->SummonCreature(((uint32)KaelthasWeapons[i][0]),KaelthasWeapons[i][1],KaelthasWeapons[i][2],KaelthasWeapons[i][3],0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
if (!Weapon)
- error_log("SD2: Kael'thas weapon %i could not be spawned", i);
+ error_log("STSCR: Kael'thas weapon %i could not be spawned", i);
else
{
Weapon->setFaction(m_creature->getFaction());
Weapon->AI()->AttackStart(Target);
Weapon->CastSpell(Weapon, SPELL_WEAPON_SPAWN, false);
+ WeaponGuid[i] = Weapon->GetGUID();
}
}
@@ -660,6 +735,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
Phase = 3;
PhaseSubphase = 0;
}else Phase_Timer -= diff;
+ //missing Resetcheck
}break;
case 3:
@@ -670,11 +746,11 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
Unit* Target = SelectUnit(SELECT_TARGET_RANDOM, 0);
Creature* Advisor;
- for (uint32 i = 0; i < 4; i++)
+ for (uint32 i = 0; i < 4; ++i)
{
Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[i]));
if (!Advisor)
- error_log("SD2: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i);
+ error_log("TSCR: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i);
else ((advisorbase_ai*)Advisor->AI())->Revive(Target);
}
@@ -694,6 +770,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
{
+ m_creature->clearUnitState(UNIT_STAT_STUNNED);
AttackStart(target);
}
Phase_Timer = 30000;
@@ -720,8 +797,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
{
//interruptable
m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, false);
- int32 dmg = 20000+rand()%5000;
- m_creature->CastCustomSpell(m_creature->getVictim(), SPELL_FIREBALL, &dmg, 0, 0, false);
+ m_creature->CastSpell(m_creature->getVictim(), SPELL_FIREBALL, false);
IsCastingFireball = true;
Fireball_Timer = 2500;
}
@@ -745,7 +821,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
if (FlameStrike_Timer < diff)
{
- if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0, 70, true))
DoCast(pUnit, SPELL_FLAME_STRIKE);
FlameStrike_Timer = 30000;
@@ -754,10 +830,13 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
if (MindControl_Timer < diff)
{
if (m_creature->getThreatManager().getThreatList().size() >= 2)
- for (uint32 i = 0; i < 3; i++)
+ for (uint32 i = 0; i < 3; i++)
{
- debug_log("SD2: Kael'Thas mind control not supported.");
- //DoCast(pUnit, SPELL_MIND_CONTROL);
+
+ Unit* target =SelectUnit(SELECT_TARGET_RANDOM, 1, 70, true);
+ if(!target) target = m_creature->getVictim();
+ debug_log("TSCR: Kael'Thas mind control not supported.");
+ DoCast(target, SPELL_MIND_CONTROL);
}
MindControl_Timer = 60000;
@@ -767,18 +846,9 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
//Phoenix_Timer
if(Phoenix_Timer < diff)
{
- DoCast(m_creature, SPELL_PHOENIX_ANIMATION);
- Creature *Phoenix = DoSpawnCreature(PHOENIX, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
-
- if(Phoenix)
- {
- Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
- if (target)
- Phoenix->AI()->AttackStart(target);
- }else error_log("SD2: Kael'Thas Phoenix could not be spawned");
-
- switch(rand()%2)
- {
+ DoCast(m_creature, SPELL_SUMMON_PHOENIX);
+ switch(rand()%2)
+ {
case 0: DoScriptText(SAY_SUMMON_PHOENIX1, m_creature); break;
case 1: DoScriptText(SAY_SUMMON_PHOENIX2, m_creature); break;
}
@@ -814,26 +884,28 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
DoCast(m_creature, SPELL_SHOCK_BARRIER);
ChainPyros = true;
PyrosCasted = 0;
+ Check_Timer = 0;
ShockBarrier_Timer = 60000;
}else ShockBarrier_Timer -= diff;
//Chain Pyros (3 of them max)
- if (ChainPyros && !m_creature->IsNonMeleeSpellCasted(false))
- {
- if (PyrosCasted < 3)
+ if (ChainPyros){
+ if (PyrosCasted < 3 && Check_Timer < diff)
{
DoCast(m_creature->getVictim(), SPELL_PYROBLAST);
- PyrosCasted++;
+ ++PyrosCasted;
- }else
- {
+ Check_Timer = 4400;
+ }else Check_Timer -= diff;
+ if(PyrosCasted > 3)
+ {
ChainPyros = false;
Fireball_Timer = 2500;
ArcaneDisruption_Timer = 60000;
}
}
- }
+ }else Check_Timer -= 4100;
if (Phase == 5)
{
@@ -844,6 +916,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
DoCast(m_creature, SPELL_EXPLODE);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
Phase = 6;
+ DoStartMovement(m_creature->getVictim());
AttackStart(m_creature->getVictim());
}else Phase_Timer -= diff;
}
@@ -909,7 +982,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
}
}
GravityLapse_Timer = 10000;
- GravityLapse_Phase++;
+ ++GravityLapse_Phase;
break;
case 2:
@@ -918,7 +991,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
DoCast(m_creature, SPELL_NETHER_VAPOR);
GravityLapse_Timer = 20000;
- GravityLapse_Phase++;
+ ++GravityLapse_Phase;
break;
case 3:
@@ -940,6 +1013,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
InGravityLapse = false;
GravityLapse_Timer = 60000;
GravityLapse_Phase = 0;
+ DoStartMovement(m_creature->getVictim());
AttackStart(m_creature->getVictim());
DoResetThreat();
break;
@@ -952,7 +1026,6 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
if(ShockBarrier_Timer < diff)
{
DoCast(m_creature, SPELL_SHOCK_BARRIER);
-
ShockBarrier_Timer = 20000;
}else ShockBarrier_Timer -= diff;
@@ -1024,7 +1097,7 @@ struct TRINITY_DLL_DECL boss_thaladred_the_darkenerAI : public advisorbase_ai
//Gaze_Timer
if(Gaze_Timer < diff)
{
- if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true))
{
DoResetThreat();
m_creature->AddThreat(target, 5000000.0f);
@@ -1349,93 +1422,112 @@ struct TRINITY_DLL_DECL mob_kael_flamestrikeAI : public ScriptedAI
//Phoenix AI
struct TRINITY_DLL_DECL mob_phoenix_tkAI : public ScriptedAI
{
- mob_phoenix_tkAI(Creature *c) : ScriptedAI(c) {Reset();}
-
- uint32 Cycle_Timer;
-
- void Reset()
- {
- Cycle_Timer = 2000;
- m_creature->CastSpell(m_creature,SPELL_BURN,true);
- }
-
- void Aggro(Unit *who) { }
-
- void JustDied(Unit* killer)
- {
- //is this spell in use anylonger?
- //m_creature->CastSpell(m_creature,SPELL_EMBER_BLAST,true);
- m_creature->SummonCreature(PHOENIX_EGG,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,16000);
- }
-
- void UpdateAI(const uint32 diff)
- {
- if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
- return;
-
- if (Cycle_Timer < diff)
- {
- //spell Burn should possible do this, but it doesn't, so do this for now.
- uint32 dmg = urand(4500,5500);
- if (m_creature->GetHealth() > dmg)
- m_creature->SetHealth(uint32(m_creature->GetHealth()-dmg));
- Cycle_Timer = 2000;
- }else Cycle_Timer -= diff;
-
- DoMeleeAttackIfReady();
- }
+ mob_phoenix_tkAI(Creature *c) : ScriptedAI(c) {Reset();}
+
+ uint32 Cycle_Timer;
+ uint8 SummonEgg;
+
+ void Reset()
+ {
+ Cycle_Timer = 2000;
+ SummonEgg = 0;
+ m_creature->CastSpell(m_creature,SPELL_BURN,true);
+ }
+
+ void Aggro(Unit *who) { }
+
+ void DamageTaken(Unit* pKiller, uint32 &damage)
+ {
+ if(m_creature->GetHealth() < damage && SummonEgg < 2){
+ damage = 0;
+ SummonEgg = 1;
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
+ return;
+
+ if(SummonEgg < 2){
+ if (Cycle_Timer < diff)
+ {
+ //spell Burn should possible do this, but it doesn't, so do this for now.
+ uint32 dmg = urand(4500,5500);
+ if (m_creature->GetHealth() > dmg)
+ m_creature->SetHealth(uint32(m_creature->GetHealth()-dmg));
+ Cycle_Timer = 2000;
+ }else Cycle_Timer -= diff;
+ }else {
+ if(Cycle_Timer < diff){
+ m_creature->SummonCreature(PHOENIX_EGG,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,16000);
+ m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ m_creature->RemoveCorpse();
+ }else Cycle_Timer -= diff;
+ }
+
+ if(SummonEgg == 1){ //hack die animation
+ m_creature->RemoveAllAuras();
+ DoStartNoMovement(m_creature->getVictim());
+ m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_DEAD);
+ SummonEgg = 2;
+ Cycle_Timer = 1000;
+ }
+ if(SummonEgg < 2)DoMeleeAttackIfReady();
+ }
};
-
+
//Phoenix Egg AI
struct TRINITY_DLL_DECL mob_phoenix_egg_tkAI : public ScriptedAI
{
- mob_phoenix_egg_tkAI(Creature *c) : ScriptedAI(c) {Reset();}
-
- uint32 Rebirth_Timer;
-
- void Reset()
- {
- Rebirth_Timer = 15000;
- }
-
- //ignore any
- void MoveInLineOfSight(Unit* who) { return; }
-
- void AttackStart(Unit* who)
- {
- if (m_creature->Attack(who, false))
- {
- m_creature->SetInCombatWith(who);
- who->SetInCombatWith(m_creature);
-
- if (!InCombat)
- {
- InCombat = true;
- Aggro(who);
- }
- DoStartNoMovement(who);
- }
- }
-
- void Aggro(Unit *who) { }
-
- void JustSummoned(Creature* summoned)
- {
- summoned->AddThreat(m_creature->getVictim(), 0.0f);
- summoned->CastSpell(summoned,SPELL_REBIRTH,false);
- }
-
- void UpdateAI(const uint32 diff)
- {
- if (!Rebirth_Timer)
- return;
-
- if (Rebirth_Timer <= diff)
- {
- m_creature->SummonCreature(PHOENIX,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_CORPSE_DESPAWN,5000);
- Rebirth_Timer = 0;
- }else Rebirth_Timer -= diff;
- }
+ mob_phoenix_egg_tkAI(Creature *c) : ScriptedAI(c) {Reset();}
+
+ uint32 Rebirth_Timer;
+ bool summoned;
+
+ void Reset(){
+ Rebirth_Timer = 15000;
+ summoned = false;
+ }
+
+ //ignore any
+ void MoveInLineOfSight(Unit* who) { return; }
+
+ void AttackStart(Unit* who)
+ {
+ if (m_creature->Attack(who, false))
+ {
+ m_creature->SetInCombatWith(who);
+ who->SetInCombatWith(m_creature);
+
+ if (!InCombat)
+ {
+ InCombat = true;
+ Aggro(who);
+ }
+ DoStartNoMovement(who);
+ }
+ }
+
+ void Aggro(Unit *who) { }
+
+ void JustSummoned(Creature* summoned)
+ {
+ summoned->AddThreat(m_creature->getVictim(), 0.0f);
+ summoned->CastSpell(summoned,SPELL_REBIRTH,false);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (Rebirth_Timer < diff)
+ {
+ if(!summoned){
+ Creature* Phoenix = m_creature->SummonCreature(PHOENIX,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_CORPSE_DESPAWN,5000);
+ summoned = true;
+ }
+ m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ }else Rebirth_Timer -= diff;
+ }
};
CreatureAI* GetAI_boss_kaelthas(Creature *_Creature)
diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp
index c7e832fd172..256ffbae949 100644
--- a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp
+++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp
@@ -128,7 +128,7 @@ struct TRINITY_DLL_DECL boss_void_reaverAI : public ScriptedAI
target = *(target_list.begin()+rand()%target_list.size());
if (target)
- m_creature->CastSpell(target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(), SPELL_ARCANE_ORB, true);
+ m_creature->CastSpell(target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(), SPELL_ARCANE_ORB, false);
ArcaneOrb_Timer = 3000;
}else ArcaneOrb_Timer -= diff;
diff --git a/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp b/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp
index 81268dd5cea..aca9d6957cd 100644
--- a/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp
+++ b/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp
@@ -38,7 +38,7 @@ EndContentData */
## mob_unkor_the_ruthless
######*/
-#define SAY_SUBMIT "I give up! Please don't kill me!"
+#define SAY_SUBMIT -1000351
#define FACTION_HOSTILE 45
#define FACTION_FRIENDLY 35
@@ -68,7 +68,7 @@ struct TRINITY_DLL_DECL mob_unkor_the_ruthlessAI : public ScriptedAI
void DoNice()
{
- DoSay(SAY_SUBMIT,LANG_UNIVERSAL,NULL);
+ DoScriptText(SAY_SUBMIT, m_creature);
m_creature->setFaction(FACTION_FRIENDLY);
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_SIT);
m_creature->RemoveAllAuras();
@@ -242,7 +242,8 @@ CreatureAI* GetAI_mob_netherweb_victim(Creature *_Creature)
#define GOSSIP_FLOON1 "You owe Sim'salabim money. Hand them over or die!"
#define GOSSIP_FLOON2 "Hand over the money or die...again!"
-#define SAY_FLOON_ATTACK "I choose the third option: KILLING YOU!"
+
+#define SAY_FLOON_ATTACK -1000352
#define FACTION_HOSTILE_FL 1738
#define FACTION_FRIENDLY_FL 35
@@ -320,7 +321,7 @@ bool GossipSelect_npc_floon(Player *player, Creature *_Creature, uint32 sender,
{
player->CLOSE_GOSSIP_MENU();
_Creature->setFaction(FACTION_HOSTILE_FL);
- ((npc_floonAI*)_Creature->AI())->DoSay(SAY_FLOON_ATTACK,LANG_UNIVERSAL,player);
+ DoScriptText(SAY_FLOON_ATTACK, _Creature, player);
((npc_floonAI*)_Creature->AI())->AttackStart(player);
}
return true;
@@ -359,10 +360,10 @@ bool GossipSelect_npc_skyguard_handler_deesak(Player *player, Creature *_Creatur
## npc_isla_starmane
######*/
-#define SAY_PROGRESS_1 "Ok let's get out of here!"
-#define SAY_PROGRESS_2 "You sure you're ready? Take a moment."
-#define SAY_PROGRESS_3 "Alright, let's do this!"
-#define SAY_PROGRESS_4 "Ok, I think I can make it on my own from here. Thank you so much for breaking me out of there!"
+#define SAY_PROGRESS_1 -1000353
+#define SAY_PROGRESS_2 -1000354
+#define SAY_PROGRESS_3 -1000355
+#define SAY_PROGRESS_4 -1000356
#define QUEST_EFTW_H 10052
#define QUEST_EFTW_A 10051
@@ -390,10 +391,10 @@ struct TRINITY_DLL_DECL npc_isla_starmaneAI : public npc_escortAI
if(Cage)
Cage->SetGoState(0);
}break;
- case 2: DoSay(SAY_PROGRESS_1, LANG_UNIVERSAL, player); break;
- case 5: DoSay(SAY_PROGRESS_2, LANG_UNIVERSAL, player); break;
- case 6: DoSay(SAY_PROGRESS_3, LANG_UNIVERSAL, player); break;
- case 29:DoSay(SAY_PROGRESS_4, LANG_UNIVERSAL, player);
+ case 2: DoScriptText(SAY_PROGRESS_1, m_creature, player); break;
+ case 5: DoScriptText(SAY_PROGRESS_2, m_creature, player); break;
+ case 6: DoScriptText(SAY_PROGRESS_3, m_creature, player); break;
+ case 29:DoScriptText(SAY_PROGRESS_4, m_creature, player);
if (player)
{
if(((Player*)player)->GetTeam() == ALLIANCE)
@@ -411,6 +412,7 @@ struct TRINITY_DLL_DECL npc_isla_starmaneAI : public npc_escortAI
void Reset()
{
Completed = false;
+ m_creature->setFaction(1660);
}
void Aggro(Unit* who){}
diff --git a/src/bindings/scripts/scripts/zone/thunder_bluff/thunder_bluff.cpp b/src/bindings/scripts/scripts/zone/thunder_bluff/thunder_bluff.cpp
index 7bd1c540a76..d8b5eafaddb 100644
--- a/src/bindings/scripts/scripts/zone/thunder_bluff/thunder_bluff.cpp
+++ b/src/bindings/scripts/scripts/zone/thunder_bluff/thunder_bluff.cpp
@@ -33,6 +33,7 @@ EndScriptData */
#define SPELL_THUNDERCLAP 23931
#define SPELL_UPPERCUT 22916
+#define GOSSIP_HCB "I know this is rather silly but a young ward who is a bit shy would like your hoofprint."
//TODO: verify abilities/timers
struct TRINITY_DLL_DECL npc_cairne_bloodhoofAI : public ScriptedAI
{
@@ -106,7 +107,7 @@ bool GossipHello_npc_cairne_bloodhoof(Player *player, Creature *_Creature)
player->PrepareQuestMenu( _Creature->GetGUID() );
if( player->GetQuestStatus(925) == QUEST_STATUS_INCOMPLETE )
- player->ADD_GOSSIP_ITEM( 0, "I know this is rather silly but a young ward who is a bit shy would like your hoofprint.", GOSSIP_SENDER_MAIN, GOSSIP_SENDER_INFO );
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HCB, GOSSIP_SENDER_MAIN, GOSSIP_SENDER_INFO );
player->SEND_GOSSIP_MENU(7013, _Creature->GetGUID() );
diff --git a/src/bindings/scripts/scripts/zone/undercity/undercity.cpp b/src/bindings/scripts/scripts/zone/undercity/undercity.cpp
index a5ba4abfd9a..4761af1c7bd 100644
--- a/src/bindings/scripts/scripts/zone/undercity/undercity.cpp
+++ b/src/bindings/scripts/scripts/zone/undercity/undercity.cpp
@@ -33,8 +33,8 @@ EndContentData */
## npc_lady_sylvanas_windrunner
######*/
-#define SAY_LAMENT_END "Belore..."
-#define EMOTE_LAMENT_END "kneels down and pick up the amulet."
+#define SAY_LAMENT_END -1000357
+#define EMOTE_LAMENT_END -1000358
#define SOUND_CREDIT 10896
#define ENTRY_HIGHBORNE_LAMENTER 21628
@@ -51,6 +51,7 @@ float HighborneLoc[4][3]=
{1289.66, 309.66, 1.52},
{1292.51, 310.50, 1.99},
};
+
#define HIGHBORNE_LOC_Y -61.00
#define HIGHBORNE_LOC_Y_NEW -55.50
@@ -85,9 +86,9 @@ struct TRINITY_DLL_DECL npc_lady_sylvanas_windrunnerAI : public ScriptedAI
{
if( Unit* target = Unit::GetUnit(*summoned,targetGUID) )
{
- target->SendMonsterMove(target->GetPositionX(),target->GetPositionY(),myZ+15.0,0,0,0);
- target->Relocate(target->GetPositionX(),target->GetPositionY(),myZ+15.0);
- summoned->CastSpell(target,SPELL_RIBBON_OF_SOULS,false);
+ target->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), myZ+15.0,0,0,0);
+ target->Relocate(target->GetPositionX(), target->GetPositionY(), myZ+15.0);
+ summoned->CastSpell(target, SPELL_RIBBON_OF_SOULS, false);
}
summoned->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
@@ -105,14 +106,14 @@ struct TRINITY_DLL_DECL npc_lady_sylvanas_windrunnerAI : public ScriptedAI
float raY = myY;
float raZ = myZ;
- m_creature->GetRandomPoint(myX,myY,myZ,20.0,raX,raY,raZ);
- m_creature->SummonCreature(ENTRY_HIGHBORNE_BUNNY,raX,raY,myZ,0,TEMPSUMMON_TIMED_DESPAWN,3000);
+ m_creature->GetRandomPoint(myX, myY, myZ, 20.0, raX, raY, raZ);
+ m_creature->SummonCreature(ENTRY_HIGHBORNE_BUNNY, raX, raY, myZ, 0, TEMPSUMMON_TIMED_DESPAWN, 3000);
LamentEvent_Timer = 2000;
- if( !m_creature->HasAura(SPELL_SYLVANAS_CAST,0) )
+ if( !m_creature->HasAura(SPELL_SYLVANAS_CAST, 0))
{
- DoSay(SAY_LAMENT_END,LANG_UNIVERSAL,NULL);
- DoTextEmote(EMOTE_LAMENT_END,NULL);
+ DoScriptText(SAY_LAMENT_END, m_creature);
+ DoScriptText(EMOTE_LAMENT_END, m_creature);
LamentEvent = false;
}
}else LamentEvent_Timer -= diff;
@@ -137,7 +138,7 @@ bool ChooseReward_npc_lady_sylvanas_windrunner(Player *player, Creature *_Creatu
((npc_lady_sylvanas_windrunnerAI*)_Creature->AI())->DoPlaySoundToSet(_Creature,SOUND_CREDIT);
_Creature->CastSpell(_Creature,SPELL_SYLVANAS_CAST,false);
- for( uint8 i = 0; i < 4; i++ )
+ for( uint8 i = 0; i < 4; ++i)
_Creature->SummonCreature(ENTRY_HIGHBORNE_LAMENTER, HighborneLoc[i][0], HighborneLoc[i][1], HIGHBORNE_LOC_Y, HighborneLoc[i][2], TEMPSUMMON_TIMED_DESPAWN, 160000);
}
@@ -200,6 +201,10 @@ CreatureAI* GetAI_npc_highborne_lamenter(Creature *_Creature)
#define SPELL_MARK_OF_SHAME 6767
+#define GOSSIP_HPF1 "Gul'dan"
+#define GOSSIP_HPF2 "Kel'Thuzad"
+#define GOSSIP_HPF3 "Ner'zhul"
+
bool GossipHello_npc_parqual_fintallas(Player *player, Creature *_Creature)
{
if (_Creature->isQuestGiver())
@@ -207,9 +212,9 @@ bool GossipHello_npc_parqual_fintallas(Player *player, Creature *_Creature)
if (player->GetQuestStatus(6628) == QUEST_STATUS_INCOMPLETE && !player->HasAura(SPELL_MARK_OF_SHAME,0) )
{
- player->ADD_GOSSIP_ITEM( 0, "Gul'dan", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- player->ADD_GOSSIP_ITEM( 0, "Kel'Thuzad", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- player->ADD_GOSSIP_ITEM( 0, "Ner'zhul", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HPF1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HPF2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HPF3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
player->SEND_GOSSIP_MENU(5822, _Creature->GetGUID());
}
else
diff --git a/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp b/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp
index ed1f415bb95..48146e0231e 100644
--- a/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp
+++ b/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp
@@ -17,7 +17,7 @@
/* ScriptData
SDName: Western_Plaguelands
SD%Complete: 90
-SDComment: Quest support: 5216,5219,5222,5225,5229,5231,5233,5235. To obtain Vitreous Focuser (could use more spesifics about gossip items)
+SDComment: Quest support: 5216, 5219, 5222, 5225, 5229, 5231, 5233, 5235. To obtain Vitreous Focuser (could use more spesifics about gossip items)
SDCategory: Western Plaguelands
EndScriptData */
@@ -32,6 +32,13 @@ EndContentData */
## npcs_dithers_and_arbington
######*/
+#define GOSSIP_HDA1 "What does the Felstone Field Cauldron need?"
+#define GOSSIP_HDA2 "What does the Dalson's Tears Cauldron need?"
+#define GOSSIP_HDA3 "What does the Writhing Haunt Cauldron need?"
+#define GOSSIP_HDA4 "What does the Gahrron's Withering Cauldron need?"
+
+#define GOSSIP_SDA1 "Thanks, i need a Vitreous Focuser"
+
bool GossipHello_npcs_dithers_and_arbington(Player *player, Creature *_Creature)
{
if(_Creature->isQuestGiver())
@@ -41,10 +48,10 @@ bool GossipHello_npcs_dithers_and_arbington(Player *player, Creature *_Creature)
if(player->GetQuestRewardStatus(5237) || player->GetQuestRewardStatus(5238))
{
- player->ADD_GOSSIP_ITEM(0, "What does the Felstone Field Cauldron need?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- player->ADD_GOSSIP_ITEM(0, "What does the Dalson's Tears Cauldron need?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
- player->ADD_GOSSIP_ITEM(0, "What does the Writhing Haunt Cauldron need?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
- player->ADD_GOSSIP_ITEM(0, "What does the Gahrron's Withering Cauldron need?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_HDA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_HDA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_HDA3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_HDA4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
player->SEND_GOSSIP_MENU(3985, _Creature->GetGUID());
}else
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
@@ -60,19 +67,19 @@ bool GossipSelect_npcs_dithers_and_arbington(Player *player, Creature *_Creature
player->SEND_VENDORLIST( _Creature->GetGUID() );
break;
case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM(0, "Thanks, i need a Vitreous Focuser", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_SDA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
player->SEND_GOSSIP_MENU(3980, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM(0, "Thanks, i need a Vitreous Focuser", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_SDA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
player->SEND_GOSSIP_MENU(3981, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
- player->ADD_GOSSIP_ITEM(0, "Thanks, i need a Vitreous Focuser", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_SDA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
player->SEND_GOSSIP_MENU(3982, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
- player->ADD_GOSSIP_ITEM(0, "Thanks, i need a Vitreous Focuser", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_SDA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
player->SEND_GOSSIP_MENU(3983, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
diff --git a/src/bindings/scripts/scripts/zone/winterspring/winterspring.cpp b/src/bindings/scripts/scripts/zone/winterspring/winterspring.cpp
index 08ead2eb1de..9f1932ecc02 100644
--- a/src/bindings/scripts/scripts/zone/winterspring/winterspring.cpp
+++ b/src/bindings/scripts/scripts/zone/winterspring/winterspring.cpp
@@ -33,13 +33,21 @@ EndContentData */
## npc_lorax
######*/
+#define GOSSIP_HL "Talk to me"
+
+#define GOSSIP_SL1 "What do you do here?"
+#define GOSSIP_SL2 "I can help you"
+#define GOSSIP_SL3 "What deal?"
+#define GOSSIP_SL4 "Then what happened?"
+#define GOSSIP_SL5 "He is not safe, i'll make sure of that."
+
bool GossipHello_npc_lorax(Player *player, Creature *_Creature)
{
if (_Creature->isQuestGiver())
player->PrepareQuestMenu( _Creature->GetGUID() );
if (player->GetQuestStatus(5126) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM( 0, "Talk to me", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_HL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
@@ -51,23 +59,23 @@ bool GossipSelect_npc_lorax(Player *player, Creature *_Creature, uint32 sender,
switch (action)
{
case GOSSIP_ACTION_INFO_DEF:
- player->ADD_GOSSIP_ITEM( 0, "What do you do here?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SL1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->SEND_GOSSIP_MENU(3759, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM( 0, "I can help you", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SL2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
player->SEND_GOSSIP_MENU(3760, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM( 0, "What deal?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SL3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
player->SEND_GOSSIP_MENU(3761, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
- player->ADD_GOSSIP_ITEM( 0, "Then what happened?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SL4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
player->SEND_GOSSIP_MENU(3762, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
- player->ADD_GOSSIP_ITEM( 0, "He is not safe, i'll make sure of that.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
+ player->ADD_GOSSIP_ITEM( 0, GOSSIP_SL5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
player->SEND_GOSSIP_MENU(3763, _Creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
@@ -107,6 +115,8 @@ bool GossipSelect_npc_rivern_frostwind(Player *player, Creature *_Creature, uint
## npc_witch_doctor_mauari
######*/
+#define GOSSIP_HWDM "I'd like you to make me a new Cache of Mau'ari please."
+
bool GossipHello_npc_witch_doctor_mauari(Player *player, Creature *_Creature)
{
if(_Creature->isQuestGiver())
@@ -114,7 +124,7 @@ bool GossipHello_npc_witch_doctor_mauari(Player *player, Creature *_Creature)
if(player->GetQuestRewardStatus(975))
{
- player->ADD_GOSSIP_ITEM(0, "I'd like you to make me a new Cache of Mau'ari please.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+ player->ADD_GOSSIP_ITEM(0, GOSSIP_HWDM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(3377, _Creature->GetGUID());
}else
player->SEND_GOSSIP_MENU(3375, _Creature->GetGUID());
diff --git a/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp b/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp
index 72c283f9f32..2275efbb586 100644
--- a/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp
+++ b/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp
@@ -38,7 +38,7 @@ EndContentData */
#define GOSSIP_ITEM_BLESS_ASH "Grant me your mark, wise ancient."
#define GOSSIP_ITEM_BLESS_KEL "Grant me your mark, mighty ancient."
-#define GOSSIP_REWARD_BLESS "You have my blessing"
+#define GOSSIP_REWARD_BLESS -1000359
//#define TEXT_BLESSINGS "<You need higher standing with Cenarion Expedition to recive a blessing.>"
bool GossipHello_npcs_ashyen_and_keleth(Player *player, Creature *_Creature )
@@ -69,19 +69,19 @@ bool GossipSelect_npcs_ashyen_and_keleth(Player *player, Creature *_Creature, ui
{ //mark of lore
case REP_FRIENDLY:
_Creature->CastSpell(player, 31808, true);
- _Creature->Say(GOSSIP_REWARD_BLESS, LANG_UNIVERSAL, 0);
+ DoScriptText(GOSSIP_REWARD_BLESS, _Creature);
break;
case REP_HONORED:
_Creature->CastSpell(player, 31810, true);
- _Creature->Say(GOSSIP_REWARD_BLESS, LANG_UNIVERSAL, 0);
+ DoScriptText(GOSSIP_REWARD_BLESS, _Creature);
break;
case REP_REVERED:
_Creature->CastSpell(player, 31811, true);
- _Creature->Say(GOSSIP_REWARD_BLESS, LANG_UNIVERSAL, 0);
+ DoScriptText(GOSSIP_REWARD_BLESS, _Creature);
break;
case REP_EXALTED:
_Creature->CastSpell(player, 31815, true);
- _Creature->Say(GOSSIP_REWARD_BLESS, LANG_UNIVERSAL, 0);
+ DoScriptText(GOSSIP_REWARD_BLESS, _Creature);
break;
}
}
@@ -92,19 +92,19 @@ bool GossipSelect_npcs_ashyen_and_keleth(Player *player, Creature *_Creature, ui
{
case REP_FRIENDLY:
_Creature->CastSpell(player, 31807, true);
- _Creature->Say(GOSSIP_REWARD_BLESS, LANG_UNIVERSAL, 0);
+ DoScriptText(GOSSIP_REWARD_BLESS, _Creature);
break;
case REP_HONORED:
_Creature->CastSpell(player, 31812, true);
- _Creature->Say(GOSSIP_REWARD_BLESS, LANG_UNIVERSAL, 0);
+ DoScriptText(GOSSIP_REWARD_BLESS, _Creature);
break;
case REP_REVERED:
_Creature->CastSpell(player, 31813, true);
- _Creature->Say(GOSSIP_REWARD_BLESS, LANG_UNIVERSAL, 0);
+ DoScriptText(GOSSIP_REWARD_BLESS, _Creature);
break;
case REP_EXALTED:
_Creature->CastSpell(player, 31814, true);
- _Creature->Say(GOSSIP_REWARD_BLESS, LANG_UNIVERSAL, 0);
+ DoScriptText(GOSSIP_REWARD_BLESS, _Creature);
break;
}
}
@@ -255,12 +255,12 @@ bool GossipSelect_npc_mortog_steamhead(Player *player, Creature *_Creature, uint
## npc_kayra_longmane
######*/
-#define SAY_PROGRESS_1 "Is the way clear? Let's get out while we can, $N."
-#define SAY_PROGRESS_2 "Looks like we won't get away so easy. Get ready!"
-#define SAY_PROGRESS_3 "Let's keep moving. We're not safe here!"
-#define SAY_PROGRESS_4 "Look out, $N! Enemies ahead!"
-#define SAY_PROGRESS_5 "We're almost to the refuge! Let's go."
-#define SAY_PROGRESS_6 "I can see my fellow druids from here. Thank you, $N. I'm sure Ysiel will reward you for your actions!"
+#define SAY_PROGRESS_1 -1000360
+#define SAY_PROGRESS_2 -1000361
+#define SAY_PROGRESS_3 -1000362
+#define SAY_PROGRESS_4 -1000363
+#define SAY_PROGRESS_5 -1000364
+#define SAY_PROGRESS_6 -1000365
#define QUEST_EFU 9752
#define MOB_AMBUSH 18042
@@ -274,6 +274,7 @@ struct TRINITY_DLL_DECL npc_kayra_longmaneAI : public npc_escortAI
void Reset()
{
Completed = false;
+ m_creature->setFaction(1660);
}
void Aggro(Unit* who){}
@@ -290,21 +291,21 @@ struct TRINITY_DLL_DECL npc_kayra_longmaneAI : public npc_escortAI
switch(i)
{
- case 0: DoSay(SAY_PROGRESS_1, LANG_UNIVERSAL, player); break;
- case 5: DoSay(SAY_PROGRESS_2, LANG_UNIVERSAL, player);
+ case 0: DoScriptText(SAY_PROGRESS_1, m_creature, player); break;
+ case 5: DoScriptText(SAY_PROGRESS_2, m_creature, player);
m_creature->SummonCreature(MOB_AMBUSH, -922.24, 5357.98, 17.93, 5.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
m_creature->SummonCreature(MOB_AMBUSH, -922.24, 5357.98, 17.93, 5.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
break;
- case 6: DoSay(SAY_PROGRESS_3, LANG_UNIVERSAL, player);
+ case 6: DoScriptText(SAY_PROGRESS_3, m_creature, player);
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
break;
- case 18: DoSay(SAY_PROGRESS_4, LANG_UNIVERSAL, player);
+ case 18: DoScriptText(SAY_PROGRESS_4, m_creature, player);
m_creature->SummonCreature(MOB_AMBUSH, -671.86, 5379.81, 22.12, 5.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
m_creature->SummonCreature(MOB_AMBUSH, -671.86, 5379.81, 22.12, 5.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
break;
case 19: m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
- DoSay(SAY_PROGRESS_5, LANG_UNIVERSAL, player); break;
- case 26: DoSay(SAY_PROGRESS_6, LANG_UNIVERSAL, player);
+ DoScriptText(SAY_PROGRESS_5, m_creature, player); break;
+ case 26: DoScriptText(SAY_PROGRESS_6, m_creature, player);
Completed = true;
if(player)
((Player*)player)->GroupEventHappens(QUEST_EFU, m_creature);
diff --git a/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp b/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp
index dcb39d25c0a..f2b1fb3ce47 100644
--- a/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp
+++ b/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp
@@ -395,7 +395,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
if(Mangle_Timer < diff)
{
- if(!m_creature->getVictim()->HasAura(SPELL_MANGLEEFFECT, 0))
+ if(m_creature->getVictim() && !m_creature->getVictim()->HasAura(SPELL_MANGLEEFFECT, 0))
{
DoCast(m_creature->getVictim(), SPELL_MANGLE);
Mangle_Timer = 1000;
diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_mandokir.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_mandokir.cpp
index 14f3702354d..a440ba4a575 100644
--- a/src/bindings/scripts/scripts/zone/zulgurub/boss_mandokir.cpp
+++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_mandokir.cpp
@@ -131,7 +131,8 @@ struct TRINITY_DLL_DECL boss_mandokirAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
- if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
+ Unit *victim = m_creature->SelectHostilTarget();
+ if(!victim)
return;
if( m_creature->getVictim() && m_creature->isAlive())
@@ -234,11 +235,11 @@ struct TRINITY_DLL_DECL boss_mandokirAI : public ScriptedAI
}else Fear_Timer -=diff;
//Mortal Strike if target below 50% hp
- if (m_creature->getVictim()->GetHealth() < m_creature->getVictim()->GetMaxHealth()*0.5)
+ if (victim && victim->GetHealth() < victim->GetMaxHealth()*0.5)
{
if (MortalStrike_Timer < diff)
{
- DoCast(m_creature->getVictim(),SPELL_MORTAL_STRIKE);
+ DoCast(victim,SPELL_MORTAL_STRIKE);
MortalStrike_Timer = 15000;
}else MortalStrike_Timer -= diff;
}
diff --git a/src/game/AuctionHouse.cpp b/src/game/AuctionHouse.cpp
index a12e8a8f238..39aaa864bd2 100644
--- a/src/game/AuctionHouse.cpp
+++ b/src/game/AuctionHouse.cpp
@@ -28,6 +28,7 @@
#include "UpdateMask.h"
#include "AuctionHouseObject.h"
#include "Util.h"
+#include "AuctionHouseBot.h"
//please DO NOT use iterator++, because it is slower than ++iterator!!!
//post-incrementation is always slower than pre-incrementation !
@@ -171,7 +172,10 @@ void WorldSession::SendAuctionOutbiddedMail(AuctionEntry *auction, uint32 newPri
std::ostringstream msgAuctionOutbiddedSubject;
msgAuctionOutbiddedSubject << auction->item_template << ":0:" << AUCTION_OUTBIDDED;
- if (oldBidder)
+ if (oldBidder && !_player)
+ oldBidder->GetSession()->SendAuctionBidderNotification( auction->location, auction->Id, AHBplayerGUID, newPrice, objmgr.GetAuctionOutBid(auction->bid), auction->item_template);
+
+ if (oldBidder && _player)
oldBidder->GetSession()->SendAuctionBidderNotification( auction->location, auction->Id, _player->GetGUID(), newPrice, objmgr.GetAuctionOutBid(auction->bid), auction->item_template);
WorldSession::SendMailTo(oldBidder, MAIL_AUCTION, MAIL_STATIONERY_AUCTION, auction->location, auction->bidder, msgAuctionOutbiddedSubject.str(), 0, NULL, auction->bid, 0, MAIL_CHECK_MASK_NONE);
diff --git a/src/game/AuctionHouseBot.cpp b/src/game/AuctionHouseBot.cpp
new file mode 100644
index 00000000000..f05d31abb41
--- /dev/null
+++ b/src/game/AuctionHouseBot.cpp
@@ -0,0 +1,1198 @@
+#include "AuctionHouseBot.h"
+#include "Bag.h"
+#include "Config/ConfigEnv.h"
+#include "Database/DatabaseEnv.h"
+#include "Item.h"
+#include "Log.h"
+#include "ObjectMgr.h"
+#include "Player.h"
+#include "World.h"
+#include "WorldSession.h"
+#include "time.h"
+#include <vector>
+#include <iostream>
+
+using namespace std;
+
+static bool debug_Out = sConfig.GetIntDefault("AuctionHouseBot.DEBUG", 0);
+
+static vector<uint32> npcItems;
+static vector<uint32> lootItems;
+static vector<uint32> whiteTradeGoods;
+static vector<uint32> greenTradeGoods;
+static vector<uint32> blueTradeGoods;
+static vector<uint32> purpleTradeGoods;
+static vector<uint32> whiteItems;
+static vector<uint32> greenItems;
+static vector<uint32> blueItems;
+static vector<uint32> purpleItems;
+
+static bool AHBSeller = 0;
+static bool AHBBuyer = 0;
+
+static bool Vendor_Items = 0;
+static bool Loot_Items = 0;
+static bool Other_Items = 0;
+
+static bool No_Bind = 0;
+static bool Bind_When_Picked_Up = 0;
+static bool Bind_When_Equipped = 0;
+static bool Bind_When_Use = 0;
+static bool Bind_Quest_Item = 0;
+
+static AHBConfig AllianceConfig = AHBConfig(2);
+static AHBConfig HordeConfig = AHBConfig(6);
+static AHBConfig NeutralConfig = AHBConfig(7);
+time_t _lastrun_a;
+time_t _lastrun_h;
+time_t _lastrun_n;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+///////////////////////////////////////////////////////////////////////////////
+static inline uint32 minValue(uint32 a, uint32 b)
+{
+ return a <= b ? a : b;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+///////////////////////////////////////////////////////////////////////////////
+static void addNewAuctions(Player *AHBplayer, AHBConfig *config)
+{
+ if (!AHBSeller)
+ return;
+ AuctionHouseObject* auctionHouse = objmgr.GetAuctionsMap(config->GetAHID());
+ uint32 items = 0;
+ uint32 minItems = config->GetMinItems();
+ uint32 maxItems = config->GetMaxItems();
+ uint32 auctions = auctionHouse->Getcount();
+
+ if (auctions >= minItems)
+ return;
+ if (auctions <= maxItems)
+ {
+ if ((maxItems - auctions) > ItemsPerCycle)
+ items = ItemsPerCycle;
+ else
+ items = (maxItems - auctions);
+ }
+ uint32 wtgbin = config->GetPercents(AHB_WHITE_TG);
+ uint32 gtgbin = config->GetPercents(AHB_GREEN_TG);
+ uint32 btgbin = config->GetPercents(AHB_BLUE_TG);
+ uint32 ptgbin = config->GetPercents(AHB_PURPLE_TG);
+ uint32 wibin = config->GetPercents(AHB_WHITE_I);
+ uint32 gibin = config->GetPercents(AHB_GREEN_I);
+ uint32 bibin = config->GetPercents(AHB_BLUE_I);
+ uint32 pibin = config->GetPercents(AHB_PURPLE_I);
+ uint32 total = wtgbin + gtgbin + btgbin + ptgbin + wibin + gibin + bibin + pibin;
+
+ uint32 pItems = 0;
+ uint32 bItems = 0;
+ uint32 gItems = 0;
+ uint32 wItems = 0;
+ uint32 pTGoods = 0;
+ uint32 bTGoods = 0;
+ uint32 gTGoods = 0;
+ uint32 wTGoods = 0;
+ for (AuctionHouseObject::AuctionEntryMap::iterator itr = auctionHouse->GetAuctionsBegin();itr != auctionHouse->GetAuctionsEnd();++itr)
+ {
+ AuctionEntry *Aentry = itr->second;
+ Item *item = objmgr.GetAItem(Aentry->item_guidlow);
+ if( item )
+ {
+ ItemPrototype const *prototype = item->GetProto();
+ if( prototype )
+ {
+ switch (prototype->Quality)
+ {
+ case 0:
+ if (prototype->Class == ITEM_CLASS_TRADE_GOODS)
+ wTGoods = wTGoods + 1;
+ else
+ wItems = wItems + 1;
+ break;
+
+ case 1:
+ if (prototype->Class == ITEM_CLASS_TRADE_GOODS)
+ wTGoods = wTGoods + 1;
+ else
+ wItems = wItems + 1;
+ break;
+
+ case 2:
+ if (prototype->Class == ITEM_CLASS_TRADE_GOODS)
+ gTGoods = gTGoods + 1;
+ else
+ gItems = gItems + 1;
+ break;
+
+ case 3:
+ if (prototype->Class == ITEM_CLASS_TRADE_GOODS)
+ bTGoods = bTGoods + 1;
+ else
+ bItems = bItems + 1;
+ break;
+
+ case 4:
+ if (prototype->Class == ITEM_CLASS_TRADE_GOODS)
+ pTGoods = pTGoods + 1;
+ else
+ pItems = pItems + 1;
+ break;
+ }
+ }
+ }
+ }
+ // only insert a few at a time, so as not to peg the processor
+ for (uint32 cnt = 1;cnt <= items;cnt++)
+ {
+ uint32 itemID = 0;
+ while (itemID == 0)
+ {
+ uint32 choice = urand(1, 8);
+ switch (choice)
+ {
+ case 1:
+ {
+ if ((purpleItems.size() > 0) && (pItems < pibin))
+ {
+ itemID = purpleItems[urand(0, purpleItems.size() - 1)];
+ pItems = pItems + 1;
+ break;
+ }
+ }
+ case 2:
+ {
+ if ((blueItems.size() > 0) && (bItems < bibin))
+ {
+ itemID = blueItems[urand(0, blueItems.size() - 1)];
+ bItems = bItems + 1;
+ break;
+ }
+ }
+ case 3:
+ {
+ if ((greenItems.size() > 0) && (gItems < gibin))
+ {
+ itemID = greenItems[urand(0, greenItems.size() - 1)];
+ gItems = gItems + 1;
+ break;
+ }
+ }
+ case 4:
+ {
+ if ((whiteItems.size() > 0) && (wItems < wibin))
+ {
+ itemID = whiteItems[urand(0, whiteItems.size() - 1)];
+ wItems = wItems + 1;
+ break;
+ }
+ }
+ case 5:
+ {
+ if ((purpleTradeGoods.size() > 0) && (pTGoods < ptgbin))
+ {
+ itemID = purpleTradeGoods[urand(0, purpleTradeGoods.size() - 1)];
+ pTGoods = pTGoods + 1;
+ break;
+ }
+ }
+ case 6:
+ {
+ if ((blueTradeGoods.size() > 0) && (bTGoods < btgbin))
+ {
+ itemID = blueTradeGoods[urand(0, blueTradeGoods.size() - 1)];
+ bTGoods = bTGoods + 1;
+ break;
+ }
+ }
+ case 7:
+ {
+ if ((greenTradeGoods.size() > 0) && (gTGoods < gtgbin))
+ {
+ itemID = greenTradeGoods[urand(0, greenTradeGoods.size() - 1)];
+ gTGoods = gTGoods + 1;
+ break;
+ }
+ }
+ case 8:
+ {
+ if ((whiteTradeGoods.size() > 0) && (wTGoods < wtgbin))
+ {
+ itemID = whiteTradeGoods[urand(0, whiteTradeGoods.size() - 1)];
+ wTGoods = wTGoods + 1;
+ break;
+ }
+ }
+ default:
+ {
+ break;
+ }
+ }
+ }
+
+ ItemPrototype const* prototype = objmgr.GetItemPrototype(itemID);
+ if (prototype == NULL)
+ {
+ sLog.outString("AuctionHouseBot: Huh?!?! prototype == NULL");
+ continue;
+ }
+
+ Item* item = Item::CreateItem(itemID, 1, AHBplayer);
+ item->AddToUpdateQueueOf(AHBplayer);
+ if (item == NULL)
+ {
+ sLog.outString("AuctionHouseBot: Item::CreateItem() returned NULL");
+ break;
+ }
+
+ uint32 randomPropertyId = Item::GenerateItemRandomPropertyId(itemID);
+ if (randomPropertyId != 0)
+ item->SetItemRandomProperties(randomPropertyId);
+
+ uint32 buyoutPrice;
+ uint32 bidPrice = 0;
+ uint32 stackCount = urand(1, item->GetMaxStackCount());
+
+ switch (SellMethod)
+ {
+ case 0:
+ buyoutPrice = prototype->SellPrice * item->GetCount();
+ break;
+ case 1:
+ buyoutPrice = prototype->BuyPrice * item->GetCount();
+ break;
+ default:
+ buyoutPrice = 0;
+ break;
+ }
+
+ switch (prototype->Quality)
+ {
+ case 1:
+ if (config->GetMaxStack(AHB_WHITE) != 0)
+ {
+ stackCount = urand(1, minValue(item->GetMaxStackCount(), config->GetMaxStack(AHB_WHITE)));
+ }
+ buyoutPrice *= urand(config->GetMinPrice(AHB_WHITE), config->GetMaxPrice(AHB_WHITE)) * stackCount;
+ buyoutPrice /= 100;
+ bidPrice = buyoutPrice * urand(config->GetMinBidPrice(AHB_WHITE), config->GetMaxBidPrice(AHB_WHITE));
+ bidPrice /= 100;
+ break;
+
+ case 2:
+ if (config->GetMaxStack(AHB_GREEN) != 0)
+ {
+ stackCount = urand(1, minValue(item->GetMaxStackCount(), config->GetMaxStack(AHB_GREEN)));
+ }
+ buyoutPrice *= urand(config->GetMinPrice(AHB_GREEN), config->GetMaxPrice(AHB_GREEN)) * stackCount;
+ buyoutPrice /= 100;
+ bidPrice = buyoutPrice * urand(config->GetMinBidPrice(AHB_GREEN), config->GetMaxBidPrice(AHB_GREEN));
+ bidPrice /= 100;
+ break;
+
+ case 3:
+ if (config->GetMaxStack(AHB_BLUE) != 0)
+ {
+ stackCount = urand(1, minValue(item->GetMaxStackCount(), config->GetMaxStack(AHB_BLUE)));
+ }
+ buyoutPrice *= urand(config->GetMinPrice(AHB_BLUE), config->GetMaxPrice(AHB_BLUE)) * stackCount;
+ buyoutPrice /= 100;
+ bidPrice = buyoutPrice * urand(config->GetMinBidPrice(AHB_BLUE), config->GetMaxBidPrice(AHB_BLUE));
+ bidPrice /= 100;
+ break;
+
+ case 4:
+ if (config->GetMaxStack(AHB_PURPLE) != 0)
+ {
+ stackCount = urand(1, minValue(item->GetMaxStackCount(), config->GetMaxStack(AHB_PURPLE)));
+ }
+ buyoutPrice *= urand(config->GetMinPrice(AHB_PURPLE), config->GetMaxPrice(AHB_PURPLE)) * stackCount;
+ buyoutPrice /= 100;
+ bidPrice = buyoutPrice * urand(config->GetMinBidPrice(AHB_PURPLE), config->GetMaxBidPrice(AHB_PURPLE));
+ bidPrice /= 100;
+ break;
+ }
+
+ item->SetCount(stackCount);
+
+ AuctionEntry* auctionEntry = new AuctionEntry;
+ auctionEntry->Id = objmgr.GenerateAuctionID();
+ auctionEntry->auctioneer = 0;
+ auctionEntry->item_guidlow = item->GetGUIDLow();
+ auctionEntry->item_template = item->GetEntry();
+ auctionEntry->owner = AHBplayer->GetGUIDLow();
+ auctionEntry->startbid = bidPrice;
+ auctionEntry->buyout = buyoutPrice;
+ auctionEntry->bidder = 0;
+ auctionEntry->bid = 0;
+ auctionEntry->deposit = 0;
+ auctionEntry->location = config->GetAHID();
+ auctionEntry->time = (time_t) (urand(config->GetMinTime(), config->GetMaxTime()) * 60 * 60 + time(NULL));
+ item->SaveToDB();
+ item->RemoveFromUpdateQueueOf(AHBplayer);
+ objmgr.AddAItem(item);
+ auctionHouse->AddAuction(auctionEntry);
+
+ CharacterDatabase.PExecute("INSERT INTO `auctionhouse` (`id`,"
+ "`auctioneerguid`,`itemguid`,`item_template`,"
+ "`itemowner`,`buyoutprice`,`time`,`buyguid`,"
+ "`lastbid`,`startbid`,`deposit`,`location`) "
+ "VALUES ('%u', '%u', '%u', '%u', '%u', '%u', "
+ "'" I64FMTD "', '%u', '%u', '%u', '%u', '%u')",
+ auctionEntry->Id,
+ auctionEntry->auctioneer,
+ auctionEntry->item_guidlow,
+ auctionEntry->item_template,
+ auctionEntry->owner,
+ auctionEntry->buyout,
+ (uint64) auctionEntry->time,
+ auctionEntry->bidder,
+ auctionEntry->bid,
+ auctionEntry->startbid,
+ auctionEntry->deposit,
+ auctionEntry->location);
+ }
+}
+
+static void addNewAuctionBuyerBotBid(Player *AHBplayer, AHBConfig *config, WorldSession *session)
+{
+ if (!AHBBuyer)
+ return;
+
+ // Fetches content of selected AH
+ AuctionHouseObject* auctionHouse = objmgr.GetAuctionsMap(config->GetAHID());
+ AuctionHouseObject::AuctionEntryMap::iterator itr;
+
+ itr = auctionHouse->GetAuctionsBegin();
+ vector<uint32> possibleBids;
+
+ while (itr != auctionHouse->GetAuctionsEnd())
+ {
+ AuctionHouseObject::AuctionEntryMap::iterator tmp = itr;
+ ++itr;
+ // Check if the auction is ours
+ // if it is, we skip this iteration.
+ if(tmp->second->owner == AHBplayerGUID)
+ {
+ continue;
+ }
+ // Check that we haven't bidded in this auction already.
+ if(tmp->second->bidder != AHBplayerGUID)
+ {
+ uint32 tmpdata = tmp->second->Id;
+ possibleBids.push_back(tmpdata);
+ }
+ }
+
+ // Do we have anything to bid? If not, stop here.
+ if(possibleBids.empty())
+ {
+ return;
+ }
+
+ // Choose random auction from possible auctions
+ uint32 auctionID = possibleBids[urand(0, possibleBids.size() - 1)];
+
+ // from auctionhouse.cpp, creates auction pointer & player pointer
+ AuctionEntry* auction = auctionHouse->GetAuction(auctionID);
+
+ // get exact item information
+ Item *pItem = objmgr.GetAItem(auction->item_guidlow);
+ if (!pItem)
+ {
+ sLog.outError("Item doesn't exists, perhaps bought already?");
+ return;
+ }
+
+ // get item prototype
+ ItemPrototype const* prototype = objmgr.GetItemPrototype(auction->item_template);
+
+ // check which price we have to use, startbid or if it is bidded already
+ if(debug_Out)
+ {sLog.outError("Auction Number: %u", auction->Id);}
+ if(debug_Out)
+ {sLog.outError("Item Template: %u", auction->item_template);}
+ if(debug_Out)
+ {sLog.outError("Buy Price: %u", prototype->BuyPrice);}
+ if(debug_Out)
+ {sLog.outError("Sell Price: %u", prototype->SellPrice);}
+ if(debug_Out)
+ {sLog.outError("Quality: %u", prototype->Quality);}
+ uint32 currentprice;
+ if(auction->bid)
+ {
+ currentprice = auction->bid;
+ if(debug_Out)
+ {sLog.outError("Current Price: %u", auction->bid);}
+ }
+ else
+ {
+ currentprice = auction->startbid;
+ if(debug_Out)
+ {sLog.outError("Current Price: %u", auction->startbid);}
+ }
+ uint32 bidprice;
+
+ // Prepare portion from maximum bid
+ uint32 tmprate2 = urand(0, 100);
+ double tmprate = static_cast<double>(tmprate2);
+ if(debug_Out)
+ {sLog.outError("tmprate: %f", tmprate);}
+ double bidrate = tmprate / 100;
+ if(debug_Out)
+ {sLog.outError("bidrate: %f", bidrate);}
+ long double bidMax = 0;
+
+ // check that bid has acceptable value and take bid based on vendorprice, stacksize and quality
+ switch (BuyMethod)
+ {
+ case 0:
+ switch (prototype->Quality)
+ {
+ case 0:
+ if(currentprice < prototype->SellPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_GREY))
+ {
+ bidMax = prototype->SellPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_GREY);
+ }
+ break;
+ case 1:
+ if(currentprice < prototype->SellPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_WHITE))
+ {
+ bidMax = prototype->SellPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_WHITE);
+ }
+ break;
+ case 2:
+ if(currentprice < prototype->SellPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_GREEN))
+ {
+ bidMax = prototype->SellPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_GREEN);
+ }
+ break;
+ case 3:
+ if(currentprice < prototype->SellPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_BLUE))
+ {
+ bidMax = prototype->SellPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_BLUE);
+ }
+ break;
+ case 4:
+ if(currentprice < prototype->SellPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_PURPLE))
+ {
+ bidMax = prototype->SellPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_PURPLE);
+ }
+ break;
+ default:
+ // quality is something it shouldn't be, let's get out of here
+ if(debug_Out)
+ {sLog.outError("bidMax(fail): %f", bidMax);}
+ return;
+ break;
+ }
+ break;
+ case 1:
+ switch (prototype->Quality)
+ {
+ case 0:
+ if(currentprice < prototype->BuyPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_GREY))
+ {
+ bidMax = prototype->BuyPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_GREY);
+ }
+ break;
+ case 1:
+ if(currentprice < prototype->BuyPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_WHITE))
+ {
+ bidMax = prototype->BuyPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_WHITE);
+ }
+ break;
+ case 2:
+ if(currentprice < prototype->BuyPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_GREEN))
+ {
+ bidMax = prototype->BuyPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_GREEN);
+ }
+ break;
+ case 3:
+ if(currentprice < prototype->BuyPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_BLUE))
+ {
+ bidMax = prototype->BuyPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_BLUE);
+ }
+ break;
+ case 4:
+ if(currentprice < prototype->BuyPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_PURPLE))
+ {
+ bidMax = prototype->BuyPrice * pItem->GetCount() * config->GetBuyerPrice(AHB_PURPLE);
+ }
+ break;
+ default:
+ // quality is something it shouldn't be, let's get out of here
+ if(debug_Out)
+ {sLog.outError("bidMax(fail): %f", bidMax);}
+ return;
+ break;
+ }
+ break;
+ default:
+ bidMax = 0;
+ break;
+ }
+ if(debug_Out)
+ {sLog.outError("bidMax(succeed): %f", bidMax);}
+
+ // check some special items, and do recalculating to their prices
+ switch (prototype->Class)
+ {
+ // ammo
+ case 6:
+ bidMax = 0;
+ break;
+ default:
+ break;
+ }
+
+ if(bidMax == 0)
+ {
+ // quality check failed to get bidmax, let's get out of here
+ return;
+ }
+
+ // Calculate our bid
+ long double bidvalue = currentprice + ( (bidMax - currentprice) * bidrate);
+ if(debug_Out)
+ {sLog.outError("bidvalue: %f", bidvalue);}
+ // Convert to uint32
+ bidprice = static_cast<uint32>(bidvalue);
+ if(debug_Out)
+ {sLog.outError("bidprice: %u", bidprice);}
+
+ // Check our bid is high enough to be valid. If not, correct it to minimum.
+ if((currentprice + objmgr.GetAuctionOutBid(currentprice)) > bidprice)
+ {
+ bidprice = currentprice + objmgr.GetAuctionOutBid(currentprice);
+ if(debug_Out)
+ {sLog.outError("bidprice(>): %u", bidprice);}
+ }
+
+ // Check wether we do normal bid, or buyout
+ if ((bidprice < auction->buyout) || (auction->buyout == 0))
+ {
+
+ if (auction->bidder > 0)
+ {
+ if ( auction->bidder == AHBplayer->GetGUIDLow() )
+ {
+ //pl->ModifyMoney( -int32(price - auction->bid));
+ }
+ else
+ {
+ // mail to last bidder and return money
+ session->SendAuctionOutbiddedMail( auction , bidprice );
+ //pl->ModifyMoney( -int32(price) );
+ }
+ }
+
+ auction->bidder = AHBplayer->GetGUIDLow();
+ auction->bid = bidprice;
+
+ // Saving auction into database
+ CharacterDatabase.PExecute("UPDATE auctionhouse SET buyguid = '%u',lastbid = '%u' WHERE id = '%u'", auction->bidder, auction->bid, auction->Id);
+ }
+ else
+ {
+ //buyout
+ if (AHBplayer->GetGUIDLow() == auction->bidder )
+ {
+ //pl->ModifyMoney(-int32(auction->buyout - auction->bid));
+ }
+ else
+ {
+ //pl->ModifyMoney(-int32(auction->buyout));
+ if ( auction->bidder )
+ {
+ session->SendAuctionOutbiddedMail( auction, auction->buyout );
+ }
+ }
+ auction->bidder = AHBplayer->GetGUIDLow();
+ auction->bid = auction->buyout;
+
+ // Send mails to buyer & seller
+ objmgr.SendAuctionSuccessfulMail( auction );
+ objmgr.SendAuctionWonMail( auction );
+
+ // Remove item from auctionhouse
+ objmgr.RemoveAItem(auction->item_guidlow);
+ // Remove auction
+ auctionHouse->RemoveAuction(auction->Id);
+ // Remove from database
+ CharacterDatabase.PExecute("DELETE FROM auctionhouse WHERE id = '%u'",auction->Id);
+
+ delete auction;
+ }
+}
+///////////////////////////////////////////////////////////////////////////////
+//
+///////////////////////////////////////////////////////////////////////////////
+void AuctionHouseBot()
+{
+ time_t _newrun = time(NULL);
+ if ((!AHBSeller) && (!AHBBuyer))
+ return;
+
+ WorldSession _session(AHBplayerAccount, NULL, 0, true, 0, LOCALE_enUS);
+ Player _AHBplayer(&_session);
+ _AHBplayer.MinimalLoadFromDB(NULL, AHBplayerGUID);
+ ObjectAccessor::Instance().AddObject(&_AHBplayer);
+
+ if(sConfig.GetIntDefault("AllowTwoSide.Interaction.Auction",0) == 0)
+ {
+ addNewAuctions(&_AHBplayer, &AllianceConfig);
+ if (((_newrun - _lastrun_a) > (AllianceConfig.GetBiddingInterval() * 60)) && (AllianceConfig.GetBidsPerInterval() > 0))
+ {
+ uint32 bids = AllianceConfig.GetBidsPerInterval();
+ for (uint32 count = 1;count <= bids;count++)
+ {
+ addNewAuctionBuyerBotBid(&_AHBplayer, &AllianceConfig, &_session);
+ _lastrun_a = _newrun;
+ }
+ }
+ addNewAuctions(&_AHBplayer, &HordeConfig);
+ if (((_newrun - _lastrun_h) > (HordeConfig.GetBiddingInterval() *60)) && (HordeConfig.GetBidsPerInterval() > 0))
+ {
+ uint32 bids = HordeConfig.GetBidsPerInterval();
+ for (uint32 count = 1;count <= bids;count++)
+ {
+ addNewAuctionBuyerBotBid(&_AHBplayer, &HordeConfig, &_session);
+ _lastrun_h = _newrun;
+ }
+ }
+ }
+ addNewAuctions(&_AHBplayer, &NeutralConfig);
+ if (((_newrun - _lastrun_n) > (NeutralConfig.GetBiddingInterval() * 60)) && (NeutralConfig.GetBidsPerInterval() > 0))
+ {
+ uint32 bids = NeutralConfig.GetBidsPerInterval();
+ for (uint32 count = 1;count <= bids;count++)
+ {
+ addNewAuctionBuyerBotBid(&_AHBplayer, &NeutralConfig, &_session);
+ _lastrun_n = _newrun;
+ }
+ }
+ ObjectAccessor::Instance().RemoveObject(&_AHBplayer);
+}
+///////////////////////////////////////////////////////////////////////////////
+//
+///////////////////////////////////////////////////////////////////////////////
+void AuctionHouseBotInit()
+{
+ AHBSeller = sConfig.GetBoolDefault("AuctionHouseBot.EnableSeller", 0);
+ AHBBuyer = sConfig.GetBoolDefault("AuctionHouseBot.EnableBuyer", 0);
+ No_Bind = sConfig.GetBoolDefault("AuctionHouseBot.No_Bind", 1);
+ Bind_When_Picked_Up = sConfig.GetBoolDefault("AuctionHouseBot.Bind_When_Picked_Up", 0);
+ Bind_When_Equipped = sConfig.GetBoolDefault("AuctionHouseBot.Bind_When_Equipped", 1);
+ Bind_When_Use = sConfig.GetBoolDefault("AuctionHouseBot.Bind_When_Use", 1);
+ Bind_Quest_Item = sConfig.GetBoolDefault("AuctionHouseBot.Bind_Quest_Item", 0);
+
+ if(sConfig.GetBoolDefault("AllowTwoSide.Interaction.Auction",0) == 0)
+ {
+ AuctionHouseBotLoadValues(&AllianceConfig);
+ AuctionHouseBotLoadValues(&HordeConfig);
+ }
+ AuctionHouseBotLoadValues(&NeutralConfig);
+
+ if (AHBSeller)
+ {
+ Vendor_Items = sConfig.GetBoolDefault("AuctionHouseBot.VendorItems", 0);
+ Loot_Items = sConfig.GetBoolDefault("AuctionHouseBot.LootItems", 1);
+ Other_Items = sConfig.GetBoolDefault("AuctionHouseBot.OtherItems", 0);
+
+ QueryResult* results = (QueryResult*) NULL;
+ char npcQuery[] = "SELECT distinct `item` FROM `npc_vendor`";
+ results = WorldDatabase.PQuery(npcQuery);
+ if (results != NULL)
+ {
+ do
+ {
+ Field* fields = results->Fetch();
+ npcItems.push_back(fields[0].GetUInt32());
+
+ } while (results->NextRow());
+
+ delete results;
+ }
+ else
+ {
+ sLog.outString("AuctionHouseBot: \"%s\" failed", npcQuery);
+ }
+
+ char lootQuery[] = "SELECT `item` FROM `creature_loot_template` UNION "
+ "SELECT `item` FROM `disenchant_loot_template` UNION "
+ "SELECT `item` FROM `fishing_loot_template` UNION "
+ "SELECT `item` FROM `gameobject_loot_template` UNION "
+ "SELECT `item` FROM `item_loot_template` UNION "
+ "SELECT `item` FROM `pickpocketing_loot_template` UNION "
+ "SELECT `item` FROM `prospecting_loot_template` UNION "
+ "SELECT `item` FROM `skinning_loot_template`";
+
+ results = WorldDatabase.PQuery(lootQuery);
+ if (results != NULL)
+ {
+ do
+ {
+ Field* fields = results->Fetch();
+ lootItems.push_back(fields[0].GetUInt32());
+
+ } while (results->NextRow());
+
+ delete results;
+ }
+ else
+ {
+ sLog.outString("AuctionHouseBot: \"%s\" failed", lootQuery);
+ }
+
+ for (uint32 itemID = 0; itemID < sItemStorage.MaxEntry; itemID++)
+ {
+ ItemPrototype const* prototype = objmgr.GetItemPrototype(itemID);
+
+ if (prototype == NULL)
+ continue;
+
+ switch (prototype->Bonding)
+ {
+ case 0:
+ if (!No_Bind)
+ continue;
+ break;
+ case 1:
+ if (!Bind_When_Picked_Up)
+ continue;
+ break;
+ case 2:
+ if (!Bind_When_Equipped)
+ continue;
+ break;
+ case 3:
+ if (!Bind_When_Use)
+ continue;
+ break;
+ case 4:
+ if (!Bind_Quest_Item)
+ continue;
+ break;
+ default:
+ continue;
+ break;
+ }
+
+ switch (SellMethod)
+ {
+ case 0:
+ if (prototype->SellPrice == 0)
+ continue;
+ break;
+ case 1:
+ if (prototype->BuyPrice == 0)
+ continue;
+ break;
+ default:
+ continue;
+ break;
+ }
+
+ if ((prototype->Quality < 1) || (prototype->Quality > 4))
+ continue;
+
+ if (Vendor_Items == 0)
+ {
+ bool isVendorItem = false;
+
+ for (unsigned int i = 0; (i < npcItems.size()) && (!isVendorItem); i++)
+ {
+ if (itemID == npcItems[i])
+ isVendorItem = true;
+ }
+
+ if (isVendorItem)
+ continue;
+ }
+
+ if (Loot_Items == 0)
+ {
+ bool isLootItem = false;
+
+ for (unsigned int i = 0; (i < lootItems.size()) && (!isLootItem); i++)
+ {
+ if (itemID == lootItems[i])
+ isLootItem = true;
+ }
+
+ if (isLootItem)
+ continue;
+ }
+
+ if (Other_Items == 0)
+ {
+ bool isVendorItem = false;
+ bool isLootItem = false;
+
+ for (unsigned int i = 0; (i < npcItems.size()) && (!isVendorItem); i++)
+ {
+ if (itemID == npcItems[i])
+ isVendorItem = true;
+ }
+ for (unsigned int i = 0; (i < lootItems.size()) && (!isLootItem); i++)
+ {
+ if (itemID == lootItems[i])
+ isLootItem = true;
+ }
+ if ((!isLootItem) && (!isVendorItem))
+ continue;
+ }
+
+ switch (prototype->Quality)
+ {
+ case 1:
+ if (prototype->Class == ITEM_CLASS_TRADE_GOODS)
+ whiteTradeGoods.push_back(itemID);
+ else
+ whiteItems.push_back(itemID);
+ break;
+
+ case 2:
+ if (prototype->Class == ITEM_CLASS_TRADE_GOODS)
+ greenTradeGoods.push_back(itemID);
+ else
+ greenItems.push_back(itemID);
+ break;
+
+ case 3:
+ if (prototype->Class == ITEM_CLASS_TRADE_GOODS)
+ blueTradeGoods.push_back(itemID);
+ else
+ blueItems.push_back(itemID);
+ break;
+
+ case 4:
+ if (prototype->Class == ITEM_CLASS_TRADE_GOODS)
+ purpleTradeGoods.push_back(itemID);
+ else
+ purpleItems.push_back(itemID);
+ break;
+ }
+ }
+
+ if ((whiteTradeGoods.size() == 0) &&
+ (greenTradeGoods.size() == 0) &&
+ (blueTradeGoods.size() == 0) &&
+ (purpleTradeGoods.size() == 0) &&
+ (whiteItems.size() == 0) &&
+ (greenItems.size() == 0) &&
+ (blueItems.size() == 0) &&
+ (purpleItems.size() == 0))
+ {
+ sLog.outString("AuctionHouseBot: No items");
+ AHBSeller = 0;
+ }
+
+ sLog.outString("AuctionHouseBot:");
+ sLog.outString("loaded %d white trade goods", whiteTradeGoods.size());
+ sLog.outString("loaded %d green trade goods", greenTradeGoods.size());
+ sLog.outString("loaded %d blue trade goods", blueTradeGoods.size());
+ sLog.outString("loaded %d purple trade goods", purpleTradeGoods.size());
+ sLog.outString("loaded %d white items", whiteItems.size());
+ sLog.outString("loaded %d green items", greenItems.size());
+ sLog.outString("loaded %d blue items", blueItems.size());
+ sLog.outString("loaded %d purple items", purpleItems.size());
+ }
+ sLog.outString("AuctionHouseBot by Paradox (original by ChrisK) has been loaded.");
+ sLog.outString("AuctionHouseBot now includes AHBuyer by Kerbe and Paradox");
+
+}
+void AuctionHouseBotCommands(uint32 command, uint32 ahMapID, uint32 col, char* args)
+{
+ AHBConfig *config;
+ switch (ahMapID)
+ {
+ case 2:
+ config = &AllianceConfig;
+ break;
+ case 6:
+ config = &HordeConfig;
+ break;
+ case 7:
+ config = &NeutralConfig;
+ break;
+ }
+ std::string color;
+ switch (col)
+ {
+ case AHB_GREY:
+ color = "grey";
+ break;
+ case AHB_WHITE:
+ color = "white";
+ break;
+ case AHB_GREEN:
+ color = "green";
+ break;
+ case AHB_BLUE:
+ color = "blue";
+ break;
+ case AHB_PURPLE:
+ color = "purple";
+ break;
+ default:
+ break;
+ }
+ switch (command)
+ {
+ case 0: //ahexpire
+ {
+ AuctionHouseObject* auctionHouse = objmgr.GetAuctionsMap(ahMapID);
+
+ AuctionHouseObject::AuctionEntryMap::iterator itr;
+ itr = auctionHouse->GetAuctionsBegin();
+
+ while (itr != auctionHouse->GetAuctionsEnd())
+ {
+ if (itr->second->owner == AHBplayerGUID)
+ itr->second->time = sWorld.GetGameTime();
+
+ ++itr;
+ }
+ }break;
+ case 1: //min items
+ {
+ char * param1 = strtok(args, " ");
+ uint32 minItems = (uint32) strtoul(param1, NULL, 0);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET minitems = '%u' WHERE auctionhouse = '%u'", minItems, ahMapID);
+ config->SetMinItems(minItems);
+ }break;
+ case 2: //max items
+ {
+ char * param1 = strtok(args, " ");
+ uint32 maxItems = (uint32) strtoul(param1, NULL, 0);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET maxitems = '%u' WHERE auctionhouse = '%u'", maxItems, ahMapID);
+ config->SetMaxItems(maxItems);
+ }break;
+ case 3: //min time
+ {
+ char * param1 = strtok(args, " ");
+ uint32 minTime = (uint32) strtoul(param1, NULL, 0);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET mintime = '%u' WHERE auctionhouse = '%u'", minTime, ahMapID);
+ config->SetMinTime(minTime);
+ }break;
+ case 4: //max time
+ {
+ char * param1 = strtok(args, " ");
+ uint32 maxTime = (uint32) strtoul(param1, NULL, 0);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET maxtime = '%u' WHERE auctionhouse = '%u'", maxTime, ahMapID);
+ config->SetMaxTime(maxTime);
+ }break;
+ case 5: //percentages
+ {
+ char * param1 = strtok(args, " ");
+ char * param2 = strtok(NULL, " ");
+ char * param3 = strtok(NULL, " ");
+ char * param4 = strtok(NULL, " ");
+ char * param5 = strtok(NULL, " ");
+ char * param6 = strtok(NULL, " ");
+ char * param7 = strtok(NULL, " ");
+ char * param8 = strtok(NULL, " ");
+ uint32 wtg = (uint32) strtoul(param1, NULL, 0);
+ uint32 gtg = (uint32) strtoul(param2, NULL, 0);
+ uint32 btg = (uint32) strtoul(param3, NULL, 0);
+ uint32 ptg = (uint32) strtoul(param4, NULL, 0);
+ uint32 wi = (uint32) strtoul(param5, NULL, 0);
+ uint32 gi = (uint32) strtoul(param6, NULL, 0);
+ uint32 bi = (uint32) strtoul(param7, NULL, 0);
+ uint32 pi = (uint32) strtoul(param8, NULL, 0);
+
+ CharacterDatabase.BeginTransaction();
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET percentwhitetradegoods = '%u' WHERE auctionhouse = '%u'", wtg, ahMapID);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET percentgreentradegoods = '%u' WHERE auctionhouse = '%u'", gtg, ahMapID);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET percentbluetradegoods = '%u' WHERE auctionhouse = '%u'", btg, ahMapID);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET percentpurpletradegoods = '%u' WHERE auctionhouse = '%u'", ptg, ahMapID);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET percentwhiteitems = '%u' WHERE auctionhouse = '%u'", wi, ahMapID);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET percentgreenitems = '%u' WHERE auctionhouse = '%u'", gi, ahMapID);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET percentblueitems = '%u' WHERE auctionhouse = '%u'", bi, ahMapID);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET percentpurpleitems = '%u' WHERE auctionhouse = '%u'", pi, ahMapID);
+ CharacterDatabase.CommitTransaction();
+ config->SetPercentages(wtg, gtg, btg, ptg, wi, gi, bi, pi);
+ }break;
+ case 6: //min prices
+ {
+ char * param1 = strtok(args, " ");
+ uint32 minPrice = (uint32) strtoul(param1, NULL, 0);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET minprice%s = '%u' WHERE auctionhouse = '%u'",color.c_str(), minPrice, ahMapID);
+ config->SetMinPrice(col, minPrice);
+ }break;
+ case 7: //max prices
+ {
+ char * param1 = strtok(args, " ");
+ uint32 maxPrice = (uint32) strtoul(param1, NULL, 0);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET maxprice%s = '%u' WHERE auctionhouse = '%u'",color.c_str(), maxPrice, ahMapID);
+ config->SetMaxPrice(col, maxPrice);
+ }break;
+ case 8: //min bid price
+ {
+ char * param1 = strtok(args, " ");
+ uint32 minBidPrice = (uint32) strtoul(param1, NULL, 0);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET minbidprice%s = '%u' WHERE auctionhouse = '%u'",color.c_str(), minBidPrice, ahMapID);
+ config->SetMinBidPrice(col, minBidPrice);
+ }break;
+ case 9: //max bid price
+ {
+ char * param1 = strtok(args, " ");
+ uint32 maxBidPrice = (uint32) strtoul(param1, NULL, 0);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET maxbidprice%s = '%u' WHERE auctionhouse = '%u'",color.c_str(), maxBidPrice, ahMapID);
+ config->SetMaxBidPrice(col, maxBidPrice);
+ }break;
+ case 10: //max stacks
+ {
+ char * param1 = strtok(args, " ");
+ uint32 maxStack = (uint32) strtoul(param1, NULL, 0);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET maxstack%s = '%u' WHERE auctionhouse = '%u'",color.c_str(), maxStack, ahMapID);
+ config->SetMaxStack(col, maxStack);
+ }break;
+ case 11: //buyer bid prices
+ {
+ char * param1 = strtok(args, " ");
+ uint32 buyerPrice = (uint32) strtoul(param1, NULL, 0);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET buyerprice%s = '%u' WHERE auctionhouse = '%u'",color.c_str(), buyerPrice, ahMapID);
+ config->SetBuyerPrice(col, buyerPrice);
+ }break;
+ case 12: //buyer bidding interval
+ {
+ char * param1 = strtok(args, " ");
+ uint32 bidInterval = (uint32) strtoul(param1, NULL, 0);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET buyerbiddinginterval = '%u' WHERE auctionhouse = '%u'", bidInterval, ahMapID);
+ config->SetBiddingInterval(bidInterval);
+ }break;
+ case 13: //buyer bids per interval
+ {
+ char * param1 = strtok(args, " ");
+ uint32 bidsPerInterval = (uint32) strtoul(param1, NULL, 0);
+ CharacterDatabase.PExecute("UPDATE auctionhousebot SET buyerbidsperinterval = '%u' WHERE auctionhouse = '%u'", bidsPerInterval, ahMapID);
+ config->SetBidsPerInterval(bidsPerInterval);
+ }break;
+ default:
+ break;
+ }
+}
+void AuctionHouseBotLoadValues(AHBConfig *config)
+{
+ if (AHBSeller)
+ {
+ //load min and max items
+ config->SetMinItems(CharacterDatabase.PQuery("SELECT minitems FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ config->SetMaxItems(CharacterDatabase.PQuery("SELECT maxitems FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("minItems = %u", config->GetMinItems());
+ sLog.outError("maxItems = %u", config->GetMaxItems());}
+ //load min and max auction times
+ config->SetMinTime(CharacterDatabase.PQuery("SELECT mintime FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ config->SetMaxTime(CharacterDatabase.PQuery("SELECT maxtime FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("minTime = %u", config->GetMinTime());
+ sLog.outError("maxTime = %u", config->GetMaxTime());}
+ //load percentages
+ uint32 wtg = CharacterDatabase.PQuery("SELECT percentwhitetradegoods FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32();
+ uint32 gtg = CharacterDatabase.PQuery("SELECT percentgreentradegoods FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32();
+ uint32 btg = CharacterDatabase.PQuery("SELECT percentbluetradegoods FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32();
+ uint32 ptg = CharacterDatabase.PQuery("SELECT percentpurpletradegoods FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32();
+ uint32 wi = CharacterDatabase.PQuery("SELECT percentwhiteitems FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32();
+ uint32 gi = CharacterDatabase.PQuery("SELECT percentgreenitems FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32();
+ uint32 bi = CharacterDatabase.PQuery("SELECT percentblueitems FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32();
+ uint32 pi = CharacterDatabase.PQuery("SELECT percentpurpleitems FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32();
+ config->SetPercentages(wtg, gtg, btg, ptg, wi, gi, bi, pi);
+ if(debug_Out)
+ {sLog.outError("percentWhiteTradeGoods = %u", config->GetPercentages(AHB_WHITE_TG));
+ sLog.outError("percentGreenTradeGoods = %u", config->GetPercentages(AHB_GREEN_TG));
+ sLog.outError("percentBlueTradeGoods = %u", config->GetPercentages(AHB_BLUE_TG));
+ sLog.outError("percentPurpleTradeGoods = %u", config->GetPercentages(AHB_PURPLE_TG));
+ sLog.outError("percentWhiteItems = %u", config->GetPercentages(AHB_WHITE_I));
+ sLog.outError("percentGreenItems = %u", config->GetPercentages(AHB_GREEN_I));
+ sLog.outError("percentBlueItems = %u", config->GetPercentages(AHB_BLUE_I));
+ sLog.outError("percentPurpleItems = %u", config->GetPercentages(AHB_PURPLE_I));}
+ //load min and max prices
+ config->SetMinPrice(AHB_WHITE, CharacterDatabase.PQuery("SELECT minpricewhite FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ config->SetMaxPrice(AHB_WHITE, CharacterDatabase.PQuery("SELECT maxpricewhite FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("minPriceWhite = %u", config->GetMinPrice(AHB_WHITE));
+ sLog.outError("maxPriceWhite = %u", config->GetMaxPrice(AHB_WHITE));}
+ config->SetMinPrice(AHB_GREEN, CharacterDatabase.PQuery("SELECT minpricegreen FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ config->SetMaxPrice(AHB_GREEN, CharacterDatabase.PQuery("SELECT maxpricegreen FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("minPriceGreen = %u", config->GetMinPrice(AHB_GREEN));
+ sLog.outError("maxPriceGreen = %u", config->GetMaxPrice(AHB_GREEN));}
+ config->SetMinPrice(AHB_BLUE, CharacterDatabase.PQuery("SELECT minpriceblue FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ config->SetMaxPrice(AHB_BLUE, CharacterDatabase.PQuery("SELECT maxpriceblue FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("minPriceBlue = %u", config->GetMinPrice(AHB_BLUE));
+ sLog.outError("maxPriceBlue = %u", config->GetMaxPrice(AHB_BLUE));}
+ config->SetMinPrice(AHB_PURPLE, CharacterDatabase.PQuery("SELECT minpricepurple FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ config->SetMaxPrice(AHB_PURPLE, CharacterDatabase.PQuery("SELECT maxpricepurple FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("minPricePurple = %u", config->GetMinPrice(AHB_PURPLE));
+ sLog.outError("maxPricePurple = %u", config->GetMaxPrice(AHB_PURPLE));}
+ //load min and max bid prices
+ config->SetMinBidPrice(AHB_WHITE, CharacterDatabase.PQuery("SELECT minbidpricewhite FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError(",minBidPriceWhite = %u", config->GetMinBidPrice(AHB_WHITE));}
+ config->SetMaxBidPrice(AHB_WHITE, CharacterDatabase.PQuery("SELECT maxbidpricewhite FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("maxBidPriceWhite = %u", config->GetMaxBidPrice(AHB_WHITE));}
+ config->SetMinBidPrice(AHB_GREEN, CharacterDatabase.PQuery("SELECT minbidpricegreen FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("minBidPriceGreen = %u", config->GetMinBidPrice(AHB_GREEN));}
+ config->SetMaxBidPrice(AHB_GREEN, CharacterDatabase.PQuery("SELECT maxbidpricegreen FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("maxBidPriceGreen = %u", config->GetMaxBidPrice(AHB_GREEN));}
+ config->SetMinBidPrice(AHB_BLUE, CharacterDatabase.PQuery("SELECT minbidpriceblue FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("minBidPriceBlue = %u", config->GetMinBidPrice(AHB_BLUE));}
+ config->SetMaxBidPrice(AHB_BLUE, CharacterDatabase.PQuery("SELECT maxbidpriceblue FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("maxBidPriceBlue = %u", config->GetMinBidPrice(AHB_BLUE));}
+ config->SetMinBidPrice(AHB_PURPLE, CharacterDatabase.PQuery("SELECT minbidpricepurple FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("minBidPricePurple = %u", config->GetMinBidPrice(AHB_PURPLE));}
+ config->SetMaxBidPrice(AHB_PURPLE, CharacterDatabase.PQuery("SELECT maxbidpricepurple FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("maxBidPricePurple = %u", config->GetMaxBidPrice(AHB_PURPLE));}
+ //load max stacks
+ config->SetMaxStack(AHB_WHITE, CharacterDatabase.PQuery("SELECT maxstackwhite FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("maxStackWhite = %u", config->GetMaxStack(AHB_WHITE));}
+ config->SetMaxStack(AHB_GREEN, CharacterDatabase.PQuery("SELECT maxstackgreen FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("maxStackGreen = %u", config->GetMaxStack(AHB_GREEN));}
+ config->SetMaxStack(AHB_BLUE, CharacterDatabase.PQuery("SELECT maxstackblue FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("maxStackBlue = %u", config->GetMaxStack(AHB_BLUE));}
+ config->SetMaxStack(AHB_PURPLE, CharacterDatabase.PQuery("SELECT maxstackpurple FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("maxStackPurple = %u", config->GetMaxStack(AHB_PURPLE));}
+ }
+ if (AHBBuyer)
+ {
+ //load buyer bid prices
+ config->SetBuyerPrice(AHB_GREY, CharacterDatabase.PQuery("SELECT buyerpricegrey FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ config->SetBuyerPrice(AHB_WHITE, CharacterDatabase.PQuery("SELECT buyerpricewhite FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ config->SetBuyerPrice(AHB_GREEN, CharacterDatabase.PQuery("SELECT buyerpricegreen FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ config->SetBuyerPrice(AHB_BLUE, CharacterDatabase.PQuery("SELECT buyerpriceblue FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ config->SetBuyerPrice(AHB_PURPLE, CharacterDatabase.PQuery("SELECT buyerpricepurple FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("buyerPriceGrey = %u", config->GetBuyerPrice(AHB_GREY));
+ sLog.outError("buyerPriceWhite = %u", config->GetBuyerPrice(AHB_WHITE));
+ sLog.outError("buyerPriceGreen = %u", config->GetBuyerPrice(AHB_GREEN));
+ sLog.outError("buyerPriceBlue = %u", config->GetBuyerPrice(AHB_BLUE));
+ sLog.outError("buyerPricePurple = %u", config->GetBuyerPrice(AHB_PURPLE));}
+ //load bidding interval
+ config->SetBiddingInterval(CharacterDatabase.PQuery("SELECT buyerbiddinginterval FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("buyerBiddingInterval = %u", config->GetBiddingInterval());}
+ //load bids per interval
+ config->SetBidsPerInterval(CharacterDatabase.PQuery("SELECT buyerbidsperinterval FROM auctionhousebot WHERE auctionhouse = %u",config->GetAHID())->Fetch()->GetUInt32());
+ if(debug_Out)
+ {sLog.outError("buyerBidsPerInterval = %u", config->GetBidsPerInterval());}
+ }
+}
diff --git a/src/game/AuctionHouseBot.h b/src/game/AuctionHouseBot.h
new file mode 100644
index 00000000000..71b14d17a4a
--- /dev/null
+++ b/src/game/AuctionHouseBot.h
@@ -0,0 +1,687 @@
+#ifndef AUCTION_HOUSE_BOT_H
+#define AUCTION_HOUSE_BOT_H
+#include "Common.h"
+#include "Log.h"
+#include "Config/ConfigEnv.h"
+#define AHB_GREY 0
+#define AHB_WHITE 1
+#define AHB_GREEN 2
+#define AHB_BLUE 3
+#define AHB_PURPLE 4
+#define AHB_GREY_TG 0
+#define AHB_WHITE_TG 1
+#define AHB_GREEN_TG 2
+#define AHB_BLUE_TG 3
+#define AHB_PURPLE_TG 4
+#define AHB_GREY_I 5
+#define AHB_WHITE_I 6
+#define AHB_GREEN_I 7
+#define AHB_BLUE_I 8
+#define AHB_PURPLE_I 9
+#define AHBplayerAccount sConfig.GetIntDefault("AuctionHouseBot.Account", 0)
+#define AHBplayerGUID sConfig.GetIntDefault("AuctionHouseBot.GUID", 0)
+#define ItemsPerCycle sConfig.GetIntDefault("AuctionHouseBot.ItemsPerCycle", 200)
+#define SellMethod sConfig.GetIntDefault("AuctionHouseBot.UseBuyPriceForSeller", 1)
+#define BuyMethod sConfig.GetIntDefault("AuctionHouseBot.UseBuyPriceForBuyer", 0)
+
+class AHBConfig
+{
+ private:
+ uint32 AHID;
+ uint32 minItems;
+ uint32 maxItems;
+ uint32 minTime;
+ uint32 maxTime;
+ uint32 percentWhiteTradeGoods;
+ uint32 percentGreenTradeGoods;
+ uint32 percentBlueTradeGoods;
+ uint32 percentPurpleTradeGoods;
+ uint32 percentWhiteItems;
+ uint32 percentGreenItems;
+ uint32 percentBlueItems;
+ uint32 percentPurpleItems;
+ uint32 minPriceWhite;
+ uint32 maxPriceWhite;
+ uint32 minBidPriceWhite;
+ uint32 maxBidPriceWhite;
+ uint32 maxStackWhite;
+ uint32 minPriceGreen;
+ uint32 maxPriceGreen;
+ uint32 minBidPriceGreen;
+ uint32 maxBidPriceGreen;
+ uint32 maxStackGreen;
+ uint32 minPriceBlue;
+ uint32 maxPriceBlue;
+ uint32 minBidPriceBlue;
+ uint32 maxBidPriceBlue;
+ uint32 maxStackBlue;
+ uint32 minPricePurple;
+ uint32 maxPricePurple;
+ uint32 minBidPricePurple;
+ uint32 maxBidPricePurple;
+ uint32 maxStackPurple;
+
+ uint32 buyerPriceGrey;
+ uint32 buyerPriceWhite;
+ uint32 buyerPriceGreen;
+ uint32 buyerPriceBlue;
+ uint32 buyerPricePurple;
+ uint32 buyerBiddingInterval;
+ uint32 buyerBidsPerInterval;
+
+ uint32 wtgp;
+ uint32 gtgp;
+ uint32 btgp;
+ uint32 ptgp;
+ uint32 wip;
+ uint32 gip;
+ uint32 bip;
+ uint32 pip;
+ public:
+ AHBConfig(uint32 ahid)
+ {
+ AHID = ahid;
+ }
+ AHBConfig()
+ {
+ }
+ uint32 GetAHID()
+ {
+ return AHID;
+ }
+ void SetMinItems(uint32 value)
+ {
+ minItems = value;
+ }
+ uint32 GetMinItems()
+ {
+ if ((minItems == 0) && (maxItems))
+ return maxItems;
+ else if ((maxItems) && (minItems > maxItems))
+ return maxItems;
+ else
+ return minItems;
+ }
+ void SetMaxItems(uint32 value)
+ {
+ maxItems = value;
+ CalculatePercents();
+ }
+ uint32 GetMaxItems()
+ {
+ return maxItems;
+ }
+ void SetMinTime(uint32 value)
+ {
+ minTime = value;
+ }
+ uint32 GetMinTime()
+ {
+ if (minTime < 1)
+ return 1;
+ else if ((maxTime) && (minTime > maxTime))
+ return maxTime;
+ else
+ return minTime;
+ }
+ void SetMaxTime(uint32 value)
+ {
+ maxTime = value;
+ }
+ uint32 GetMaxTime()
+ {
+ return maxTime;
+ }
+ void SetPercentages(uint32 wtg, uint32 gtg, uint32 btg, uint32 ptg, uint32 wi, uint32 gi, uint32 bi, uint32 pi)
+ {
+ uint32 totalPercent = wtg + gtg + btg + ptg + wi + gi + bi + pi;
+
+ if (totalPercent == 0)
+ {
+ maxItems = 0;
+ }
+ else if (totalPercent != 100)
+ {
+ double scale = (double) 100 / (double) totalPercent;
+
+ wtg = (uint32) (scale * (double) pi);
+ gtg = (uint32) (scale * (double) gtg);
+ btg = (uint32) (scale * (double) btg);
+ ptg = (uint32) (scale * (double) ptg);
+ wi = (uint32) (scale * (double) wi);
+ gi = (uint32) (scale * (double) gi);
+ bi = (uint32) (scale * (double) bi);
+ pi = 100 - wtg - gtg - btg - ptg - wi - gi - bi;
+
+ }
+ percentWhiteTradeGoods = wtg;
+ percentGreenTradeGoods = gtg;
+ percentBlueTradeGoods = btg;
+ percentPurpleTradeGoods = ptg;
+ percentWhiteItems = wi;
+ percentGreenItems = gi;
+ percentBlueItems = bi;
+ percentPurpleItems = pi;
+ CalculatePercents();
+ }
+ uint32 GetPercentages(uint32 color)
+ {
+ switch(color)
+ {
+ case AHB_GREY_TG:
+ return 0;
+ break;
+ case AHB_WHITE_TG:
+ return percentWhiteTradeGoods;
+ break;
+ case AHB_GREEN_TG:
+ return percentGreenTradeGoods;
+ break;
+ case AHB_BLUE_TG:
+ return percentBlueTradeGoods;
+ break;
+ case AHB_PURPLE_TG:
+ return percentPurpleTradeGoods;
+ break;
+ case AHB_GREY_I:
+ return 0;
+ break;
+ case AHB_WHITE_I:
+ return percentWhiteItems;
+ break;
+ case AHB_GREEN_I:
+ return percentGreenItems;
+ break;
+ case AHB_BLUE_I:
+ return percentBlueItems;
+ break;
+ case AHB_PURPLE_I:
+ return percentPurpleItems;
+ break;
+ default:
+ return 0;
+ break;
+ }
+ }
+ void SetMinPrice(uint32 color, uint32 value)
+ {
+ switch(color)
+ {
+ case AHB_GREY:
+ break;
+ case AHB_WHITE:
+ minPriceWhite = value;
+ break;
+ case AHB_GREEN:
+ minPriceGreen = value;
+ break;
+ case AHB_BLUE:
+ minPriceBlue = value;
+ break;
+ case AHB_PURPLE:
+ minPricePurple = value;
+ break;
+ default:
+ break;
+ }
+ }
+ uint32 GetMinPrice(uint32 color)
+ {
+ switch(color)
+ {
+ case AHB_GREY:
+ {
+ return 0;
+ break;
+ }
+ case AHB_WHITE:
+ {
+ if (minPriceWhite == 0)
+ return 150;
+ else if (minPriceWhite > maxPriceWhite)
+ return maxPriceWhite;
+ else
+ return minPriceWhite;
+ break;
+ }
+ case AHB_GREEN:
+ {
+ if (minPriceGreen == 0)
+ return 200;
+ else if (minPriceGreen > maxPriceGreen)
+ return maxPriceGreen;
+ else
+ return minPriceGreen;
+ break;
+ }
+ case AHB_BLUE:
+ {
+ if (minPriceBlue == 0)
+ return 250;
+ else if (minPriceBlue > maxPriceBlue)
+ return maxPriceBlue;
+ else
+ return minPriceBlue;
+ break;
+ }
+ case AHB_PURPLE:
+ {
+ if (minPricePurple == 0)
+ return 300;
+ else if (minPricePurple > maxPricePurple)
+ return maxPricePurple;
+ else
+ return minPricePurple;
+ break;
+ }
+ default:
+ {
+ return 0;
+ break;
+ }
+ }
+ }
+ void SetMaxPrice(uint32 color, uint32 value)
+ {
+ switch(color)
+ {
+ case AHB_GREY:
+ break;
+ case AHB_WHITE:
+ maxPriceWhite = value;
+ break;
+ case AHB_GREEN:
+ maxPriceGreen = value;
+ break;
+ case AHB_BLUE:
+ maxPriceBlue = value;
+ break;
+ case AHB_PURPLE:
+ maxPricePurple = value;
+ break;
+ default:
+ break;
+ }
+ }
+ uint32 GetMaxPrice(uint32 color)
+ {
+ switch(color)
+ {
+ case AHB_GREY:
+ {
+ return 0;
+ break;
+ }
+ case AHB_WHITE:
+ {
+ if (maxPriceWhite == 0)
+ return 250;
+ else
+ return maxPriceWhite;
+ break;
+ }
+ case AHB_GREEN:
+ {
+ if (maxPriceGreen == 0)
+ return 300;
+ else
+ return maxPriceGreen;
+ break;
+ }
+ case AHB_BLUE:
+ {
+ if (maxPriceBlue == 0)
+ return 350;
+ else
+ return maxPriceBlue;
+ break;
+ }
+ case AHB_PURPLE:
+ {
+ if (maxPricePurple == 0)
+ return 450;
+ else
+ return maxPricePurple;
+ break;
+ }
+ default:
+ {
+ return 0;
+ break;
+ }
+ }
+ }
+ void SetMinBidPrice(uint32 color, uint32 value)
+ {
+ switch(color)
+ {
+ case AHB_GREY:
+ break;
+ case AHB_WHITE:
+ minBidPriceWhite = value;
+ break;
+ case AHB_GREEN:
+ minBidPriceGreen = value;
+ break;
+ case AHB_BLUE:
+ minBidPriceBlue = value;
+ break;
+ case AHB_PURPLE:
+ minBidPricePurple = value;
+ break;
+ default:
+ break;
+ }
+ }
+ uint32 GetMinBidPrice(uint32 color)
+ {
+ switch(color)
+ {
+ case AHB_GREY:
+ {
+ return 0;
+ break;
+ }
+ case AHB_WHITE:
+ {
+ if (minBidPriceWhite > 100)
+ return 100;
+ else
+ return minBidPriceWhite;
+ break;
+ }
+ case AHB_GREEN:
+ {
+ if (minBidPriceGreen > 100)
+ return 100;
+ else
+ return minBidPriceGreen;
+ break;
+ }
+ case AHB_BLUE:
+ {
+ if (minBidPriceBlue > 100)
+ return 100;
+ else
+ return minBidPriceBlue;
+ break;
+ }
+ case AHB_PURPLE:
+ {
+ if (minBidPricePurple > 100)
+ return 100;
+ else
+ return minBidPricePurple;
+ break;
+ }
+ default:
+ {
+ return 0;
+ break;
+ }
+ }
+ }
+ void SetMaxBidPrice(uint32 color, uint32 value)
+ {
+ switch(color)
+ {
+ case AHB_GREY:
+ break;
+ case AHB_WHITE:
+ maxBidPriceWhite = value;
+ break;
+ case AHB_GREEN:
+ maxBidPriceGreen = value;
+ break;
+ case AHB_BLUE:
+ maxBidPriceBlue = value;
+ break;
+ case AHB_PURPLE:
+ maxBidPricePurple = value;
+ break;
+ default:
+ break;
+ }
+ }
+ uint32 GetMaxBidPrice(uint32 color)
+ {
+ switch(color)
+ {
+ case AHB_GREY:
+ {
+ return 0;
+ break;
+ }
+ case AHB_WHITE:
+ {
+ if (maxBidPriceWhite > 100)
+ return 100;
+ else
+ return maxBidPriceWhite;
+ break;
+ }
+ case AHB_GREEN:
+ {
+ if (maxBidPriceGreen > 100)
+ return 100;
+ else
+ return maxBidPriceGreen;
+ break;
+ }
+ case AHB_BLUE:
+ {
+ if (maxBidPriceBlue > 100)
+ return 100;
+ else
+ return maxBidPriceBlue;
+ break;
+ }
+ case AHB_PURPLE:
+ {
+ if (maxBidPricePurple > 100)
+ return 100;
+ else
+ return maxBidPricePurple;
+ break;
+ }
+ default:
+ {
+ return 0;
+ break;
+ }
+ }
+ }
+ void SetMaxStack(uint32 color, uint32 value)
+ {
+ switch(color)
+ {
+ case AHB_GREY:
+ break;
+ case AHB_WHITE:
+ maxStackWhite = value;
+ break;
+ case AHB_GREEN:
+ maxStackGreen = value;
+ break;
+ case AHB_BLUE:
+ maxStackBlue = value;
+ break;
+ case AHB_PURPLE:
+ maxStackPurple = value;
+ break;
+ default:
+ break;
+ }
+ }
+ uint32 GetMaxStack(uint32 color)
+ {
+ switch(color)
+ {
+ case AHB_GREY:
+ {
+ return 0;
+ break;
+ }
+ case AHB_WHITE:
+ {
+ return maxStackWhite;
+ break;
+ }
+ case AHB_GREEN:
+ {
+ return maxStackGreen;
+ break;
+ }
+ case AHB_BLUE:
+ {
+ return maxStackBlue;
+ break;
+ }
+ case AHB_PURPLE:
+ {
+ return maxStackPurple;
+ break;
+ }
+ default:
+ {
+ return 0;
+ break;
+ }
+ }
+ }
+ void SetBuyerPrice(uint32 color, uint32 value)
+ {
+ switch(color)
+ {
+ case AHB_GREY:
+ buyerPriceGrey = value;
+ break;
+ case AHB_WHITE:
+ buyerPriceWhite = value;
+ break;
+ case AHB_GREEN:
+ buyerPriceGreen = value;
+ break;
+ case AHB_BLUE:
+ buyerPriceBlue = value;
+ break;
+ case AHB_PURPLE:
+ buyerPricePurple = value;
+ break;
+ default:
+ break;
+ }
+ }
+ uint32 GetBuyerPrice(uint32 color)
+ {
+ switch(color)
+ {
+ case AHB_GREY:
+ return buyerPriceGrey;
+ break;
+ case AHB_WHITE:
+ return buyerPriceWhite;
+ break;
+ case AHB_GREEN:
+ return buyerPriceGreen;
+ break;
+ case AHB_BLUE:
+ return buyerPriceBlue;
+ break;
+ case AHB_PURPLE:
+ return buyerPricePurple;
+ break;
+ default:
+ return 0;
+ break;
+ }
+ }
+ void SetBiddingInterval(uint32 value)
+ {
+ buyerBiddingInterval = value;
+ }
+ uint32 GetBiddingInterval()
+ {
+ return buyerBiddingInterval;
+ }
+ void CalculatePercents()
+ {
+ wtgp = (uint32) (((double)percentWhiteTradeGoods / 100.0) * maxItems);
+ gtgp = (uint32) (((double)percentGreenTradeGoods / 100.0) * maxItems);
+ btgp = (uint32) (((double)percentBlueTradeGoods / 100.0) * maxItems);
+ ptgp = (uint32) (((double)percentPurpleTradeGoods / 100.0) * maxItems);
+ wip = (uint32) (((double)percentWhiteItems / 100.0) * maxItems);
+ gip = (uint32) (((double)percentGreenItems / 100.0) * maxItems);
+ bip = (uint32) (((double)percentBlueItems / 100.0) * maxItems);
+ pip = (uint32) (((double)percentPurpleItems / 100.0) * maxItems);
+ uint32 total = wtgp + gtgp + btgp + ptgp + wip + gip + bip + pip;
+ if (total != maxItems)
+ {
+ wtgp = (uint32) (maxItems * (double) wtgp);
+ gtgp = (uint32) (maxItems * (double) gtgp);
+ btgp = (uint32) (maxItems * (double) btgp);
+ ptgp = (uint32) (maxItems * (double) ptgp);
+ wip = (uint32) (maxItems * (double) wip);
+ gip = (uint32) (maxItems * (double) gip);
+ bip = (uint32) (maxItems * (double) bip);
+ pip = (maxItems - (wtgp + gtgp + btgp + ptgp + wip + gip + bip));
+ total = wtgp + gtgp + btgp + ptgp + wip + gip + bip + pip;
+ }
+ //sLog.outString("%u %u %u %u %u %u %u %u", wtgp, gtgp, btgp, ptgp, wip, gip, bip, pip);
+ }
+ uint32 GetPercents(uint32 color)
+ {
+ switch(color)
+ {
+ case AHB_GREY_TG:
+ return 0;
+ break;
+ case AHB_WHITE_TG:
+ return wtgp;
+ break;
+ case AHB_GREEN_TG:
+ return gtgp;
+ break;
+ case AHB_BLUE_TG:
+ return btgp;
+ break;
+ case AHB_PURPLE_TG:
+ return ptgp;
+ break;
+ case AHB_GREY_I:
+ return 0;
+ break;
+ case AHB_WHITE_I:
+ return wip;
+ break;
+ case AHB_GREEN_I:
+ return gip;
+ break;
+ case AHB_BLUE_I:
+ return bip;
+ break;
+ case AHB_PURPLE_I:
+ return pip;
+ break;
+ default:
+ return 0;
+ break;
+ }
+ }
+ void SetBidsPerInterval(uint32 value)
+ {
+ buyerBidsPerInterval = value;
+ }
+ uint32 GetBidsPerInterval()
+ {
+ return buyerBidsPerInterval;
+ }
+ ~AHBConfig()
+ {
+ }
+};
+void AuctionHouseBot();
+void AuctionHouseBotInit();
+void AuctionHouseBotLoadValues(AHBConfig*);
+void AuctionHouseBotCommands(uint32, uint32, uint32, char*);
+#endif
diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt
index db1e31f2414..8cee1325205 100644
--- a/src/game/CMakeLists.txt
+++ b/src/game/CMakeLists.txt
@@ -13,6 +13,8 @@ SET(game_STAT_SRCS
ArenaTeam.h
ArenaTeamHandler.cpp
AuctionHouse.cpp
+ AuctionHouseBot.cpp
+ AuctionHouseBot.h
AuctionHouseObject.h
Bag.cpp
Bag.h
diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp
index 858c236a6fb..974a718b15e 100644
--- a/src/game/Chat.cpp
+++ b/src/game/Chat.cpp
@@ -622,6 +622,7 @@ ChatCommand * ChatHandler::getCommandTable()
{ "cometome", SEC_ADMINISTRATOR, false, &ChatHandler::HandleComeToMeCommand, "", NULL },
{ "damage", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDamageCommand, "", NULL },
{ "combatstop", SEC_GAMEMASTER, false, &ChatHandler::HandleCombatStopCommand, "", NULL },
+ { "ahbotoptions", SEC_ADMINISTRATOR, true, &ChatHandler::HandleAHBotOptionsCommand, "", NULL },
{ "flusharenapoints", SEC_ADMINISTRATOR, false, &ChatHandler::HandleFlushArenaPointsCommand, "", NULL },
{ "chardelete", SEC_CONSOLE, true, &ChatHandler::HandleCharacterDeleteCommand, "", NULL },
{ "sendmessage", SEC_ADMINISTRATOR, true, &ChatHandler::HandleSendMessageCommand, "", NULL },
diff --git a/src/game/Chat.h b/src/game/Chat.h
index 36c196b1b14..73b561b164d 100644
--- a/src/game/Chat.h
+++ b/src/game/Chat.h
@@ -102,6 +102,7 @@ class ChatHandler
bool HandleAccountSetPasswordCommand(const char* args);
bool HandleHelpCommand(const char* args);
+ bool HandleAHBotOptionsCommand(const char * args);
bool HandleCommandsCommand(const char* args);
bool HandleStartCommand(const char* args);
bool HandleDismountCommand(const char* args);
diff --git a/src/game/Creature.h b/src/game/Creature.h
index 8e4db98258e..6ba3c9178e3 100644
--- a/src/game/Creature.h
+++ b/src/game/Creature.h
@@ -635,6 +635,7 @@ class TRINITY_DLL_SPEC Creature : public Unit
bool IsFormationLeader() {return (GetDBTableGUIDLow() && GetDBTableGUIDLow() == m_formationID);}
uint32 GetFormationID(){return m_formationID;}
+ Unit *SelectHostilTarget();
protected:
bool CreateFromProto(uint32 guidlow,uint32 Entry,uint32 team, const CreatureData *data = NULL);
bool InitEntry(uint32 entry, uint32 team=ALLIANCE, const CreatureData* data=NULL);
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp
index 12f251ec025..5016d0bcd56 100644
--- a/src/game/Level3.cpp
+++ b/src/game/Level3.cpp
@@ -52,6 +52,379 @@
#include "BattleGroundMgr.h"
#include "InstanceSaveMgr.h"
#include "InstanceData.h"
+#include "AuctionHouseBot.h"
+
+bool ChatHandler::HandleAHBotOptionsCommand(const char* args)
+{
+ uint32 ahMapID = 0;
+ char * opt = strtok((char*)args, " ");
+ char * ahMapIdStr = strtok(NULL, " ");
+ if (ahMapIdStr)
+ {
+ ahMapID = (uint32) strtoul(ahMapIdStr, NULL, 0);
+ }
+ if (!opt)
+ {
+ PSendSysMessage("Syntax is: ahbotoptions $option $ahMapID (2, 6 or 7) $parameter");
+ PSendSysMessage("Try ahbotoptions help to see a list of options.");
+ return false;
+ }
+ int l = strlen(opt);
+
+ if (strncmp(opt,"help",l) == 0)
+ {
+ PSendSysMessage("AHBot commands:");
+ PSendSysMessage("ahexpire");
+ PSendSysMessage("minitems");
+ PSendSysMessage("maxitems");
+ PSendSysMessage("mintime");
+ PSendSysMessage("maxtime");
+ PSendSysMessage("percentages");
+ PSendSysMessage("minprice");
+ PSendSysMessage("maxprice");
+ PSendSysMessage("minbidprice");
+ PSendSysMessage("maxbidprice");
+ PSendSysMessage("maxstack");
+ PSendSysMessage("buyerprice");
+ PSendSysMessage("bidinterval");
+ PSendSysMessage("bidsperinterval");
+ return true;
+ }
+ else if (strncmp(opt,"ahexpire",l) == 0)
+ {
+ if (!ahMapIdStr)
+ {
+ PSendSysMessage("Syntax is: ahbotoptions ahexpire $ahMapID (2, 6 or 7)");
+ return false;
+ }
+ AuctionHouseBotCommands(0, ahMapID, NULL, NULL);
+ }
+ else if (strncmp(opt,"minitems",l) == 0)
+ {
+ char * param1 = strtok(NULL, " ");
+ if ((!ahMapIdStr) || (!param1))
+ {
+ PSendSysMessage("Syntax is: ahbotoptions minitems $ahMapID (2, 6 or 7) $minItems");
+ return false;
+ }
+ AuctionHouseBotCommands(1, ahMapID, NULL, param1);
+ }
+ else if (strncmp(opt,"maxitems",l) == 0)
+ {
+ char * param1 = strtok(NULL, " ");
+ if ((!ahMapIdStr) || (!param1))
+ {
+ PSendSysMessage("Syntax is: ahbotoptions maxitems $ahMapID (2, 6 or 7) $maxItems");
+ return false;
+ }
+ AuctionHouseBotCommands(2, ahMapID, NULL, param1);
+ }
+ else if (strncmp(opt,"mintime",l) == 0)
+ {
+ char * param1 = strtok(NULL, " ");
+ if ((!ahMapIdStr) || (!param1))
+ {
+ PSendSysMessage("Syntax is: ahbotoptions mintime $ahMapID (2, 6 or 7) $mintime");
+ return false;
+ }
+ AuctionHouseBotCommands(3, ahMapID, NULL, param1);
+ }
+ else if (strncmp(opt,"maxtime",l) == 0)
+ {
+ char * param1 = strtok(NULL, " ");
+ if ((!ahMapIdStr) || (!param1))
+ {
+ PSendSysMessage("Syntax is: ahbotoptions maxtime $ahMapID (2, 6 or 7) $maxtime");
+ return false;
+ }
+ AuctionHouseBotCommands(4, ahMapID, NULL, param1);
+ }
+ else if (strncmp(opt,"percentages",l) == 0)
+ {
+ char * param1 = strtok(NULL, " ");
+ char * param2 = strtok(NULL, " ");
+ char * param3 = strtok(NULL, " ");
+ char * param4 = strtok(NULL, " ");
+ char * param5 = strtok(NULL, " ");
+ char * param6 = strtok(NULL, " ");
+ char * param7 = strtok(NULL, " ");
+ char * param8 = strtok(NULL, " ");
+ if ((!ahMapIdStr) || (!param1) || (!param2) || (!param3) || (!param4) || (!param5) || (!param6) || (!param7) || (!param8))
+ {
+ PSendSysMessage("Syntax is: ahbotoptions percentages $ahMapID (2, 6 or 7) $1 $2 $3 $4 $5 $6 $7 $8");
+ PSendSysMessage("1 WhiteTradeGoods 2 GreenTradeGoods 3 BlueTradeGoods 4 PurpleTradeGoods");
+ PSendSysMessage("5 WhiteItems 6 GreenItems 7 BlueItems 8 PurpleItems");
+ PSendSysMessage("The total must add up to 100%");
+ return false;
+ }
+ uint32 wtg = (uint32) strtoul(param1, NULL, 0);
+ uint32 gtg = (uint32) strtoul(param2, NULL, 0);
+ uint32 btg = (uint32) strtoul(param3, NULL, 0);
+ uint32 ptg = (uint32) strtoul(param4, NULL, 0);
+ uint32 wi = (uint32) strtoul(param5, NULL, 0);
+ uint32 gi = (uint32) strtoul(param6, NULL, 0);
+ uint32 bi = (uint32) strtoul(param7, NULL, 0);
+ uint32 pi = (uint32) strtoul(param8, NULL, 0);
+ uint32 totalPercent = wtg + gtg + btg + ptg + wi + gi + bi + pi;
+ if ((totalPercent == 0) || (totalPercent != 100))
+ {
+ PSendSysMessage("Syntax is: ahbotoptions percentages $ahMapID (2, 6 or 7) $1 $2 $3 $4 $5 $6 $7 $8");
+ PSendSysMessage("1 WhiteTradeGoods 2 GreenTradeGoods 3 BlueTradeGoods 4 PurpleTradeGoods");
+ PSendSysMessage("5 WhiteItems 6 GreenItems 7 BlueItems 8 PurpleItems");
+ PSendSysMessage("The total must add up to 100%");
+ return false;
+ }
+ char param[100];
+ param[0] = '\0';
+ strcat(param, param1);
+ strcat(param, " ");
+ strcat(param, param2);
+ strcat(param, " ");
+ strcat(param, param3);
+ strcat(param, " ");
+ strcat(param, param4);
+ strcat(param, " ");
+ strcat(param, param5);
+ strcat(param, " ");
+ strcat(param, param6);
+ strcat(param, " ");
+ strcat(param, param7);
+ strcat(param, " ");
+ strcat(param, param8);
+ AuctionHouseBotCommands(5, ahMapID, NULL, param);
+ }
+ else if (strncmp(opt,"minprice",l) == 0)
+ {
+ char * param1 = strtok(NULL, " ");
+ char * param2 = strtok(NULL, " ");
+ if ((!ahMapIdStr) || (!param1) || (!param2))
+ {
+ PSendSysMessage("Syntax is: ahbotoptions minprice $ahMapID (2, 6 or 7) $color (white, green, blue or purple) $price");
+ return false;
+ }
+ if (strncmp(param1,"white",l) == 0)
+ {
+ AuctionHouseBotCommands(6, ahMapID, AHB_WHITE, param2);
+ }
+ else if (strncmp(param1,"green",l) == 0)
+ {
+ AuctionHouseBotCommands(6, ahMapID, AHB_GREEN, param2);
+ }
+ else if (strncmp(param1,"blue",l) == 0)
+ {
+ AuctionHouseBotCommands(6, ahMapID, AHB_BLUE, param2);
+ }
+ else if (strncmp(param1,"purple",l) == 0)
+ {
+ AuctionHouseBotCommands(6, ahMapID, AHB_PURPLE, param2);
+ }
+ else
+ {
+ PSendSysMessage("Syntax is: ahbotoptions minprice $ahMapID (2, 6 or 7) $color (white, green, blue or purple) $price");
+ return false;
+ }
+ }
+ else if (strncmp(opt,"maxprice",l) == 0)
+ {
+ char * param1 = strtok(NULL, " ");
+ char * param2 = strtok(NULL, " ");
+ if ((!ahMapIdStr) || (!param1) || (!param2))
+ {
+ PSendSysMessage("Syntax is: ahbotoptions maxprice $ahMapID (2, 6 or 7) $color (white, green, blue or purple) $price");
+ return false;
+ }
+ if (strncmp(param1,"white",l) == 0)
+ {
+ AuctionHouseBotCommands(7, ahMapID, AHB_WHITE, param2);
+ }
+ else if (strncmp(param1,"green",l) == 0)
+ {
+ AuctionHouseBotCommands(7, ahMapID, AHB_GREEN, param2);
+ }
+ else if (strncmp(param1,"blue",l) == 0)
+ {
+ AuctionHouseBotCommands(7, ahMapID, AHB_BLUE, param2);
+ }
+ else if (strncmp(param1,"purple",l) == 0)
+ {
+ AuctionHouseBotCommands(7, ahMapID, AHB_PURPLE, param2);
+ }
+ else
+ {
+ PSendSysMessage("Syntax is: ahbotoptions maxprice $ahMapID (2, 6 or 7) $color (white, green, blue or purple) $price");
+ return false;
+ }
+ }
+ else if (strncmp(opt,"minbidprice",l) == 0)
+ {
+ char * param1 = strtok(NULL, " ");
+ char * param2 = strtok(NULL, " ");
+ if ((!ahMapIdStr) || (!param1) || (!param2))
+ {
+ PSendSysMessage("Syntax is: ahbotoptions minbidprice $ahMapID (2, 6 or 7) $color (white, green, blue or purple) $price");
+ return false;
+ }
+ uint32 minBidPrice = (uint32) strtoul(param2, NULL, 0);
+ if ((minBidPrice < 1) || (minBidPrice > 100))
+ {
+ PSendSysMessage("The min bid price multiplier must be between 1 and 100");
+ return false;
+ }
+ if (strncmp(param1,"white",l) == 0)
+ {
+ AuctionHouseBotCommands(8, ahMapID, AHB_WHITE, param2);
+ }
+ else if (strncmp(param1,"green",l) == 0)
+ {
+ AuctionHouseBotCommands(8, ahMapID, AHB_GREEN, param2);
+ }
+ else if (strncmp(param1,"blue",l) == 0)
+ {
+ AuctionHouseBotCommands(8, ahMapID, AHB_BLUE, param2);
+ }
+ else if (strncmp(param1,"purple",l) == 0)
+ {
+ AuctionHouseBotCommands(8, ahMapID, AHB_PURPLE, param2);
+ }
+ else
+ {
+ PSendSysMessage("Syntax is: ahbotoptions minbidprice $ahMapID (2, 6 or 7) $color (white, green, blue or purple) $price");
+ return false;
+ }
+ }
+ else if (strncmp(opt,"maxbidprice",l) == 0)
+ {
+ char * param1 = strtok(NULL, " ");
+ char * param2 = strtok(NULL, " ");
+ if ((!ahMapIdStr) || (!param1) || (!param2))
+ {
+ PSendSysMessage("Syntax is: ahbotoptions maxbidprice $ahMapID (2, 6 or 7) $color (white, green, blue or purple) $price");
+ return false;
+ }
+ uint32 maxBidPrice = (uint32) strtoul(param2, NULL, 0);
+ if ((maxBidPrice < 1) || (maxBidPrice > 100))
+ {
+ PSendSysMessage("The max bid price multiplier must be between 1 and 100");
+ return false;
+ }
+ if (strncmp(param1,"white",l) == 0)
+ {
+ AuctionHouseBotCommands(9, ahMapID, AHB_WHITE, param2);
+ }
+ else if (strncmp(param1,"green",l) == 0)
+ {
+ AuctionHouseBotCommands(9, ahMapID, AHB_GREEN, param2);
+ }
+ else if (strncmp(param1,"blue",l) == 0)
+ {
+ AuctionHouseBotCommands(9, ahMapID, AHB_BLUE, param2);
+ }
+ else if (strncmp(param1,"purple",l) == 0)
+ {
+ AuctionHouseBotCommands(9, ahMapID, AHB_PURPLE, param2);
+ }
+ else
+ {
+ PSendSysMessage("Syntax is: ahbotoptions max bidprice $ahMapID (2, 6 or 7) $color (white, green, blue or purple) $price");
+ return false;
+ }
+ }
+ else if (strncmp(opt,"maxstack",l) == 0)
+ {
+ char * param1 = strtok(NULL, " ");
+ char * param2 = strtok(NULL, " ");
+ if ((!ahMapIdStr) || (!param1) || (!param2))
+ {
+ PSendSysMessage("Syntax is: ahbotoptions maxstack $ahMapID (2, 6 or 7) $color (white, green, blue or purple) $value");
+ return false;
+ }
+ uint32 maxStack = (uint32) strtoul(param2, NULL, 0);
+ if (maxStack < 0)
+ {
+ PSendSysMessage("maxstack can't be a negative number.");
+ return false;
+ }
+ if (strncmp(param1,"white",l) == 0)
+ {
+ AuctionHouseBotCommands(10, ahMapID, AHB_WHITE, param2);
+ }
+ else if (strncmp(param1,"green",l) == 0)
+ {
+ AuctionHouseBotCommands(10, ahMapID, AHB_GREEN, param2);
+ }
+ else if (strncmp(param1,"blue",l) == 0)
+ {
+ AuctionHouseBotCommands(10, ahMapID, AHB_BLUE, param2);
+ }
+ else if (strncmp(param1,"purple",l) == 0)
+ {
+ AuctionHouseBotCommands(10, ahMapID, AHB_PURPLE, param2);
+ }
+ else
+ {
+ PSendSysMessage("Syntax is: ahbotoptions maxstack $ahMapID (2, 6 or 7) $color (white, green, blue or purple) $value");
+ return false;
+ }
+ }
+ else if (strncmp(opt,"buyerprice",l) == 0)
+ {
+ char * param1 = strtok(NULL, " ");
+ char * param2 = strtok(NULL, " ");
+ if ((!ahMapIdStr) || (!param1) || (!param2))
+ {
+ PSendSysMessage("Syntax is: ahbotoptions buyerprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue or purple) $price");
+ return false;
+ }
+ if (strncmp(param1,"white",l) == 0)
+ {
+ AuctionHouseBotCommands(11, ahMapID, AHB_WHITE, param2);
+ }
+ else if (strncmp(param1,"green",l) == 0)
+ {
+ AuctionHouseBotCommands(11, ahMapID, AHB_GREEN, param2);
+ }
+ else if (strncmp(param1,"blue",l) == 0)
+ {
+ AuctionHouseBotCommands(11, ahMapID, AHB_BLUE, param2);
+ }
+ else if (strncmp(param1,"purple",l) == 0)
+ {
+ AuctionHouseBotCommands(11, ahMapID, AHB_PURPLE, param2);
+ }
+ else
+ {
+ PSendSysMessage("Syntax is: ahbotoptions buyerprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue or purple) $price");
+ return false;
+ }
+ }
+ else if (strncmp(opt,"bidinterval",l) == 0)
+ {
+ char * param1 = strtok(NULL, " ");
+ if ((!ahMapIdStr) || (!param1))
+ {
+ PSendSysMessage("Syntax is: ahbotoptions bidinterval $ahMapID (2, 6 or 7) $interval(in minutes)");
+ return false;
+ }
+ AuctionHouseBotCommands(12, ahMapID, NULL, param1);
+ }
+ else if (strncmp(opt,"bidsperinterval",l) == 0)
+ {
+ char * param1 = strtok(NULL, " ");
+ if ((!ahMapIdStr) || (!param1))
+ {
+ PSendSysMessage("Syntax is: ahbotoptions bidsperinterval $ahMapID (2, 6 or 7) $bids");
+ return false;
+ }
+ AuctionHouseBotCommands(13, ahMapID, NULL, param1);
+ }
+ else
+ {
+ PSendSysMessage("Syntax is: ahbotoptions $option $ahMapID (2, 6 or 7) $parameter");
+ PSendSysMessage("Try ahbotoptions help to see a list of options.");
+ return false;
+ }
+ return true;
+}
//reload commands
bool ChatHandler::HandleReloadAllCommand(const char*)
@@ -725,7 +1098,7 @@ bool ChatHandler::HandleLoadScriptsCommand(const char* args)
{
if(!LoadScriptingModule(args)) return true;
- sWorld.SendWorldText(LANG_SCRIPTS_RELOADED);
+ sWorld.SendGMText(LANG_SCRIPTS_RELOADED);
return true;
}
diff --git a/src/game/Mail.cpp b/src/game/Mail.cpp
index 3d4126bd22a..398b6c42ada 100644
--- a/src/game/Mail.cpp
+++ b/src/game/Mail.cpp
@@ -30,6 +30,7 @@
#include "Unit.h"
#include "Language.h"
#include "Database/DBCStores.h"
+#include "AuctionHouseBot.h"
void MailItem::deleteItem( bool inDB )
{
@@ -348,7 +349,14 @@ void WorldSession::HandleReturnToSender(WorldPacket & recv_data )
}
}
- SendReturnToSender(MAIL_NORMAL, GetAccountId(), m->receiver, m->sender, m->subject, m->itemTextId, &mi, m->money, m->mailTemplateId);
+ if (m->sender == AHBplayerGUID)
+ {
+ SendReturnToSender(MAIL_CREATURE, GetAccountId(), m->receiver, m->sender, m->subject, m->itemTextId, &mi, m->money, m->mailTemplateId);
+ }
+ else
+ {
+ SendReturnToSender(MAIL_NORMAL, GetAccountId(), m->receiver, m->sender, m->subject, m->itemTextId, &mi, m->money, m->mailTemplateId);
+ }
delete m; //we can deallocate old mail
pl->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, 0);
@@ -767,6 +775,14 @@ void WorldSession::HandleMsgQueryNextMailtime(WorldPacket & /*recv_data*/ )
void WorldSession::SendMailTo(Player* receiver, uint8 messageType, uint8 stationery, uint32 sender_guidlow_or_entry, uint32 receiver_guidlow, std::string subject, uint32 itemTextId, MailItemsInfo* mi, uint32 money, uint32 COD, uint32 checked, uint32 deliver_delay, uint16 mailTemplateId)
{
+ if (receiver_guidlow == AHBplayerGUID)
+ {
+ if(messageType == MAIL_AUCTION && mi) // auction mail with items
+ {
+ mi->deleteIncludedItems(true);
+ }
+ return;
+ }
uint32 mailId = objmgr.GenerateMailID();
time_t deliver_time = time(NULL) + deliver_delay;
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index f17cfa0c83a..6869485266a 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -2058,7 +2058,7 @@ void Spell::prepare(SpellCastTargets const* targets, Aura* triggeredByAura)
}
}
-void Spell::cancel()
+void Spell::cancel(bool report)
{
if(m_spellState == SPELL_STATE_FINISHED)
return;
@@ -2088,7 +2088,7 @@ void Spell::cancel()
m_caster->RemoveAurasDueToCasterSpell(m_spellInfo->Id, m_caster->GetGUID());
SendChannelUpdate(0);
SendInterrupted(0);
- SendCastResult(SPELL_FAILED_INTERRUPTED);
+ SendCastResult(report ? SPELL_FAILED_INTERRUPTED : SPELL_FAILED_DONT_REPORT);
} break;
default:
@@ -3687,7 +3687,8 @@ uint8 Spell::CanCast(bool strict)
// check correctness positive/negative cast target (pet cast real check and cheating check)
if(IsPositiveSpell(m_spellInfo->Id))
{
- if(m_caster->IsHostileTo(target))
+ //dispel positivity is dependant on target, don't check it
+ if(m_caster->IsHostileTo(target) && !IsDispel(m_spellInfo))
return SPELL_FAILED_BAD_TARGETS;
}
else
@@ -3932,6 +3933,12 @@ uint8 Spell::CanCast(bool strict)
if(m_targets.getUnitTarget() && !m_caster->IsFriendlyTo(m_targets.getUnitTarget()) && !m_caster->HasInArc( M_PI, target ))
return SPELL_FAILED_UNIT_NOT_INFRONT;
}
+ else if (m_spellInfo->Id == 19938) // Awaken Peon
+ {
+ Unit *unit = m_targets.getUnitTarget();
+ if(!unit || !unit->HasAura(17743, 0))
+ return SPELL_FAILED_BAD_TARGETS;
+ }
break;
}
case SPELL_EFFECT_SCHOOL_DAMAGE:
diff --git a/src/game/Spell.h b/src/game/Spell.h
index d06862ad1fa..afef4262058 100644
--- a/src/game/Spell.h
+++ b/src/game/Spell.h
@@ -353,7 +353,7 @@ class Spell
~Spell();
void prepare(SpellCastTargets const* targets, Aura* triggeredByAura = NULL);
- void cancel();
+ void cancel(bool report = true);
void update(uint32 difftime);
void cast(bool skipCheck = false);
void finish(bool ok = true);
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index f4842154ed8..78df7d77bd6 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -3707,20 +3707,20 @@ void Spell::EffectSummonGuardian(uint32 i)
// Search old Guardian only for players (if casted spell not have duration or cooldown)
// FIXME: some guardians have control spell applied and controlled by player and anyway player can't summon in this time
// so this code hack in fact
- if( m_caster->GetTypeId() == TYPEID_PLAYER && (duration <= 0 || GetSpellRecoveryTime(m_spellInfo)==0) )
- if(((Player*)m_caster)->HasGuardianWithEntry(pet_entry))
+ if( m_originalCaster->GetTypeId() == TYPEID_PLAYER && (duration <= 0 || GetSpellRecoveryTime(m_spellInfo)==0) )
+ if(((Player*)m_originalCaster)->HasGuardianWithEntry(pet_entry))
return; // find old guardian, ignore summon
// in another case summon new
- uint32 level = m_caster->getLevel();
+ uint32 level = m_originalCaster->getLevel();
// level of pet summoned using engineering item based at engineering skill level
- if(m_caster->GetTypeId()==TYPEID_PLAYER && m_CastItem)
+ if(m_originalCaster->GetTypeId()==TYPEID_PLAYER && m_CastItem)
{
ItemPrototype const *proto = m_CastItem->GetProto();
if(proto && proto->RequiredSkill == SKILL_ENGINERING)
{
- uint16 skill202 = ((Player*)m_caster)->GetSkillValue(SKILL_ENGINERING);
+ uint16 skill202 = ((Player*)m_originalCaster)->GetSkillValue(SKILL_ENGINERING);
if(skill202)
{
level = skill202/5;
@@ -3783,14 +3783,14 @@ void Spell::EffectSummonGuardian(uint32 i)
if(duration > 0)
spawnCreature->SetDuration(duration);
- spawnCreature->SetOwnerGUID(m_caster->GetGUID());
+ spawnCreature->SetOwnerGUID(m_originalCaster->GetGUID());
spawnCreature->setPowerType(POWER_MANA);
spawnCreature->SetUInt32Value(UNIT_NPC_FLAGS , 0);
- spawnCreature->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,m_caster->getFaction());
+ spawnCreature->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,m_originalCaster->getFaction());
spawnCreature->SetUInt32Value(UNIT_FIELD_FLAGS,0);
spawnCreature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
spawnCreature->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP,0);
- spawnCreature->SetCreatorGUID(m_caster->GetGUID());
+ spawnCreature->SetCreatorGUID(m_originalCaster->GetGUID());
spawnCreature->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
spawnCreature->InitStatsForLevel(level);
@@ -3798,8 +3798,8 @@ void Spell::EffectSummonGuardian(uint32 i)
spawnCreature->AIM_Initialize();
- if(m_caster->GetTypeId()==TYPEID_PLAYER)
- ((Player*)m_caster)->AddGuardian(spawnCreature);
+ if(m_originalCaster->GetTypeId()==TYPEID_PLAYER)
+ ((Player*)m_originalCaster)->AddGuardian(spawnCreature);
map->Add((Creature*)spawnCreature);
}
@@ -6162,6 +6162,10 @@ void Spell::EffectSendTaxi(uint32 i)
case 53335: //Stormwind Harbor Flight - Peaceful
mountid = 6852;
break;
+ case 41533: //Fly of the Netherwing
+ case 41540: //Fly of the Netherwing
+ mountid = 23468;
+ break;
}
((Player*)unitTarget)->ActivateTaxiPathTo(nodes,mountid);
diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h
index 5d9e2a3fed3..9903220677f 100644
--- a/src/game/SpellMgr.h
+++ b/src/game/SpellMgr.h
@@ -419,16 +419,22 @@ inline bool IsAreaAuraEffect(uint32 effect)
return true;
return false;
}
-
-inline bool IsDispelSpell(SpellEntry const *spellInfo)
+inline bool IsDispel(SpellEntry const *spellInfo)
{
//spellsteal is also dispel
if (spellInfo->Effect[0] == SPELL_EFFECT_DISPEL ||
- spellInfo->Effect[0] == SPELL_EFFECT_STEAL_BENEFICIAL_BUFF ||
spellInfo->Effect[1] == SPELL_EFFECT_DISPEL ||
+ spellInfo->Effect[2] == SPELL_EFFECT_DISPEL)
+ return true;
+ return false;
+}
+inline bool IsDispelSpell(SpellEntry const *spellInfo)
+{
+ //spellsteal is also dispel
+ if (spellInfo->Effect[0] == SPELL_EFFECT_STEAL_BENEFICIAL_BUFF ||
spellInfo->Effect[1] == SPELL_EFFECT_STEAL_BENEFICIAL_BUFF ||
- spellInfo->Effect[2] == SPELL_EFFECT_DISPEL ||
- spellInfo->Effect[2] == SPELL_EFFECT_STEAL_BENEFICIAL_BUFF)
+ spellInfo->Effect[2] == SPELL_EFFECT_STEAL_BENEFICIAL_BUFF
+ ||IsDispel(spellInfo))
return true;
return false;
}
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 79ec28dcb0c..471ff053550 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -185,8 +185,17 @@ Unit::~Unit()
if(m_uint32Values)
{
sLog.outDetail("Deconstruct Unit Entry = %u", GetEntry());
- if(m_scAuras.size())
+ /*for(int i = 0; i < TOTAL_AURAS; ++i)
+ {
+ if(m_modAuras[i].begin() != m_modAuras[i].end())
+ sLog.outError("Unit %u has mod auras during deconstruction", GetEntry());
+ }
+ if(m_scAuras.begin() != m_scAuras.end())
sLog.outError("Unit %u has sc auras during deconstruction", GetEntry());
+ if(m_interruptableAuras.begin() != m_interruptableAuras.end())
+ sLog.outError("Unit %u has interruptable auras during deconstruction", GetEntry());
+ if(m_ccAuras.begin() != m_ccAuras.end())
+ sLog.outError("Unit %u has cc auras during deconstruction", GetEntry());*/
}
}
@@ -4001,7 +4010,7 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
// Statue unsummoned at aura remove
Totem* statue = NULL;
- bool caster_channeled = false;
+ bool channeled = false;
if(IsChanneledSpell(AurSpellInfo))
{
if(!caster) // can be already located for IsSingleTargetSpell case
@@ -4011,8 +4020,25 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
{
if(caster->GetTypeId()==TYPEID_UNIT && ((Creature*)caster)->isTotem() && ((Totem*)caster)->GetTotemType()==TOTEM_STATUE)
statue = ((Totem*)caster);
- else
- caster_channeled = caster==this;
+
+ // stop caster chanelling state
+ else if(caster->m_currentSpells[CURRENT_CHANNELED_SPELL]
+ //prevent recurential call
+ && caster->m_currentSpells[CURRENT_CHANNELED_SPELL]->getState() != SPELL_STATE_FINISHED)
+ {
+ if (caster==this || !IsAreaOfEffectSpell(AurSpellInfo))
+ {
+ // remove auras only for non-aoe spells or when chanelled aura is removed
+ // because aoe spells don't require aura on target to continue
+ if (AurSpellInfo->EffectApplyAuraName[Aur->GetEffIndex()]!=SPELL_AURA_PERIODIC_DUMMY
+ && AurSpellInfo->EffectApplyAuraName[Aur->GetEffIndex()]!= SPELL_AURA_DUMMY)
+ //don't stop channeling of scripted spells (this is actually a hack)
+ {
+ caster->m_currentSpells[CURRENT_CHANNELED_SPELL]->cancel(false);
+ channeled = true;
+ }
+ }
+ }
}
}
@@ -4037,8 +4063,13 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
delete Aur;
- if(caster_channeled)
- RemoveAurasAtChanneledTarget (AurSpellInfo);
+ if(channeled)
+ {
+ //if target is not caster remove auras also on caster
+ if (caster!=this)
+ caster->RemoveAurasAtChanneledTarget (AurSpellInfo, caster);
+ RemoveAurasAtChanneledTarget (AurSpellInfo, caster);
+ }
if(statue)
statue->UnSummon();
@@ -9521,18 +9552,16 @@ void Unit::TauntFadeOut(Unit *taunter)
//======================================================================
-bool Unit::SelectHostilTarget()
+Unit* Creature::SelectHostilTarget()
{
//function provides main threat functionality
//next-victim-selection algorithm and evade mode are called
//threat list sorting etc.
- assert(GetTypeId()== TYPEID_UNIT);
//This function only useful once AI has been initialized
- if (!((Creature*)this)->AI())
- return false;
-
+ if (!AI())
+ return NULL;
Unit* target = NULL;
// First checking if we have some taunt on us
@@ -9543,7 +9572,7 @@ bool Unit::SelectHostilTarget()
// The last taunt aura caster is alive an we are happy to attack him
if ( (caster = tauntAuras.back()->GetCaster()) && caster->isAlive() )
- return true;
+ return getVictim();
else if (tauntAuras.size() > 1)
{
// We do not have last taunt aura caster but we have more taunt auras,
@@ -9574,36 +9603,36 @@ bool Unit::SelectHostilTarget()
{
if(!hasUnitState(UNIT_STAT_STUNNED))
SetInFront(target);
- ((Creature*)this)->AI()->AttackStart(target);
- return true;
+ AI()->AttackStart(target);
+ return getVictim();
}
// no target but something prevent go to evade mode
if( !isInCombat() /*|| HasAuraType(SPELL_AURA_MOD_TAUNT)*/ )
- return false;
+ return NULL;
// last case when creature don't must go to evade mode:
// it in combat but attacker not make any damage and not enter to aggro radius to have record in threat list
// for example at owner command to pet attack some far away creature
// Note: creature not have targeted movement generator but have attacker in this case
- if( GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE )
+ /*if( GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE )
{
for(AttackerSet::const_iterator itr = m_attackers.begin(); itr != m_attackers.end(); ++itr)
{
if( (*itr)->IsInMap(this) && canAttack(*itr) && (*itr)->isInAccessiblePlaceFor((Creature*)this) )
return false;
}
- }
+ }*/
// search nearby enemy before enter evade mode
- if(((Creature*)this)->HasReactState(REACT_AGGRESSIVE))
+ if(HasReactState(REACT_AGGRESSIVE))
{
- if(Unit *target = ((Creature*)this)->SelectNearestTarget())
+ if(target = SelectNearestTarget())
{
- if(!((Creature*)this)->IsOutOfThreatArea(target))
+ if(!IsOutOfThreatArea(target))
{
- ((Creature*)this)->AI()->AttackStart(target);
- return true;
+ AI()->AttackStart(target);
+ return getVictim();
}
}
}
@@ -9614,16 +9643,16 @@ bool Unit::SelectHostilTarget()
for(Unit::AuraList::const_iterator itr = iAuras.begin(); itr != iAuras.end(); ++itr)
if((*itr)->IsPermanent())
{
- ((Creature*)this)->AI()->EnterEvadeMode();
+ AI()->EnterEvadeMode();
break;
}
- return false;
+ return NULL;
}
// enter in evade mode in other case
- ((Creature*)this)->AI()->EnterEvadeMode();
+ AI()->EnterEvadeMode();
- return false;
+ return NULL;
}
//======================================================================
@@ -11555,23 +11584,23 @@ bool Unit::HandleMeandingAuraProc( Aura* triggeredByAura )
return true;
}
-void Unit::RemoveAurasAtChanneledTarget(SpellEntry const* spellInfo)
+void Unit::RemoveAurasAtChanneledTarget(SpellEntry const* spellInfo, Unit * caster)
{
- uint64 target_guid = GetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT);
+/* uint64 target_guid = GetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT);
if(target_guid == GetGUID())
return;
if(!IS_UNIT_GUID(target_guid))
return;
- Unit* target = ObjectAccessor::GetUnit(*this, target_guid);
- if(!target)
+ Unit* target = ObjectAccessor::GetUnit(*this, target_guid);*/
+ if(!caster)
return;
- for (AuraMap::iterator iter = target->GetAuras().begin(); iter != target->GetAuras().end(); )
+ for (AuraMap::iterator iter = GetAuras().begin(); iter != GetAuras().end(); )
{
- if (iter->second->GetId() == spellInfo->Id && iter->second->GetCasterGUID()==GetGUID())
- target->RemoveAura(iter);
+ if (iter->second->GetId() == spellInfo->Id && iter->second->GetCasterGUID() == caster->GetGUID())
+ RemoveAura(iter);
else
++iter;
}
diff --git a/src/game/Unit.h b/src/game/Unit.h
index b2ff5287309..669bc8a405f 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -1148,7 +1148,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
void RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit *dispeler);
void RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit *stealer);
void RemoveAurasDueToSpellByCancel(uint32 spellId);
- void RemoveAurasAtChanneledTarget(SpellEntry const* spellInfo);
+ void RemoveAurasAtChanneledTarget(SpellEntry const* spellInfo, Unit * caster);
void RemoveNotOwnSingleTargetAuras();
void RemoveSpellsCausingAura(AuraType auraType);
@@ -1275,7 +1275,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
void AddThreat(Unit* pVictim, float threat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellEntry const *threatSpell = NULL);
float ApplyTotalThreatModifier(float threat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL);
void DeleteThreatList();
- bool SelectHostilTarget();
+ //bool SelectHostilTarget();
void TauntApply(Unit* pVictim);
void TauntFadeOut(Unit *taunter);
ThreatManager& getThreatManager() { return m_ThreatManager; }
@@ -1506,6 +1506,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
uint32 m_reactiveTimer[MAX_REACTIVE];
uint32 m_regenTimer;
+ ThreatManager m_ThreatManager;
private:
void SendAttackStop(Unit* victim); // only from AttackStop(Unit*)
//void SendAttackStart(Unit* pVictim); // only from Unit::AttackStart(Unit*)
@@ -1525,7 +1526,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
Diminishing m_Diminishing;
// Manage all Units threatening us
- ThreatManager m_ThreatManager;
+// ThreatManager m_ThreatManager;
// Manage all Units that are threatened by us
HostilRefManager m_HostilRefManager;
diff --git a/src/game/World.cpp b/src/game/World.cpp
index fde4126db18..7dd1a54769f 100644
--- a/src/game/World.cpp
+++ b/src/game/World.cpp
@@ -51,6 +51,7 @@
#include "BattleGroundMgr.h"
#include "OutdoorPvPMgr.h"
#include "TemporarySummon.h"
+#include "AuctionHouseBot.h"
#include "WaypointMovementGenerator.h"
#include "VMapFactory.h"
#include "GlobalEvents.h"
@@ -1453,6 +1454,9 @@ void World::SetInitialWorldSettings()
uint32 nextGameEvent = gameeventmgr.Initialize();
m_timers[WUPDATE_EVENTS].SetInterval(nextGameEvent); //depend on next event
+ sLog.outString("Initialize AuctionHouseBot...");
+ AuctionHouseBotInit();
+
sLog.outString( "WORLD: World initialized" );
}
@@ -1564,7 +1568,8 @@ void World::Update(uint32 diff)
/// <ul><li> Handle auctions when the timer has passed
if (m_timers[WUPDATE_AUCTIONS].Passed())
{
- m_timers[WUPDATE_AUCTIONS].Reset();
+ AuctionHouseBot();
+ m_timers[WUPDATE_AUCTIONS].Reset();
///- Update mails (return old mails with item, or delete them)
//(tested... works on win)
diff --git a/src/shared/revision.h b/src/shared/revision.h
index c2c9ba4ece8..028a5a28b40 100644
--- a/src/shared/revision.h
+++ b/src/shared/revision.h
@@ -1,7 +1,7 @@
#ifndef __REVISION_H__
#define __REVISION_H__
- #define _REVISION "1024"
- #define _HASH "b39265a18e57"
+ #define _REVISION "1066"
+ #define _HASH "1264da9c9234"
#define _REVISION_DATE "*"
#define _REVISION_TIME "*"
#endif // __REVISION_H__
diff --git a/src/trinitycore/Master.cpp b/src/trinitycore/Master.cpp
index 938f1753c0b..75fea010337 100644
--- a/src/trinitycore/Master.cpp
+++ b/src/trinitycore/Master.cpp
@@ -459,7 +459,7 @@ bool Master::_StartDB()
clearOnlineAccounts();
///- Insert version info into DB
- WorldDatabase.PExecute("UPDATE `version` SET `core_version` = '%s', `core_rev` = '%s'", _FULLVERSION, _REVISION);
+ WorldDatabase.PExecute("UPDATE `version` SET `core_version` = '%s', `core_revision` = '%s'", _FULLVERSION, _REVISION);
sWorld.LoadDBVersion();
diff --git a/src/trinitycore/trinitycore.conf.dist b/src/trinitycore/trinitycore.conf.dist
index 7da04b0bdf6..c2e58216a86 100644
--- a/src/trinitycore/trinitycore.conf.dist
+++ b/src/trinitycore/trinitycore.conf.dist
@@ -1,7 +1,7 @@
##########################################
# Trinity Core worldd configuration file #
##########################################
-ConfVersion=2008080101
+ConfVersion=2009010301
###################################################################################################################
# CONNECTIONS AND DIRECTORIES
@@ -1189,6 +1189,79 @@ Network.OutUBuff = 65536
Network.TcpNodelay = 1
###################################################################################################################
+# AUCTION HOUSE BOT SETTINGS
+#
+# AuctionHouseBot.EnableSeller
+# Enable/Disable the part of AHBot that puts items up for auction
+# Default 0 (disabled)
+#
+# AuctionHouseBot.EnableBuyer
+# Enable/Disable the part of AHBot that buys items from players
+# Default 0 (disabled)
+#
+# Auction House Bot character data
+# AuctionHouseBot.Account is the account number (in realmd->account table) of the player you want to run as the auction bot.
+# AuctionHouseBot.GUID is the GUID (in characters->characters table) of the player you want to run as the auction bot.
+# Default: 0 (Auction House Bot disabled)
+#
+# AuctionHouseBot.VendorItems
+# Include items that can be bought from vendors.
+# Default 0
+#
+# AuctionHouseBot.LootItems
+# Include items that can be looted or fished for.
+# Default 1
+#
+# AuctionHouseBot.OtherItems
+# Include misc. items.
+# Default 0
+#
+# AuctionHouseBot.Bonding_types
+# Indicates which bonding types to allow seller to put up for auction
+# No_Bind
+# Default 1
+# Bind_When_Picked_Up
+# Default 0
+# Bind_When_Equipped
+# Default 1
+# Bind_When_Use
+# Default 1
+# Bind_Quest_Item
+# Default 0
+#
+# AuctionHouseBot.ItemsPerCycle
+# Number of Items to Add/Remove from the AH during mass operations
+# Default 200
+#
+# AuctionHouseBot.UseBuyPriceForSeller
+# Should the Seller use BuyPrice or SellPrice to determine Bid Prices
+# Default 0 (use SellPrice)
+#
+# AuctionHouseBot.UseBuyPriceForBuyer
+# Should the Buyer use BuyPrice or SellPrice to determine Bid Prices
+# Default 0 (use SellPrice)
+#
+# All other settings have been moved to sql
+#
+###################################################################################################################
+
+AuctionHouseBot.EnableSeller = 0
+AuctionHouseBot.EnableBuyer = 0
+AuctionHouseBot.Account = 0
+AuctionHouseBot.GUID = 0
+AuctionHouseBot.VendorItems = 0
+AuctionHouseBot.LootItems = 1
+AuctionHouseBot.OtherItems = 0
+AuctionHouseBot.No_Bind = 1
+AuctionHouseBot.Bind_When_Picked_Up = 0
+AuctionHouseBot.Bind_When_Equipped = 1
+AuctionHouseBot.Bind_When_Use = 1
+AuctionHouseBot.Bind_Quest_Item = 0
+AuctionHouseBot.ItemsPerCycle = 200
+AuctionHouseBot.UseBuyPriceForSeller = 0
+AuctionHouseBot.UseBuyPriceForBuyer = 0
+
+###################################################################################################################
# CONSOLE AND REMOTE ACCESS
#
# Console.Enable
diff --git a/win/VC71/game.vcproj b/win/VC71/game.vcproj
index 32af826123b..04c5679b167 100644
--- a/win/VC71/game.vcproj
+++ b/win/VC71/game.vcproj
@@ -182,6 +182,16 @@
<File
RelativePath="..\..\src\game\BattleGroundBE.cpp">
</File>
+ Name="AuctionHouseBot"
+ >
+ <File
+ RelativePath="..\..\src\game\AuctionHouseBot.cpp">
+ </File>
+ <File
+ RelativePath="..\..\src\game\AuctionHouseBot.h">
+ </File>
+ </Filter>
+ <Filter
<File
RelativePath="..\..\src\game\BattleGroundBE.h">
</File>
@@ -192,6 +202,12 @@
RelativePath="..\..\src\game\BattleGroundDS.h">
</File>
<File
+ RelativePath="..\..\src\game\AuctionHouseBot.cpp">
+ </File>
+ <File
+ RelativePath="..\..\src\game\AuctionHouseBot.h">
+ </File>
+ <File
RelativePath="..\..\src\game\BattleGroundEY.cpp">
</File>
<File
diff --git a/win/VC80/game.vcproj b/win/VC80/game.vcproj
index 457987b9035..bf4b93c1ef6 100644
--- a/win/VC80/game.vcproj
+++ b/win/VC80/game.vcproj
@@ -416,6 +416,16 @@
</File>
<File
RelativePath="..\..\src\game\BattleGroundBE.h"
+ Name="AuctionHouseBot"
+ >
+ <File
+ RelativePath="..\..\src\game\AuctionHouseBot.cpp">
+ </File>
+ <File
+ RelativePath="..\..\src\game\AuctionHouseBot.h">
+ </File>
+ </Filter>
+ <Filter
>
</File>
<File
@@ -427,6 +437,12 @@
>
</File>
<File
+ RelativePath="..\..\src\game\AuctionHouseBot.cpp">
+ </File>
+ <File
+ RelativePath="..\..\src\game\AuctionHouseBot.h">
+ </File>
+ <File
RelativePath="..\..\src\game\BattleGroundEY.cpp"
>
</File>
diff --git a/win/VC90/game.vcproj b/win/VC90/game.vcproj
index 3ca87d57c1f..90186336003 100644
--- a/win/VC90/game.vcproj
+++ b/win/VC90/game.vcproj
@@ -886,6 +886,16 @@
</File>
</Filter>
<Filter
+ Name="AuctionHouseBot"
+ >
+ <File
+ RelativePath="..\..\src\game\AuctionHouseBot.cpp">
+ </File>
+ <File
+ RelativePath="..\..\src\game\AuctionHouseBot.h">
+ </File>
+ </Filter>
+ <Filter
Name="Object"
>
<File