public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { type_ = (global::POGOProtos.Data.Battle.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::POGOProtos.Data.Battle.BattleParticipant(); } input.ReadMessage(playerJoined_); break; } case 82: { if (battleResults_ == null) { battleResults_ = new global::POGOProtos.Data.Battle.BattleResults(); } input.ReadMessage(battleResults_); break; } case 88: { DamageWindowsStartTimestampMs = input.ReadInt64(); break; } case 96: { DamageWindowsEndTimestampMs = input.ReadInt64(); break; } case 106: { if (playerLeft_ == null) { playerLeft_ = new global::POGOProtos.Data.Battle.BattleParticipant(); } input.ReadMessage(playerLeft_); break; } case 112: { TargetPokemonId = input.ReadUInt64(); break; } case 122: { if (leveledUpFriends_ == null) { leveledUpFriends_ = new global::POGOProtos.Data.Friends.LeveledUpFriends(); } input.ReadMessage(leveledUpFriends_); 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::POGOProtos.Data.Battle.BattleParticipant(); } PlayerJoined.MergeFrom(other.PlayerJoined); } if (other.battleResults_ != null) { if (battleResults_ == null) { battleResults_ = new global::POGOProtos.Data.Battle.BattleResults(); } BattleResults.MergeFrom(other.BattleResults); } if (other.DamageWindowsStartTimestampMs != 0L) { DamageWindowsStartTimestampMs = other.DamageWindowsStartTimestampMs; } if (other.DamageWindowsEndTimestampMs != 0L) { DamageWindowsEndTimestampMs = other.DamageWindowsEndTimestampMs; } if (other.playerLeft_ != null) { if (playerLeft_ == null) { playerLeft_ = new global::POGOProtos.Data.Battle.BattleParticipant(); } PlayerLeft.MergeFrom(other.PlayerLeft); } if (other.TargetPokemonId != 0UL) { TargetPokemonId = other.TargetPokemonId; } if (other.leveledUpFriends_ != null) { if (leveledUpFriends_ == null) { leveledUpFriends_ = new global::POGOProtos.Data.Friends.LeveledUpFriends(); } LeveledUpFriends.MergeFrom(other.LeveledUpFriends); } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }