mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[10727] Map system re-engineered. Special thanks to Blueboy for tests.
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
f5e40a5fda
commit
f67d89f109
43 changed files with 1254 additions and 1128 deletions
|
|
@ -34,7 +34,6 @@
|
|||
#include "Channel.h"
|
||||
#include "ChannelMgr.h"
|
||||
#include "MapManager.h"
|
||||
#include "MapInstanced.h"
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "InstanceData.h"
|
||||
#include "GridNotifiers.h"
|
||||
|
|
@ -1444,7 +1443,7 @@ void Player::Update( uint32 p_time )
|
|||
}
|
||||
|
||||
// not auto-free ghost from body in instances
|
||||
if(m_deathTimer > 0 && !GetBaseMap()->Instanceable())
|
||||
if(m_deathTimer > 0 && !GetMap()->Instanceable())
|
||||
{
|
||||
if(p_time >= m_deathTimer)
|
||||
{
|
||||
|
|
@ -2324,7 +2323,7 @@ GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid guid, uint32 gameo
|
|||
|
||||
bool Player::IsUnderWater() const
|
||||
{
|
||||
return GetBaseMap()->IsUnderWater(GetPositionX(), GetPositionY(), GetPositionZ()+2);
|
||||
return GetTerrain()->IsUnderWater(GetPositionX(), GetPositionY(), GetPositionZ()+2);
|
||||
}
|
||||
|
||||
void Player::SetInWater(bool apply)
|
||||
|
|
@ -6139,7 +6138,7 @@ void Player::CheckAreaExploreAndOutdoor()
|
|||
return;
|
||||
|
||||
bool isOutdoor;
|
||||
uint16 areaFlag = GetBaseMap()->GetAreaFlag(GetPositionX(),GetPositionY(),GetPositionZ(), &isOutdoor);
|
||||
uint16 areaFlag = GetTerrain()->GetAreaFlag(GetPositionX(),GetPositionY(),GetPositionZ(), &isOutdoor);
|
||||
|
||||
if (isOutdoor)
|
||||
{
|
||||
|
|
@ -6665,7 +6664,7 @@ uint32 Player::GetZoneIdFromDB(ObjectGuid guid)
|
|||
float posz = fields[3].GetFloat();
|
||||
delete result;
|
||||
|
||||
zone = sMapMgr.GetZoneId(map,posx,posy,posz);
|
||||
zone = sTerrainMgr.GetZoneId(map,posx,posy,posz);
|
||||
|
||||
if (zone > 0)
|
||||
CharacterDatabase.PExecute("UPDATE characters SET zone='%u' WHERE guid='%u'", zone, lowguid);
|
||||
|
|
@ -20845,7 +20844,7 @@ void Player::SetOriginalGroup(Group *group, int8 subgroup)
|
|||
void Player::UpdateUnderwaterState( Map* m, float x, float y, float z )
|
||||
{
|
||||
GridMapLiquidData liquid_status;
|
||||
GridMapLiquidStatus res = m->getLiquidStatus(x, y, z, MAP_ALL_LIQUIDS, &liquid_status);
|
||||
GridMapLiquidStatus res = m->GetTerrain()->getLiquidStatus(x, y, z, MAP_ALL_LIQUIDS, &liquid_status);
|
||||
if (!res)
|
||||
{
|
||||
m_MirrorTimerFlags &= ~(UNDERWATER_INWATER|UNDERWATER_INLAVA|UNDERWATER_INSLIME|UNDERWATER_INDARKWATER);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue