示例#1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (m_Bandage.Deleted)
                {
                    return;
                }

                if (targeted is Mobile)
                {
                    if (from.InRange(m_Bandage.GetWorldLocation(), Bandage.Range))
                    {
                        if (((Mobile)targeted).Frozen)
                        {
                            if (FireAidsContext.BeginHeal(from, (Mobile)targeted) != null)
                            {
                                m_Bandage.Consume();
                            }
                        }
                        else
                        {
                            from.SendMessage("That is not frozen");
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(500295);                           // You are too far away to do that.
                    }
                }
                else
                {
                    from.SendLocalizedMessage(500970);                       // Bandages can not be used on that.
                }
            }