public static SummoningStatus CreateSummoningStatus(int id, int definitionId, int level, PlayerStatus playerStatus, CellCoord coord) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) if (RuntimeData.summoningDefinitions.TryGetValue(definitionId, out SummoningDefinition value)) { return(SummoningStatus.Create(id, value, level, playerStatus, (Vector2Int)coord)); } Log.Error(FightEventErrors.DefinitionNotFound <SummoningDefinition>(definitionId), 64, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\SummoningAddedEvent.cs"); return(null); }
public IEnumerable <IEntity> Filter(IEnumerable <IEntity> entities, DynamicValueContext context) { foreach (IEntity entity in entities) { SummoningStatus summoningStatus = entity as SummoningStatus; if (summoningStatus != null && ((SummoningDefinition)summoningStatus.definition).growInto != null) { yield return(summoningStatus); } } }
public override void UpdateStatus(FightStatus fightStatus) { if (!fightStatus.TryGetEntity(ownerId, out PlayerStatus entityStatus)) { Log.Error(string.Format("Could not find a {0} entity with id {1}.", "PlayerStatus", ownerId), 17, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\SummoningAddedEvent.cs"); return; } SummoningStatus summoningStatus = CreateSummoningStatus(concernedEntity, entityDefId, level, entityStatus, refCoord); if (summoningStatus != null) { fightStatus.AddEntity(summoningStatus); FightLogicExecutor.FireUpdateStatus(fightStatus.fightId, EventCategory.EntityAddedOrRemoved); } }
public static IEnumerator CreateSummoningCharacterObject(FightStatus fightStatus, SummoningStatus summoningStatus, PlayerStatus ownerStatus, int x, int y, Direction direction) { SummoningDefinition summoningDefinition = (SummoningDefinition)summoningStatus.definition; if (!(null == summoningDefinition)) { SummoningCharacterObject summoningCharacterObject = FightObjectFactory.CreateSummoningCharacterObject(summoningDefinition, x, y, direction); if (!(null == summoningCharacterObject)) { summoningStatus.view = summoningCharacterObject; yield return(summoningCharacterObject.LoadAnimationDefinitions(summoningDefinition.defaultSkin.value)); summoningCharacterObject.Initialize(fightStatus, ownerStatus, summoningStatus); yield return(summoningCharacterObject.Spawn()); } } }