public tagEquipProto() { BaseEffect = new tagRoleAttEffect[3]; for (int i = 0; i < 3; i++) { BaseEffect[i] = new tagRoleAttEffect(); } }
public tagEquipSpec() { EquipBaseAtt = new tagRoleAttEffect[3]; for (int i = 0; i < 3; i++) { EquipBaseAtt[i] = new tagRoleAttEffect(); } dwHoleGemID = new uint[5]; }
void RefushEquipItem(bool bEquip) { CHeroEntity pHero = CFightTeamMgr.Instance.m_pBattleHero; if (pHero == null) { return; } FillEquipIcon(pShowEquip); pEquipName.GetComponent <UILabel> ().text = "名称: " + mEquip.m_pEquipProto.strName; pEquipZhanli.GetComponent <UILabel> ().text = "战力: " + UnityEngine.Random.Range(10, 100).ToString(); pLevel.GetComponent <UILabel> ().text = "等级: " + mEquip.m_pEquipProto.byLevel.ToString(); // attr compare EEquipPos ePos = mEquip.m_pEquipProto.eEquipPos; CEquipment pCurEquip = (CEquipment)pHero.m_pEquipment.GetPos((Int16)ePos); string strName = mEquip.m_pEquipProto.strName; if (pCurEquip != null && bEquip) { strName += "VS" + pCurEquip.m_pEquipProto.strName; } pNameVS.GetComponent <UILabel>().text = strName; int nValue = 0; string strInfo = ""; for (int i = 0; i < 3; i++) { tagRoleAttEffect pEffect = mEquip.m_equipex.EquipBaseAtt[i]; if (pEffect == null) { return; } nValue = pEffect.nValue; strInfo += GetAttName(pEffect.eRoleAtt) + nValue.ToString(); int nCurValue = 0; if (pCurEquip != null && bEquip) { for (int j = 0; j < 3; j++) { tagRoleAttEffect pCur = pCurEquip.m_equipex.EquipBaseAtt[i]; if (pCur != null && pEffect.eRoleAtt == pCur.eRoleAtt && pCur.nValue > 0) { nCurValue = pCur.nValue; break; } } strInfo += " ( " + (nValue - nCurValue).ToString() + " )"; } strInfo += '\n'; } pVSattr.GetComponent <UILabel> ().text = strInfo; }