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); }
public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { global::WUProtos.Data.Client.ClientCombatPlayerAttack subBuilder = new global::WUProtos.Data.Client.ClientCombatPlayerAttack(); if (combatMoveCase_ == CombatMoveOneofCase.PlayerAttack) { subBuilder.MergeFrom(PlayerAttack); } input.ReadMessage(subBuilder); PlayerAttack = subBuilder; break; } case 18: { global::WUProtos.Data.Client.ClientCombatPlayerDefend subBuilder = new global::WUProtos.Data.Client.ClientCombatPlayerDefend(); if (combatMoveCase_ == CombatMoveOneofCase.PlayerDefend) { subBuilder.MergeFrom(PlayerDefend); } input.ReadMessage(subBuilder); PlayerDefend = subBuilder; break; } case 26: { global::WUProtos.Data.Client.ClientCombatPlayerAutoAdvance subBuilder = new global::WUProtos.Data.Client.ClientCombatPlayerAutoAdvance(); if (combatMoveCase_ == CombatMoveOneofCase.PlayerAutoAdvance) { subBuilder.MergeFrom(PlayerAutoAdvance); } input.ReadMessage(subBuilder); PlayerAutoAdvance = subBuilder; break; } case 34: { EnemyActionTimeline = input.ReadString(); break; } case 42: { PlayerSucceedTimeline = input.ReadString(); break; } case 50: { PlayerFailedTimeline = input.ReadString(); break; } } } }