清理smc

This commit is contained in:
panw
2025-03-18 16:00:04 +08:00
parent f7f9849d14
commit 3a7b0e4762
10 changed files with 20 additions and 347 deletions

View File

@@ -85,31 +85,7 @@ export class LuckHomeCompComp extends CCComp {
i++;
}
switch(reward){
case 3:
this.show_hero_chip(uuid,num)
smc.heros[uuid].num += num
oops.message.dispatchEvent("hero_card_update_info")
break;
case 2:
this.show_hero_chip(uuid,num)
smc.heros[uuid].num += num
oops.message.dispatchEvent("hero_card_update_info")
// this.show_skill_chip(uuid,num)
// smc.skills[uuid].num += num
break;
case 1:
this.show_item(uuid,num)
if(uuid ==9001){
smc.vmdata.gold.num+=num
}
if(uuid ==9003){
smc.vmdata.exp.num+=num
}
if(uuid < 9000){
smc.items[uuid].num+=num
}
break;
}
}
show_hero_chip(uuid:number,num:number){
@@ -155,18 +131,7 @@ export class LuckHomeCompComp extends CCComp {
to_open(){
if(this.selected==""){return;}
switch(this.selected){
case "sb":
if(smc.items[1001].num <=0){oops.gui.toast("宝箱数量不足"); this.btnno.active = true;return;}
this.open_sb();
break;
case "mb":
if(smc.items[1002].num <=0){oops.gui.toast("宝箱数量不足");this.btnno.active = true;return;}
this.open_mb();
break;
case "lb":
if(smc.items[1003].num <=0){oops.gui.toast("宝箱数量不足");this.btnno.active = true;return;}
this.open_lb();
break;
}
}