Beispiel #1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is FishingPole)
                {
                    FishingPole pole = (FishingPole)targeted;

                    if (pole.HookType != HookType.None)
                    {
                        Item hook = null;

                        switch (pole.HookType)
                        {
                        case HookType.None: break;

                        case HookType.Lava: hook = new LavaHook(pole.HookUses); break;

                        case HookType.Dredging: hook = new DredgingHook(pole.HookUses); break;

                        case HookType.JunkProof: hook = new JunkProofHook(pole.HookUses); break;
                        }

                        if (hook != null)
                        {
                            from.AddToBackpack(hook);
                        }
                    }

                    pole.HookType    = m_Hook.HookType;
                    pole.HookUses    = m_Hook.Uses;
                    pole.OriginalHue = pole.Hue;
                    pole.Hue         = m_Hook.Hue;
                    from.SendLocalizedMessage(1150884); //You tie the hook to the fishing line.
                    m_Hook.Delete();
                }
            }
Beispiel #2
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is FishingPole)
                {
                    FishingPole pole = (FishingPole)targeted;

                    if (pole.HookType != HookType.None)
                    {
                        Item hook = null;

                        switch (pole.HookType)
                        {
                            case HookType.None: break;
                            case HookType.Lava: hook = new LavaHook(pole.HookUses); break;
                            case HookType.Dredging: hook = new DredgingHook(pole.HookUses); break;
                            case HookType.JunkProof: hook = new JunkProofHook(pole.HookUses); break;
                        }

                        if (hook != null)
                            from.AddToBackpack(hook);
                    }

                    pole.HookType = m_Hook.HookType;
                    pole.HookUses = m_Hook.Uses;
                    pole.OriginalHue = pole.Hue;
                    pole.Hue = m_Hook.Hue;
                    from.SendLocalizedMessage(1150884); //You tie the hook to the fishing line.
                    m_Hook.Delete();
                }
            }