Core/Collision: Ported dynamic line of sight patch by Silverice from MaNGOS and
added lots of improvements Please re-extract vmaps
This commit is contained in:
@@ -892,7 +892,7 @@ class boss_prince_valanar_icc : public CreatureScript
|
||||
{
|
||||
float x, y, z;
|
||||
summon->GetPosition(x, y, z);
|
||||
float ground_Z = summon->GetMap()->GetHeight(x, y, z, true, 500.0f);
|
||||
float ground_Z = summon->GetMap()->GetHeight(summon->GetPhaseMask(), x, y, z, true, 500.0f);
|
||||
summon->GetMotionMaster()->MovePoint(POINT_KINETIC_BOMB_IMPACT, x, y, ground_Z);
|
||||
break;
|
||||
}
|
||||
@@ -1238,7 +1238,7 @@ class npc_kinetic_bomb : public CreatureScript
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetSpeed(MOVE_FLIGHT, IsHeroic() ? 0.3f : 0.15f, true);
|
||||
me->GetPosition(_x, _y, _groundZ);
|
||||
_groundZ = me->GetMap()->GetHeight(_x, _y, _groundZ, true, 500.0f);
|
||||
_groundZ = me->GetMap()->GetHeight(me->GetPhaseMask(), _x, _y, _groundZ, true, 500.0f);
|
||||
}
|
||||
|
||||
void DoAction(int32 const action)
|
||||
|
||||
@@ -948,7 +948,7 @@ class spell_putricide_ooze_summon : public SpellScriptLoader
|
||||
uint32 triggerSpellId = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell;
|
||||
float x, y, z;
|
||||
GetTarget()->GetPosition(x, y, z);
|
||||
z = GetTarget()->GetMap()->GetHeight(x, y, z, true, 25.0f);
|
||||
z = GetTarget()->GetMap()->GetHeight(GetTarget()->GetPhaseMask(), x, y, z, true, 25.0f);
|
||||
x += 10.0f * cosf(caster->GetOrientation());
|
||||
y += 10.0f * sinf(caster->GetOrientation());
|
||||
caster->CastSpell(x, y, z, triggerSpellId, true, NULL, NULL, GetCasterGUID());
|
||||
|
||||
@@ -504,7 +504,7 @@ class boss_the_lich_king : public CreatureScript
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z);
|
||||
// use larger distance for vmap height search than in most other cases
|
||||
float ground_Z = me->GetMap()->GetHeight(x, y, z, true, MAX_FALL_DISTANCE);
|
||||
float ground_Z = me->GetMap()->GetHeight(me->GetPhaseMask(), x, y, z, true, MAX_FALL_DISTANCE);
|
||||
if (fabs(ground_Z - z) < 0.1f)
|
||||
return;
|
||||
|
||||
|
||||
@@ -1921,7 +1921,7 @@ class spell_svalna_revive_champion : public SpellScriptLoader
|
||||
Position pos;
|
||||
caster->GetPosition(&pos);
|
||||
caster->GetNearPosition(pos, 5.0f, 0.0f);
|
||||
pos.m_positionZ = caster->GetBaseMap()->GetHeight(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), true, 20.0f);
|
||||
pos.m_positionZ = caster->GetBaseMap()->GetHeight(caster->GetPhaseMask(), pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), true, 20.0f);
|
||||
pos.m_positionZ += 0.05f;
|
||||
caster->SetHomePosition(pos);
|
||||
caster->GetMotionMaster()->MovePoint(POINT_LAND, pos);
|
||||
|
||||
@@ -755,7 +755,7 @@ class boss_flame_leviathan_safety_container : public CreatureScript
|
||||
{
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z);
|
||||
z = me->GetMap()->GetHeight(x, y, z);
|
||||
z = me->GetMap()->GetHeight(me->GetPhaseMask(), x, y, z);
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
me->SetPosition(x, y, z, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user