public override void OnResponse(NetState state, RelayInfo info)
        {
            if (m_Follower.Deleted || !m_Follower.IsBonded || !m_Follower.IsDeadPet)
            {
                return;
            }

            Mobile from = state.Mobile;

            if (info.ButtonID == 1)
            {
                if (m_Follower.Map == null || !m_Follower.Map.CanFit(m_Follower.Location, 16, false, false))
                {
                    from.SendLocalizedMessage(503256); // You fail to resurrect the creature.
                    return;
                }

                /*
                 * if (m_Follower.CanBeResurrectedThroughVeterinary && m_Salts == null)
                 * {
                 *  ResurrectPet();
                 * }
                 * */

                if (m_Salts != null && m_Salts.Charges >= m_Follower.ControlSlots)
                {
                    ResurrectPet();
                    m_Salts.Charges -= m_Follower.ControlSlots;

                    if (m_Follower.ResurrectionsRemaining != -1)
                    {
                        m_Follower.ResurrectionsRemaining--;

                        if (m_Follower.ResurrectionsRemaining > 0)
                        {
                            from.SendMessage("You resurrect your target. They may be resurrected " + m_Follower.ResurrectionsRemaining.ToString() + " more time(s) before they fade from creation.");
                        }
                        else
                        {
                            from.SendMessage("You resurrect your target, however you are certain the next time they perish they will fade from creation.");
                        }
                    }

                    if (m_Salts.Charges <= 0)
                    {
                        m_Salts.Delete();
                    }
                }

                else
                {
                    from.SendMessage("There are not enough charges remaining to resurrect this creature.");
                }
            }
        }
Exemple #2
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            if (m_Follower.Deleted || !m_Follower.IsBonded || !m_Follower.IsDeadFollower)
            {
                return;
            }

            Mobile from = state.Mobile;

            if (info.ButtonID == 1)
            {
                if (m_Follower.Map == null || !m_Follower.Map.CanFit(m_Follower.Location, 16, false, false))
                {
                    from.SendLocalizedMessage(503256); // You fail to resurrect the creature.
                    return;
                }

                /*
                 * if (m_Follower.CanBeResurrectedThroughVeterinary && m_Salts == null)
                 * {
                 *  ResurrectPet();
                 * }
                 * */

                if (m_Salts != null && m_Salts.Charges >= m_Follower.ControlSlots)
                {
                    ResurrectPet();
                    m_Salts.Charges -= m_Follower.ControlSlots;

                    if (m_Salts.Charges <= 0)
                    {
                        m_Salts.Delete();
                    }
                }

                else
                {
                    from.SendMessage("There are not enough charges remaining to resurrect this creature.");
                }
            }
        }