protected virtual void RaiseOnOfferPendingEvent(GivePc sender) { if (OnOfferPending != null) { OnOfferPending(sender); } }
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); }
bool GiveOffer() { if (lastPendingOfferSender != null) { lastPendingOfferSender.OfferImmediately(); lastPendingOfferSender = null; return(true); } return(false); }
private void GivePc_OnOfferPending(Questing.Actions.GivePc sender) { lastPendingOfferSender = sender; }