Пример #1
0
        public EquipmentStorage Supply(Mobile m)
        {
            EquipmentStorage playerGear = new EquipmentStorage(m);

            playerGear.StoreEquip();

            //Supply the right type of gear
            SupplySystem.SupplyGear(m, this);
            return(playerGear);
        }
Пример #2
0
        public override bool OnMoveOver(Mobile m)
        {
            if (m.Alive == false)
            {
                m.SendAsciiMessage("You cannot use that while dead.");
                return(true);
            }

            if (m.AccessLevel >= AccessLevel.Counselor)
            {
                m.SendAsciiMessage("This is not for staff members.");
                return(true);
            }

            if (m is BaseCreature)
            {
                return(Teleport(m));
            }
            else if (m is PlayerMobile)
            {
                if (!m.IsInEvent)
                {
                    if (SupplyType == SupplyType.Custom && !CanUseCustomGear)
                    {
                        PublicOverheadMessage(MessageType.Regular, 906, true, "Custom setup error.");
                        return(false);
                    }

                    //Store our equipment
                    EquipmentStorage playerGear = new EquipmentStorage(m);
                    playerGear.StoreEquip();

                    //Supply the right type of gear
                    SupplySystem.SupplyGear(m, this);

                    //Tag the mobile to be in the event and display a message

                    m.IsInEvent = true;
                    ((PlayerMobile)m).EventType = m_EventType;
                    m.SendAsciiMessage("You have been auto supplied.");
                    return(Teleport(m));
                }
                else
                {
                    m.IsInEvent = false;
                    ((PlayerMobile)m).EventType = EventType.NoEvent;
                    m.SendAsciiMessage("Your auto supply has been removed.");

                    SupplySystem.RemoveEventGear(m);
                    return(Teleport(m));
                }
            }
            return(true);
        }
        public override bool OnMoveOver(Mobile m)
        {
            if (m.Alive == false)
            {
                m.SendAsciiMessage("You cannot use that while dead.");
                return true;
            }

            if (m.AccessLevel >= AccessLevel.Counselor)
            {
                m.SendAsciiMessage("This is not for staff members.");
                return true;
            }

            if (m is BaseCreature)
                return Teleport(m);
            else if (m is PlayerMobile)
            {
                if (!m.IsInEvent)
                {
                    if (SupplyType == SupplyType.Custom && !CanUseCustomGear)
                    {
                        PublicOverheadMessage(MessageType.Regular, 906, true, "Custom setup error.");
                        return false;
                    }

                    //Store our equipment
                    EquipmentStorage playerGear = new EquipmentStorage(m);
                    playerGear.StoreEquip();

                    //Supply the right type of gear
                    SupplySystem.SupplyGear(m, this);

                    //Tag the mobile to be in the event and display a message
                    
                    m.IsInEvent = true;
                    ((PlayerMobile)m).EventType = m_EventType;
                    m.SendAsciiMessage("You have been auto supplied.");
                    return Teleport(m);
                }
                else
                {
                    m.IsInEvent = false;
                    ((PlayerMobile)m).EventType = EventType.NoEvent;
                    m.SendAsciiMessage("Your auto supply has been removed.");

                    SupplySystem.RemoveEventGear(m);
                    return Teleport(m);
                }
            }
            return true;
        }
Пример #4
0
        public EquipmentStorage Supply(Mobile m)
        {
            EquipmentStorage playerGear = new EquipmentStorage(m);
            playerGear.StoreEquip();

            //Supply the right type of gear
            SupplySystem.SupplyGear(m, this);
            return playerGear;
        }
Пример #5
0
        public override bool OnMoveOver(Mobile m)
        {
            if (m.AccessLevel >= AccessLevel.Counselor)
            {
                m.SendAsciiMessage("This is not for staff members.");
                return true;
            }

            if (m is BaseCreature)
                return Teleport(m);
            if (m is PlayerMobile)
            {
                if (!m.Alive)
                {
                    ((PlayerMobile)m).ForceResurrect();
                    return false;
                }

                if (!m.IsInEvent || m_Game != null)
                {
                    if (m_Game != null && m_TeamID != -1)
                    {
                        //Store our equipment
                        EquipmentStorage playerGear = new EquipmentStorage(m);
                        playerGear.StoreEquip();

                        //Supply the right type of gear
                        SupplySystem.SupplyGear(m, this);

                        CWTeam team = (CWTeam)m_Game.Teams[m_TeamID-1];
                        //m_Game.SwitchTeams(m, team);

                        m.SendMessage("You have joined {0}!", team.Name);

                        //Tag the mobile to be in the event and display a message
                        m.IsInEvent = true;
                        m.SendAsciiMessage("You have been auto supplied.");

                        if (m_Game != null && m_Game.Running)
                            return Teleport(m);
                    }
                    else
                    {
                        m.SendMessage("The game has not started yet.");
                        return false;
                    }
                }
                else
                {
                    m.IsInEvent = false;
                    m.SendAsciiMessage("Your auto supply has been removed.");

                    SupplySystem.RemoveEventGear(m);
                    return Teleport(m);
                }
            }
            return true;
        }