feat(Core/DB/Scripts): add creature_text_options engine for data-driven talk conditions (#25188)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Ludwig <sudlud@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,114 @@
|
|||||||
|
-- Reusable option sets for creature text groups
|
||||||
|
CREATE TABLE IF NOT EXISTS `creature_text_option_sets` (
|
||||||
|
`SetID` TINYINT UNSIGNED NOT NULL,
|
||||||
|
`Cooldown` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Group cooldown in ms before it can fire again',
|
||||||
|
`TriggerChance` TINYINT UNSIGNED NOT NULL DEFAULT 100 COMMENT '0-100 pct chance to fire at all',
|
||||||
|
`PlayerOnly` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Only fire if target is a player',
|
||||||
|
`comment` VARCHAR(255) DEFAULT '',
|
||||||
|
PRIMARY KEY (`SetID`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
DELETE FROM `creature_text_option_sets`;
|
||||||
|
INSERT INTO `creature_text_option_sets` (`SetID`, `Cooldown`, `TriggerChance`, `PlayerOnly`, `comment`) VALUES
|
||||||
|
(1, 6000, 100, 0, 'Standard kill yell: 6s cooldown'),
|
||||||
|
(2, 6000, 100, 1, 'Player-only kill yell: 6s cooldown'),
|
||||||
|
(3, 5000, 100, 1, 'Short cooldown player-only kill yell: 5s cooldown'),
|
||||||
|
(4, 0, 30, 0, 'Chance-based: 30% trigger, no cooldown'),
|
||||||
|
(5, 5000, 100, 0, 'Standard kill yell: 5s cooldown'),
|
||||||
|
(6, 0, 25, 1, 'Chance-based: 25% trigger, player-only'),
|
||||||
|
(7, 0, 50, 1, 'Chance-based: 50% trigger, player-only');
|
||||||
|
|
||||||
|
-- Assign option sets to creature text groups
|
||||||
|
CREATE TABLE IF NOT EXISTS `creature_text_options` (
|
||||||
|
`CreatureID` INT UNSIGNED NOT NULL,
|
||||||
|
`GroupID` TINYINT UNSIGNED NOT NULL,
|
||||||
|
`OptionSetID` TINYINT UNSIGNED NOT NULL,
|
||||||
|
PRIMARY KEY (`CreatureID`, `GroupID`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
DELETE FROM `creature_text_options`;
|
||||||
|
INSERT INTO `creature_text_options` (`CreatureID`, `GroupID`, `OptionSetID`) VALUES
|
||||||
|
-- Black Temple
|
||||||
|
(22887, 2, 3), -- High Warlord Najentus SAY_SLAY
|
||||||
|
(22871, 2, 2), -- Teron Gorefiend SAY_SLAY
|
||||||
|
(22917, 1, 1), -- Illidan Stormrage SAY_ILLIDAN_KILL
|
||||||
|
(22947, 3, 1), -- Mother Shahraz SAY_SLAY
|
||||||
|
(22949, 3, 1), -- Gathios the Shatterer SAY_COUNCIL_SLAY
|
||||||
|
(22950, 3, 1), -- High Nethermancer Zerevor SAY_COUNCIL_SLAY
|
||||||
|
(22951, 3, 1), -- Lady Malande SAY_COUNCIL_SLAY
|
||||||
|
(22952, 3, 1), -- Veras Darkshadow SAY_COUNCIL_SLAY
|
||||||
|
|
||||||
|
-- Azjol-Nerub
|
||||||
|
(28684, 1, 1), -- Krik'thir the Gatewatcher SAY_SLAY
|
||||||
|
(29120, 1, 1), -- Anub'arak SAY_SLAY
|
||||||
|
|
||||||
|
-- Drak'Tharon Keep
|
||||||
|
(26631, 1, 1), -- Novos the Summoner SAY_KILL
|
||||||
|
(26632, 1, 1), -- The Prophet Tharon'ja SAY_KILL
|
||||||
|
(26630, 1, 1), -- Trollgore SAY_KILL
|
||||||
|
|
||||||
|
-- Gundrak
|
||||||
|
(29306, 1, 1), -- Gal'darah SAY_SLAY
|
||||||
|
(29305, 1, 1), -- Moorabi SAY_SLAY
|
||||||
|
(29304, 1, 1), -- Slad'ran SAY_SLAY
|
||||||
|
|
||||||
|
-- The Nexus
|
||||||
|
(26723, 1, 1), -- Keristrasza SAY_SLAY
|
||||||
|
(26731, 1, 1), -- Grand Magus Telestra SAY_KILL
|
||||||
|
(26794, 5, 1), -- Ormorok the Tree-Shaper SAY_KILL
|
||||||
|
|
||||||
|
-- Ruby Sanctum
|
||||||
|
(39863, 6, 2), -- Halion SAY_KILL
|
||||||
|
(39751, 2, 1), -- Baltharus the Warborn SAY_KILL
|
||||||
|
(39746, 1, 1), -- General Zarithrian SAY_KILL
|
||||||
|
(39747, 3, 1), -- Saviana Ragefire SAY_KILL
|
||||||
|
|
||||||
|
-- Icecrown Citadel
|
||||||
|
(36597, 10, 3), -- The Lich King SAY_LK_KILL
|
||||||
|
|
||||||
|
-- Naxxramas
|
||||||
|
(16061, 1, 4), -- Instructor Razuvious SAY_SLAY
|
||||||
|
|
||||||
|
-- Karazhan
|
||||||
|
(15687, 2, 3), -- Moroes SAY_KILL
|
||||||
|
|
||||||
|
-- Battle for Mount Hyjal
|
||||||
|
(17888, 0, 2), -- Kazrogal SAY_ONSLAY
|
||||||
|
(17842, 1, 2), -- Azgalor SAY_ONSLAY
|
||||||
|
(17767, 1, 2), -- Rage Winterchill SAY_ONSLAY
|
||||||
|
(17808, 1, 2), -- Anetheron SAY_ONSLAY
|
||||||
|
|
||||||
|
-- Serpentshrine Cavern
|
||||||
|
(21212, 6, 1), -- Lady Vashj SAY_SLAY
|
||||||
|
(21216, 2, 1), -- Hydross the Unstable SAY_CLEAN_SLAY
|
||||||
|
(21216, 5, 1), -- Hydross the Unstable SAY_CORRUPT_SLAY
|
||||||
|
(21214, 5, 1), -- Fathom-Lord Karathress SAY_SLAY
|
||||||
|
(21213, 3, 1), -- Morogrim Tidewalker SAY_SLAY
|
||||||
|
|
||||||
|
-- Gruul's Lair
|
||||||
|
(19044, 3, 5), -- Gruul the Dragonkiller SAY_SLAY
|
||||||
|
(18831, 3, 5), -- High King Maulgar SAY_SLAY
|
||||||
|
|
||||||
|
-- Magtheridon's Lair
|
||||||
|
(17257, 2, 5), -- Magtheridon SAY_SLAY
|
||||||
|
|
||||||
|
-- Tempest Keep: The Eye
|
||||||
|
(19516, 1, 5), -- Void Reaver SAY_SLAY
|
||||||
|
|
||||||
|
-- Black Temple (additional)
|
||||||
|
(22948, 1, 1), -- Gurtogg Bloodboil SAY_SLAY
|
||||||
|
(23418, 2, 1), -- Essence of Suffering SUFF_SAY_SLAY
|
||||||
|
(23419, 1, 1), -- Essence of Desire DESI_SAY_SLAY
|
||||||
|
(23420, 1, 1), -- Essence of Anger ANGER_SAY_SLAY
|
||||||
|
|
||||||
|
-- Molten Core
|
||||||
|
(12018, 2, 6), -- Majordomo Executus SAY_SLAY
|
||||||
|
(11502, 9, 6), -- Ragnaros SAY_KILL
|
||||||
|
|
||||||
|
-- Sunwell Plateau
|
||||||
|
(24882, 6, 7), -- Brutallus YELL_KILL
|
||||||
|
(25038, 1, 7), -- Felmyst YELL_KILL
|
||||||
|
(24850, 1, 7), -- Kalecgos SAY_EVIL_SLAY
|
||||||
|
|
||||||
|
-- Tempest Keep: The Eye (additional)
|
||||||
|
(18805, 2, 7); -- High Astromancer Solarian SAY_KILL
|
||||||
@@ -27,6 +27,7 @@ void WorldDatabaseConnection::DoPrepareStatements()
|
|||||||
PrepareStatement(WORLD_DEL_CRELINKED_RESPAWN, "DELETE FROM linked_respawn WHERE guid = ?", CONNECTION_ASYNC);
|
PrepareStatement(WORLD_DEL_CRELINKED_RESPAWN, "DELETE FROM linked_respawn WHERE guid = ?", CONNECTION_ASYNC);
|
||||||
PrepareStatement(WORLD_REP_CREATURE_LINKED_RESPAWN, "REPLACE INTO linked_respawn (guid, linkedGuid) VALUES (?, ?)", CONNECTION_ASYNC);
|
PrepareStatement(WORLD_REP_CREATURE_LINKED_RESPAWN, "REPLACE INTO linked_respawn (guid, linkedGuid) VALUES (?, ?)", CONNECTION_ASYNC);
|
||||||
PrepareStatement(WORLD_SEL_CREATURE_TEXT, "SELECT CreatureID, GroupID, ID, Text, Type, Language, Probability, Emote, Duration, Sound, BroadcastTextId, TextRange FROM creature_text", CONNECTION_SYNCH);
|
PrepareStatement(WORLD_SEL_CREATURE_TEXT, "SELECT CreatureID, GroupID, ID, Text, Type, Language, Probability, Emote, Duration, Sound, BroadcastTextId, TextRange FROM creature_text", CONNECTION_SYNCH);
|
||||||
|
PrepareStatement(WORLD_SEL_CREATURE_TEXT_OPTIONS, "SELECT o.CreatureID, o.GroupID, s.Cooldown, s.TriggerChance, s.PlayerOnly FROM creature_text_options o JOIN creature_text_option_sets s ON o.OptionSetID = s.SetID", CONNECTION_SYNCH);
|
||||||
PrepareStatement(WORLD_SEL_SMART_SCRIPTS, "SELECT entryorguid, source_type, id, link, event_type, event_phase_mask, event_chance, event_flags, event_param1, event_param2, event_param3, event_param4, event_param5, event_param6, action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, target_type, target_param1, target_param2, target_param3, target_param4, target_x, target_y, target_z, target_o FROM smart_scripts ORDER BY entryorguid, source_type, id, link", CONNECTION_SYNCH);
|
PrepareStatement(WORLD_SEL_SMART_SCRIPTS, "SELECT entryorguid, source_type, id, link, event_type, event_phase_mask, event_chance, event_flags, event_param1, event_param2, event_param3, event_param4, event_param5, event_param6, action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, target_type, target_param1, target_param2, target_param3, target_param4, target_x, target_y, target_z, target_o FROM smart_scripts ORDER BY entryorguid, source_type, id, link", CONNECTION_SYNCH);
|
||||||
PrepareStatement(WORLD_SEL_SMARTAI_WP, "SELECT entry, pointid, position_x, position_y, position_z, orientation, delay FROM waypoints ORDER BY entry, pointid", CONNECTION_SYNCH);
|
PrepareStatement(WORLD_SEL_SMARTAI_WP, "SELECT entry, pointid, position_x, position_y, position_z, orientation, delay FROM waypoints ORDER BY entry, pointid", CONNECTION_SYNCH);
|
||||||
PrepareStatement(WORLD_DEL_GAMEOBJECT, "DELETE FROM gameobject WHERE guid = ?", CONNECTION_ASYNC);
|
PrepareStatement(WORLD_DEL_GAMEOBJECT, "DELETE FROM gameobject WHERE guid = ?", CONNECTION_ASYNC);
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ enum WorldDatabaseStatements : uint32
|
|||||||
WORLD_DEL_CRELINKED_RESPAWN,
|
WORLD_DEL_CRELINKED_RESPAWN,
|
||||||
WORLD_REP_CREATURE_LINKED_RESPAWN,
|
WORLD_REP_CREATURE_LINKED_RESPAWN,
|
||||||
WORLD_SEL_CREATURE_TEXT,
|
WORLD_SEL_CREATURE_TEXT,
|
||||||
|
WORLD_SEL_CREATURE_TEXT_OPTIONS,
|
||||||
WORLD_SEL_SMART_SCRIPTS,
|
WORLD_SEL_SMART_SCRIPTS,
|
||||||
WORLD_SEL_SMARTAI_WP,
|
WORLD_SEL_SMARTAI_WP,
|
||||||
WORLD_DEL_GAMEOBJECT,
|
WORLD_DEL_GAMEOBJECT,
|
||||||
|
|||||||
@@ -3817,6 +3817,21 @@ void Creature::ClearTextRepeatGroup(uint8 textGroup)
|
|||||||
groupItr->second.clear();
|
groupItr->second.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Creature::IsTextOnCooldown(uint8 textGroup) const
|
||||||
|
{
|
||||||
|
auto itr = m_textCooldowns.find(textGroup);
|
||||||
|
if (itr == m_textCooldowns.end())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return GameTime::GetGameTime().count() < itr->second;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Creature::SetTextCooldown(uint8 textGroup, uint32 cooldownMs)
|
||||||
|
{
|
||||||
|
m_textCooldowns[textGroup] =
|
||||||
|
GameTime::GetGameTime().count() + ((cooldownMs + 999) / 1000);
|
||||||
|
}
|
||||||
|
|
||||||
void Creature::SetRespawnTime(uint32 respawn)
|
void Creature::SetRespawnTime(uint32 respawn)
|
||||||
{
|
{
|
||||||
m_respawnTime = respawn ? GameTime::GetGameTime().count() + respawn : 0;
|
m_respawnTime = respawn ? GameTime::GetGameTime().count() + respawn : 0;
|
||||||
|
|||||||
@@ -411,6 +411,9 @@ public:
|
|||||||
void SetTextRepeatId(uint8 textGroup, uint8 id);
|
void SetTextRepeatId(uint8 textGroup, uint8 id);
|
||||||
void ClearTextRepeatGroup(uint8 textGroup);
|
void ClearTextRepeatGroup(uint8 textGroup);
|
||||||
|
|
||||||
|
bool IsTextOnCooldown(uint8 textGroup) const;
|
||||||
|
void SetTextCooldown(uint8 textGroup, uint32 cooldownMs);
|
||||||
|
|
||||||
bool IsFreeToMove();
|
bool IsFreeToMove();
|
||||||
static constexpr uint32 MOVE_CIRCLE_CHECK_INTERVAL = 3000;
|
static constexpr uint32 MOVE_CIRCLE_CHECK_INTERVAL = 3000;
|
||||||
static constexpr uint32 MOVE_BACKWARDS_CHECK_INTERVAL = 2000;
|
static constexpr uint32 MOVE_BACKWARDS_CHECK_INTERVAL = 2000;
|
||||||
@@ -548,6 +551,7 @@ private:
|
|||||||
ObjectGuid _spellFocusTarget; ///> Saved target during spell focus for restoration
|
ObjectGuid _spellFocusTarget; ///> Saved target during spell focus for restoration
|
||||||
|
|
||||||
CreatureTextRepeatGroup m_textRepeat;
|
CreatureTextRepeatGroup m_textRepeat;
|
||||||
|
std::unordered_map<uint8, uint32> m_textCooldowns; // groupID -> expiry time (s)
|
||||||
|
|
||||||
bool _isMissingSwimmingFlagOutOfCombat;
|
bool _isMissingSwimmingFlagOutOfCombat;
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,11 @@
|
|||||||
#include "Chat.h"
|
#include "Chat.h"
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "DatabaseEnv.h"
|
#include "DatabaseEnv.h"
|
||||||
|
#include "GameTime.h"
|
||||||
#include "GridNotifiers.h"
|
#include "GridNotifiers.h"
|
||||||
#include "MiscPackets.h"
|
#include "MiscPackets.h"
|
||||||
#include "ObjectMgr.h"
|
#include "ObjectMgr.h"
|
||||||
|
#include "Random.h"
|
||||||
|
|
||||||
class CreatureTextBuilder
|
class CreatureTextBuilder
|
||||||
{
|
{
|
||||||
@@ -196,6 +198,62 @@ void CreatureTextMgr::LoadCreatureTextLocales()
|
|||||||
LOG_INFO("server.loading", " ");
|
LOG_INFO("server.loading", " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CreatureTextMgr::LoadCreatureTextOptions()
|
||||||
|
{
|
||||||
|
uint32 oldMSTime = getMSTime();
|
||||||
|
|
||||||
|
mTextOptionsMap.clear();
|
||||||
|
|
||||||
|
WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_CREATURE_TEXT_OPTIONS);
|
||||||
|
PreparedQueryResult result = WorldDatabase.Query(stmt);
|
||||||
|
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
LOG_WARN("server.loading", ">> Loaded 0 creature text options. DB table `creature_text_options` is empty.");
|
||||||
|
LOG_INFO("server.loading", " ");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 count = 0;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
Field* fields = result->Fetch();
|
||||||
|
uint32 creatureId = fields[0].Get<uint32>();
|
||||||
|
uint8 groupId = fields[1].Get<uint8>();
|
||||||
|
|
||||||
|
CreatureTextOptions options;
|
||||||
|
options.cooldown = fields[2].Get<uint32>();
|
||||||
|
options.triggerChance = fields[3].Get<uint8>();
|
||||||
|
options.playerOnly = fields[4].Get<bool>();
|
||||||
|
|
||||||
|
if (options.triggerChance > 100)
|
||||||
|
{
|
||||||
|
LOG_ERROR("sql.sql", "CreatureTextMgr: Entry {}, Group {} in table `creature_text_options` has TriggerChance {} > 100. Setting to 100.", creatureId, groupId, options.triggerChance);
|
||||||
|
options.triggerChance = 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
mTextOptionsMap[creatureId][groupId] = options;
|
||||||
|
++count;
|
||||||
|
} while (result->NextRow());
|
||||||
|
|
||||||
|
LOG_INFO("server.loading", ">> Loaded {} Creature Text Options in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||||
|
LOG_INFO("server.loading", " ");
|
||||||
|
}
|
||||||
|
|
||||||
|
CreatureTextOptions const* CreatureTextMgr::GetTextOptions(uint32 entry, uint8 group) const
|
||||||
|
{
|
||||||
|
auto entryItr = mTextOptionsMap.find(entry);
|
||||||
|
if (entryItr == mTextOptionsMap.end())
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
auto groupItr = entryItr->second.find(group);
|
||||||
|
if (groupItr == entryItr->second.end())
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
return &groupItr->second;
|
||||||
|
}
|
||||||
|
|
||||||
uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject const* target /*= nullptr*/, ChatMsg msgType /*= CHAT_MSG_ADDON*/, Language language /*= LANG_ADDON*/, CreatureTextRange range /*= TEXT_RANGE_NORMAL*/, uint32 sound /*= 0*/, TeamId teamId /*= TEAM_NEUTRAL*/, bool gmOnly /*= false*/, Player* srcPlr /*= nullptr*/)
|
uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject const* target /*= nullptr*/, ChatMsg msgType /*= CHAT_MSG_ADDON*/, Language language /*= LANG_ADDON*/, CreatureTextRange range /*= TEXT_RANGE_NORMAL*/, uint32 sound /*= 0*/, TeamId teamId /*= TEAM_NEUTRAL*/, bool gmOnly /*= false*/, Player* srcPlr /*= nullptr*/)
|
||||||
{
|
{
|
||||||
if (!source)
|
if (!source)
|
||||||
@@ -218,6 +276,21 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
CreatureTextGroup const& textGroupContainer = itr->second; //has all texts in the group
|
CreatureTextGroup const& textGroupContainer = itr->second; //has all texts in the group
|
||||||
|
|
||||||
|
// Check creature_text_options for this group
|
||||||
|
CreatureTextOptions const* options = GetTextOptions(source->GetEntry(), textGroup);
|
||||||
|
if (options)
|
||||||
|
{
|
||||||
|
if (options->playerOnly && (!target || !target->IsPlayer()))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (options->triggerChance < 100 && !roll_chance_i(options->triggerChance))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (options->cooldown > 0 && source->IsTextOnCooldown(textGroup))
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
CreatureTextRepeatIds repeatGroup = source->GetTextRepeatGroup(textGroup);//has all textIDs from the group that were already said
|
CreatureTextRepeatIds repeatGroup = source->GetTextRepeatGroup(textGroup);//has all textIDs from the group that were already said
|
||||||
CreatureTextGroup tempGroup;//will use this to talk after sorting repeatGroup
|
CreatureTextGroup tempGroup;//will use this to talk after sorting repeatGroup
|
||||||
|
|
||||||
@@ -265,6 +338,11 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
source->SetTextRepeatId(textGroup, iter->id);
|
source->SetTextRepeatId(textGroup, iter->id);
|
||||||
|
|
||||||
|
// Set cooldown if creature_text_options specifies one
|
||||||
|
if (options && options->cooldown > 0)
|
||||||
|
source->SetTextCooldown(textGroup, options->cooldown);
|
||||||
|
|
||||||
return iter->duration;
|
return iter->duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,10 +71,20 @@ struct CreatureTextId
|
|||||||
uint32 textId;
|
uint32 textId;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct CreatureTextOptions
|
||||||
|
{
|
||||||
|
uint32 cooldown; // ms before this group can fire again
|
||||||
|
uint8 triggerChance; // 0-100 chance to fire at all
|
||||||
|
bool playerOnly; // only fire if target is a player
|
||||||
|
};
|
||||||
|
|
||||||
typedef std::vector<CreatureTextEntry> CreatureTextGroup; // texts in a group
|
typedef std::vector<CreatureTextEntry> CreatureTextGroup; // texts in a group
|
||||||
typedef std::unordered_map<uint8, CreatureTextGroup> CreatureTextHolder; // groups for a creature by groupid
|
typedef std::unordered_map<uint8, CreatureTextGroup> CreatureTextHolder; // groups for a creature by groupid
|
||||||
typedef std::unordered_map<uint32, CreatureTextHolder> CreatureTextMap; // all creatures by entry
|
typedef std::unordered_map<uint32, CreatureTextHolder> CreatureTextMap; // all creatures by entry
|
||||||
|
|
||||||
|
typedef std::unordered_map<uint8, CreatureTextOptions> CreatureTextOptionsMap; // options per group
|
||||||
|
typedef std::unordered_map<uint32, CreatureTextOptionsMap> CreatureTextOptionsContainer; // per creature entry
|
||||||
|
|
||||||
typedef std::map<CreatureTextId, CreatureTextLocale> LocaleCreatureTextMap;
|
typedef std::map<CreatureTextId, CreatureTextLocale> LocaleCreatureTextMap;
|
||||||
|
|
||||||
class CreatureTextMgr
|
class CreatureTextMgr
|
||||||
@@ -87,7 +97,9 @@ public:
|
|||||||
~CreatureTextMgr() { }
|
~CreatureTextMgr() { }
|
||||||
void LoadCreatureTexts();
|
void LoadCreatureTexts();
|
||||||
void LoadCreatureTextLocales();
|
void LoadCreatureTextLocales();
|
||||||
|
void LoadCreatureTextOptions();
|
||||||
CreatureTextMap const& GetTextMap() const { return mTextMap; }
|
CreatureTextMap const& GetTextMap() const { return mTextMap; }
|
||||||
|
CreatureTextOptions const* GetTextOptions(uint32 entry, uint8 group) const;
|
||||||
|
|
||||||
void SendSound(Creature* source, uint32 sound, ChatMsg msgType, WorldObject const* target, CreatureTextRange range, TeamId teamId, bool gmOnly);
|
void SendSound(Creature* source, uint32 sound, ChatMsg msgType, WorldObject const* target, CreatureTextRange range, TeamId teamId, bool gmOnly);
|
||||||
void SendEmote(Unit* source, uint32 emote);
|
void SendEmote(Unit* source, uint32 emote);
|
||||||
@@ -105,6 +117,7 @@ private:
|
|||||||
|
|
||||||
CreatureTextMap mTextMap;
|
CreatureTextMap mTextMap;
|
||||||
LocaleCreatureTextMap mLocaleTextMap;
|
LocaleCreatureTextMap mLocaleTextMap;
|
||||||
|
CreatureTextOptionsContainer mTextOptionsMap;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define sCreatureTextMgr CreatureTextMgr::instance()
|
#define sCreatureTextMgr CreatureTextMgr::instance()
|
||||||
|
|||||||
@@ -869,6 +869,9 @@ void World::SetInitialWorldSettings()
|
|||||||
LOG_INFO("server.loading", "Loading Creature Texts...");
|
LOG_INFO("server.loading", "Loading Creature Texts...");
|
||||||
sCreatureTextMgr->LoadCreatureTexts();
|
sCreatureTextMgr->LoadCreatureTexts();
|
||||||
|
|
||||||
|
LOG_INFO("server.loading", "Loading Creature Text Options...");
|
||||||
|
sCreatureTextMgr->LoadCreatureTextOptions();
|
||||||
|
|
||||||
LOG_INFO("server.loading", "Loading Creature Text Locales...");
|
LOG_INFO("server.loading", "Loading Creature Text Locales...");
|
||||||
sCreatureTextMgr->LoadCreatureTextLocales();
|
sCreatureTextMgr->LoadCreatureTextLocales();
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -219,8 +219,7 @@ struct boss_majordomo : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (roll_chance_i(25) && victim->IsPlayer())
|
Talk(SAY_SLAY, victim);
|
||||||
Talk(SAY_SLAY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustEngagedWith(Unit* /*attacker*/) override
|
void JustEngagedWith(Unit* /*attacker*/) override
|
||||||
|
|||||||
@@ -209,8 +209,7 @@ struct boss_ragnaros : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (roll_chance_i(25) && victim->IsPlayer())
|
Talk(SAY_KILL, victim);
|
||||||
Talk(SAY_KILL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttackStart(Unit* target) override
|
void AttackStart(Unit* target) override
|
||||||
|
|||||||
@@ -117,7 +117,6 @@ struct boss_moroes : public BossAI
|
|||||||
{
|
{
|
||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
DoCastSelf(SPELL_DUAL_WIELD, true);
|
DoCastSelf(SPELL_DUAL_WIELD, true);
|
||||||
_recentlySpoken = false;
|
|
||||||
_vanished = false;
|
_vanished = false;
|
||||||
me->SetImmuneToAll(false);
|
me->SetImmuneToAll(false);
|
||||||
me->SetReactState(REACT_AGGRESSIVE);
|
me->SetReactState(REACT_AGGRESSIVE);
|
||||||
@@ -170,15 +169,7 @@ struct boss_moroes : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken && victim->IsPlayer())
|
Talk(SAY_KILL, victim);
|
||||||
{
|
|
||||||
Talk(SAY_KILL);
|
|
||||||
_recentlySpoken = true;
|
|
||||||
scheduler.Schedule(5s, [this](TaskContext)
|
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer) override
|
void JustDied(Unit* killer) override
|
||||||
@@ -243,7 +234,6 @@ struct boss_moroes : public BossAI
|
|||||||
private:
|
private:
|
||||||
EventMap _events2;
|
EventMap _events2;
|
||||||
uint8 _activeGuests;
|
uint8 _activeGuests;
|
||||||
bool _recentlySpoken;
|
|
||||||
bool _vanished;
|
bool _vanished;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -104,8 +104,7 @@ struct boss_brutallus : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (victim->IsPlayer() && roll_chance_i(50))
|
Talk(YELL_KILL, victim);
|
||||||
Talk(YELL_KILL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer) override
|
void JustDied(Unit* killer) override
|
||||||
|
|||||||
@@ -186,8 +186,7 @@ struct boss_felmyst : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (victim->IsPlayer() && roll_chance_i(50))
|
Talk(YELL_KILL, victim);
|
||||||
Talk(YELL_KILL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
|
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
|
||||||
|
|||||||
@@ -260,8 +260,7 @@ struct boss_kalecgos : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (victim->IsPlayer() && roll_chance_i(50))
|
Talk(SAY_EVIL_SLAY, victim);
|
||||||
Talk(SAY_EVIL_SLAY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -47,10 +47,7 @@ enum Texts
|
|||||||
struct boss_anetheron : public BossAI
|
struct boss_anetheron : public BossAI
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
boss_anetheron(Creature* creature) : BossAI(creature, DATA_ANETHERON)
|
boss_anetheron(Creature* creature) : BossAI(creature, DATA_ANETHERON) { }
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void JustEngagedWith(Unit * who) override
|
void JustEngagedWith(Unit * who) override
|
||||||
{
|
{
|
||||||
@@ -114,16 +111,8 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken && victim->IsPlayer() && me->IsAlive())
|
if (me->IsAlive())
|
||||||
{
|
Talk(SAY_ONSLAY, victim);
|
||||||
Talk(SAY_ONSLAY);
|
|
||||||
_recentlySpoken = true;
|
|
||||||
|
|
||||||
scheduler.Schedule(6s, [this](TaskContext)
|
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit * killer) override
|
void JustDied(Unit * killer) override
|
||||||
@@ -132,8 +121,6 @@ public:
|
|||||||
BossAI::JustDied(killer);
|
BossAI::JustDied(killer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
bool _recentlySpoken;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_anetheron_sleep : public SpellScript
|
class spell_anetheron_sleep : public SpellScript
|
||||||
|
|||||||
@@ -44,10 +44,7 @@ enum Texts
|
|||||||
struct boss_azgalor : public BossAI
|
struct boss_azgalor : public BossAI
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
boss_azgalor(Creature* creature) : BossAI(creature, DATA_AZGALOR)
|
boss_azgalor(Creature* creature) : BossAI(creature, DATA_AZGALOR) { }
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void JustEngagedWith(Unit * who) override
|
void JustEngagedWith(Unit * who) override
|
||||||
{
|
{
|
||||||
@@ -85,18 +82,10 @@ public:
|
|||||||
me->GetMotionMaster()->MoveWaypoint(HORDE_BOSS_PATH, false);
|
me->GetMotionMaster()->MoveWaypoint(HORDE_BOSS_PATH, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit * victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken && victim->IsPlayer() && me->IsAlive())
|
if (me->IsAlive())
|
||||||
{
|
Talk(SAY_ONSLAY, victim);
|
||||||
Talk(SAY_ONSLAY);
|
|
||||||
_recentlySpoken = true;
|
|
||||||
|
|
||||||
scheduler.Schedule(6s, [this](TaskContext)
|
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit * killer) override
|
void JustDied(Unit * killer) override
|
||||||
@@ -111,8 +100,6 @@ public:
|
|||||||
BossAI::JustDied(killer);
|
BossAI::JustDied(killer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
bool _recentlySpoken;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_azgalor_doom : public SpellScript
|
class spell_azgalor_doom : public SpellScript
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ public:
|
|||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
_recentlySpoken = false;
|
|
||||||
_markCounter = 0;
|
_markCounter = 0;
|
||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
}
|
}
|
||||||
@@ -104,18 +103,10 @@ public:
|
|||||||
me->GetMotionMaster()->MoveWaypoint(HORDE_BOSS_PATH, false);
|
me->GetMotionMaster()->MoveWaypoint(HORDE_BOSS_PATH, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit * victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken && victim->IsPlayer() && me->IsAlive())
|
if (me->IsAlive())
|
||||||
{
|
Talk(SAY_ONSLAY, victim);
|
||||||
Talk(SAY_ONSLAY);
|
|
||||||
_recentlySpoken = true;
|
|
||||||
|
|
||||||
scheduler.Schedule(6s, [this](TaskContext)
|
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit * killer) override
|
void JustDied(Unit * killer) override
|
||||||
@@ -125,7 +116,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _recentlySpoken;
|
|
||||||
uint8 _markCounter;
|
uint8 _markCounter;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+3
-16
@@ -47,10 +47,7 @@ enum Misc
|
|||||||
struct boss_rage_winterchill : public BossAI
|
struct boss_rage_winterchill : public BossAI
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
boss_rage_winterchill(Creature* creature) : BossAI(creature, DATA_WINTERCHILL)
|
boss_rage_winterchill(Creature* creature) : BossAI(creature, DATA_WINTERCHILL) { }
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void JustEngagedWith(Unit* who) override
|
void JustEngagedWith(Unit* who) override
|
||||||
{
|
{
|
||||||
@@ -117,16 +114,8 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken && victim->IsPlayer() && me->IsAlive())
|
if (me->IsAlive())
|
||||||
{
|
Talk(SAY_ONSLAY, victim);
|
||||||
Talk(SAY_ONSLAY);
|
|
||||||
_recentlySpoken = true;
|
|
||||||
|
|
||||||
scheduler.Schedule(6s, [this](TaskContext)
|
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer) override
|
void JustDied(Unit* killer) override
|
||||||
@@ -135,8 +124,6 @@ public:
|
|||||||
BossAI::JustDied(killer);
|
BossAI::JustDied(killer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
bool _recentlySpoken;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_boss_rage_winterchill()
|
void AddSC_boss_rage_winterchill()
|
||||||
|
|||||||
@@ -69,8 +69,7 @@ enum Events
|
|||||||
EVENT_SUMMON_GUARDIAN = 8,
|
EVENT_SUMMON_GUARDIAN = 8,
|
||||||
EVENT_SUMMON_VENOMANCER = 9,
|
EVENT_SUMMON_VENOMANCER = 9,
|
||||||
EVENT_SUMMON_DARTER = 10,
|
EVENT_SUMMON_DARTER = 10,
|
||||||
EVENT_SUMMON_ASSASSINS = 11,
|
EVENT_SUMMON_ASSASSINS = 11
|
||||||
EVENT_KILL_TALK = 12
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum CreatureIds
|
enum CreatureIds
|
||||||
@@ -262,11 +261,7 @@ struct boss_anub_arak : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
Talk(SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override
|
void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override
|
||||||
|
|||||||
+1
-11
@@ -58,7 +58,6 @@ public:
|
|||||||
boss_krik_thirAI(Creature* creature) : BossAI(creature, DATA_KRIKTHIR)
|
boss_krik_thirAI(Creature* creature) : BossAI(creature, DATA_KRIKTHIR)
|
||||||
{
|
{
|
||||||
_initTalk = false;
|
_initTalk = false;
|
||||||
_canTalk = true;
|
|
||||||
_minionInCombat = false;
|
_minionInCombat = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,7 +78,6 @@ public:
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
_canTalk = true;
|
|
||||||
_minionInCombat = false;
|
_minionInCombat = false;
|
||||||
_firstCall = true;
|
_firstCall = true;
|
||||||
_minionsEngaged = 0;
|
_minionsEngaged = 0;
|
||||||
@@ -236,14 +234,7 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (_canTalk)
|
Talk(SAY_SLAY);
|
||||||
{
|
|
||||||
_canTalk = false;
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
|
||||||
_canTalk = true;
|
|
||||||
}, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SummonedCreatureDies(Creature* summon, Unit*) override
|
void SummonedCreatureDies(Creature* summon, Unit*) override
|
||||||
@@ -253,7 +244,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
bool _initTalk;
|
bool _initTalk;
|
||||||
bool _canTalk;
|
|
||||||
bool _minionInCombat;
|
bool _minionInCombat;
|
||||||
uint8 _minionsEngaged;
|
uint8 _minionsEngaged;
|
||||||
bool _firstCall;
|
bool _firstCall;
|
||||||
|
|||||||
+1
-6
@@ -66,7 +66,6 @@ enum Events
|
|||||||
EVENT_CHECK_HEALTH1 = 4,
|
EVENT_CHECK_HEALTH1 = 4,
|
||||||
EVENT_CHECK_HEALTH2 = 5,
|
EVENT_CHECK_HEALTH2 = 5,
|
||||||
EVENT_CHECK_HEALTH3 = 6,
|
EVENT_CHECK_HEALTH3 = 6,
|
||||||
EVENT_KILL_TALK = 7,
|
|
||||||
EVENT_SUMMON_CLONE = 8,
|
EVENT_SUMMON_CLONE = 8,
|
||||||
|
|
||||||
EVENT_XERESTRASZA_EVENT_0 = 1,
|
EVENT_XERESTRASZA_EVENT_0 = 1,
|
||||||
@@ -191,11 +190,7 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
Talk(SAY_KILL);
|
||||||
{
|
|
||||||
Talk(SAY_KILL);
|
|
||||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* summon) override
|
void JustSummoned(Creature* summon) override
|
||||||
|
|||||||
+1
-6
@@ -47,7 +47,6 @@ enum Misc
|
|||||||
EVENT_INTIDMDATING_ROAR = 2,
|
EVENT_INTIDMDATING_ROAR = 2,
|
||||||
EVENT_SUMMON_ADDS1 = 3,
|
EVENT_SUMMON_ADDS1 = 3,
|
||||||
EVENT_SUMMON_ADDS2 = 4,
|
EVENT_SUMMON_ADDS2 = 4,
|
||||||
EVENT_KILL_TALK = 5,
|
|
||||||
|
|
||||||
// Onyx Flamecaller
|
// Onyx Flamecaller
|
||||||
EVENT_BLAST_NOVA = 6,
|
EVENT_BLAST_NOVA = 6,
|
||||||
@@ -136,11 +135,7 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
Talk(SAY_KILL);
|
||||||
{
|
|
||||||
Talk(SAY_KILL);
|
|
||||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
void UpdateAI(uint32 diff) override
|
||||||
|
|||||||
@@ -131,7 +131,6 @@ enum Events
|
|||||||
EVENT_FIERY_COMBUSTION = 5,
|
EVENT_FIERY_COMBUSTION = 5,
|
||||||
EVENT_TAIL_LASH = 6,
|
EVENT_TAIL_LASH = 6,
|
||||||
EVENT_CHECK_HEALTH = 7,
|
EVENT_CHECK_HEALTH = 7,
|
||||||
EVENT_KILL_TALK = 8,
|
|
||||||
EVENT_TRIGGER_BERSERK = 9,
|
EVENT_TRIGGER_BERSERK = 9,
|
||||||
EVENT_HALION_VISIBILITY = 10,
|
EVENT_HALION_VISIBILITY = 10,
|
||||||
|
|
||||||
@@ -310,11 +309,7 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (victim->IsPlayer() && !events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
Talk(SAY_KILL, victim);
|
||||||
{
|
|
||||||
Talk(SAY_KILL);
|
|
||||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer) override
|
void JustDied(Unit* killer) override
|
||||||
@@ -477,11 +472,7 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (victim->IsPlayer() && !_events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
Talk(SAY_KILL, victim);
|
||||||
{
|
|
||||||
Talk(SAY_KILL);
|
|
||||||
_events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer) override
|
void JustDied(Unit* killer) override
|
||||||
|
|||||||
@@ -46,8 +46,7 @@ enum Events
|
|||||||
EVENT_CONFLAGRATION = 4,
|
EVENT_CONFLAGRATION = 4,
|
||||||
EVENT_LAND_GROUND = 5,
|
EVENT_LAND_GROUND = 5,
|
||||||
EVENT_AIR_MOVEMENT = 6,
|
EVENT_AIR_MOVEMENT = 6,
|
||||||
EVENT_LAND_BACK = 7,
|
EVENT_LAND_BACK = 7
|
||||||
EVENT_KILL_TALK = 8
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Misc
|
enum Misc
|
||||||
@@ -121,11 +120,7 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
Talk(SAY_KILL);
|
||||||
{
|
|
||||||
Talk(SAY_KILL);
|
|
||||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
void UpdateAI(uint32 diff) override
|
||||||
|
|||||||
@@ -56,8 +56,6 @@ enum Misc
|
|||||||
NPC_CRYSTAL_HANDLER = 26627,
|
NPC_CRYSTAL_HANDLER = 26627,
|
||||||
NPC_SUMMON_CRYSTAL_HANDLER_TARGET = 27583,
|
NPC_SUMMON_CRYSTAL_HANDLER_TARGET = 27583,
|
||||||
|
|
||||||
EVENT_KILL_TALK = 1,
|
|
||||||
|
|
||||||
ROOM_RIGHT = 0,
|
ROOM_RIGHT = 0,
|
||||||
ROOM_LEFT = 1,
|
ROOM_LEFT = 1,
|
||||||
ROOM_STAIRS = 2
|
ROOM_STAIRS = 2
|
||||||
@@ -206,11 +204,7 @@ struct boss_novos : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
Talk(SAY_KILL);
|
||||||
{
|
|
||||||
Talk(SAY_KILL);
|
|
||||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* summon) override
|
void JustSummoned(Creature* summon) override
|
||||||
|
|||||||
@@ -60,8 +60,7 @@ enum Misc
|
|||||||
EVENT_SPELL_LIGHTNING_BREATH = 5,
|
EVENT_SPELL_LIGHTNING_BREATH = 5,
|
||||||
EVENT_SPELL_POISON_CLOUD = 6,
|
EVENT_SPELL_POISON_CLOUD = 6,
|
||||||
EVENT_TURN_FLESH_REAL = 9,
|
EVENT_TURN_FLESH_REAL = 9,
|
||||||
EVENT_TURN_BONES_REAL = 10,
|
EVENT_TURN_BONES_REAL = 10
|
||||||
EVENT_KILL_TALK = 11
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class boss_tharon_ja : public CreatureScript
|
class boss_tharon_ja : public CreatureScript
|
||||||
@@ -106,11 +105,7 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
Talk(SAY_KILL);
|
||||||
{
|
|
||||||
Talk(SAY_KILL);
|
|
||||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoAction(int32 param) override
|
void DoAction(int32 param) override
|
||||||
|
|||||||
@@ -55,8 +55,7 @@ enum Events
|
|||||||
EVENT_SPELL_CRUSH = 2,
|
EVENT_SPELL_CRUSH = 2,
|
||||||
EVENT_SPELL_CONSUME = 3,
|
EVENT_SPELL_CONSUME = 3,
|
||||||
EVENT_SPELL_CORPSE_EXPLODE = 4,
|
EVENT_SPELL_CORPSE_EXPLODE = 4,
|
||||||
EVENT_SPAWN_INVADERS = 5,
|
EVENT_SPAWN_INVADERS = 5
|
||||||
EVENT_KILL_TALK = 6
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class boss_trollgore : public CreatureScript
|
class boss_trollgore : public CreatureScript
|
||||||
@@ -102,11 +101,7 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
Talk(SAY_KILL);
|
||||||
{
|
|
||||||
Talk(SAY_KILL);
|
|
||||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* summon) override
|
void JustSummoned(Creature* summon) override
|
||||||
|
|||||||
@@ -47,11 +47,6 @@ enum Yells
|
|||||||
SAY_IMPALE = 5
|
SAY_IMPALE = 5
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Events
|
|
||||||
{
|
|
||||||
EVENT_KILL_TALK = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
struct boss_gal_darah : public BossAI
|
struct boss_gal_darah : public BossAI
|
||||||
{
|
{
|
||||||
boss_gal_darah(Creature* creature) : BossAI(creature, DATA_GAL_DARAH) { }
|
boss_gal_darah(Creature* creature) : BossAI(creature, DATA_GAL_DARAH) { }
|
||||||
@@ -160,11 +155,7 @@ struct boss_gal_darah : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit*) override
|
void KilledUnit(Unit*) override
|
||||||
{
|
{
|
||||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
Talk(SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ enum Events
|
|||||||
EVENT_NUMBLING_SHOUT = 2,
|
EVENT_NUMBLING_SHOUT = 2,
|
||||||
EVENT_DETERMINED_STAB = 3,
|
EVENT_DETERMINED_STAB = 3,
|
||||||
EVENT_TRANSFORMATION = 4,
|
EVENT_TRANSFORMATION = 4,
|
||||||
EVENT_KILL_TALK = 5,
|
|
||||||
|
|
||||||
EVENT_PHANTOM = 10
|
EVENT_PHANTOM = 10
|
||||||
};
|
};
|
||||||
@@ -125,11 +124,7 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit*) override
|
void KilledUnit(Unit*) override
|
||||||
{
|
{
|
||||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
Talk(SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
void UpdateAI(uint32 diff) override
|
||||||
|
|||||||
@@ -49,9 +49,7 @@ enum Misc
|
|||||||
|
|
||||||
MAX_VIPER = 2,
|
MAX_VIPER = 2,
|
||||||
MAX_CONSTRICTOR = 3,
|
MAX_CONSTRICTOR = 3,
|
||||||
MAX_SUMMONS = 5,
|
MAX_SUMMONS = 5
|
||||||
|
|
||||||
EVENT_KILL_TALK = 1
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const Position SpawnLoc[] =
|
const Position SpawnLoc[] =
|
||||||
@@ -137,11 +135,7 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit*) override
|
void KilledUnit(Unit*) override
|
||||||
{
|
{
|
||||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
Talk(SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -638,7 +638,6 @@ public:
|
|||||||
uint32 _necroticPlagueStack;
|
uint32 _necroticPlagueStack;
|
||||||
uint32 _vileSpiritExplosions;
|
uint32 _vileSpiritExplosions;
|
||||||
uint16 _positionCheckTimer;
|
uint16 _positionCheckTimer;
|
||||||
uint32 _lastTalkTimeKill;
|
|
||||||
uint32 _lastTalkTimeBuff;
|
uint32 _lastTalkTimeBuff;
|
||||||
bool _bFrostmournePhase;
|
bool _bFrostmournePhase;
|
||||||
bool _bFordringMustFallYell;
|
bool _bFordringMustFallYell;
|
||||||
@@ -649,7 +648,6 @@ public:
|
|||||||
_necroticPlagueStack = 0;
|
_necroticPlagueStack = 0;
|
||||||
_vileSpiritExplosions = 0;
|
_vileSpiritExplosions = 0;
|
||||||
_positionCheckTimer = 5000;
|
_positionCheckTimer = 5000;
|
||||||
_lastTalkTimeKill = 0;
|
|
||||||
_lastTalkTimeBuff = 0;
|
_lastTalkTimeBuff = 0;
|
||||||
_bFrostmournePhase = false;
|
_bFrostmournePhase = false;
|
||||||
_bFordringMustFallYell = false;
|
_bFordringMustFallYell = false;
|
||||||
@@ -721,11 +719,8 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (victim->IsPlayer() && !me->IsInEvadeMode() && _phase != PHASE_OUTRO && _lastTalkTimeKill + 5 < GameTime::GetGameTime().count())
|
if (!me->IsInEvadeMode() && _phase != PHASE_OUTRO)
|
||||||
{
|
Talk(SAY_LK_KILL, victim);
|
||||||
_lastTalkTimeKill = GameTime::GetGameTime().count();
|
|
||||||
Talk(SAY_LK_KILL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoAction(int32 action) override
|
void DoAction(int32 action) override
|
||||||
|
|||||||
@@ -205,8 +205,7 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit* who) override
|
void KilledUnit(Unit* who) override
|
||||||
{
|
{
|
||||||
if (roll_chance_i(30))
|
Talk(SAY_SLAY);
|
||||||
Talk(SAY_SLAY);
|
|
||||||
|
|
||||||
if (who->IsPlayer())
|
if (who->IsPlayer())
|
||||||
instance->StorePersistentData(PERSISTENT_DATA_IMMORTAL_FAIL, 1);
|
instance->StorePersistentData(PERSISTENT_DATA_IMMORTAL_FAIL, 1);
|
||||||
|
|||||||
@@ -51,8 +51,7 @@ enum Events
|
|||||||
EVENT_CRYSTAL_CHAINS = 2,
|
EVENT_CRYSTAL_CHAINS = 2,
|
||||||
EVENT_TAIL_SWEEP = 3,
|
EVENT_TAIL_SWEEP = 3,
|
||||||
EVENT_HEALTH_CHECK = 4,
|
EVENT_HEALTH_CHECK = 4,
|
||||||
EVENT_ACHIEVEMENT_CHECK = 5,
|
EVENT_ACHIEVEMENT_CHECK = 5
|
||||||
EVENT_KILL_TALK = 6
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct boss_keristrasza : public BossAI
|
struct boss_keristrasza : public BossAI
|
||||||
@@ -89,11 +88,7 @@ struct boss_keristrasza : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit*) override
|
void KilledUnit(Unit*) override
|
||||||
{
|
{
|
||||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
Talk(SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetData(uint32 type, uint32) override
|
void SetData(uint32 type, uint32) override
|
||||||
|
|||||||
@@ -76,8 +76,7 @@ enum Events
|
|||||||
EVENT_MAGUS_HEALTH2 = 5,
|
EVENT_MAGUS_HEALTH2 = 5,
|
||||||
EVENT_MAGUS_FAIL_ACHIEVEMENT = 6,
|
EVENT_MAGUS_FAIL_ACHIEVEMENT = 6,
|
||||||
EVENT_MAGUS_MERGED = 7,
|
EVENT_MAGUS_MERGED = 7,
|
||||||
EVENT_MAGUS_RELOCATE = 8,
|
EVENT_MAGUS_RELOCATE = 8
|
||||||
EVENT_KILL_TALK = 9
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct boss_magus_telestra : public BossAI
|
struct boss_magus_telestra : public BossAI
|
||||||
@@ -131,11 +130,7 @@ struct boss_magus_telestra : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit*) override
|
void KilledUnit(Unit*) override
|
||||||
{
|
{
|
||||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
Talk(SAY_KILL);
|
||||||
{
|
|
||||||
Talk(SAY_KILL);
|
|
||||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* summon) override
|
void JustSummoned(Creature* summon) override
|
||||||
|
|||||||
@@ -49,8 +49,7 @@ enum Events
|
|||||||
EVENT_ORMOROK_SPELL_REFLECTION = 3,
|
EVENT_ORMOROK_SPELL_REFLECTION = 3,
|
||||||
EVENT_ORMOROK_SUMMON = 4,
|
EVENT_ORMOROK_SUMMON = 4,
|
||||||
EVENT_ORMOROK_HEALTH = 5,
|
EVENT_ORMOROK_HEALTH = 5,
|
||||||
EVENT_ORMOROK_SUMMON_SPIKES = 6,
|
EVENT_ORMOROK_SUMMON_SPIKES = 6
|
||||||
EVENT_KILL_TALK = 7
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Misc
|
enum Misc
|
||||||
@@ -93,11 +92,7 @@ struct boss_ormorok : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
Talk(SAY_KILL);
|
||||||
{
|
|
||||||
Talk(SAY_KILL);
|
|
||||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* summon) override
|
void JustSummoned(Creature* summon) override
|
||||||
|
|||||||
@@ -66,12 +66,11 @@ enum Misc
|
|||||||
|
|
||||||
struct boss_gurtogg_bloodboil : public BossAI
|
struct boss_gurtogg_bloodboil : public BossAI
|
||||||
{
|
{
|
||||||
boss_gurtogg_bloodboil(Creature* creature) : BossAI(creature, DATA_GURTOGG_BLOODBOIL), _recentlySpoken(false) { }
|
boss_gurtogg_bloodboil(Creature* creature) : BossAI(creature, DATA_GURTOGG_BLOODBOIL) { }
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
_recentlySpoken = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustEngagedWith(Unit* who) override
|
void JustEngagedWith(Unit* who) override
|
||||||
@@ -145,13 +144,7 @@ struct boss_gurtogg_bloodboil : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken)
|
Talk(SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
|
||||||
_recentlySpoken = false;
|
|
||||||
}, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* summon) override
|
void JustSummoned(Creature* summon) override
|
||||||
@@ -171,8 +164,6 @@ struct boss_gurtogg_bloodboil : public BossAI
|
|||||||
return me->GetHomePosition().GetExactDist2d(me) > 105.0f;
|
return me->GetHomePosition().GetExactDist2d(me) > 105.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
bool _recentlySpoken;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_gurtogg_bloodboil : public SpellScript
|
class spell_gurtogg_bloodboil : public SpellScript
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ public:
|
|||||||
|
|
||||||
struct boss_illidan_stormrage : public BossAI
|
struct boss_illidan_stormrage : public BossAI
|
||||||
{
|
{
|
||||||
boss_illidan_stormrage(Creature* creature) : BossAI(creature, DATA_ILLIDAN_STORMRAGE), _canTalk(true), _dying(false), _inCutscene(false), beamPosId(0) { }
|
boss_illidan_stormrage(Creature* creature) : BossAI(creature, DATA_ILLIDAN_STORMRAGE), _dying(false), _inCutscene(false), beamPosId(0) { }
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
@@ -204,7 +204,6 @@ struct boss_illidan_stormrage : public BossAI
|
|||||||
me->m_Events.CancelEventGroup(GROUP_BERSERK);
|
me->m_Events.CancelEventGroup(GROUP_BERSERK);
|
||||||
me->m_Events.CancelEventGroup(GROUP_PHASE_FLYING);
|
me->m_Events.CancelEventGroup(GROUP_PHASE_FLYING);
|
||||||
me->m_Events.CancelEventGroup(GROUP_DEMON_FORM);
|
me->m_Events.CancelEventGroup(GROUP_DEMON_FORM);
|
||||||
_canTalk = true;
|
|
||||||
_dying = false;
|
_dying = false;
|
||||||
_inCutscene = false;
|
_inCutscene = false;
|
||||||
beamPosId = urand(0, MAX_EYE_BEAM_POS - 1);
|
beamPosId = urand(0, MAX_EYE_BEAM_POS - 1);
|
||||||
@@ -652,15 +651,7 @@ struct boss_illidan_stormrage : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (_canTalk)
|
Talk(SAY_ILLIDAN_KILL);
|
||||||
{
|
|
||||||
Talk(SAY_ILLIDAN_KILL);
|
|
||||||
_canTalk = false;
|
|
||||||
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
|
||||||
_canTalk = true;
|
|
||||||
}, 6s); // 3590ms
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
|
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
|
||||||
@@ -689,7 +680,6 @@ struct boss_illidan_stormrage : public BossAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _canTalk;
|
|
||||||
bool _dying;
|
bool _dying;
|
||||||
bool _inCutscene;
|
bool _inCutscene;
|
||||||
uint8 beamPosId;
|
uint8 beamPosId;
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ enum Misc
|
|||||||
EVENT_SPELL_VANISH_OUT = 31,
|
EVENT_SPELL_VANISH_OUT = 31,
|
||||||
EVENT_SPELL_ENRAGE = 32,
|
EVENT_SPELL_ENRAGE = 32,
|
||||||
|
|
||||||
EVENT_KILL_TALK = 100
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class VerasEnvenom : public BasicEvent
|
class VerasEnvenom : public BasicEvent
|
||||||
@@ -262,11 +261,7 @@ struct boss_illidari_council_memberAI : public ScriptedAI
|
|||||||
|
|
||||||
void KilledUnit(Unit*) override
|
void KilledUnit(Unit*) override
|
||||||
{
|
{
|
||||||
if (!events.HasTimeUntilEvent(EVENT_KILL_TALK))
|
Talk(SAY_COUNCIL_SLAY);
|
||||||
{
|
|
||||||
Talk(SAY_COUNCIL_SLAY);
|
|
||||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit*) override
|
void JustDied(Unit*) override
|
||||||
|
|||||||
@@ -64,13 +64,12 @@ enum Misc
|
|||||||
|
|
||||||
struct boss_mother_shahraz : public BossAI
|
struct boss_mother_shahraz : public BossAI
|
||||||
{
|
{
|
||||||
boss_mother_shahraz(Creature* creature) : BossAI(creature, DATA_MOTHER_SHAHRAZ), _canTalk(true) { }
|
boss_mother_shahraz(Creature* creature) : BossAI(creature, DATA_MOTHER_SHAHRAZ) { }
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
_Reset();
|
_Reset();
|
||||||
me->m_Events.CancelEventGroup(GROUP_ENRAGE);
|
me->m_Events.CancelEventGroup(GROUP_ENRAGE);
|
||||||
_canTalk = true;
|
|
||||||
|
|
||||||
ScheduleHealthCheckEvent(10, [&] {
|
ScheduleHealthCheckEvent(10, [&] {
|
||||||
Talk(SAY_EMOTE_FRENZY);
|
Talk(SAY_EMOTE_FRENZY);
|
||||||
@@ -113,15 +112,7 @@ struct boss_mother_shahraz : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (_canTalk)
|
Talk(SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
_canTalk = false;
|
|
||||||
|
|
||||||
ScheduleUniqueTimedEvent(6s, [&] {
|
|
||||||
_canTalk = true;
|
|
||||||
}, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer) override
|
void JustDied(Unit* killer) override
|
||||||
@@ -131,8 +122,6 @@ struct boss_mother_shahraz : public BossAI
|
|||||||
Talk(SAY_DEATH);
|
Talk(SAY_DEATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
bool _canTalk;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_mother_shahraz_random_periodic_aura : public AuraScript
|
class spell_mother_shahraz_random_periodic_aura : public AuraScript
|
||||||
|
|||||||
@@ -263,11 +263,10 @@ public:
|
|||||||
|
|
||||||
struct boss_essence_of_sufferingAI : public ScriptedAI
|
struct boss_essence_of_sufferingAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_essence_of_sufferingAI(Creature* creature) : ScriptedAI(creature), _recentlySpoken(false) { }
|
boss_essence_of_sufferingAI(Creature* creature) : ScriptedAI(creature) { }
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
_recentlySpoken = false;
|
|
||||||
scheduler.CancelAll();
|
scheduler.CancelAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -311,13 +310,7 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken)
|
Talk(SUFF_SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(SUFF_SAY_SLAY);
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
|
||||||
_recentlySpoken = false;
|
|
||||||
}, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustEngagedWith(Unit* /*who*/) override
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
@@ -354,8 +347,6 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
bool _recentlySpoken;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -371,11 +362,10 @@ public:
|
|||||||
|
|
||||||
struct boss_essence_of_desireAI : public ScriptedAI
|
struct boss_essence_of_desireAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_essence_of_desireAI(Creature* creature) : ScriptedAI(creature), _recentlySpoken(false) { }
|
boss_essence_of_desireAI(Creature* creature) : ScriptedAI(creature) { }
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
_recentlySpoken = false;
|
|
||||||
scheduler.CancelAll();
|
scheduler.CancelAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -418,13 +408,7 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken)
|
Talk(DESI_SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(DESI_SAY_SLAY);
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
|
||||||
_recentlySpoken = false;
|
|
||||||
}, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustEngagedWith(Unit* /*who*/) override
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
@@ -467,8 +451,6 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
bool _recentlySpoken;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -484,13 +466,12 @@ public:
|
|||||||
|
|
||||||
struct boss_essence_of_angerAI : public ScriptedAI
|
struct boss_essence_of_angerAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_essence_of_angerAI(Creature* creature) : ScriptedAI(creature), _recentlySpoken(false) { }
|
boss_essence_of_angerAI(Creature* creature) : ScriptedAI(creature) { }
|
||||||
|
|
||||||
ObjectGuid targetGUID;
|
ObjectGuid targetGUID;
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
_recentlySpoken = false;
|
|
||||||
targetGUID.Clear();
|
targetGUID.Clear();
|
||||||
scheduler.CancelAll();
|
scheduler.CancelAll();
|
||||||
}
|
}
|
||||||
@@ -507,13 +488,7 @@ public:
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken)
|
Talk(ANGER_SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(ANGER_SAY_SLAY);
|
|
||||||
me->m_Events.AddEventAtOffset([&] {
|
|
||||||
_recentlySpoken = false;
|
|
||||||
}, 6s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* /*killer*/) override
|
void JustDied(Unit* /*killer*/) override
|
||||||
@@ -563,8 +538,6 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
bool _recentlySpoken;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ struct boss_teron_gorefiend : public BossAI
|
|||||||
{
|
{
|
||||||
boss_teron_gorefiend(Creature* creature) : BossAI(creature, DATA_TERON_GOREFIEND)
|
boss_teron_gorefiend(Creature* creature) : BossAI(creature, DATA_TERON_GOREFIEND)
|
||||||
{
|
{
|
||||||
_recentlySpoken = false;
|
|
||||||
_intro = false;
|
_intro = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,18 +126,9 @@ struct boss_teron_gorefiend : public BossAI
|
|||||||
BossAI::JustEngagedWith(who);
|
BossAI::JustEngagedWith(who);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken && victim->IsPlayer())
|
Talk(SAY_SLAY, victim);
|
||||||
{
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
_recentlySpoken = true;
|
|
||||||
|
|
||||||
ScheduleUniqueTimedEvent(6s, [&]
|
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
}, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetData(uint32 type, uint32 id) override
|
void SetData(uint32 type, uint32 id) override
|
||||||
@@ -175,7 +165,6 @@ struct boss_teron_gorefiend : public BossAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _recentlySpoken;
|
|
||||||
bool _intro;
|
bool _intro;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ enum Spells
|
|||||||
|
|
||||||
enum Events
|
enum Events
|
||||||
{
|
{
|
||||||
EVENT_TALK_CHECK = 1,
|
|
||||||
EVENT_ENRAGE = 2
|
EVENT_ENRAGE = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -57,7 +56,7 @@ enum Misc
|
|||||||
|
|
||||||
struct boss_najentus : public BossAI
|
struct boss_najentus : public BossAI
|
||||||
{
|
{
|
||||||
boss_najentus(Creature* creature) : BossAI(creature, DATA_HIGH_WARLORD_NAJENTUS), _canTalk(true) { }
|
boss_najentus(Creature* creature) : BossAI(creature, DATA_HIGH_WARLORD_NAJENTUS) { }
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
@@ -68,8 +67,6 @@ struct boss_najentus : public BossAI
|
|||||||
|
|
||||||
void JustEngagedWith(Unit* who) override
|
void JustEngagedWith(Unit* who) override
|
||||||
{
|
{
|
||||||
_canTalk = true;
|
|
||||||
|
|
||||||
BossAI::JustEngagedWith(who);
|
BossAI::JustEngagedWith(who);
|
||||||
Talk(SAY_AGGRO);
|
Talk(SAY_AGGRO);
|
||||||
DoCastSelf(SPELL_REMOVE_SPINES);
|
DoCastSelf(SPELL_REMOVE_SPINES);
|
||||||
@@ -108,15 +105,7 @@ struct boss_najentus : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (victim->IsPlayer() && _canTalk)
|
Talk(SAY_SLAY, victim);
|
||||||
{
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
_canTalk = false;
|
|
||||||
ScheduleUniqueTimedEvent(5s, [&]
|
|
||||||
{
|
|
||||||
_canTalk = true;
|
|
||||||
}, EVENT_TALK_CHECK);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer) override
|
void JustDied(Unit* killer) override
|
||||||
@@ -126,8 +115,6 @@ struct boss_najentus : public BossAI
|
|||||||
Talk(SAY_DEATH);
|
Talk(SAY_DEATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
bool _canTalk;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_najentus_needle_spine : public SpellScript
|
class spell_najentus_needle_spine : public SpellScript
|
||||||
|
|||||||
+1
-12
@@ -92,7 +92,6 @@ struct boss_fathomlord_karathress : public BossAI
|
|||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
_recentlySpoken = false;
|
|
||||||
|
|
||||||
ScheduleHealthCheckEvent(75, [&]{
|
ScheduleHealthCheckEvent(75, [&]{
|
||||||
instance->DoForAllMinions(DATA_FATHOM_LORD_KARATHRESS, [&](Creature* fathomguard) {
|
instance->DoForAllMinions(DATA_FATHOM_LORD_KARATHRESS, [&](Creature* fathomguard) {
|
||||||
@@ -117,15 +116,7 @@ struct boss_fathomlord_karathress : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken)
|
Talk(SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
_recentlySpoken = true;
|
|
||||||
}
|
|
||||||
scheduler.Schedule(6s, [this](TaskContext)
|
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer) override
|
void JustDied(Unit* killer) override
|
||||||
@@ -182,8 +173,6 @@ struct boss_fathomlord_karathress : public BossAI
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private:
|
|
||||||
bool _recentlySpoken;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LeechingThrowSelector
|
struct LeechingThrowSelector
|
||||||
|
|||||||
+2
-13
@@ -87,12 +87,11 @@ enum WaterElementalPathIds
|
|||||||
|
|
||||||
struct boss_hydross_the_unstable : public BossAI
|
struct boss_hydross_the_unstable : public BossAI
|
||||||
{
|
{
|
||||||
boss_hydross_the_unstable(Creature* creature) : BossAI(creature, DATA_HYDROSS_THE_UNSTABLE), _recentlySpoken(false) { }
|
boss_hydross_the_unstable(Creature* creature) : BossAI(creature, DATA_HYDROSS_THE_UNSTABLE) { }
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
_Reset();
|
_Reset();
|
||||||
_recentlySpoken = false;
|
|
||||||
SummonTaintedElementalOOC();
|
SummonTaintedElementalOOC();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,15 +248,7 @@ struct boss_hydross_the_unstable : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken)
|
Talk(me->HasAura(SPELL_CORRUPTION) ? SAY_CORRUPT_SLAY : SAY_CLEAN_SLAY);
|
||||||
{
|
|
||||||
Talk(me->HasAura(SPELL_CORRUPTION) ? SAY_CORRUPT_SLAY : SAY_CLEAN_SLAY);
|
|
||||||
_recentlySpoken = true;
|
|
||||||
}
|
|
||||||
scheduler.Schedule(6s, [this](TaskContext)
|
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* summon) override
|
void JustSummoned(Creature* summon) override
|
||||||
@@ -291,8 +282,6 @@ struct boss_hydross_the_unstable : public BossAI
|
|||||||
Talk(me->HasAura(SPELL_CORRUPTION) ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH);
|
Talk(me->HasAura(SPELL_CORRUPTION) ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH);
|
||||||
BossAI::JustDied(killer);
|
BossAI::JustDied(killer);
|
||||||
}
|
}
|
||||||
private:
|
|
||||||
bool _recentlySpoken;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_hydross_cleansing_field_aura : public AuraScript
|
class spell_hydross_cleansing_field_aura : public AuraScript
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ struct boss_lady_vashj : public BossAI
|
|||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
_count = 0;
|
_count = 0;
|
||||||
_recentlySpoken = false;
|
|
||||||
_batTimer = 20s;
|
_batTimer = 20s;
|
||||||
_playerAngle = 0.0f;
|
_playerAngle = 0.0f;
|
||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
@@ -94,15 +93,7 @@ struct boss_lady_vashj : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken)
|
Talk(SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
_recentlySpoken = true;
|
|
||||||
}
|
|
||||||
scheduler.Schedule(6s, [this](TaskContext)
|
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer) override
|
void JustDied(Unit* killer) override
|
||||||
@@ -258,7 +249,6 @@ struct boss_lady_vashj : public BossAI
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
float _playerAngle;
|
float _playerAngle;
|
||||||
bool _recentlySpoken;
|
|
||||||
bool _intro;
|
bool _intro;
|
||||||
int32 _count;
|
int32 _count;
|
||||||
std::chrono::seconds _batTimer;
|
std::chrono::seconds _batTimer;
|
||||||
|
|||||||
-3
@@ -83,7 +83,6 @@ struct boss_leotheras_the_blind : public BossAI
|
|||||||
DoCastSelf(SPELL_CLEAR_CONSUMING_MADNESS, true);
|
DoCastSelf(SPELL_CLEAR_CONSUMING_MADNESS, true);
|
||||||
DoCastSelf(SPELL_DUAL_WIELD, true);
|
DoCastSelf(SPELL_DUAL_WIELD, true);
|
||||||
me->SetReactState(REACT_PASSIVE);
|
me->SetReactState(REACT_PASSIVE);
|
||||||
_recentlySpoken = false;
|
|
||||||
|
|
||||||
ScheduleHealthCheckEvent(15, [&]{
|
ScheduleHealthCheckEvent(15, [&]{
|
||||||
me->RemoveAurasDueToSpell(SPELL_WHIRLWIND);
|
me->RemoveAurasDueToSpell(SPELL_WHIRLWIND);
|
||||||
@@ -242,8 +241,6 @@ struct boss_leotheras_the_blind : public BossAI
|
|||||||
me->setAttackTimer(BASE_ATTACK, 2000);
|
me->setAttackTimer(BASE_ATTACK, 2000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private:
|
|
||||||
bool _recentlySpoken;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct npc_inner_demon : public ScriptedAI
|
struct npc_inner_demon : public ScriptedAI
|
||||||
|
|||||||
+2
-14
@@ -60,21 +60,11 @@ struct boss_morogrim_tidewalker : public BossAI
|
|||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
_recentlySpoken = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit*) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken)
|
Talk(SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
_recentlySpoken = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
scheduler.Schedule(6s, [this](TaskContext)
|
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* summon) override
|
void JustSummoned(Creature* summon) override
|
||||||
@@ -131,8 +121,6 @@ struct boss_morogrim_tidewalker : public BossAI
|
|||||||
context.Repeat(45s, 60s);
|
context.Repeat(45s, 60s);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
private:
|
|
||||||
bool _recentlySpoken;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_morogrim_tidewalker_watery_grave : public SpellScript
|
class spell_morogrim_tidewalker_watery_grave : public SpellScript
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ struct boss_gruul : public BossAI
|
|||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
_Reset();
|
_Reset();
|
||||||
_recentlySpoken = false;
|
|
||||||
_caveInTimer = 29s;
|
_caveInTimer = 29s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,18 +118,9 @@ struct boss_gruul : public BossAI
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit* /*who*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken)
|
Talk(SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
_recentlySpoken = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
scheduler.Schedule(5s, [this](TaskContext)
|
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* /*killer*/) override
|
void JustDied(Unit* /*killer*/) override
|
||||||
@@ -154,7 +144,6 @@ struct boss_gruul : public BossAI
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
std::chrono::milliseconds _caveInTimer;
|
std::chrono::milliseconds _caveInTimer;
|
||||||
bool _recentlySpoken;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct npc_invisible_tractor_beam_source : public NullCreatureAI
|
struct npc_invisible_tractor_beam_source : public NullCreatureAI
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ struct boss_high_king_maulgar : public BossAI
|
|||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
_Reset();
|
_Reset();
|
||||||
_recentlySpoken = false;
|
|
||||||
me->SetLootMode(0);
|
me->SetLootMode(0);
|
||||||
ScheduleHealthCheckEvent(50, [&]{
|
ScheduleHealthCheckEvent(50, [&]{
|
||||||
Talk(SAY_ENRAGE);
|
Talk(SAY_ENRAGE);
|
||||||
@@ -87,18 +86,9 @@ struct boss_high_king_maulgar : public BossAI
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken)
|
Talk(SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
_recentlySpoken = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
scheduler.Schedule(5s, [this](TaskContext)
|
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* /*killer*/) override
|
void JustDied(Unit* /*killer*/) override
|
||||||
@@ -158,8 +148,6 @@ struct boss_high_king_maulgar : public BossAI
|
|||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
private:
|
|
||||||
bool _recentlySpoken;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct boss_olm_the_summoner : public ScriptedAI
|
struct boss_olm_the_summoner : public ScriptedAI
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ struct boss_magtheridon : public BossAI
|
|||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
_currentPhase = 0;
|
_currentPhase = 0;
|
||||||
_castingQuake = false;
|
_castingQuake = false;
|
||||||
_recentlySpoken = false;
|
|
||||||
_magReleased = false;
|
_magReleased = false;
|
||||||
_interruptScheduler.CancelAll();
|
_interruptScheduler.CancelAll();
|
||||||
scheduler.Schedule(90s, [this](TaskContext context)
|
scheduler.Schedule(90s, [this](TaskContext context)
|
||||||
@@ -123,16 +122,7 @@ struct boss_magtheridon : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken)
|
Talk(SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
_recentlySpoken = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
scheduler.Schedule(5s, [this](TaskContext /*context*/)
|
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer) override
|
void JustDied(Unit* killer) override
|
||||||
@@ -244,7 +234,6 @@ struct boss_magtheridon : public BossAI
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
bool _castingQuake;
|
bool _castingQuake;
|
||||||
bool _recentlySpoken;
|
|
||||||
bool _magReleased;
|
bool _magReleased;
|
||||||
uint8 _currentPhase;
|
uint8 _currentPhase;
|
||||||
TaskScheduler _interruptScheduler;
|
TaskScheduler _interruptScheduler;
|
||||||
|
|||||||
@@ -104,10 +104,7 @@ struct boss_high_astromancer_solarian : public BossAI
|
|||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
{
|
{
|
||||||
if (victim->IsPlayer() && roll_chance_i(50))
|
Talk(SAY_KILL, victim);
|
||||||
{
|
|
||||||
Talk(SAY_KILL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer) override
|
void JustDied(Unit* killer) override
|
||||||
|
|||||||
@@ -52,20 +52,11 @@ struct boss_void_reaver : public BossAI
|
|||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
_recentlySpoken = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken)
|
Talk(SAY_SLAY);
|
||||||
{
|
|
||||||
Talk(SAY_SLAY);
|
|
||||||
_recentlySpoken = true;
|
|
||||||
scheduler.Schedule(5s, [this](TaskContext)
|
|
||||||
{
|
|
||||||
_recentlySpoken = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer) override
|
void JustDied(Unit* killer) override
|
||||||
@@ -102,8 +93,6 @@ struct boss_void_reaver : public BossAI
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
bool _recentlySpoken;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_boss_void_reaver()
|
void AddSC_boss_void_reaver()
|
||||||
|
|||||||
Reference in New Issue
Block a user