private void SetupStatus() { if (this._item != null) { StigmataDataItem item = this._item as StigmataDataItem; float hPAdd = this._item.GetHPAdd(); if (item != null) { hPAdd = item.GetHPAddWithAffix(this._ownerData); } base.transform.Find("HP").gameObject.SetActive(hPAdd > 0f); base.transform.Find("HP/Num").GetComponent <Text>().text = Mathf.FloorToInt(hPAdd).ToString(); float sPAdd = this._item.GetSPAdd(); if (item != null) { sPAdd = item.GetSPAddWithAffix(this._ownerData); } base.transform.Find("SP").gameObject.SetActive(sPAdd > 0f); base.transform.Find("SP/Num").GetComponent <Text>().text = Mathf.FloorToInt(sPAdd).ToString(); float attackAdd = this._item.GetAttackAdd(); if (item != null) { attackAdd = item.GetAttackAddWithAffix(this._ownerData); } base.transform.Find("ATK").gameObject.SetActive(attackAdd > 0f); base.transform.Find("ATK/Num").GetComponent <Text>().text = Mathf.FloorToInt(attackAdd).ToString(); float defenceAdd = this._item.GetDefenceAdd(); if (item != null) { defenceAdd = item.GetDefenceAddWithAffix(this._ownerData); } base.transform.Find("DEF").gameObject.SetActive(defenceAdd > 0f); base.transform.Find("DEF/Num").GetComponent <Text>().text = Mathf.FloorToInt(defenceAdd).ToString(); float criticalAdd = this._item.GetCriticalAdd(); if (item != null) { criticalAdd = item.GetCriticalAddWithAffix(this._ownerData); } base.transform.Find("CRT").gameObject.SetActive(criticalAdd > 0f); base.transform.Find("CRT/Num").GetComponent <Text>().text = Mathf.FloorToInt(criticalAdd).ToString(); if (base.transform.Find("Cost") != null) { base.transform.Find("Cost").gameObject.SetActive(this._item.GetCost() > 0); base.transform.Find("Cost/Num").GetComponent <Text>().text = Mathf.FloorToInt((float)this._item.GetCost()).ToString(); } } else if (this._avatarData != null) { base.transform.Find("HP").gameObject.SetActive(this._avatarData.FinalHPUI > 0f); base.transform.Find("HP/Num").GetComponent <Text>().text = Mathf.FloorToInt(this._avatarData.FinalHPUI).ToString(); base.transform.Find("SP").gameObject.SetActive(this._avatarData.FinalSPUI > 0f); base.transform.Find("SP/Num").GetComponent <Text>().text = Mathf.FloorToInt(this._avatarData.FinalSPUI).ToString(); base.transform.Find("ATK").gameObject.SetActive(this._avatarData.FinalAttackUI > 0f); base.transform.Find("ATK/Num").GetComponent <Text>().text = Mathf.FloorToInt(this._avatarData.FinalAttackUI).ToString(); base.transform.Find("DEF").gameObject.SetActive(this._avatarData.FinalDefenseUI > 0f); base.transform.Find("DEF/Num").GetComponent <Text>().text = Mathf.FloorToInt(this._avatarData.FinalDefenseUI).ToString(); base.transform.Find("CRT").gameObject.SetActive(this._avatarData.FinalDefenseUI > 0f); base.transform.Find("CRT/Num").GetComponent <Text>().text = Mathf.FloorToInt(this._avatarData.FinalCriticalUI).ToString(); if (base.transform.Find("Cost") != null) { base.transform.Find("Cost").gameObject.SetActive(this._avatarData.GetCurrentCost() > 0); base.transform.Find("Cost/Num").GetComponent <Text>().text = Mathf.FloorToInt((float)this._avatarData.GetCurrentCost()).ToString(); } } }