示例#1
0
        public RefData AddRefData(string name, FieldInfo field, object data)
        {
            ListView <RefData> view;

            if (this.refDataList == null)
            {
                this.refDataList = new DictionaryView <string, ListView <RefData> >();
            }
            if (!this.refDataList.TryGetValue(name, out view))
            {
                view = new ListView <RefData>();
                this.refDataList.Add(name, view);
            }
            RefData item = new RefData(field, data);

            view.Add(item);
            return(item);
        }
示例#2
0
 protected virtual void Awake()
 {
     GlobalTrailRendererCount++;
     if (GlobalTrailRendererCount == 1)
     {
         _matToTrailList = new DictionaryView <Material, ListView <PCTrail> >();
         _toClean        = new ListView <Mesh>();
     }
     this._fadingTrails = new ListView <PCTrail>();
     this._t            = base.transform;
     this._emit         = this.Emit;
     if (this._emit)
     {
         this._activeTrail = new PCTrail(this.GetMaxNumberOfPoints());
         this._activeTrail.IsActiveTrail = true;
         this.OnStartEmit();
     }
 }
示例#3
0
 public void OnHeroLearnTalent(PoolObjHandle <ActorRoot> hero, sbyte talentLevel, uint talentID)
 {
     DictionaryView <uint, PlayerKDA> .Enumerator enumerator = this.m_PlayerKDA.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <uint, PlayerKDA> current     = enumerator.Current;
         ListView <HeroKDA> .Enumerator enumerator2 = current.get_Value().GetEnumerator();
         while (enumerator2.MoveNext())
         {
             if (hero == enumerator2.Current.actorHero)
             {
                 enumerator2.Current.TalentArr[(int)talentLevel].dwTalentID   = talentID;
                 enumerator2.Current.TalentArr[(int)talentLevel].dwLearnLevel = (uint)hero.handle.ValueComponent.actorSoulLevel;
                 return;
             }
         }
     }
 }
 private void OnActorDamageAtker(ref HurtEventResultInfo prm)
 {
     if (prm.atker && prm.atker.handle.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero && prm.hurtInfo.hurtType != HurtTypeDef.Therapic)
     {
         DictionaryView <uint, NONHERO_STATISTIC_INFO> dictionaryView;
         if (!this.m_NonHeroInfo.TryGetValue((uint)prm.atker.handle.TheActorMeta.ActorType, out dictionaryView))
         {
             dictionaryView = new DictionaryView <uint, NONHERO_STATISTIC_INFO>();
             this.m_NonHeroInfo.Add((uint)prm.atker.handle.TheActorMeta.ActorType, dictionaryView);
         }
         NONHERO_STATISTIC_INFO nONHERO_STATISTIC_INFO;
         if (!dictionaryView.TryGetValue((uint)prm.atker.handle.TheActorMeta.ActorCamp, out nONHERO_STATISTIC_INFO))
         {
             nONHERO_STATISTIC_INFO = new NONHERO_STATISTIC_INFO();
             dictionaryView.Add((uint)prm.atker.handle.TheActorMeta.ActorCamp, nONHERO_STATISTIC_INFO);
         }
         nONHERO_STATISTIC_INFO.uiTotalAttackNum += 1u;
         nONHERO_STATISTIC_INFO.uiTotalHurtCount += (uint)prm.hurtTotal;
         nONHERO_STATISTIC_INFO.uiHurtMax         = ((nONHERO_STATISTIC_INFO.uiHurtMax > (uint)prm.hurtTotal) ? nONHERO_STATISTIC_INFO.uiHurtMax : ((uint)prm.hurtTotal));
         nONHERO_STATISTIC_INFO.uiHurtMin         = ((nONHERO_STATISTIC_INFO.uiHurtMin < (uint)prm.hurtTotal) ? nONHERO_STATISTIC_INFO.uiHurtMin : ((uint)prm.hurtTotal));
         DebugHelper.Assert(prm.atker.handle.SkillControl != null, "empty skill control");
         if (prm.atker.handle.SkillControl != null && prm.atker.handle.SkillControl.stSkillStat != null && prm.atker.handle.SkillControl.stSkillStat.SkillStatistictInfo != null)
         {
             int  atkSlot = (int)prm.hurtInfo.atkSlot;
             int  num     = prm.atker.handle.SkillControl.stSkillStat.SkillStatistictInfo.Length;
             bool flag    = atkSlot >= 0 && atkSlot < num;
             if (flag)
             {
                 SKILLSTATISTICTINFO sKILLSTATISTICTINFO = prm.atker.handle.SkillControl.stSkillStat.SkillStatistictInfo[(int)prm.hurtInfo.atkSlot];
                 nONHERO_STATISTIC_INFO.uiAttackDistanceMax = (uint)sKILLSTATISTICTINFO.iAttackDistanceMax;
                 if (prm.atker.handle.SkillControl.CurUseSkillSlot != null && prm.atker.handle.SkillControl.CurUseSkillSlot.SkillObj != null && prm.atker.handle.SkillControl.CurUseSkillSlot.SkillObj.cfgData != null)
                 {
                     uint num2 = prm.atker.handle.SkillControl.CurUseSkillSlot.SkillObj.cfgData.iMaxAttackDistance;
                     nONHERO_STATISTIC_INFO.uiAttackDistanceMin = ((nONHERO_STATISTIC_INFO.uiAttackDistanceMin < num2) ? nONHERO_STATISTIC_INFO.uiAttackDistanceMin : num2);
                 }
             }
         }
         if (nONHERO_STATISTIC_INFO.uiFirstBeAttackTime == 0u)
         {
             nONHERO_STATISTIC_INFO.uiFirstBeAttackTime = (uint)Singleton <FrameSynchr> .instance.LogicFrameTick;
         }
         this.m_NonHeroInfo[(uint)prm.atker.handle.TheActorMeta.ActorType][(uint)prm.atker.handle.TheActorMeta.ActorCamp] = nONHERO_STATISTIC_INFO;
     }
 }
