Beispiel #1
0
 public void OnActorDamage(ref HurtEventResultInfo prm)
 {
     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())
         {
             enumerator2.get_Current().OnActorDamage(ref prm);
         }
         KeyValuePair <uint, PlayerKDA> current2 = enumerator.get_Current();
         if (current2.get_Value().IsHost)
         {
             KeyValuePair <uint, PlayerKDA> current3 = enumerator.get_Current();
             if (current3.get_Value().m_hostHeroDamage != null)
             {
                 KeyValuePair <uint, PlayerKDA>         current4    = enumerator.get_Current();
                 ListView <CHostHeroDamage> .Enumerator enumerator3 = current4.get_Value().m_hostHeroDamage.GetEnumerator();
                 while (enumerator3.MoveNext())
                 {
                     if (enumerator3.get_Current() != null)
                     {
                         enumerator3.get_Current().OnActorDamage(ref prm);
                     }
                 }
             }
         }
     }
 }
Beispiel #2
0
        public bool IsCurSeason(ulong time)
        {
            DictionaryView <uint, ResRankSeasonConf> rankSeasonDict = GameDataMgr.rankSeasonDict;

            if (rankSeasonDict != null)
            {
                DictionaryView <uint, ResRankSeasonConf> .Enumerator enumerator = rankSeasonDict.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    KeyValuePair <uint, ResRankSeasonConf> current = enumerator.get_Current();
                    if (current.get_Value().ullStartTime == Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().m_rankCurSeasonStartTime)
                    {
                        KeyValuePair <uint, ResRankSeasonConf> current2 = enumerator.get_Current();
                        if (current2.get_Value().ullStartTime <= time)
                        {
                            KeyValuePair <uint, ResRankSeasonConf> current3 = enumerator.get_Current();
                            if (time < current3.get_Value().ullEndTime)
                            {
                                return(true);
                            }
                        }
                    }
                }
            }
            return(false);
        }
