Exemplo n.º 1
0
        public override void OnAccept()
        {
            if (Owner.Backpack == null)
            {
                return;
            }

            var cloak = Owner.FindItemOnLayer(Layer.Cloak) as GreyCloak;

            if (cloak == null)
            {
                Owner.DropHolding();
                cloak = Owner.Backpack.FindItemByType <GreyCloak>();
            }

            if (cloak == null)
            {
                return;
            }

            cloak.Delete();

            Owner.AddToBackpack(new ShieldOfRecognition());
            Gareth.AddQuestStatus(Owner, HumilityQuestStatus.RewardAccepted);
        }
        public override void OnMovement(Mobile m, Point3D oldLocation)
        {
            if (m is PlayerMobile pm && m_Rec.Contains(m) && m.Backpack != null && Gareth.CheckQuestStatus(pm, HumilityQuestStatus.RewardRefused))
            {
                Item item = m.Backpack.FindItemByType(typeof(GreyCloak));

                if (item == null)
                {
                    item = m.FindItemOnLayer(Layer.Cloak);
                }

                if (item != null && item is GreyCloak cloak && cloak.Owner == m)
                {
                    m.SendLocalizedMessage(1075897); // As you near the shrine a strange energy envelops you. Suddenly, your cloak is transformed into the Cloak of Humility!

                    m.Backpack.DropItem(new HumilityCloak());
                    cloak.Delete();

                    m.PlaySound(0x244);
                    Effects.SendTargetParticles(m, 0x376A, 1, 32, 0x13A6, EffectLayer.Waist);

                    Gareth.AddQuestStatus(pm, HumilityQuestStatus.Finished);
                }
            }
        }
Exemplo n.º 3
0
        public override void GiveRewards()
        {
            base.GiveRewards();

            Gareth.AddQuestStatus(Owner, HumilityQuestStatus.RewardPending);

            var quest = new HumilityProofGump
            {
                Owner   = Owner,
                Quester = null
            };

            Owner.SendGump(new MondainQuestGump(quest));
        }
Exemplo n.º 4
0
        public override void OnRefuse()
        {
            GreyCloak item = Owner.Backpack.FindItemByType(typeof(GreyCloak)) as GreyCloak;

            if (item == null)
            {
                item = Owner.FindItemOnLayer(Layer.Cloak) as GreyCloak;
            }

            if (item != null)
            {
                item.Owner = Owner;
                Gareth.AddQuestStatus(Owner, HumilityQuestStatus.RewardRefused);
            }
        }