示例#5
0
        public void LateUpdate()
        {
            if (this._heroWrapDict != null)
            {
                if (!Singleton <WatchController> .GetInstance().IsWatching)
                {
                    this.CloseForm();
                    Singleton <SettlementSystem> .GetInstance().ShowSettlementPanel(true);

                    Singleton <GameBuilder> .GetInstance().EndGame();
                }
                else if ((Singleton <FrameSynchr> .GetInstance().CurFrameNum % 5) == 0)
                {
                    DictionaryView <uint, HeroInfoItem> .Enumerator enumerator = this._heroWrapDict.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        KeyValuePair <uint, HeroInfoItem> current = enumerator.Current;
                        current.Value.LateUpdate();
                        if (this._kdaChanged)
                        {
                            KeyValuePair <uint, HeroInfoItem> pair2 = enumerator.Current;
                            pair2.Value.ValidateKDA();
                        }
                    }
                    if (this._heroInfoHud != null)
                    {
                        this._heroInfoHud.LateUpdate();
                        if (this._kdaChanged)
                        {
                            this._heroInfoHud.ValidateKDA();
                        }
                    }
                    if (this._scoreHud != null)
                    {
                        this._scoreHud.LateUpdate();
                    }
                    if (this._replayControl != null)
                    {
                        this._replayControl.LateUpdate();
                    }
                    this._kdaChanged = false;
                }
            }
        }
