Esempio n. 1
0
        /// <summary>
        /// 添加一个里程碑
        /// </summary>
        /// <param name="type">里程碑类型</param>
        /// <param name="id">里程碑作用对象的唯一标识符</param>
        /// <param name="destination">目标字数</param>
        /// <param name="detail">里程碑备注</param>
        /// <param name="beginTime">里程碑开始时刻</param>
        /// <param name="endTime">里程碑结束时刻</param>
        /// <returns>所添加的里程碑的唯一标识符</returns>
        public string AddMilestone(MilestoneType type, string id, long destination, string detail, DateTime beginTime, DateTime endTime)
        {
            var hid = "HMilestone#" + Guid.NewGuid();

            if (type == MilestoneType.Aritical)
            {
                var        articleRef = this.ArticleDict[id];
                var        bookRef    = this.BookVector.Find(t => t.BookRef.Id == articleRef.BookId).BookRef;
                HMilestone hm         = new HMilestone()
                {
                    Type            = type,
                    Id              = hid,
                    ArticleId       = id,
                    BookId          = bookRef.Id,
                    BeginTimeStamp  = beginTime,
                    EndTimeStamp    = endTime,
                    Destination     = destination,
                    Detail          = detail,
                    IsFinished      = false,
                    IsNotified      = false,
                    FinishTimeStamp = null
                };
                bookRef.Milestones.Add(hm);
                return(hid);
            }
            else
            {
                throw new NotImplementedException();
            }
        }
Esempio n. 2
0
 internal DestinyMilestoneDefinition(int defaultOrder, DestinyDefinitionDisplayProperties displayProperties, bool explorePrioritizesActivityImage,
                                     bool hasPredictableDates, bool isInGameMilestone, MilestoneType milestoneType, Dictionary <uint, MilestoneQuest> quests, bool recruitable,
                                     bool showInExplorer, bool showInMilestones, string friendlyName, string image, MilestoneActivities[] activities, Dictionary <uint, MilestoneReward> rewards,
                                     MilestoneVendor[] vendors, string vendorsDisplayTitle, Dictionary <string, MilestoneValue> values,
                                     bool blacklisted, uint hash, int index, bool redacted)
 {
     DefaultOrder      = defaultOrder;
     DisplayProperties = displayProperties;
     ExplorePrioritizesActivityImage = explorePrioritizesActivityImage;
     HasPredictableDates             = hasPredictableDates;
     IsInGameMilestone   = isInGameMilestone;
     MilestoneType       = milestoneType;
     Quests              = quests.AsReadOnlyDictionaryWithDefinitionKeyOrEmpty <DestinyInventoryItemDefinition, MilestoneQuest>(DefinitionsEnum.DestinyInventoryItemDefinition);
     Recruitable         = recruitable;
     ShowInExplorer      = showInExplorer;
     ShowInMilestones    = showInMilestones;
     FriendlyName        = friendlyName;
     Image               = image;
     Activities          = activities.AsReadOnlyOrEmpty();
     Rewards             = rewards.AsReadOnlyDictionaryOrEmpty();
     Vendors             = vendors.AsReadOnlyOrEmpty();
     VendorsDisplayTitle = vendorsDisplayTitle;
     Blacklisted         = blacklisted;
     Hash     = hash;
     Index    = index;
     Redacted = redacted;
     Values   = values.AsReadOnlyDictionaryOrEmpty();
 }
Esempio n. 3
0
    void init()
    {
        if (m_itemDescriptionText == null)
        {
            m_itemDescriptionText = GameObject.Find("ItemTitle").GetComponent <Text>();
        }
        if (m_currentItemBonusText == null)
        {
            m_currentItemBonusText = GameObject.Find("CurrentItemBonus").GetComponent <Text>();
        }
        if (m_nextItemBonusText == null)
        {
            m_nextItemBonusText = GameObject.Find("NextItemBonus").GetComponent <Text>();
        }

        if (m_coopPanels.Count == 0)
        {
            for (int i = 1; i <= (int)MilestoneType.NUMBER_MILESTONES; ++i)
            {
                m_coopPanels.Add(GameObject.Find("CoopItemPanel_" + i).GetComponent <RectTransform>());
                m_coopPanelImages.Add(m_coopPanels[m_coopPanels.Count - 1].transform.FindChild("ObjectImage").GetComponent <Image>());
            }
        }

        m_selectedMilestone = MilestoneType.EXPANSION;

        updateCoopList();
        updateSelectedMilestone();

        bool ecoGrant = InvestigationManager.GetInstance().isInvestigated(INVESTIGATIONS_ID.ECO_SUBVENCION);

        m_coopPanels [(int)MilestoneType.ECOLOGY].GetComponent <Button> ().interactable = ecoGrant;
    }
 /// <summary>
 /// New Milestone item with initializing values
 /// </summary>
 /// <param name="title">The title for the item</param>
 /// <param name="farref">The relevant FAR</param>
 /// <param name="note">Any qualifying notes</param>
 /// <param name="type">Type of milestoneitem</param>
 /// <param name="threshold">Threshold for the item</param>
 public MilestoneItem(string title, string farref, string note, MilestoneType type, decimal threshold)
 {
     InitObject();
     Type      = type;
     Title     = title;
     Note      = note;
     Threshold = threshold;
     FARRef    = farref;
 }
