Example #1
0
        public void MergeFrom(CombatMoveType other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.CombatMoveCase)
            {
            case CombatMoveOneofCase.PlayerAttack:
                if (PlayerAttack == null)
                {
                    PlayerAttack = new global::WUProtos.Data.Combat.CombatPlayerAttack();
                }
                PlayerAttack.MergeFrom(other.PlayerAttack);
                break;

            case CombatMoveOneofCase.PlayerDefend:
                if (PlayerDefend == null)
                {
                    PlayerDefend = new global::WUProtos.Data.Combat.CombatPlayerDefend();
                }
                PlayerDefend.MergeFrom(other.PlayerDefend);
                break;

            case CombatMoveOneofCase.PlayerAutoAdvance:
                if (PlayerAutoAdvance == null)
                {
                    PlayerAutoAdvance = new global::WUProtos.Data.Combat.CombatPlayerAutoAdvance();
                }
                PlayerAutoAdvance.MergeFrom(other.PlayerAutoAdvance);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (combatMoveCase_ == CombatMoveOneofCase.PlayerAttack)
            {
                hash ^= PlayerAttack.GetHashCode();
            }
            if (combatMoveCase_ == CombatMoveOneofCase.PlayerDefend)
            {
                hash ^= PlayerDefend.GetHashCode();
            }
            if (combatMoveCase_ == CombatMoveOneofCase.PlayerAutoAdvance)
            {
                hash ^= PlayerAutoAdvance.GetHashCode();
            }
            if (EnemyActionTimeline.Length != 0)
            {
                hash ^= EnemyActionTimeline.GetHashCode();
            }
            if (PlayerSucceedTimeline.Length != 0)
            {
                hash ^= PlayerSucceedTimeline.GetHashCode();
            }
            if (PlayerFailedTimeline.Length != 0)
            {
                hash ^= PlayerFailedTimeline.GetHashCode();
            }
            hash ^= (int)combatMoveCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public void MergeFrom(ClientCombatMoveType other)
        {
            if (other == null)
            {
                return;
            }
            if (other.EnemyActionTimeline.Length != 0)
            {
                EnemyActionTimeline = other.EnemyActionTimeline;
            }
            if (other.PlayerSucceedTimeline.Length != 0)
            {
                PlayerSucceedTimeline = other.PlayerSucceedTimeline;
            }
            if (other.PlayerFailedTimeline.Length != 0)
            {
                PlayerFailedTimeline = other.PlayerFailedTimeline;
            }
            switch (other.CombatMoveCase)
            {
            case CombatMoveOneofCase.PlayerAttack:
                if (PlayerAttack == null)
                {
                    PlayerAttack = new global::WUProtos.Data.Client.ClientCombatPlayerAttack();
                }
                PlayerAttack.MergeFrom(other.PlayerAttack);
                break;

            case CombatMoveOneofCase.PlayerDefend:
                if (PlayerDefend == null)
                {
                    PlayerDefend = new global::WUProtos.Data.Client.ClientCombatPlayerDefend();
                }
                PlayerDefend.MergeFrom(other.PlayerDefend);
                break;

            case CombatMoveOneofCase.PlayerAutoAdvance:
                if (PlayerAutoAdvance == null)
                {
                    PlayerAutoAdvance = new global::WUProtos.Data.Client.ClientCombatPlayerAutoAdvance();
                }
                PlayerAutoAdvance.MergeFrom(other.PlayerAutoAdvance);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Example #4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (combatMoveCase_ == CombatMoveOneofCase.PlayerAttack)
            {
                hash ^= PlayerAttack.GetHashCode();
            }
            if (combatMoveCase_ == CombatMoveOneofCase.PlayerDefend)
            {
                hash ^= PlayerDefend.GetHashCode();
            }
            if (combatMoveCase_ == CombatMoveOneofCase.PlayerAutoAdvance)
            {
                hash ^= PlayerAutoAdvance.GetHashCode();
            }
            hash ^= (int)combatMoveCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }