diff options
Diffstat (limited to 'src')
37 files changed, 243 insertions, 227 deletions
diff --git a/src/server/authserver/authserver.conf.dist b/src/server/authserver/authserver.conf.dist index 437ec221e94..1b10fa4e31d 100644 --- a/src/server/authserver/authserver.conf.dist +++ b/src/server/authserver/authserver.conf.dist @@ -155,6 +155,7 @@ LoginDatabase.WorkerThreads = 1 # 1 - (Enabled) Wrong.Password.Login.Logging = 0 + # ################################################################################################### diff --git a/src/server/database/CMakeLists.txt b/src/server/database/CMakeLists.txt index 2375f18d7b5..19fa0ee0acf 100644 --- a/src/server/database/CMakeLists.txt +++ b/src/server/database/CMakeLists.txt @@ -8,7 +8,9 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -find_package(MySQL REQUIRED) +if (NOT MYSQL_FOUND) + message(SEND_ERROR "MySQL wasn't found on your system but it's required to build the servers!") +endif() if( USE_COREPCH ) include_directories(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/server/database/Updater/DBUpdater.cpp b/src/server/database/Updater/DBUpdater.cpp index ebdd6604fef..d90d71c5594 100644 --- a/src/server/database/Updater/DBUpdater.cpp +++ b/src/server/database/Updater/DBUpdater.cpp @@ -26,6 +26,8 @@ #include <iostream> #include <unordered_map> #include <boost/process.hpp> +#include <boost/iostreams/stream.hpp> +#include <boost/iostreams/copy.hpp> #include <boost/iostreams/device/file_descriptor.hpp> #include <boost/system/system_error.hpp> @@ -33,24 +35,64 @@ using namespace boost::process; using namespace boost::process::initializers; using namespace boost::iostreams; -template<class T> -std::string DBUpdater<T>::GetSourceDirectory() +std::string DBUpdaterUtil::GetMySqlCli() { - std::string const entry = sConfigMgr->GetStringDefault("Updates.SourcePath", ""); - if (!entry.empty()) - return entry; + if (!corrected_path().empty()) + return corrected_path(); else - return GitRevision::GetSourceDirectory(); + { + std::string const entry = sConfigMgr->GetStringDefault("Updates.MySqlCLIPath", ""); + if (!entry.empty()) + return entry; + else + return GitRevision::GetMySQLExecutable(); + } +} + +bool DBUpdaterUtil::CheckExecutable() +{ + boost::filesystem::path exe(GetMySqlCli()); + if (!exists(exe)) + { + exe.clear(); + + try + { + exe = search_path("mysql"); + } + catch (std::runtime_error&) + { + } + + if (!exe.empty() && exists(exe)) + { + // Correct the path to the cli + corrected_path() = absolute(exe).generic_string(); + return true; + } + + TC_LOG_FATAL("sql.updates", "Didn't find executeable mysql binary at \'%s\' or in path, correct the path in the *.conf (\"Updates.MySqlCLIPath\").", + absolute(exe).generic_string().c_str()); + + return false; + } + return true; +} + +std::string& DBUpdaterUtil::corrected_path() +{ + static std::string path; + return path; } template<class T> -std::string DBUpdater<T>::GetMySqlCli() +std::string DBUpdater<T>::GetSourceDirectory() { - std::string const entry = sConfigMgr->GetStringDefault("Updates.MySqlCLIPath", ""); + std::string const entry = sConfigMgr->GetStringDefault("Updates.SourcePath", ""); if (!entry.empty()) return entry; else - return GitRevision::GetMySQLExecutable(); + return GitRevision::GetSourceDirectory(); } // Auth Database @@ -145,36 +187,6 @@ BaseLocation DBUpdater<T>::GetBaseLocationType() } template<class T> -bool DBUpdater<T>::CheckExecutable() -{ - DBUpdater<T>::Path const exe(DBUpdater<T>::GetMySqlCli()); - if (!exists(exe)) - { - // Check for mysql in path - std::vector<std::string> args = {"--version"}; - uint32 ret; - try - { - child c = execute(run_exe("mysql"), set_args(args), throw_on_error(), close_stdout()); - ret = wait_for_exit(c); - } - catch (boost::system::system_error&) - { - ret = EXIT_FAILURE; - } - - if (ret == EXIT_FAILURE) - { - TC_LOG_FATAL("sql.updates", "Didn't find executeable mysql binary at \'%s\', correct the path in the *.conf (\"Updates.MySqlCLIPath\").", - absolute(exe).generic_string().c_str()); - - return false; - } - } - return true; -} - -template<class T> bool DBUpdater<T>::Create(DatabaseWorkerPool<T>& pool) { TC_LOG_INFO("sql.updates", "Database \"%s\" does not exist, do you want to create it? [yes (default) / no]: ", @@ -222,7 +234,7 @@ bool DBUpdater<T>::Create(DatabaseWorkerPool<T>& pool) template<class T> bool DBUpdater<T>::Update(DatabaseWorkerPool<T>& pool) { - if (!DBUpdater<T>::CheckExecutable()) + if (!DBUpdaterUtil::CheckExecutable()) return false; TC_LOG_INFO("sql.updates", "Updating %s database...", DBUpdater<T>::GetTableName().c_str()); @@ -273,7 +285,7 @@ bool DBUpdater<T>::Populate(DatabaseWorkerPool<T>& pool) return true; } - if (!DBUpdater<T>::CheckExecutable()) + if (!DBUpdaterUtil::CheckExecutable()) return false; TC_LOG_INFO("sql.updates", "Database %s is empty, auto populating it...", DBUpdater<T>::GetTableName().c_str()); @@ -346,7 +358,10 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos std::string const& password, std::string const& port_or_socket, std::string const& database, Path const& path) { std::vector<std::string> args; - args.reserve(7); + args.reserve(8); + + // args[0] represents the program name + args.push_back("mysql"); // CLI Client connection info args.push_back("-h" + host); @@ -391,9 +406,29 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos uint32 ret; try { - child c = execute(run_exe(DBUpdater<T>::GetMySqlCli().empty() ? "mysql" : - boost::filesystem::absolute(DBUpdater<T>::GetMySqlCli()).generic_string()), - set_args(args), bind_stdin(source), throw_on_error()); + boost::process::pipe outPipe = create_pipe(); + boost::process::pipe errPipe = create_pipe(); + + child c = execute(run_exe( + boost::filesystem::absolute(DBUpdaterUtil::GetMySqlCli()).generic_string()), + set_args(args), bind_stdin(source), throw_on_error(), + bind_stdout(file_descriptor_sink(outPipe.sink, close_handle)), + bind_stderr(file_descriptor_sink(errPipe.sink, close_handle))); + + file_descriptor_source mysqlOutfd(outPipe.source, close_handle); + file_descriptor_source mysqlErrfd(errPipe.source, close_handle); + + stream<file_descriptor_source> mysqlOutStream(mysqlOutfd); + stream<file_descriptor_source> mysqlErrStream(mysqlErrfd); + + std::stringstream out; + std::stringstream err; + + copy(mysqlOutStream, out); + copy(mysqlErrStream, err); + + TC_LOG_INFO("sql.updates", "%s", out.str().c_str()); + TC_LOG_ERROR("sql.updates", "%s", err.str().c_str()); ret = wait_for_exit(c); } diff --git a/src/server/database/Updater/DBUpdater.h b/src/server/database/Updater/DBUpdater.h index a2b12bed235..c8aa5d69fbc 100644 --- a/src/server/database/Updater/DBUpdater.h +++ b/src/server/database/Updater/DBUpdater.h @@ -54,6 +54,17 @@ struct UpdateResult size_t archived; }; +class DBUpdaterUtil +{ +public: + static std::string GetMySqlCli(); + + static bool CheckExecutable(); + +private: + static std::string& corrected_path(); +}; + template <class T> class DBUpdater { @@ -79,9 +90,6 @@ public: static bool Populate(DatabaseWorkerPool<T>& pool); private: - static std::string GetMySqlCli(); - static bool CheckExecutable(); - static QueryResult Retrieve(DatabaseWorkerPool<T>& pool, std::string const& query); static void Apply(DatabaseWorkerPool<T>& pool, std::string const& query); static void ApplyFile(DatabaseWorkerPool<T>& pool, Path const& path); diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h index 1939c96dac9..c93ed0db008 100644 --- a/src/server/game/AI/CoreAI/UnitAI.h +++ b/src/server/game/AI/CoreAI/UnitAI.h @@ -255,8 +255,8 @@ class UnitAI static void FillAISpellInfo(); virtual void sGossipHello(Player* /*player*/) { } - virtual void sGossipSelect(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/) { } - virtual void sGossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, char const* /*code*/) { } + virtual void sGossipSelect(Player* /*player*/, uint32 /*menuId*/, uint32 /*gossipListId*/) { } + virtual void sGossipSelectCode(Player* /*player*/, uint32 /*menuId*/, uint32 /*gossipListId*/, char const* /*code*/) { } virtual void sQuestAccept(Player* /*player*/, Quest const* /*quest*/) { } virtual void sQuestSelect(Player* /*player*/, Quest const* /*quest*/) { } virtual void sQuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) { } diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 7c507ad59b6..46122697094 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -728,12 +728,12 @@ void SmartAI::sGossipHello(Player* player) GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_HELLO, player); } -void SmartAI::sGossipSelect(Player* player, uint32 sender, uint32 action) +void SmartAI::sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) { - GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_SELECT, player, sender, action); + GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_SELECT, player, menuId, gossipListId); } -void SmartAI::sGossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { } +void SmartAI::sGossipSelectCode(Player* /*player*/, uint32 /*menuId*/, uint32 /*gossipListId*/, const char* /*code*/) { } void SmartAI::sQuestAccept(Player* player, Quest const* quest) { diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index 1e287cd5b9e..ea03a821846 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -175,8 +175,8 @@ class SmartAI : public CreatureAI void SetInvincibilityHpLevel(uint32 level) { mInvincibilityHpLevel = level; } void sGossipHello(Player* player) override; - void sGossipSelect(Player* player, uint32 sender, uint32 action) override; - void sGossipSelectCode(Player* player, uint32 sender, uint32 action, const char* code) override; + void sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override; + void sGossipSelectCode(Player* player, uint32 menuId, uint32 gossipListId, const char* code) override; void sQuestAccept(Player* player, Quest const* quest) override; //void sQuestSelect(Player* player, Quest const* quest) override; void sQuestReward(Player* player, Quest const* quest, uint32 opt) override; diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index 96a4fd42f5e..1809e306a45 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -79,7 +79,7 @@ uint32 AuctionHouseMgr::GetAuctionDeposit(AuctionHouseEntry const* entry, uint32 uint32 MSV = pItem->GetTemplate()->SellPrice; if (MSV <= 0) - return AH_MINIMUM_DEPOSIT; + return AH_MINIMUM_DEPOSIT * sWorld->getRate(RATE_AUCTION_DEPOSIT); float multiplier = CalculatePct(float(entry->depositPercent), 3); uint32 timeHr = (((time / 60) / 60) / 12); @@ -90,8 +90,8 @@ uint32 AuctionHouseMgr::GetAuctionDeposit(AuctionHouseEntry const* entry, uint32 TC_LOG_DEBUG("auctionHouse", "Multiplier: %f", multiplier); TC_LOG_DEBUG("auctionHouse", "Deposit: %u", deposit); - if (deposit < AH_MINIMUM_DEPOSIT) - return AH_MINIMUM_DEPOSIT; + if (deposit < AH_MINIMUM_DEPOSIT * sWorld->getRate(RATE_AUCTION_DEPOSIT)) + return AH_MINIMUM_DEPOSIT * sWorld->getRate(RATE_AUCTION_DEPOSIT); else return deposit; } diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index e4452b84da4..1be3c2454b2 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -7610,6 +7610,20 @@ void Player::DuelComplete(DuelCompleteType type) duel->opponent->SetGuidValue(PLAYER_DUEL_ARBITER, ObjectGuid::Empty); duel->opponent->SetUInt32Value(PLAYER_DUEL_TEAM, 0); + if (sWorld->getBoolConfig(CONFIG_RESET_COOLDOWN_AFTER_DUEL) && + type != DUEL_INTERRUPTED) + { + if (!HasCoolDownBeforeDuel()) + RemoveArenaSpellCooldowns(true); + else + ChatHandler(GetSession()).PSendSysMessage(LANG_COOLDOWN_NOT_RESET_AFTER_DUEL); + + if (!duel->opponent->HasCoolDownBeforeDuel()) + duel->opponent->RemoveArenaSpellCooldowns(true); + else + ChatHandler(duel->opponent->GetSession()).PSendSysMessage(LANG_COOLDOWN_NOT_RESET_AFTER_DUEL); + } + delete duel->opponent->duel; duel->opponent->duel = NULL; delete duel; diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index e798f5d98d7..0c1fdd8f03d 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -27,6 +27,7 @@ #include "PetDefines.h" #include "QuestDef.h" #include "SpellMgr.h" +#include "SpellHistory.h" #include "Unit.h" #include <limits> @@ -284,7 +285,7 @@ struct PvPInfo struct DuelInfo { - DuelInfo() : initiator(NULL), opponent(NULL), startTimer(0), startTime(0), outOfBound(0), isMounted(false) { } + DuelInfo() : initiator(NULL), opponent(NULL), startTimer(0), startTime(0), outOfBound(0), isMounted(false), hasCoolDownBeforeDuel(false) { } Player* initiator; Player* opponent; @@ -292,6 +293,7 @@ struct DuelInfo time_t startTime; time_t outOfBound; bool isMounted; + bool hasCoolDownBeforeDuel; }; struct Areas @@ -1882,7 +1884,7 @@ class Player : public Unit, public GridObject<Player> void UpdateWeaponSkill (WeaponAttackType attType); void UpdateCombatSkills(Unit* victim, WeaponAttackType attType, bool defence); - void SetSkill(uint16 id, uint16 step, uint16 currVal, uint16 maxVal); + void SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal); uint16 GetMaxSkillValue(uint32 skill) const; // max + perm. bonus + temp bonus uint16 GetPureMaxSkillValue(uint32 skill) const; // max uint16 GetSkillValue(uint32 skill) const; // skill value + perm. bonus + temp bonus @@ -1946,6 +1948,9 @@ class Player : public Unit, public GridObject<Player> void SetHonorPoints(uint32 value); void SetArenaPoints(uint32 value); + bool HasCoolDownBeforeDuel() const { return duel->hasCoolDownBeforeDuel; } + void UpdateHasCoolDownBeforeDuel() { duel->hasCoolDownBeforeDuel = GetSpellHistory()->GetArenaCooldownsSize() > 0; } + //End of PvP System void SetDrunkValue(uint8 newDrunkValue, uint32 itemId = 0); diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index 236675a7d29..144805b88b5 100644 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -100,7 +100,6 @@ bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, floa void Transport::CleanupsBeforeDelete(bool finalCleanup /*= true*/) { - HashMapHolder<Transport>::Remove(this); UnloadStaticPassengers(); while (!_passengers.empty()) { diff --git a/src/server/game/Handlers/DuelHandler.cpp b/src/server/game/Handlers/DuelHandler.cpp index 2f39a91afbe..6e8ff5547d7 100644 --- a/src/server/game/Handlers/DuelHandler.cpp +++ b/src/server/game/Handlers/DuelHandler.cpp @@ -43,6 +43,9 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket) TC_LOG_DEBUG("network", "Player 1 is: %u (%s)", player->GetGUID().GetCounter(), player->GetName().c_str()); TC_LOG_DEBUG("network", "Player 2 is: %u (%s)", plTarget->GetGUID().GetCounter(), plTarget->GetName().c_str()); + player->UpdateHasCoolDownBeforeDuel(); + plTarget->UpdateHasCoolDownBeforeDuel(); + time_t now = time(NULL); player->duel->startTimer = now; plTarget->duel->startTimer = now; diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 7acafb3c341..2af77ffdec3 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -405,6 +405,13 @@ void Map::DeleteFromWorld(Player* player) delete player; } +template<> +void Map::DeleteFromWorld(Transport* transport) +{ + ObjectAccessor::RemoveObject(transport); + delete transport; +} + void Map::EnsureGridCreated(const GridCoord &p) { std::lock_guard<std::mutex> lock(_gridLock); diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index a4ba9866064..d374c8c509a 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -1202,6 +1202,8 @@ enum TrinityStrings LANG_BAN_ACCOUNT_YOUPERMBANNEDMESSAGE_WORLD = 11007, LANG_NPCINFO_INHABIT_TYPE = 11008, - LANG_NPCINFO_FLAGS_EXTRA = 11009 + LANG_NPCINFO_FLAGS_EXTRA = 11009, + + LANG_COOLDOWN_NOT_RESET_AFTER_DUEL = 11010 }; #endif diff --git a/src/server/game/Spells/SpellHistory.cpp b/src/server/game/Spells/SpellHistory.cpp index 09e3be690b1..208b4cf7ed9 100644 --- a/src/server/game/Spells/SpellHistory.cpp +++ b/src/server/game/Spells/SpellHistory.cpp @@ -637,6 +637,23 @@ void SpellHistory::BuildCooldownPacket(WorldPacket& data, uint8 flags, PacketCoo } } +uint16 SpellHistory::GetArenaCooldownsSize() +{ + uint16 count = 0; + + for (auto itr = _spellCooldowns.begin(); itr != _spellCooldowns.end();) + { + SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); + + if (spellInfo->RecoveryTime < 10 * MINUTE * IN_MILLISECONDS && + spellInfo->CategoryRecoveryTime < 10 * MINUTE * IN_MILLISECONDS) + ++count; + ++itr; + } + + return count; +} + template void SpellHistory::LoadFromDB<Player>(PreparedQueryResult cooldownsResult); template void SpellHistory::LoadFromDB<Pet>(PreparedQueryResult cooldownsResult); template void SpellHistory::SaveToDB<Player>(SQLTransaction& trans); diff --git a/src/server/game/Spells/SpellHistory.h b/src/server/game/Spells/SpellHistory.h index f1533d57aef..4d0642d644e 100644 --- a/src/server/game/Spells/SpellHistory.h +++ b/src/server/game/Spells/SpellHistory.h @@ -117,6 +117,7 @@ public: void BuildCooldownPacket(WorldPacket& data, uint8 flags, uint32 spellId, uint32 cooldown) const; CooldownStorageType::size_type GetCooldownsSizeForPacket() const { return _spellCooldowns.size(); } + uint16 GetArenaCooldownsSize(); private: Player* GetPlayerOwner() const; diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 2e61aecfb5f..85e79168b71 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1190,6 +1190,7 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_MAX_WHO] = sConfigMgr->GetIntDefault("MaxWhoListReturns", 49); m_bool_configs[CONFIG_START_ALL_SPELLS] = sConfigMgr->GetBoolDefault("PlayerStart.AllSpells", false); m_int_configs[CONFIG_HONOR_AFTER_DUEL] = sConfigMgr->GetIntDefault("HonorPointsAfterDuel", 0); + m_bool_configs[CONFIG_RESET_COOLDOWN_AFTER_DUEL] = sConfigMgr->GetBoolDefault("ResetCoolDownAfterDuel", 0); m_bool_configs[CONFIG_START_ALL_EXPLORED] = sConfigMgr->GetBoolDefault("PlayerStart.MapsExplored", false); m_bool_configs[CONFIG_START_ALL_REP] = sConfigMgr->GetBoolDefault("PlayerStart.AllReputation", false); m_bool_configs[CONFIG_ALWAYS_MAXSKILL] = sConfigMgr->GetBoolDefault("AlwaysMaxWeaponSkill", false); diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index 256b856cf73..1f71975cde2 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -161,6 +161,7 @@ enum WorldBoolConfigs CONFIG_ALLOW_TRACK_BOTH_RESOURCES, CONFIG_CALCULATE_CREATURE_ZONE_AREA_DATA, CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA, + CONFIG_RESET_COOLDOWN_AFTER_DUEL, BOOL_CONFIG_VALUE_COUNT }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp index 51e1bf67f16..a89571e8197 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp @@ -367,9 +367,9 @@ public: } } - void sGossipSelect(Player* player, uint32 sender, uint32 action) override + void sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override { - if (sender == GOSSIP_ID && action == GOSSIP_OPTION_ID) + if (menuId == GOSSIP_ID && gossipListId == GOSSIP_OPTION_ID) { player->CLOSE_GOSSIP_MENU(); Talk(SAY_GAMESBEGIN_1); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp index 636554a0ae4..76ab4736275 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp @@ -221,9 +221,9 @@ public: DoMeleeAttackIfReady(); } - void sGossipSelect(Player* player, uint32 sender, uint32 action) override + void sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override { - if (sender == GOSSIP_ID && action == 0) + if (menuId == GOSSIP_ID && gossipListId == 0) { player->CLOSE_GOSSIP_MENU(); BeginSpeech(player); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index f3c59654295..87945ccf916 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -25,7 +25,6 @@ EndScriptData */ /* ContentData npc_barnes -npc_berthold npc_image_of_medivh EndContentData */ @@ -416,41 +415,6 @@ public: }; /*### -# npc_berthold -####*/ - -#define GOSSIP_ITEM_TELEPORT "Teleport me to the Guardian's Library" - -class npc_berthold : public CreatureScript -{ -public: - npc_berthold() : CreatureScript("npc_berthold") { } - - bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF + 1) - player->CastSpell(player, SPELL_TELEPORT, true); - - player->CLOSE_GOSSIP_MENU(); - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (InstanceScript* instance = creature->GetInstanceScript()) - { - // Check if Shade of Aran event is done - if (instance->GetData(TYPE_ARAN) == DONE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - } - - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - return true; - } -}; - -/*### # npc_image_of_medivh ####*/ @@ -668,6 +632,5 @@ public: void AddSC_karazhan() { new npc_barnes(); - new npc_berthold(); new npc_image_of_medivh(); } diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index b37d505d766..9747d31952b 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -729,13 +729,19 @@ class npc_dark_rider_of_acherus : public CreatureScript ## npc_salanar_the_horseman ######*/ -enum Spells_Salanar +enum SalanarTheHorseman { - SPELL_REALM_OF_SHADOWS = 52693, + GOSSIP_SALANAR_MENU = 9739, + GOSSIP_SALANAR_OPTION = 0, + SALANAR_SAY = 0, + QUEST_INTO_REALM_OF_SHADOWS = 12687, + NPC_DARK_RIDER_OF_ACHERUS = 28654, + NPC_SALANAR_IN_REALM_OF_SHADOWS = 28788, SPELL_EFFECT_STOLEN_HORSE = 52263, SPELL_DELIVER_STOLEN_HORSE = 52264, SPELL_CALL_DARK_RIDER = 52266, - SPELL_EFFECT_OVERTAKE = 52349 + SPELL_EFFECT_OVERTAKE = 52349, + SPELL_REALM_OF_SHADOWS = 52693 }; class npc_salanar_the_horseman : public CreatureScript @@ -743,15 +749,19 @@ class npc_salanar_the_horseman : public CreatureScript public: npc_salanar_the_horseman() : CreatureScript("npc_salanar_the_horseman") { } - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_salanar_the_horsemanAI(creature); - } - struct npc_salanar_the_horsemanAI : public ScriptedAI { npc_salanar_the_horsemanAI(Creature* creature) : ScriptedAI(creature) { } + void sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override + { + if (menuId == GOSSIP_SALANAR_MENU && gossipListId == GOSSIP_SALANAR_OPTION) + { + player->CastSpell(player, SPELL_REALM_OF_SHADOWS, true); + player->PlayerTalkClass->SendCloseGossip(); + } + } + void SpellHit(Unit* caster, const SpellInfo* spell) override { if (spell->Id == SPELL_DELIVER_STOLEN_HORSE) @@ -766,7 +776,7 @@ public: caster->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); caster->setFaction(35); DoCast(caster, SPELL_CALL_DARK_RIDER, true); - if (Creature* Dark_Rider = me->FindNearestCreature(28654, 15)) + if (Creature* Dark_Rider = me->FindNearestCreature(NPC_DARK_RIDER_OF_ACHERUS, 15)) ENSURE_AI(npc_dark_rider_of_acherus::npc_dark_rider_of_acherusAI, Dark_Rider->AI())->InitDespawnHorse(caster); } } @@ -784,10 +794,11 @@ public: { if (Player* player = charmer->ToPlayer()) { - // for quest Into the Realm of Shadows(12687) - if (me->GetEntry() == 28788 && player->GetQuestStatus(12687) == QUEST_STATUS_INCOMPLETE) + // for quest Into the Realm of Shadows(QUEST_INTO_REALM_OF_SHADOWS) + if (me->GetEntry() == NPC_SALANAR_IN_REALM_OF_SHADOWS && player->GetQuestStatus(QUEST_INTO_REALM_OF_SHADOWS) == QUEST_STATUS_INCOMPLETE) { - player->GroupEventHappens(12687, me); + player->GroupEventHappens(QUEST_INTO_REALM_OF_SHADOWS, me); + Talk(SALANAR_SAY); charmer->RemoveAurasDueToSpell(SPELL_EFFECT_OVERTAKE); if (Creature* creature = who->ToCreature()) { @@ -796,14 +807,17 @@ public: } } - if (player->HasAura(SPELL_REALM_OF_SHADOWS)) - player->RemoveAurasDueToSpell(SPELL_REALM_OF_SHADOWS); + player->RemoveAurasDueToSpell(SPELL_REALM_OF_SHADOWS); } } } } }; + CreatureAI* GetAI(Creature* creature) const override + { + return new npc_salanar_the_horsemanAI(creature); + } }; /*###### diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index 3b52e6775b2..1927b0f9829 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -268,9 +268,9 @@ class npc_harrison_jones : public CreatureScript void EnterCombat(Unit* /*who*/) override { } - void sGossipSelect(Player* player, uint32 sender, uint32 action) override + void sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override { - if (me->GetCreatureTemplate()->GossipMenuId == sender && !action) + if (me->GetCreatureTemplate()->GossipMenuId == menuId && !gossipListId) { player->CLOSE_GOSSIP_MENU(); me->SetFacingToObject(player); diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp index 8d9406adee1..ab7509c7a2b 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp @@ -226,7 +226,7 @@ public: } } - void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) override + void sGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override { DoCast(player, SPELL_TELEPORT_DARNASSUS); } diff --git a/src/server/scripts/Kalimdor/zone_azshara.cpp b/src/server/scripts/Kalimdor/zone_azshara.cpp index 6727aa69552..d6aa943123b 100644 --- a/src/server/scripts/Kalimdor/zone_azshara.cpp +++ b/src/server/scripts/Kalimdor/zone_azshara.cpp @@ -345,7 +345,7 @@ public: } } - void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) override + void sGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override { player->CLOSE_GOSSIP_MENU(); me->CastSpell(player, SPELL_GIVE_SOUTHFURY_MOONSTONE, true); diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp index 388834d1eff..52e32d3d37c 100644 --- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp @@ -230,7 +230,7 @@ public: Talk(ATTACK_YELL, who); } - void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) override + void sGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override { player->CLOSE_GOSSIP_MENU(); me->setFaction(FACTION_HOSTILE); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp index 943be27943d..365e0a1588d 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp @@ -203,6 +203,9 @@ enum Misc { DATA_MADE_A_MESS = 45374613, // 4537, 4613 are achievement IDs FACTION_SCOURGE = 974, + + GOSSIP_MENU_MURADIN_BRONZEBEARD = 10934, + GOSSIP_MENU_HIGH_OVERLORD_SAURFANG = 10952 }; enum MovePoints @@ -634,6 +637,15 @@ class npc_high_overlord_saurfang_icc : public CreatureScript _events.Reset(); } + void sGossipSelect(Player* player, uint32 menuId, uint32 /*gossipListId*/) override + { + if (menuId == GOSSIP_MENU_HIGH_OVERLORD_SAURFANG) + { + player->PlayerTalkClass->SendCloseGossip(); + DoAction(ACTION_START_EVENT); + } + } + void DoAction(int32 action) override { switch (action) @@ -798,28 +810,6 @@ class npc_high_overlord_saurfang_icc : public CreatureScript std::list<Creature*> _guardList; }; - bool OnGossipHello(Player* player, Creature* creature) override - { - InstanceScript* instance = creature->GetInstanceScript(); - if (instance && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "We are ready to go, High Overlord. The Lich King must fall!", 631, -ACTION_START_EVENT); - player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID()); - } - - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - player->CLOSE_GOSSIP_MENU(); - if (action == -ACTION_START_EVENT) - creature->AI()->DoAction(ACTION_START_EVENT); - - return true; - } - CreatureAI* GetAI(Creature* creature) const override { return GetIcecrownCitadelAI<npc_high_overlord_saurfangAI>(creature); @@ -843,6 +833,15 @@ class npc_muradin_bronzebeard_icc : public CreatureScript _events.Reset(); } + void sGossipSelect(Player* player, uint32 menuId, uint32 /*gossipListId*/) override + { + if (menuId == GOSSIP_MENU_MURADIN_BRONZEBEARD) + { + player->PlayerTalkClass->SendCloseGossip(); + DoAction(ACTION_START_EVENT); + } + } + void DoAction(int32 action) override { switch (action) @@ -946,28 +945,6 @@ class npc_muradin_bronzebeard_icc : public CreatureScript std::list<Creature*> _guardList; }; - bool OnGossipHello(Player* player, Creature* creature) override - { - InstanceScript* instance = creature->GetInstanceScript(); - if (instance && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE) - { - player->ADD_GOSSIP_ITEM(0, "Let it begin...", 631, -ACTION_START_EVENT + 1); - player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID()); - } - - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - player->CLOSE_GOSSIP_MENU(); - if (action == -ACTION_START_EVENT + 1) - creature->AI()->DoAction(ACTION_START_EVENT); - - return true; - } - CreatureAI* GetAI(Creature* creature) const override { return GetIcecrownCitadelAI<npc_muradin_bronzebeard_iccAI>(creature); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp index 78730b535aa..babd444288f 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp @@ -961,7 +961,7 @@ class npc_high_overlord_saurfang_igb : public CreatureScript } } - void sGossipSelect(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/) override + void sGossipSelect(Player* /*player*/, uint32 /*menuId*/, uint32 /*gossipListId*/) override { me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); me->GetTransport()->EnableMovement(true); @@ -1229,7 +1229,7 @@ class npc_muradin_bronzebeard_igb : public CreatureScript } } - void sGossipSelect(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/) override + void sGossipSelect(Player* /*player*/, uint32 /*menuId*/, uint32 /*gossipListId*/) override { me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); me->GetTransport()->EnableMovement(true); @@ -1394,7 +1394,7 @@ class npc_zafod_boombox : public CreatureScript me->SetReactState(REACT_PASSIVE); } - void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) override + void sGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override { player->AddItem(ITEM_GOBLIN_ROCKET_PACK, 1); player->PlayerTalkClass->SendCloseGossip(); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index 6c512546a24..4fadc0bf8fa 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -1199,9 +1199,9 @@ class npc_tirion_fordring_tft : public CreatureScript SetEquipmentSlots(true); // remove glow on ashbringer } - void sGossipSelect(Player* /*player*/, uint32 sender, uint32 action) override + void sGossipSelect(Player* /*player*/, uint32 menuId, uint32 gossipListId) override { - if (me->GetCreatureTemplate()->GossipMenuId == sender && !action) + if (me->GetCreatureTemplate()->GossipMenuId == menuId && !gossipListId) { _events.SetPhase(PHASE_INTRO); me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp index 59c28cd3a5a..6f07a88536d 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp @@ -1508,9 +1508,9 @@ class npc_observation_ring_keeper : public CreatureScript DoCast(SPELL_KEEPER_ACTIVE); } - void sGossipSelect(Player* player, uint32 sender, uint32 /*action*/) override + void sGossipSelect(Player* player, uint32 menuId, uint32 /*gossipListId*/) override { - if (sender != 10333) + if (menuId != 10333) return; me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); diff --git a/src/server/scripts/Northrend/zone_grizzly_hills.cpp b/src/server/scripts/Northrend/zone_grizzly_hills.cpp index 83fd3859716..54b06260e78 100644 --- a/src/server/scripts/Northrend/zone_grizzly_hills.cpp +++ b/src/server/scripts/Northrend/zone_grizzly_hills.cpp @@ -762,7 +762,7 @@ public: } } - void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) override + void sGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override { DoCast(player, SPELL_SUMMON_ASHWOOD_BRAND); } diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp index 25bf4826000..e86e907b550 100644 --- a/src/server/scripts/Northrend/zone_storm_peaks.cpp +++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp @@ -85,13 +85,13 @@ public: DoMeleeAttackIfReady(); } - void sGossipSelect(Player* player, uint32 sender, uint32 action) override + void sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override { - if (sender == GOSSIP_ID && action == GOSSIP_OPTION_ID) + if (menuId == GOSSIP_ID && gossipListId == GOSSIP_OPTION_ID) { player->CLOSE_GOSSIP_MENU(); me->setFaction(113); - npc_escortAI::Start(true, true, player->GetGUID()); + Start(true, true, player->GetGUID()); } } }; @@ -476,7 +476,7 @@ public: objectCounter = 0; } - void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) override + void sGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override { player->CLOSE_GOSSIP_MENU(); playerGUID = player->GetGUID(); diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp index 91c796a6e69..e36930f5745 100644 --- a/src/server/scripts/Northrend/zone_zuldrak.cpp +++ b/src/server/scripts/Northrend/zone_zuldrak.cpp @@ -267,7 +267,7 @@ public: return; } - void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) override + void sGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override { _events.ScheduleEvent(EVENT_RECRUIT_1, 100); player->CLOSE_GOSSIP_MENU(); @@ -552,7 +552,7 @@ public: } } - void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) override + void sGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override { player->CLOSE_GOSSIP_MENU(); DoCast(player, SPELL_ALCHEMIST_APPRENTICE_INVISBUFF); diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.cpp b/src/server/scripts/Outland/BlackTemple/black_temple.cpp index 764cd9594ea..f044fcef5c7 100644 --- a/src/server/scripts/Outland/BlackTemple/black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/black_temple.cpp @@ -15,22 +15,12 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* -Name: Black_Temple -Complete: 100% -Comment: Spirit of Olum: Player Teleporter to Seer Kanai Teleport after defeating Naj'entus and Supremus. -*/ - #include "ScriptMgr.h" #include "ScriptedCreature.h" -#include "ScriptedGossip.h" #include "black_temple.h" -#include "Player.h" enum Spells { - // Spirit of Olum - SPELL_TELEPORT = 41566, // Wrathbone Flayer SPELL_CLEAVE = 15496, SPELL_IGNORED = 39544, @@ -53,36 +43,6 @@ enum Events }; // ######################################################## -// Spirit of Olum -// ######################################################## - -class npc_spirit_of_olum : public CreatureScript -{ -public: - npc_spirit_of_olum() : CreatureScript("npc_spirit_of_olum") { } - - struct npc_spirit_of_olumAI : public ScriptedAI - { - npc_spirit_of_olumAI(Creature* creature) : ScriptedAI(creature) { } - - void sGossipSelect(Player* player, uint32 /*sender*/, uint32 action) override - { - if (action == 1) - { - player->CLOSE_GOSSIP_MENU(); - player->InterruptNonMeleeSpells(false); - player->CastSpell(player, SPELL_TELEPORT, false); - } - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_spirit_of_olumAI(creature); - } -}; - -// ######################################################## // Wrathbone Flayer // ######################################################## @@ -123,7 +83,6 @@ public: void UpdateAI(uint32 diff) override { - if (!_enteredCombat) { _events.Update(diff); @@ -215,12 +174,11 @@ public: CreatureAI* GetAI(Creature* creature) const override { - return GetInstanceAI<npc_wrathbone_flayerAI>(creature); + return GetBlackTempleAI<npc_wrathbone_flayerAI>(creature); } }; void AddSC_black_temple() { - new npc_spirit_of_olum(); new npc_wrathbone_flayer(); } diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 7cc460d4548..f8c031f69e7 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -1779,7 +1779,7 @@ public: DoMeleeAttackIfReady(); } - void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) override + void sGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override { player->CLOSE_GOSSIP_MENU(); EnterPhase(PHASE_CHANNEL); diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp index e4369f0348d..25ff1bf9536 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp @@ -519,9 +519,9 @@ public: DoMeleeAttackIfReady(); } - void sGossipSelect(Player* player, uint32 /*sender*/, uint32 action) override + void sGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override { - if (action == 0) + if (gossipListId == 0) { player->CLOSE_GOSSIP_MENU(); StartChannel = true; diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index b4a7e7a4864..1689f05966a 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -2605,6 +2605,14 @@ PlayerStart.MapsExplored = 0 HonorPointsAfterDuel = 0 # +# ResetCoolDownAfterDuel +# Description: Reset all cooldowns after duel, but only if player has no cooldowns before the duel. +# Default: 0 - (Disabled) +# 1 - (Enabled) + +ResetCoolDownAfterDuel = 0 + +# # AlwaysMaxWeaponSkill # Description: Players will automatically gain max weapon/defense skill when logging in, # or leveling. |