aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.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/SpellEffects.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/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 4f0c693efbb..2f7486d53d9 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -50,10 +50,10 @@
#include "BattleGroundEY.h"
#include "BattleGroundWS.h"
#include "OutdoorPvPMgr.h"
-#include "VMapFactory.h"
#include "Language.h"
#include "SocialMgr.h"
#include "Util.h"
+#include "VMapFactory.h"
#include "TemporarySummon.h"
#include "CellImpl.h"
#include "GridNotifiers.h"
@@ -7309,13 +7309,8 @@ void Spell::EffectTransmitted(uint32 effIndex)
Map *cMap = m_caster->GetMap();
if (goinfo->type == GAMEOBJECT_TYPE_FISHINGNODE)
{
- //dirty way to hack serpent shrine pool
- if (cMap->GetId() == 548 && m_caster->GetDistance(36.69, -416.38, -19.9645) <= 16)//center of strange pool
- {
- fx = 36.69+irand(-8,8);//random place for the bobber
- fy = -416.38+irand(-8,8);
- fz = -19.9645;//serpentshrine water level
- }else if (!cMap->IsInWater(fx, fy, fz-0.5f, 0.5f)) // Hack to prevent fishing bobber from failing to land on fishing hole
+ LiquidData liqData;
+ if ( !cMap->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);
@@ -7323,8 +7318,8 @@ void Spell::EffectTransmitted(uint32 effIndex)
}
// replace by water level in this case
- if (cMap->GetId() != 548)//if map is not serpentshrine caverns
- fz = cMap->GetWaterLevel(fx, fy);
+ //fz = cMap->GetWaterLevel(fx, fy);
+ fz = liqData.level;
}
// if gameobject is summoning object, it should be spawned right on caster's position
else if (goinfo->type == GAMEOBJECT_TYPE_SUMMONING_RITUAL)