Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-06-22 16:09:16 +08:00
23 changed files with 174 additions and 53 deletions

View File

@@ -0,0 +1,8 @@
-- DB update 2024_06_18_06 -> 2024_06_20_00
--
UPDATE `command` SET `help`='Syntax: .cast #spellid [triggered]\r\n Cast #spellid to selected target. If no target selected cast to self. If \'triggered\' or part provided then spell cast with triggered flag.' WHERE `name`='cast';
UPDATE `command` SET `help`='Syntax: .cast back #spellid [triggered]\r\n Selected target will cast #spellid to your character. If \'triggered\' or part provided then spell cast with triggered flag.' WHERE `name`='cast back';
UPDATE `command` SET `help`='Syntax: .cast dest #spellid #x #y #z [triggered]\r\n Selected target will cast #spellid at provided destination. If \'triggered\' or part provided then spell cast with triggered flag.' WHERE `name`='cast dest';
UPDATE `command` SET `help`='Syntax: .cast dist #spellid [#dist [triggered]]\r\n You will cast spell to point at distance #dist. If \'triggered\' or part provided then spell cast with triggered flag. Not all spells can be cast as area spells.' WHERE `name`='cast dist';
UPDATE `command` SET `help`='Syntax: .cast self #spellid [triggered]\r\n Cast #spellid by target at target itself. If \'triggered\' or part provided then spell cast with triggered flag.' WHERE `name`='cast self';
UPDATE `command` SET `help`='Syntax: .cast target #spellid [triggered]\r\n Selected target will cast #spellid to his victim. If \'triggered\' or part provided then spell cast with triggered flag.' WHERE `name`='cast target';

View File

@@ -0,0 +1,2 @@
-- DB update 2024_06_20_00 -> 2024_06_20_01
DELETE FROM `creature_loot_template` WHERE `Item` IN (32945, 32946) AND `Entry` IN (17895, 17897, 17898, 17899, 17905, 17906, 17907, 17916);

View File

@@ -0,0 +1,7 @@
-- DB update 2024_06_20_01 -> 2024_06_20_02
UPDATE `gameobject_loot_template` SET `Reference` = 13002, `Chance` = 20 WHERE `Entry` = 26862 AND `Reference` = 12901; -- Rare gems, reference currently unused I think
UPDATE `gameobject_loot_template` SET `MaxCount` = 3 WHERE `Entry` = 26862 AND `Item` = 34907; -- Shattered gem fragments
UPDATE `gameobject_loot_template` SET `Chance` = 50 WHERE `Entry` = 26862 AND `Reference` = 12903; -- Epic gems
-- Rare gem reference
UPDATE `reference_loot_template` SET `MaxCount` = 2 WHERE `Entry` = 13002;

View File

@@ -0,0 +1,5 @@
-- DB update 2024_06_20_02 -> 2024_06_20_03
--
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 38528) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 32) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 16) AND (`ConditionValue2` = 0) AND (`ConditionValue3` = 0);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 1, 38528, 0, 0, 32, 0, 16, 0, 0, 0, 0, 0, '', 'Protection of Elune only targets players');

View File

@@ -0,0 +1,3 @@
-- DB update 2024_06_20_03 -> 2024_06_20_04
--
UPDATE `creature_template` SET `flags_extra` = `flags_extra` |256 WHERE `entry` = 23028;

View File

@@ -0,0 +1,3 @@
-- DB update 2024_06_20_04 -> 2024_06_20_05
--
UPDATE `creature_template` SET `flags_extra` = `flags_extra` |256, `mechanic_immune_mask` = `mechanic_immune_mask`|64|256|2048 WHERE `entry` = 22954;

View File

