public override IEnumerator UpdateView(FightStatus fightStatus) { if (fightStatus != FightStatus.local) { yield break; } FightUIRework instance = FightUIRework.instance; if (!(null != instance)) { yield break; } if (GameStatus.GetFightStatus(fromFightId).TryGetEntity(fromPlayerId, out PlayerStatus entityStatus)) { if (RuntimeData.companionDefinitions.TryGetValue(companionDefId, out CompanionDefinition value)) { PlayerStatus localPlayer = fightStatus.GetLocalPlayer(); if (concernedEntity == localPlayer.id) { FightInfoMessage message = FightInfoMessage.ReceivedCompanion(MessageInfoRibbonGroup.MyID); instance.DrawInfoMessage(message, entityStatus.nickname, RuntimeData.FormattedText(value.i18nNameId)); } } else { Log.Error(FightEventErrors.DefinitionNotFound <CompanionDefinition>(companionDefId), 37, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\CompanionReceivedEvent.cs"); } } else { Log.Error(FightEventErrors.PlayerNotFound(fromPlayerId, fromFightId), 42, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\CompanionReceivedEvent.cs"); } }
public override void UpdateStatus(FightStatus fightStatus) { if (fightStatus.TryGetEntity(concernedEntity, out PlayerStatus entityStatus)) { if (entityStatus.TryGetSpell(spellInstanceId, out SpellStatus spellStatus)) { if (null == spellStatus.definition) { if (RuntimeData.spellDefinitions.TryGetValue(spellDefId, out SpellDefinition value)) { spellStatus.Upgrade(value, spellLevel); } else { Log.Error(FightEventErrors.DefinitionNotFound <SpellDefinition>(spellDefId), 31, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\PlaySpellEvent.cs"); } } } else { Log.Error($"Could not find spell with instance id {spellInstanceId} for player with id {concernedEntity}.", 37, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\PlaySpellEvent.cs"); } } else { Log.Error(FightEventErrors.PlayerNotFound(concernedEntity), 42, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\PlaySpellEvent.cs"); } }
public static ObjectMechanismStatus CreateObjectMechanismStatus(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.objectMechanismDefinitions.TryGetValue(definitionId, out ObjectMechanismDefinition value)) { return(ObjectMechanismStatus.Create(id, value, level, playerStatus, (Vector2Int)coord)); } Log.Error(FightEventErrors.DefinitionNotFound <ObjectMechanismDefinition>(definitionId), 64, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\ObjectMechanismAddedEvent.cs"); return(null); }
public override void UpdateStatus(FightStatus fightStatus) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (fightStatus.TryGetEntity(ownerId, out PlayerStatus entityStatus)) { Gender gender = (Gender)this.gender; if (RuntimeData.weaponDefinitions.TryGetValue(entityDefId, out WeaponDefinition value)) { HeroStatus heroStatus = HeroStatus.Create(concernedEntity, value, level, gender, entityStatus, (Vector2Int)refCoord); fightStatus.AddEntity(heroStatus); entityStatus.heroStatus = heroStatus; AbstractPlayerUIRework view = entityStatus.view; if (null != view) { view.SetHeroIllustration(value, gender); view.SetHeroStartLifePoints(heroStatus.baseLife, entityStatus.playerType); if (RuntimeData.reserveDefinitions.TryGetValue(value.god, out ReserveDefinition value2)) { view.SetupReserve(heroStatus, value2); } else { Log.Error(FightEventErrors.DefinitionNotFound <ReserveDefinition>((int)value.god), 45, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\HeroAddedEvent.cs"); } } } else { Log.Error(FightEventErrors.EntityCreationFailed <HeroStatus, WeaponDefinition>(concernedEntity, entityDefId), 51, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\HeroAddedEvent.cs"); } } else { Log.Error(FightEventErrors.PlayerNotFound(ownerId), 56, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\HeroAddedEvent.cs"); } FightLogicExecutor.FireUpdateStatus(fightStatus.fightId, EventCategory.EntityAddedOrRemoved); }