11 m_MinimalDistanceFromPlayersToCatch = 15;
14 m_NoBaitCatchProb = 15;
18 m_AnimationPhaseUsed =
"triggered";
20 m_WaterSurfaceForSetup =
true;
22 m_CatchesPond =
new multiMap<string, float>;
23 m_CatchesPond.Insert(
"Carp",1);
25 m_CatchesSea =
new multiMap<string, float>;
26 m_CatchesSea.Insert(
"Mackerel",1);
31 super.OnVariablesSynchronized();
43 override void SpawnCatch()
49 multiMap<string, float> catches;
54 if (
GetGame().SurfaceIsSea( pos[0], pos[2] ) )
56 catches = m_CatchesSea;
58 else if (
GetGame().SurfaceIsPond( pos[0], pos[2] ) )
60 catches = m_CatchesPond;
63 if ( catches && catches.Count() > 0 )
66 int count = catches.Count() - 1;
67 int randomCatchIndex =
Math.RandomInt( 0, count );
69 if (
Math.RandomFloat(0, 100) < m_FinalCatchProb )
71 catch =
ItemBase.Cast(
GetGame().CreateObjectEx( catches.GetKeyByIndex(randomCatchIndex), m_PreyPos,
ECE_NONE ) );
75 CatchSetQuant(
catch );
97 return IsSurfaceWater( position );
102 if ( !attachment.IsInherited( Worm ) )
105 return super.CanReceiveAttachment( attachment, slotId );
108 #ifdef PLATFORM_WINDOWS
110 override int GetViewIndex()
112 if ( MemoryPointExists(
"invView2" ) )
115 GetInventory().GetCurrentInventoryLocation( il );
164 super.OnPlacementComplete( player, position, orientation );
176 return "placeFishNetTrap_SoundSet";
181 return "fishnet_deploy_SoundSet";
185 class FishNetTrap
extends Trap_FishNet