Beispiel #3
0
 internal void ConvertServerHeroInfo(ref ActorServerData serverData, COMDT_CHOICEHERO serverHeroInfo)
 {
     serverData.SymbolID = new uint[30];
     serverData.m_customRecommendEquips = new ushort[6];
     if (serverHeroInfo == null)
     {
         Debug.Log(string.Format("COMDT_CHOICEHERO is null when try to use hero Id {0}, playerId is {1}", serverData.TheActorMeta.ConfigId, serverData.TheActorMeta.PlayerId));
         DictionaryView <uint, ListView <COMDT_CHOICEHERO> > .Enumerator enumerator = this._serverCachedInfo.GetEnumerator();
         while (enumerator.MoveNext())
         {
             KeyValuePair <uint, ListView <COMDT_CHOICEHERO> > current = enumerator.get_Current();
             uint key = current.get_Key();
             KeyValuePair <uint, ListView <COMDT_CHOICEHERO> > current2 = enumerator.get_Current();
             ListView <COMDT_CHOICEHERO> value = current2.get_Value();
             if (value.get_Count() > 0)
             {
                 Debug.Log(string.Format("_serverCachedInfo key {0} value {1}", key, value.get_Item(0).stBaseInfo.stCommonInfo.dwHeroID));
             }
             else
             {
                 Debug.Log(string.Format("_serverCachedInfo key {0} value empty", key));
             }
         }
         return;
     }
     if (serverHeroInfo.stBaseInfo != null && serverHeroInfo.stBaseInfo.stCommonInfo != null)
     {
         serverData.Exp   = serverHeroInfo.stBaseInfo.stCommonInfo.dwExp;
         serverData.Level = (uint)serverHeroInfo.stBaseInfo.stCommonInfo.wLevel;
         serverData.Star  = (uint)serverHeroInfo.stBaseInfo.stCommonInfo.wStar;
         if (serverHeroInfo.stBaseInfo.stCommonInfo.stQuality != null)
         {
             serverData.TheQualityInfo.Quality    = (uint)serverHeroInfo.stBaseInfo.stCommonInfo.stQuality.wQuality;
             serverData.TheQualityInfo.SubQuality = (uint)serverHeroInfo.stBaseInfo.stCommonInfo.stQuality.wSubQuality;
         }
         if (serverHeroInfo.stBaseInfo.stCommonInfo.stProficiency != null)
         {
             serverData.TheProficiencyInfo.Level       = (uint)serverHeroInfo.stBaseInfo.stCommonInfo.stProficiency.bLv;
             serverData.TheProficiencyInfo.Proficiency = serverHeroInfo.stBaseInfo.stCommonInfo.stProficiency.dwProficiency;
         }
         serverData.SkinId = (uint)serverHeroInfo.stBaseInfo.stCommonInfo.wSkinID;
     }
     if (serverHeroInfo.stBurningInfo != null)
     {
         serverData.TheBurnInfo.HeroRemainingHp = serverHeroInfo.stBurningInfo.dwBloodTTH;
         serverData.TheBurnInfo.IsDead          = (serverHeroInfo.stBurningInfo.bIsDead != 0);
     }
     if (serverHeroInfo.stHeroExtral != null)
     {
         serverData.TheExtraInfo.BornPointIndex = serverHeroInfo.stHeroExtral.iHeroPos;
     }
     for (int i = 0; i < serverHeroInfo.SymbolID.Length; i++)
     {
         serverData.SymbolID[i] = serverHeroInfo.SymbolID[i];
     }
     for (int j = 0; j < serverHeroInfo.HeroEquipList.Length; j++)
     {
         serverData.m_customRecommendEquips[j] = (ushort)serverHeroInfo.HeroEquipList[j];
     }
 }
        public static ListView <IHeroData> GetHostHeroList(bool isIncludeValidExperienceHero, 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())
            {
                if (isIncludeValidExperienceHero)
                {
                    CRoleInfo arg_41_0 = masterRoleInfo;
                    KeyValuePair <uint, CHeroInfo> current = enumerator.get_Current();
                    if (arg_41_0.IsOwnHero(current.get_Key()))
                    {
                        goto IL_66;
                    }
                    CRoleInfo arg_5C_0 = masterRoleInfo;
                    KeyValuePair <uint, CHeroInfo> current2 = enumerator.get_Current();
                    if (arg_5C_0.IsValidExperienceHero(current2.get_Key()))
                    {
                        goto IL_66;
                    }
                    continue;
IL_66:
                    ListView <IHeroData> arg_7C_0           = listView;
                    KeyValuePair <uint, CHeroInfo> current3 = enumerator.get_Current();
                    arg_7C_0.Add(CHeroDataFactory.CreateHeroData(current3.get_Key()));
                }
                else
                {
                    CRoleInfo arg_97_0 = masterRoleInfo;
                    KeyValuePair <uint, CHeroInfo> current4 = enumerator.get_Current();
                    if (arg_97_0.IsOwnHero(current4.get_Key()))
                    {
                        ListView <IHeroData>           arg_B7_0 = listView;
                        KeyValuePair <uint, CHeroInfo> current5 = enumerator.get_Current();
                        arg_B7_0.Add(CHeroDataFactory.CreateHeroData(current5.get_Key()));
                    }
                }
            }
            if (CSysDynamicBlock.bLobbyEntryBlocked)
            {
                for (int i = listView.get_Count() - 1; i >= 0; i--)
                {
                    IHeroData heroData = listView.get_Item(i);
                    if (heroData.heroCfgInfo.bIOSHide > 0)
                    {
                        listView.Remove(heroData);
                    }
                }
            }
            CHeroOverviewSystem.SortHeroList(ref listView, sortType, false);
            return(listView);
        }
        public static ListView <IHeroData> GetTrainingHeroList(CMallSortHelper.HeroViewSortType sortType = CMallSortHelper.HeroViewSortType.Name)
        {
            ListView <IHeroData> listView       = new ListView <IHeroData>();
            List <uint>          list           = new List <uint>();
            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.get_Current();
                if ((current.get_Value().MaskBits & 2u) > 0u)
                {
                    ListView <IHeroData>           arg_63_0 = listView;
                    KeyValuePair <uint, CHeroInfo> current2 = enumerator.get_Current();
                    arg_63_0.Add(CHeroDataFactory.CreateHeroData(current2.get_Key()));
                    List <uint> arg_79_0 = list;
                    KeyValuePair <uint, CHeroInfo> current3 = enumerator.get_Current();
                    arg_79_0.Add(current3.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));
                    list.Add(masterRoleInfo.freeHeroList.get_Item(i).dwFreeHeroID);
                }
            }
            ListView <ResHeroCfgInfo> allHeroList = CHeroDataFactory.GetAllHeroList();

            for (int j = 0; j < allHeroList.get_Count(); j++)
            {
                if (allHeroList.get_Item(j).bIsTrainUse == 1 && !list.Contains(allHeroList.get_Item(j).dwCfgID))
                {
                    listView.Add(CHeroDataFactory.CreateHeroData(allHeroList.get_Item(j).dwCfgID));
                }
            }
            if (CSysDynamicBlock.bLobbyEntryBlocked)
            {
                for (int k = listView.get_Count() - 1; k >= 0; k--)
                {
                    IHeroData heroData = listView.get_Item(k);
                    if (heroData.heroCfgInfo.bIOSHide > 0)
                    {
                        listView.Remove(heroData);
                    }
                }
            }
            CHeroOverviewSystem.SortHeroList(ref listView, sortType, false);
            return(listView);
        }
Beispiel #6
0
        public void LateUpdate()
        {
            if (this._heroWrapDict == null)
            {
                return;
            }
            if (!Singleton <WatchController> .GetInstance().IsWatching)
            {
                this.CloseForm();
                bool flag = true;
                if (flag)
                {
                    Singleton <SettlementSystem> .GetInstance().ShowSettlementPanel(true);
                }
                Singleton <GameBuilder> .GetInstance().EndGame();

                return;
            }
            uint curFrameNum = Singleton <FrameSynchr> .GetInstance().CurFrameNum;

            if (curFrameNum < this._lastUpdateFrame + 3u)
            {
                return;
            }
            this._lastUpdateFrame = curFrameNum;
            DictionaryView <uint, HeroInfoItem> .Enumerator enumerator = this._heroWrapDict.GetEnumerator();
            while (enumerator.MoveNext())
            {
                KeyValuePair <uint, HeroInfoItem> current = enumerator.get_Current();
                current.get_Value().LateUpdate();
                if (this._kdaChanged)
                {
                    KeyValuePair <uint, HeroInfoItem> current2 = enumerator.get_Current();
                    current2.get_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;
        }
Beispiel #7
0
        private void UpdateKingOfKiller()
        {
            SLevelContext curLvelContext = Singleton <BattleLogic> .get_instance().GetCurLvelContext();

            if (curLvelContext == null || curLvelContext.m_headPtsUpperLimit <= 0)
            {
                return;
            }
            CPlayerKDAStat playerKDAStat = Singleton <BattleLogic> .GetInstance().battleStat.m_playerKDAStat;

            if (playerKDAStat == null)
            {
                return;
            }
            uint playerId = 0u;
            int  num      = 0;

            DictionaryView <uint, PlayerKDA> .Enumerator enumerator = playerKDAStat.GetEnumerator();
            while (enumerator.MoveNext())
            {
                KeyValuePair <uint, PlayerKDA> current = enumerator.get_Current();
                if (current.get_Value() != null)
                {
                    KeyValuePair <uint, PlayerKDA> current2 = enumerator.get_Current();
                    if (current2.get_Value().numKill > num)
                    {
                        KeyValuePair <uint, PlayerKDA> current3 = enumerator.get_Current();
                        num = current3.get_Value().numKill;
                        KeyValuePair <uint, PlayerKDA> current4 = enumerator.get_Current();
                        playerId = current4.get_Value().PlayerId;
                    }
                }
            }
            if (num > this.m_lastMostKill)
            {
                Player player = Singleton <GamePlayerCenter> .get_instance().GetPlayer(playerId);

                if (player != null && player.Captain != this.m_kingActor)
                {
                    if (this.m_kingActor && this.m_kingActor.get_handle().EffectControl != null)
                    {
                        this.m_kingActor.get_handle().EffectControl.EndKingOfKillerEffect();
                    }
                    this.m_kingActor = player.Captain;
                    if (this.m_kingActor && this.m_kingActor.get_handle().EffectControl != null)
                    {
                        this.m_kingActor.get_handle().EffectControl.StartKingOfKillerEffect();
                    }
                }
                this.m_lastMostKill = num;
            }
        }
Beispiel #8
0
 public void CopyRefParams(Action resource)
 {
     this.refParamsSrc = resource.refParams;
     this.refParams.ClearParams();
     DictionaryView <string, SRefParam> .Enumerator enumerator = this.refParamsSrc.refParamList.GetEnumerator();
     while (enumerator.MoveNext())
     {
         DictionaryView <string, SRefParam> arg_5B_0 = this.refParams.refParamList;
         KeyValuePair <string, SRefParam>   current  = enumerator.get_Current();
         string arg_5B_1 = current.get_Key();
         KeyValuePair <string, SRefParam> current2 = enumerator.get_Current();
         arg_5B_0.Add(arg_5B_1, current2.get_Value().Clone());
     }
 }
Beispiel #9
0
 public void Reset_Data()
 {
     DictionaryView <uint, Dictionary <uint, int> > .Enumerator enumerator = this._hero_map.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <uint, Dictionary <uint, int> > current = enumerator.get_Current();
         if (current.get_Value() != null)
         {
             KeyValuePair <uint, Dictionary <uint, int> > current2 = enumerator.get_Current();
             current2.get_Value().Clear();
         }
     }
     this.curSelect_LevelIndex = -1;
 }
        public void GetCampsByScoreRank(RES_STAR_CONDITION_DATA_SUB_TYPE inDataSubType, out List <COM_PLAYERCAMP> result, out List <int> resultScore)
        {
            result      = new List <COM_PLAYERCAMP>();
            resultScore = new List <int>();
            Dictionary <uint, int> dictionary = new Dictionary <uint, int>();

            DictionaryView <uint, CampInfo> .Enumerator enumerator = this.campStat.GetEnumerator();
            while (enumerator.MoveNext())
            {
                KeyValuePair <uint, CampInfo> current = enumerator.get_Current();
                CampInfo value = current.get_Value();
                if (value != null)
                {
                    KeyValuePair <uint, CampInfo> current2 = enumerator.get_Current();
                    uint key   = current2.get_Key();
                    int  score = value.GetScore(inDataSubType);
                    if (score >= 0)
                    {
                        dictionary.Add(key, score);
                    }
                }
            }
            Dictionary <uint, int> .Enumerator enumerator2 = dictionary.GetEnumerator();
            while (enumerator2.MoveNext())
            {
                KeyValuePair <uint, int> current3 = enumerator2.get_Current();
                COM_PLAYERCAMP           key2     = current3.get_Key();
                KeyValuePair <uint, int> current4 = enumerator2.get_Current();
                int  value2 = current4.get_Value();
                bool flag   = false;
                int  count  = result.get_Count();
                for (int i = 0; i < count; i++)
                {
                    if (resultScore.get_Item(i) < value2)
                    {
                        result.Insert(i, key2);
                        resultScore.Insert(i, value2);
                        flag = true;
                        break;
                    }
                }
                if (!flag)
                {
                    result.Add(key2);
                    resultScore.Add(value2);
                }
            }
            DebugHelper.Assert(resultScore.get_Count() == result.get_Count());
        }
Beispiel #11
0
        public void LoadConfigServer()
        {
            this.ClearSeverData();
            int count = GameDataMgr.svr2BannerImageDict.get_Count();

            if (count > 0)
            {
                this.m_BannerImage                 = new BannerImageSys.BannerImage();
                this.m_BannerImage.verisoncode     = 0;
                this.m_BannerImage.ImageListCount  = count;
                this.m_BannerImage.m_ImageInfoList = new BannerImageSys.BannerImageInfo[count];
                DictionaryView <uint, ResBannerImage> .Enumerator enumerator = GameDataMgr.svr2BannerImageDict.GetEnumerator();
                int num = 0;
                while (enumerator.MoveNext())
                {
                    KeyValuePair <uint, ResBannerImage> current = enumerator.get_Current();
                    ResBannerImage value = current.get_Value();
                    this.m_BannerImage.m_ImageInfoList[num]             = new BannerImageSys.BannerImageInfo();
                    this.m_BannerImage.m_ImageInfoList[num].resImgInfo  = value;
                    this.m_BannerImage.m_ImageInfoList[num].imgLoadSucc = false;
                    num++;
                }
            }
            if (this.m_BannerImage != null)
            {
                this.PreloadBannerImage();
            }
        }
Beispiel #12
0
        private ListView <ResHeadImage> GetCurHeadImgList(HeadIconSys.enHeadImgTab curTab)
        {
            ListView <ResHeadImage> listView = null;

            if (!this.headImageDic.TryGetValue(curTab, ref listView))
            {
                DictionaryView <uint, ResHeadImage> .Enumerator enumerator = GameDataMgr.headImageDict.GetEnumerator();
                RES_HEADIMG_SOURCE_TYPE headType = this.GetHeadType(curTab);
                listView = new ListView <ResHeadImage>();
                if (GameDataMgr.headImageDict.get_Count() == 0)
                {
                    return(listView);
                }
                while (enumerator.MoveNext())
                {
                    KeyValuePair <uint, ResHeadImage> current = enumerator.get_Current();
                    ResHeadImage value = current.get_Value();
                    if (headType == 7 || headType == value.bHeadType)
                    {
                        listView.Add(value);
                    }
                }
                this.headImageDic.Add(curTab, listView);
            }
            return(listView);
        }
Beispiel #13
0
        public void LogCurrentStates()
        {
            string text = string.Format("LogCurrentStates {0} {1}", base.GetClassTypeName(), this.Agents.get_Count());

            using (List <World.HeapItem_t> .Enumerator enumerator = this.Agents.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    World.HeapItem_t current = enumerator.get_Current();
                    using (DictionaryView <int, Agent> .Enumerator enumerator2 = current.agents.GetEnumerator())
                    {
                        while (enumerator2.MoveNext())
                        {
                            KeyValuePair <int, Agent> current2 = enumerator2.get_Current();
                            if (current2.get_Value().IsMasked())
                            {
                                current2.get_Value().LogVariables(true);
                            }
                        }
                    }
                }
            }
            if (base.IsMasked())
            {
                base.LogVariables(true);
            }
        }
