Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2025-02-11 22:35:57 +08:00
62 changed files with 1532 additions and 1969 deletions
@@ -1114,10 +1114,9 @@ public:
return !_caster->IsWithinLOSInMap(unit);
// for players and pets check only dynamic los (ice block gameobjects)
float ox, oy, oz;
_caster->GetPosition(ox, oy, oz);
DynamicMapTree const& dTree = unit->GetMap()->GetDynamicMapTree();
return !dTree.isInLineOfSight(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ() + 2.f, ox, oy, oz + 2.f, unit->GetPhaseMask(), VMAP::ModelIgnoreFlags::Nothing);
if (unit->IsUnit() && unit->ToUnit()->HasUnitState(UNIT_STATE_MELEE_ATTACKING) && unit->ToUnit()->IsWithinMeleeRange(_caster))
return false;
return !_caster->IsWithinLOSInMap(unit, VMAP::ModelIgnoreFlags::Nothing, LINEOFSIGHT_CHECK_GOBJECT_M2, 0, _caster->GetCombatReach() * 0.7);
}
private:
@@ -1161,17 +1161,6 @@ public:
{
IsSindragosaIntroDone = true;
HandleDropAttempt();
if (instance->IsHeroic())
{
if (HeroicAttempts)
{
Events.ScheduleEvent(EVENT_RESPAWN_SINDRAGOSA, 30s);
}
}
else
{
Events.ScheduleEvent(EVENT_RESPAWN_SINDRAGOSA, 30s);
}
}
if (state == DONE && !instance->IsHeroic() && LichKingHeroicAvailable)
{
@@ -369,6 +369,9 @@ public:
break;
case NPC_ALGALON:
m_uiAlgalonGUID = creature->GetGUID();
if (!m_algalonTimer)
creature->DespawnOrUnsummon();
break;
case NPC_HARPOON_FIRE_STATE:
{
@@ -811,17 +814,6 @@ public:
go->EnableCollision(false);
}
if (data == FAIL)
{
scheduler.Schedule(5s, [this](TaskContext)
{
if (m_algalonTimer && (m_algalonTimer <= 60 || m_algalonTimer == TIMER_ALGALON_TO_SUMMON))
{
instance->SummonCreature(NPC_ALGALON, AlgalonLandPos);
}
});
}
break;
// Achievement
@@ -444,7 +444,9 @@ public:
void MoveInLineOfSight(Unit* who) override
{
if (!who || !who->IsInWorld() || who->GetZoneId() != 4395)
// 4395 Dalaran
// 4569 Sewer Exit Pipe
if (!who || !who->IsInWorld()|| who->GetZoneId() != 4395 || who->GetAreaId() == 4569)
return;
if (!me->IsWithinDist(who, 5.0f, false))