protected override EBTStatus update_impl(Agent pAgent, EBTStatus childStatus) { RES_LEVEL_HEROAITYPE mapAIMode = ((ObjAgent)pAgent).GetMapAIMode(); RES_LEVEL_HEROAITYPE rES_LEVEL_HEROAITYPE = RES_LEVEL_HEROAITYPE.RES_LEVEL_HEROAITYPE_CAPTAIN; return((mapAIMode == rES_LEVEL_HEROAITYPE) ? EBTStatus.BT_SUCCESS : EBTStatus.BT_FAILURE); }
protected override EBTStatus update_impl(Agent pAgent, EBTStatus childStatus) { RES_LEVEL_HEROAITYPE mapAIMode = ((ObjAgent)pAgent).GetMapAIMode(); RES_LEVEL_HEROAITYPE res_level_heroaitype2 = RES_LEVEL_HEROAITYPE.RES_LEVEL_HEROAITYPE_FIREPIT; return((mapAIMode == res_level_heroaitype2) ? EBTStatus.BT_FAILURE : EBTStatus.BT_SUCCESS); }
public void InitPvpData(ResDT_LevelCommonInfo levelCommonInfo, uint mapID) { this.m_isMobaType = true; this.m_pvpLevelCommonInfo = levelCommonInfo; this.m_mapID = (int)mapID; this.m_selectHeroType = (enSelectType)this.m_pvpLevelCommonInfo.stPickRuleInfo.bPickType; this.m_levelName = this.m_pvpLevelCommonInfo.szName; this.m_levelDesignFileName = this.m_pvpLevelCommonInfo.szDesignFileName; if (this.m_pvpLevelCommonInfo.szArtistFileName != null) { this.m_levelArtistFileName = this.m_pvpLevelCommonInfo.szArtistFileName; } this.m_mapWidth = this.m_pvpLevelCommonInfo.iMapWidth; this.m_mapHeight = this.m_pvpLevelCommonInfo.iMapHeight; this.m_bigMapWidth = this.m_pvpLevelCommonInfo.iBigMapWidth; this.m_bigMapHeight = this.m_pvpLevelCommonInfo.iBigMapHeight; this.m_miniMapPath = this.m_pvpLevelCommonInfo.szThumbnailPath; this.m_bigMapPath = this.m_pvpLevelCommonInfo.szBigMapPath; this.m_mapFowScale = this.m_pvpLevelCommonInfo.fMapFowScale; this.m_bigMapFowScale = this.m_pvpLevelCommonInfo.fBigMapFowScale; this.m_heroAiType = this.m_pvpLevelCommonInfo.iHeroAIType; this.m_pvpPlayerNum = (int)this.m_pvpLevelCommonInfo.bMaxAcntNum; this.m_isBattleEquipLimit = (this.m_pvpLevelCommonInfo.bBattleEquipLimit > 0); this.m_headPtsUpperLimit = (int)this.m_pvpLevelCommonInfo.bHeadPtsUpperLimit; this.m_birthLevelConfig = (int)this.m_pvpLevelCommonInfo.bBirthLevelConfig; this.m_isShowHonor = (this.m_pvpLevelCommonInfo.bShowHonor > 0); this.m_cooldownReduceUpperLimit = this.m_pvpLevelCommonInfo.dwCooldownReduceUpperLimit; this.m_dynamicPropertyConfig = this.m_pvpLevelCommonInfo.dwDynamicPropertyCfg; this.m_originalGoldCoinInBattle = this.m_pvpLevelCommonInfo.wOriginalGoldCoinInBattle; this.m_battleTaskOfCamps[1] = this.m_pvpLevelCommonInfo.dwBattleTaskOfCamp1; this.m_battleTaskOfCamps[2] = this.m_pvpLevelCommonInfo.dwBattleTaskOfCamp2; this.m_musicStartEvent = this.m_pvpLevelCommonInfo.szMusicStartEvent; this.m_musicEndEvent = this.m_pvpLevelCommonInfo.szMusicEndEvent; this.m_musicBankResName = this.m_pvpLevelCommonInfo.szBankResourceName; this.m_ambientSoundEvent = this.m_pvpLevelCommonInfo.szAmbientSoundEvent; this.m_isOpenExpCompensate = this.m_pvpLevelCommonInfo.bIsOpenExpCompensate; this.m_expCompensateInfo = this.m_pvpLevelCommonInfo.astExpCompensateDetail; this.m_soldierActivateDelay = this.m_pvpLevelCommonInfo.iSoldierActivateDelay; this.m_soldierActivateCountDelay1 = this.m_pvpLevelCommonInfo.iSoldierActivateCountDelay1; this.m_soldierActivateCountDelay2 = this.m_pvpLevelCommonInfo.iSoldierActivateCountDelay2; this.m_timeDuration = this.m_pvpLevelCommonInfo.dwTimeDuration; this.m_addWinCondStarId = this.m_pvpLevelCommonInfo.dwAddWinCondStarId; this.m_addLoseCondStarId = this.m_pvpLevelCommonInfo.dwAddLoseCondStarId; this.m_soulID = this.m_pvpLevelCommonInfo.dwSoulID; this.m_soulAllocId = this.m_pvpLevelCommonInfo.dwSoulAllocId; this.m_extraSkillId = this.m_pvpLevelCommonInfo.iExtraSkillId; this.m_extraSkill2Id = this.m_pvpLevelCommonInfo.iExtraSkill2Id; this.m_extraPassiveSkillId = this.m_pvpLevelCommonInfo.iExtraPassiveSkillId; this.m_ornamentSkillId = this.m_pvpLevelCommonInfo.iOrnamentSkillId; this.m_ornamentSwitchCD = this.m_pvpLevelCommonInfo.iOrnamentSwitchCD; this.m_bEnableFow = (this.m_pvpLevelCommonInfo.bIsEnableFow > 0); this.m_bEnableOrnamentSlot = (this.m_pvpLevelCommonInfo.bIsEnableOrnamentSlot > 0); this.m_bEnableShopHorizonTab = (this.m_pvpLevelCommonInfo.bIsEnableShopHorizonTab > 0); this.m_ornamentFirstSwitchCd = this.m_pvpLevelCommonInfo.iOrnamentFirstSwitchCD; this.m_ornamentFirstSwitchCdEftTime = this.m_pvpLevelCommonInfo.iOrnamentFirstSwitchCDEftTime; this.m_isCanRightJoyStickCameraDrag = (this.m_pvpLevelCommonInfo.bSupportCameraDrag > 0); this.m_gameMatchName = this.m_pvpLevelCommonInfo.szGameMatchName; this.m_pauseTimes = this.m_pvpLevelCommonInfo.bPauseNum; this.m_isCameraFlip = (this.m_pvpLevelCommonInfo.bCameraFlip > 0); }
protected override EBTStatus update_impl(Agent pAgent, EBTStatus childStatus) { RES_LEVEL_HEROAITYPE mapAIMode = ((ObjAgent)pAgent).GetMapAIMode(); RES_LEVEL_HEROAITYPE rES_LEVEL_HEROAITYPE = 1; bool flag = mapAIMode != rES_LEVEL_HEROAITYPE; return((!flag) ? EBTStatus.BT_FAILURE : EBTStatus.BT_SUCCESS); }
public void Init(ResLevelCfgInfo levelCfg, int difficult) { this.LevelName = StringHelper.UTF8BytesToString(ref levelCfg.szName); this.LevelDesignFileName = StringHelper.UTF8BytesToString(ref levelCfg.szDesignFileName); if ((levelCfg.szArtistFileName != null) && (levelCfg.szArtistFileName.Length > 0)) { this.LevelArtistFileName = StringHelper.UTF8BytesToString(ref levelCfg.szArtistFileName); } this.iLevelID = levelCfg.iCfgID; this.iChapterNo = levelCfg.iChapterId; this.bLevelNo = levelCfg.bLevelNo; this.difficulty = difficult; this.LevelType = (RES_LEVEL_TYPE)levelCfg.iLevelType; if (this.LevelType == RES_LEVEL_TYPE.RES_LEVEL_TYPE_GUIDE) { this.GameType = COM_GAME_TYPE.COM_SINGLE_GAME_OF_GUIDE; } this.PassDialogId = levelCfg.iPassDialogId; this.PreDialogId = levelCfg.iPreDialogId; this.FailureDialogId = levelCfg.iFailureDialogId; this.AIModeType = (RES_LEVEL_HEROAITYPE)levelCfg.iHeroAIType; this.bSoulGrow = levelCfg.bSoulGrow; this.dwAttackOrder = levelCfg.dwAttackOrderID; this.baseReviveTime = (int)levelCfg.dwReviveTime; this.dynamicPropertyConfig = levelCfg.dwDynamicPropertyCfg; this.isPVPMode = this.LevelType == RES_LEVEL_TYPE.RES_LEVEL_TYPE_PVP; this.miniMapPath = StringHelper.UTF8BytesToString(ref levelCfg.szThumbnailPath); this.bigMapPath = StringHelper.UTF8BytesToString(ref levelCfg.szBigMapPath); this.mapPath = StringHelper.UTF8BytesToString(ref levelCfg.szMapPath); this.mapWidth = levelCfg.iMapWidth; this.mapHeight = levelCfg.iMapHeight; this.bigMapWidth = levelCfg.iBigMapWidth; this.bigMapHeight = levelCfg.iBigMapHeight; this.musicStartEvent = StringHelper.UTF8BytesToString(ref levelCfg.szMusicStartEvent); this.musicEndEvent = StringHelper.UTF8BytesToString(ref levelCfg.szMusicEndEvent); this.ambientSoundEvent = StringHelper.UTF8BytesToString(ref levelCfg.szAmbientSoundEvent); this.bankResName = StringHelper.UTF8BytesToString(ref levelCfg.szBankResourceName); this.horizonEnableMethod = (Horizon.EnableMethod)levelCfg.bEnableHorizon; if (this.isPVPMode) { this.horizonEnableMethod = Horizon.EnableMethod.EnableAll; } this.canAutoAI = levelCfg.bIsOpenAutoAI != 0; this.MapBuffs = levelCfg.astMapBuffs; if ((difficult >= 1) && (difficult < (levelCfg.RecommendPower.Length + 1))) { this.recommendCombatEft = levelCfg.RecommendPower[difficult - 1]; } this.bCameraFlip = false; }
public void InitPveData(ResLevelCfgInfo levelCfg, int difficult) { this.m_isMobaType = false; this.m_pveLevelInfo = levelCfg; this.m_selectHeroType = enSelectType.enMutile; this.m_levelName = this.m_pveLevelInfo.szName; this.m_levelDesignFileName = this.m_pveLevelInfo.szDesignFileName; if ((this.m_pveLevelInfo.szArtistFileName != null) && (this.m_pveLevelInfo.szArtistFileName.Length > 0)) { this.m_levelArtistFileName = this.m_pveLevelInfo.szArtistFileName; } this.m_mapWidth = this.m_pveLevelInfo.iMapWidth; this.m_mapHeight = this.m_pveLevelInfo.iMapHeight; this.m_bigMapWidth = this.m_pveLevelInfo.iBigMapWidth; this.m_bigMapHeight = this.m_pveLevelInfo.iBigMapHeight; this.m_miniMapPath = this.m_pveLevelInfo.szThumbnailPath; this.m_bigMapPath = this.m_pveLevelInfo.szBigMapPath; this.m_mapID = this.m_pveLevelInfo.iCfgID; this.m_chapterNo = this.m_pveLevelInfo.iChapterId; this.m_levelNo = this.m_pveLevelInfo.bLevelNo; this.m_levelDifficulty = difficult; this.m_pveLevelType = (RES_LEVEL_TYPE)this.m_pveLevelInfo.iLevelType; this.m_horizonEnableMethod = (Horizon.EnableMethod) this.m_pveLevelInfo.bEnableHorizon; this.m_isMobaType = this.m_pveLevelType == RES_LEVEL_TYPE.RES_LEVEL_TYPE_PVP; if (this.m_isMobaType) { this.m_horizonEnableMethod = Horizon.EnableMethod.EnableAll; } this.m_passDialogId = this.m_pveLevelInfo.iPassDialogId; this.m_preDialogId = this.m_pveLevelInfo.iPreDialogId; this.m_failureDialogId = this.m_pveLevelInfo.iFailureDialogId; this.m_heroAiType = (RES_LEVEL_HEROAITYPE)this.m_pveLevelInfo.iHeroAIType; this.m_soulGrow = this.m_pveLevelInfo.bSoulGrow; this.m_baseReviveTime = (int)this.m_pveLevelInfo.dwReviveTime; this.m_dynamicPropertyConfig = this.m_pveLevelInfo.dwDynamicPropertyCfg; this.m_miniMapPath = this.m_pveLevelInfo.szThumbnailPath; this.m_bigMapPath = this.m_pveLevelInfo.szBigMapPath; this.m_mapWidth = this.m_pveLevelInfo.iMapWidth; this.m_mapHeight = this.m_pveLevelInfo.iMapHeight; this.m_mapFowScale = 1f; this.m_bigMapFowScale = 1f; this.m_musicStartEvent = this.m_pveLevelInfo.szMusicStartEvent; this.m_musicEndEvent = this.m_pveLevelInfo.szMusicEndEvent; this.m_ambientSoundEvent = this.m_pveLevelInfo.szAmbientSoundEvent; this.m_musicBankResName = this.m_pveLevelInfo.szBankResourceName; this.canAutoAI = this.m_pveLevelInfo.bIsOpenAutoAI != 0; this.m_mapBuffs = this.m_pveLevelInfo.astMapBuffs; this.m_isShowTrainingHelper = this.m_pveLevelInfo.bShowTrainingHelper > 0; this.m_soulID = this.m_pveLevelInfo.dwSoulID; this.m_soulAllocId = this.m_pveLevelInfo.dwSoulAllocId; this.m_starDetail = this.m_pveLevelInfo.astStarDetail; this.m_reviveInfo = this.m_pveLevelInfo.astReviveInfo; this.m_reviveTimeMax = this.m_pveLevelInfo.bReviveTimeMax; this.m_loseCondition = this.m_pveLevelInfo.iLoseCondition; this.m_extraSkillId = this.m_pveLevelInfo.iExtraSkillId; this.m_extraSkill2Id = this.m_pveLevelInfo.iExtraSkill2Id; this.m_extraPassiveSkillId = this.m_pveLevelInfo.iExtraPassiveSkillId; this.m_isCanRightJoyStickCameraDrag = this.m_pveLevelInfo.bSupportCameraDrag > 0; this.m_isCameraFlip = false; this.m_pvpPlayerNum = this.m_pveLevelInfo.bMaxAcntNum; }