Beispiel #14
0
 private void btexec_agents()
 {
     this.Agents.Sort();
     for (int i = 0; i < this.Agents.get_Count(); i++)
     {
         using (DictionaryView <int, Agent> .Enumerator enumerator = this.Agents.get_Item(i).agents.GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 KeyValuePair <int, Agent> current = enumerator.get_Current();
                 if (current.get_Value().IsActive())
                 {
                     current.get_Value().btexec();
                     if (!this.m_bTickAgents)
                     {
                         break;
                     }
                 }
             }
         }
     }
     if (Agent.IdMask() != 0u)
     {
         int     contextId = base.GetContextId();
         Context context   = Context.GetContext(contextId);
         context.LogStaticVariables(null);
     }
 }
    public void Clear()
    {
        Singleton <CSoundManager> .GetInstance().UnLoadBank("System_Call", CSoundManager.BankType.Battle);

        this.UnRegInBattleEvent();
        Singleton <InBattleMsgMgr> .get_instance().inbatEntList.Clear();

        DictionaryView <ulong, BubbleTimerEntity> .Enumerator enumerator = this.player_bubbleTime_map.GetEnumerator();
        while (enumerator.MoveNext())
        {
            KeyValuePair <ulong, BubbleTimerEntity> current = enumerator.get_Current();
            BubbleTimerEntity value = current.get_Value();
            if (value != null)
            {
                value.Clear();
            }
        }
        this.player_bubbleTime_map.Clear();
        this.contentList = null;
        if (this.m_cdButton != null)
        {
            this.m_cdButton.Clear();
            this.m_cdButton = null;
        }
        this.m_CUIForm    = null;
        this.m_battleForm = null;
        Singleton <CUIManager> .GetInstance().CloseForm(InBattleShortcut.InBattleMsgView_FORM_PATH);
    }
Beispiel #16
0
 public void InheritRefParams(Action resource)
 {
     DictionaryView <string, SRefParam> .Enumerator enumerator = resource.refParams.refParamList.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <string, SRefParam> current = enumerator.get_Current();
         string key = current.get_Key();
         KeyValuePair <string, SRefParam> current2 = enumerator.get_Current();
         SRefParam        value    = current2.get_Value();
         RefParamOperator arg_5D_0 = this.refParams;
         KeyValuePair <string, SRefParam> current3 = enumerator.get_Current();
         string arg_5D_1 = current3.get_Key();
         KeyValuePair <string, SRefParam> current4 = enumerator.get_Current();
         arg_5D_0.SetOrAddRefParam(arg_5D_1, current4.get_Value());
     }
 }
Beispiel #17
0
    public override bool CheckArguments(string[] InArguments, out string OutMessage)
    {
        if (!base.CheckArguments(InArguments, ref OutMessage))
        {
            return(false);
        }
        bool flag = false;
        uint num  = (uint)CheatCommandBase.SmartConvert <int>(InArguments[0]);

        if (num == 0u)
        {
            flag = true;
        }
        else
        {
            DictionaryView <uint, CHeroInfo> .Enumerator enumerator = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().GetHeroInfoDic().GetEnumerator();

            while (enumerator.MoveNext())
            {
                uint arg_51_0 = num;
                KeyValuePair <uint, CHeroInfo> current = enumerator.get_Current();
                if (arg_51_0 == current.get_Key())
                {
                    flag = true;
                    break;
                }
            }
        }
        if (!flag)
        {
            OutMessage = "错误的英雄ID";
            return(false);
        }
        return(true);
    }
