[10727] Map system re-engineered. Special thanks to Blueboy for tests.

Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
Ambal 2010-11-16 21:07:58 +02:00
parent f5e40a5fda
commit f67d89f109
43 changed files with 1254 additions and 1128 deletions

View file

@ -7819,7 +7819,7 @@ void Spell::EffectTransmitted(SpellEffectIndex eff_idx)
if(goinfo->type==GAMEOBJECT_TYPE_FISHINGNODE)
{
GridMapLiquidData liqData;
if ( !cMap->IsInWater(fx, fy, fz + 1.f/* -0.5f */, &liqData)) // Hack to prevent fishing bobber from failing to land on fishing hole
if ( !m_caster->GetTerrain()->IsInWater(fx, fy, fz + 1.f/* -0.5f */, &liqData)) // Hack to prevent fishing bobber from failing to land on fishing hole
{ // but this is not proper, we really need to ignore not materialized objects
SendCastResult(SPELL_FAILED_NOT_HERE);
SendChannelUpdate(0);
@ -8156,7 +8156,7 @@ void Spell::EffectBind(SpellEffectIndex eff_idx)
loc.coord_y = st->target_Y;
loc.coord_z = st->target_Y;
loc.orientation = st->target_Orientation;
area_id = sMapMgr.GetAreaId(loc.mapid, loc.coord_x, loc.coord_y, loc.coord_z);
area_id = sTerrainMgr.GetAreaId(loc.mapid, loc.coord_x, loc.coord_y, loc.coord_z);
}
else
{