*enable fishing in Serpentshrine caverns' strange pool

it's a hack but don't have better idea

--HG--
branch : trunk
This commit is contained in:
Rat
2009-08-24 00:07:18 +02:00
parent c782037269
commit 73c66a028c
2 changed files with 13 additions and 3 deletions
@@ -130,6 +130,10 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance
StrangePool = pGo->GetGUID(); StrangePool = pGo->GetGUID();
if (pGo->isActiveObject()) if (pGo->isActiveObject())
SetData(DATA_STRANGE_POOL, DONE); SetData(DATA_STRANGE_POOL, DONE);
break;
case GAMEOBJECT_FISHINGNODE_ENTRY:
//todo (yes this works)
break;
} }
} }
+8 -2
View File
@@ -6627,10 +6627,15 @@ void Spell::EffectTransmitted(uint32 effIndex)
} }
Map *cMap = m_caster->GetMap(); Map *cMap = m_caster->GetMap();
if(goinfo->type==GAMEOBJECT_TYPE_FISHINGNODE) if(goinfo->type==GAMEOBJECT_TYPE_FISHINGNODE)
{ {
if ( !cMap->IsInWater(fx, fy, fz-0.5f, 0.5f)) // Hack to prevent fishing bobber from failing to land on fishing hole //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
{ // but this is not proper, we really need to ignore not materialized objects { // but this is not proper, we really need to ignore not materialized objects
SendCastResult(SPELL_FAILED_NOT_HERE); SendCastResult(SPELL_FAILED_NOT_HERE);
SendChannelUpdate(0); SendChannelUpdate(0);
@@ -6638,6 +6643,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
} }
// replace by water level in this case // 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);
} }
// if gameobject is summoning object, it should be spawned right on caster's position // if gameobject is summoning object, it should be spawned right on caster's position