Beispiel #18
0
 private void LoadDynamicData(CSPkg msg)
 {
     this.LoadInfo(ref msg.stPkgData.get_stWealDataNtf().stWealList);
     this.LoadStatistic(ref msg.stPkgData.get_stWealDataNtf().stWealConData);
     this.LoadPointsData(msg.stPkgData.get_stWealDataNtf().stWealPointData);
     if (this._actvDict != null)
     {
         uint[] array = new uint[this._actvDict.get_Count()];
         int    num   = 0;
         DictionaryView <uint, Activity> .Enumerator enumerator = this._actvDict.GetEnumerator();
         while (enumerator.MoveNext())
         {
             KeyValuePair <uint, Activity> current = enumerator.get_Current();
             Activity value = current.get_Value();
             value.CheckTimeState();
             if (value.timeState == Activity.TimeState.InHiding || value.timeState == Activity.TimeState.Close || (value.Completed && (value.TimeType == 1 || value.TimeType == 2)))
             {
                 array[num++] = value.Key;
             }
         }
         for (int i = 0; i < num; i++)
         {
             this.RemoveActivity(array[i]);
         }
         this._NotifyStateChanged();
         this.StartTimer();
     }
 }
Beispiel #19
0
		public Action PlayAction(DictionaryView<string, GameObject> dictionary)
		{
			Action action = ActionManager.Instance.LoadActionResource(this.actionName);
			if (action == null)
			{
				return null;
			}
			GameObject[] array = (GameObject[])this.targets.Clone();
			using (DictionaryView<string, GameObject>.Enumerator enumerator = dictionary.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					KeyValuePair<string, GameObject> current = enumerator.get_Current();
					int num = -1;
					bool flag = action.TemplateObjectIds.TryGetValue(current.get_Key(), ref num);
					if (flag)
					{
						array[num] = current.get_Value();
					}
				}
			}
			if (Time.frameCount <= this.lastActionFrame + 1)
			{
				return null;
			}
			this.lastAction = ActionManager.Instance.PlayAction(this.actionName, this.autoPlay, this.stopConflictActions, array);
			this.lastActionFrame = Time.frameCount;
			return this.lastAction;
		}
        public uint GetBestPlayer()
        {
            DictionaryView <uint, PlayerKDA> .Enumerator enumerator = Singleton <BattleStatistic> .get_instance().m_playerKDAStat.GetEnumerator();

            float num  = GameDataMgr.GetGlobeValue(185) / 10000f;
            float num2 = GameDataMgr.GetGlobeValue(186) / 10000f;
            float num3 = GameDataMgr.GetGlobeValue(187) / 10000f;
            uint  num4 = this.m_lastBestPlayer;
            float num5 = 0f;
            int   num6 = 0;

            while (enumerator.MoveNext())
            {
                KeyValuePair <uint, PlayerKDA> current = enumerator.get_Current();
                PlayerKDA value = current.get_Value();
                float     num7  = (float)value.numKill * num + (float)value.numAssist * num2 - (float)value.numDead * num3;
                if (Mathf.Approximately(num7, num5))
                {
                    KeyValuePair <uint, PlayerKDA> current2 = enumerator.get_Current();
                    if (current2.get_Value().numKill >= num6)
                    {
                        if (value.PlayerId != this.m_lastBestPlayer)
                        {
                            num4 = value.PlayerId;
                        }
                        num5 = num7;
                        KeyValuePair <uint, PlayerKDA> current3 = enumerator.get_Current();
                        num6 = current3.get_Value().numKill;
                    }
                }
                else if (num7 >= num5)
                {
                    num4 = value.PlayerId;
                    num5 = num7;
                    KeyValuePair <uint, PlayerKDA> current4 = enumerator.get_Current();
                    num6 = current4.get_Value().numKill;
                }
            }
            if (Mathf.Approximately(num5, 0f))
            {
                this.m_lastBestPlayer = 0u;
                return(0u);
            }
            this.m_lastBestPlayer = num4;
            return(num4);
        }
