Пример #1
0
 protected virtual void RaiseOnOfferPendingEvent(GivePc sender)
 {
     if (OnOfferPending != null)
     {
         OnOfferPending(sender);
     }
 }
Пример #2
0
        public override IQuestAction CreateNew(string source, Quest parentQuest)
        {
            base.CreateNew(source, parentQuest);

            // Source must match pattern
            Match match = Test(source);

            if (!match.Success)
            {
                return(null);
            }

            // Factory new action
            GivePc action = new GivePc(parentQuest);

            action.itemSymbol = new Symbol(match.Groups["anItem"].Value);
            action.textId     = Parser.ParseInt(match.Groups["id"].Value);
            if (!string.IsNullOrEmpty(match.Groups["nothing"].Value))
            {
                action.isNothing = true;
            }
            else
            {
                action.isNothing = false;
            }

            return(action);
        }
Пример #3
0
        bool GiveOffer()
        {
            if (lastPendingOfferSender != null)
            {
                lastPendingOfferSender.OfferImmediately();
                lastPendingOfferSender = null;
                return(true);
            }

            return(false);
        }
Пример #4
0
 private void GivePc_OnOfferPending(Questing.Actions.GivePc sender)
 {
     lastPendingOfferSender = sender;
 }