Exemplo n.º 1
0
        public int GetKillDragonNum()
        {
            int num      = 0;
            int dragonId = Singleton <BattleLogic> .instance.DragonId;

            for (int i = 0; i < this.m_deadRecordList.Count; i++)
            {
                DeadRecord record = this.m_deadRecordList[i];
                if (dragonId == record.cfgId)
                {
                    num++;
                }
                else
                {
                    DeadRecord record2 = this.m_deadRecordList[i];
                    if (record2.actorType == ActorTypeDef.Actor_Type_Monster)
                    {
                        DeadRecord record3 = this.m_deadRecordList[i];
                        if (record3.actorSubType == 2)
                        {
                            DeadRecord        record4 = this.m_deadRecordList[i];
                            ResMonsterCfgInfo dataCfgInfoByCurLevelDiff = MonsterDataHelper.GetDataCfgInfoByCurLevelDiff(record4.cfgId);
                            if ((dataCfgInfoByCurLevelDiff != null) && (dataCfgInfoByCurLevelDiff.bSoldierType == 9))
                            {
                                num++;
                            }
                        }
                    }
                }
            }
            return(num);
        }
Exemplo n.º 2
0
        private void OnNextSpawnGroups(ref NextSpawnGroupsParam prm)
        {
            if (prm.OldGroup == null)
            {
                return;
            }
            for (int i = 0; i < this.node_ary.Count; i++)
            {
                DragonIcon.DragonNode dragonNode = this.node_ary[i];
                if (dragonNode != null && dragonNode.spawnGroup == prm.OldGroup)
                {
                    dragonNode.spawnGroup = prm.NextGroups[0];
                }
            }
            ActorMeta         actorMeta = prm.OldGroup.TheActorsMeta[0];
            ResMonsterCfgInfo dataCfgInfoByCurLevelDiff = MonsterDataHelper.GetDataCfgInfoByCurLevelDiff(actorMeta.ConfigId);

            if (dataCfgInfoByCurLevelDiff == null)
            {
                return;
            }
            if (dataCfgInfoByCurLevelDiff.bSoldierType == 9)
            {
                KillDetailInfo killDetailInfo = new KillDetailInfo();
                killDetailInfo.bSelfCamp = true;
                killDetailInfo.Type      = KillDetailInfoType.Info_Type_5V5SmallDragon_Suicide;
                Singleton <EventRouter> .instance.BroadCastEvent <KillDetailInfo>(EventID.AchievementRecorderEvent, killDetailInfo);

                KillDetailInfo killDetailInfo2 = new KillDetailInfo();
                killDetailInfo2.bSelfCamp = true;
                killDetailInfo2.Type      = KillDetailInfoType.Info_Type_5V5SmallDragon_Enter;
                Singleton <EventRouter> .instance.BroadCastEvent <KillDetailInfo>(EventID.AchievementRecorderEvent, killDetailInfo2);
            }
        }
Exemplo n.º 3
0
        public void Init(GameObject mmNode_ugui, GameObject bmNode_ugui, GameObject mmNode_3dui, GameObject bmNode_3dui, bool b5V5)
        {
            this.m_b5v5 = b5V5;
            Singleton <EventRouter> .GetInstance().AddEventHandler <ActorRoot>("Dragon_born", new Action <ActorRoot>(this.onDragon_Born));

            Singleton <EventRouter> .GetInstance().AddEventHandler <ActorRoot>("Dragon_dead", new Action <ActorRoot>(this.onDragon_Dead));

            Singleton <GameEventSys> .instance.AddEventHandler <NextSpawnGroupsParam>(GameEventDef.Event_NextSpawnGroups, new RefAction <NextSpawnGroupsParam>(this.OnNextSpawnGroups));

            for (int i = 0; i < mmNode_ugui.transform.childCount; i++)
            {
                mmNode_ugui.transform.GetChild(i).gameObject.CustomSetActive(false);
            }
            for (int j = 0; j < bmNode_ugui.transform.childCount; j++)
            {
                bmNode_ugui.transform.GetChild(j).gameObject.CustomSetActive(false);
            }
            for (int k = 0; k < mmNode_3dui.transform.childCount; k++)
            {
                mmNode_3dui.transform.GetChild(k).gameObject.CustomSetActive(false);
            }
            for (int l = 0; l < bmNode_3dui.transform.childCount; l++)
            {
                bmNode_3dui.transform.GetChild(l).gameObject.CustomSetActive(false);
            }
            this.node_ary.Add(new DragonIcon.DragonNode(mmNode_ugui, bmNode_ugui, mmNode_3dui, bmNode_3dui, "d_3", 7, 0));
            this.node_ary.Add(new DragonIcon.DragonNode(mmNode_ugui, bmNode_ugui, mmNode_3dui, bmNode_3dui, "d_5_big", 8, 0));
            this.node_ary.Add(new DragonIcon.DragonNode(mmNode_ugui, bmNode_ugui, mmNode_3dui, bmNode_3dui, "d_5_small_1", 9, 13));
            this.node_ary.Add(new DragonIcon.DragonNode(mmNode_ugui, bmNode_ugui, mmNode_3dui, bmNode_3dui, "d_5_small_2", 9, 13));
            ListView <SpawnGroup> spawnGroups = Singleton <BattleLogic> .instance.mapLogic.GetSpawnGroups();

            if (spawnGroups != null)
            {
                for (int m = 0; m < spawnGroups.Count; m++)
                {
                    SpawnGroup spawnGroup = spawnGroups[m];
                    if (spawnGroup != null)
                    {
                        ActorMeta         actorMeta = spawnGroup.TheActorsMeta[0];
                        ResMonsterCfgInfo dataCfgInfoByCurLevelDiff = MonsterDataHelper.GetDataCfgInfoByCurLevelDiff(actorMeta.ConfigId);
                        if (dataCfgInfoByCurLevelDiff != null)
                        {
                            bool flag = dataCfgInfoByCurLevelDiff.bSoldierType == 8 || dataCfgInfoByCurLevelDiff.bSoldierType == 9 || dataCfgInfoByCurLevelDiff.bSoldierType == 7 || dataCfgInfoByCurLevelDiff.bSoldierType == 13;
                            if (flag && !spawnGroup.bTriggerSpawn)
                            {
                                DragonIcon.DragonNode dragonNode = this.getDragonNode(dataCfgInfoByCurLevelDiff.bSoldierType);
                                if (dragonNode != null)
                                {
                                    dragonNode.spawnGroup = spawnGroup;
                                    dragonNode.SetData(spawnGroup.gameObject.transform.position, (int)dataCfgInfoByCurLevelDiff.bSoldierType, 0u, this.m_b5v5, true, true, true);
                                    dragonNode.ShowDead(true);
                                    MiniMapSysUT.RefreshMapPointerBig(dragonNode.bmDragonNode_3dui);
                                }
                            }
                        }
                    }
                }
            }
            this.m_cdTimer = Singleton <CTimerManager> .GetInstance().AddTimer(1000, 0, new CTimer.OnTimeUpHandler(this.OnCDTimer));
        }