Beispiel #21
0
        public float GetTeamKDA(COM_PLAYERCAMP camp)
        {
            float num = 0f;

            DictionaryView <uint, PlayerKDA> .Enumerator enumerator = this.m_PlayerKDA.GetEnumerator();
            while (enumerator.MoveNext())
            {
                KeyValuePair <uint, PlayerKDA> current = enumerator.get_Current();
                if (current.get_Value().PlayerCamp == camp)
                {
                    float arg_46_0 = num;
                    KeyValuePair <uint, PlayerKDA> current2 = enumerator.get_Current();
                    num = arg_46_0 + current2.get_Value().KDAValue;
                }
            }
            return(num);
        }
Beispiel #22
0
        public int GetTeamDeadNum(COM_PLAYERCAMP camp)
        {
            int num = 0;

            DictionaryView <uint, PlayerKDA> .Enumerator enumerator = this.m_PlayerKDA.GetEnumerator();
            while (enumerator.MoveNext())
            {
                KeyValuePair <uint, PlayerKDA> current = enumerator.get_Current();
                if (current.get_Value().PlayerCamp == camp)
                {
                    int arg_42_0 = num;
                    KeyValuePair <uint, PlayerKDA> current2 = enumerator.get_Current();
                    num = arg_42_0 + current2.get_Value().numDead;
                }
            }
            return(num);
        }
Beispiel #23
0
 public void UpdateLogic(int nDelta)
 {
     DictionaryView <ulong, BufferMark> .Enumerator enumerator = this.buffMarkSet.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <ulong, BufferMark> current = enumerator.get_Current();
         current.get_Value().UpdateLogic(nDelta);
     }
 }
Beispiel #24
0
 public void DumpDebugInfo()
 {
     DictionaryView <uint, PlayerKDA> .Enumerator enumerator = this.m_PlayerKDA.GetEnumerator();
     while (enumerator.MoveNext())
     {
         string arg_2A_0 = "PlayerKDA Id {0}";
         KeyValuePair <uint, PlayerKDA> current = enumerator.get_Current();
         Debug.Log(string.Format(arg_2A_0, current.get_Key()));
     }
 }
Beispiel #25
0
 public void Clear()
 {
     DictionaryView <ulong, BufferMark> .Enumerator enumerator = this.buffMarkSet.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <ulong, BufferMark> current = enumerator.get_Current();
         BufferMark value = current.get_Value();
         value.SetCurLayer(0);
     }
     this.buffMarkSet.Clear();
 }
Beispiel #26
0
 public void ResetChangedVariables()
 {
     using (DictionaryView <string, Variables> .Enumerator enumerator = this.m_static_variables.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             KeyValuePair <string, Variables> current = enumerator.get_Current();
             current.get_Value().Reset();
         }
     }
 }
Beispiel #27
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.get_Current();
             if (current.get_Value().Entrance == entry)
             {
                 KeyValuePair <uint, Activity> current2 = enumerator.get_Current();
                 if (current2.get_Value().ReadyForDot)
                 {
                     return(true);
                 }
             }
         }
     }
     return(false);
 }
Beispiel #28
0
 private void ClearDelayTimers()
 {
     DictionaryView <int, GlobalTrigger.CDelayMatch> .Enumerator enumerator = this.DelayTimeSeqMap.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <int, GlobalTrigger.CDelayMatch> current = enumerator.get_Current();
         int key = current.get_Key();
         Singleton <CTimerManager> .get_instance().RemoveTimer(key);
     }
     this.DelayTimeSeqMap.Clear();
 }
 public void ClearParams()
 {
     DictionaryView <string, SRefParam> .Enumerator enumerator = this.refParamList.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <string, SRefParam> current = enumerator.get_Current();
         SRefParam value = current.get_Value();
         value.Destroy();
     }
     this.refParamList.Clear();
 }
Beispiel #30
0
        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.get_Current();
                    if (filter.Invoke(current.get_Value()))
                    {
                        ListView <Activity>           arg_4C_0 = listView;
                        KeyValuePair <uint, Activity> current2 = enumerator.get_Current();
                        arg_4C_0.Add(current2.get_Value());
                    }
                }
            }
            return(listView);
        }