Update ChooseHeroUpQuality.ts

This commit is contained in:
guoqing.zhu 2022-06-14 18:17:26 +08:00
parent 8c5274d7ee
commit 182d1a2d17

View File

@ -78,6 +78,10 @@ export class ChooseHeroUpQuality extends UIBase {
} }
if (this.mainHeroData && this.secHeroData) { if (this.mainHeroData && this.secHeroData) {
if (this.mainHeroData == this.secHeroData) {
cc.uiHelper.showTips('Must Choose two different hero');
return;
}
NetManage.upgradeQualityPreview( NetManage.upgradeQualityPreview(
this.mainHeroData, this.mainHeroData,
this.secHeroData, this.secHeroData,
@ -114,6 +118,11 @@ export class ChooseHeroUpQuality extends UIBase {
onOk() { onOk() {
if (this.mainHeroData && this.secHeroData) { if (this.mainHeroData && this.secHeroData) {
if (this.mainHeroData == this.secHeroData) {
cc.uiHelper.showTips('Must Choose two different hero');
return;
}
NetManage.heroUpgradeQuality( NetManage.heroUpgradeQuality(
this.mainHeroData, this.mainHeroData,
this.secHeroData, this.secHeroData,