aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
authorclick <none@none>2010-06-05 00:59:25 +0200
committerclick <none@none>2010-06-05 00:59:25 +0200
commite77716188861d4aa83b227a90e04a66b63baeb1f (patch)
treece72764181a760314ec851f7535052dcf75649db /src/game/Player.cpp
parent1426c2970f42a2d065198806f750bf5dd28d580b (diff)
HIGHLY EXPERIMENTAL - USE AT YOUR OWN RISK
Implement the use of the new vmap3-format by Lynx3d (mad props to you for this, and thanks for the talks earlier) + reduced Vmap size to less than one third, and improve precision + indoor/outdoor check which allows automatic unmounting of players + additional area information from WMOAreaTable.dbc, removed existing "hacks" + WMO liquid information for swimming and fishing correctly in buildings/cities/caves/instances (lava and slime WILL hurt from now on!) - buildfiles for windows are not properly done, and will need to be sorted out NOTE: Do NOT annoy Lynx3d about this, any issues with this "port" is entirely our fault ! THIS REVISION IS CONSIDERED UNSTABLE AND CONTAINS WORK IN PROGRESS - USE AT YOUR OWN RISK! --HG-- branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 43965f5646a..2221098a9be 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -1065,7 +1065,9 @@ void Player::HandleDrowning(uint32 time_diff)
uint32 damage = urand(600, 700);
if (m_MirrorTimerFlags&UNDERWATER_INLAVA)
EnvironmentalDamage(DAMAGE_LAVA, damage);
- else
+ // need to skip Slime damage in Undercity,
+ // maybe someone can find better way to handle environmental damage
+ else if (m_zoneUpdateId != 1497)
EnvironmentalDamage(DAMAGE_SLIME, damage);
}
}
@@ -4574,7 +4576,7 @@ bool Player::FallGround(uint8 FallMode)
float x, y, z;
GetPosition(x, y, z);
- float ground_Z = GetMap()->GetVmapHeight(x, y, z);
+ float ground_Z = GetMap()->GetHeight(x, y, z);
float z_diff = 0.0f;
if ((z_diff = fabs(ground_Z - z)) < 0.1f)
return false;
@@ -6123,7 +6125,7 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele
if (GetTrader() && !IsWithinDistInMap(GetTrader(), INTERACTION_DISTANCE))
GetSession()->SendCancelTrade();
- CheckExploreSystem();
+ CheckAreaExploreAndOutdoor();
return true;
}
@@ -6197,7 +6199,7 @@ void Player::SendMovieStart(uint32 MovieId)
SendDirectMessage(&data);
}
-void Player::CheckExploreSystem()
+void Player::CheckAreaExploreAndOutdoor()
{
if (!isAlive())
return;
@@ -6213,8 +6215,13 @@ void Player::CheckExploreSystem()
GetSession()->HandleOnAreaChange(GetAreaEntryByAreaID(m_AreaID));
}
- uint16 areaFlag = GetBaseMap()->GetAreaFlag(GetPositionX(),GetPositionY(),GetPositionZ());
- if (areaFlag == 0xffff)
+ bool isOutdoor;
+ uint16 areaFlag = GetBaseMap()->GetAreaFlag(GetPositionX(),GetPositionY(),GetPositionZ(), &isOutdoor);
+
+ if (sWorld.getConfig(CONFIG_VMAP_INDOOR_CHECK) && !isOutdoor)
+ RemoveAurasWithAttribute(SPELL_ATTR_OUTDOORS_ONLY);
+
+ if (areaFlag==0xffff)
return;
int offset = areaFlag / 32;
@@ -22019,8 +22026,8 @@ void Player::UpdateUnderwaterState(Map* m, float x, float y, float z)
{
m_MirrorTimerFlags &= ~(UNDERWATER_INWATER|UNDERWATER_INLAVA|UNDERWATER_INSLIME|UNDERWARER_INDARKWATER);
// Small hack for enable breath in WMO
- if (IsInWater())
- m_MirrorTimerFlags|=UNDERWATER_INWATER;
+ /* if (IsInWater())
+ m_MirrorTimerFlags|=UNDERWATER_INWATER; */
return;
}