Merge branch 'master' into Playerbot
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
-- DB update 2024_04_29_00 -> 2024_04_30_00
|
||||||
|
UPDATE `creature` SET `spawntimesecs`=2700 WHERE `guid` IN (3154, 134483, 134484) AND `id1`=1132;
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- DB update 2024_04_30_00 -> 2024_05_04_00
|
||||||
|
--
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` = 30166;
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (30166, 'spell_magtheridon_shadow_grasp_visual');
|
||||||
@@ -1342,6 +1342,15 @@ vmap.petLOS = 1
|
|||||||
|
|
||||||
vmap.BlizzlikePvPLOS = 1
|
vmap.BlizzlikePvPLOS = 1
|
||||||
|
|
||||||
|
#
|
||||||
|
# vmap.BlizzlikeLOSInOpenWorld
|
||||||
|
# Description: Check line of sight to see game objects in the open world.
|
||||||
|
# Default: 1 (Enabled, Players will be able to cast spells through tree stumps and other objects in the open world).
|
||||||
|
# 0 (Disabled, Players will not be able to cast spells through tree stumps and other objects in the open world).
|
||||||
|
#
|
||||||
|
|
||||||
|
vmap.BlizzlikeLOSInOpenWorld = 1
|
||||||
|
|
||||||
#
|
#
|
||||||
# vmap.enableIndoorCheck
|
# vmap.enableIndoorCheck
|
||||||
# Description: VMap based indoor check to remove outdoor-only auras (mounts etc.).
|
# Description: VMap based indoor check to remove outdoor-only auras (mounts etc.).
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ void BattlegroundBE::StartingEventOpenDoors()
|
|||||||
DoorOpen(i);
|
DoorOpen(i);
|
||||||
|
|
||||||
for (uint32 i = BG_BE_OBJECT_BUFF_1; i <= BG_BE_OBJECT_BUFF_2; ++i)
|
for (uint32 i = BG_BE_OBJECT_BUFF_1; i <= BG_BE_OBJECT_BUFF_2; ++i)
|
||||||
SpawnBGObject(i, 60);
|
SpawnBGObject(i, 90);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BattlegroundBE::HandlePlayerUnderMap(Player* player)
|
bool BattlegroundBE::HandlePlayerUnderMap(Player* player)
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ void BattlegroundDS::StartingEventOpenDoors()
|
|||||||
DoorOpen(i);
|
DoorOpen(i);
|
||||||
|
|
||||||
for (uint32 i = BG_DS_OBJECT_BUFF_1; i <= BG_DS_OBJECT_BUFF_2; ++i)
|
for (uint32 i = BG_DS_OBJECT_BUFF_1; i <= BG_DS_OBJECT_BUFF_2; ++i)
|
||||||
SpawnBGObject(i, 60);
|
SpawnBGObject(i, 90);
|
||||||
|
|
||||||
_events.ScheduleEvent(BG_DS_EVENT_WATERFALL_WARNING, BG_DS_WATERFALL_TIMER_MIN, BG_DS_WATERFALL_TIMER_MAX);
|
_events.ScheduleEvent(BG_DS_EVENT_WATERFALL_WARNING, BG_DS_WATERFALL_TIMER_MIN, BG_DS_WATERFALL_TIMER_MAX);
|
||||||
//for (uint8 i = 0; i < BG_DS_PIPE_KNOCKBACK_TOTAL_COUNT; ++i)
|
//for (uint8 i = 0; i < BG_DS_PIPE_KNOCKBACK_TOTAL_COUNT; ++i)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ void BattlegroundNA::StartingEventOpenDoors()
|
|||||||
DoorOpen(i);
|
DoorOpen(i);
|
||||||
|
|
||||||
for (uint32 i = BG_NA_OBJECT_BUFF_1; i <= BG_NA_OBJECT_BUFF_2; ++i)
|
for (uint32 i = BG_NA_OBJECT_BUFF_1; i <= BG_NA_OBJECT_BUFF_2; ++i)
|
||||||
SpawnBGObject(i, 60);
|
SpawnBGObject(i, 90);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BattlegroundNA::HandlePlayerUnderMap(Player* player)
|
bool BattlegroundNA::HandlePlayerUnderMap(Player* player)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ void BattlegroundRL::StartingEventOpenDoors()
|
|||||||
DoorOpen(i);
|
DoorOpen(i);
|
||||||
|
|
||||||
for (uint32 i = BG_RL_OBJECT_BUFF_1; i <= BG_RL_OBJECT_BUFF_2; ++i)
|
for (uint32 i = BG_RL_OBJECT_BUFF_1; i <= BG_RL_OBJECT_BUFF_2; ++i)
|
||||||
SpawnBGObject(i, 60);
|
SpawnBGObject(i, 90);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BattlegroundRL::HandlePlayerUnderMap(Player* player)
|
bool BattlegroundRL::HandlePlayerUnderMap(Player* player)
|
||||||
|
|||||||
@@ -702,9 +702,6 @@ void Map::VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor<Acore::Objec
|
|||||||
if (!obj->IsPositionValid())
|
if (!obj->IsPositionValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (obj->GetGridActivationRange() <= 0.0f) // pussywizard: gameobjects for example are on active lists, but range is equal to 0 (they just prevent grid unloading)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Update mobs/objects in ALL visible cells around object!
|
// Update mobs/objects in ALL visible cells around object!
|
||||||
CellArea area = Cell::CalculateCellArea(obj->GetPositionX(), obj->GetPositionY(), obj->GetGridActivationRange());
|
CellArea area = Cell::CalculateCellArea(obj->GetPositionX(), obj->GetPositionY(), obj->GetGridActivationRange());
|
||||||
|
|
||||||
@@ -2448,6 +2445,14 @@ bool Map::isInLineOfSight(float x1, float y1, float z1, float x2, float y2, floa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!sWorld->getBoolConfig(CONFIG_VMAP_BLIZZLIKE_LOS_OPEN_WORLD))
|
||||||
|
{
|
||||||
|
if (IsWorldMap())
|
||||||
|
{
|
||||||
|
ignoreFlags = VMAP::ModelIgnoreFlags::Nothing;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((checks & LINEOFSIGHT_CHECK_VMAP) && !VMAP::VMapFactory::createOrGetVMapMgr()->isInLineOfSight(GetId(), x1, y1, z1, x2, y2, z2, ignoreFlags))
|
if ((checks & LINEOFSIGHT_CHECK_VMAP) && !VMAP::VMapFactory::createOrGetVMapMgr()->isInLineOfSight(GetId(), x1, y1, z1, x2, y2, z2, ignoreFlags))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -454,6 +454,7 @@ public:
|
|||||||
[[nodiscard]] bool IsBattleground() const { return i_mapEntry && i_mapEntry->IsBattleground(); }
|
[[nodiscard]] bool IsBattleground() const { return i_mapEntry && i_mapEntry->IsBattleground(); }
|
||||||
[[nodiscard]] bool IsBattleArena() const { return i_mapEntry && i_mapEntry->IsBattleArena(); }
|
[[nodiscard]] bool IsBattleArena() const { return i_mapEntry && i_mapEntry->IsBattleArena(); }
|
||||||
[[nodiscard]] bool IsBattlegroundOrArena() const { return i_mapEntry && i_mapEntry->IsBattlegroundOrArena(); }
|
[[nodiscard]] bool IsBattlegroundOrArena() const { return i_mapEntry && i_mapEntry->IsBattlegroundOrArena(); }
|
||||||
|
[[nodiscard]] bool IsWorldMap() const { return i_mapEntry && i_mapEntry->IsWorldMap(); }
|
||||||
|
|
||||||
bool GetEntrancePos(int32& mapid, float& x, float& y)
|
bool GetEntrancePos(int32& mapid, float& x, float& y)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ enum WorldBoolConfigs
|
|||||||
CONFIG_LEAVE_GROUP_ON_LOGOUT,
|
CONFIG_LEAVE_GROUP_ON_LOGOUT,
|
||||||
CONFIG_QUEST_POI_ENABLED,
|
CONFIG_QUEST_POI_ENABLED,
|
||||||
CONFIG_VMAP_BLIZZLIKE_PVP_LOS,
|
CONFIG_VMAP_BLIZZLIKE_PVP_LOS,
|
||||||
|
CONFIG_VMAP_BLIZZLIKE_LOS_OPEN_WORLD,
|
||||||
CONFIG_OBJECT_SPARKLES,
|
CONFIG_OBJECT_SPARKLES,
|
||||||
CONFIG_LOW_LEVEL_REGEN_BOOST,
|
CONFIG_LOW_LEVEL_REGEN_BOOST,
|
||||||
CONFIG_OBJECT_QUEST_MARKERS,
|
CONFIG_OBJECT_QUEST_MARKERS,
|
||||||
|
|||||||
@@ -1318,6 +1318,7 @@ void World::LoadConfigSettings(bool reload)
|
|||||||
bool enableHeight = sConfigMgr->GetOption<bool>("vmap.enableHeight", true);
|
bool enableHeight = sConfigMgr->GetOption<bool>("vmap.enableHeight", true);
|
||||||
bool enablePetLOS = sConfigMgr->GetOption<bool>("vmap.petLOS", true);
|
bool enablePetLOS = sConfigMgr->GetOption<bool>("vmap.petLOS", true);
|
||||||
_bool_configs[CONFIG_VMAP_BLIZZLIKE_PVP_LOS] = sConfigMgr->GetOption<bool>("vmap.BlizzlikePvPLOS", true);
|
_bool_configs[CONFIG_VMAP_BLIZZLIKE_PVP_LOS] = sConfigMgr->GetOption<bool>("vmap.BlizzlikePvPLOS", true);
|
||||||
|
_bool_configs[CONFIG_VMAP_BLIZZLIKE_LOS_OPEN_WORLD] = sConfigMgr->GetOption<bool>("vmap.BlizzlikeLOSInOpenWorld", true);
|
||||||
|
|
||||||
if (!enableHeight)
|
if (!enableHeight)
|
||||||
LOG_ERROR("server.loading", "VMap height checking disabled! Creatures movements and other various things WILL be broken! Expect no support.");
|
LOG_ERROR("server.loading", "VMap height checking disabled! Creatures movements and other various things WILL be broken! Expect no support.");
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ enum Spells
|
|||||||
SPELL_BERSERK = 27680,
|
SPELL_BERSERK = 27680,
|
||||||
SPELL_SHADOW_GRASP = 30410,
|
SPELL_SHADOW_GRASP = 30410,
|
||||||
SPELL_SHADOW_GRASP_VISUAL = 30166,
|
SPELL_SHADOW_GRASP_VISUAL = 30166,
|
||||||
|
SPELL_SHADOW_CAGE_STUN = 30168,
|
||||||
SPELL_MIND_EXHAUSTION = 44032,
|
SPELL_MIND_EXHAUSTION = 44032,
|
||||||
SPELL_QUAKE = 30657,
|
SPELL_QUAKE = 30657,
|
||||||
SPELL_QUAKE_KNOCKBACK = 30571,
|
SPELL_QUAKE_KNOCKBACK = 30571,
|
||||||
@@ -65,13 +66,13 @@ enum Spells
|
|||||||
|
|
||||||
enum Groups
|
enum Groups
|
||||||
{
|
{
|
||||||
GROUP_INTERRUPT_CHECK = 0,
|
GROUP_EARLY_RELEASE_CHECK = 0
|
||||||
GROUP_EARLY_RELEASE_CHECK = 1
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Actions
|
enum Actions
|
||||||
{
|
{
|
||||||
ACTION_INCREASE_HELLFIRE_CHANNELER_DEATH_COUNT = 1
|
ACTION_INCREASE_HELLFIRE_CHANNELER_DEATH_COUNT = 1,
|
||||||
|
ACTION_BANISH_SELF = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
struct boss_magtheridon : public BossAI
|
struct boss_magtheridon : public BossAI
|
||||||
@@ -188,21 +189,6 @@ struct boss_magtheridon : public BossAI
|
|||||||
{
|
{
|
||||||
DoCastSelf(SPELL_BLAST_NOVA);
|
DoCastSelf(SPELL_BLAST_NOVA);
|
||||||
scheduler.DelayAll(10s);
|
scheduler.DelayAll(10s);
|
||||||
|
|
||||||
_interruptScheduler.Schedule(50ms, GROUP_INTERRUPT_CHECK, [this](TaskContext context)
|
|
||||||
{
|
|
||||||
if (me->GetAuraCount(SPELL_SHADOW_GRASP_VISUAL) == 5)
|
|
||||||
{
|
|
||||||
Talk(SAY_BANISH);
|
|
||||||
me->InterruptNonMeleeSpells(true);
|
|
||||||
scheduler.CancelGroup(GROUP_INTERRUPT_CHECK);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
context.Repeat(50ms);
|
|
||||||
}).Schedule(12s, GROUP_INTERRUPT_CHECK, [this](TaskContext /*context*/)
|
|
||||||
{
|
|
||||||
_interruptScheduler.CancelGroup(GROUP_INTERRUPT_CHECK);
|
|
||||||
});
|
|
||||||
context.Repeat(54350ms, 55400ms);
|
context.Repeat(54350ms, 55400ms);
|
||||||
}).Schedule(22min, [this](TaskContext /*context*/)
|
}).Schedule(22min, [this](TaskContext /*context*/)
|
||||||
{
|
{
|
||||||
@@ -228,6 +214,11 @@ struct boss_magtheridon : public BossAI
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (action == ACTION_BANISH_SELF )
|
||||||
|
{
|
||||||
|
Talk(SAY_BANISH);
|
||||||
|
me->CastSpell(me, SPELL_SHADOW_CAGE_STUN, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustEngagedWith(Unit* who) override
|
void JustEngagedWith(Unit* who) override
|
||||||
@@ -350,6 +341,30 @@ class spell_magtheridon_shadow_grasp : public AuraScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class spell_magtheridon_shadow_grasp_visual : public AuraScript
|
||||||
|
{
|
||||||
|
PrepareAuraScript(spell_magtheridon_shadow_grasp_visual);
|
||||||
|
|
||||||
|
void HandleDummyApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
|
{
|
||||||
|
if (GetTarget()->GetAuraCount(SPELL_SHADOW_GRASP_VISUAL) == 5)
|
||||||
|
{
|
||||||
|
GetTarget()->GetAI()->DoAction(ACTION_BANISH_SELF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleDummyRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
|
{
|
||||||
|
GetTarget()->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE_STUN);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnEffectApply += AuraEffectApplyFn(spell_magtheridon_shadow_grasp_visual::HandleDummyApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||||
|
OnEffectRemove += AuraEffectRemoveFn(spell_magtheridon_shadow_grasp_visual::HandleDummyRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
class spell_magtheridon_quake : public SpellScript
|
class spell_magtheridon_quake : public SpellScript
|
||||||
{
|
{
|
||||||
PrepareSpellScript(spell_magtheridon_quake);
|
PrepareSpellScript(spell_magtheridon_quake);
|
||||||
@@ -417,6 +432,7 @@ void AddSC_boss_magtheridon()
|
|||||||
RegisterMagtheridonsLairCreatureAI(npc_target_trigger);
|
RegisterMagtheridonsLairCreatureAI(npc_target_trigger);
|
||||||
RegisterSpellScript(spell_magtheridon_blaze);
|
RegisterSpellScript(spell_magtheridon_blaze);
|
||||||
RegisterSpellScript(spell_magtheridon_shadow_grasp);
|
RegisterSpellScript(spell_magtheridon_shadow_grasp);
|
||||||
|
RegisterSpellScript(spell_magtheridon_shadow_grasp_visual);
|
||||||
RegisterSpellScript(spell_magtheridon_quake);
|
RegisterSpellScript(spell_magtheridon_quake);
|
||||||
RegisterSpellScript(spell_magtheridon_debris_target_selector);
|
RegisterSpellScript(spell_magtheridon_debris_target_selector);
|
||||||
new go_manticron_cube();
|
new go_manticron_cube();
|
||||||
|
|||||||
Reference in New Issue
Block a user