*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();
if (pGo->isActiveObject())
SetData(DATA_STRANGE_POOL, DONE);
break;
case GAMEOBJECT_FISHINGNODE_ENTRY:
//todo (yes this works)
break;
}
}
+9 -3
View File
@@ -6627,10 +6627,15 @@ void Spell::EffectTransmitted(uint32 effIndex)
}
Map *cMap = m_caster->GetMap();
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
SendCastResult(SPELL_FAILED_NOT_HERE);
SendChannelUpdate(0);
@@ -6638,7 +6643,8 @@ void Spell::EffectTransmitted(uint32 effIndex)
}
// replace by water level in this case
fz = cMap->GetWaterLevel(fx, fy);
if(cMap->GetId() != 548)//if map is not serpentshrine caverns
fz = cMap->GetWaterLevel(fx, fy);
}
// if gameobject is summoning object, it should be spawned right on caster's position
else if(goinfo->type==GAMEOBJECT_TYPE_SUMMONING_RITUAL)