@@ -0,0 +1,21 @@
-- DB update 2024_06_20_05 -> 2024_06_20_06
--
DELETE FROM `creature_text` WHERE `CreatureID` = 15076 AND `ID` = 0;
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(15076, 0, 0, 'The Blood God, the Soulflayer, has been defeated! We are imperiled no longer!', 14, 0, 100, 5, 0, 0, 10612, 1, 'Zandalarian Emissary');
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 15076;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` = 15076;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `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`, `comment`) VALUES
(15076, 0, 0, 1, 38, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Zandalarian Emissary - On Data Set 0 0 - Say Line 0'),
(15076, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 67, 0, 50000, 50000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Zandalarian Emissary - On Data Set 0 0 - Create Timed Event'),
(15076, 0, 2, 0, 59, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 24425, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zandalarian Emissary - On Timed Event 0 Triggered - Cast \'Spirit of Zandalar\'');
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 4) AND (`SourceEntry` = 24425);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 4, 24425, 0, 0, 27, 0, 63, 4, 0, 0, 0, 0, '', 'Spirit of Zandalar - Player must be level 63 or lower');
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 14875) AND (`source_type` = 0) AND (`id` IN (1, 4));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `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`, `comment`) VALUES
(14875, 0, 1, 4, 20, 0, 100, 512, 8183, 0, 0, 0, 0, 0, 53, 0, 14875, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Molthor - On Quest \'The Heart of Hakkar\' Finished - Start Waypoint'),
(14875, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 10, 436, 15076, 0, 0, 0, 0, 0, 0, 'Molthor - On Quest \'The Heart of Hakkar\' Finished - Set Data 0 0');

View File

@@ -0,0 +1,5 @@
-- DB update 2024_06_20_06 -> 2024_06_20_07
--
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 4) AND (`SourceEntry` = 16609);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 4, 16609, 0, 0, 6, 0, 67, 0, 0, 0, 0, 0, '', 'Warchief\'s Blessing - Player must be Horde');

View File

@@ -0,0 +1,10 @@
-- DB update 2024_06_20_07 -> 2024_06_20_08
--
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 10719);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `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`, `comment`) VALUES
(10719, 0, 0, 0, 1, 0, 100, 0, 12000, 12000, 0, 0, 0, 0, 1, 0, 13, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Herald of Thrall - Out of Combat - Say Line 0'),
(10719, 0, 1, 0, 1, 0, 100, 0, 15000, 15000, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Herald of Thrall - Out of Combat - Say Line 1'),
(10719, 0, 2, 0, 1, 0, 100, 0, 19000, 19000, 0, 0, 0, 0, 11, 16609, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Herald of Thrall - Out of Combat - Cast \'Warchief`s Blessing\'');
-- Limit Herald of Thrall shout range to Area
UPDATE `creature_text` SET `TextRange` = 1 WHERE `CreatureID` = 10719;

View File

@@ -0,0 +1,3 @@
-- DB update 2024_06_20_08 -> 2024_06_21_00
UPDATE `creature_template` SET `speed_walk` = 1 WHERE (`entry` = 18104);
UPDATE `creature_template` SET `speed_walk` = 2.8, `speed_run` = 1 WHERE (`entry` = 18095);

View File

@@ -0,0 +1,2 @@
-- DB update 2024_06_21_00 -> 2024_06_21_01
UPDATE `creature_template` SET `speed_run` = 1.14286 WHERE (`entry` = 18104);

View File

@@ -0,0 +1,3 @@
-- DB update 2024_06_21_01 -> 2024_06_21_02
-- add TRIGGER flag to 'Ribbon Pole Fire Spiral Bunny'
UPDATE `creature_template` SET `flags_extra` = (`flags_extra` | 128) WHERE (`entry` = 25303);

View File

@@ -0,0 +1,9 @@
-- DB update 2024_06_21_02 -> 2024_06_22_00
-- Refik
DELETE FROM `gossip_menu` WHERE `MenuID` = 8868 and `TextID` = 10652;
INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES
(8868, 10652);
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 14) AND (`SourceGroup` = 8868) AND (`SourceEntry` = 11551);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(14, 8868, 11551, 0, 0, 7, 0, 197, 200, 0, 0, 0, 0, '', 'Show npctext 11551 for Refik if the player\'s tailoring skill is over 200.');

View File

@@ -0,0 +1,3 @@
-- DB update 2024_06_22_00 -> 2024_06_22_01
-- make Quest 'Apothecary Zamah' failable in any state
UPDATE `quest_template_addon` SET `SpecialFlags` = (`SpecialFlags` | 128) WHERE (`ID` = 853);

View File

@@ -0,0 +1,6 @@
-- DB update 2024_06_22_01 -> 2024_06_22_02
--
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 4) AND (`SourceEntry` = 16609) AND (`ConditionTypeOrReference` IN (27,5));
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 4, 16609, 0, 0, 27, 0, 63, 4, 0, 0, 0, 0, '', 'Warchief\'s Blessing - Player must be level 63 or lower'),
(13, 4, 16609, 0, 0, 5, 0, 528, 240, 0, 0, 0, 0, '', 'Warchief\'s Blessing - Player must be at least Friendly with Orgrimmar');

View File

@@ -887,7 +887,7 @@ void Player::FailQuest(uint32 questId)
{
QuestStatus qStatus = GetQuestStatus(questId);
// xinef: if quest is marked as failed, dont do it again
if ((qStatus != QUEST_STATUS_INCOMPLETE) && (!quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_TIMED)))
if ((qStatus != QUEST_STATUS_INCOMPLETE) && (!quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_CAN_FAIL_IN_ANY_STATE)))
return;
SetQuestStatus(questId, QUEST_STATUS_FAILED);

View File

@@ -108,6 +108,14 @@ bool ChaseMovementGenerator<T>::DoUpdate(T* owner, uint32 time_diff)
mutualChase = true;
}
// Prevent almost infinite spinning for pets with mutualTarget
// _mutualChase is false for previous check
if (angle && !mutualChase && !_mutualChase && mutualTarget && chaseRange < meleeRange && cOwner && cOwner->IsPet())
{
angle = Optional<ChaseAngle>();
mutualChase = true;
}
// periodically check if we're already in the expected range...
i_recheckDistance.Update(time_diff);
if (i_recheckDistance.Passed())

View File

@@ -157,23 +157,25 @@ enum QuestSpecialFlags
{
QUEST_SPECIAL_FLAGS_NONE = 0x000,
// Trinity flags for set SpecialFlags in DB if required but used only at server
QUEST_SPECIAL_FLAGS_REPEATABLE = 0x001, // Set by 1 in SpecialFlags from DB
QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT = 0x002, // Set by 2 in SpecialFlags from DB (if required area explore, spell SPELL_EFFECT_QUEST_COMPLETE casting, table `FECT_QUEST_COMPLETE casting, table `*_script` command SCRIPT_COMMAND_QUEST_EXPLORED use, set from script)
QUEST_SPECIAL_FLAGS_AUTO_ACCEPT = 0x004, // Set by 4 in SpecialFlags in DB if the quest is to be auto-accepted.
QUEST_SPECIAL_FLAGS_DF_QUEST = 0x008, // Set by 8 in SpecialFlags in DB if the quest is used by Dungeon Finder.
QUEST_SPECIAL_FLAGS_MONTHLY = 0x010, // Set by 16 in SpecialFlags in DB if the quest is reset at the begining of the month
QUEST_SPECIAL_FLAGS_CAST = 0x020, // Set by 32 in SpecialFlags in DB if the quest requires RequiredOrNpcGo killcredit but NOT kill (a spell cast)
QUEST_SPECIAL_FLAGS_NO_REP_SPILLOVER = 0x040, // Set by 64 in SpecialFlags in DB if the quest does not share rewarded reputation with other allied factions
QUEST_SPECIAL_FLAGS_REPEATABLE = 0x0001, // Set by 1 in SpecialFlags from DB
QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT = 0x0002, // Set by 2 in SpecialFlags from DB (if required area explore, spell SPELL_EFFECT_QUEST_COMPLETE casting, table `FECT_QUEST_COMPLETE casting, table `*_script` command SCRIPT_COMMAND_QUEST_EXPLORED use, set from script)
QUEST_SPECIAL_FLAGS_AUTO_ACCEPT = 0x0004, // Set by 4 in SpecialFlags in DB if the quest is to be auto-accepted.
QUEST_SPECIAL_FLAGS_DF_QUEST = 0x0008, // Set by 8 in SpecialFlags in DB if the quest is used by Dungeon Finder.
QUEST_SPECIAL_FLAGS_MONTHLY = 0x0010, // Set by 16 in SpecialFlags in DB if the quest is reset at the begining of the month
QUEST_SPECIAL_FLAGS_CAST = 0x0020, // Set by 32 in SpecialFlags in DB if the quest requires RequiredOrNpcGo killcredit but NOT kill (a spell cast)
QUEST_SPECIAL_FLAGS_NO_REP_SPILLOVER = 0x0040, // Set by 64 in SpecialFlags in DB if the quest does not share rewarded reputation with other allied factions
QUEST_SPECIAL_FLAGS_CAN_FAIL_IN_ANY_STATE = 0x0080, // Set by 128 in SpecialFlags in DB if the quest is allowed to fail in Player::FailQuest() independant of its current state
// room for more custom flags
QUEST_SPECIAL_FLAGS_DB_ALLOWED = QUEST_SPECIAL_FLAGS_REPEATABLE | QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT | QUEST_SPECIAL_FLAGS_AUTO_ACCEPT |
QUEST_SPECIAL_FLAGS_DF_QUEST | QUEST_SPECIAL_FLAGS_MONTHLY | QUEST_SPECIAL_FLAGS_CAST | QUEST_SPECIAL_FLAGS_NO_REP_SPILLOVER,
QUEST_SPECIAL_FLAGS_DF_QUEST | QUEST_SPECIAL_FLAGS_MONTHLY | QUEST_SPECIAL_FLAGS_CAST | QUEST_SPECIAL_FLAGS_NO_REP_SPILLOVER |
QUEST_SPECIAL_FLAGS_CAN_FAIL_IN_ANY_STATE,
QUEST_SPECIAL_FLAGS_DELIVER = 0x080, // Internal flag computed only
QUEST_SPECIAL_FLAGS_SPEAKTO = 0x100, // Internal flag computed only
QUEST_SPECIAL_FLAGS_KILL = 0x200, // Internal flag computed only
QUEST_SPECIAL_FLAGS_TIMED = 0x400, // Internal flag computed only
QUEST_SPECIAL_FLAGS_PLAYER_KILL = 0x800 // Internal flag computed only
QUEST_SPECIAL_FLAGS_DELIVER = 0x0100, // Internal flag computed only
QUEST_SPECIAL_FLAGS_SPEAKTO = 0x0200, // Internal flag computed only
QUEST_SPECIAL_FLAGS_KILL = 0x0400, // Internal flag computed only
QUEST_SPECIAL_FLAGS_TIMED = 0x0800, // Internal flag computed only
QUEST_SPECIAL_FLAGS_PLAYER_KILL = 0x1000 // Internal flag computed only
};
struct QuestLocale

