public override IEnumerator ChangeCompanionState(int companionDefinitionId, CompanionReserveState state)
 {
     if (!(null == m_companionBar))
     {
         yield return(m_companionBar.ChangeCompanionState(m_playerStatus, companionDefinitionId));
     }
 }
 public FightEventData(FightEventData other)
     : this()
 {
     eventType_                     = other.eventType_;
     eventId_                       = other.eventId_;
     ParentEventId                  = other.ParentEventId;
     int1_                          = other.int1_;
     int2_                          = other.int2_;
     int3_                          = other.int3_;
     int4_                          = other.int4_;
     int5_                          = other.int5_;
     int6_                          = other.int6_;
     int7_                          = other.int7_;
     string1_                       = other.string1_;
     bool1_                         = other.bool1_;
     cellCoord1_                    = ((other.cellCoord1_ != null) ? other.cellCoord1_.Clone() : null);
     cellCoord2_                    = ((other.cellCoord2_ != null) ? other.cellCoord2_.Clone() : null);
     companionReserveState1_        = other.companionReserveState1_;
     companionReserveState2_        = other.companionReserveState2_;
     damageReductionType1_          = other.damageReductionType1_;
     fightResult1_                  = other.fightResult1_;
     gameStatistics1_               = ((other.gameStatistics1_ != null) ? other.gameStatistics1_.Clone() : null);
     teamsScoreModificationReason1_ = other.teamsScoreModificationReason1_;
     OptInt1                        = other.OptInt1;
     OptInt2                        = other.OptInt2;
     OptInt3                        = other.OptInt3;
     OptInt4                        = other.OptInt4;
     cellCoordList1_                = other.cellCoordList1_.Clone();
     spellMovementList1_            = other.spellMovementList1_.Clone();
     castTargetList1_               = other.castTargetList1_.Clone();
     intList1_                      = other.intList1_.Clone();
     intList2_                      = other.intList2_.Clone();
     _unknownFields                 = UnknownFieldSet.Clone(other._unknownFields);
 }
 public override void ChangeCompanionStateStatus(int companionDefinitionId, CompanionReserveState state)
 {
     if (!(null == m_companionBar))
     {
         m_companionBar.ChangeCompanionStateStatus(m_playerStatus, companionDefinitionId, state);
     }
 }
        private void SetStateIcon()
        {
            CompanionReserveState companionReserveState = m_statusData?.state ?? CompanionReserveState.Idle;

            m_deadIcon.get_gameObject().SetActive(companionReserveState == CompanionReserveState.Dead);
            m_givenIcon.get_gameObject().SetActive(companionReserveState == CompanionReserveState.Given);
            m_inFightIcon.get_gameObject().SetActive(companionReserveState == CompanionReserveState.InFight);
        }
Exemple #5
0
 public CompanionReserveStateChangedEvent(FightEventData proto)
     : base(FightEventData.Types.EventType.CompanionReserveStateChanged, proto)
 {
     concernedEntity  = proto.Int1;
     companionDefId   = proto.Int2;
     state            = proto.CompanionReserveState1;
     previousState    = proto.CompanionReserveState2;
     hasPreviousState = proto.Bool1;
 }
