Ejemplo n.º 1
0
        void initAuraData()
        {
            expectedAura = null;

            bool hasAnyAura = (!string.IsNullOrWhiteSpace(AuraName) || AuraId != 0);

            if (!hasAnyAura)
            {
                Log(System.Windows.Media.Color.FromRgb(0xCC, 0, 0), "No aura info. Can eat all items.");
            }

            if (!string.IsNullOrWhiteSpace(AuraName))
            {
                DataManager.AuraCache.TryGetValue(AuraName, out expectedAura);
            }

            if (expectedAura == null)
            {
                DataManager.AuraCache.TryGetValue((uint)AuraId, out expectedAura);
            }

            if (expectedAura == null && hasAnyAura)
            {
                throw new System.Exception(
                          string.Format(
                              "Couldn't locate aura {0}{1}",
                              (string.IsNullOrWhiteSpace(AuraName) ? "" : string.Format("Name: {0} ", AuraName)),
                              (AuraId == 0 ? "" : string.Format("Id: {0}", AuraId))
                              )
                          );
            }
        }
Ejemplo n.º 2
0
 protected override void OnResetCachedDone()
 {
     itemData     = null;
     expectedAura = null;
     _IsDone      = false;
 }