Exemplo n.º 4
0
 private void SetBossIcon(ActorRoot inActor)
 {
     if (inActor != null)
     {
         string str = UT.Bytes2String(MonsterDataHelper.GetDataCfgInfoByCurLevelDiff(inActor.TheActorMeta.ConfigId).szBossIcon);
         if (!string.IsNullOrEmpty(str))
         {
             this.boss_icon.SetSprite(str, this.map_fromScript, true, false, false);
         }
         else
         {
             this.boss_icon.SetSprite("UGUI/Sprite/Dynamic/BustCircle/50001", this.map_fromScript, true, false, false);
         }
     }
 }
Exemplo n.º 5
0
        public int GetBaronDeadCount(COM_PLAYERCAMP killerCamp)
        {
            int num = 0;

            for (int i = 0; i < this.m_deadRecordList.Count; i++)
            {
                DeadRecord record = this.m_deadRecordList[i];
                if (((killerCamp == record.killerCamp) && (record.actorType == ActorTypeDef.Actor_Type_Monster)) && (record.actorSubType == 2))
                {
                    ResMonsterCfgInfo dataCfgInfoByCurLevelDiff = MonsterDataHelper.GetDataCfgInfoByCurLevelDiff(record.cfgId);
                    if ((dataCfgInfoByCurLevelDiff != null) && (dataCfgInfoByCurLevelDiff.bSoldierType == 8))
                    {
                        num++;
                    }
                }
            }
            return(num);
        }
Exemplo n.º 6
0
        public int GetKillSpecialMonsterNumAtTime(uint playerID, int deadTime, byte bySoldierType)
        {
            int num = 0;

            for (int i = 0; i < this.m_deadRecordList.Count; i++)
            {
                DeadRecord record = this.m_deadRecordList[i];
                if (((record.AttackPlayerID == playerID) && (record.actorType == ActorTypeDef.Actor_Type_Monster)) && (record.actorSubType == 2))
                {
                    ResMonsterCfgInfo dataCfgInfoByCurLevelDiff = MonsterDataHelper.GetDataCfgInfoByCurLevelDiff(record.cfgId);
                    if (((dataCfgInfoByCurLevelDiff != null) && (dataCfgInfoByCurLevelDiff.bSoldierType == bySoldierType)) && (record.deadTime < deadTime))
                    {
                        num++;
                    }
                }
            }
            return(num);
        }
Exemplo n.º 7
0
 private void CheckCallMonsterSkill(CActorInfo InActorInfo, ref List <ActorPreloadTab> InPreloadListRef, ref ActorMeta InParentActorMetaRef, int markID)
 {
     if (InActorInfo != null && InActorInfo.callMonsterConfigID > 0)
     {
         ResCallMonster dataByKey = GameDataMgr.callMonsterDatabin.GetDataByKey((long)InActorInfo.callMonsterConfigID);
         if (dataByKey != null)
         {
             ResMonsterCfgInfo dataCfgInfo = MonsterDataHelper.GetDataCfgInfo((int)dataByKey.dwMonsterID, 1);
             if (dataCfgInfo != null)
             {
                 ActorMeta actorMeta = default(ActorMeta);
                 actorMeta.ActorType = ActorTypeDef.Actor_Type_Monster;
                 actorMeta.ActorCamp = InParentActorMetaRef.ActorCamp;
                 actorMeta.ConfigId  = dataCfgInfo.iCfgID;
                 this.AddPreloadActor(ref InPreloadListRef, ref actorMeta, 2f, markID);
             }
         }
     }
 }