Exemple #6
0
 public CompanionReserveStateChangedEvent(int eventId, int?parentEventId, int concernedEntity, int companionDefId, CompanionReserveState state, bool hasPreviousState, CompanionReserveState previousState)
     : base(FightEventData.Types.EventType.CompanionReserveStateChanged, eventId, parentEventId)
 {
     this.concernedEntity  = concernedEntity;
     this.companionDefId   = companionDefId;
     this.state            = state;
     this.hasPreviousState = hasPreviousState;
     this.previousState    = previousState;
 }
        public void SetAdditionalCompanionState(int companionDefinitionId, CompanionReserveState state)
        {
            int count = m_additionalCompanions.Count;

            for (int i = 0; i < count; i++)
            {
                ReserveCompanionStatus reserveCompanionStatus = m_additionalCompanions[i];
                if (reserveCompanionStatus.definition.get_id() == companionDefinitionId)
                {
                    reserveCompanionStatus.SetState(state);
                    return;
                }
            }
            Log.Error($"Could not change state of an additional companion from player with id {base.id} because it was not in its secondary reserve.", 256, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Entities\\Status\\PlayerStatus.cs");
        }
Exemple #8
0
 public void SetState(CompanionReserveState value)
 {
     m_state = value;
 }
Exemple #9
0
 public abstract IEnumerator ChangeCompanionState(int companionDefinitionId, CompanionReserveState state);
Exemple #10
0
 public abstract void ChangeCompanionStateStatus(int companionDefinitionId, CompanionReserveState state);
Exemple #11
0
 public override void ChangeCompanionStateStatus(int companionDefinitionId, CompanionReserveState state)
 {
 }
Exemple #12
0
 public override IEnumerator ChangeCompanionState(int companionDefinitionId, CompanionReserveState state)
 {
     yield break;
 }
        public void MergeFrom(CodedInputStream input)
        {
            uint num;

            while ((num = input.ReadTag()) != 0)
            {
                switch (num)
                {
                default:
                    _unknownFields = UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 8u:
                    eventType_ = (Types.EventType)input.ReadEnum();
                    break;

                case 16u:
                    EventId = input.ReadSInt32();
                    break;

                case 26u:
                {
                    int?num6 = _single_parentEventId_codec.Read(input);
                    if (!parentEventId_.HasValue || num6 != 0)
                    {
                        ParentEventId = num6;
                    }
                    break;
                }

                case 32u:
                    Int1 = input.ReadInt32();
                    break;

                case 40u:
                    Int2 = input.ReadInt32();
                    break;

                case 48u:
                    Int3 = input.ReadInt32();
                    break;

                case 56u:
                    Int4 = input.ReadInt32();
                    break;

                case 64u:
                    Int5 = input.ReadInt32();
                    break;

                case 72u:
                    Int6 = input.ReadInt32();
                    break;

                case 80u:
                    Int7 = input.ReadInt32();
                    break;

                case 90u:
                    String1 = input.ReadString();
                    break;

                case 96u:
                    Bool1 = input.ReadBool();
                    break;

                case 106u:
                    if (cellCoord1_ == null)
                    {
                        cellCoord1_ = new CellCoord();
                    }
                    input.ReadMessage(cellCoord1_);
                    break;

                case 114u:
                    if (cellCoord2_ == null)
                    {
                        cellCoord2_ = new CellCoord();
                    }
                    input.ReadMessage(cellCoord2_);
                    break;

                case 120u:
                    companionReserveState1_ = (CompanionReserveState)input.ReadEnum();
                    break;

                case 128u:
                    companionReserveState2_ = (CompanionReserveState)input.ReadEnum();
                    break;

                case 136u:
                    damageReductionType1_ = (DamageReductionType)input.ReadEnum();
                    break;

                case 144u:
                    fightResult1_ = (FightResult)input.ReadEnum();
                    break;

                case 154u:
                    if (gameStatistics1_ == null)
                    {
                        gameStatistics1_ = new GameStatistics();
                    }
                    input.ReadMessage(gameStatistics1_);
                    break;

                case 160u:
                    teamsScoreModificationReason1_ = (TeamsScoreModificationReason)input.ReadEnum();
                    break;

                case 170u:
                {
                    int?num5 = _single_optInt1_codec.Read(input);
                    if (!optInt1_.HasValue || num5 != 0)
                    {
                        OptInt1 = num5;
                    }
                    break;
                }

                case 178u:
                {
                    int?num4 = _single_optInt2_codec.Read(input);
                    if (!optInt2_.HasValue || num4 != 0)
                    {
                        OptInt2 = num4;
                    }
                    break;
                }

                case 186u:
                {
                    int?num3 = _single_optInt3_codec.Read(input);
                    if (!optInt3_.HasValue || num3 != 0)
                    {
                        OptInt3 = num3;
                    }
                    break;
                }

                case 194u:
                {
                    int?num2 = _single_optInt4_codec.Read(input);
                    if (!optInt4_.HasValue || num2 != 0)
                    {
                        OptInt4 = num2;
                    }
                    break;
                }

                case 202u:
                    cellCoordList1_.AddEntriesFrom(input, _repeated_cellCoordList1_codec);
                    break;

                case 210u:
                    spellMovementList1_.AddEntriesFrom(input, _repeated_spellMovementList1_codec);
                    break;

                case 218u:
                    castTargetList1_.AddEntriesFrom(input, _repeated_castTargetList1_codec);
                    break;

                case 224u:
                case 226u:
                    intList1_.AddEntriesFrom(input, _repeated_intList1_codec);
                    break;

                case 232u:
                case 234u:
                    intList2_.AddEntriesFrom(input, _repeated_intList2_codec);
                    break;
                }
            }
        }
 public void ChangeCompanionStateStatus(PlayerStatus playerStatus, int companionDefinitionId, CompanionReserveState state)
 {
     if (playerStatus.TryGetCompanion(companionDefinitionId, out ReserveCompanionStatus companionStatus))
     {
         EnqueueCompanionStatusData(playerStatus, companionStatus);
     }
 }