private static ValidateUndeepWater ( Server.Map map, object obj, int &z ) : bool | ||
map | Server.Map | |
obj | object | |
z | int | |
return | bool |
public void OnTarget(Mobile from, object obj) { if (Deleted || m_InUse) { return; } IPoint3D p3D = obj as IPoint3D; if (p3D == null) { return; } Map map = from.Map; if (map == null || map == Map.Internal) { return; } int x = p3D.X, y = p3D.Y, z = map.GetAverageZ(x, y); // OSI just takes the targeted Z if (!from.InLOS(obj)) { from.SendLocalizedMessage(500979); // You cannot see that location. } else if (RequireDeepWater ? SpecialFishingNet.FullValidation(map, x, y) : (SpecialFishingNet.ValidateDeepWater(map, x, y) || SpecialFishingNet.ValidateUndeepWater(map, obj, ref z))) { Point3D p = new Point3D(x, y, z); if (GetType() == typeof(SpecialSalvageHook)) { for (int i = 1; i < Amount; ++i) // these were stackable before, doh { from.AddToBackpack(new SpecialSalvageHook()); } } _Tick = 0; m_InUse = true; Movable = false; MoveToWorld(p, map); SpellHelper.Turn(from, p); from.Animate(12, 5, 1, true, false, 0); Effects.SendLocationEffect(p, map, 0x352D, 16, 4); Effects.PlaySound(p, map, 0x364); _EffectTimer = Timer.DelayCall(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.25), new TimerStateCallback(DoEffect), new object[] { p, from }); _EffectTimer.Start(); from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154220); // *You cast the mighty hook into the sea!* } else { from.SendLocalizedMessage(1010485); // You can only use this in deep water! } }