Method: Api::DebugKillUnit#_encode

Defined in:
lib/sc2ai/protocol/debug_pb.rb

#_encode(buff) ⇒ Object



8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
# File 'lib/sc2ai/protocol/debug_pb.rb', line 8956

def _encode(buff)
  list = @tag
  if list.size > 0
    list.each do |item|
      val = item
      if val != 0
        buff << 0x08

        loop do
          byte = val & 0x7F
          val >>= 7
          byte |= 0x80 if val > 0
          buff << byte
          break if val == 0
        end
      end
    end
  end
  buff << @_unknown_fields if @_unknown_fields
  buff
end