diff options
-rw-r--r-- | sql/updates/world/2014_09_01_00_world_misc.sql | 56 | ||||
-rw-r--r-- | sql/updates/world/2014_09_02_00_world_misc_335.sql | 2 | ||||
-rw-r--r-- | src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp | 7 | ||||
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 18 | ||||
-rw-r--r-- | src/server/game/Globals/ObjectMgr.h | 18 | ||||
-rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 3 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_group.cpp | 2 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_server.cpp | 38 | ||||
-rw-r--r-- | src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp | 315 | ||||
-rw-r--r-- | src/server/scripts/Outland/zone_nagrand.cpp | 112 |
10 files changed, 270 insertions, 301 deletions
diff --git a/sql/updates/world/2014_09_01_00_world_misc.sql b/sql/updates/world/2014_09_01_00_world_misc.sql new file mode 100644 index 00000000000..7a415588f0f --- /dev/null +++ b/sql/updates/world/2014_09_01_00_world_misc.sql @@ -0,0 +1,56 @@ +DELETE FROM `gossip_menu` WHERE `entry` IN(7768,7767,7766,7765,7764,7763,7762,7974,7979,7978,7977,7976); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(7768, 9507), -- 18141 +(7767, 9508), -- 18141 +(7766, 9509), -- 18141 +(7765, 9510), -- 18141 +(7764, 9511), -- 18141 +(7763, 9512), -- 18141 +(7762, 9513), -- 18141 +(7768, 9819), -- 18141 +(7974, 9821), -- 18141 +(7979, 9822), -- 18141 +(7978, 9823), -- 18141 +(7977, 9824), -- 18141 +(7976, 9825); -- 18141 + +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN(7768,7767,7766,7765,7764,7763,7762,7974,7979,7978,7977,7976); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES +-- A Visit with the Greatmother +(7768, 0, 0, 'Hello, Greatmother. Garrosh told me that you wanted to speak with me.', 15770, 1, 1, 7767, 0, 0, 0, '', 0), +(7767, 0, 0, 'You raised all of the orcs here, Greatmother?', 15772, 1, 1, 7766, 0, 0, 0, '', 0), +(7766, 0, 0, 'Do you believe that?', 15774, 1, 1, 7765, 0, 0, 0, '', 0), +(7765, 0, 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.', 15776, 1, 1, 7764, 0, 0, 0, '', 0), +(7764, 0, 0, 'Left? How can you choose to leave?', 15778, 1, 1, 7763, 0, 0, 0, '', 0), +(7763, 0, 0, 'What is this duty?', 15780, 1, 1, 7762, 0, 0, 0, '', 0), +(7762, 0, 0, 'Is there anything I can do for you, Greatmother?', 15782, 1, 1, 0, 0, 0, 0, '', 0), +-- There is no hope +(7768, 1, 0, 'Garrosh is beyond redemption, Greatmother. I fear that in helping the Mag\'har, I have convinced Garrosh that he is unfit to lead.', 16845, 1, 1, 7974, 0, 0, 0, '', 0), +(7974, 0, 0, 'I have done all that I could, Greatmother. I thank you for your kind words.', 16849, 1, 1, 7979, 0, 0, 0, '', 0), +(7979, 0, 0, 'Greatmother, you are the mother of Durotan?', 16851, 1, 1, 7978, 0, 0, 0, '', 0), +(7978, 0, 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.>', 16853, 1, 1, 7977, 0, 0, 0, '', 0), +(7977, 0, 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.', 16855, 1, 1, 7976, 0, 0, 0, '', 0), +(7976, 0, 0, 'I will return to Azeroth at once, Greatmother.', 16857, 1, 1, 0, 0, 0, 0, '', 0); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN(14,15) AND `SourceGroup`=7768; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 7768, 0, 0, 0, 9, 0, 10044, 0, 0, 0, 0, 0, '', 'Greatmother Geyah - Show gossip option only if player has A Visit With the Greatmother taken'), +(15, 7768, 1, 0, 0, 9, 0, 10172, 0, 0, 0, 0, 0, '', 'Greatmother Geyah - Show gossip option only if player has There is no hope taken'), +(14, 7768, 9819, 0, 0, 9, 0, 10172, 0, 0, 0, 0, 0, '', 'Greatmother Geyah - Show npc text only if player has There is no hope taken'), +(14, 7768, 9507, 0, 0, 9, 0, 10172, 0, 0, 1, 0, 0, '', 'Greatmother Geyah - Show npc text only if player does not have There is no hope taken'); + +DELETE FROM `npc_text` WHERE `ID` IN(9819,9821,9822,9823,9824,9825); +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`, `lang0`, `prob0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `BroadcastTextID1`, `lang1`, `prob1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `BroadcastTextID2`, `lang2`, `prob2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `BroadcastTextID3`, `lang3`, `prob3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `BroadcastTextID4`, `lang4`, `prob4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `BroadcastTextID5`, `lang5`, `prob5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `BroadcastTextID6`, `lang6`, `prob6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `BroadcastTextID7`, `lang7`, `prob7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`, `VerifiedBuild`) VALUES +(9819, '', "What did Garrosh tell you, $n?", 16844, 0, 1, 1, 1, 1, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(9821, '', "<Greatmother Geyah nods, accepting your answer.>$B$BI can no longer fight the spirits, $n. My time has long since passed. Once again, I must thank you for all that you have done. While Garrosh may be unmovable, many of my people have been lifted by your accomplishments. They are now willing to fight for our rights as a united clan.", 16848, 0, 1, 1, 1, 1, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(9822, '', "<Greatmother Geyah smiles at you.>$B$BYou remind me of my son, $n.$B$BHe was an immovable mountain: A pillar of strength and honor.$B$B<Geyah's eyes well up with tears.>$B$BHe sacrificed himself so that we could survive. So that generations of orcs after him could be born into a world without the blood curse... Without Gul'dan and his dark Horde...$B$B<Geyah stares into the distance, lost in thought.>$B$BOh Durotan, how I wish you could be here. Your people so desperately need you...", 16850, 0, 1, 1, 1, 1, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(9823, '', "<Greatmother Geyah nods.>$B$BDid you know my son?", 16852, 0, 1, 1, 1, 1, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(9824, '', "<Greatmother Geyah's violet eyes lock onto yours.>$B$BYes...", 16854, 0, 1, 1, 1, 1, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(9825, '', "<Tears stream down Greatmother Geyah's face.>$B$BI... I... Durotan survived to have a child? The child Draka told me of before they left... It was their greatest fear... To raise a child in this world. On the other side of that gate was their only hope. I dared not tell Durotan, but secretly, I begged the spirits to watch over them - to protect their child and to give them strength.$B$BI... I must see my grandchild. I must see him. Please, I am too weak. You must tell him. Before I leave this world...", 16856, 0, 1, 1, 1, 1, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + +UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`= '' WHERE `entry` =18141; +DELETE FROM `smart_scripts` WHERE `entryorguid` =18141; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18141, 0, 0, 2, 62, 0, 100, 0, 7762, 0, 0, 0, 15, 10044, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Greatmother Geyah - On Gossip Option Select - Complete Quest (A Visit With the Greatmother)'), +(18141, 0, 1, 2, 62, 0, 100, 0, 7976, 0, 0, 0, 15, 10172, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Greatmother Geyah - On Gossip Option Select - Complete Quest (There is no hope)'), +(18141, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Greatmother Geyah - On Gossip Option Select - Close Gossip'); diff --git a/sql/updates/world/2014_09_02_00_world_misc_335.sql b/sql/updates/world/2014_09_02_00_world_misc_335.sql new file mode 100644 index 00000000000..0ead7e514e6 --- /dev/null +++ b/sql/updates/world/2014_09_02_00_world_misc_335.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `faction` = 554 WHERE `entry` = 3203; diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp b/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp index 20d0364ab79..6e7425a75a3 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp +++ b/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp @@ -355,6 +355,7 @@ void AuctionBotBuyer::AddNewAuctionBuyerBotBid(BuyerConfiguration& config) uint32 bidPrice; uint32 bidPriceByItem; uint32 minBidPrice; + uint32 minBuyPrice; if (auction->bid >= auction->startbid) { bidPrice = auction->GetAuctionOutBid(); @@ -373,6 +374,7 @@ void AuctionBotBuyer::AddNewAuctionBuyerBotBid(BuyerConfiguration& config) inGameBuyPrice = 0; inGameBidPrice = 0; minBidPrice = 0; + minBuyPrice = 0; } else { @@ -381,6 +383,7 @@ void AuctionBotBuyer::AddNewAuctionBuyerBotBid(BuyerConfiguration& config) inGameBuyPrice = sameItemItr->second.BuyPrice / sameItemItr->second.ItemCount; inGameBidPrice = sameItemItr->second.BidPrice / sameItemItr->second.ItemCount; minBidPrice = sameItemItr->second.MinBidPrice; + minBuyPrice = sameItemItr->second.MinBuyPrice; } uint32 maxBidablePrice = maxBuyablePrice - (maxBuyablePrice / 30); // Max Bidable price defined to 70% of max buyable price @@ -389,14 +392,14 @@ void AuctionBotBuyer::AddNewAuctionBuyerBotBid(BuyerConfiguration& config) TC_LOG_DEBUG("ahbot", "AHBot: MaxPrice of Entry %u is %.1fg.", itr->second.AuctionId, double(maxBuyablePrice) / 10000.0); TC_LOG_DEBUG("ahbot", "AHBot: GamePrice buy=%.1fg, bid=%.1fg.", inGameBuyPrice / 10000, inGameBidPrice / 10000); TC_LOG_DEBUG("ahbot", "AHBot: Minimal price see in AH Buy=%ug, Bid=%ug.", - sameItemItr->second.MinBuyPrice / 10000, minBidPrice / 10000); + minBuyPrice / 10000, minBidPrice / 10000); TC_LOG_DEBUG("ahbot", "AHBot: Actual Entry price, Buy=%ug, Bid=%ug.", buyoutPrice / 10000, bidPrice / 10000); if (!auction->owner) // Original auction owner maxChance = maxChance / 5; // if Owner is AHBot this mean player placed bid on this auction. We divide by 5 chance for AhBuyer to place bid on it. (This make more challenge than ignore entry) if (auction->buyout != 0) // Is the item directly buyable? { - if (IsBuyableEntry(buyoutPrice, inGameBuyPrice, maxBuyablePrice, sameItemItr->second.MinBuyPrice, maxChance, config.FactionChance)) + if (IsBuyableEntry(buyoutPrice, inGameBuyPrice, maxBuyablePrice, minBuyPrice, maxChance, config.FactionChance)) { if (IsBidableEntry(bidPriceByItem, inGameBuyPrice, maxBidablePrice, minBidPrice, maxChance / 2, config.FactionChance)) { diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 944ad4d4a19..7ab843943f8 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -7261,13 +7261,13 @@ void ObjectMgr::LoadNPCSpellClickSpells() SpellInfo const* spellinfo = sSpellMgr->GetSpellInfo(spellid); if (!spellinfo) { - TC_LOG_ERROR("sql.sql", "Table npc_spellclick_spells references unknown spellid %u. Skipping entry.", spellid); + TC_LOG_ERROR("sql.sql", "Table npc_spellclick_spells creature: %u references unknown spellid %u. Skipping entry.", npc_entry, spellid); continue; } uint8 userType = fields[3].GetUInt16(); if (userType >= SPELL_CLICK_USER_MAX) - TC_LOG_ERROR("sql.sql", "Table npc_spellclick_spells references unknown user type %u. Skipping entry.", uint32(userType)); + TC_LOG_ERROR("sql.sql", "Table npc_spellclick_spells creature: %u references unknown user type %u. Skipping entry.", npc_entry, uint32(userType)); uint8 castFlags = fields[2].GetUInt8(); SpellClickInfo info; @@ -7329,7 +7329,7 @@ void ObjectMgr::DeleteCorpseCellData(uint32 mapid, uint32 cellid, uint32 player_ cell_guids.corpses.erase(player_guid); } -void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string const& table, bool starter, bool go) +void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, QuestRelationsReverse* reverseMap, std::string const& table, bool starter, bool go) { uint32 oldMSTime = getMSTime(); @@ -7362,7 +7362,11 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string const& } if (!poolId || !starter) + { map.insert(QuestRelations::value_type(id, quest)); + if (reverseMap) + reverseMap->insert(QuestRelationsReverse::value_type(quest, id)); + } else if (starter) poolRelationMap->insert(PooledQuestRelation::value_type(quest, id)); @@ -7374,7 +7378,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string const& void ObjectMgr::LoadGameobjectQuestStarters() { - LoadQuestRelationsHelper(_goQuestRelations, "gameobject_queststarter", true, true); + LoadQuestRelationsHelper(_goQuestRelations, nullptr, "gameobject_queststarter", true, true); for (QuestRelations::iterator itr = _goQuestRelations.begin(); itr != _goQuestRelations.end(); ++itr) { @@ -7388,7 +7392,7 @@ void ObjectMgr::LoadGameobjectQuestStarters() void ObjectMgr::LoadGameobjectQuestEnders() { - LoadQuestRelationsHelper(_goQuestInvolvedRelations, "gameobject_questender", false, true); + LoadQuestRelationsHelper(_goQuestInvolvedRelations, &_goQuestInvolvedRelationsReverse, "gameobject_questender", false, true); for (QuestRelations::iterator itr = _goQuestInvolvedRelations.begin(); itr != _goQuestInvolvedRelations.end(); ++itr) { @@ -7402,7 +7406,7 @@ void ObjectMgr::LoadGameobjectQuestEnders() void ObjectMgr::LoadCreatureQuestStarters() { - LoadQuestRelationsHelper(_creatureQuestRelations, "creature_queststarter", true, false); + LoadQuestRelationsHelper(_creatureQuestRelations, nullptr, "creature_queststarter", true, false); for (QuestRelations::iterator itr = _creatureQuestRelations.begin(); itr != _creatureQuestRelations.end(); ++itr) { @@ -7416,7 +7420,7 @@ void ObjectMgr::LoadCreatureQuestStarters() void ObjectMgr::LoadCreatureQuestEnders() { - LoadQuestRelationsHelper(_creatureQuestInvolvedRelations, "creature_questender", false, false); + LoadQuestRelationsHelper(_creatureQuestInvolvedRelations, &_creatureQuestInvolvedRelationsReverse, "creature_questender", false, false); for (QuestRelations::iterator itr = _creatureQuestInvolvedRelations.begin(); itr != _creatureQuestInvolvedRelations.end(); ++itr) { diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 56ae4a4c6d1..dc9196dd0df 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -492,8 +492,10 @@ typedef std::unordered_map<int32, TrinityStringLocale> TrinityStringLocaleContai typedef std::unordered_map<uint32, GossipMenuItemsLocale> GossipMenuItemsLocaleContainer; typedef std::unordered_map<uint32, PointOfInterestLocale> PointOfInterestLocaleContainer; -typedef std::multimap<uint32, uint32> QuestRelations; +typedef std::multimap<uint32, uint32> QuestRelations; // unit/go -> quest +typedef std::multimap<uint32, uint32> QuestRelationsReverse; // quest -> unit/go typedef std::pair<QuestRelations::const_iterator, QuestRelations::const_iterator> QuestRelationBounds; +typedef std::pair<QuestRelationsReverse::const_iterator, QuestRelationsReverse::const_iterator> QuestRelationReverseBounds; struct PetLevelInfo { @@ -930,6 +932,11 @@ class ObjectMgr return _goQuestInvolvedRelations.equal_range(go_entry); } + QuestRelationReverseBounds GetGOQuestInvolvedRelationReverseBounds(uint32 questId) + { + return _goQuestInvolvedRelationsReverse.equal_range(questId); + } + QuestRelations* GetCreatureQuestRelationMap() { return &_creatureQuestRelations; @@ -945,6 +952,11 @@ class ObjectMgr return _creatureQuestInvolvedRelations.equal_range(creature_entry); } + QuestRelationReverseBounds GetCreatureQuestInvolvedRelationReverseBounds(uint32 questId) + { + return _creatureQuestInvolvedRelationsReverse.equal_range(questId); + } + void LoadEventScripts(); void LoadSpellScripts(); void LoadWaypointScripts(); @@ -1347,8 +1359,10 @@ class ObjectMgr QuestRelations _goQuestRelations; QuestRelations _goQuestInvolvedRelations; + QuestRelationsReverse _goQuestInvolvedRelationsReverse; QuestRelations _creatureQuestRelations; QuestRelations _creatureQuestInvolvedRelations; + QuestRelationsReverse _creatureQuestInvolvedRelationsReverse; //character reserved names typedef std::set<std::wstring> ReservedNamesContainer; @@ -1373,7 +1387,7 @@ class ObjectMgr private: void LoadScripts(ScriptsType type); void CheckScripts(ScriptsType type, std::set<int32>& ids); - void LoadQuestRelationsHelper(QuestRelations& map, std::string const& table, bool starter, bool go); + void LoadQuestRelationsHelper(QuestRelations& map, QuestRelationsReverse* reverseMap, std::string const& table, bool starter, bool go); void PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count); MailLevelRewardContainer _mailLevelRewardStore; diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 8e0c8c8bd01..461e56b8f78 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -85,6 +85,9 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto, // Black Plague else if (spellproto->Id == 64155) return DIMINISHING_NONE; + // Screams of the Dead (King Ymiron) + else if (spellproto->Id == 51750) + return DIMINISHING_NONE; break; } // Event spells diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp index 477eb3649b7..470eb27bad2 100644 --- a/src/server/scripts/Commands/cs_group.cpp +++ b/src/server/scripts/Commands/cs_group.cpp @@ -245,7 +245,7 @@ public: return false; } - if (!groupSource->IsFull()) + if (groupSource->IsFull()) { handler->PSendSysMessage(LANG_GROUP_FULL); handler->SetSentErrorMessage(true); diff --git a/src/server/scripts/Commands/cs_server.cpp b/src/server/scripts/Commands/cs_server.cpp index 43afea1b381..14a68d1fdae 100644 --- a/src/server/scripts/Commands/cs_server.cpp +++ b/src/server/scripts/Commands/cs_server.cpp @@ -30,8 +30,6 @@ EndScriptData */ #include "ScriptMgr.h" #include "SystemConfig.h" -#include <regex> - class server_commandscript : public CommandScript { public: @@ -296,9 +294,9 @@ public: } private: - static bool ParseExitCode(std::string const& exitCodeStr, int32& exitCode) + static bool ParseExitCode(char const* exitCodeStr, int32& exitCode) { - exitCode = atoi(exitCodeStr.c_str()); + exitCode = atoi(exitCodeStr); // Handle atoi() errors if (exitCode == 0 && (exitCodeStr[0] != '0' || exitCodeStr[1] != '\0')) @@ -319,28 +317,42 @@ private: return false; // #delay [#exit_code] [reason] - std::regex regex("([0-9]+) ([0-9]*) ?(.*)"); - std::cmatch cm; + char* delayStr = strtok((char*)args, " "); + if (!delayStr || !isNumeric(delayStr)) + return false; + + char* exitCodeStr = nullptr; - if (!std::regex_match(args, cm, regex)) + if (strlen(args) > 255) return false; - std::string delayStr = cm[1]; - std::string exitCodeStr = cm[2]; - std::string reason = cm[3]; + char reason[255] = { 0 }; + + while (char* nextToken = strtok(nullptr, " ")) + { + if (isNumeric(nextToken)) + exitCodeStr = nextToken; + else + { + strcat(reason, nextToken); + strcat(reason, " "); + strcat(reason, strtok(nullptr, "\0")); + break; + } + } - int32 delay = atoi(delayStr.c_str()); + int32 delay = atoi(delayStr); // Prevent interpret wrong arg value as 0 secs shutdown time if ((delay == 0 && (delayStr[0] != '0' || delayStr[1] != '\0')) || delay < 0) return false; int32 exitCode = defaultExitCode; - if (exitCodeStr.length() > 0) + if (exitCodeStr) if (!ParseExitCode(exitCodeStr, exitCode)) return false; - sWorld->ShutdownServ(delay, shutdownMask, static_cast<uint8>(exitCode), reason); + sWorld->ShutdownServ(delay, shutdownMask, static_cast<uint8>(exitCode), std::string(reason)); return true; } diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp index 3415451fef5..1927bb94b80 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp @@ -1,6 +1,5 @@ /* * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> - * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -19,7 +18,7 @@ /* ScriptData SDName: Boss_Mother_Shahraz SD%Complete: 80 -SDComment: Saber Lash missing, Fatal Attraction slightly incorrect; need to damage only if affected players are within range of each other +SDComment: Fatal Attraction slightly incorrect; need to damage only if affected players are within range of each other SDCategory: Black Temple EndScriptData */ @@ -27,17 +26,19 @@ EndScriptData */ #include "ScriptedCreature.h" #include "black_temple.h" -enum MotherShahraz +enum Texts { //Speech'n'Sounds - SAY_TAUNT = 0, - SAY_AGGRO = 1, - SAY_SPELL = 2, - SAY_SLAY = 3, - SAY_ENRAGE = 4, - SAY_DEATH = 5, + SAY_TAUNT = 0, + SAY_AGGRO = 1, + SAY_SPELL = 2, + SAY_SLAY = 3, + SAY_ENRAGE = 4, + SAY_DEATH = 5 +}; - //Spells +enum Spells +{ SPELL_BEAM_SINISTER = 40859, SPELL_BEAM_VILE = 40860, SPELL_BEAM_WICKED = 40861, @@ -51,6 +52,26 @@ enum MotherShahraz SPELL_BERSERK = 45078 }; +enum Events +{ + EVENT_RANDOM_BEAM = 1, + EVENT_PRISMATIC_SHIELD, + EVENT_FATAL_ATTRACTION, + EVENT_FATAL_ATTRACTION_EXPLOSION, + EVENT_SABER_SLASH, + EVENT_SILENCING_SHRIEK, + EVENT_RANDOM_TAUNT, + EVENT_BERSERK +}; + +enum Beams +{ + SINISTER_BEAM, + VILE_BEAM, + WICKED_BEAM, + SINFUL_BEAM +}; + uint32 PrismaticAuras[]= { 40880, // Shadow @@ -82,62 +103,41 @@ class boss_mother_shahraz : public CreatureScript public: boss_mother_shahraz() : CreatureScript("boss_mother_shahraz") { } - CreatureAI* GetAI(Creature* creature) const override + struct boss_shahrazAI : public BossAI { - return GetInstanceAI<boss_shahrazAI>(creature); - } - - struct boss_shahrazAI : public ScriptedAI - { - boss_shahrazAI(Creature* creature) : ScriptedAI(creature) + boss_shahrazAI(Creature* creature) : BossAI(creature, DATA_MOTHER_SHAHRAZ) { - instance = creature->GetInstanceScript(); + Initialize(); } - InstanceScript* instance; - - uint64 TargetGUID[3]; - uint32 BeamTimer; - uint32 BeamCount; - uint32 CurrentBeam; - uint32 PrismaticShieldTimer; - uint32 FatalAttractionTimer; - uint32 FatalAttractionExplodeTimer; - uint32 ShriekTimer; - uint32 SaberTimer; - uint32 RandomYellTimer; - uint32 EnrageTimer; - uint32 ExplosionCount; - - bool Enraged; - - void Reset() override + void Initialize() { - instance->SetBossState(DATA_MOTHER_SHAHRAZ, NOT_STARTED); - for (uint8 i = 0; i<3; ++i) TargetGUID[i] = 0; - BeamTimer = 20000; // Timers may be incorrect BeamCount = 0; - CurrentBeam = 0; // 0 - Sinister, 1 - Vile, 2 - Wicked, 3 - Sinful - PrismaticShieldTimer = 0; - FatalAttractionTimer = 60000; - FatalAttractionExplodeTimer = 70000; - ShriekTimer = 30000; - SaberTimer = 35000; - RandomYellTimer = urand(70, 111) * 1000; - EnrageTimer = 600000; + CurrentBeam = SINISTER_BEAM; // 0 - Sinister, 1 - Vile, 2 - Wicked, 3 - Sinful ExplosionCount = 0; - Enraged = false; } - void EnterCombat(Unit* /*who*/) override + void Reset() override { - instance->SetBossState(DATA_MOTHER_SHAHRAZ, IN_PROGRESS); + Initialize(); + _Reset(); + } - DoZoneInCombat(); + void EnterCombat(Unit* /*who*/) override + { + _EnterCombat(); + events.ScheduleEvent(EVENT_RANDOM_BEAM, 20000); // Timers may be incorrect + events.ScheduleEvent(EVENT_FATAL_ATTRACTION, 60000); + events.ScheduleEvent(EVENT_FATAL_ATTRACTION_EXPLOSION, 70000); + events.ScheduleEvent(EVENT_SILENCING_SHRIEK, 30000); + events.ScheduleEvent(EVENT_SABER_SLASH, 35000); + events.ScheduleEvent(EVENT_RANDOM_TAUNT, urand(70000, 111000)); + events.ScheduleEvent(EVENT_PRISMATIC_SHIELD, 1000); + events.ScheduleEvent(EVENT_BERSERK, 600000); Talk(SAY_AGGRO); } @@ -148,152 +148,137 @@ public: void JustDied(Unit* /*killer*/) override { - instance->SetBossState(DATA_MOTHER_SHAHRAZ, DONE); - + _JustDied(); Talk(SAY_DEATH); } void TeleportPlayers() { - uint32 random = rand32() % 7; + uint32 random = urand(0, 7); float X = TeleportPoint[random].x; float Y = TeleportPoint[random].y; float Z = TeleportPoint[random].z; for (uint8 i = 0; i < 3; ++i) { - Unit* unit = SelectTarget(SELECT_TARGET_RANDOM, 1); - if (unit && unit->IsAlive() && (unit->GetTypeId() == TYPEID_PLAYER)) - { - TargetGUID[i] = unit->GetGUID(); - unit->CastSpell(unit, SPELL_TELEPORT_VISUAL, true); - DoTeleportPlayer(unit, X, Y, Z, unit->GetOrientation()); - } + if (Unit* unit = SelectTarget(SELECT_TARGET_RANDOM, 1)) + if (unit->IsAlive() && unit->GetTypeId() == TYPEID_PLAYER) + { + TargetGUID[i] = unit->GetGUID(); + unit->CastSpell(unit, SPELL_TELEPORT_VISUAL, true); + DoTeleportPlayer(unit, X, Y, Z, unit->GetOrientation()); + } } } - void UpdateAI(uint32 diff) override + void DamageTaken(Unit* /*attacker*/, uint32 &damage) override { - if (!UpdateVictim()) - return; - - if (HealthBelowPct(10) && !Enraged) + if (!Enraged && me->HealthBelowPctDamaged(10, damage)) { Enraged = true; DoCast(me, SPELL_ENRAGE, true); Talk(SAY_ENRAGE); } + } - //Randomly cast one beam. - if (BeamTimer <= diff) - { - Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0); - if (!target || !target->IsAlive()) - return; - - BeamTimer = 9000; - - switch (CurrentBeam) - { - case 0: - DoCast(target, SPELL_BEAM_SINISTER); - break; - case 1: - DoCast(target, SPELL_BEAM_VILE); - break; - case 2: - DoCast(target, SPELL_BEAM_WICKED); - break; - case 3: - DoCast(target, SPELL_BEAM_SINFUL); - break; - } - ++BeamCount; - uint32 Beam = CurrentBeam; - if (BeamCount > 3) - while (CurrentBeam == Beam) - CurrentBeam = rand32() % 3; - - } else BeamTimer -= diff; - - // Random Prismatic Shield every 15 seconds. - if (PrismaticShieldTimer <= diff) - { - uint32 random = rand32() % 6; - if (PrismaticAuras[random]) - DoCast(me, PrismaticAuras[random]); - PrismaticShieldTimer = 15000; - } else PrismaticShieldTimer -= diff; - - // Select 3 random targets (can select same target more than once), teleport to a random location then make them cast explosions until they get away from each other. - if (FatalAttractionTimer <= diff) - { - ExplosionCount = 0; - - TeleportPlayers(); - - Talk(SAY_SPELL); - FatalAttractionExplodeTimer = 2000; - FatalAttractionTimer = urand(40, 71) * 1000; - } else FatalAttractionTimer -= diff; - - if (FatalAttractionExplodeTimer <= diff) + void ExecuteEvent(uint32 eventId) override + { + switch (eventId) { - // Just make them explode three times... they're supposed to keep exploding while they are in range, but it'll take too much code. I'll try to think of an efficient way for it later. - if (ExplosionCount < 3) - { - for (uint8 i = 0; i < 3; ++i) + case EVENT_RANDOM_BEAM: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) { - if (TargetGUID[i]) + switch (CurrentBeam) { - if (Unit* unit = ObjectAccessor::GetUnit(*me, TargetGUID[i])) - unit->CastSpell(unit, SPELL_ATTRACTION, true); - TargetGUID[i] = 0; + case SINISTER_BEAM: + DoCast(target, SPELL_BEAM_SINISTER); + break; + case VILE_BEAM: + DoCast(target, SPELL_BEAM_VILE); + break; + case WICKED_BEAM: + DoCast(target, SPELL_BEAM_WICKED); + break; + case SINFUL_BEAM: + DoCast(target, SPELL_BEAM_SINFUL); + break; + default: + break; } + + ++BeamCount; + uint32 Beam = CurrentBeam; + if (BeamCount > 3) + while (CurrentBeam == Beam) + CurrentBeam = urand(0, 3); } - - ++ExplosionCount; - FatalAttractionExplodeTimer = 1000; - } - else - { - FatalAttractionExplodeTimer = FatalAttractionTimer + 2000; + events.ScheduleEvent(EVENT_RANDOM_BEAM, 9000); + break; + case EVENT_PRISMATIC_SHIELD: + // Random Prismatic Shield every 15 seconds. + DoCast(me, PrismaticAuras[urand(0, 6)]); + events.ScheduleEvent(EVENT_PRISMATIC_SHIELD, 15000); + break; + case EVENT_FATAL_ATTRACTION: + // Select 3 random targets (can select same target more than once), teleport to a random location then make them cast explosions until they get away from each other. ExplosionCount = 0; - } - } else FatalAttractionExplodeTimer -= diff; - - if (ShriekTimer <= diff) - { - DoCastVictim(SPELL_SILENCING_SHRIEK); - ShriekTimer = 25000 + rand32() % 10 * 1000; - } else ShriekTimer -= diff; - - if (SaberTimer <= diff) - { - DoCastVictim(SPELL_SABER_LASH); - SaberTimer = 25000 + rand32() % 10 * 1000; - } else SaberTimer -= diff; - - //Enrage - if (!me->HasAura(SPELL_BERSERK)) - { - if (EnrageTimer <= diff) - { + TeleportPlayers(); + Talk(SAY_SPELL); + events.ScheduleEvent(EVENT_FATAL_ATTRACTION_EXPLOSION, 2000); + events.ScheduleEvent(EVENT_FATAL_ATTRACTION, 40000, 71000); + break; + case EVENT_FATAL_ATTRACTION_EXPLOSION: + // Just make them explode three times... they're supposed to keep exploding while they are in range, but it'll take too much code. I'll try to think of an efficient way for it later. + if (ExplosionCount < 3) + { + for (uint8 i = 0; i < 3; ++i) + { + if (TargetGUID[i]) + { + if (Unit* unit = ObjectAccessor::GetUnit(*me, TargetGUID[i])) + unit->CastSpell(unit, SPELL_ATTRACTION, true); + TargetGUID[i] = 0; + } + } + ++ExplosionCount; + } + else + ExplosionCount = 0; + events.ScheduleEvent(EVENT_FATAL_ATTRACTION_EXPLOSION, ExplosionCount < 3 ? 1000 : events.GetTimeUntilEvent(EVENT_FATAL_ATTRACTION) + 2000); + break; + case EVENT_SILENCING_SHRIEK: + DoCastVictim(SPELL_SILENCING_SHRIEK); + events.ScheduleEvent(EVENT_SILENCING_SHRIEK, urand(25000, 35000)); + break; + case EVENT_SABER_SLASH: + DoCastVictim(SPELL_SABER_LASH); + events.ScheduleEvent(EVENT_SABER_SLASH, urand(25000, 35000)); + break; + case EVENT_RANDOM_TAUNT: + Talk(SAY_TAUNT); + events.ScheduleEvent(EVENT_RANDOM_TAUNT, urand(60000, 151000)); + break; + case EVENT_BERSERK: DoCast(me, SPELL_BERSERK); Talk(SAY_ENRAGE); - } else EnrageTimer -= diff; + break; + default: + break; } - - //Random taunts - if (RandomYellTimer <= diff) - { - Talk(SAY_TAUNT); - RandomYellTimer = urand(60, 151) * 1000; - } else RandomYellTimer -= diff; - - DoMeleeAttackIfReady(); } + + private: + uint64 TargetGUID[3]; + uint32 BeamCount; + uint32 CurrentBeam; + uint32 ExplosionCount; + bool Enraged; }; + CreatureAI* GetAI(Creature* creature) const override + { + return GetBlackTempleAI<boss_shahrazAI>(creature); + } + }; void AddSC_boss_mother_shahraz() diff --git a/src/server/scripts/Outland/zone_nagrand.cpp b/src/server/scripts/Outland/zone_nagrand.cpp index f32d2516ee0..a8a99d757e7 100644 --- a/src/server/scripts/Outland/zone_nagrand.cpp +++ b/src/server/scripts/Outland/zone_nagrand.cpp @@ -19,12 +19,11 @@ /* ScriptData SDName: Nagrand SD%Complete: 90 -SDComment: Quest support: 9868, 9874, 10044, 10172, 10085. TextId's unknown for altruis_the_sufferer and greatmother_geyah (npc_text) +SDComment: Quest support: 9868, 9874, 10085. TextId's unknown for altruis_the_sufferer and greatmother_geyah (npc_text) SDCategory: Nagrand EndScriptData */ /* ContentData -npc_greatmother_geyah npc_maghar_captive npc_creditmarker_visit_with_ancestors EndContentData */ @@ -36,114 +35,6 @@ EndContentData */ #include "SpellInfo.h" /*###### -## 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. -class npc_greatmother_geyah : public CreatureScript -{ -public: - npc_greatmother_geyah() : CreatureScript("npc_greatmother_geyah") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF + 1: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SGG1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SGG2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 3: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SGG3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 4: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SGG4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 5: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SGG5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 6: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SGG6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 7: - player->AreaExploredOrEventHappens(10044); - player->CLOSE_GOSSIP_MENU(); - break; - case GOSSIP_ACTION_INFO_DEF + 10: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SGG7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 11: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SGG8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 12: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SGG9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 13: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SGG10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 14: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SGG11, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 15: - player->AreaExploredOrEventHappens(10172); - player->CLOSE_GOSSIP_MENU(); - break; - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(10044) == QUEST_STATUS_INCOMPLETE) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HGG1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - } - else if (player->GetQuestStatus(10172) == QUEST_STATUS_INCOMPLETE) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HGG2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - } - else - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - - return true; - } -}; - -/*##### ## npc_maghar_captive #####*/ @@ -714,7 +605,6 @@ class go_warmaul_prison : public GameObjectScript void AddSC_nagrand() { - new npc_greatmother_geyah(); new npc_maghar_captive(); new npc_creditmarker_visit_with_ancestors(); new npc_corki(); |