private void CacheAttribute()
 {
     if (this.att == null)
     {
         Component component = (this.attSource == ValueSource.Caller) ? base.owner : (this.attOwnerBind.GetValue() as Component);
         ICharacterAttributesOwner characterAttributesOwner = component as ICharacterAttributesOwner;
         if (characterAttributesOwner == null)
         {
             Debug.LogError("[Attribute Data Provider] The target object is not Attributes owner: " + (((object)component != null) ? component.gameObject.name : null), ((object)component != null) ? component.gameObject : null);
         }
         else
         {
             this.att = characterAttributesOwner.GetAttribute(this.attId);
             if (this.att == null)
             {
                 string text = CharacterAttributeDefsAsset.Instance.IdToIdent(this.attId);
                 Debug.LogErrorFormat("[Attribute Data Provider] Could not find Attribute [{0}] on [{1}]", text, ((object)component != null) ? component.gameObject.name : null, ((object)component != null) ? component.gameObject : null);
             }
             if (!base.isSetter)
             {
                 if (this.attValType == ValueType.Value)
                 {
                     this.att.onValueChanged += this.BoundValueChanged;
                 }
                 else
                 {
                     this.att.onMaxValChanged += this.BoundValueChanged;
                 }
             }
         }
     }
 }