Esempio n. 5
0
            public bool Update(Interactuable interactuable)
            {
                Milestone.MilestoneType type;

                switch (interactuable.GetType().ToString())
                {
                case "CharacterMB": type = Milestone.MilestoneType.CHARACTER; break;

                case "ObjectMB": type = Milestone.MilestoneType.ITEM; break;

                default: return(false);
                }

                if (!reached && type == this.type && id == ((Representable)interactuable).Element.getId())
                {
                    reached = true;
                }

                return(reached);
            }
Esempio n. 6
0
 public void setType(MilestoneType type)
 {
     this.type = type;
 }
 public MilestoneItemDecayable(string title, string farref, string note, MilestoneType type, decimal threshold, int timespan, bool fCalendar = true) : base(title, farref, note, type, threshold)
 {
     DecayingCurrency = new FlightCurrency(threshold, timespan, fCalendar, string.Empty);
 }
Esempio n. 8
0
 public RecentAchievementMilestone(string szTitle, MilestoneType type, int threshold) : base(szTitle, string.Empty, string.Empty, type, threshold)
 {
     QueryLinkTemplate = "~/Member/LogbookNew.aspx?fq={0}";
 }
        public bool Equals(DestinyMilestoneDefinition input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     DisplayProperties == input.DisplayProperties ||
                     (DisplayProperties != null && DisplayProperties.Equals(input.DisplayProperties))
                     ) &&
                 (
                     DisplayPreference == input.DisplayPreference ||
                     (DisplayPreference != null && DisplayPreference.Equals(input.DisplayPreference))
                 ) &&
                 (
                     Image == input.Image ||
                     (Image != null && Image.Equals(input.Image))
                 ) &&
                 (
                     MilestoneType == input.MilestoneType ||
                     (MilestoneType != null && MilestoneType.Equals(input.MilestoneType))
                 ) &&
                 (
                     Recruitable == input.Recruitable ||
                     (Recruitable != null && Recruitable.Equals(input.Recruitable))
                 ) &&
                 (
                     FriendlyName == input.FriendlyName ||
                     (FriendlyName != null && FriendlyName.Equals(input.FriendlyName))
                 ) &&
                 (
                     ShowInExplorer == input.ShowInExplorer ||
                     (ShowInExplorer != null && ShowInExplorer.Equals(input.ShowInExplorer))
                 ) &&
                 (
                     ShowInMilestones == input.ShowInMilestones ||
                     (ShowInMilestones != null && ShowInMilestones.Equals(input.ShowInMilestones))
                 ) &&
                 (
                     ExplorePrioritizesActivityImage == input.ExplorePrioritizesActivityImage ||
                     (ExplorePrioritizesActivityImage != null && ExplorePrioritizesActivityImage.Equals(input.ExplorePrioritizesActivityImage))
                 ) &&
                 (
                     HasPredictableDates == input.HasPredictableDates ||
                     (HasPredictableDates != null && HasPredictableDates.Equals(input.HasPredictableDates))
                 ) &&
                 (
                     Quests == input.Quests ||
                     (Quests != null && Quests.SequenceEqual(input.Quests))
                 ) &&
                 (
                     Rewards == input.Rewards ||
                     (Rewards != null && Rewards.SequenceEqual(input.Rewards))
                 ) &&
                 (
                     VendorsDisplayTitle == input.VendorsDisplayTitle ||
                     (VendorsDisplayTitle != null && VendorsDisplayTitle.Equals(input.VendorsDisplayTitle))
                 ) &&
                 (
                     Vendors == input.Vendors ||
                     (Vendors != null && Vendors.SequenceEqual(input.Vendors))
                 ) &&
                 (
                     Values == input.Values ||
                     (Values != null && Values.SequenceEqual(input.Values))
                 ) &&
                 (
                     IsInGameMilestone == input.IsInGameMilestone ||
                     (IsInGameMilestone != null && IsInGameMilestone.Equals(input.IsInGameMilestone))
                 ) &&
                 (
                     Activities == input.Activities ||
                     (Activities != null && Activities.SequenceEqual(input.Activities))
                 ) &&
                 (
                     DefaultOrder == input.DefaultOrder ||
                     (DefaultOrder.Equals(input.DefaultOrder))
                 ) &&
                 (
                     Hash == input.Hash ||
                     (Hash.Equals(input.Hash))
                 ) &&
                 (
                     Index == input.Index ||
                     (Index.Equals(input.Index))
                 ) &&
                 (
                     Redacted == input.Redacted ||
                     (Redacted != null && Redacted.Equals(input.Redacted))
                 ));
        }
Esempio n. 10
0
 public void objectClicked(MilestoneType type)
 {
     m_selectedMilestone = type;
     updateSelectedMilestone();
 }
 /// <summary>
 /// Get the display string for an enum by it's value in enum form
 /// </summary>
 /// <param name="value">The enum value in enum form</param>
 /// <returns>The display string for the value or the default if one cannot be found</returns>
 public static string GetByEnum(MilestoneType value)
 {
     return(GetByEnum((int)value));
 }