|
|
@@ -491,7 +491,7 @@ export default class GameData {
|
|
|
* @param id 功能ID
|
|
|
* @returns
|
|
|
*/
|
|
|
- checkUIOpenByUIID(id):boolean{
|
|
|
+ checkUIOpenByUIID(id): boolean {
|
|
|
let fun = this.openfun_data.get(id);
|
|
|
return fun && this.player.max_mission >= fun.openmission;
|
|
|
}
|
|
|
@@ -607,7 +607,7 @@ export default class GameData {
|
|
|
this.player.setProp(PLAYERPROP.USER_DAILY_ACTIVE_S_INFO, data.dailyTask);
|
|
|
this.player.setProp(PLAYERPROP.USER_EXCHANGE_TIMES, data.userExchangeTimes);
|
|
|
this.player.setProp(PLAYERPROP.PIGGYBOX_DATA, data.piggyBox);
|
|
|
-
|
|
|
+
|
|
|
// this.player.setProp(PLAYERPROP.GENERAL_TRAIN_TIMES, data.general_train_times);
|
|
|
// this.player.setProp(PLAYERPROP.INVEST_TIMES, data.invest_times);
|
|
|
// this.player.setProp(PLAYERPROP.GENERAL_LUCK_TIMES, data.general_luck_times);
|
|
|
@@ -742,9 +742,12 @@ export default class GameData {
|
|
|
console.log("IsExist: " + isexist);
|
|
|
if (isexist) {
|
|
|
if (type == 1) {
|
|
|
- let vo = this.createGeneralVO(id, type, num);
|
|
|
- vo.fragment = this.player.generals_bag[id].fragment;
|
|
|
- this.player.generals_bag[id] = vo;
|
|
|
+ // let vo = this.createGeneralVO(id, type, num);
|
|
|
+ // vo.fragment = this.player.generals_bag[id].fragment;
|
|
|
+ // this.player.generals_bag[id] = vo;
|
|
|
+ // 已有武将,根据星级转化成碎片
|
|
|
+ let tansChip = this.star_data[this.player.generals_bag[id].star].tansChip;
|
|
|
+ this.player.generals_bag[id].fragment += tansChip;
|
|
|
} else if (type == 2) {
|
|
|
this.player.generals_bag[id].fragment += num;
|
|
|
}
|