View File

@@ -3710,6 +3710,7 @@ void Spell::cancel(bool bySelf)
return;
uint32 oldState = m_spellState;
bool autoRepeat = m_autoRepeat;
m_spellState = SPELL_STATE_FINISHED;
m_autoRepeat = false;
@@ -3724,9 +3725,11 @@ void Spell::cancel(bool bySelf)
}
[[fallthrough]];
case SPELL_STATE_DELAYED:
SendInterrupted(SPELL_FAILED_INTERRUPTED);
SendInterrupted(0);
// xinef: fixes bugged gcd reset in some cases
if (!autoRepeat)
SendCastResult(SPELL_FAILED_INTERRUPTED);
break;
case SPELL_STATE_CASTING:
if (!bySelf)
{

View File

@@ -676,10 +676,10 @@ struct npc_midsummer_ribbon_pole_target : public ScriptedAI
}
// prevent duplicates
if (std::find(_dancerList.begin(), _dancerList.end(), dancer) != _dancerList.end())
if (std::find(_dancerList.begin(), _dancerList.end(), dancer->GetGUID()) != _dancerList.end())
return;
_dancerList.push_back(dancer);
_dancerList.push_back(dancer->GetGUID());
}
void LocateRibbonPole()
@@ -707,10 +707,11 @@ struct npc_midsummer_ribbon_pole_target : public ScriptedAI
return;
// remove non-dancing players from list
std::erase_if(_dancerList, [](Player* dancer)
{
return !dancer->HasAura(SPELL_RIBBON_POLE_PERIODIC_VISUAL);
});
std::erase_if(_dancerList, [this](ObjectGuid dancerGUID)
{
Player* dancer = ObjectAccessor::GetPlayer(*me, dancerGUID);
return !dancer || !dancer->HasAura(SPELL_RIBBON_POLE_PERIODIC_VISUAL);
});
}
void DoFlameCircleChecks()
@@ -788,9 +789,7 @@ struct npc_midsummer_ribbon_pole_target : public ScriptedAI
for (uint8 i = 0; (i < MAX_COUNT_SPEW_LAVA_TARGETS) && (i < _dancerList.size()); i++)
{
Player* dancerTarget = _dancerList[i];
if (dancerTarget)
if (Player* dancerTarget = ObjectAccessor::GetPlayer(*me, _dancerList[i]))
{
Creature* fireSpiralBunny = dancerTarget->SummonCreature(NPC_RIBBON_POLE_FIRE_SPIRAL_BUNNY, dancerTarget->GetPositionX(), dancerTarget->GetPositionY(), dancerTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 10000);
if (fireSpiralBunny)
@@ -823,7 +822,7 @@ struct npc_midsummer_ribbon_pole_target : public ScriptedAI
}
private:
std::vector<Player*> _dancerList;
GuidVector _dancerList;
GameObject* _ribbonPole;
Creature* _bunny;
};

View File