示例#6
0
 private void OnActorDamageAtker(ref HurtEventResultInfo prm)
 {
     if (((prm.atker != 0) && (prm.atker.handle.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero)) && (prm.hurtInfo.hurtType != HurtTypeDef.Therapic))
     {
         DictionaryView <uint, NONHERO_STATISTIC_INFO> view;
         NONHERO_STATISTIC_INFO nonhero_statistic_info;
         if (!this.m_NonHeroInfo.TryGetValue((uint)prm.atker.handle.TheActorMeta.ActorType, out view))
         {
             view = new DictionaryView <uint, NONHERO_STATISTIC_INFO>();
             this.m_NonHeroInfo.Add((uint)prm.atker.handle.TheActorMeta.ActorType, view);
         }
         if (!view.TryGetValue((uint)prm.atker.handle.TheActorMeta.ActorCamp, out nonhero_statistic_info))
         {
             nonhero_statistic_info = new NONHERO_STATISTIC_INFO();
             view.Add((uint)prm.atker.handle.TheActorMeta.ActorCamp, nonhero_statistic_info);
         }
         nonhero_statistic_info.uiTotalAttackNum++;
         nonhero_statistic_info.uiTotalHurtCount += (uint)prm.hurtTotal;
         nonhero_statistic_info.uiHurtMax         = (nonhero_statistic_info.uiHurtMax <= prm.hurtTotal) ? ((uint)prm.hurtTotal) : nonhero_statistic_info.uiHurtMax;
         nonhero_statistic_info.uiHurtMin         = (nonhero_statistic_info.uiHurtMin >= prm.hurtTotal) ? ((uint)prm.hurtTotal) : nonhero_statistic_info.uiHurtMin;
         DebugHelper.Assert(prm.atker.handle.SkillControl != null, "empty skill control");
         if (prm.atker.handle.SkillControl.CurUseSkillSlot != null)
         {
             nonhero_statistic_info.uiAttackDistanceMax = (uint)prm.atker.handle.SkillControl.CurUseSkillSlot.SkillStatistictInfo.iAttackDistanceMax;
             uint iMaxAttackDistance = (uint)prm.atker.handle.SkillControl.CurUseSkillSlot.SkillObj.cfgData.iMaxAttackDistance;
             nonhero_statistic_info.uiAttackDistanceMin = (nonhero_statistic_info.uiAttackDistanceMin >= iMaxAttackDistance) ? iMaxAttackDistance : nonhero_statistic_info.uiAttackDistanceMin;
         }
         else if (prm.atker.handle.SkillControl.SkillSlotArray[0] != null)
         {
             nonhero_statistic_info.uiAttackDistanceMax = (uint)prm.atker.handle.SkillControl.SkillSlotArray[0].SkillStatistictInfo.iAttackDistanceMax;
             uint num2 = 0;
             if ((prm.atker.handle.SkillControl.SkillSlotArray[0].SkillObj != null) && (prm.atker.handle.SkillControl.SkillSlotArray[0].SkillObj.cfgData != null))
             {
                 num2 = (uint)prm.atker.handle.SkillControl.SkillSlotArray[0].SkillObj.cfgData.iMaxAttackDistance;
             }
             nonhero_statistic_info.uiAttackDistanceMin = (nonhero_statistic_info.uiAttackDistanceMin >= num2) ? num2 : nonhero_statistic_info.uiAttackDistanceMin;
         }
         if (nonhero_statistic_info.uiFirstBeAttackTime == 0)
         {
             nonhero_statistic_info.uiFirstBeAttackTime = (uint)Singleton <FrameSynchr> .instance.LogicFrameTick;
         }
         this.m_NonHeroInfo[(uint)prm.atker.handle.TheActorMeta.ActorType][(uint)prm.atker.handle.TheActorMeta.ActorCamp] = nonhero_statistic_info;
     }
 }
示例#7
0
        public static ListView <UrlAction> ParseFromText(string text, char[] spliter = null)
        {
            ListView <UrlAction> view = new ListView <UrlAction>();

            if (spliter == null)
            {
                spliter = MultiSpliter;
            }
            try
            {
                string[] strArray = text.Split(spliter, StringSplitOptions.RemoveEmptyEntries);
                for (int i = 0; i < strArray.Length; i++)
                {
                    string[] strArray2 = strArray[i].Split(InnerSpliter, StringSplitOptions.RemoveEmptyEntries);
                    if (strArray2.Length > 0)
                    {
                        DictionaryView <string, string> view2 = new DictionaryView <string, string>();
                        for (int j = 1; j < strArray2.Length; j++)
                        {
                            string[] strArray3 = strArray2[j].Split(ParamSpliter);
                            if ((strArray3 != null) && (strArray3.Length == 2))
                            {
                                view2.Add(strArray3[0], strArray3[1]);
                            }
                        }
                        UrlAction item = new UrlAction {
                            target = strArray2[0],
                            action = Action.none
                        };
                        if (view2.ContainsKey("action"))
                        {
                            string key = view2["action"];
                            if (key != null)
                            {
                                int num3;
                                if (< > f__switch$map2 == null)
                                {
                                    Dictionary <string, int> dictionary = new Dictionary <string, int>(3);
                                    dictionary.Add("openUrl", 0);
                                    dictionary.Add("openForm", 1);
                                    dictionary.Add("buy", 2);
                                    < > f__switch$map2 = dictionary;
                                }
示例#8
0
        private void ClearUiForms()
        {
            DictionaryView <int, CUIFormScript> .Enumerator enumerator = this.m_uiFormMap.GetEnumerator();
            while (enumerator.MoveNext())
            {
                CUIManager instance = Singleton <CUIManager> .GetInstance();

                KeyValuePair <int, CUIFormScript> current = enumerator.Current;
                instance.CloseForm(current.get_Value());
            }
            this.m_uiFormMap.Clear();
            this.m_curUiForm = null;
            if (this.m_curUiFormPortrait != null)
            {
                Singleton <CUIManager> .GetInstance().CloseForm(this.m_curUiFormPortrait);

                this.m_curUiFormPortrait = null;
            }
        }
示例#9
0
 public void Update()
 {
     for (int i = 0; i < this.acceptUpdatedObjectList.Count; i++)
     {
         ApolloObject apolloObject = this.acceptUpdatedObjectList[i];
         if (apolloObject.Removable)
         {
             this.removedUpdatableList.Add(apolloObject);
         }
         else
         {
             apolloObject.Update();
         }
     }
     for (int j = 0; j < this.removedUpdatableList.Count; j++)
     {
         ApolloObject apolloObject2 = this.removedUpdatableList[j];
         if (apolloObject2 != null)
         {
             this.RemoveAcceptUpdatedObject(apolloObject2);
         }
     }
     this.removedUpdatableList.Clear();
     DictionaryView <ulong, ApolloObject> .Enumerator enumerator = this.dictObjectCollection.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <ulong, ApolloObject> current = enumerator.Current;
         ApolloObject value = current.get_Value();
         if (value.Removable)
         {
             this.removedReflectibleList.Add(value);
         }
     }
     for (int k = 0; k < this.removedReflectibleList.Count; k++)
     {
         ApolloObject apolloObject3 = this.removedReflectibleList[k];
         if (apolloObject3 != null)
         {
             this.RemoveObject(apolloObject3);
         }
     }
     this.removedReflectibleList.Clear();
 }
示例#10
0
 private void CreateStatic()
 {
     if (this._actvDict == null)
     {
         this._actvDict = new DictionaryView <uint, Activity>();
     }
     DictionaryView <uint, ResWealCheckIn> .Enumerator enumerator = GameDataMgr.wealCheckInDict.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <uint, ResWealCheckIn> current = enumerator.Current;
         this.TryAdd(new CheckInActivity(this, current.Value));
     }
     DictionaryView <uint, ResWealFixedTime> .Enumerator enumerator2 = GameDataMgr.wealFixtimeDict.GetEnumerator();
     while (enumerator2.MoveNext())
     {
         KeyValuePair <uint, ResWealFixedTime> pair2 = enumerator2.Current;
         this.TryAdd(new FixTimeActivity(this, pair2.Value));
     }
     DictionaryView <uint, ResWealMultiple> .Enumerator enumerator3 = GameDataMgr.wealMultipleDict.GetEnumerator();
     while (enumerator3.MoveNext())
     {
         KeyValuePair <uint, ResWealMultiple> pair3 = enumerator3.Current;
         this.TryAdd(new MultiGainActivity(this, pair3.Value));
     }
     DictionaryView <uint, ResCltWealExchange> .Enumerator enumerator4 = GameDataMgr.wealExchangeDict.GetEnumerator();
     while (enumerator4.MoveNext())
     {
         KeyValuePair <uint, ResCltWealExchange> pair4 = enumerator4.Current;
         this.TryAdd(new ExchangeActivity(this, pair4.Value));
     }
     DictionaryView <uint, ResWealCondition> .Enumerator enumerator5 = GameDataMgr.wealConditionDict.GetEnumerator();
     while (enumerator5.MoveNext())
     {
         KeyValuePair <uint, ResWealCondition> pair5 = enumerator5.Current;
         this.TryAdd(new ExeTaskActivity(this, pair5.Value));
     }
     DictionaryView <uint, ResWealText> .Enumerator enumerator6 = GameDataMgr.wealNoticeDict.GetEnumerator();
     while (enumerator6.MoveNext())
     {
         KeyValuePair <uint, ResWealText> pair6 = enumerator6.Current;
         this.TryAdd(new NoticeActivity(this, pair6.Value));
     }
 }
示例#11
0
 public void Update()
 {
     for (int i = 0; i < this.acceptUpdatedObjectList.Count; i++)
     {
         ApolloObject item = this.acceptUpdatedObjectList[i];
         if (item.Removable)
         {
             this.removedUpdatableList.Add(item);
         }
         else
         {
             item.Update();
         }
     }
     for (int j = 0; j < this.removedUpdatableList.Count; j++)
     {
         ApolloObject obj3 = this.removedUpdatableList[j];
         if (obj3 != null)
         {
             this.RemoveAcceptUpdatedObject(obj3);
         }
     }
     this.removedUpdatableList.Clear();
     DictionaryView <ulong, ApolloObject> .Enumerator enumerator = this.dictObjectCollection.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <ulong, ApolloObject> current = enumerator.Current;
         ApolloObject obj4 = current.Value;
         if (obj4.Removable)
         {
             this.removedReflectibleList.Add(obj4);
         }
     }
     for (int k = 0; k < this.removedReflectibleList.Count; k++)
     {
         ApolloObject obj5 = this.removedReflectibleList[k];
         if (obj5 != null)
         {
             this.RemoveObject(obj5);
         }
     }
     this.removedReflectibleList.Clear();
 }
示例#12
0
        public void OnHeroSoulLvlChange(PoolObjHandle <ActorRoot> hero, int level)
        {
            DictionaryView <uint, PlayerKDA> .Enumerator enumerator = this.m_PlayerKDA.GetEnumerator();
            while (enumerator.MoveNext())
            {
                KeyValuePair <uint, PlayerKDA> current     = enumerator.Current;
                IEnumerator <HeroKDA>          enumerator2 = current.Value.GetEnumerator();
                while (enumerator2.MoveNext())
                {
                    if (hero == enumerator2.Current.actorHero)
                    {
                        enumerator2.Current.SoulLevel = Math.Max(level, 1);
                        Singleton <EventRouter> .instance.BroadCastEvent(EventID.BATTLE_KDA_CHANGED);

                        return;
                    }
                }
            }
        }
        public void Clear()
        {
            this.m_bShareTask     = false;
            this._openActivityKey = 0u;
            this.OnCloseCampaignForm(null);
            if (this._actvDict != null)
            {
                DictionaryView <uint, Activity> .Enumerator enumerator = this._actvDict.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    KeyValuePair <uint, Activity> current = enumerator.Current;
                    current.get_Value().Clear();
                }
                this._actvDict = null;
            }
            Singleton <CTimerManager> .GetInstance().RemoveTimerSafely(ref this._checkTimer);

            Singleton <CTimerManager> .GetInstance().RemoveTimerSafely(ref this._refreshTimer);
        }
示例#14
0
        private void newFile()
        {
            ipaView.Dispose();
            docView.Dispose();
            dictView.Dispose();
            exView.Dispose();

            ipaView  = new IpaKeyboardView();
            docView  = new LanguageDocumentationView();
            dictView = new DictionaryView();
            exView   = new ExampleListView();

            currentFile = "";
            Title       = AppSettings.WindowTitle;

            currView = ViewType.IpaKeyboard;
            viewContainer.Add(ipaView);
            ShowAll();
        }
        protected DictionaryView <TriggerActionBase, RefParamOperator> DoActorEnterShared(ref PoolObjHandle <ActorRoot> inActor)
        {
            DictionaryView <TriggerActionBase, RefParamOperator> dictionaryView = new DictionaryView <TriggerActionBase, RefParamOperator>();

            TriggerActionWrapper[] internalActList = this.m_internalActList;
            for (int i = 0; i < internalActList.Length; i++)
            {
                TriggerActionWrapper triggerActionWrapper = internalActList[i];
                if (triggerActionWrapper != null)
                {
                    RefParamOperator refParamOperator = triggerActionWrapper.TriggerEnter(inActor, this.thisActor, this);
                    if (refParamOperator != null)
                    {
                        dictionaryView.Add(triggerActionWrapper.GetActionInternal(), refParamOperator);
                    }
                }
            }
            return(dictionaryView);
        }
示例#16
0
 public HashSet <object> GetDataByIndex(int id)
 {
     this.Reload();
     if (this.bLoaded)
     {
         DictionaryView <long, HashSet <object> > .Enumerator enumerator = this.mapItems.GetEnumerator();
         int num = 0;
         while (enumerator.MoveNext())
         {
             if (num == id)
             {
                 KeyValuePair <long, HashSet <object> > current = enumerator.Current;
                 return(current.get_Value());
             }
             num++;
         }
     }
     return(null);
 }
示例#17
0
        public void OnActorBattleCoinChanged(PoolObjHandle <ActorRoot> actor, int changeValue, int currentValue, bool isIncome)
        {
            DictionaryView <uint, PlayerKDA> .Enumerator enumerator = this.m_PlayerKDA.GetEnumerator();
            while (enumerator.MoveNext())
            {
                KeyValuePair <uint, PlayerKDA> current     = enumerator.Current;
                IEnumerator <HeroKDA>          enumerator2 = current.Value.GetEnumerator();
                while (enumerator2.MoveNext())
                {
                    if (actor == enumerator2.Current.actorHero)
                    {
                        enumerator2.Current.OnActorBattleCoinChanged(actor, changeValue, currentValue, isIncome);
                        Singleton <EventRouter> .instance.BroadCastEvent(EventID.BATTLE_KDA_CHANGED);

                        return;
                    }
                }
            }
        }
示例#18
0
        public void OnHeroBattleEquipChange(uint actorId, stEquipInfo[] equips)
        {
            DictionaryView <uint, PlayerKDA> .Enumerator enumerator = this.m_PlayerKDA.GetEnumerator();
            while (enumerator.MoveNext())
            {
                KeyValuePair <uint, PlayerKDA> current     = enumerator.Current;
                IEnumerator <HeroKDA>          enumerator2 = current.Value.GetEnumerator();
                while (enumerator2.MoveNext())
                {
                    if ((enumerator2.Current != null) && (enumerator2.Current.actorHero.handle.ObjID == actorId))
                    {
                        equips.CopyTo(enumerator2.Current.Equips, 0);
                        Singleton <EventRouter> .instance.BroadCastEvent(EventID.BATTLE_KDA_CHANGED);

                        return;
                    }
                }
            }
        }
示例#19
0
        public ListView <Activity> GetActivityList(Func <Activity, bool> filter)
        {
            ListView <Activity> view = new ListView <Activity>();

            if (this._actvDict != null)
            {
                DictionaryView <uint, Activity> .Enumerator enumerator = this._actvDict.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    KeyValuePair <uint, Activity> current = enumerator.Current;
                    if (filter.Invoke(current.Value))
                    {
                        KeyValuePair <uint, Activity> pair2 = enumerator.Current;
                        view.Add(pair2.Value);
                    }
                }
            }
            return(view);
        }
示例#20
0
    private void AddActionsFromSkill(DictionaryView <string, Action> actions, int skillID)
    {
        if (skillID <= 0)
        {
            return;
        }
        ResSkillCfgInfo dataByKey = GameDataMgr.skillDatabin.GetDataByKey((long)skillID);

        if (dataByKey == null)
        {
            return;
        }
        this.AddAction(actions, dataByKey.szPrefab);
        string text = StringHelper.UTF8BytesToString(ref dataByKey.szGuidePrefab);

        if (text != null && !this.prefabDict.ContainsKey(text))
        {
            this.prefabDict.Add(text, false);
        }
    }
        public override void Init()
        {
            this.m_bShareTask  = false;
            this._actvDict     = null;
            this._checkTimer   = 0;
            this._refreshTimer = 0;
            this._campaignForm = new CampaignForm(this);
            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Activity_OpenForm, new CUIEventManager.OnUIEventHandler(this.OnOpenCampaignForm));

            Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Activity_CloseForm, new CUIEventManager.OnUIEventHandler(this.OnCloseCampaignForm));

            Singleton <EventRouter> .instance.AddEventHandler("IDIPNOTICE_UNREAD_NUM_UPDATE", new Action(this.OnIDIPNoticeUpdate));

            Singleton <EventRouter> .GetInstance().AddEventHandler(EventID.GLOBAL_REFRESH_TIME, new Action(ActivitySys.OnResetAllExchangeCount));

            for (int i = 0; i < 3; i++)
            {
                this.m_ActivtyTabName[i] = Singleton <CTextManager> .GetInstance().GetText("Activty_Tab_Index_" + i);
            }
        }
        public ListView <Activity> GetActivityList(Func <Activity, bool> filter)
        {
            ListView <Activity> listView = new ListView <Activity>();

            if (this._actvDict != null)
            {
                DictionaryView <uint, Activity> .Enumerator enumerator = this._actvDict.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    KeyValuePair <uint, Activity> current = enumerator.Current;
                    if (filter.Invoke(current.get_Value()))
                    {
                        ListView <Activity>           listView2 = listView;
                        KeyValuePair <uint, Activity> current2  = enumerator.Current;
                        listView2.Add(current2.get_Value());
                    }
                }
            }
            return(listView);
        }
示例#23
0
 public bool CheckReadyForDot(RES_WEAL_ENTRANCE_TYPE entry)
 {
     if (this._actvDict != null)
     {
         DictionaryView <uint, Activity> .Enumerator enumerator = this._actvDict.GetEnumerator();
         while (enumerator.MoveNext())
         {
             KeyValuePair <uint, Activity> current = enumerator.Current;
             if (current.Value.Entrance == entry)
             {
                 KeyValuePair <uint, Activity> pair2 = enumerator.Current;
                 if (pair2.Value.ReadyForDot)
                 {
                     return(true);
                 }
             }
         }
     }
     return(false);
 }
示例#24
0
        public void Clear()
        {
            int num  = this._duration / 60;
            int num2 = this._duration - (num * 60);

            if (num2 < 0)
            {
                num2 = 0;
            }
            string   duration = string.Format("{0:D2}:{1:D2}", num, num2);
            DateTime time     = Utility.ToUtcTime2Local((long)this._startTime);

            object[] args      = new object[] { time.Year, time.Month, time.Day, time.Hour, time.Minute };
            string   startTime = string.Format("{0:D4}/{1:D2}/{2:D2} {3:D2}:{4:D2}", args);

            Singleton <SettlementSystem> .instance.SetLastMatchDuration(duration, startTime, (uint)this._startTime);

            this._duration  = 0;
            this._startTime = 0;
            DictionaryView <uint, CampInfo> campStat = Singleton <BattleLogic> .GetInstance().battleStat.GetCampStat();

            if (campStat.ContainsKey(1))
            {
                campStat[1].onCampScoreChanged -= new CampInfo.CampInfoValueChanged(this.validateScore);
            }
            if (campStat.ContainsKey(2))
            {
                campStat[2].onCampScoreChanged -= new CampInfo.CampInfoValueChanged(this.validateScore);
            }
            Singleton <EventRouter> .instance.RemoveEventHandler(EventID.BATTLE_KDA_CHANGED, new System.Action(this.OnBattleKDAChanged));

            Singleton <EventRouter> .instance.RemoveEventHandler(EventID.BATTLE_KDA_CHANGED_BY_ACTOR_DEAD, new System.Action(this.OnBattleKDAChangedByActorDead));

            this._root        = null;
            this._leftScore   = null;
            this._rightScore  = null;
            this._txtTime     = null;
            this.levelContext = null;
            this.m_kingActor.Release();
            this.m_lastMostKill = 0;
        }
        public static ListView <IHeroData> GetPvPHeroList(CMallSortHelper.HeroViewSortType sortType = CMallSortHelper.HeroViewSortType.Name)
        {
            ListView <IHeroData> listView       = new ListView <IHeroData>();
            CRoleInfo            masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo == null)
            {
                return(listView);
            }
            DictionaryView <uint, CHeroInfo> .Enumerator enumerator = masterRoleInfo.GetHeroInfoDic().GetEnumerator();
            while (enumerator.MoveNext())
            {
                KeyValuePair <uint, CHeroInfo> current = enumerator.Current;
                if ((current.get_Value().MaskBits & 2u) > 0u)
                {
                    ListView <IHeroData>           listView2 = listView;
                    KeyValuePair <uint, CHeroInfo> current2  = enumerator.Current;
                    listView2.Add(CHeroDataFactory.CreateHeroData(current2.get_Key()));
                }
            }
            for (int i = 0; i < masterRoleInfo.freeHeroList.get_Count(); i++)
            {
                if (!masterRoleInfo.GetHeroInfoDic().ContainsKey(masterRoleInfo.freeHeroList.get_Item(i).dwFreeHeroID))
                {
                    listView.Add(CHeroDataFactory.CreateHeroData(masterRoleInfo.freeHeroList.get_Item(i).dwFreeHeroID));
                }
            }
            if (CSysDynamicBlock.bLobbyEntryBlocked)
            {
                for (int j = listView.Count - 1; j >= 0; j--)
                {
                    IHeroData heroData = listView[j];
                    if (heroData.heroCfgInfo.bIOSHide > 0)
                    {
                        listView.Remove(heroData);
                    }
                }
            }
            CHeroOverviewSystem.SortHeroList(ref listView, sortType, false);
            return(listView);
        }
        public TValue[] GetAllValueArray()
        {
            ListLinqView <TValue> view = new ListLinqView <TValue>();

            DictionaryView <TKey, HashSet <TValue> > .Enumerator enumerator = base.GetEnumerator();
            while (enumerator.MoveNext())
            {
                KeyValuePair <TKey, HashSet <TValue> > current = enumerator.Current;
                HashSet <TValue> set = current.Value;
                if (set != null)
                {
                    IEnumerator enumerator2 = set.GetEnumerator();
                    while (enumerator2.MoveNext())
                    {
                        TValue item = (TValue)enumerator2.Current;
                        view.Add(item);
                    }
                }
            }
            return(view.ToArray());
        }
示例#27
0
        public void OnHeroBattleEquipChange(uint actorId, stEquipInfo[] equips, bool bIsAdd, int iEquipSlotIndex)
        {
            DictionaryView <uint, PlayerKDA> .Enumerator enumerator = this.m_PlayerKDA.GetEnumerator();
            while (enumerator.MoveNext())
            {
                KeyValuePair <uint, PlayerKDA> current     = enumerator.get_Current();
                ListView <HeroKDA> .Enumerator enumerator2 = current.get_Value().GetEnumerator();
                while (enumerator2.MoveNext())
                {
                    if (enumerator2.get_Current() != null && enumerator2.get_Current().actorHero.get_handle().ObjID == actorId)
                    {
                        equips.CopyTo(enumerator2.get_Current().Equips, 0);
                        Singleton <EventRouter> .get_instance().BroadCastEvent(EventID.BATTLE_KDA_CHANGED);

                        Singleton <EventRouter> .get_instance().BroadCastEvent(EventID.BATTLE_HERO_PROPERTY_CHANGED);

                        return;
                    }
                }
            }
        }
        public TValue[] GetAllValueArray()
        {
            ListLinqView <TValue> listLinqView = new ListLinqView <TValue>();

            DictionaryView <TKey, HashSet <TValue> > .Enumerator enumerator = base.GetEnumerator();
            while (enumerator.MoveNext())
            {
                KeyValuePair <TKey, HashSet <TValue> > current = enumerator.get_Current();
                HashSet <TValue> value = current.get_Value();
                if (value != null)
                {
                    IEnumerator enumerator2 = value.GetEnumerator();
                    while (enumerator2.MoveNext())
                    {
                        TValue tValue = (TValue)((object)enumerator2.get_Current());
                        listLinqView.Add(tValue);
                    }
                }
            }
            return(listLinqView.ToArray());
        }
