Merge branch 'master_dev' into master_haizei
commit
22e672288a
|
@ -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();
|
||||||
Training training = hero.getTraining();
|
for (Hero hero : heroMap.values()) {
|
||||||
training.setLv(lv);
|
Training training = hero.getTraining();
|
||||||
hero.setTraining(training);
|
training.setLv(lv);
|
||||||
|
hero.setTraining(training);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue