public static List <IAssetVO> GetBattleRecordPreloads(BattleRecord battleRecord) { List <IAssetVO> list = new List <IAssetVO>(); if (battleRecord == null) { Service.Logger.Error("Battle Record is null in MapDataLoaderUtils.GetBattleRecordPreloads."); return(list); } StaticDataController staticDataController = Service.StaticDataController; SkinController skinController = Service.SkinController; BattleDeploymentData attackerDeploymentData = battleRecord.AttackerDeploymentData; if (attackerDeploymentData != null) { MapDataLoaderUtils.AddDeployablesToList <TroopTypeVO>(attackerDeploymentData.TroopData, list, battleRecord.AttackerEquipment, staticDataController, skinController); MapDataLoaderUtils.AddDeployablesToList <SpecialAttackTypeVO>(attackerDeploymentData.SpecialAttackData, list, battleRecord.AttackerEquipment, staticDataController, skinController); MapDataLoaderUtils.AddDeployablesToList <TroopTypeVO>(attackerDeploymentData.HeroData, list, battleRecord.AttackerEquipment, staticDataController, skinController); MapDataLoaderUtils.AddDeployablesToList <TroopTypeVO>(attackerDeploymentData.ChampionData, list, battleRecord.AttackerEquipment, staticDataController, skinController); } BattleDeploymentData defenderDeploymentData = battleRecord.DefenderDeploymentData; if (defenderDeploymentData != null) { MapDataLoaderUtils.AddDeployablesToList <TroopTypeVO>(defenderDeploymentData.TroopData, list, battleRecord.DefenderEquipment, staticDataController, skinController); MapDataLoaderUtils.AddDeployablesToList <SpecialAttackTypeVO>(defenderDeploymentData.SpecialAttackData, list, battleRecord.DefenderEquipment, staticDataController, skinController); MapDataLoaderUtils.AddDeployablesToList <TroopTypeVO>(defenderDeploymentData.HeroData, list, battleRecord.DefenderEquipment, staticDataController, skinController); MapDataLoaderUtils.AddDeployablesToList <TroopTypeVO>(defenderDeploymentData.ChampionData, list, battleRecord.DefenderEquipment, staticDataController, skinController); } MapDataLoaderUtils.AddFXPreloads(list); return(list); }
public static List <IAssetVO> GetBattlePreloads(BattleInitializationData battleData) { List <IAssetVO> list = new List <IAssetVO>(); StaticDataController staticDataController = Service.StaticDataController; SkinController skinController = Service.SkinController; BattleTypeVO battleTypeVO = (battleData == null) ? null : battleData.BattleVO; if (battleTypeVO == null || !battleTypeVO.OverridePlayerUnits) { Inventory inventory = Service.CurrentPlayer.Inventory; MapDataLoaderUtils.AddDeployablesToList <TroopTypeVO>(inventory.Troop, list, battleData.AttackerEquipment, staticDataController, skinController); MapDataLoaderUtils.AddDeployablesToList <SpecialAttackTypeVO>(inventory.SpecialAttack, list, battleData.AttackerEquipment, staticDataController, skinController); MapDataLoaderUtils.AddDeployablesToList <TroopTypeVO>(inventory.Hero, list, battleData.AttackerEquipment, staticDataController, skinController); MapDataLoaderUtils.AddDeployablesToList <TroopTypeVO>(inventory.Champion, list, battleData.AttackerEquipment, staticDataController, skinController); } if (battleTypeVO != null) { MapDataLoaderUtils.AddDeployablesToList <TroopTypeVO>(battleTypeVO.TroopData, list, battleData.AttackerEquipment, staticDataController, skinController); MapDataLoaderUtils.AddDeployablesToList <SpecialAttackTypeVO>(battleTypeVO.SpecialAttackData, list, battleData.AttackerEquipment, staticDataController, skinController); MapDataLoaderUtils.AddDeployablesToList <TroopTypeVO>(battleTypeVO.HeroData, list, battleData.AttackerEquipment, staticDataController, skinController); MapDataLoaderUtils.AddDeployablesToList <TroopTypeVO>(battleTypeVO.ChampionData, list, battleData.AttackerEquipment, staticDataController, skinController); } MapDataLoaderUtils.AddSummonableVisitorsToList(battleData, staticDataController, list, skinController); MapDataLoaderUtils.AddFXPreloads(list); return(list); }
public unsafe static long $Invoke0(long instance, long *args) { MapDataLoaderUtils.AddFXPreloads((List <IAssetVO>)GCHandledObjects.GCHandleToObject(*args)); return(-1L); }