@@ -530,7 +530,7 @@ public:
}
context.Repeat(timerptr[_currentWave]);
if (++_currentWave < maxWaves && _bossWave)
if (++_currentWave < maxWaves && _bossWave != TO_BE_DECIDED)
{
DoUpdateWorldState(WORLD_STATE_WAVES, _currentWave);
DoUpdateWorldState(WORLD_STATE_ENEMY, 1);

View File

@@ -153,6 +153,8 @@ enum ThrallWarchief : uint32
AREA_CAMP_TAURAJO = 378,
AREA_CROSSROADS = 380,
GO_UNADORNED_SPIKE = 175787,
// What the Wind Carries (ID: 6566)
QUEST_WHAT_THE_WIND_CARRIES = 6566,
GOSSIP_MENU_THRALL = 3664,
@@ -246,35 +248,50 @@ public:
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
me->GetMap()->LoadGrid(heraldOfThrallPos.GetPositionX(), heraldOfThrallPos.GetPositionY());
me->SummonCreature(NPC_HERALD_OF_THRALL, heraldOfThrallPos, TEMPSUMMON_TIMED_DESPAWN, 20 * IN_MILLISECONDS);
_scheduler.Schedule(2s, [this](TaskContext /*context*/)
me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
scheduler.Schedule(1s, [this](TaskContext /*context*/)
{
if (GameObject* spike = me->FindNearestGameObject(GO_UNADORNED_SPIKE, 10.0f))
{
Talk(SAY_THRALL_ON_QUEST_REWARD_0);
})
.Schedule(13s, [this](TaskContext /*context*/)
spike->SetGoState(GO_STATE_ACTIVE);
}
}).Schedule(2s, [this](TaskContext /*context*/)
{
Talk(SAY_THRALL_ON_QUEST_REWARD_0);
}).Schedule(9s, [this](TaskContext /*context*/)
{
Talk(SAY_THRALL_ON_QUEST_REWARD_1);
DoCastAOE(SPELL_WARCHIEF_BLESSING, true);
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
me->GetMap()->DoForAllPlayers([&](Player* player)
{
Talk(SAY_THRALL_ON_QUEST_REWARD_1);
})
.Schedule(15s, [this](TaskContext /*context*/)
{
DoCastAOE(SPELL_WARCHIEF_BLESSING, true);
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
me->GetMap()->DoForAllPlayers([&](Player* p)
if (player->IsAlive() && !player->IsGameMaster())
{
if (player->GetAreaId() == AREA_ORGRIMMAR)
{
if (p->IsAlive() && !p->IsGameMaster())
{
if (p->GetAreaId() == AREA_ORGRIMMAR || p->GetAreaId() == AREA_RAZOR_HILL || p->GetAreaId() == AREA_CROSSROADS || p->GetAreaId() == AREA_CAMP_TAURAJO)
{
p->CastSpell(p, SPELL_WARCHIEF_BLESSING, true);
}
}
});
player->CastSpell(player, SPELL_WARCHIEF_BLESSING, true);
}
}
});
}).Schedule(19s, [this](TaskContext /*context*/)
{
me->GetMap()->DoForAllPlayers([&](Player* player)
{
if (player->IsAlive() && !player->IsGameMaster())
{
if (player->GetAreaId() == AREA_CROSSROADS)
{
player->CastSpell(player, SPELL_WARCHIEF_BLESSING, true);
}
}
});
});
}
}
void UpdateAI(uint32 diff) override
{
_scheduler.Update(diff);
scheduler.Update(diff);
if (!UpdateVictim())
return;
@@ -295,9 +312,6 @@ public:
DoMeleeAttackIfReady();
}
protected:
TaskScheduler _scheduler;
};
};

View File

@@ -158,7 +158,9 @@ enum Points
enum Misc
{
MAX_FLAMECALLERS = 3
MAX_FLAMECALLERS = 3,
QUEST_SUMMON_AHUNE = 11691,
ITEM_MAGMA_TOTEM = 34953
};
Position const SummonPositions[] =
@@ -307,8 +309,8 @@ struct npc_frozen_core : public ScriptedAI
if (Creature* ahune = _instance->GetCreature(DATA_AHUNE))
Unit::Kill(me, ahune);
DoCast(SPELL_SUMMON_LOOT_MISSILE);
DoCast(SPELL_MINION_DESPAWNER);
DoCastSelf(SPELL_SUMMON_LOOT_MISSILE, true);
DoCastSelf(SPELL_MINION_DESPAWNER, true);
}
void DoAction(int32 action) override
@@ -662,6 +664,9 @@ struct go_ahune_ice_stone : public GameObjectAI
{
ClearGossipMenuFor(player);
player->DestroyItemCount(ITEM_MAGMA_TOTEM, 1, true, false);
player->AreaExploredOrEventHappens(QUEST_SUMMON_AHUNE); //auto rewarded
if (Creature* ahuneBunny = _instance->GetCreature(DATA_AHUNE_BUNNY))
ahuneBunny->AI()->DoAction(ACTION_START_EVENT);