Help IsInWater

Hey,

I am making a really funny event in icecrown, where ive spawned a ship and you talk to an npc to start the boss encounter. When you start it, earth shatters and the npc yells “RELEASE THE KRAKEN!” and then the big ass kraken like npc (the lurker below) jumps over the ship and lands into the water, then the players has to shoot the kraken from the ship with harpoons /emoticons/default_biggrin.png

And meanwhile fight the kraken at platforms in the water, all that works but i need it so that when a player lands in the water he gets hit by this spell: Frostbite - Spell - World of Warcraft

Ive tried looking in player.cpp


void Player::SetInWater(bool apply)

{

if (m_isInWater == apply)

	 return;



//define player in water by opcodes

//move player's guid into HateOfflineList of those mobs

//which can't swim and move guid back into ThreatList when

//on surface.

//TODO: exist also swimming mobs, and function must be symmetric to enter/leave water


m_isInWater = apply;


// remove auras that need water/land

RemoveAurasWithInterruptFlags(apply ? AURA_INTERRUPT_FLAG_NOT_ABOVEWATER : AURA_INTERRUPT_FLAG_NOT_UNDERWATER);



  if(GetAreaId() == 4064)

	 CastSpell(player, 72121, true); // this is what ive added


getHostileRefManager().updateThreatTables();

}

That didn’t work, and i cant really find other places where the IsInWater() is used, or even how to implement IsInWater in a script. Anyone has an idea how to do it /emoticons/default_smile.png?

Nobody has an idea? /emoticons/default_sad.png