public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: input.SkipLastField(); break; case 8: { type_ = (global::PokemonGoDesktop.API.Proto.BattleActionType)input.ReadEnum(); break; } case 16: { ActionStartMs = input.ReadInt64(); break; } case 24: { DurationMs = input.ReadInt32(); break; } case 40: { EnergyDelta = input.ReadInt32(); break; } case 48: { AttackerIndex = input.ReadInt32(); break; } case 56: { TargetIndex = input.ReadInt32(); break; } case 64: { ActivePokemonId = input.ReadUInt64(); break; } case 74: { if (playerJoined_ == null) { playerJoined_ = new global::PokemonGoDesktop.API.Proto.BattleParticipant(); } input.ReadMessage(playerJoined_); break; } case 82: { if (battleResults_ == null) { battleResults_ = new global::PokemonGoDesktop.API.Proto.BattleResults(); } input.ReadMessage(battleResults_); break; } case 88: { DamageWindowsStartTimestampMss = input.ReadInt64(); break; } case 96: { DamageWindowsEndTimestampMss = input.ReadInt64(); break; } case 106: { if (playerLeft_ == null) { playerLeft_ = new global::PokemonGoDesktop.API.Proto.BattleParticipant(); } input.ReadMessage(playerLeft_); break; } case 112: { TargetPokemonId = input.ReadUInt64(); break; } } } }
public void MergeFrom(BattleAction other) { if (other == null) { return; } if (other.Type != 0) { Type = other.Type; } if (other.ActionStartMs != 0L) { ActionStartMs = other.ActionStartMs; } if (other.DurationMs != 0) { DurationMs = other.DurationMs; } if (other.EnergyDelta != 0) { EnergyDelta = other.EnergyDelta; } if (other.AttackerIndex != 0) { AttackerIndex = other.AttackerIndex; } if (other.TargetIndex != 0) { TargetIndex = other.TargetIndex; } if (other.ActivePokemonId != 0UL) { ActivePokemonId = other.ActivePokemonId; } if (other.playerJoined_ != null) { if (playerJoined_ == null) { playerJoined_ = new global::PokemonGoDesktop.API.Proto.BattleParticipant(); } PlayerJoined.MergeFrom(other.PlayerJoined); } if (other.battleResults_ != null) { if (battleResults_ == null) { battleResults_ = new global::PokemonGoDesktop.API.Proto.BattleResults(); } BattleResults.MergeFrom(other.BattleResults); } if (other.DamageWindowsStartTimestampMss != 0L) { DamageWindowsStartTimestampMss = other.DamageWindowsStartTimestampMss; } if (other.DamageWindowsEndTimestampMss != 0L) { DamageWindowsEndTimestampMss = other.DamageWindowsEndTimestampMss; } if (other.playerLeft_ != null) { if (playerLeft_ == null) { playerLeft_ = new global::PokemonGoDesktop.API.Proto.BattleParticipant(); } PlayerLeft.MergeFrom(other.PlayerLeft); } if (other.TargetPokemonId != 0UL) { TargetPokemonId = other.TargetPokemonId; } }