示例#29
0
        public TValue[] GetValuesAll()
        {
            ListLinqView <TValue> view = new ListLinqView <TValue>();

            DictionaryView <TKey, ListView <TValue> > .Enumerator enumerator = base.GetEnumerator();
            while (enumerator.MoveNext())
            {
                KeyValuePair <TKey, ListView <TValue> > current = enumerator.Current;
                ListView <TValue> view2 = current.Value;
                if (view2 != null)
                {
                    IEnumerator enumerator2 = view2.GetEnumerator();
                    while (enumerator2.MoveNext())
                    {
                        TValue item = (TValue)enumerator2.Current;
                        view.Add(item);
                    }
                }
            }
            return(view.ToArray());
        }
示例#30
0
            private bool ReQuery(Agent pAgent)
            {
                Query query = base.GetNode() as Query;

                if (query != null)
                {
                    List <Query.Descriptor_t> descriptors = query.GetDescriptors();
                    if (descriptors.get_Count() > 0)
                    {
                        DictionaryView <string, BehaviorTree> behaviorTrees = Workspace.GetBehaviorTrees();
                        BehaviorTree behaviorTree = null;
                        float        num          = -1f;
                        using (DictionaryView <string, BehaviorTree> .Enumerator enumerator = behaviorTrees.GetEnumerator())
                        {
                            while (enumerator.MoveNext())
                            {
                                KeyValuePair <string, BehaviorTree> current = enumerator.get_Current();
                                BehaviorTree value   = current.get_Value();
                                string       domains = value.GetDomains();
                                if (string.IsNullOrEmpty(query.m_domain) || (!string.IsNullOrEmpty(domains) && domains.IndexOf(query.m_domain) != -1))
                                {
                                    List <BehaviorTree.Descriptor_t> descriptors2 = value.GetDescriptors();
                                    float num2 = query.ComputeSimilarity(descriptors, descriptors2);
                                    if (num2 > num)
                                    {
                                        num          = num2;
                                        behaviorTree = value;
                                    }
                                }
                            }
                        }
                        if (behaviorTree != null)
                        {
                            pAgent.btreferencetree(behaviorTree.GetName());
                            return(true);
                        }
                    }
                }
                return(false);
            }
示例#31
0
        private bool HasValidCommand(DictionaryView<string, ICheatCommand> InCommands)
        {
            var iter = InCommands.GetEnumerator();

            while (iter.MoveNext())
            {
                if (iter.Current.Value.isSupportInEditor)
                {
                    return true;
                }
            }

            return false;
        }