mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-11-10 20:34:53 +08:00
Merge branch 'master' into Vmaps
This commit is contained in:
commit
a94e5bc69c
3
data/sql/updates/db_world/2025_11_01_00.sql
Normal file
3
data/sql/updates/db_world/2025_11_01_00.sql
Normal file
@ -0,0 +1,3 @@
|
||||
-- DB update 2025_10_31_02 -> 2025_11_01_00
|
||||
--
|
||||
UPDATE `creature` SET `position_x` = 1262.0, `position_y` = -26.9, `position_z` = 33.5 WHERE `guid` = 126981;
|
||||
3
data/sql/updates/db_world/2025_11_01_01.sql
Normal file
3
data/sql/updates/db_world/2025_11_01_01.sql
Normal file
@ -0,0 +1,3 @@
|
||||
-- DB update 2025_11_01_00 -> 2025_11_01_01
|
||||
-- GO_TRIBUNAL_ACCESS_DOOR
|
||||
UPDATE `gameobject` SET `state` = 0 WHERE `id` = 191295 AND `map` = 599;
|
||||
15
data/sql/updates/db_world/2025_11_01_02.sql
Normal file
15
data/sql/updates/db_world/2025_11_01_02.sql
Normal file
@ -0,0 +1,15 @@
|
||||
-- DB update 2025_11_01_01 -> 2025_11_01_02
|
||||
|
||||
-- Spelldifficulty
|
||||
DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (50378);
|
||||
INSERT INTO `spelldifficulty_dbc` (`ID`,`DifficultySpellID_1`,`DifficultySpellID_2`,`DifficultySpellID_3`,`DifficultySpellID_4`) VALUES
|
||||
(50378, 50378, 59017, 0, 0);
|
||||
|
||||
-- Scourge Reanimator (unholy frenzy on self / update client)
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26626;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26626);
|
||||
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
|
||||
(26626, 0, 0, 0, 0, 0, 100, 0, 2000, 5000, 6000, 8000, 0, 0, 11, 50378, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scourge Reanimator - In Combat - Cast \'Frostbolt\''),
|
||||
(26626, 0, 1, 0, 0, 0, 100, 0, 7000, 10000, 15000, 15000, 0, 0, 11, 50379, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scourge Reanimator - In Combat - Cast \'Cripple\''),
|
||||
(26626, 0, 2, 0, 0, 0, 100, 0, 2000, 10000, 18000, 24000, 0, 0, 11, 49805, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scourge Reanimator - In Combat - Cast \'Unholy Frenzy\'');
|
||||
7
data/sql/updates/db_world/2025_11_01_03.sql
Normal file
7
data/sql/updates/db_world/2025_11_01_03.sql
Normal file
@ -0,0 +1,7 @@
|
||||
-- DB update 2025_11_01_02 -> 2025_11_01_03
|
||||
-- Stomp
|
||||
DELETE FROM `spelldifficulty_dbc` WHERE `ID` = 50868;
|
||||
INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`, `DifficultySpellID_3`, `DifficultySpellID_4`) VALUES (50868, 50868, 59744, 0, 0);
|
||||
-- Ground Spike : Heroic only
|
||||
DELETE FROM `spelldifficulty_dbc` WHERE `ID` = 59750;
|
||||
INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`, `DifficultySpellID_3`, `DifficultySpellID_4`) VALUES (59750, 59750, 59750, 0, 0);
|
||||
@ -78,6 +78,7 @@
|
||||
#include "TicketMgr.h"
|
||||
#include "Tokenize.h"
|
||||
#include "Transport.h"
|
||||
#include "Unit.h"
|
||||
#include "UpdateData.h"
|
||||
#include "Util.h"
|
||||
#include "Vehicle.h"
|
||||
@ -6595,13 +6596,13 @@ void Player::_ApplyItemMods(Item* item, uint8 slot, bool apply)
|
||||
|
||||
LOG_DEBUG("entities.player", "applying mods for item {} ", item->GetGUID().ToString());
|
||||
|
||||
uint8 attacktype = Player::GetAttackBySlot(slot);
|
||||
WeaponAttackType attacktype = Player::GetAttackBySlot(slot);
|
||||
|
||||
if (item->HasSocket()) //only (un)equipping of items with sockets can influence metagems, so no need to waste time with normal items
|
||||
CorrectMetaGemEnchants(slot, apply);
|
||||
|
||||
if (attacktype < MAX_ATTACK)
|
||||
_ApplyWeaponDependentAuraMods(item, WeaponAttackType(attacktype), apply);
|
||||
_ApplyWeaponDependentAuraMods(item, attacktype, apply);
|
||||
|
||||
_ApplyItemBonuses(proto, slot, apply);
|
||||
|
||||
@ -6888,7 +6889,7 @@ void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply
|
||||
if (proto->ArcaneRes)
|
||||
HandleStatModifier(UNIT_MOD_RESISTANCE_ARCANE, BASE_VALUE, float(proto->ArcaneRes), apply);
|
||||
|
||||
uint8 attType = Player::GetAttackBySlot(slot);
|
||||
WeaponAttackType attType = Player::GetAttackBySlot(slot);
|
||||
if (attType != MAX_ATTACK)
|
||||
{
|
||||
_ApplyWeaponDamage(slot, proto, ssv, apply);
|
||||
@ -6935,7 +6936,7 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingSt
|
||||
ssv = ScalingStatValue ? sScalingStatValuesStore.LookupEntry(ssd_level) : nullptr;
|
||||
}
|
||||
|
||||
uint8 attType = Player::GetAttackBySlot(slot);
|
||||
WeaponAttackType attType = Player::GetAttackBySlot(slot);
|
||||
if (!IsInFeralForm() && apply && !CanUseAttackType(attType))
|
||||
{
|
||||
return;
|
||||
@ -6966,12 +6967,12 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingSt
|
||||
|
||||
if (minDamage > 0.f)
|
||||
{
|
||||
SetBaseWeaponDamage(WeaponAttackType(attType), MINDAMAGE, minDamage, i);
|
||||
SetBaseWeaponDamage(attType, MINDAMAGE, minDamage, i);
|
||||
}
|
||||
|
||||
if (maxDamage > 0.f)
|
||||
{
|
||||
SetBaseWeaponDamage(WeaponAttackType(attType), MAXDAMAGE, maxDamage, i);
|
||||
SetBaseWeaponDamage(attType, MAXDAMAGE, maxDamage, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6980,8 +6981,8 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingSt
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i)
|
||||
{
|
||||
SetBaseWeaponDamage(WeaponAttackType(attType), MINDAMAGE, 0.f, i);
|
||||
SetBaseWeaponDamage(WeaponAttackType(attType), MAXDAMAGE, 0.f, i);
|
||||
SetBaseWeaponDamage(attType, MINDAMAGE, 0.f, i);
|
||||
SetBaseWeaponDamage(attType, MAXDAMAGE, 0.f, i);
|
||||
}
|
||||
|
||||
if (attType == BASE_ATTACK)
|
||||
@ -7005,8 +7006,8 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingSt
|
||||
if (IsInFeralForm())
|
||||
return;
|
||||
|
||||
if (CanModifyStats() && (GetWeaponDamageRange(WeaponAttackType(attType), MAXDAMAGE) || proto->Delay))
|
||||
UpdateDamagePhysical(WeaponAttackType(attType));
|
||||
if (CanModifyStats() && (GetWeaponDamageRange(attType, MAXDAMAGE) || proto->Delay))
|
||||
UpdateDamagePhysical(attType);
|
||||
}
|
||||
|
||||
void Player::CastAllObtainSpells()
|
||||
@ -7599,9 +7600,9 @@ void Player::_RemoveAllItemMods()
|
||||
if (!proto)
|
||||
continue;
|
||||
|
||||
uint32 attacktype = Player::GetAttackBySlot(i);
|
||||
WeaponAttackType attacktype = Player::GetAttackBySlot(i);
|
||||
if (attacktype < MAX_ATTACK)
|
||||
_ApplyWeaponDependentAuraMods(m_items[i], WeaponAttackType(attacktype), false);
|
||||
_ApplyWeaponDependentAuraMods(m_items[i], attacktype, false);
|
||||
|
||||
_ApplyItemBonuses(proto, i, false);
|
||||
|
||||
@ -7628,9 +7629,9 @@ void Player::_ApplyAllItemMods()
|
||||
if (!proto)
|
||||
continue;
|
||||
|
||||
uint32 attacktype = Player::GetAttackBySlot(i);
|
||||
WeaponAttackType attacktype = Player::GetAttackBySlot(i);
|
||||
if (attacktype < MAX_ATTACK)
|
||||
_ApplyWeaponDependentAuraMods(m_items[i], WeaponAttackType(attacktype), true);
|
||||
_ApplyWeaponDependentAuraMods(m_items[i], attacktype, true);
|
||||
|
||||
_ApplyItemBonuses(proto, i, true);
|
||||
|
||||
|
||||
@ -1257,7 +1257,7 @@ public:
|
||||
bool HasWeapon(WeaponAttackType type) const override { return GetWeaponForAttack(type, false); }
|
||||
bool HasWeaponForAttack(WeaponAttackType type) const override { return (Unit::HasWeaponForAttack(type) && GetWeaponForAttack(type, true)); }
|
||||
[[nodiscard]] Item* GetShield(bool useable = false) const;
|
||||
static uint8 GetAttackBySlot(uint8 slot); // MAX_ATTACK if not weapon slot
|
||||
static WeaponAttackType GetAttackBySlot(uint8 slot); // MAX_ATTACK if not weapon slot
|
||||
std::vector<Item*>& GetItemUpdateQueue() { return m_itemUpdateQueue; }
|
||||
static bool IsInventoryPos(uint16 pos) { return IsInventoryPos(pos >> 8, pos & 255); }
|
||||
static bool IsInventoryPos(uint8 bag, uint8 slot);
|
||||
|
||||
@ -51,6 +51,7 @@
|
||||
#include "QuestDef.h"
|
||||
#include "ReputationMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptObjectFwd.h"
|
||||
#include "SocialMgr.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
@ -539,7 +540,7 @@ Item* Player::GetShield(bool useable) const
|
||||
return item;
|
||||
}
|
||||
|
||||
uint8 Player::GetAttackBySlot(uint8 slot)
|
||||
WeaponAttackType Player::GetAttackBySlot(uint8 slot)
|
||||
{
|
||||
switch (slot)
|
||||
{
|
||||
|
||||
@ -8179,7 +8179,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
if (triggeredByAura->GetBase() && castItem->GetGUID() != triggeredByAura->GetBase()->GetCastItemGUID())
|
||||
return false;
|
||||
|
||||
WeaponAttackType attType = WeaponAttackType(player->GetAttackBySlot(castItem->GetSlot()));
|
||||
WeaponAttackType attType = player->GetAttackBySlot(castItem->GetSlot());
|
||||
if ((attType != BASE_ATTACK && attType != OFF_ATTACK)
|
||||
|| (attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK)
|
||||
|| (attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK))
|
||||
@ -8370,7 +8370,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
if (!IsPlayer() || !victim || !victim->IsAlive() || !castItem || !castItem->IsEquipped())
|
||||
return false;
|
||||
|
||||
WeaponAttackType attType = WeaponAttackType(Player::GetAttackBySlot(castItem->GetSlot()));
|
||||
WeaponAttackType attType = Player::GetAttackBySlot(castItem->GetSlot());
|
||||
if ((attType != BASE_ATTACK && attType != OFF_ATTACK)
|
||||
|| (attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK)
|
||||
|| (attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK))
|
||||
|
||||
@ -967,7 +967,7 @@ public:
|
||||
inline bool HasMainhandWeaponForAttack() const { return HasWeaponForAttack(BASE_ATTACK); }
|
||||
inline bool HasOffhandWeaponForAttack() const { return HasWeaponForAttack(OFF_ATTACK); }
|
||||
inline bool HasRangedWeaponForAttack() const { return HasWeaponForAttack(RANGED_ATTACK); }
|
||||
[[nodiscard]] bool CanUseAttackType(uint8 attacktype) const
|
||||
[[nodiscard]] bool CanUseAttackType(WeaponAttackType attacktype) const
|
||||
{
|
||||
switch (attacktype)
|
||||
{
|
||||
|
||||
@ -3002,12 +3002,12 @@ void AuraEffect::HandleAuraModDisarm(AuraApplication const* aurApp, uint8 mode,
|
||||
{
|
||||
if (Item* pItem = target->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, slot))
|
||||
{
|
||||
uint8 attacktype = Player::GetAttackBySlot(slot);
|
||||
WeaponAttackType attacktype = Player::GetAttackBySlot(slot);
|
||||
|
||||
if (attacktype < MAX_ATTACK)
|
||||
{
|
||||
target->ToPlayer()->_ApplyWeaponDamage(slot, pItem->GetTemplate(), nullptr, !apply);
|
||||
target->ToPlayer()->_ApplyWeaponDependentAuraMods(pItem, WeaponAttackType(attacktype), !apply);
|
||||
target->ToPlayer()->_ApplyWeaponDependentAuraMods(pItem, attacktype, !apply);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1824,7 +1824,7 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
|
||||
{
|
||||
if (Player const* player = unitTarget->ToPlayer())
|
||||
{
|
||||
if (player->GetWeaponForAttack(WeaponAttackType(BASE_ATTACK + i), true))
|
||||
if (player->GetWeaponForAttack(WeaponAttackType(i), true))
|
||||
{
|
||||
valid = true;
|
||||
break;
|
||||
|
||||
@ -90,6 +90,9 @@ enum BjarngrimEvents
|
||||
// STORMFORGED LIEUTENANT
|
||||
EVENT_ARC_WELD = 41,
|
||||
EVENT_RENEW_STEEL = 42,
|
||||
|
||||
// CHARGE UP
|
||||
EVENT_CHARGE_UP = 51,
|
||||
};
|
||||
|
||||
enum Yells
|
||||
@ -110,27 +113,22 @@ struct boss_bjarngrim : public npc_escortAI
|
||||
boss_bjarngrim(Creature* creature) : npc_escortAI(creature), summons(creature)
|
||||
{
|
||||
m_pInstance = creature->GetInstanceScript();
|
||||
|
||||
// Init waypoints
|
||||
AddWaypoint(1, 1262.18f, 99.3f, 33.5f, 0);
|
||||
AddWaypoint(2, 1281.6f, 99.5f, 33.5f, 0);
|
||||
AddWaypoint(3, 1311.7f, 99.4f, 40.1f, 0);
|
||||
AddWaypoint(4, 1332.5f, 99.7f, 40.18f, 0);
|
||||
AddWaypoint(5, 1311.7f, 99.4f, 40.1f, 0);
|
||||
AddWaypoint(6, 1281.6f, 99.5f, 33.5f, 0);
|
||||
AddWaypoint(7, 1262.18f, 99.3f, 33.5f, 0);
|
||||
AddWaypoint(8, 1262, -26.9f, 33.5f, 0);
|
||||
AddWaypoint(9, 1281.2f, -26.8f, 33.5f, 0);
|
||||
AddWaypoint(10, 1311.3f, -26.9f, 40.03f, 0);
|
||||
AddWaypoint(11, 1332, -26.6f, 40.18f, 0);
|
||||
AddWaypoint(12, 1311.3f, -26.9f, 40.03f, 0);
|
||||
AddWaypoint(13, 1281.2f, -26.8f, 33.5f, 0);
|
||||
AddWaypoint(14, 1262, -26.9f, 33.5f, 0);
|
||||
|
||||
InitializeWaypoints();
|
||||
me->SetWalk(true);
|
||||
Start(true, ObjectGuid::Empty, nullptr, false, true);
|
||||
}
|
||||
|
||||
void InitializeWaypoints()
|
||||
{
|
||||
AddWaypoint(1, 1262.0f, -26.9f, 33.5f, 10000);
|
||||
AddWaypoint(2, 1262.18f, 99.3f, 33.5f, 10000);
|
||||
AddWaypoint(3, 1262.0f, -26.9f, 33.5f, 0);
|
||||
AddWaypoint(4, 1332.0f, -26.6f, 40.18f, 10000);
|
||||
AddWaypoint(5, 1395.092f, 36.6425f, 50.038f, 10000);
|
||||
AddWaypoint(6, 1332.0f, -26.6f, 40.18f, 0);
|
||||
AddWaypoint(7, 1262.0f, -26.9f, 33.5f, 0);
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
events.Reset();
|
||||
@ -139,12 +137,12 @@ struct boss_bjarngrim : public npc_escortAI
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
if (Creature* dwarf = me->SummonCreature(NPC_STORMFORGED_LIEUTENANT, me->GetPositionX() + urand(4, 12), me->GetPositionY() + urand(4, 12), me->GetPositionZ()))
|
||||
{
|
||||
dwarf->GetMotionMaster()->MoveFollow(me, 3, rand_norm() * 2 * 3.14f);
|
||||
float angle = i == 0 ? 2.5f : 3.78f;
|
||||
dwarf->GetMotionMaster()->MoveFollow(me, 3, angle);
|
||||
summons.Summon(dwarf);
|
||||
}
|
||||
|
||||
me->RemoveAllAuras();
|
||||
me->CastSpell(me, SPELL_TEMPORARY_ELECTRICAL_CHARGE, true);
|
||||
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetBossState(DATA_BJARNGRIM, NOT_STARTED);
|
||||
@ -271,14 +269,48 @@ struct boss_bjarngrim : public npc_escortAI
|
||||
|
||||
void WaypointReached(uint32 Point) override
|
||||
{
|
||||
if (Point == 1 || Point == 8)
|
||||
DoCastSelf(SPELL_TEMPORARY_ELECTRICAL_CHARGE, true);
|
||||
else if (Point == 7 || Point == 14)
|
||||
if (Point == 1)
|
||||
{
|
||||
events.CancelEvent(EVENT_CHARGE_UP);
|
||||
events.ScheduleEvent(EVENT_CHARGE_UP, 2500ms, 0);
|
||||
}
|
||||
else if (Point == 2)
|
||||
{
|
||||
events.CancelEvent(EVENT_CHARGE_UP);
|
||||
}
|
||||
else if (Point == 3)
|
||||
{
|
||||
me->RemoveAura(SPELL_TEMPORARY_ELECTRICAL_CHARGE);
|
||||
}
|
||||
else if (Point == 4)
|
||||
{
|
||||
events.CancelEvent(EVENT_CHARGE_UP);
|
||||
events.ScheduleEvent(EVENT_CHARGE_UP, 2500ms, 0);
|
||||
}
|
||||
else if (Point == 5)
|
||||
{
|
||||
events.CancelEvent(EVENT_CHARGE_UP);
|
||||
}
|
||||
else if (Point == 6)
|
||||
{
|
||||
me->RemoveAura(SPELL_TEMPORARY_ELECTRICAL_CHARGE);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateEscortAI(uint32 diff) override
|
||||
{
|
||||
events.Update(diff);
|
||||
|
||||
if (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
if (eventId == EVENT_CHARGE_UP)
|
||||
{
|
||||
me->CastSpell(me, SPELL_CHARGE_UP, true);
|
||||
me->CastSpell(me, SPELL_TEMPORARY_ELECTRICAL_CHARGE, true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!me->IsInCombat())
|
||||
return;
|
||||
|
||||
@ -289,8 +321,6 @@ struct boss_bjarngrim : public npc_escortAI
|
||||
return;
|
||||
}
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
@ -303,6 +333,11 @@ struct boss_bjarngrim : public npc_escortAI
|
||||
events.Repeat(20s);
|
||||
break;
|
||||
|
||||
case EVENT_CHARGE_UP:
|
||||
DoCastSelf(SPELL_CHARGE_UP, true);
|
||||
DoCastSelf(SPELL_TEMPORARY_ELECTRICAL_CHARGE, true);
|
||||
break;
|
||||
|
||||
// DEFENSIVE STANCE
|
||||
case EVENT_BJARNGRIM_REFLECTION:
|
||||
DoCastSelf(SPELL_BJARNGRIM_REFLETION, true);
|
||||
|
||||
@ -63,6 +63,7 @@ enum IonarEvents
|
||||
EVENT_CHECK_HEALTH = 3,
|
||||
EVENT_CALL_SPARKS = 4,
|
||||
EVENT_RESTORE = 5,
|
||||
EVENT_CHANGE_TARGET = 6,
|
||||
};
|
||||
|
||||
struct boss_ionar : public BossAI
|
||||
@ -85,8 +86,8 @@ struct boss_ionar : public BossAI
|
||||
if (!spark)
|
||||
events.RescheduleEvent(EVENT_CHECK_HEALTH, 1s, 0, 1);
|
||||
|
||||
events.RescheduleEvent(EVENT_BALL_LIGHTNING, 10s, 0, 1);
|
||||
events.RescheduleEvent(EVENT_STATIC_OVERLOAD, 5s, 0, 1);
|
||||
events.RescheduleEvent(EVENT_BALL_LIGHTNING, 7s, 11s, 0, 1);
|
||||
events.RescheduleEvent(EVENT_STATIC_OVERLOAD, 6s, 12s, 0, 1);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit*) override
|
||||
@ -138,7 +139,7 @@ struct boss_ionar : public BossAI
|
||||
me->SetControlled(true, UNIT_STATE_STUNNED);
|
||||
|
||||
events.SetPhase(2);
|
||||
events.ScheduleEvent(EVENT_CALL_SPARKS, 15s, 0, 2);
|
||||
events.ScheduleEvent(EVENT_CALL_SPARKS, 20s, 0, 2);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@ -155,17 +156,17 @@ struct boss_ionar : public BossAI
|
||||
{
|
||||
case EVENT_BALL_LIGHTNING:
|
||||
DoCastRandomTarget(SPELL_BALL_LIGHTNING, 1, 0.0f, false);
|
||||
events.Repeat(10s, 11s);
|
||||
events.Repeat(8s, 18s);
|
||||
break;
|
||||
case EVENT_STATIC_OVERLOAD:
|
||||
DoCastRandomTarget(SPELL_STATIC_OVERLOAD);
|
||||
events.Repeat(5s, 6s);
|
||||
events.Repeat(9s, 14s);
|
||||
break;
|
||||
case EVENT_CALL_SPARKS:
|
||||
{
|
||||
EntryCheckPredicate pred(NPC_SPARK_OF_IONAR);
|
||||
summons.DoAction(ACTION_CALLBACK, pred);
|
||||
events.ScheduleEvent(EVENT_RESTORE, 2s, 0, 2);
|
||||
events.ScheduleEvent(EVENT_RESTORE, 5s, 0, 2);
|
||||
return;
|
||||
}
|
||||
case EVENT_RESTORE:
|
||||
@ -187,20 +188,47 @@ struct npc_spark_of_ionar : public ScriptedAI
|
||||
npc_spark_of_ionar(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void MoveInLineOfSight(Unit*) override { }
|
||||
void UpdateAI(uint32) override { }
|
||||
void AttackStart(Unit* /*who*/) override { }
|
||||
|
||||
void Reset() override { returning = false; }
|
||||
void Reset() override
|
||||
{
|
||||
returning = false;
|
||||
_events.ScheduleEvent(EVENT_CHANGE_TARGET, 3s);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
damage = 0;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (returning)
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_CHANGE_TARGET:
|
||||
if (Player* tgt = SelectTargetFromPlayerList(100))
|
||||
{
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveFollow(tgt, 0.0f, 0.0f, MOTION_SLOT_CONTROLLED);
|
||||
}
|
||||
_events.Repeat(3s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DoAction(int32 param) override
|
||||
{
|
||||
if (param == ACTION_CALLBACK)
|
||||
{
|
||||
_events.Reset();
|
||||
me->SetSpeed(MOVE_RUN, 2.5f);
|
||||
me->GetThreatMgr().ClearAllThreat();
|
||||
me->CombatStop(true);
|
||||
@ -218,6 +246,7 @@ struct npc_spark_of_ionar : public ScriptedAI
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
bool returning;
|
||||
};
|
||||
|
||||
|
||||
@ -120,15 +120,13 @@ public:
|
||||
{
|
||||
case EVENT_BOULDER:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true, 0))
|
||||
me->CastSpell(target, SPELL_BOULDER_TOSS, false);
|
||||
|
||||
DoCastRandomTarget(SPELL_BOULDER_TOSS, 0, 50.0f);
|
||||
events.Repeat(5s, 7s);
|
||||
break;
|
||||
}
|
||||
case EVENT_GROUND_SPIKE:
|
||||
{
|
||||
me->CastSpell(me->GetVictim(), SPELL_GROUND_SPIKE, false); // current enemy target
|
||||
DoCastRandomTarget(SPELL_GROUND_SPIKE, 0, 50.0f);
|
||||
events.Repeat(8s, 11s);
|
||||
break;
|
||||
}
|
||||
@ -142,6 +140,8 @@ public:
|
||||
{
|
||||
events.Repeat(10s, 13s);
|
||||
me->CastSpell(me->GetVictim(), SPELL_GROUND_SLAM, true);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AttackStop();
|
||||
events.DelayEvents(10s);
|
||||
events.RescheduleEvent(EVENT_SHATTER, 8s);
|
||||
break;
|
||||
@ -151,6 +151,7 @@ public:
|
||||
me->CastSpell((Unit*)nullptr, SPELL_SHATTER, false);
|
||||
Talk(SAY_SHATTER);
|
||||
events.RescheduleEvent(EVENT_REMOVE_STONED, 1500ms);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
break;
|
||||
}
|
||||
case EVENT_REMOVE_STONED:
|
||||
|
||||
@ -45,7 +45,6 @@ public:
|
||||
ObjectGuid goSjonnirDoorGUID;
|
||||
ObjectGuid goLeftPipeGUID;
|
||||
ObjectGuid goRightPipeGUID;
|
||||
ObjectGuid goTribunalDoorGUID;
|
||||
|
||||
ObjectGuid SjonnirGUID;
|
||||
ObjectGuid BrannGUID;
|
||||
@ -96,10 +95,6 @@ public:
|
||||
case GO_TRIBUNAL_CONSOLE:
|
||||
goTribunalConsoleGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_TRIBUNAL_ACCESS_DOOR:
|
||||
goTribunalDoorGUID = go->GetGUID();
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
break;
|
||||
case GO_SKY_FLOOR:
|
||||
goSkyRoomFloorGUID = go->GetGUID();
|
||||
if (Encounter[BOSS_TRIBUNAL_OF_AGES] == DONE)
|
||||
@ -141,8 +136,6 @@ public:
|
||||
{
|
||||
case GO_TRIBUNAL_CONSOLE:
|
||||
return goTribunalConsoleGUID;
|
||||
case GO_TRIBUNAL_ACCESS_DOOR:
|
||||
return goTribunalDoorGUID;
|
||||
case GO_SJONNIR_CONSOLE:
|
||||
return goSjonnirConsoleGUID;
|
||||
case GO_SJONNIR_DOOR:
|
||||
@ -208,10 +201,6 @@ public:
|
||||
isKrystalusDead = type == BOSS_KRYSTALLUS || isKrystalusDead;
|
||||
}
|
||||
|
||||
if (isMaidenOfGriefDead && isKrystalusDead)
|
||||
if (GameObject* tribunalDoor = instance->GetGameObject(goTribunalDoorGUID))
|
||||
tribunalDoor->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
if (type == BOSS_TRIBUNAL_OF_AGES && data == SPECIAL)
|
||||
{
|
||||
if (GameObject* pSkyRoomFloor = instance->GetGameObject(goSkyRoomFloorGUID))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user