Merge branch 'master_dev' into master_haizei

master_haizei
grimm 2024-01-16 16:19:11 +08:00
commit 22e672288a
2 changed files with 12 additions and 10 deletions

View File

@ -4,20 +4,21 @@ import com.ljsd.jieling.logic.dao.Hero;
import com.ljsd.jieling.logic.dao.Training; import com.ljsd.jieling.logic.dao.Training;
import com.ljsd.jieling.logic.dao.root.User; import com.ljsd.jieling.logic.dao.root.User;
//training uid heroId lv import java.util.Map;
//training uid lv
public class Cmd_training extends GmRoleAbstract { public class Cmd_training extends GmRoleAbstract {
@Override @Override
public boolean exec(String[] args) throws Exception { public boolean exec(String[] args) throws Exception {
String heroId = args[0]; int lv = Integer.parseInt(args[0]);
int lv = Integer.parseInt(args[1]);
User user = getUser(); User user = getUser();
Hero hero = user.getHeroManager().getHero(heroId); Map<String, Hero> heroMap = user.getHeroManager().getHeroMap();
for (Hero hero : heroMap.values()) {
Training training = hero.getTraining(); Training training = hero.getTraining();
training.setLv(lv); training.setLv(lv);
hero.setTraining(training); hero.setTraining(training);
}
return true; return true;
} }
} }

View File

@ -87,6 +87,7 @@ public class ContinuousGiftActivity extends AbstractActivity {
Collection<SThemeActivityShop> themeShops = SThemeActivityShop.themeMap.getOrDefault(id, new HashMap<>(0)).values(); Collection<SThemeActivityShop> themeShops = SThemeActivityShop.themeMap.getOrDefault(id, new HashMap<>(0)).values();
for (SThemeActivityShop theme : themeShops) { for (SThemeActivityShop theme : themeShops) {
LOGGER.info("连续礼包活动日志acid:{},uid:{},giftid:{},num:{},themeid:{},themegiftid:{},themetype:{}",id,user.getId(),giftId,giftNum,theme.getId(),theme.getGoodId(),theme.getGoodType());
if (theme.getGoodId() == giftId && theme.getGoodType() == type){ if (theme.getGoodId() == giftId && theme.getGoodType() == type){
// 记录礼包购买次数 // 记录礼包购买次数
ActivityProgressInfo current = missionMap.getOrDefault(theme.getId(),new ActivityProgressInfo()); ActivityProgressInfo current = missionMap.getOrDefault(theme.getId(),new ActivityProgressInfo());
@ -94,8 +95,8 @@ public class ContinuousGiftActivity extends AbstractActivity {
// 当前礼包状态处理 // 当前礼包状态处理
if (checkBuyGiftLimit(user,theme.getId(),current.getProgrss())){ if (checkBuyGiftLimit(user,theme.getId(),current.getProgrss())){
current.setState(8); current.setState(8);
missionMap.put(theme.getId(),current);
} }
missionMap.put(theme.getId(),current);
break; break;
} }
} }